@argonprotocol/mainchain 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/lib/chunk-BQR6FEVP.js +854 -0
- package/lib/chunk-BQR6FEVP.js.map +1 -0
- package/lib/chunk-CHGCEO2U.cjs +2567 -0
- package/lib/chunk-CHGCEO2U.cjs.map +1 -0
- package/lib/chunk-EY3HYZMJ.cjs +854 -0
- package/lib/chunk-EY3HYZMJ.cjs.map +1 -0
- package/lib/chunk-RXCQYVE7.js +2567 -0
- package/lib/chunk-RXCQYVE7.js.map +1 -0
- package/lib/cli.cjs +5 -3347
- package/lib/cli.cjs.map +1 -1
- package/lib/cli.js +5 -3343
- package/lib/cli.js.map +1 -1
- package/lib/clis/index.cjs +4 -3355
- package/lib/clis/index.cjs.map +1 -1
- package/lib/clis/index.d.cts +1 -2
- package/lib/clis/index.d.ts +1 -2
- package/lib/clis/index.js +14 -3343
- package/lib/clis/index.js.map +1 -1
- package/lib/index.cjs +80 -2581
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +853 -623
- package/lib/index.d.ts +853 -623
- package/lib/index.js +42 -2471
- package/lib/index.js.map +1 -1
- package/package.json +10 -7
package/lib/cli.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/clis/index.ts","../src/clis/accountCli.ts","../src/index.ts","../src/interfaces/augment-api-consts.ts","../src/interfaces/augment-api-errors.ts","../src/interfaces/augment-api-events.ts","../src/interfaces/augment-api-query.ts","../src/interfaces/augment-api-tx.ts","../src/interfaces/augment-api-rpc.ts","../src/interfaces/augment-api-runtime.ts","../src/interfaces/augment-types.ts","../src/WageProtector.ts","../src/TxSubmitter.ts","../src/utils.ts","../src/AccountRegistry.ts","../src/Accountset.ts","../src/BlockWatch.ts","../src/MiningRotations.ts","../src/AccountMiners.ts","../src/MiningBids.ts","../src/Vault.ts","../src/VaultMonitor.ts","../src/CohortBidderHistory.ts","../src/CohortBidder.ts","../src/BidPool.ts","../src/BitcoinLocks.ts","../src/keyringUtils.ts","../src/clis/vaultCli.ts","../src/clis/miningCli.ts","../src/clis/liquidityCli.ts","../src/clis/bitcoinCli.ts","../src/clis/keyringStore.ts","../src/cli.ts"],"sourcesContent":["import { Command, Option } from '@commander-js/extra-typings';\nimport accountCli from './accountCli';\nimport { configDotenv } from 'dotenv';\nimport Path from 'node:path';\nimport vaultCli from './vaultCli';\nimport miningCli from './miningCli';\nimport liquidityCli from './liquidityCli';\nimport bitcoinCli from './bitcoinCli';\nimport { Accountset, parseSubaccountRange } from '../Accountset';\nimport { getClient, keyringFromSuri, KeyringPair } from '../index';\nimport { keyringFromFile, saveKeyringPair } from './keyringStore';\n\nexport {\n accountCli,\n vaultCli,\n miningCli,\n liquidityCli,\n bitcoinCli,\n keyringFromFile,\n saveKeyringPair,\n};\n\nexport function globalOptions(program: Command) {\n return program.optsWithGlobals() as IGlobalOptions;\n}\n\nexport function buildCli() {\n return new Command('Argon CLI')\n .option('-e, --env <path>', 'The path to the account .env file to load')\n .addOption(\n new Option('-u, --mainchain-url <url>', 'The mainchain URL to connect to')\n .default('wss://rpc.argon.network')\n .env('MAINCHAIN_URL'),\n )\n .addOption(\n new Option(\n '--account-file-path <jsonPath>',\n 'The path to your json seed file from polkadotjs',\n ).env('ACCOUNT_JSON_PATH'),\n )\n .addOption(\n new Option(\n '--account-suri <secretUri>',\n 'A secret uri (suri) to use for the account',\n ).env('ACCOUNT_SURI'),\n )\n .addOption(\n new Option(\n '--account-passphrase <password>',\n 'The password for your seed file',\n ).env('ACCOUNT_PASSPHRASE'),\n )\n .addOption(\n new Option(\n '--account-passphrase-file <path>',\n 'The path to a password for your seed file',\n ),\n )\n .addOption(\n new Option(\n '-s, --subaccounts <range>',\n 'Restrict this operation to a subset of the subaccounts (eg, 0-10)',\n )\n .env('SUBACCOUNT_RANGE')\n .argParser(parseSubaccountRange),\n )\n .addCommand(accountCli())\n .addCommand(vaultCli())\n .addCommand(miningCli())\n .addCommand(liquidityCli())\n .addCommand(bitcoinCli());\n}\n\nexport async function accountsetFromCli(\n program: Command,\n proxyForAddress?: string,\n): Promise<Accountset> {\n const opts = program.parent?.optsWithGlobals() as unknown as IGlobalOptions;\n\n let keypair: KeyringPair | undefined;\n if (opts.accountSuri) {\n keypair = keyringFromSuri(opts.accountSuri!);\n }\n if (opts.accountFilePath) {\n keypair = await keyringFromFile({\n filePath: opts.accountFilePath,\n passphrase: opts.accountPassphrase,\n passphraseFile: opts.accountPassphraseFile,\n });\n }\n if (!keypair) {\n throw new Error(\n 'No ACCOUNT account loaded (either ACCOUNT_SURI or ACCOUNT_JSON_PATH required)',\n );\n }\n\n const client = getClient(opts.mainchainUrl);\n if (proxyForAddress) {\n return new Accountset({\n client,\n isProxy: true,\n seedAddress: proxyForAddress,\n txSubmitter: keypair,\n });\n } else {\n return new Accountset({\n seedAccount: keypair,\n client,\n });\n }\n}\n\nexport type IGlobalOptions = ReturnType<ReturnType<typeof buildCli>['opts']>;\n\nexport function addGlobalArgs(program: ReturnType<typeof buildCli>) {\n for (const command of program.commands) {\n command.configureHelp({\n showGlobalOptions: true,\n });\n for (const nested of command.commands) {\n nested.configureHelp({\n showGlobalOptions: true,\n });\n }\n }\n}\n\nexport function applyEnv(\n program: ReturnType<typeof buildCli>,\n): string | undefined {\n program.parseOptions(process.argv);\n const { env } = program.optsWithGlobals();\n if (env) {\n const envPath = Path.resolve(process.cwd(), env);\n const res = configDotenv({ path: envPath });\n if (res.parsed?.ACCOUNT_JSON_PATH) {\n // ensure path is relative to the env file if provided that way\n process.env.ACCOUNT_JSON_PATH = Path.relative(\n envPath,\n process.env.ACCOUNT_JSON_PATH!,\n );\n }\n }\n return env;\n}\n","import { Command } from '@commander-js/extra-typings';\nimport { mnemonicGenerate } from '../index';\nimport { printTable } from 'console-table-printer';\nimport { cryptoWaitReady } from '@polkadot/util-crypto';\nimport { writeFileSync } from 'node:fs';\nimport { parseSubaccountRange } from '../Accountset';\nimport Env from '../env';\nimport * as process from 'node:process';\nimport { accountsetFromCli, globalOptions } from './index';\n\nexport default function accountCli() {\n const program = new Command('accounts').description(\n 'Manage subaccounts from a single keypair',\n );\n\n program\n .command('watch')\n .description('Watch for blocks closed by subaccounts')\n .action(async () => {\n const accountset = await accountsetFromCli(program);\n const accountMiners = await accountset.watchBlocks();\n\n accountMiners.events.on('mined', (_block, mined) => {\n console.log('Your accounts authored a block', mined);\n });\n accountMiners.events.on('minted', (_block, minted) => {\n console.log('Your accounts minted argons', minted);\n });\n });\n\n program\n .command('list', { isDefault: true })\n .description('Show subaccounts')\n .option('--addresses', 'Just show a list of ids')\n .action(async ({ addresses }) => {\n const { subaccounts } = globalOptions(program);\n const accountset = await accountsetFromCli(program);\n\n if (addresses) {\n const addresses = accountset.addresses;\n console.log(addresses.join(','));\n process.exit(0);\n }\n const [argonots, argons, seats, bids] = await Promise.all([\n accountset.totalArgonotsAt(),\n accountset.totalArgonsAt(),\n accountset.miningSeats(),\n accountset.bids(),\n ]);\n const accountSubset = subaccounts\n ? accountset.getAccountsInRange(subaccounts)\n : undefined;\n const status = accountset.status({\n argons,\n argonots,\n accountSubset,\n seats,\n bids,\n });\n printTable(status);\n process.exit(0);\n });\n\n program\n .command('create')\n .description('Create an account \"env\" file and optionally register keys')\n .requiredOption(\n '--path <path>',\n 'The path to an env file to create (convention is .env.<name>)',\n )\n .option(\n '--register-keys-to <url>',\n 'Register the keys to a url (normally this is localhost)',\n )\n .action(async ({ registerKeysTo, path }) => {\n const { accountPassphrase, accountSuri, accountFilePath } =\n globalOptions(program);\n const accountset = await accountsetFromCli(program);\n process.env.KEYS_MNEMONIC ||= mnemonicGenerate();\n if (registerKeysTo) {\n await accountset.registerKeys(registerKeysTo);\n console.log('Keys registered to', registerKeysTo);\n }\n const envData = <Env>{\n ACCOUNT_JSON_PATH: accountFilePath,\n ACCOUNT_SURI: accountSuri,\n ACCOUNT_PASSPHRASE: accountPassphrase,\n KEYS_MNEMONIC: process.env.KEYS_MNEMONIC,\n SUBACCOUNT_RANGE: '0-49',\n };\n let envfile = '';\n for (const [key, value] of Object.entries(envData)) {\n if (key) {\n const line = `${key}=${String(value)}`;\n envfile += line + '\\n';\n }\n }\n writeFileSync(path, envfile);\n console.log('Created env file at', path);\n process.exit();\n });\n\n program\n .command('new-key-seed')\n .description('Create a new mnemonic for runtime keys')\n .action(async () => {\n await cryptoWaitReady();\n const mnemonic = mnemonicGenerate();\n console.log(\n 'New mnemonic (add this to your .env as KEYS_MNEMONIC):',\n mnemonic,\n );\n process.exit(0);\n });\n\n program\n .command('register-keys')\n .description('Create an insert-keys script with curl')\n .argument(\n '[node-rpc-url]',\n 'The url to your node host (should be installed on machine via localhost)',\n 'http://localhost:9944',\n )\n .option(\n '--print-only',\n 'Output as curl commands instead of direct registration',\n )\n .action(async (nodeRpcUrl, { printOnly }) => {\n const accountset = await accountsetFromCli(program);\n if (printOnly) {\n const { gran, seal } = accountset.keys();\n const commands: string[] = [];\n const data = [\n {\n jsonrpc: '2.0',\n id: 0,\n method: 'author_insertKey',\n params: ['gran', gran.privateKey, gran.publicKey],\n },\n {\n jsonrpc: '2.0',\n id: 1,\n method: 'author_insertKey',\n params: ['seal', seal.privateKey, seal.publicKey],\n },\n ];\n for (const key of data) {\n commands.push(\n `curl -X POST -H \"Content-Type: application/json\" -d '${JSON.stringify(key)}' ${nodeRpcUrl}`,\n );\n }\n\n console.log(commands.join(' && '));\n } else {\n await accountset.registerKeys(nodeRpcUrl);\n }\n process.exit();\n });\n\n program\n .command('consolidate')\n .description('Consolidate all argons into parent account')\n .option(\n '-s, --subaccounts <range>',\n 'Restrict this operation to a subset of the subaccounts (eg, 0-10)',\n parseSubaccountRange,\n )\n .action(async ({ subaccounts }) => {\n const accountset = await accountsetFromCli(program);\n const result = await accountset.consolidate(subaccounts);\n printTable(result);\n process.exit(0);\n });\n return program;\n}\n","import './interfaces/augment-api';\nimport './interfaces/augment-types';\nimport './interfaces/types-lookup';\nimport type { KeyringPair, KeyringPair$Json } from '@polkadot/keyring/types';\nimport { ApiPromise, HttpProvider, Keyring, WsProvider } from '@polkadot/api';\nimport {\n cryptoWaitReady,\n decodeAddress,\n mnemonicGenerate,\n} from '@polkadot/util-crypto';\nimport type { InterfaceTypes } from '@polkadot/types/types/registry';\nimport type { KeypairType } from '@polkadot/util-crypto/types';\nimport type { ProviderInterface } from '@polkadot/rpc-provider/types';\n\nexport * from '@polkadot/types-codec/types';\nexport { WageProtector } from './WageProtector';\nexport { TxSubmitter } from './TxSubmitter';\nexport { Accountset } from './Accountset';\nexport { MiningBids } from './MiningBids';\nexport { AccountMiners } from './AccountMiners';\nexport { MiningRotations } from './MiningRotations';\nexport {\n BlockWatch,\n getAuthorFromHeader,\n getTickFromHeader,\n} from './BlockWatch';\nexport * from './utils';\nexport { AccountRegistry } from './AccountRegistry';\nexport { Vault } from './Vault';\nexport { VaultMonitor } from './VaultMonitor';\nexport { CohortBidder } from './CohortBidder';\nexport { CohortBidderHistory } from './CohortBidderHistory';\nexport { BidPool } from './BidPool';\nexport { BitcoinLocks } from './BitcoinLocks';\nexport { keyringFromSuri, createKeyringPair } from './keyringUtils';\nexport {\n Keyring,\n KeyringPair,\n KeyringPair$Json,\n KeypairType,\n mnemonicGenerate,\n decodeAddress,\n};\n\nexport * from '@polkadot/types';\nexport * from '@polkadot/types/lookup';\nexport * from '@polkadot/types/interfaces';\nexport { InterfaceTypes as interfaces };\n\nexport type ArgonClient = ApiPromise;\n\n/**\n * Wait for the crypto library to be ready (requires wasm, which needs async loading in commonjs)\n */\nexport async function waitForLoad(): Promise<void> {\n await cryptoWaitReady();\n}\n\n/**\n * Get a client for the given host\n * @param host The host to connect to\n * @returns The client\n */\nexport async function getClient(host: string): Promise<ArgonClient> {\n let provider: ProviderInterface;\n if (host.startsWith('http:')) {\n provider = new HttpProvider(host);\n } else {\n provider = new WsProvider(host);\n }\n return await ApiPromise.create({ provider, noInitWarn: true });\n}\n","// Auto-generated via `yarn polkadot-types-from-chain`, do not edit\n/* eslint-disable */\n\n// import type lookup before we augment - in some environments\n// this is required to allow for ambient/previous definitions\nimport '@polkadot/api-base/types/consts';\n\nimport type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';\nimport type { u128, u16, u32, u64, u8 } from '@polkadot/types-codec';\nimport type { ITuple } from '@polkadot/types-codec/types';\nimport type { Percent } from '@polkadot/types/interfaces/runtime';\nimport type {\n FrameSupportPalletId,\n FrameSystemLimitsBlockLength,\n FrameSystemLimitsBlockWeights,\n SpVersionRuntimeVersion,\n SpWeightsRuntimeDbWeight,\n} from '@polkadot/types/lookup';\n\nexport type __AugmentedConst<ApiType extends ApiTypes> =\n AugmentedConst<ApiType>;\n\ndeclare module '@polkadot/api-base/types/consts' {\n interface AugmentedConsts<ApiType extends ApiTypes> {\n balances: {\n /**\n * The minimum amount required to keep an account open. MUST BE GREATER THAN ZERO!\n *\n * If you *really* need it to be zero, you can enable the feature `insecure_zero_ed` for\n * this pallet. However, you do so at your own risk: this will open up a major DoS vector.\n * In case you have multiple sources of provider references, you may also get unexpected\n * behaviour if you set this to zero.\n *\n * Bottom line: Do yourself a favour and make it at least one!\n **/\n existentialDeposit: u128 & AugmentedConst<ApiType>;\n /**\n * The maximum number of individual freeze locks that can exist on an account at any time.\n **/\n maxFreezes: u32 & AugmentedConst<ApiType>;\n /**\n * The maximum number of locks that should exist on an account.\n * Not strictly enforced, but used for weight estimation.\n *\n * Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`\n **/\n maxLocks: u32 & AugmentedConst<ApiType>;\n /**\n * The maximum number of named reserves that can exist on an account.\n *\n * Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`\n **/\n maxReserves: u32 & AugmentedConst<ApiType>;\n };\n bitcoinLocks: {\n /**\n * Argon blocks per day\n **/\n argonTicksPerDay: u64 & AugmentedConst<ApiType>;\n /**\n * The number of bitcoin blocks a bitcoin is locked for\n **/\n lockDurationBlocks: u64 & AugmentedConst<ApiType>;\n /**\n * The bitcoin blocks after an obligation expires which the vault will be allowed to claim\n * a bitcoin\n **/\n lockReclamationBlocks: u64 & AugmentedConst<ApiType>;\n /**\n * Number of bitcoin blocks a vault has to counter-sign a bitcoin release\n **/\n lockReleaseCosignDeadlineBlocks: u64 & AugmentedConst<ApiType>;\n /**\n * Maximum releasing utxos at a time\n **/\n maxConcurrentlyReleasingLocks: u32 & AugmentedConst<ApiType>;\n };\n bitcoinUtxos: {\n /**\n * Maximum bitcoin blocks to watch a Utxo for confirmation before canceling\n **/\n maxPendingConfirmationBlocks: u64 & AugmentedConst<ApiType>;\n /**\n * The maximum number of UTXOs that can be tracked in a block and/or expiring at same block\n **/\n maxPendingConfirmationUtxos: u32 & AugmentedConst<ApiType>;\n };\n blockRewards: {\n /**\n * The tick number at which the halving begins for ownership tokens\n **/\n halvingBeginTick: u64 & AugmentedConst<ApiType>;\n /**\n * Number of ticks for halving of ownership share rewards\n **/\n halvingTicks: u64 & AugmentedConst<ApiType>;\n /**\n * The growth path for both ownership and argons before halving\n **/\n incrementalGrowth: ITuple<[u128, u64, u128]> & AugmentedConst<ApiType>;\n /**\n * Percent as a number out of 100 of the block reward that goes to the miner.\n **/\n minerPayoutPercent: u128 & AugmentedConst<ApiType>;\n /**\n * Number of argons minted per block\n **/\n startingArgonsPerBlock: u128 & AugmentedConst<ApiType>;\n /**\n * Number of ownership tokens minted per block\n **/\n startingOwnershipTokensPerBlock: u128 & AugmentedConst<ApiType>;\n };\n blockSealSpec: {\n /**\n * The number of historical compute times to use to calculate the rolling compute average\n * (for adjustment)\n **/\n historicalComputeBlocksForAverage: u32 & AugmentedConst<ApiType>;\n /**\n * The number of historical vote blocks to use to calculate the rolling vote average\n **/\n historicalVoteBlocksForAverage: u32 & AugmentedConst<ApiType>;\n /**\n * The maximum active notaries allowed\n **/\n maxActiveNotaries: u32 & AugmentedConst<ApiType>;\n /**\n * The desired votes per block\n **/\n targetBlockVotes: u128 & AugmentedConst<ApiType>;\n };\n chainTransfer: {\n /**\n * How many transfers out can be queued per block\n **/\n maxPendingTransfersOutPerBlock: u32 & AugmentedConst<ApiType>;\n palletId: FrameSupportPalletId & AugmentedConst<ApiType>;\n /**\n * How long a transfer should remain in storage before returning. NOTE: there is a 2 tick\n * grace period where we will still allow a transfer\n **/\n transferExpirationTicks: u64 & AugmentedConst<ApiType>;\n };\n grandpa: {\n /**\n * Max Authorities in use\n **/\n maxAuthorities: u32 & AugmentedConst<ApiType>;\n /**\n * The maximum number of nominators for each validator.\n **/\n maxNominators: u32 & AugmentedConst<ApiType>;\n /**\n * The maximum number of entries to keep in the set id to session index mapping.\n *\n * Since the `SetIdSession` map is only used for validating equivocations this\n * value should relate to the bonding duration of whatever staking system is\n * being used (if any). If equivocation handling is not enabled then this value\n * can be zero.\n **/\n maxSetIdSessionEntries: u64 & AugmentedConst<ApiType>;\n };\n liquidityPools: {\n /**\n * Bid Pool burn percent\n **/\n bidPoolBurnPercent: Percent & AugmentedConst<ApiType>;\n /**\n * The number of vaults that can participate in the bid pools. This is a substrate limit.\n **/\n maxBidPoolVaultParticipants: u32 & AugmentedConst<ApiType>;\n /**\n * The maximum number of contributors to a bond fund\n **/\n maxLiquidityPoolContributors: u32 & AugmentedConst<ApiType>;\n /**\n * The minimum argons per fund contributor\n **/\n minimumArgonsPerContributor: u128 & AugmentedConst<ApiType>;\n /**\n * A pallet id that is used to hold the bid pool\n **/\n palletId: FrameSupportPalletId & AugmentedConst<ApiType>;\n };\n miningSlot: {\n /**\n * The max percent swing for the argonots per slot (from the last percent\n **/\n argonotsPercentAdjustmentDamper: u128 & AugmentedConst<ApiType>;\n /**\n * The increment that bids can be on (for instance, one cent increments)\n **/\n bidIncrements: u128 & AugmentedConst<ApiType>;\n /**\n * How many new miners can be in the cohort for each slot\n **/\n maxCohortSize: u32 & AugmentedConst<ApiType>;\n /**\n * The maximum percent of argonots in the network that should be required for\n * mining seats\n **/\n maximumArgonotProrataPercent: Percent & AugmentedConst<ApiType>;\n /**\n * The maximum number of Miners that the pallet can hold.\n **/\n maxMiners: u32 & AugmentedConst<ApiType>;\n /**\n * The minimum argonots needed per seat\n **/\n minimumArgonotsPerSeat: u128 & AugmentedConst<ApiType>;\n /**\n * The target number of bids per slot. This will adjust the argonots per seat up or\n * down to ensure mining slots are filled.\n **/\n targetBidsPerSlot: u32 & AugmentedConst<ApiType>;\n };\n mint: {\n /**\n * The maximum number of mint histories to keep\n **/\n maxMintHistoryToMaintain: u32 & AugmentedConst<ApiType>;\n /**\n * The maximum number of UTXOs that can be waiting for minting\n **/\n maxPendingMintUtxos: u32 & AugmentedConst<ApiType>;\n };\n multisig: {\n /**\n * The base amount of currency needed to reserve for creating a multisig execution or to\n * store a dispatch call for later.\n *\n * This is held for an additional storage item whose value size is\n * `4 + sizeof((BlockNumber, Balance, AccountId))` bytes and whose key size is\n * `32 + sizeof(AccountId)` bytes.\n **/\n depositBase: u128 & AugmentedConst<ApiType>;\n /**\n * The amount of currency needed per unit threshold when creating a multisig execution.\n *\n * This is held for adding 32 bytes more into a pre-existing storage value.\n **/\n depositFactor: u128 & AugmentedConst<ApiType>;\n /**\n * The maximum amount of signatories allowed in the multisig.\n **/\n maxSignatories: u32 & AugmentedConst<ApiType>;\n };\n notaries: {\n /**\n * The maximum active notaries allowed\n **/\n maxActiveNotaries: u32 & AugmentedConst<ApiType>;\n /**\n * Maximum hosts a notary can supply\n **/\n maxNotaryHosts: u32 & AugmentedConst<ApiType>;\n /**\n * The maximum blocks a proposal can sit unapproved\n **/\n maxProposalHoldBlocks: u32 & AugmentedConst<ApiType>;\n maxProposalsPerBlock: u32 & AugmentedConst<ApiType>;\n /**\n * Number of ticks to maintain key history for each notary\n * NOTE: only pruned when new keys are added\n **/\n maxTicksForKeyHistory: u32 & AugmentedConst<ApiType>;\n /**\n * Number of ticks to delay changing a notaries' meta (this is to allow a window for\n * notaries to switch to new keys after a new key is finalized)\n **/\n metaChangesTickDelay: u64 & AugmentedConst<ApiType>;\n };\n ownership: {\n /**\n * The minimum amount required to keep an account open. MUST BE GREATER THAN ZERO!\n *\n * If you *really* need it to be zero, you can enable the feature `insecure_zero_ed` for\n * this pallet. However, you do so at your own risk: this will open up a major DoS vector.\n * In case you have multiple sources of provider references, you may also get unexpected\n * behaviour if you set this to zero.\n *\n * Bottom line: Do yourself a favour and make it at least one!\n **/\n existentialDeposit: u128 & AugmentedConst<ApiType>;\n /**\n * The maximum number of individual freeze locks that can exist on an account at any time.\n **/\n maxFreezes: u32 & AugmentedConst<ApiType>;\n /**\n * The maximum number of locks that should exist on an account.\n * Not strictly enforced, but used for weight estimation.\n *\n * Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`\n **/\n maxLocks: u32 & AugmentedConst<ApiType>;\n /**\n * The maximum number of named reserves that can exist on an account.\n *\n * Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`\n **/\n maxReserves: u32 & AugmentedConst<ApiType>;\n };\n priceIndex: {\n /**\n * The max price difference dropping below target or raising above target per tick. There's\n * no corresponding constant for time to recovery to target\n **/\n maxArgonChangePerTickAwayFromTarget: u128 & AugmentedConst<ApiType>;\n maxArgonTargetChangePerTick: u128 & AugmentedConst<ApiType>;\n /**\n * The maximum number of ticks to preserve a price index\n **/\n maxDowntimeTicksBeforeReset: u64 & AugmentedConst<ApiType>;\n /**\n * The oldest history to keep\n **/\n maxPriceAgeInTicks: u64 & AugmentedConst<ApiType>;\n };\n proxy: {\n /**\n * The base amount of currency needed to reserve for creating an announcement.\n *\n * This is held when a new storage item holding a `Balance` is created (typically 16\n * bytes).\n **/\n announcementDepositBase: u128 & AugmentedConst<ApiType>;\n /**\n * The amount of currency needed per announcement made.\n *\n * This is held for adding an `AccountId`, `Hash` and `BlockNumber` (typically 68 bytes)\n * into a pre-existing storage value.\n **/\n announcementDepositFactor: u128 & AugmentedConst<ApiType>;\n /**\n * The maximum amount of time-delayed announcements that are allowed to be pending.\n **/\n maxPending: u32 & AugmentedConst<ApiType>;\n /**\n * The maximum amount of proxies allowed for a single account.\n **/\n maxProxies: u32 & AugmentedConst<ApiType>;\n /**\n * The base amount of currency needed to reserve for creating a proxy.\n *\n * This is held for an additional storage item whose value size is\n * `sizeof(Balance)` bytes and whose key size is `sizeof(AccountId)` bytes.\n **/\n proxyDepositBase: u128 & AugmentedConst<ApiType>;\n /**\n * The amount of currency needed per proxy added.\n *\n * This is held for adding 32 bytes plus an instance of `ProxyType` more into a\n * pre-existing storage value. Thus, when configuring `ProxyDepositFactor` one should take\n * into account `32 + proxy_type.encode().len()` bytes of data.\n **/\n proxyDepositFactor: u128 & AugmentedConst<ApiType>;\n };\n system: {\n /**\n * Maximum number of block number to block hash mappings to keep (oldest pruned first).\n **/\n blockHashCount: u32 & AugmentedConst<ApiType>;\n /**\n * The maximum length of a block (in bytes).\n **/\n blockLength: FrameSystemLimitsBlockLength & AugmentedConst<ApiType>;\n /**\n * Block & extrinsics weights: base values and limits.\n **/\n blockWeights: FrameSystemLimitsBlockWeights & AugmentedConst<ApiType>;\n /**\n * The weight of runtime database operations the runtime can invoke.\n **/\n dbWeight: SpWeightsRuntimeDbWeight & AugmentedConst<ApiType>;\n /**\n * The designated SS58 prefix of this chain.\n *\n * This replaces the \"ss58Format\" property declared in the chain spec. Reason is\n * that the runtime should know about the prefix in order to make use of it as\n * an identifier of the chain.\n **/\n ss58Prefix: u16 & AugmentedConst<ApiType>;\n /**\n * Get the chain's in-code version.\n **/\n version: SpVersionRuntimeVersion & AugmentedConst<ApiType>;\n };\n timestamp: {\n /**\n * The minimum period between blocks.\n *\n * Be aware that this is different to the *expected* period that the block production\n * apparatus provides. Your chosen consensus system will generally work with this to\n * determine a sensible block time. For example, in the Aura pallet it will be double this\n * period on default settings.\n **/\n minimumPeriod: u64 & AugmentedConst<ApiType>;\n };\n tokenGateway: {\n /**\n * The decimals of the native currency\n **/\n decimals: u8 & AugmentedConst<ApiType>;\n };\n transactionPayment: {\n /**\n * A fee multiplier for `Operational` extrinsics to compute \"virtual tip\" to boost their\n * `priority`\n *\n * This value is multiplied by the `final_fee` to obtain a \"virtual tip\" that is later\n * added to a tip component in regular `priority` calculations.\n * It means that a `Normal` transaction can front-run a similarly-sized `Operational`\n * extrinsic (with no tip), by including a tip value greater than the virtual tip.\n *\n * ```rust,ignore\n * // For `Normal`\n * let priority = priority_calc(tip);\n *\n * // For `Operational`\n * let virtual_tip = (inclusion_fee + tip) * OperationalFeeMultiplier;\n * let priority = priority_calc(tip + virtual_tip);\n * ```\n *\n * Note that since we use `final_fee` the multiplier applies also to the regular `tip`\n * sent with the transaction. So, not only does the transaction get a priority bump based\n * on the `inclusion_fee`, but we also amplify the impact of tips applied to `Operational`\n * transactions.\n **/\n operationalFeeMultiplier: u8 & AugmentedConst<ApiType>;\n };\n txPause: {\n /**\n * Maximum length for pallet name and call name SCALE encoded string names.\n *\n * TOO LONG NAMES WILL BE TREATED AS PAUSED.\n **/\n maxNameLen: u32 & AugmentedConst<ApiType>;\n };\n utility: {\n /**\n * The limit on the number of batched calls.\n **/\n batchedCallsLimit: u32 & AugmentedConst<ApiType>;\n };\n vaults: {\n /**\n * Pallet storage requires bounds, so we have to set a maximum number that can expire in a\n * single block\n **/\n maxConcurrentlyExpiringObligations: u32 & AugmentedConst<ApiType>;\n /**\n * The max pending vault term changes per block\n **/\n maxPendingTermModificationsPerTick: u32 & AugmentedConst<ApiType>;\n /**\n * Minimum amount for an obligation\n **/\n minimumObligationAmount: u128 & AugmentedConst<ApiType>;\n };\n } // AugmentedConsts\n} // declare module\n","// Auto-generated via `yarn polkadot-types-from-chain`, do not edit\n/* eslint-disable */\n\n// import type lookup before we augment - in some environments\n// this is required to allow for ambient/previous definitions\nimport '@polkadot/api-base/types/errors';\n\nimport type { ApiTypes, AugmentedError } from '@polkadot/api-base/types';\n\nexport type __AugmentedError<ApiType extends ApiTypes> =\n AugmentedError<ApiType>;\n\ndeclare module '@polkadot/api-base/types/errors' {\n interface AugmentedErrors<ApiType extends ApiTypes> {\n balances: {\n /**\n * Beneficiary account must pre-exist.\n **/\n DeadAccount: AugmentedError<ApiType>;\n /**\n * The delta cannot be zero.\n **/\n DeltaZero: AugmentedError<ApiType>;\n /**\n * Value too low to create account due to existential deposit.\n **/\n ExistentialDeposit: AugmentedError<ApiType>;\n /**\n * A vesting schedule already exists for this account.\n **/\n ExistingVestingSchedule: AugmentedError<ApiType>;\n /**\n * Transfer/payment would kill account.\n **/\n Expendability: AugmentedError<ApiType>;\n /**\n * Balance too low to send value.\n **/\n InsufficientBalance: AugmentedError<ApiType>;\n /**\n * The issuance cannot be modified since it is already deactivated.\n **/\n IssuanceDeactivated: AugmentedError<ApiType>;\n /**\n * Account liquidity restrictions prevent withdrawal.\n **/\n LiquidityRestrictions: AugmentedError<ApiType>;\n /**\n * Number of freezes exceed `MaxFreezes`.\n **/\n TooManyFreezes: AugmentedError<ApiType>;\n /**\n * Number of holds exceed `VariantCountOf<T::RuntimeHoldReason>`.\n **/\n TooManyHolds: AugmentedError<ApiType>;\n /**\n * Number of named reserves exceed `MaxReserves`.\n **/\n TooManyReserves: AugmentedError<ApiType>;\n /**\n * Vesting balance too high to send value.\n **/\n VestingBalance: AugmentedError<ApiType>;\n };\n bitcoinLocks: {\n /**\n * The proposed transaction would take the account below the minimum (existential) balance\n **/\n AccountWouldGoBelowMinimumBalance: AugmentedError<ApiType>;\n /**\n * The fee for this bitcoin release is too high\n **/\n BitcoinFeeTooHigh: AugmentedError<ApiType>;\n /**\n * The cosign signature is not valid for the bitcoin release\n **/\n BitcoinInvalidCosignature: AugmentedError<ApiType>;\n /**\n * This bitcoin pubkey couldn't be decoded for release\n **/\n BitcoinPubkeyUnableToBeDecoded: AugmentedError<ApiType>;\n /**\n * The bitcoin has passed the deadline to release it\n **/\n BitcoinReleaseInitiationDeadlinePassed: AugmentedError<ApiType>;\n /**\n * This bitcoin signature couldn't be decoded for release\n **/\n BitcoinSignatureUnableToBeDecoded: AugmentedError<ApiType>;\n /**\n * This bitcoin cosign script couldn't be decoded for release\n **/\n BitcoinUnableToBeDecodedForRelease: AugmentedError<ApiType>;\n BitcoinUtxoNotFound: AugmentedError<ApiType>;\n /**\n * There are too many obligations expiring in the given expiration block\n **/\n ExpirationAtBlockOverflow: AugmentedError<ApiType>;\n GenericObligationError: AugmentedError<ApiType>;\n HoldUnexpectedlyModified: AugmentedError<ApiType>;\n InsufficientFunds: AugmentedError<ApiType>;\n InsufficientSatoshisLocked: AugmentedError<ApiType>;\n InsufficientVaultFunds: AugmentedError<ApiType>;\n /**\n * The bitcoin script to lock this bitcoin has errors\n **/\n InvalidBitcoinScript: AugmentedError<ApiType>;\n /**\n * Funding would result in an overflow of the balance type\n **/\n InvalidVaultAmount: AugmentedError<ApiType>;\n LockNotFound: AugmentedError<ApiType>;\n MinimumObligationAmountNotMet: AugmentedError<ApiType>;\n NoBitcoinPricesAvailable: AugmentedError<ApiType>;\n NoMoreObligationIds: AugmentedError<ApiType>;\n NoPermissions: AugmentedError<ApiType>;\n /**\n * No Vault public keys are available\n **/\n NoVaultBitcoinPubkeysAvailable: AugmentedError<ApiType>;\n ObligationNotFound: AugmentedError<ApiType>;\n /**\n * This bitcoin redemption has not been locked in\n **/\n RedemptionNotLocked: AugmentedError<ApiType>;\n /**\n * Unable to generate a new vault public key\n **/\n UnableToGenerateVaultBitcoinPubkey: AugmentedError<ApiType>;\n UnrecoverableHold: AugmentedError<ApiType>;\n VaultClosed: AugmentedError<ApiType>;\n VaultNotFound: AugmentedError<ApiType>;\n /**\n * This vault is not yet active\n **/\n VaultNotYetActive: AugmentedError<ApiType>;\n };\n bitcoinUtxos: {\n /**\n * Bitcoin height not confirmed yet\n **/\n BitcoinHeightNotConfirmed: AugmentedError<ApiType>;\n /**\n * Duplicated UtxoId. Already in use\n **/\n DuplicateUtxoId: AugmentedError<ApiType>;\n /**\n * Insufficient bitcoin amount\n **/\n InsufficientBitcoinAmount: AugmentedError<ApiType>;\n /**\n * Locking script has errors\n **/\n InvalidBitcoinScript: AugmentedError<ApiType>;\n /**\n * Invalid bitcoin sync height attempted\n **/\n InvalidBitcoinSyncHeight: AugmentedError<ApiType>;\n /**\n * Too many UTXOs are being tracked\n **/\n MaxUtxosExceeded: AugmentedError<ApiType>;\n /**\n * No Oracle-provided bitcoin block has been provided to the network\n **/\n NoBitcoinConfirmedBlock: AugmentedError<ApiType>;\n /**\n * No prices are available to mint bitcoins\n **/\n NoBitcoinPricesAvailable: AugmentedError<ApiType>;\n /**\n * Only an Oracle Operator can perform this action\n **/\n NoPermissions: AugmentedError<ApiType>;\n /**\n * Redemptions not currently available\n **/\n RedemptionsUnavailable: AugmentedError<ApiType>;\n /**\n * ScriptPubKey is already being waited for\n **/\n ScriptPubkeyConflict: AugmentedError<ApiType>;\n /**\n * Locked Utxo Not Found\n **/\n UtxoNotLocked: AugmentedError<ApiType>;\n };\n blockRewards: {};\n blockSeal: {\n /**\n * A block seal authority could not be properly decoded\n **/\n BlockSealDecodeError: AugmentedError<ApiType>;\n /**\n * The vote signature was invalid\n **/\n BlockVoteInvalidSignature: AugmentedError<ApiType>;\n /**\n * Could not decode the scale bytes of the votes\n **/\n CouldNotDecodeVote: AugmentedError<ApiType>;\n /**\n * Too many block seals submitted\n **/\n DuplicateBlockSealProvided: AugmentedError<ApiType>;\n /**\n * The notebook for this vote was not eligible to vote\n **/\n IneligibleNotebookUsed: AugmentedError<ApiType>;\n /**\n * The block vote did not reach the minimum voting power at time of the grandparent block\n **/\n InsufficientVotingPower: AugmentedError<ApiType>;\n /**\n * The merkle proof of vote inclusion in the notebook is invalid\n **/\n InvalidBlockVoteProof: AugmentedError<ApiType>;\n /**\n * Compute blocks cant be added in the same tick as a vote\n **/\n InvalidComputeBlockTick: AugmentedError<ApiType>;\n /**\n * Invalid fork power parent\n **/\n InvalidForkPowerParent: AugmentedError<ApiType>;\n /**\n * Vote not submitted by the right miner\n **/\n InvalidSubmitter: AugmentedError<ApiType>;\n /**\n * The block vote was not for a valid block\n **/\n InvalidVoteGrandparentHash: AugmentedError<ApiType>;\n /**\n * The strength of the given seal did not match calculations\n **/\n InvalidVoteSealStrength: AugmentedError<ApiType>;\n /**\n * Too many notebooks were submitted for the current tick. Should not be possible\n **/\n MaxNotebooksAtTickExceeded: AugmentedError<ApiType>;\n /**\n * No closest miner found for vote\n **/\n NoClosestMinerFoundForVote: AugmentedError<ApiType>;\n /**\n * The lookup to verify a vote's authenticity is not available for the given block\n **/\n NoEligibleVotingRoot: AugmentedError<ApiType>;\n /**\n * No vote minimum found at grandparent height\n **/\n NoGrandparentVoteMinimum: AugmentedError<ApiType>;\n /**\n * No registered voting key found for the parent block\n **/\n ParentVotingKeyNotFound: AugmentedError<ApiType>;\n /**\n * Could not decode the vote bytes\n **/\n UnableToDecodeVoteAccount: AugmentedError<ApiType>;\n /**\n * The block author is not a registered miner\n **/\n UnregisteredBlockAuthor: AugmentedError<ApiType>;\n };\n blockSealSpec: {\n /**\n * The maximum number of notebooks at the current tick has been exceeded\n **/\n MaxNotebooksAtTickExceeded: AugmentedError<ApiType>;\n };\n chainTransfer: {\n /**\n * Insufficient balance to create this transfer\n **/\n InsufficientFunds: AugmentedError<ApiType>;\n /**\n * Insufficient balance to fulfill a mainchain transfer\n **/\n InsufficientNotarizedFunds: AugmentedError<ApiType>;\n /**\n * The notary id is not registered\n **/\n InvalidNotaryUsedForTransfer: AugmentedError<ApiType>;\n /**\n * The transfer was already submitted in a previous block\n **/\n InvalidOrDuplicatedLocalchainTransfer: AugmentedError<ApiType>;\n MaxBlockTransfersExceeded: AugmentedError<ApiType>;\n /**\n * A transfer was submitted in a previous block but the expiration block has passed\n **/\n NotebookIncludesExpiredLocalchainTransfer: AugmentedError<ApiType>;\n };\n digests: {\n /**\n * Failed to decode digests\n **/\n CouldNotDecodeDigest: AugmentedError<ApiType>;\n /**\n * Duplicate AuthorDigest found\n **/\n DuplicateAuthorDigest: AugmentedError<ApiType>;\n /**\n * Duplicate BlockVoteDigest found\n **/\n DuplicateBlockVoteDigest: AugmentedError<ApiType>;\n /**\n * Duplicate ForkPowerDigest found\n **/\n DuplicateForkPowerDigest: AugmentedError<ApiType>;\n /**\n * Duplicate NotebookDigest found\n **/\n DuplicateNotebookDigest: AugmentedError<ApiType>;\n /**\n * Duplicate ParentVotingKeyDigest found\n **/\n DuplicateParentVotingKeyDigest: AugmentedError<ApiType>;\n /**\n * Duplicate TickDigest found\n **/\n DuplicateTickDigest: AugmentedError<ApiType>;\n /**\n * Missing AuthorDigest\n **/\n MissingAuthorDigest: AugmentedError<ApiType>;\n /**\n * Missing BlockVoteDigest\n **/\n MissingBlockVoteDigest: AugmentedError<ApiType>;\n /**\n * Missing NotebookDigest\n **/\n MissingNotebookDigest: AugmentedError<ApiType>;\n /**\n * Missing ParentVotingKeyDigest\n **/\n MissingParentVotingKeyDigest: AugmentedError<ApiType>;\n /**\n * Missing TickDigest\n **/\n MissingTickDigest: AugmentedError<ApiType>;\n };\n domains: {\n /**\n * Error decoding account from notary\n **/\n AccountDecodingError: AugmentedError<ApiType>;\n /**\n * The domain is not registered.\n **/\n DomainNotRegistered: AugmentedError<ApiType>;\n /**\n * Failed to add to the expiring domain list\n **/\n FailedToAddExpiringDomain: AugmentedError<ApiType>;\n /**\n * Failed to add to the address history.\n **/\n FailedToAddToAddressHistory: AugmentedError<ApiType>;\n /**\n * The sender is not the owner of the domain.\n **/\n NotDomainOwner: AugmentedError<ApiType>;\n };\n grandpa: {\n /**\n * Attempt to signal GRANDPA change with one already pending.\n **/\n ChangePending: AugmentedError<ApiType>;\n /**\n * A given equivocation report is valid but already previously reported.\n **/\n DuplicateOffenceReport: AugmentedError<ApiType>;\n /**\n * An equivocation proof provided as part of an equivocation report is invalid.\n **/\n InvalidEquivocationProof: AugmentedError<ApiType>;\n /**\n * A key ownership proof provided as part of an equivocation report is invalid.\n **/\n InvalidKeyOwnershipProof: AugmentedError<ApiType>;\n /**\n * Attempt to signal GRANDPA pause when the authority set isn't live\n * (either paused or already pending pause).\n **/\n PauseFailed: AugmentedError<ApiType>;\n /**\n * Attempt to signal GRANDPA resume when the authority set isn't paused\n * (either live or already pending resume).\n **/\n ResumeFailed: AugmentedError<ApiType>;\n /**\n * Cannot signal forced change so soon after last.\n **/\n TooSoon: AugmentedError<ApiType>;\n };\n hyperbridge: {};\n ismp: {\n /**\n * Couldn't update challenge period\n **/\n ChallengePeriodUpdateFailed: AugmentedError<ApiType>;\n /**\n * Encountered an error while creating the consensus client.\n **/\n ConsensusClientCreationFailed: AugmentedError<ApiType>;\n /**\n * Invalid ISMP message\n **/\n InvalidMessage: AugmentedError<ApiType>;\n /**\n * Requested message was not found\n **/\n MessageNotFound: AugmentedError<ApiType>;\n /**\n * Couldn't update unbonding period\n **/\n UnbondingPeriodUpdateFailed: AugmentedError<ApiType>;\n };\n liquidityPools: {\n /**\n * The added amount would exceed the activated securitization\n **/\n ActivatedSecuritizationExceeded: AugmentedError<ApiType>;\n /**\n * This fund has already been renewed\n **/\n AlreadyRenewed: AugmentedError<ApiType>;\n /**\n * Below the minimum amount of argons per contributor\n **/\n BelowMinimum: AugmentedError<ApiType>;\n /**\n * The contributed amount would not make this account a contributor\n **/\n ContributionTooLow: AugmentedError<ApiType>;\n /**\n * Unable to update the vault fund\n **/\n CouldNotFindLiquidityPool: AugmentedError<ApiType>;\n /**\n * An internal error occurred (like an overflow)\n **/\n InternalError: AugmentedError<ApiType>;\n /**\n * Max contributors for a fund exceeded\n **/\n MaxContributorsExceeded: AugmentedError<ApiType>;\n /**\n * Max Vaults exceeded\n **/\n MaxVaultsExceeded: AugmentedError<ApiType>;\n /**\n * This account is not an active mining fund contributor\n **/\n NotAFundContributor: AugmentedError<ApiType>;\n /**\n * The given vault is not accepting mining bonds\n **/\n VaultNotAcceptingMiningBonds: AugmentedError<ApiType>;\n };\n miningSlot: {\n AccountWouldBeBelowMinimum: AugmentedError<ApiType>;\n /**\n * The mining bid cannot be reduced\n **/\n BidCannotBeReduced: AugmentedError<ApiType>;\n BidTooLow: AugmentedError<ApiType>;\n /**\n * Keys cannot be registered by multiple accounts\n **/\n CannotRegisterDuplicateKeys: AugmentedError<ApiType>;\n CannotRegisterOverlappingSessions: AugmentedError<ApiType>;\n /**\n * There are too many obligations expiring in the given expiration block\n **/\n ExpirationAtBlockOverflow: AugmentedError<ApiType>;\n HoldUnexpectedlyModified: AugmentedError<ApiType>;\n InsufficientFunds: AugmentedError<ApiType>;\n InsufficientOwnershipTokens: AugmentedError<ApiType>;\n InsufficientVaultFunds: AugmentedError<ApiType>;\n /**\n * Bids must be in allowed increments\n **/\n InvalidBidAmount: AugmentedError<ApiType>;\n /**\n * Unable to decode the key format\n **/\n InvalidKeyFormat: AugmentedError<ApiType>;\n MinimumObligationAmountNotMet: AugmentedError<ApiType>;\n NoMoreObligationIds: AugmentedError<ApiType>;\n NoPermissions: AugmentedError<ApiType>;\n ObligationNotFound: AugmentedError<ApiType>;\n SlotNotTakingBids: AugmentedError<ApiType>;\n TooManyBlockRegistrants: AugmentedError<ApiType>;\n UnrecoverableHold: AugmentedError<ApiType>;\n VaultClosed: AugmentedError<ApiType>;\n VaultNotFound: AugmentedError<ApiType>;\n };\n mint: {\n TooManyPendingMints: AugmentedError<ApiType>;\n };\n multisig: {\n /**\n * Call is already approved by this signatory.\n **/\n AlreadyApproved: AugmentedError<ApiType>;\n /**\n * The data to be stored is already stored.\n **/\n AlreadyStored: AugmentedError<ApiType>;\n /**\n * The maximum weight information provided was too low.\n **/\n MaxWeightTooLow: AugmentedError<ApiType>;\n /**\n * Threshold must be 2 or greater.\n **/\n MinimumThreshold: AugmentedError<ApiType>;\n /**\n * Call doesn't need any (more) approvals.\n **/\n NoApprovalsNeeded: AugmentedError<ApiType>;\n /**\n * Multisig operation not found when attempting to cancel.\n **/\n NotFound: AugmentedError<ApiType>;\n /**\n * No timepoint was given, yet the multisig operation is already underway.\n **/\n NoTimepoint: AugmentedError<ApiType>;\n /**\n * Only the account that originally created the multisig is able to cancel it.\n **/\n NotOwner: AugmentedError<ApiType>;\n /**\n * The sender was contained in the other signatories; it shouldn't be.\n **/\n SenderInSignatories: AugmentedError<ApiType>;\n /**\n * The signatories were provided out of order; they should be ordered.\n **/\n SignatoriesOutOfOrder: AugmentedError<ApiType>;\n /**\n * There are too few signatories in the list.\n **/\n TooFewSignatories: AugmentedError<ApiType>;\n /**\n * There are too many signatories in the list.\n **/\n TooManySignatories: AugmentedError<ApiType>;\n /**\n * A timepoint was given, yet no multisig operation is underway.\n **/\n UnexpectedTimepoint: AugmentedError<ApiType>;\n /**\n * A different timepoint was given to the multisig operation that is underway.\n **/\n WrongTimepoint: AugmentedError<ApiType>;\n };\n notaries: {\n /**\n * The proposed effective tick is too soon\n **/\n EffectiveTickTooSoon: AugmentedError<ApiType>;\n /**\n * The notary is invalid\n **/\n InvalidNotary: AugmentedError<ApiType>;\n /**\n * Invalid notary operator for this operation\n **/\n InvalidNotaryOperator: AugmentedError<ApiType>;\n /**\n * Maximum number of notaries exceeded\n **/\n MaxNotariesExceeded: AugmentedError<ApiType>;\n /**\n * Maximum number of proposals per block exceeded\n **/\n MaxProposalsPerBlockExceeded: AugmentedError<ApiType>;\n /**\n * An internal error has occurred. The notary ids are exhausted.\n **/\n NoMoreNotaryIds: AugmentedError<ApiType>;\n /**\n * This notary is not active, so this change cannot be made yet\n **/\n NotAnActiveNotary: AugmentedError<ApiType>;\n /**\n * The proposal to activate was not found\n **/\n ProposalNotFound: AugmentedError<ApiType>;\n /**\n * Too many internal keys\n **/\n TooManyKeys: AugmentedError<ApiType>;\n };\n notebook: {\n /**\n * Could not decode the scale bytes of the notebook\n **/\n CouldNotDecodeNotebook: AugmentedError<ApiType>;\n /**\n * The notebook digest was included more than once\n **/\n DuplicateNotebookDigest: AugmentedError<ApiType>;\n /**\n * This notebook has already been submitted\n **/\n DuplicateNotebookNumber: AugmentedError<ApiType>;\n /**\n * Unable to track the notebook change list\n **/\n InternalError: AugmentedError<ApiType>;\n /**\n * Invalid notary operator\n **/\n InvalidNotaryOperator: AugmentedError<ApiType>;\n /**\n * The notebook digest did not match the included notebooks\n **/\n InvalidNotebookDigest: AugmentedError<ApiType>;\n /**\n * The signature of the notebook is invalid\n **/\n InvalidNotebookSignature: AugmentedError<ApiType>;\n /**\n * Invalid notebook submission tick\n **/\n InvalidNotebookSubmissionTick: AugmentedError<ApiType>;\n /**\n * Invalid reprocess notebook\n **/\n InvalidReprocessNotebook: AugmentedError<ApiType>;\n /**\n * The secret or secret hash of the parent notebook do not match\n **/\n InvalidSecretProvided: AugmentedError<ApiType>;\n /**\n * The notebook digest was not included\n **/\n MissingNotebookDigest: AugmentedError<ApiType>;\n /**\n * Notebooks received out of order\n **/\n MissingNotebookNumber: AugmentedError<ApiType>;\n /**\n * Multiple inherents provided\n **/\n MultipleNotebookInherentsProvided: AugmentedError<ApiType>;\n /**\n * A notebook was submitted for a notary that failed audit, which is not allowed\n **/\n NotebookSubmittedForLockedNotary: AugmentedError<ApiType>;\n /**\n * A notebook was already provided at this tick\n **/\n NotebookTickAlreadyUsed: AugmentedError<ApiType>;\n };\n ownership: {\n /**\n * Beneficiary account must pre-exist.\n **/\n DeadAccount: AugmentedError<ApiType>;\n /**\n * The delta cannot be zero.\n **/\n DeltaZero: AugmentedError<ApiType>;\n /**\n * Value too low to create account due to existential deposit.\n **/\n ExistentialDeposit: AugmentedError<ApiType>;\n /**\n * A vesting schedule already exists for this account.\n **/\n ExistingVestingSchedule: AugmentedError<ApiType>;\n /**\n * Transfer/payment would kill account.\n **/\n Expendability: AugmentedError<ApiType>;\n /**\n * Balance too low to send value.\n **/\n InsufficientBalance: AugmentedError<ApiType>;\n /**\n * The issuance cannot be modified since it is already deactivated.\n **/\n IssuanceDeactivated: AugmentedError<ApiType>;\n /**\n * Account liquidity restrictions prevent withdrawal.\n **/\n LiquidityRestrictions: AugmentedError<ApiType>;\n /**\n * Number of freezes exceed `MaxFreezes`.\n **/\n TooManyFreezes: AugmentedError<ApiType>;\n /**\n * Number of holds exceed `VariantCountOf<T::RuntimeHoldReason>`.\n **/\n TooManyHolds: AugmentedError<ApiType>;\n /**\n * Number of named reserves exceed `MaxReserves`.\n **/\n TooManyReserves: AugmentedError<ApiType>;\n /**\n * Vesting balance too high to send value.\n **/\n VestingBalance: AugmentedError<ApiType>;\n };\n priceIndex: {\n /**\n * Change in argon price is too large\n **/\n MaxPriceChangePerTickExceeded: AugmentedError<ApiType>;\n /**\n * Missing value\n **/\n MissingValue: AugmentedError<ApiType>;\n /**\n * Not authorized as an oracle operator\n **/\n NotAuthorizedOperator: AugmentedError<ApiType>;\n /**\n * The submitted prices are too old\n **/\n PricesTooOld: AugmentedError<ApiType>;\n };\n proxy: {\n /**\n * Account is already a proxy.\n **/\n Duplicate: AugmentedError<ApiType>;\n /**\n * Call may not be made by proxy because it may escalate its privileges.\n **/\n NoPermission: AugmentedError<ApiType>;\n /**\n * Cannot add self as proxy.\n **/\n NoSelfProxy: AugmentedError<ApiType>;\n /**\n * Proxy registration not found.\n **/\n NotFound: AugmentedError<ApiType>;\n /**\n * Sender is not a proxy of the account to be proxied.\n **/\n NotProxy: AugmentedError<ApiType>;\n /**\n * There are too many proxies registered or too many announcements pending.\n **/\n TooMany: AugmentedError<ApiType>;\n /**\n * Announcement, if made at all, was made too recently.\n **/\n Unannounced: AugmentedError<ApiType>;\n /**\n * A call which is incompatible with the proxy type's filter was attempted.\n **/\n Unproxyable: AugmentedError<ApiType>;\n };\n sudo: {\n /**\n * Sender must be the Sudo account.\n **/\n RequireSudo: AugmentedError<ApiType>;\n };\n system: {\n /**\n * The origin filter prevent the call to be dispatched.\n **/\n CallFiltered: AugmentedError<ApiType>;\n /**\n * Failed to extract the runtime version from the new runtime.\n *\n * Either calling `Core_version` or decoding `RuntimeVersion` failed.\n **/\n FailedToExtractRuntimeVersion: AugmentedError<ApiType>;\n /**\n * The name of specification does not match between the current runtime\n * and the new runtime.\n **/\n InvalidSpecName: AugmentedError<ApiType>;\n /**\n * A multi-block migration is ongoing and prevents the current code from being replaced.\n **/\n MultiBlockMigrationsOngoing: AugmentedError<ApiType>;\n /**\n * Suicide called when the account has non-default composite data.\n **/\n NonDefaultComposite: AugmentedError<ApiType>;\n /**\n * There is a non-zero reference count preventing the account from being purged.\n **/\n NonZeroRefCount: AugmentedError<ApiType>;\n /**\n * No upgrade authorized.\n **/\n NothingAuthorized: AugmentedError<ApiType>;\n /**\n * The specification version is not allowed to decrease between the current runtime\n * and the new runtime.\n **/\n SpecVersionNeedsToIncrease: AugmentedError<ApiType>;\n /**\n * The submitted code is not authorized.\n **/\n Unauthorized: AugmentedError<ApiType>;\n };\n ticks: {};\n tokenGateway: {\n /**\n * Asset Id creation failed\n **/\n AssetCreationError: AugmentedError<ApiType>;\n /**\n * Asset decimals not found\n **/\n AssetDecimalsNotFound: AugmentedError<ApiType>;\n /**\n * Error while teleporting asset\n **/\n AssetTeleportError: AugmentedError<ApiType>;\n /**\n * Coprocessor was not configured in the runtime\n **/\n CoprocessorNotConfigured: AugmentedError<ApiType>;\n /**\n * Asset or update Dispatch Error\n **/\n DispatchError: AugmentedError<ApiType>;\n /**\n * Only root or asset owner can update asset\n **/\n NotAssetOwner: AugmentedError<ApiType>;\n /**\n * Protocol Params have not been initialized\n **/\n NotInitialized: AugmentedError<ApiType>;\n /**\n * Unknown Asset\n **/\n UnknownAsset: AugmentedError<ApiType>;\n /**\n * A asset that has not been registered\n **/\n UnregisteredAsset: AugmentedError<ApiType>;\n };\n txPause: {\n /**\n * The call is paused.\n **/\n IsPaused: AugmentedError<ApiType>;\n /**\n * The call is unpaused.\n **/\n IsUnpaused: AugmentedError<ApiType>;\n NotFound: AugmentedError<ApiType>;\n /**\n * The call is whitelisted and cannot be paused.\n **/\n Unpausable: AugmentedError<ApiType>;\n };\n utility: {\n /**\n * Too many calls batched.\n **/\n TooManyCalls: AugmentedError<ApiType>;\n };\n vaults: {\n /**\n * The proposed transaction would take the account below the minimum (existential) balance\n **/\n AccountBelowMinimumBalance: AugmentedError<ApiType>;\n /**\n * Bitcoin conversion to compressed pubkey failed\n **/\n BitcoinConversionFailed: AugmentedError<ApiType>;\n /**\n * There are too many obligations expiring in the given expiration block\n **/\n ExpirationAtBlockOverflow: AugmentedError<ApiType>;\n /**\n * A funding change is already scheduled\n **/\n FundingChangeAlreadyScheduled: AugmentedError<ApiType>;\n HoldUnexpectedlyModified: AugmentedError<ApiType>;\n InsufficientFunds: AugmentedError<ApiType>;\n InsufficientVaultFunds: AugmentedError<ApiType>;\n /**\n * An internal processing error occurred\n **/\n InternalError: AugmentedError<ApiType>;\n /**\n * The bitcoin script to lock this bitcoin has errors\n **/\n InvalidBitcoinScript: AugmentedError<ApiType>;\n /**\n * An invalid securitization percent was provided for the vault. NOTE: it cannot be\n * decreased (or negative)\n **/\n InvalidSecuritization: AugmentedError<ApiType>;\n /**\n * Funding would result in an overflow of the balance type\n **/\n InvalidVaultAmount: AugmentedError<ApiType>;\n /**\n * Unable to decode xpubkey\n **/\n InvalidXpubkey: AugmentedError<ApiType>;\n MinimumObligationAmountNotMet: AugmentedError<ApiType>;\n NoMoreObligationIds: AugmentedError<ApiType>;\n NoMoreVaultIds: AugmentedError<ApiType>;\n NoPermissions: AugmentedError<ApiType>;\n /**\n * No Vault public keys are available\n **/\n NoVaultBitcoinPubkeysAvailable: AugmentedError<ApiType>;\n /**\n * An error occurred processing an obligation completion\n **/\n ObligationCompletionError: AugmentedError<ApiType>;\n ObligationNotFound: AugmentedError<ApiType>;\n /**\n * The vault bitcoin xpubkey has already been used\n **/\n ReusedVaultBitcoinXpub: AugmentedError<ApiType>;\n /**\n * Terms are already scheduled to be changed\n **/\n TermsChangeAlreadyScheduled: AugmentedError<ApiType>;\n /**\n * The terms modification list could not handle any more items\n **/\n TermsModificationOverflow: AugmentedError<ApiType>;\n /**\n * Unable to derive xpubkey child\n **/\n UnableToDeriveVaultXpubChild: AugmentedError<ApiType>;\n /**\n * Unable to generate a new vault bitcoin pubkey\n **/\n UnableToGenerateVaultBitcoinPubkey: AugmentedError<ApiType>;\n UnrecoverableHold: AugmentedError<ApiType>;\n /**\n * The XPub is unsafe to use in a public blockchain (aka, unhardened)\n **/\n UnsafeXpubkey: AugmentedError<ApiType>;\n VaultClosed: AugmentedError<ApiType>;\n VaultNotFound: AugmentedError<ApiType>;\n /**\n * The vault is not yet active\n **/\n VaultNotYetActive: AugmentedError<ApiType>;\n /**\n * This reduction in vault securitization goes below the amount already committed\n **/\n VaultReductionBelowSecuritization: AugmentedError<ApiType>;\n /**\n * Wrong Xpub Network\n **/\n WrongXpubNetwork: AugmentedError<ApiType>;\n };\n } // AugmentedErrors\n} // declare module\n","// Auto-generated via `yarn polkadot-types-from-chain`, do not edit\n/* eslint-disable */\n\n// import type lookup before we augment - in some environments\n// this is required to allow for ambient/previous definitions\nimport '@polkadot/api-base/types/events';\n\nimport type { ApiTypes, AugmentedEvent } from '@polkadot/api-base/types';\nimport type {\n Bytes,\n Null,\n Option,\n Result,\n U256,\n U8aFixed,\n Vec,\n bool,\n i128,\n u128,\n u16,\n u32,\n u64,\n} from '@polkadot/types-codec';\nimport type { ITuple } from '@polkadot/types-codec/types';\nimport type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime';\nimport type {\n ArgonNotaryAuditErrorVerifyError,\n ArgonPrimitivesBitcoinBitcoinRejectedReason,\n ArgonPrimitivesBitcoinUtxoRef,\n ArgonPrimitivesBlockSealBlockPayout,\n ArgonPrimitivesBlockSealMiningRegistration,\n ArgonPrimitivesDomainZoneRecord,\n ArgonPrimitivesNotaryNotaryMeta,\n ArgonPrimitivesNotaryNotaryRecord,\n ArgonPrimitivesVaultFundType,\n ArgonPrimitivesVaultObligationExpiration,\n ArgonRuntimeOriginCaller,\n ArgonRuntimeProxyType,\n FrameSupportTokensMiscBalanceStatus,\n FrameSystemDispatchEventInfo,\n IsmpConsensusStateMachineHeight,\n IsmpConsensusStateMachineId,\n IsmpEventsRequestResponseHandled,\n IsmpEventsTimeoutHandled,\n IsmpHostStateMachine,\n PalletDomainsDomainRegistration,\n PalletHyperbridgeVersionedHostParams,\n PalletIsmpErrorsHandlingError,\n PalletMintMintType,\n PalletMultisigTimepoint,\n SpConsensusGrandpaAppPublic,\n SpRuntimeDispatchError,\n} from '@polkadot/types/lookup';\n\nexport type __AugmentedEvent<ApiType extends ApiTypes> =\n AugmentedEvent<ApiType>;\n\ndeclare module '@polkadot/api-base/types/events' {\n interface AugmentedEvents<ApiType extends ApiTypes> {\n balances: {\n /**\n * A balance was set by root.\n **/\n BalanceSet: AugmentedEvent<\n ApiType,\n [who: AccountId32, free: u128],\n { who: AccountId32; free: u128 }\n >;\n /**\n * Some amount was burned from an account.\n **/\n Burned: AugmentedEvent<\n ApiType,\n [who: AccountId32, amount: u128],\n { who: AccountId32; amount: u128 }\n >;\n /**\n * Some amount was deposited (e.g. for transaction fees).\n **/\n Deposit: AugmentedEvent<\n ApiType,\n [who: AccountId32, amount: u128],\n { who: AccountId32; amount: u128 }\n >;\n /**\n * An account was removed whose balance was non-zero but below ExistentialDeposit,\n * resulting in an outright loss.\n **/\n DustLost: AugmentedEvent<\n ApiType,\n [account: AccountId32, amount: u128],\n { account: AccountId32; amount: u128 }\n >;\n /**\n * An account was created with some free balance.\n **/\n Endowed: AugmentedEvent<\n ApiType,\n [account: AccountId32, freeBalance: u128],\n { account: AccountId32; freeBalance: u128 }\n >;\n /**\n * Some balance was frozen.\n **/\n Frozen: AugmentedEvent<\n ApiType,\n [who: AccountId32, amount: u128],\n { who: AccountId32; amount: u128 }\n >;\n /**\n * Total issuance was increased by `amount`, creating a credit to be balanced.\n **/\n Issued: AugmentedEvent<ApiType, [amount: u128], { amount: u128 }>;\n /**\n * Some balance was locked.\n **/\n Locked: AugmentedEvent<\n ApiType,\n [who: AccountId32, amount: u128],\n { who: AccountId32; amount: u128 }\n >;\n /**\n * Some amount was minted into an account.\n **/\n Minted: AugmentedEvent<\n ApiType,\n [who: AccountId32, amount: u128],\n { who: AccountId32; amount: u128 }\n >;\n /**\n * Total issuance was decreased by `amount`, creating a debt to be balanced.\n **/\n Rescinded: AugmentedEvent<ApiType, [amount: u128], { amount: u128 }>;\n /**\n * Some balance was reserved (moved from free to reserved).\n **/\n Reserved: AugmentedEvent<\n ApiType,\n [who: AccountId32, amount: u128],\n { who: AccountId32; amount: u128 }\n >;\n /**\n * Some balance was moved from the reserve of the first account to the second account.\n * Final argument indicates the destination balance type.\n **/\n ReserveRepatriated: AugmentedEvent<\n ApiType,\n [\n from: AccountId32,\n to: AccountId32,\n amount: u128,\n destinationStatus: FrameSupportTokensMiscBalanceStatus,\n ],\n {\n from: AccountId32;\n to: AccountId32;\n amount: u128;\n destinationStatus: FrameSupportTokensMiscBalanceStatus;\n }\n >;\n /**\n * Some amount was restored into an account.\n **/\n Restored: AugmentedEvent<\n ApiType,\n [who: AccountId32, amount: u128],\n { who: AccountId32; amount: u128 }\n >;\n /**\n * Some amount was removed from the account (e.g. for misbehavior).\n **/\n Slashed: AugmentedEvent<\n ApiType,\n [who: AccountId32, amount: u128],\n { who: AccountId32; amount: u128 }\n >;\n /**\n * Some amount was suspended from an account (it can be restored later).\n **/\n Suspended: AugmentedEvent<\n ApiType,\n [who: AccountId32, amount: u128],\n { who: AccountId32; amount: u128 }\n >;\n /**\n * Some balance was thawed.\n **/\n Thawed: AugmentedEvent<\n ApiType,\n [who: AccountId32, amount: u128],\n { who: AccountId32; amount: u128 }\n >;\n /**\n * The `TotalIssuance` was forcefully changed.\n **/\n TotalIssuanceForced: AugmentedEvent<\n ApiType,\n [old: u128, new_: u128],\n { old: u128; new_: u128 }\n >;\n /**\n * Transfer succeeded.\n **/\n Transfer: AugmentedEvent<\n ApiType,\n [from: AccountId32, to: AccountId32, amount: u128],\n { from: AccountId32; to: AccountId32; amount: u128 }\n >;\n /**\n * Some balance was unlocked.\n **/\n Unlocked: AugmentedEvent<\n ApiType,\n [who: AccountId32, amount: u128],\n { who: AccountId32; amount: u128 }\n >;\n /**\n * Some balance was unreserved (moved from reserved to free).\n **/\n Unreserved: AugmentedEvent<\n ApiType,\n [who: AccountId32, amount: u128],\n { who: AccountId32; amount: u128 }\n >;\n /**\n * An account was upgraded.\n **/\n Upgraded: AugmentedEvent<\n ApiType,\n [who: AccountId32],\n { who: AccountId32 }\n >;\n /**\n * Some amount was withdrawn from the account (e.g. for transaction fees).\n **/\n Withdraw: AugmentedEvent<\n ApiType,\n [who: AccountId32, amount: u128],\n { who: AccountId32; amount: u128 }\n >;\n };\n bitcoinLocks: {\n BitcoinCosignPastDue: AugmentedEvent<\n ApiType,\n [\n utxoId: u64,\n obligationId: u64,\n vaultId: u32,\n compensationAmount: u128,\n compensationStillOwed: u128,\n compensatedAccountId: AccountId32,\n ],\n {\n utxoId: u64;\n obligationId: u64;\n vaultId: u32;\n compensationAmount: u128;\n compensationStillOwed: u128;\n compensatedAccountId: AccountId32;\n }\n >;\n BitcoinLockBurned: AugmentedEvent<\n ApiType,\n [\n utxoId: u64,\n vaultId: u32,\n obligationId: u64,\n amountBurned: u128,\n amountHeld: u128,\n wasUtxoSpent: bool,\n ],\n {\n utxoId: u64;\n vaultId: u32;\n obligationId: u64;\n amountBurned: u128;\n amountHeld: u128;\n wasUtxoSpent: bool;\n }\n >;\n BitcoinLockCreated: AugmentedEvent<\n ApiType,\n [\n utxoId: u64,\n vaultId: u32,\n obligationId: u64,\n lockPrice: u128,\n accountId: AccountId32,\n ],\n {\n utxoId: u64;\n vaultId: u32;\n obligationId: u64;\n lockPrice: u128;\n accountId: AccountId32;\n }\n >;\n BitcoinUtxoCosigned: AugmentedEvent<\n ApiType,\n [utxoId: u64, obligationId: u64, vaultId: u32, signature: Bytes],\n { utxoId: u64; obligationId: u64; vaultId: u32; signature: Bytes }\n >;\n BitcoinUtxoCosignRequested: AugmentedEvent<\n ApiType,\n [utxoId: u64, obligationId: u64, vaultId: u32],\n { utxoId: u64; obligationId: u64; vaultId: u32 }\n >;\n /**\n * An error occurred while refunding an overdue cosigned bitcoin lock\n **/\n CosignOverdueError: AugmentedEvent<\n ApiType,\n [utxoId: u64, error: SpRuntimeDispatchError],\n { utxoId: u64; error: SpRuntimeDispatchError }\n >;\n };\n bitcoinUtxos: {\n UtxoExpiredError: AugmentedEvent<\n ApiType,\n [utxoRef: ArgonPrimitivesBitcoinUtxoRef, error: SpRuntimeDispatchError],\n {\n utxoRef: ArgonPrimitivesBitcoinUtxoRef;\n error: SpRuntimeDispatchError;\n }\n >;\n UtxoRejected: AugmentedEvent<\n ApiType,\n [\n utxoId: u64,\n rejectedReason: ArgonPrimitivesBitcoinBitcoinRejectedReason,\n ],\n {\n utxoId: u64;\n rejectedReason: ArgonPrimitivesBitcoinBitcoinRejectedReason;\n }\n >;\n UtxoRejectedError: AugmentedEvent<\n ApiType,\n [utxoId: u64, error: SpRuntimeDispatchError],\n { utxoId: u64; error: SpRuntimeDispatchError }\n >;\n UtxoSpent: AugmentedEvent<\n ApiType,\n [utxoId: u64, blockHeight: u64],\n { utxoId: u64; blockHeight: u64 }\n >;\n UtxoSpentError: AugmentedEvent<\n ApiType,\n [utxoId: u64, error: SpRuntimeDispatchError],\n { utxoId: u64; error: SpRuntimeDispatchError }\n >;\n UtxoUnwatched: AugmentedEvent<ApiType, [utxoId: u64], { utxoId: u64 }>;\n UtxoVerified: AugmentedEvent<ApiType, [utxoId: u64], { utxoId: u64 }>;\n UtxoVerifiedError: AugmentedEvent<\n ApiType,\n [utxoId: u64, error: SpRuntimeDispatchError],\n { utxoId: u64; error: SpRuntimeDispatchError }\n >;\n };\n blockRewards: {\n RewardCreated: AugmentedEvent<\n ApiType,\n [rewards: Vec<ArgonPrimitivesBlockSealBlockPayout>],\n { rewards: Vec<ArgonPrimitivesBlockSealBlockPayout> }\n >;\n RewardCreateError: AugmentedEvent<\n ApiType,\n [\n accountId: AccountId32,\n argons: Option<u128>,\n ownership: Option<u128>,\n error: SpRuntimeDispatchError,\n ],\n {\n accountId: AccountId32;\n argons: Option<u128>;\n ownership: Option<u128>;\n error: SpRuntimeDispatchError;\n }\n >;\n };\n blockSealSpec: {\n ComputeDifficultyAdjusted: AugmentedEvent<\n ApiType,\n [\n expectedBlockTime: u64,\n actualBlockTime: u64,\n startDifficulty: u128,\n newDifficulty: u128,\n ],\n {\n expectedBlockTime: u64;\n actualBlockTime: u64;\n startDifficulty: u128;\n newDifficulty: u128;\n }\n >;\n VoteMinimumAdjusted: AugmentedEvent<\n ApiType,\n [\n expectedBlockVotes: u128,\n actualBlockVotes: u128,\n startVoteMinimum: u128,\n newVoteMinimum: u128,\n ],\n {\n expectedBlockVotes: u128;\n actualBlockVotes: u128;\n startVoteMinimum: u128;\n newVoteMinimum: u128;\n }\n >;\n };\n chainTransfer: {\n /**\n * A localchain transfer could not be cleaned up properly. Possible invalid transfer\n * needing investigation.\n **/\n PossibleInvalidLocalchainTransferAllowed: AugmentedEvent<\n ApiType,\n [transferId: u32, notaryId: u32, notebookNumber: u32],\n { transferId: u32; notaryId: u32; notebookNumber: u32 }\n >;\n /**\n * Taxation failed\n **/\n TaxationError: AugmentedEvent<\n ApiType,\n [\n notaryId: u32,\n notebookNumber: u32,\n tax: u128,\n error: SpRuntimeDispatchError,\n ],\n {\n notaryId: u32;\n notebookNumber: u32;\n tax: u128;\n error: SpRuntimeDispatchError;\n }\n >;\n /**\n * Transfer from Localchain to Mainchain\n **/\n TransferFromLocalchain: AugmentedEvent<\n ApiType,\n [accountId: AccountId32, amount: u128, notaryId: u32],\n { accountId: AccountId32; amount: u128; notaryId: u32 }\n >;\n /**\n * A transfer into the mainchain failed\n **/\n TransferFromLocalchainError: AugmentedEvent<\n ApiType,\n [\n accountId: AccountId32,\n amount: u128,\n notaryId: u32,\n notebookNumber: u32,\n error: SpRuntimeDispatchError,\n ],\n {\n accountId: AccountId32;\n amount: u128;\n notaryId: u32;\n notebookNumber: u32;\n error: SpRuntimeDispatchError;\n }\n >;\n /**\n * Funds sent to a localchain\n **/\n TransferToLocalchain: AugmentedEvent<\n ApiType,\n [\n accountId: AccountId32,\n amount: u128,\n transferId: u32,\n notaryId: u32,\n expirationTick: u64,\n ],\n {\n accountId: AccountId32;\n amount: u128;\n transferId: u32;\n notaryId: u32;\n expirationTick: u64;\n }\n >;\n /**\n * Transfer to localchain expired and rolled back\n **/\n TransferToLocalchainExpired: AugmentedEvent<\n ApiType,\n [accountId: AccountId32, transferId: u32, notaryId: u32],\n { accountId: AccountId32; transferId: u32; notaryId: u32 }\n >;\n /**\n * An expired transfer to localchain failed to be refunded\n **/\n TransferToLocalchainRefundError: AugmentedEvent<\n ApiType,\n [\n accountId: AccountId32,\n transferId: u32,\n notaryId: u32,\n notebookNumber: u32,\n error: SpRuntimeDispatchError,\n ],\n {\n accountId: AccountId32;\n transferId: u32;\n notaryId: u32;\n notebookNumber: u32;\n error: SpRuntimeDispatchError;\n }\n >;\n };\n digests: {};\n domains: {\n /**\n * A domain was expired\n **/\n DomainExpired: AugmentedEvent<\n ApiType,\n [domainHash: H256],\n { domainHash: H256 }\n >;\n /**\n * A domain was registered\n **/\n DomainRegistered: AugmentedEvent<\n ApiType,\n [domainHash: H256, registration: PalletDomainsDomainRegistration],\n { domainHash: H256; registration: PalletDomainsDomainRegistration }\n >;\n /**\n * A domain registration was canceled due to a conflicting registration in the same\n * tick\n **/\n DomainRegistrationCanceled: AugmentedEvent<\n ApiType,\n [domainHash: H256, registration: PalletDomainsDomainRegistration],\n { domainHash: H256; registration: PalletDomainsDomainRegistration }\n >;\n /**\n * A domain registration failed due to an error\n **/\n DomainRegistrationError: AugmentedEvent<\n ApiType,\n [\n domainHash: H256,\n accountId: AccountId32,\n error: SpRuntimeDispatchError,\n ],\n {\n domainHash: H256;\n accountId: AccountId32;\n error: SpRuntimeDispatchError;\n }\n >;\n /**\n * A domain was registered\n **/\n DomainRenewed: AugmentedEvent<\n ApiType,\n [domainHash: H256],\n { domainHash: H256 }\n >;\n /**\n * A domain zone record was updated\n **/\n ZoneRecordUpdated: AugmentedEvent<\n ApiType,\n [domainHash: H256, zoneRecord: ArgonPrimitivesDomainZoneRecord],\n { domainHash: H256; zoneRecord: ArgonPrimitivesDomainZoneRecord }\n >;\n };\n feelessTransaction: {\n /**\n * A transaction fee was skipped.\n **/\n FeeSkipped: AugmentedEvent<\n ApiType,\n [origin: ArgonRuntimeOriginCaller],\n { origin: ArgonRuntimeOriginCaller }\n >;\n };\n grandpa: {\n /**\n * New authority set has been applied.\n **/\n NewAuthorities: AugmentedEvent<\n ApiType,\n [authoritySet: Vec<ITuple<[SpConsensusGrandpaAppPublic, u64]>>],\n { authoritySet: Vec<ITuple<[SpConsensusGrandpaAppPublic, u64]>> }\n >;\n /**\n * Current authority set has been paused.\n **/\n Paused: AugmentedEvent<ApiType, []>;\n /**\n * Current authority set has been resumed.\n **/\n Resumed: AugmentedEvent<ApiType, []>;\n };\n hyperbridge: {\n /**\n * Hyperbridge governance has now updated it's host params on this chain.\n **/\n HostParamsUpdated: AugmentedEvent<\n ApiType,\n [\n old: PalletHyperbridgeVersionedHostParams,\n new_: PalletHyperbridgeVersionedHostParams,\n ],\n {\n old: PalletHyperbridgeVersionedHostParams;\n new_: PalletHyperbridgeVersionedHostParams;\n }\n >;\n /**\n * Hyperbridge has withdrawn it's protocol revenue\n **/\n ProtocolRevenueWithdrawn: AugmentedEvent<\n ApiType,\n [amount: u128, account: AccountId32],\n { amount: u128; account: AccountId32 }\n >;\n /**\n * A relayer has withdrawn some fees\n **/\n RelayerFeeWithdrawn: AugmentedEvent<\n ApiType,\n [amount: u128, account: AccountId32],\n { amount: u128; account: AccountId32 }\n >;\n };\n ismp: {\n /**\n * Indicates that a consensus client has been created\n **/\n ConsensusClientCreated: AugmentedEvent<\n ApiType,\n [consensusClientId: U8aFixed],\n { consensusClientId: U8aFixed }\n >;\n /**\n * Indicates that a consensus client has been created\n **/\n ConsensusClientFrozen: AugmentedEvent<\n ApiType,\n [consensusClientId: U8aFixed],\n { consensusClientId: U8aFixed }\n >;\n /**\n * Some errors handling some ismp messages\n **/\n Errors: AugmentedEvent<\n ApiType,\n [errors: Vec<PalletIsmpErrorsHandlingError>],\n { errors: Vec<PalletIsmpErrorsHandlingError> }\n >;\n /**\n * Get Response Handled\n **/\n GetRequestHandled: AugmentedEvent<\n ApiType,\n [IsmpEventsRequestResponseHandled]\n >;\n /**\n * Get request timeout handled\n **/\n GetRequestTimeoutHandled: AugmentedEvent<\n ApiType,\n [IsmpEventsTimeoutHandled]\n >;\n /**\n * Post Request Handled\n **/\n PostRequestHandled: AugmentedEvent<\n ApiType,\n [IsmpEventsRequestResponseHandled]\n >;\n /**\n * Post request timeout handled\n **/\n PostRequestTimeoutHandled: AugmentedEvent<\n ApiType,\n [IsmpEventsTimeoutHandled]\n >;\n /**\n * Post Response Handled\n **/\n PostResponseHandled: AugmentedEvent<\n ApiType,\n [IsmpEventsRequestResponseHandled]\n >;\n /**\n * Post response timeout handled\n **/\n PostResponseTimeoutHandled: AugmentedEvent<\n ApiType,\n [IsmpEventsTimeoutHandled]\n >;\n /**\n * An Outgoing Request has been deposited\n **/\n Request: AugmentedEvent<\n ApiType,\n [\n destChain: IsmpHostStateMachine,\n sourceChain: IsmpHostStateMachine,\n requestNonce: u64,\n commitment: H256,\n ],\n {\n destChain: IsmpHostStateMachine;\n sourceChain: IsmpHostStateMachine;\n requestNonce: u64;\n commitment: H256;\n }\n >;\n /**\n * An Outgoing Response has been deposited\n **/\n Response: AugmentedEvent<\n ApiType,\n [\n destChain: IsmpHostStateMachine,\n sourceChain: IsmpHostStateMachine,\n requestNonce: u64,\n commitment: H256,\n reqCommitment: H256,\n ],\n {\n destChain: IsmpHostStateMachine;\n sourceChain: IsmpHostStateMachine;\n requestNonce: u64;\n commitment: H256;\n reqCommitment: H256;\n }\n >;\n /**\n * Emitted when a state commitment is vetoed by a fisherman\n **/\n StateCommitmentVetoed: AugmentedEvent<\n ApiType,\n [height: IsmpConsensusStateMachineHeight, fisherman: Bytes],\n { height: IsmpConsensusStateMachineHeight; fisherman: Bytes }\n >;\n /**\n * Emitted when a state machine is successfully updated to a new height\n **/\n StateMachineUpdated: AugmentedEvent<\n ApiType,\n [stateMachineId: IsmpConsensusStateMachineId, latestHeight: u64],\n { stateMachineId: IsmpConsensusStateMachineId; latestHeight: u64 }\n >;\n };\n ismpGrandpa: {\n /**\n * State machines have been added to whitelist\n **/\n StateMachineAdded: AugmentedEvent<\n ApiType,\n [stateMachines: Vec<IsmpHostStateMachine>],\n { stateMachines: Vec<IsmpHostStateMachine> }\n >;\n /**\n * State machines have been removed from the whitelist\n **/\n StateMachineRemoved: AugmentedEvent<\n ApiType,\n [stateMachines: Vec<IsmpHostStateMachine>],\n { stateMachines: Vec<IsmpHostStateMachine> }\n >;\n };\n liquidityPools: {\n /**\n * Funds from the active bid pool have been distributed\n **/\n BidPoolDistributed: AugmentedEvent<\n ApiType,\n [\n cohortId: u64,\n bidPoolDistributed: u128,\n bidPoolBurned: u128,\n bidPoolShares: u32,\n ],\n {\n cohortId: u64;\n bidPoolDistributed: u128;\n bidPoolBurned: u128;\n bidPoolShares: u32;\n }\n >;\n /**\n * An error occurred burning from the bid pool\n **/\n CouldNotBurnBidPool: AugmentedEvent<\n ApiType,\n [cohortId: u64, amount: u128, dispatchError: SpRuntimeDispatchError],\n { cohortId: u64; amount: u128; dispatchError: SpRuntimeDispatchError }\n >;\n /**\n * An error occurred distributing a bid pool\n **/\n CouldNotDistributeBidPool: AugmentedEvent<\n ApiType,\n [\n accountId: AccountId32,\n cohortId: u64,\n vaultId: u32,\n amount: u128,\n dispatchError: SpRuntimeDispatchError,\n isForVault: bool,\n ],\n {\n accountId: AccountId32;\n cohortId: u64;\n vaultId: u32;\n amount: u128;\n dispatchError: SpRuntimeDispatchError;\n isForVault: bool;\n }\n >;\n /**\n * An error occurred releasing a contributor hold\n **/\n ErrorRefundingLiquidityPoolCapital: AugmentedEvent<\n ApiType,\n [\n cohortId: u64,\n vaultId: u32,\n amount: u128,\n accountId: AccountId32,\n dispatchError: SpRuntimeDispatchError,\n ],\n {\n cohortId: u64;\n vaultId: u32;\n amount: u128;\n accountId: AccountId32;\n dispatchError: SpRuntimeDispatchError;\n }\n >;\n /**\n * The next bid pool has been locked in\n **/\n NextBidPoolCapitalLocked: AugmentedEvent<\n ApiType,\n [cohortId: u64, totalActivatedCapital: u128, participatingVaults: u32],\n { cohortId: u64; totalActivatedCapital: u128; participatingVaults: u32 }\n >;\n /**\n * Some mining bond capital was refunded due to less activated vault funds than bond\n * capital\n **/\n RefundedLiquidityPoolCapital: AugmentedEvent<\n ApiType,\n [cohortId: u64, vaultId: u32, amount: u128, accountId: AccountId32],\n { cohortId: u64; vaultId: u32; amount: u128; accountId: AccountId32 }\n >;\n };\n miningSlot: {\n /**\n * Bids are closed due to the VRF randomized function triggering\n **/\n MiningBidsClosed: AugmentedEvent<\n ApiType,\n [cohortId: u64],\n { cohortId: u64 }\n >;\n MiningConfigurationUpdated: AugmentedEvent<\n ApiType,\n [\n ticksBeforeBidEndForVrfClose: u64,\n ticksBetweenSlots: u64,\n slotBiddingStartAfterTicks: u64,\n ],\n {\n ticksBeforeBidEndForVrfClose: u64;\n ticksBetweenSlots: u64;\n slotBiddingStartAfterTicks: u64;\n }\n >;\n NewMiners: AugmentedEvent<\n ApiType,\n [\n startIndex: u32,\n newMiners: Vec<ArgonPrimitivesBlockSealMiningRegistration>,\n releasedMiners: u32,\n cohortId: u64,\n ],\n {\n startIndex: u32;\n newMiners: Vec<ArgonPrimitivesBlockSealMiningRegistration>;\n releasedMiners: u32;\n cohortId: u64;\n }\n >;\n ReleaseBidError: AugmentedEvent<\n ApiType,\n [accountId: AccountId32, error: SpRuntimeDispatchError],\n { accountId: AccountId32; error: SpRuntimeDispatchError }\n >;\n ReleaseMinerSeatError: AugmentedEvent<\n ApiType,\n [accountId: AccountId32, error: SpRuntimeDispatchError],\n { accountId: AccountId32; error: SpRuntimeDispatchError }\n >;\n SlotBidderAdded: AugmentedEvent<\n ApiType,\n [accountId: AccountId32, bidAmount: u128, index: u32],\n { accountId: AccountId32; bidAmount: u128; index: u32 }\n >;\n SlotBidderDropped: AugmentedEvent<\n ApiType,\n [accountId: AccountId32, preservedArgonotHold: bool],\n { accountId: AccountId32; preservedArgonotHold: bool }\n >;\n };\n mint: {\n /**\n * Any bitcoins minted\n **/\n BitcoinMint: AugmentedEvent<\n ApiType,\n [accountId: AccountId32, utxoId: Option<u64>, amount: u128],\n { accountId: AccountId32; utxoId: Option<u64>; amount: u128 }\n >;\n /**\n * The amount of argons minted for mining. NOTE: accounts below Existential Deposit will\n * not be able to mint\n **/\n MiningMint: AugmentedEvent<\n ApiType,\n [amount: U256, perMiner: u128, argonCpi: i128, liquidity: u128],\n { amount: U256; perMiner: u128; argonCpi: i128; liquidity: u128 }\n >;\n /**\n * Errors encountered while minting. Most often due to mint amount still below Existential\n * Deposit\n **/\n MintError: AugmentedEvent<\n ApiType,\n [\n mintType: PalletMintMintType,\n accountId: AccountId32,\n utxoId: Option<u64>,\n amount: u128,\n error: SpRuntimeDispatchError,\n ],\n {\n mintType: PalletMintMintType;\n accountId: AccountId32;\n utxoId: Option<u64>;\n amount: u128;\n error: SpRuntimeDispatchError;\n }\n >;\n };\n multisig: {\n /**\n * A multisig operation has been approved by someone.\n **/\n MultisigApproval: AugmentedEvent<\n ApiType,\n [\n approving: AccountId32,\n timepoint: PalletMultisigTimepoint,\n multisig: AccountId32,\n callHash: U8aFixed,\n ],\n {\n approving: AccountId32;\n timepoint: PalletMultisigTimepoint;\n multisig: AccountId32;\n callHash: U8aFixed;\n }\n >;\n /**\n * A multisig operation has been cancelled.\n **/\n MultisigCancelled: AugmentedEvent<\n ApiType,\n [\n cancelling: AccountId32,\n timepoint: PalletMultisigTimepoint,\n multisig: AccountId32,\n callHash: U8aFixed,\n ],\n {\n cancelling: AccountId32;\n timepoint: PalletMultisigTimepoint;\n multisig: AccountId32;\n callHash: U8aFixed;\n }\n >;\n /**\n * A multisig operation has been executed.\n **/\n MultisigExecuted: AugmentedEvent<\n ApiType,\n [\n approving: AccountId32,\n timepoint: PalletMultisigTimepoint,\n multisig: AccountId32,\n callHash: U8aFixed,\n result: Result<Null, SpRuntimeDispatchError>,\n ],\n {\n approving: AccountId32;\n timepoint: PalletMultisigTimepoint;\n multisig: AccountId32;\n callHash: U8aFixed;\n result: Result<Null, SpRuntimeDispatchError>;\n }\n >;\n /**\n * A new multisig operation has begun.\n **/\n NewMultisig: AugmentedEvent<\n ApiType,\n [approving: AccountId32, multisig: AccountId32, callHash: U8aFixed],\n { approving: AccountId32; multisig: AccountId32; callHash: U8aFixed }\n >;\n };\n notaries: {\n /**\n * A notary proposal has been accepted\n **/\n NotaryActivated: AugmentedEvent<\n ApiType,\n [notary: ArgonPrimitivesNotaryNotaryRecord],\n { notary: ArgonPrimitivesNotaryNotaryRecord }\n >;\n /**\n * Notary metadata updated\n **/\n NotaryMetaUpdated: AugmentedEvent<\n ApiType,\n [notaryId: u32, meta: ArgonPrimitivesNotaryNotaryMeta],\n { notaryId: u32; meta: ArgonPrimitivesNotaryNotaryMeta }\n >;\n /**\n * Error updating queued notary info\n **/\n NotaryMetaUpdateError: AugmentedEvent<\n ApiType,\n [\n notaryId: u32,\n error: SpRuntimeDispatchError,\n meta: ArgonPrimitivesNotaryNotaryMeta,\n ],\n {\n notaryId: u32;\n error: SpRuntimeDispatchError;\n meta: ArgonPrimitivesNotaryNotaryMeta;\n }\n >;\n /**\n * Notary metadata queued for update\n **/\n NotaryMetaUpdateQueued: AugmentedEvent<\n ApiType,\n [\n notaryId: u32,\n meta: ArgonPrimitivesNotaryNotaryMeta,\n effectiveTick: u64,\n ],\n {\n notaryId: u32;\n meta: ArgonPrimitivesNotaryNotaryMeta;\n effectiveTick: u64;\n }\n >;\n /**\n * A user has proposed operating as a notary\n **/\n NotaryProposed: AugmentedEvent<\n ApiType,\n [\n operatorAccount: AccountId32,\n meta: ArgonPrimitivesNotaryNotaryMeta,\n expires: u32,\n ],\n {\n operatorAccount: AccountId32;\n meta: ArgonPrimitivesNotaryNotaryMeta;\n expires: u32;\n }\n >;\n };\n notebook: {\n NotebookAuditFailure: AugmentedEvent<\n ApiType,\n [\n notaryId: u32,\n notebookNumber: u32,\n notebookHash: H256,\n firstFailureReason: ArgonNotaryAuditErrorVerifyError,\n ],\n {\n notaryId: u32;\n notebookNumber: u32;\n notebookHash: H256;\n firstFailureReason: ArgonNotaryAuditErrorVerifyError;\n }\n >;\n NotebookReadyForReprocess: AugmentedEvent<\n ApiType,\n [notaryId: u32, notebookNumber: u32],\n { notaryId: u32; notebookNumber: u32 }\n >;\n NotebookSubmitted: AugmentedEvent<\n ApiType,\n [notaryId: u32, notebookNumber: u32],\n { notaryId: u32; notebookNumber: u32 }\n >;\n };\n ownership: {\n /**\n * A balance was set by root.\n **/\n BalanceSet: AugmentedEvent<\n ApiType,\n [who: AccountId32, free: u128],\n { who: AccountId32; free: u128 }\n >;\n /**\n * Some amount was burned from an account.\n **/\n Burned: AugmentedEvent<\n ApiType,\n [who: AccountId32, amount: u128],\n { who: AccountId32; amount: u128 }\n >;\n /**\n * Some amount was deposited (e.g. for transaction fees).\n **/\n Deposit: AugmentedEvent<\n ApiType,\n [who: AccountId32, amount: u128],\n { who: AccountId32; amount: u128 }\n >;\n /**\n * An account was removed whose balance was non-zero but below ExistentialDeposit,\n * resulting in an outright loss.\n **/\n DustLost: AugmentedEvent<\n ApiType,\n [account: AccountId32, amount: u128],\n { account: AccountId32; amount: u128 }\n >;\n /**\n * An account was created with some free balance.\n **/\n Endowed: AugmentedEvent<\n ApiType,\n [account: AccountId32, freeBalance: u128],\n { account: AccountId32; freeBalance: u128 }\n >;\n /**\n * Some balance was frozen.\n **/\n Frozen: AugmentedEvent<\n ApiType,\n [who: AccountId32, amount: u128],\n { who: AccountId32; amount: u128 }\n >;\n /**\n * Total issuance was increased by `amount`, creating a credit to be balanced.\n **/\n Issued: AugmentedEvent<ApiType, [amount: u128], { amount: u128 }>;\n /**\n * Some balance was locked.\n **/\n Locked: AugmentedEvent<\n ApiType,\n [who: AccountId32, amount: u128],\n { who: AccountId32; amount: u128 }\n >;\n /**\n * Some amount was minted into an account.\n **/\n Minted: AugmentedEvent<\n ApiType,\n [who: AccountId32, amount: u128],\n { who: AccountId32; amount: u128 }\n >;\n /**\n * Total issuance was decreased by `amount`, creating a debt to be balanced.\n **/\n Rescinded: AugmentedEvent<ApiType, [amount: u128], { amount: u128 }>;\n /**\n * Some balance was reserved (moved from free to reserved).\n **/\n Reserved: AugmentedEvent<\n ApiType,\n [who: AccountId32, amount: u128],\n { who: AccountId32; amount: u128 }\n >;\n /**\n * Some balance was moved from the reserve of the first account to the second account.\n * Final argument indicates the destination balance type.\n **/\n ReserveRepatriated: AugmentedEvent<\n ApiType,\n [\n from: AccountId32,\n to: AccountId32,\n amount: u128,\n destinationStatus: FrameSupportTokensMiscBalanceStatus,\n ],\n {\n from: AccountId32;\n to: AccountId32;\n amount: u128;\n destinationStatus: FrameSupportTokensMiscBalanceStatus;\n }\n >;\n /**\n * Some amount was restored into an account.\n **/\n Restored: AugmentedEvent<\n ApiType,\n [who: AccountId32, amount: u128],\n { who: AccountId32; amount: u128 }\n >;\n /**\n * Some amount was removed from the account (e.g. for misbehavior).\n **/\n Slashed: AugmentedEvent<\n ApiType,\n [who: AccountId32, amount: u128],\n { who: AccountId32; amount: u128 }\n >;\n /**\n * Some amount was suspended from an account (it can be restored later).\n **/\n Suspended: AugmentedEvent<\n ApiType,\n [who: AccountId32, amount: u128],\n { who: AccountId32; amount: u128 }\n >;\n /**\n * Some balance was thawed.\n **/\n Thawed: AugmentedEvent<\n ApiType,\n [who: AccountId32, amount: u128],\n { who: AccountId32; amount: u128 }\n >;\n /**\n * The `TotalIssuance` was forcefully changed.\n **/\n TotalIssuanceForced: AugmentedEvent<\n ApiType,\n [old: u128, new_: u128],\n { old: u128; new_: u128 }\n >;\n /**\n * Transfer succeeded.\n **/\n Transfer: AugmentedEvent<\n ApiType,\n [from: AccountId32, to: AccountId32, amount: u128],\n { from: AccountId32; to: AccountId32; amount: u128 }\n >;\n /**\n * Some balance was unlocked.\n **/\n Unlocked: AugmentedEvent<\n ApiType,\n [who: AccountId32, amount: u128],\n { who: AccountId32; amount: u128 }\n >;\n /**\n * Some balance was unreserved (moved from reserved to free).\n **/\n Unreserved: AugmentedEvent<\n ApiType,\n [who: AccountId32, amount: u128],\n { who: AccountId32; amount: u128 }\n >;\n /**\n * An account was upgraded.\n **/\n Upgraded: AugmentedEvent<\n ApiType,\n [who: AccountId32],\n { who: AccountId32 }\n >;\n /**\n * Some amount was withdrawn from the account (e.g. for transaction fees).\n **/\n Withdraw: AugmentedEvent<\n ApiType,\n [who: AccountId32, amount: u128],\n { who: AccountId32; amount: u128 }\n >;\n };\n priceIndex: {\n /**\n * Event emitted when a new price index is submitted\n **/\n NewIndex: AugmentedEvent<ApiType, []>;\n OperatorChanged: AugmentedEvent<\n ApiType,\n [operatorId: AccountId32],\n { operatorId: AccountId32 }\n >;\n };\n proxy: {\n /**\n * An announcement was placed to make a call in the future.\n **/\n Announced: AugmentedEvent<\n ApiType,\n [real: AccountId32, proxy: AccountId32, callHash: H256],\n { real: AccountId32; proxy: AccountId32; callHash: H256 }\n >;\n /**\n * A proxy was added.\n **/\n ProxyAdded: AugmentedEvent<\n ApiType,\n [\n delegator: AccountId32,\n delegatee: AccountId32,\n proxyType: ArgonRuntimeProxyType,\n delay: u32,\n ],\n {\n delegator: AccountId32;\n delegatee: AccountId32;\n proxyType: ArgonRuntimeProxyType;\n delay: u32;\n }\n >;\n /**\n * A proxy was executed correctly, with the given.\n **/\n ProxyExecuted: AugmentedEvent<\n ApiType,\n [result: Result<Null, SpRuntimeDispatchError>],\n { result: Result<Null, SpRuntimeDispatchError> }\n >;\n /**\n * A proxy was removed.\n **/\n ProxyRemoved: AugmentedEvent<\n ApiType,\n [\n delegator: AccountId32,\n delegatee: AccountId32,\n proxyType: ArgonRuntimeProxyType,\n delay: u32,\n ],\n {\n delegator: AccountId32;\n delegatee: AccountId32;\n proxyType: ArgonRuntimeProxyType;\n delay: u32;\n }\n >;\n /**\n * A pure account has been created by new proxy with given\n * disambiguation index and proxy type.\n **/\n PureCreated: AugmentedEvent<\n ApiType,\n [\n pure: AccountId32,\n who: AccountId32,\n proxyType: ArgonRuntimeProxyType,\n disambiguationIndex: u16,\n ],\n {\n pure: AccountId32;\n who: AccountId32;\n proxyType: ArgonRuntimeProxyType;\n disambiguationIndex: u16;\n }\n >;\n };\n sudo: {\n /**\n * The sudo key has been updated.\n **/\n KeyChanged: AugmentedEvent<\n ApiType,\n [old: Option<AccountId32>, new_: AccountId32],\n { old: Option<AccountId32>; new_: AccountId32 }\n >;\n /**\n * The key was permanently removed.\n **/\n KeyRemoved: AugmentedEvent<ApiType, []>;\n /**\n * A sudo call just took place.\n **/\n Sudid: AugmentedEvent<\n ApiType,\n [sudoResult: Result<Null, SpRuntimeDispatchError>],\n { sudoResult: Result<Null, SpRuntimeDispatchError> }\n >;\n /**\n * A [sudo_as](Pallet::sudo_as) call just took place.\n **/\n SudoAsDone: AugmentedEvent<\n ApiType,\n [sudoResult: Result<Null, SpRuntimeDispatchError>],\n { sudoResult: Result<Null, SpRuntimeDispatchError> }\n >;\n };\n system: {\n /**\n * `:code` was updated.\n **/\n CodeUpdated: AugmentedEvent<ApiType, []>;\n /**\n * An extrinsic failed.\n **/\n ExtrinsicFailed: AugmentedEvent<\n ApiType,\n [\n dispatchError: SpRuntimeDispatchError,\n dispatchInfo: FrameSystemDispatchEventInfo,\n ],\n {\n dispatchError: SpRuntimeDispatchError;\n dispatchInfo: FrameSystemDispatchEventInfo;\n }\n >;\n /**\n * An extrinsic completed successfully.\n **/\n ExtrinsicSuccess: AugmentedEvent<\n ApiType,\n [dispatchInfo: FrameSystemDispatchEventInfo],\n { dispatchInfo: FrameSystemDispatchEventInfo }\n >;\n /**\n * An account was reaped.\n **/\n KilledAccount: AugmentedEvent<\n ApiType,\n [account: AccountId32],\n { account: AccountId32 }\n >;\n /**\n * A new account was created.\n **/\n NewAccount: AugmentedEvent<\n ApiType,\n [account: AccountId32],\n { account: AccountId32 }\n >;\n /**\n * On on-chain remark happened.\n **/\n Remarked: AugmentedEvent<\n ApiType,\n [sender: AccountId32, hash_: H256],\n { sender: AccountId32; hash_: H256 }\n >;\n /**\n * An upgrade was authorized.\n **/\n UpgradeAuthorized: AugmentedEvent<\n ApiType,\n [codeHash: H256, checkVersion: bool],\n { codeHash: H256; checkVersion: bool }\n >;\n };\n tokenGateway: {\n /**\n * An asset has been received and transferred to the beneficiary's account\n **/\n AssetReceived: AugmentedEvent<\n ApiType,\n [beneficiary: AccountId32, amount: u128, source: IsmpHostStateMachine],\n { beneficiary: AccountId32; amount: u128; source: IsmpHostStateMachine }\n >;\n /**\n * An asset has been refunded and transferred to the beneficiary's account\n **/\n AssetRefunded: AugmentedEvent<\n ApiType,\n [beneficiary: AccountId32, amount: u128, source: IsmpHostStateMachine],\n { beneficiary: AccountId32; amount: u128; source: IsmpHostStateMachine }\n >;\n /**\n * An asset has been teleported\n **/\n AssetTeleported: AugmentedEvent<\n ApiType,\n [\n from: AccountId32,\n to: H256,\n amount: u128,\n dest: IsmpHostStateMachine,\n commitment: H256,\n ],\n {\n from: AccountId32;\n to: H256;\n amount: u128;\n dest: IsmpHostStateMachine;\n commitment: H256;\n }\n >;\n /**\n * ERC6160 asset creation request dispatched to hyperbridge\n **/\n ERC6160AssetRegistrationDispatched: AugmentedEvent<\n ApiType,\n [commitment: H256],\n { commitment: H256 }\n >;\n };\n transactionPayment: {\n /**\n * A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee,\n * has been paid by `who`.\n **/\n TransactionFeePaid: AugmentedEvent<\n ApiType,\n [who: AccountId32, actualFee: u128, tip: u128],\n { who: AccountId32; actualFee: u128; tip: u128 }\n >;\n };\n txPause: {\n /**\n * This pallet, or a specific call is now paused.\n **/\n CallPaused: AugmentedEvent<\n ApiType,\n [fullName: ITuple<[Bytes, Bytes]>],\n { fullName: ITuple<[Bytes, Bytes]> }\n >;\n /**\n * This pallet, or a specific call is now unpaused.\n **/\n CallUnpaused: AugmentedEvent<\n ApiType,\n [fullName: ITuple<[Bytes, Bytes]>],\n { fullName: ITuple<[Bytes, Bytes]> }\n >;\n };\n utility: {\n /**\n * Batch of dispatches completed fully with no error.\n **/\n BatchCompleted: AugmentedEvent<ApiType, []>;\n /**\n * Batch of dispatches completed but has errors.\n **/\n BatchCompletedWithErrors: AugmentedEvent<ApiType, []>;\n /**\n * Batch of dispatches did not complete fully. Index of first failing dispatch given, as\n * well as the error.\n **/\n BatchInterrupted: AugmentedEvent<\n ApiType,\n [index: u32, error: SpRuntimeDispatchError],\n { index: u32; error: SpRuntimeDispatchError }\n >;\n /**\n * A call was dispatched.\n **/\n DispatchedAs: AugmentedEvent<\n ApiType,\n [result: Result<Null, SpRuntimeDispatchError>],\n { result: Result<Null, SpRuntimeDispatchError> }\n >;\n /**\n * A single item within a Batch of dispatches has completed with no error.\n **/\n ItemCompleted: AugmentedEvent<ApiType, []>;\n /**\n * A single item within a Batch of dispatches has completed with error.\n **/\n ItemFailed: AugmentedEvent<\n ApiType,\n [error: SpRuntimeDispatchError],\n { error: SpRuntimeDispatchError }\n >;\n };\n vaults: {\n ObligationCompleted: AugmentedEvent<\n ApiType,\n [vaultId: u32, obligationId: u64, wasCanceled: bool],\n { vaultId: u32; obligationId: u64; wasCanceled: bool }\n >;\n /**\n * An error occurred while completing an obligation\n **/\n ObligationCompletionError: AugmentedEvent<\n ApiType,\n [obligationId: u64, error: SpRuntimeDispatchError],\n { obligationId: u64; error: SpRuntimeDispatchError }\n >;\n ObligationCreated: AugmentedEvent<\n ApiType,\n [\n vaultId: u32,\n obligationId: u64,\n fundType: ArgonPrimitivesVaultFundType,\n beneficiary: AccountId32,\n amount: u128,\n expiration: ArgonPrimitivesVaultObligationExpiration,\n ],\n {\n vaultId: u32;\n obligationId: u64;\n fundType: ArgonPrimitivesVaultFundType;\n beneficiary: AccountId32;\n amount: u128;\n expiration: ArgonPrimitivesVaultObligationExpiration;\n }\n >;\n ObligationModified: AugmentedEvent<\n ApiType,\n [vaultId: u32, obligationId: u64, amount: u128],\n { vaultId: u32; obligationId: u64; amount: u128 }\n >;\n VaultBitcoinXpubChange: AugmentedEvent<\n ApiType,\n [vaultId: u32],\n { vaultId: u32 }\n >;\n VaultClosed: AugmentedEvent<\n ApiType,\n [vaultId: u32, remainingSecuritization: u128, released: u128],\n { vaultId: u32; remainingSecuritization: u128; released: u128 }\n >;\n VaultCreated: AugmentedEvent<\n ApiType,\n [\n vaultId: u32,\n securitization: u128,\n securitizationRatio: u128,\n operatorAccountId: AccountId32,\n openedTick: u64,\n ],\n {\n vaultId: u32;\n securitization: u128;\n securitizationRatio: u128;\n operatorAccountId: AccountId32;\n openedTick: u64;\n }\n >;\n VaultModified: AugmentedEvent<\n ApiType,\n [vaultId: u32, securitization: u128, securitizationRatio: u128],\n { vaultId: u32; securitization: u128; securitizationRatio: u128 }\n >;\n VaultTermsChanged: AugmentedEvent<\n ApiType,\n [vaultId: u32],\n { vaultId: u32 }\n >;\n VaultTermsChangeScheduled: AugmentedEvent<\n ApiType,\n [vaultId: u32, changeTick: u64],\n { vaultId: u32; changeTick: u64 }\n >;\n };\n } // AugmentedEvents\n} // declare module\n","// Auto-generated via `yarn polkadot-types-from-chain`, do not edit\n/* eslint-disable */\n\n// import type lookup before we augment - in some environments\n// this is required to allow for ambient/previous definitions\nimport '@polkadot/api-base/types/storage';\n\nimport type {\n ApiTypes,\n AugmentedQuery,\n QueryableStorageEntry,\n} from '@polkadot/api-base/types';\nimport type {\n BTreeMap,\n Bytes,\n Null,\n Option,\n U256,\n U8aFixed,\n Vec,\n bool,\n u128,\n u16,\n u32,\n u64,\n u8,\n} from '@polkadot/types-codec';\nimport type { AnyNumber, ITuple } from '@polkadot/types-codec/types';\nimport type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime';\nimport type {\n ArgonNotaryAuditErrorVerifyError,\n ArgonPrimitivesBalanceChangeAccountOrigin,\n ArgonPrimitivesBitcoinBitcoinBlock,\n ArgonPrimitivesBitcoinBitcoinNetwork,\n ArgonPrimitivesBitcoinBitcoinXPub,\n ArgonPrimitivesBitcoinUtxoRef,\n ArgonPrimitivesBitcoinUtxoValue,\n ArgonPrimitivesBlockSealBlockPayout,\n ArgonPrimitivesBlockSealMiningBidStats,\n ArgonPrimitivesBlockSealMiningRegistration,\n ArgonPrimitivesBlockSealMiningSlotConfig,\n ArgonPrimitivesDigestsBlockVoteDigest,\n ArgonPrimitivesDigestsDigestset,\n ArgonPrimitivesDigestsNotebookDigest,\n ArgonPrimitivesDomainZoneRecord,\n ArgonPrimitivesForkPower,\n ArgonPrimitivesInherentsBlockSealInherent,\n ArgonPrimitivesNotaryNotaryMeta,\n ArgonPrimitivesNotaryNotaryNotebookKeyDetails,\n ArgonPrimitivesNotaryNotaryNotebookVoteDigestDetails,\n ArgonPrimitivesNotaryNotaryRecord,\n ArgonPrimitivesProvidersBlockSealerInfo,\n ArgonPrimitivesTickTicker,\n ArgonPrimitivesVault,\n ArgonPrimitivesVaultObligation,\n FrameSupportDispatchPerDispatchClassWeight,\n FrameSupportTokensMiscIdAmountRuntimeFreezeReason,\n FrameSupportTokensMiscIdAmountRuntimeHoldReason,\n FrameSystemAccountInfo,\n FrameSystemCodeUpgradeAuthorization,\n FrameSystemEventRecord,\n FrameSystemLastRuntimeUpgradeInfo,\n FrameSystemPhase,\n IsmpConsensusStateCommitment,\n IsmpConsensusStateMachineHeight,\n IsmpConsensusStateMachineId,\n IsmpHostStateMachine,\n PalletBalancesAccountData,\n PalletBalancesBalanceLock,\n PalletBalancesReserveData,\n PalletBitcoinLocksLockReleaseRequest,\n PalletBitcoinLocksLockedBitcoin,\n PalletChainTransferQueuedTransferOut,\n PalletDomainsDomainRegistration,\n PalletGrandpaStoredPendingChange,\n PalletGrandpaStoredState,\n PalletHyperbridgeVersionedHostParams,\n PalletLiquidityPoolsLiquidityPool,\n PalletLiquidityPoolsLiquidityPoolCapital,\n PalletMintMintAction,\n PalletMultisigMultisig,\n PalletPriceIndexPriceIndex,\n PalletProxyAnnouncement,\n PalletProxyProxyDefinition,\n PalletTransactionPaymentReleases,\n PalletVaultsVaultRevenue,\n SpConsensusGrandpaAppPublic,\n SpRuntimeDigest,\n} from '@polkadot/types/lookup';\nimport type { Observable } from '@polkadot/types/types';\n\nexport type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<\n ApiType,\n () => unknown\n>;\nexport type __QueryableStorageEntry<ApiType extends ApiTypes> =\n QueryableStorageEntry<ApiType>;\n\ndeclare module '@polkadot/api-base/types/storage' {\n interface AugmentedQueries<ApiType extends ApiTypes> {\n authorship: {\n /**\n * Author of current block.\n **/\n author: AugmentedQuery<\n ApiType,\n () => Observable<Option<AccountId32>>,\n []\n >;\n };\n balances: {\n /**\n * The Balances pallet example of storing the balance of an account.\n *\n * # Example\n *\n * ```nocompile\n * impl pallet_balances::Config for Runtime {\n * type AccountStore = StorageMapShim<Self::Account<Runtime>, frame_system::Provider<Runtime>, AccountId, Self::AccountData<Balance>>\n * }\n * ```\n *\n * You can also store the balance of an account in the `System` pallet.\n *\n * # Example\n *\n * ```nocompile\n * impl pallet_balances::Config for Runtime {\n * type AccountStore = System\n * }\n * ```\n *\n * But this comes with tradeoffs, storing account balances in the system pallet stores\n * `frame_system` data alongside the account data contrary to storing account balances in the\n * `Balances` pallet, which uses a `StorageMap` to store balances data only.\n * NOTE: This is only used in the case that this pallet is used to store balances.\n **/\n account: AugmentedQuery<\n ApiType,\n (\n arg: AccountId32 | string | Uint8Array,\n ) => Observable<PalletBalancesAccountData>,\n [AccountId32]\n >;\n /**\n * Freeze locks on account balances.\n **/\n freezes: AugmentedQuery<\n ApiType,\n (\n arg: AccountId32 | string | Uint8Array,\n ) => Observable<Vec<FrameSupportTokensMiscIdAmountRuntimeFreezeReason>>,\n [AccountId32]\n >;\n /**\n * Holds on account balances.\n **/\n holds: AugmentedQuery<\n ApiType,\n (\n arg: AccountId32 | string | Uint8Array,\n ) => Observable<Vec<FrameSupportTokensMiscIdAmountRuntimeHoldReason>>,\n [AccountId32]\n >;\n /**\n * The total units of outstanding deactivated balance in the system.\n **/\n inactiveIssuance: AugmentedQuery<ApiType, () => Observable<u128>, []>;\n /**\n * Any liquidity locks on some account balances.\n * NOTE: Should only be accessed when setting, changing and freeing a lock.\n *\n * Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`\n **/\n locks: AugmentedQuery<\n ApiType,\n (\n arg: AccountId32 | string | Uint8Array,\n ) => Observable<Vec<PalletBalancesBalanceLock>>,\n [AccountId32]\n >;\n /**\n * Named reserves on some account balances.\n *\n * Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`\n **/\n reserves: AugmentedQuery<\n ApiType,\n (\n arg: AccountId32 | string | Uint8Array,\n ) => Observable<Vec<PalletBalancesReserveData>>,\n [AccountId32]\n >;\n /**\n * The total units issued in the system.\n **/\n totalIssuance: AugmentedQuery<ApiType, () => Observable<u128>, []>;\n };\n bitcoinLocks: {\n /**\n * Stores the block number where the lock was released\n **/\n lockReleaseCosignHeightById: AugmentedQuery<\n ApiType,\n (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<u32>>,\n [u64]\n >;\n /**\n * Stores bitcoin utxos that have requested to be released\n **/\n locksByUtxoId: AugmentedQuery<\n ApiType,\n (\n arg: u64 | AnyNumber | Uint8Array,\n ) => Observable<Option<PalletBitcoinLocksLockedBitcoin>>,\n [u64]\n >;\n /**\n * Utxos that have been requested to be cosigned for releasing\n **/\n locksPendingReleaseByUtxoId: AugmentedQuery<\n ApiType,\n () => Observable<BTreeMap<u64, PalletBitcoinLocksLockReleaseRequest>>,\n []\n >;\n /**\n * The minimum number of satoshis that can be locked\n **/\n minimumSatoshis: AugmentedQuery<ApiType, () => Observable<u64>, []>;\n nextUtxoId: AugmentedQuery<ApiType, () => Observable<Option<u64>>, []>;\n /**\n * Mapping of obligation id to lock id\n **/\n obligationIdToUtxoId: AugmentedQuery<\n ApiType,\n (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<u64>>,\n [u64]\n >;\n /**\n * Stores Utxos that were not paid back in full\n *\n * Tuple stores Account, Vault, Still Owed, State\n **/\n owedUtxoAggrieved: AugmentedQuery<\n ApiType,\n (\n arg: u64 | AnyNumber | Uint8Array,\n ) => Observable<\n Option<\n ITuple<[AccountId32, u32, u128, PalletBitcoinLocksLockedBitcoin]>\n >\n >,\n [u64]\n >;\n };\n bitcoinUtxos: {\n /**\n * The genesis set bitcoin network that this chain is tied to\n **/\n bitcoinNetwork: AugmentedQuery<\n ApiType,\n () => Observable<ArgonPrimitivesBitcoinBitcoinNetwork>,\n []\n >;\n /**\n * An oracle-provided confirmed bitcoin block (eg, 6 blocks back)\n **/\n confirmedBitcoinBlockTip: AugmentedQuery<\n ApiType,\n () => Observable<Option<ArgonPrimitivesBitcoinBitcoinBlock>>,\n []\n >;\n /**\n * Check if the inherent was included\n **/\n inherentIncluded: AugmentedQuery<ApiType, () => Observable<bool>, []>;\n /**\n * Expiration date as a day since unix timestamp mapped to Bitcoin UTXOs\n **/\n lockedUtxoExpirationsByBlock: AugmentedQuery<\n ApiType,\n (\n arg: u64 | AnyNumber | Uint8Array,\n ) => Observable<Vec<ArgonPrimitivesBitcoinUtxoRef>>,\n [u64]\n >;\n /**\n * Locked Bitcoin UTXOs that have had ownership confirmed. If a Bitcoin UTXO is moved before\n * the expiration block, the obligation is burned and the UTXO is unlocked.\n **/\n lockedUtxos: AugmentedQuery<\n ApiType,\n (\n arg:\n | ArgonPrimitivesBitcoinUtxoRef\n | { txid?: any; outputIndex?: any }\n | string\n | Uint8Array,\n ) => Observable<Option<ArgonPrimitivesBitcoinUtxoValue>>,\n [ArgonPrimitivesBitcoinUtxoRef]\n >;\n /**\n * Bitcoin Oracle Operator Account\n **/\n oracleOperatorAccount: AugmentedQuery<\n ApiType,\n () => Observable<Option<AccountId32>>,\n []\n >;\n previousBitcoinBlockTip: AugmentedQuery<\n ApiType,\n () => Observable<Option<ArgonPrimitivesBitcoinBitcoinBlock>>,\n []\n >;\n /**\n * The last synched bitcoin block\n **/\n synchedBitcoinBlock: AugmentedQuery<\n ApiType,\n () => Observable<Option<ArgonPrimitivesBitcoinBitcoinBlock>>,\n []\n >;\n /**\n * Stores if parent block had a confirmed bitcoin block\n **/\n tempParentHasSyncState: AugmentedQuery<\n ApiType,\n () => Observable<bool>,\n []\n >;\n utxoIdToRef: AugmentedQuery<\n ApiType,\n (\n arg: u64 | AnyNumber | Uint8Array,\n ) => Observable<Option<ArgonPrimitivesBitcoinUtxoRef>>,\n [u64]\n >;\n /**\n * Bitcoin UTXOs that have been submitted for ownership confirmation\n **/\n utxosPendingConfirmation: AugmentedQuery<\n ApiType,\n () => Observable<BTreeMap<u64, ArgonPrimitivesBitcoinUtxoValue>>,\n []\n >;\n };\n blockRewards: {\n /**\n * The current scaled block rewards. It will adjust based on the argon movement away from price\n * target\n **/\n argonsPerBlock: AugmentedQuery<ApiType, () => Observable<u128>, []>;\n /**\n * The cohort block rewards\n **/\n blockRewardsByCohort: AugmentedQuery<\n ApiType,\n () => Observable<Vec<ITuple<[u64, u128]>>>,\n []\n >;\n /**\n * Bool if block rewards are paused\n **/\n blockRewardsPaused: AugmentedQuery<ApiType, () => Observable<bool>, []>;\n /**\n * Historical payouts by block number\n **/\n payoutsByBlock: AugmentedQuery<\n ApiType,\n (\n arg: u32 | AnyNumber | Uint8Array,\n ) => Observable<Vec<ArgonPrimitivesBlockSealBlockPayout>>,\n [u32]\n >;\n };\n blockSeal: {\n /**\n * The calculated strength in the runtime so that it can be\n * upgraded, but is used by the node to determine which fork to follow\n **/\n blockForkPower: AugmentedQuery<\n ApiType,\n () => Observable<ArgonPrimitivesForkPower>,\n []\n >;\n /**\n * Is the block from a vote seal?\n **/\n isBlockFromVoteSeal: AugmentedQuery<ApiType, () => Observable<bool>, []>;\n lastBlockSealerInfo: AugmentedQuery<\n ApiType,\n () => Observable<Option<ArgonPrimitivesProvidersBlockSealerInfo>>,\n []\n >;\n lastTickWithVoteSeal: AugmentedQuery<ApiType, () => Observable<u64>, []>;\n /**\n * The calculated parent voting key for a block. Refers to the Notebook BlockVote Revealed\n * Secret + VotesMerkleRoot of the parent block notebooks.\n **/\n parentVotingKey: AugmentedQuery<\n ApiType,\n () => Observable<Option<H256>>,\n []\n >;\n /**\n * Ensures only a single inherent is applied\n **/\n tempSealInherent: AugmentedQuery<\n ApiType,\n () => Observable<Option<ArgonPrimitivesInherentsBlockSealInherent>>,\n []\n >;\n /**\n * The count of votes in the last 3 ticks\n **/\n votesInPast3Ticks: AugmentedQuery<\n ApiType,\n () => Observable<Vec<ITuple<[u64, u32]>>>,\n []\n >;\n };\n blockSealSpec: {\n /**\n * The current vote minimum of the chain. Block votes use this minimum to determine the\n * minimum amount of tax or compute needed to create a vote. It is adjusted up or down to\n * target a max number of votes\n **/\n currentComputeDifficulty: AugmentedQuery<\n ApiType,\n () => Observable<u128>,\n []\n >;\n /**\n * The key K is selected to be the hash of a block in the blockchain - this block is called\n * the 'key block'. For optimal mining and verification performance, the key should\n * change every day\n **/\n currentComputeKeyBlock: AugmentedQuery<\n ApiType,\n () => Observable<Option<H256>>,\n []\n >;\n /**\n * The current vote minimum of the chain. Block votes use this minimum to determine the\n * minimum amount of tax or compute needed to create a vote. It is adjusted up or down to\n * target a max number of votes\n **/\n currentVoteMinimum: AugmentedQuery<ApiType, () => Observable<u128>, []>;\n pastBlockVotes: AugmentedQuery<\n ApiType,\n () => Observable<Vec<ITuple<[u64, u32, u128]>>>,\n []\n >;\n pastComputeBlockTimes: AugmentedQuery<\n ApiType,\n () => Observable<Vec<u64>>,\n []\n >;\n /**\n * The timestamp from the previous block\n **/\n previousBlockTimestamp: AugmentedQuery<\n ApiType,\n () => Observable<Option<u64>>,\n []\n >;\n tempBlockTimestamp: AugmentedQuery<\n ApiType,\n () => Observable<Option<u64>>,\n []\n >;\n /**\n * Temporary store the vote digest\n **/\n tempBlockVoteDigest: AugmentedQuery<\n ApiType,\n () => Observable<Option<ArgonPrimitivesDigestsBlockVoteDigest>>,\n []\n >;\n /**\n * Temporary store of any current tick notebooks included in this block (vs tick)\n **/\n tempCurrentTickNotebooksInBlock: AugmentedQuery<\n ApiType,\n () => Observable<\n Vec<ArgonPrimitivesNotaryNotaryNotebookVoteDigestDetails>\n >,\n []\n >;\n /**\n * Keeps the last 3 vote minimums. The first one applies to the current block.\n **/\n voteMinimumHistory: AugmentedQuery<\n ApiType,\n () => Observable<Vec<u128>>,\n []\n >;\n };\n chainTransfer: {\n expiringTransfersOutByNotary: AugmentedQuery<\n ApiType,\n (\n arg1: u32 | AnyNumber | Uint8Array,\n arg2: u64 | AnyNumber | Uint8Array,\n ) => Observable<Vec<u32>>,\n [u32, u64]\n >;\n /**\n * The admin of the hyperbridge token gateway\n **/\n hyperbridgeTokenAdmin: AugmentedQuery<\n ApiType,\n () => Observable<Option<AccountId32>>,\n []\n >;\n nextTransferId: AugmentedQuery<\n ApiType,\n () => Observable<Option<u32>>,\n []\n >;\n pendingTransfersOut: AugmentedQuery<\n ApiType,\n (\n arg: u32 | AnyNumber | Uint8Array,\n ) => Observable<Option<PalletChainTransferQueuedTransferOut>>,\n [u32]\n >;\n transfersUsedInBlockNotebooks: AugmentedQuery<\n ApiType,\n (\n arg: u32 | AnyNumber | Uint8Array,\n ) => Observable<Vec<ITuple<[AccountId32, u32]>>>,\n [u32]\n >;\n };\n digests: {\n tempDigests: AugmentedQuery<\n ApiType,\n () => Observable<Option<ArgonPrimitivesDigestsDigestset>>,\n []\n >;\n };\n domains: {\n expiringDomainsByBlock: AugmentedQuery<\n ApiType,\n (arg: u64 | AnyNumber | Uint8Array) => Observable<Vec<H256>>,\n [u64]\n >;\n registeredDomains: AugmentedQuery<\n ApiType,\n (\n arg: H256 | string | Uint8Array,\n ) => Observable<Option<PalletDomainsDomainRegistration>>,\n [H256]\n >;\n zoneRecordsByDomain: AugmentedQuery<\n ApiType,\n (\n arg: H256 | string | Uint8Array,\n ) => Observable<Option<ArgonPrimitivesDomainZoneRecord>>,\n [H256]\n >;\n };\n grandpa: {\n /**\n * The current list of authorities.\n **/\n authorities: AugmentedQuery<\n ApiType,\n () => Observable<Vec<ITuple<[SpConsensusGrandpaAppPublic, u64]>>>,\n []\n >;\n /**\n * The number of changes (both in terms of keys and underlying economic responsibilities)\n * in the \"set\" of Grandpa validators from genesis.\n **/\n currentSetId: AugmentedQuery<ApiType, () => Observable<u64>, []>;\n /**\n * next block number where we can force a change.\n **/\n nextForced: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []>;\n /**\n * Pending change: (signaled at, scheduled change).\n **/\n pendingChange: AugmentedQuery<\n ApiType,\n () => Observable<Option<PalletGrandpaStoredPendingChange>>,\n []\n >;\n /**\n * A mapping from grandpa set ID to the index of the *most recent* session for which its\n * members were responsible.\n *\n * This is only used for validating equivocation proofs. An equivocation proof must\n * contains a key-ownership proof for a given session, therefore we need a way to tie\n * together sessions and GRANDPA set ids, i.e. we need to validate that a validator\n * was the owner of a given key on a given session, and what the active set ID was\n * during that session.\n *\n * TWOX-NOTE: `SetId` is not under user control.\n **/\n setIdSession: AugmentedQuery<\n ApiType,\n (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<u32>>,\n [u64]\n >;\n /**\n * `true` if we are currently stalled.\n **/\n stalled: AugmentedQuery<\n ApiType,\n () => Observable<Option<ITuple<[u32, u32]>>>,\n []\n >;\n /**\n * State of the current authority set.\n **/\n state: AugmentedQuery<\n ApiType,\n () => Observable<PalletGrandpaStoredState>,\n []\n >;\n };\n hyperbridge: {\n /**\n * The host parameters of the pallet-hyperbridge.\n **/\n hostParams: AugmentedQuery<\n ApiType,\n () => Observable<PalletHyperbridgeVersionedHostParams>,\n []\n >;\n };\n ismp: {\n /**\n * A mapping of state machine Ids to their challenge periods\n **/\n challengePeriod: AugmentedQuery<\n ApiType,\n (\n arg:\n | IsmpConsensusStateMachineId\n | { stateId?: any; consensusStateId?: any }\n | string\n | Uint8Array,\n ) => Observable<Option<u64>>,\n [IsmpConsensusStateMachineId]\n >;\n /**\n * The child trie root of messages\n **/\n childTrieRoot: AugmentedQuery<ApiType, () => Observable<H256>, []>;\n /**\n * Holds the timestamp at which a consensus client was recently updated.\n * Used in ensuring that the configured challenge period elapses.\n **/\n consensusClientUpdateTime: AugmentedQuery<\n ApiType,\n (arg: U8aFixed | string | Uint8Array) => Observable<Option<u64>>,\n [U8aFixed]\n >;\n /**\n * A mapping of consensus state identifier to it's associated consensus client identifier\n **/\n consensusStateClient: AugmentedQuery<\n ApiType,\n (arg: U8aFixed | string | Uint8Array) => Observable<Option<U8aFixed>>,\n [U8aFixed]\n >;\n /**\n * Holds a map of consensus state identifiers to their consensus state.\n **/\n consensusStates: AugmentedQuery<\n ApiType,\n (arg: U8aFixed | string | Uint8Array) => Observable<Option<Bytes>>,\n [U8aFixed]\n >;\n /**\n * Holds a map of consensus clients frozen due to byzantine\n * behaviour\n **/\n frozenConsensusClients: AugmentedQuery<\n ApiType,\n (arg: U8aFixed | string | Uint8Array) => Observable<bool>,\n [U8aFixed]\n >;\n /**\n * The latest verified height for a state machine\n **/\n latestStateMachineHeight: AugmentedQuery<\n ApiType,\n (\n arg:\n | IsmpConsensusStateMachineId\n | { stateId?: any; consensusStateId?: any }\n | string\n | Uint8Array,\n ) => Observable<Option<u64>>,\n [IsmpConsensusStateMachineId]\n >;\n /**\n * Latest nonce for messages sent from this chain\n **/\n nonce: AugmentedQuery<ApiType, () => Observable<u64>, []>;\n /**\n * Tracks requests that have been responded to\n * The key is the request commitment\n **/\n responded: AugmentedQuery<\n ApiType,\n (arg: H256 | string | Uint8Array) => Observable<bool>,\n [H256]\n >;\n /**\n * Holds a map of state machine heights to their verified state commitments. These state\n * commitments end up here after they are successfully verified by a `ConsensusClient`\n **/\n stateCommitments: AugmentedQuery<\n ApiType,\n (\n arg:\n | IsmpConsensusStateMachineHeight\n | { id?: any; height?: any }\n | string\n | Uint8Array,\n ) => Observable<Option<IsmpConsensusStateCommitment>>,\n [IsmpConsensusStateMachineHeight]\n >;\n /**\n * Holds the timestamp at which a state machine height was updated.\n * Used in ensuring that the configured challenge period elapses.\n **/\n stateMachineUpdateTime: AugmentedQuery<\n ApiType,\n (\n arg:\n | IsmpConsensusStateMachineHeight\n | { id?: any; height?: any }\n | string\n | Uint8Array,\n ) => Observable<Option<u64>>,\n [IsmpConsensusStateMachineHeight]\n >;\n /**\n * A mapping of consensus state identifiers to their unbonding periods\n **/\n unbondingPeriod: AugmentedQuery<\n ApiType,\n (arg: U8aFixed | string | Uint8Array) => Observable<Option<u64>>,\n [U8aFixed]\n >;\n };\n ismpGrandpa: {\n /**\n * Registered state machines for the grandpa consensus client\n **/\n supportedStateMachines: AugmentedQuery<\n ApiType,\n (\n arg:\n | IsmpHostStateMachine\n | { Evm: any }\n | { Polkadot: any }\n | { Kusama: any }\n | { Substrate: any }\n | { Tendermint: any }\n | string\n | Uint8Array,\n ) => Observable<Option<u64>>,\n [IsmpHostStateMachine]\n >;\n };\n liquidityPools: {\n /**\n * The currently earning contributors for the current epoch's bond funds. Sorted by highest\n * bids first\n **/\n liquidityPoolsByCohort: AugmentedQuery<\n ApiType,\n (\n arg: u64 | AnyNumber | Uint8Array,\n ) => Observable<BTreeMap<u32, PalletLiquidityPoolsLiquidityPool>>,\n [u64]\n >;\n /**\n * The liquidity pool capital for the next mining slot cohort.\n **/\n nextLiquidityPoolCapital: AugmentedQuery<\n ApiType,\n () => Observable<Vec<PalletLiquidityPoolsLiquidityPoolCapital>>,\n []\n >;\n /**\n * The entrants in the liquidity pool for the mining slot cohort being bid on. Sorted with\n * biggest share last.\n **/\n openLiquidityPoolCapital: AugmentedQuery<\n ApiType,\n () => Observable<Vec<PalletLiquidityPoolsLiquidityPoolCapital>>,\n []\n >;\n };\n miningSlot: {\n /**\n * Lookup by account id to the corresponding index in ActiveMinersByIndex and Authorities\n **/\n accountIndexLookup: AugmentedQuery<\n ApiType,\n (arg: AccountId32 | string | Uint8Array) => Observable<Option<u32>>,\n [AccountId32]\n >;\n /**\n * Miners that are active in the current block (post initialize)\n **/\n activeMinersByIndex: AugmentedQuery<\n ApiType,\n (\n arg: u32 | AnyNumber | Uint8Array,\n ) => Observable<Option<ArgonPrimitivesBlockSealMiningRegistration>>,\n [u32]\n >;\n activeMinersCount: AugmentedQuery<ApiType, () => Observable<u16>, []>;\n /**\n * Argonots that must be locked to take a Miner role\n **/\n argonotsPerMiningSeat: AugmentedQuery<\n ApiType,\n () => Observable<u128>,\n []\n >;\n /**\n * Did this block activate a new cohort\n **/\n didStartNewCohort: AugmentedQuery<ApiType, () => Observable<bool>, []>;\n /**\n * The previous 10 frame start block numbers\n **/\n frameStartBlockNumbers: AugmentedQuery<\n ApiType,\n () => Observable<Vec<u32>>,\n []\n >;\n hasAddedGrandpaRotation: AugmentedQuery<\n ApiType,\n () => Observable<bool>,\n []\n >;\n /**\n * The number of bids per slot for the last 10 slots (newest first)\n **/\n historicalBidsPerSlot: AugmentedQuery<\n ApiType,\n () => Observable<Vec<ArgonPrimitivesBlockSealMiningBidStats>>,\n []\n >;\n /**\n * Is the next slot still open for bids\n **/\n isNextSlotBiddingOpen: AugmentedQuery<\n ApiType,\n () => Observable<bool>,\n []\n >;\n /**\n * This is a lookup of each miner's XOR key to use. It's a blake2 256 hash of the account id of\n * the miner and the block hash at time of activation.\n **/\n minerXorKeyByIndex: AugmentedQuery<\n ApiType,\n () => Observable<BTreeMap<u32, U256>>,\n []\n >;\n /**\n * The mining slot configuration set in genesis\n **/\n miningConfig: AugmentedQuery<\n ApiType,\n () => Observable<ArgonPrimitivesBlockSealMiningSlotConfig>,\n []\n >;\n /**\n * The next cohort id\n **/\n nextCohortId: AugmentedQuery<ApiType, () => Observable<u64>, []>;\n /**\n * The cohort set to go into effect in the next slot. The Vec has all\n * registrants with their bid amount\n **/\n nextSlotCohort: AugmentedQuery<\n ApiType,\n () => Observable<Vec<ArgonPrimitivesBlockSealMiningRegistration>>,\n []\n >;\n /**\n * The miners released in the last block (only kept for a single block)\n **/\n releasedMinersByAccountId: AugmentedQuery<\n ApiType,\n () => Observable<\n BTreeMap<AccountId32, ArgonPrimitivesBlockSealMiningRegistration>\n >,\n []\n >;\n };\n mint: {\n blockMintAction: AugmentedQuery<\n ApiType,\n () => Observable<ITuple<[u32, PalletMintMintAction]>>,\n []\n >;\n /**\n * The amount of argons minted per cohort for mining\n **/\n miningMintPerCohort: AugmentedQuery<\n ApiType,\n () => Observable<BTreeMap<u64, u128>>,\n []\n >;\n /**\n * The total amount of Bitcoin argons minted. Cannot exceed `MintedMiningArgons`.\n **/\n mintedBitcoinArgons: AugmentedQuery<ApiType, () => Observable<U256>, []>;\n /**\n * The total amount of argons minted for mining\n **/\n mintedMiningArgons: AugmentedQuery<ApiType, () => Observable<U256>, []>;\n /**\n * Bitcoin UTXOs that have been submitted for minting. This list is FIFO for minting whenever\n * a) CPI >= 0 and\n * b) the aggregate minted Bitcoins <= the aggregate minted Argons from mining\n **/\n pendingMintUtxos: AugmentedQuery<\n ApiType,\n () => Observable<Vec<ITuple<[u64, AccountId32, u128]>>>,\n []\n >;\n };\n multisig: {\n /**\n * The set of open multisig operations.\n **/\n multisigs: AugmentedQuery<\n ApiType,\n (\n arg1: AccountId32 | string | Uint8Array,\n arg2: U8aFixed | string | Uint8Array,\n ) => Observable<Option<PalletMultisigMultisig>>,\n [AccountId32, U8aFixed]\n >;\n };\n notaries: {\n activeNotaries: AugmentedQuery<\n ApiType,\n () => Observable<Vec<ArgonPrimitivesNotaryNotaryRecord>>,\n []\n >;\n expiringProposals: AugmentedQuery<\n ApiType,\n (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<AccountId32>>,\n [u32]\n >;\n nextNotaryId: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []>;\n notaryKeyHistory: AugmentedQuery<\n ApiType,\n (\n arg: u32 | AnyNumber | Uint8Array,\n ) => Observable<Vec<ITuple<[u64, U8aFixed]>>>,\n [u32]\n >;\n proposedNotaries: AugmentedQuery<\n ApiType,\n (\n arg: AccountId32 | string | Uint8Array,\n ) => Observable<Option<ITuple<[ArgonPrimitivesNotaryNotaryMeta, u32]>>>,\n [AccountId32]\n >;\n /**\n * Metadata changes to be activated at the given tick\n **/\n queuedNotaryMetaChanges: AugmentedQuery<\n ApiType,\n (\n arg: u64 | AnyNumber | Uint8Array,\n ) => Observable<BTreeMap<u32, ArgonPrimitivesNotaryNotaryMeta>>,\n [u64]\n >;\n };\n notebook: {\n /**\n * Storage map of account origin (notary_id, notebook, account_uid) to the last\n * notebook containing this account in the changed accounts merkle root\n * (NotebookChangedAccountsRootByNotary)\n **/\n accountOriginLastChangedNotebookByNotary: AugmentedQuery<\n ApiType,\n (\n arg1: u32 | AnyNumber | Uint8Array,\n arg2:\n | ArgonPrimitivesBalanceChangeAccountOrigin\n | { notebookNumber?: any; accountUid?: any }\n | string\n | Uint8Array,\n ) => Observable<Option<u32>>,\n [u32, ArgonPrimitivesBalanceChangeAccountOrigin]\n >;\n /**\n * The notebooks included in this block\n **/\n blockNotebooks: AugmentedQuery<\n ApiType,\n () => Observable<ArgonPrimitivesDigestsNotebookDigest>,\n []\n >;\n /**\n * Check if the inherent was included\n **/\n inherentIncluded: AugmentedQuery<ApiType, () => Observable<bool>, []>;\n /**\n * List of last few notebook details by notary. The bool is whether the notebook is eligible\n * for votes (received at correct tick and audit passed)\n **/\n lastNotebookDetailsByNotary: AugmentedQuery<\n ApiType,\n (\n arg: u32 | AnyNumber | Uint8Array,\n ) => Observable<\n Vec<ITuple<[ArgonPrimitivesNotaryNotaryNotebookKeyDetails, bool]>>\n >,\n [u32]\n >;\n /**\n * Notaries ready to start reprocessing at a given notebook number\n **/\n lockedNotaryReadyForReprocess: AugmentedQuery<\n ApiType,\n (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>,\n [u32]\n >;\n /**\n * Notaries locked for failing audits\n **/\n notariesLockedForFailedAudit: AugmentedQuery<\n ApiType,\n (\n arg: u32 | AnyNumber | Uint8Array,\n ) => Observable<\n Option<ITuple<[u32, u64, ArgonNotaryAuditErrorVerifyError]>>\n >,\n [u32]\n >;\n /**\n * Double storage map of notary id + notebook # to the change root\n **/\n notebookChangedAccountsRootByNotary: AugmentedQuery<\n ApiType,\n (\n arg1: u32 | AnyNumber | Uint8Array,\n arg2: u32 | AnyNumber | Uint8Array,\n ) => Observable<Option<H256>>,\n [u32, u32]\n >;\n };\n ownership: {\n /**\n * The Balances pallet example of storing the balance of an account.\n *\n * # Example\n *\n * ```nocompile\n * impl pallet_balances::Config for Runtime {\n * type AccountStore = StorageMapShim<Self::Account<Runtime>, frame_system::Provider<Runtime>, AccountId, Self::AccountData<Balance>>\n * }\n * ```\n *\n * You can also store the balance of an account in the `System` pallet.\n *\n * # Example\n *\n * ```nocompile\n * impl pallet_balances::Config for Runtime {\n * type AccountStore = System\n * }\n * ```\n *\n * But this comes with tradeoffs, storing account balances in the system pallet stores\n * `frame_system` data alongside the account data contrary to storing account balances in the\n * `Balances` pallet, which uses a `StorageMap` to store balances data only.\n * NOTE: This is only used in the case that this pallet is used to store balances.\n **/\n account: AugmentedQuery<\n ApiType,\n (\n arg: AccountId32 | string | Uint8Array,\n ) => Observable<PalletBalancesAccountData>,\n [AccountId32]\n >;\n /**\n * Freeze locks on account balances.\n **/\n freezes: AugmentedQuery<\n ApiType,\n (\n arg: AccountId32 | string | Uint8Array,\n ) => Observable<Vec<FrameSupportTokensMiscIdAmountRuntimeFreezeReason>>,\n [AccountId32]\n >;\n /**\n * Holds on account balances.\n **/\n holds: AugmentedQuery<\n ApiType,\n (\n arg: AccountId32 | string | Uint8Array,\n ) => Observable<Vec<FrameSupportTokensMiscIdAmountRuntimeHoldReason>>,\n [AccountId32]\n >;\n /**\n * The total units of outstanding deactivated balance in the system.\n **/\n inactiveIssuance: AugmentedQuery<ApiType, () => Observable<u128>, []>;\n /**\n * Any liquidity locks on some account balances.\n * NOTE: Should only be accessed when setting, changing and freeing a lock.\n *\n * Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`\n **/\n locks: AugmentedQuery<\n ApiType,\n (\n arg: AccountId32 | string | Uint8Array,\n ) => Observable<Vec<PalletBalancesBalanceLock>>,\n [AccountId32]\n >;\n /**\n * Named reserves on some account balances.\n *\n * Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`\n **/\n reserves: AugmentedQuery<\n ApiType,\n (\n arg: AccountId32 | string | Uint8Array,\n ) => Observable<Vec<PalletBalancesReserveData>>,\n [AccountId32]\n >;\n /**\n * The total units issued in the system.\n **/\n totalIssuance: AugmentedQuery<ApiType, () => Observable<u128>, []>;\n };\n priceIndex: {\n /**\n * Stores the active price index\n **/\n current: AugmentedQuery<\n ApiType,\n () => Observable<Option<PalletPriceIndexPriceIndex>>,\n []\n >;\n /**\n * The price index operator account\n **/\n operator: AugmentedQuery<\n ApiType,\n () => Observable<Option<AccountId32>>,\n []\n >;\n };\n proxy: {\n /**\n * The announcements made by the proxy (key).\n **/\n announcements: AugmentedQuery<\n ApiType,\n (\n arg: AccountId32 | string | Uint8Array,\n ) => Observable<ITuple<[Vec<PalletProxyAnnouncement>, u128]>>,\n [AccountId32]\n >;\n /**\n * The set of account proxies. Maps the account which has delegated to the accounts\n * which are being delegated to, together with the amount held on deposit.\n **/\n proxies: AugmentedQuery<\n ApiType,\n (\n arg: AccountId32 | string | Uint8Array,\n ) => Observable<ITuple<[Vec<PalletProxyProxyDefinition>, u128]>>,\n [AccountId32]\n >;\n };\n sudo: {\n /**\n * The `AccountId` of the sudo key.\n **/\n key: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []>;\n };\n system: {\n /**\n * The full account information for a particular account ID.\n **/\n account: AugmentedQuery<\n ApiType,\n (\n arg: AccountId32 | string | Uint8Array,\n ) => Observable<FrameSystemAccountInfo>,\n [AccountId32]\n >;\n /**\n * Total length (in bytes) for all extrinsics put together, for the current block.\n **/\n allExtrinsicsLen: AugmentedQuery<\n ApiType,\n () => Observable<Option<u32>>,\n []\n >;\n /**\n * `Some` if a code upgrade has been authorized.\n **/\n authorizedUpgrade: AugmentedQuery<\n ApiType,\n () => Observable<Option<FrameSystemCodeUpgradeAuthorization>>,\n []\n >;\n /**\n * Map of block numbers to block hashes.\n **/\n blockHash: AugmentedQuery<\n ApiType,\n (arg: u32 | AnyNumber | Uint8Array) => Observable<H256>,\n [u32]\n >;\n /**\n * The current weight for the block.\n **/\n blockWeight: AugmentedQuery<\n ApiType,\n () => Observable<FrameSupportDispatchPerDispatchClassWeight>,\n []\n >;\n /**\n * Digest of the current block, also part of the block header.\n **/\n digest: AugmentedQuery<ApiType, () => Observable<SpRuntimeDigest>, []>;\n /**\n * The number of events in the `Events<T>` list.\n **/\n eventCount: AugmentedQuery<ApiType, () => Observable<u32>, []>;\n /**\n * Events deposited for the current block.\n *\n * NOTE: The item is unbound and should therefore never be read on chain.\n * It could otherwise inflate the PoV size of a block.\n *\n * Events have a large in-memory size. Box the events to not go out-of-memory\n * just in case someone still reads them from within the runtime.\n **/\n events: AugmentedQuery<\n ApiType,\n () => Observable<Vec<FrameSystemEventRecord>>,\n []\n >;\n /**\n * Mapping between a topic (represented by T::Hash) and a vector of indexes\n * of events in the `<Events<T>>` list.\n *\n * All topic vectors have deterministic storage locations depending on the topic. This\n * allows light-clients to leverage the changes trie storage tracking mechanism and\n * in case of changes fetch the list of events of interest.\n *\n * The value has the type `(BlockNumberFor<T>, EventIndex)` because if we used only just\n * the `EventIndex` then in case if the topic has the same contents on the next block\n * no notification will be triggered thus the event might be lost.\n **/\n eventTopics: AugmentedQuery<\n ApiType,\n (\n arg: H256 | string | Uint8Array,\n ) => Observable<Vec<ITuple<[u32, u32]>>>,\n [H256]\n >;\n /**\n * The execution phase of the block.\n **/\n executionPhase: AugmentedQuery<\n ApiType,\n () => Observable<Option<FrameSystemPhase>>,\n []\n >;\n /**\n * Total extrinsics count for the current block.\n **/\n extrinsicCount: AugmentedQuery<\n ApiType,\n () => Observable<Option<u32>>,\n []\n >;\n /**\n * Extrinsics data for the current block (maps an extrinsic's index to its data).\n **/\n extrinsicData: AugmentedQuery<\n ApiType,\n (arg: u32 | AnyNumber | Uint8Array) => Observable<Bytes>,\n [u32]\n >;\n /**\n * Whether all inherents have been applied.\n **/\n inherentsApplied: AugmentedQuery<ApiType, () => Observable<bool>, []>;\n /**\n * Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened.\n **/\n lastRuntimeUpgrade: AugmentedQuery<\n ApiType,\n () => Observable<Option<FrameSystemLastRuntimeUpgradeInfo>>,\n []\n >;\n /**\n * The current block number being processed. Set by `execute_block`.\n **/\n number: AugmentedQuery<ApiType, () => Observable<u32>, []>;\n /**\n * Hash of the previous block.\n **/\n parentHash: AugmentedQuery<ApiType, () => Observable<H256>, []>;\n /**\n * True if we have upgraded so that AccountInfo contains three types of `RefCount`. False\n * (default) if not.\n **/\n upgradedToTripleRefCount: AugmentedQuery<\n ApiType,\n () => Observable<bool>,\n []\n >;\n /**\n * True if we have upgraded so that `type RefCount` is `u32`. False (default) if not.\n **/\n upgradedToU32RefCount: AugmentedQuery<\n ApiType,\n () => Observable<bool>,\n []\n >;\n };\n ticks: {\n currentTick: AugmentedQuery<ApiType, () => Observable<u64>, []>;\n genesisTick: AugmentedQuery<ApiType, () => Observable<u64>, []>;\n genesisTicker: AugmentedQuery<\n ApiType,\n () => Observable<ArgonPrimitivesTickTicker>,\n []\n >;\n previousTick: AugmentedQuery<ApiType, () => Observable<u64>, []>;\n /**\n * Blocks from the last 100 ticks. Trimmed in on_initialize.\n * NOTE: cannot include the current block hash until next block\n **/\n recentBlocksAtTicks: AugmentedQuery<\n ApiType,\n (arg: u64 | AnyNumber | Uint8Array) => Observable<Vec<H256>>,\n [u64]\n >;\n };\n timestamp: {\n /**\n * Whether the timestamp has been updated in this block.\n *\n * This value is updated to `true` upon successful submission of a timestamp by a node.\n * It is then checked at the end of each block execution in the `on_finalize` hook.\n **/\n didUpdate: AugmentedQuery<ApiType, () => Observable<bool>, []>;\n /**\n * The current time for the current block.\n **/\n now: AugmentedQuery<ApiType, () => Observable<u64>, []>;\n };\n tokenGateway: {\n /**\n * Assets supported by this instance of token gateway\n * A map of the token gateway asset id to the local asset id\n **/\n localAssets: AugmentedQuery<\n ApiType,\n (arg: H256 | string | Uint8Array) => Observable<Option<u32>>,\n [H256]\n >;\n /**\n * Assets that originate from this chain\n **/\n nativeAssets: AugmentedQuery<\n ApiType,\n (arg: u32 | AnyNumber | Uint8Array) => Observable<bool>,\n [u32]\n >;\n /**\n * The decimals used by the EVM counterpart of this asset\n **/\n precisions: AugmentedQuery<\n ApiType,\n (\n arg1: u32 | AnyNumber | Uint8Array,\n arg2:\n | IsmpHostStateMachine\n | { Evm: any }\n | { Polkadot: any }\n | { Kusama: any }\n | { Substrate: any }\n | { Tendermint: any }\n | string\n | Uint8Array,\n ) => Observable<Option<u8>>,\n [u32, IsmpHostStateMachine]\n >;\n /**\n * Assets supported by this instance of token gateway\n * A map of the local asset id to the token gateway asset id\n **/\n supportedAssets: AugmentedQuery<\n ApiType,\n (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<H256>>,\n [u32]\n >;\n /**\n * The token gateway adresses on different chains\n **/\n tokenGatewayAddresses: AugmentedQuery<\n ApiType,\n (\n arg:\n | IsmpHostStateMachine\n | { Evm: any }\n | { Polkadot: any }\n | { Kusama: any }\n | { Substrate: any }\n | { Tendermint: any }\n | string\n | Uint8Array,\n ) => Observable<Option<Bytes>>,\n [IsmpHostStateMachine]\n >;\n };\n transactionPayment: {\n nextFeeMultiplier: AugmentedQuery<ApiType, () => Observable<u128>, []>;\n storageVersion: AugmentedQuery<\n ApiType,\n () => Observable<PalletTransactionPaymentReleases>,\n []\n >;\n };\n txPause: {\n /**\n * The set of calls that are explicitly paused.\n **/\n pausedCalls: AugmentedQuery<\n ApiType,\n (\n arg:\n | ITuple<[Bytes, Bytes]>\n | [Bytes | string | Uint8Array, Bytes | string | Uint8Array],\n ) => Observable<Option<Null>>,\n [ITuple<[Bytes, Bytes]>]\n >;\n };\n vaults: {\n /**\n * Completion of bitcoin locks by bitcoin height. Funds are returned to the vault if\n * unlocked or used as the price of the bitcoin\n **/\n bitcoinLockCompletions: AugmentedQuery<\n ApiType,\n (arg: u64 | AnyNumber | Uint8Array) => Observable<Vec<u64>>,\n [u64]\n >;\n nextObligationId: AugmentedQuery<\n ApiType,\n () => Observable<Option<u64>>,\n []\n >;\n nextVaultId: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []>;\n /**\n * Obligation by id\n **/\n obligationsById: AugmentedQuery<\n ApiType,\n (\n arg: u64 | AnyNumber | Uint8Array,\n ) => Observable<Option<ArgonPrimitivesVaultObligation>>,\n [u64]\n >;\n /**\n * Pending terms that will be committed at the given block number (must be a minimum of 1 slot\n * change away)\n **/\n pendingTermsModificationsByTick: AugmentedQuery<\n ApiType,\n (arg: u64 | AnyNumber | Uint8Array) => Observable<Vec<u32>>,\n [u64]\n >;\n /**\n * Tracks revenue for the last 10 cohort frames for each vault\n **/\n trailingRevenueByVault: AugmentedQuery<\n ApiType,\n (\n arg: u32 | AnyNumber | Uint8Array,\n ) => Observable<Vec<PalletVaultsVaultRevenue>>,\n [u32]\n >;\n /**\n * Vaults by id\n **/\n vaultsById: AugmentedQuery<\n ApiType,\n (\n arg: u32 | AnyNumber | Uint8Array,\n ) => Observable<Option<ArgonPrimitivesVault>>,\n [u32]\n >;\n /**\n * Vault Bitcoin Xpub and current child counter by VaultId\n **/\n vaultXPubById: AugmentedQuery<\n ApiType,\n (\n arg: u32 | AnyNumber | Uint8Array,\n ) => Observable<\n Option<ITuple<[ArgonPrimitivesBitcoinBitcoinXPub, u32]>>\n >,\n [u32]\n >;\n };\n } // AugmentedQueries\n} // declare module\n","// Auto-generated via `yarn polkadot-types-from-chain`, do not edit\n/* eslint-disable */\n\n// import type lookup before we augment - in some environments\n// this is required to allow for ambient/previous definitions\nimport '@polkadot/api-base/types/submittable';\n\nimport type {\n ApiTypes,\n AugmentedSubmittable,\n SubmittableExtrinsic,\n SubmittableExtrinsicFunction,\n} from '@polkadot/api-base/types';\nimport type {\n BTreeMap,\n Bytes,\n Compact,\n Option,\n U8aFixed,\n Vec,\n bool,\n u128,\n u16,\n u32,\n u64,\n} from '@polkadot/types-codec';\nimport type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';\nimport type {\n AccountId32,\n Call,\n H256,\n MultiAddress,\n} from '@polkadot/types/interfaces/runtime';\nimport type {\n ArgonPrimitivesBitcoinCompressedBitcoinPubkey,\n ArgonPrimitivesBitcoinH256Le,\n ArgonPrimitivesBitcoinOpaqueBitcoinXpub,\n ArgonPrimitivesBlockSealRewardDestination,\n ArgonPrimitivesDomainZoneRecord,\n ArgonPrimitivesInherentsBitcoinUtxoSync,\n ArgonPrimitivesInherentsBlockSealInherent,\n ArgonPrimitivesNotaryNotaryMeta,\n ArgonPrimitivesNotebookSignedNotebookHeader,\n ArgonPrimitivesVaultVaultTerms,\n ArgonRuntimeOriginCaller,\n ArgonRuntimeProxyType,\n ArgonRuntimeSessionKeys,\n IsmpGrandpaAddStateMachine,\n IsmpHostStateMachine,\n IsmpMessagingCreateConsensusState,\n IsmpMessagingMessage,\n PalletBalancesAdjustmentDirection,\n PalletIsmpUtilsFundMessageParams,\n PalletIsmpUtilsUpdateConsensusState,\n PalletMultisigTimepoint,\n PalletPriceIndexPriceIndex,\n PalletTokenGatewayAssetRegistration,\n PalletTokenGatewayPrecisionUpdate,\n PalletTokenGatewayTeleportParams,\n PalletVaultsVaultConfig,\n SpConsensusGrandpaEquivocationProof,\n SpCoreVoid,\n SpWeightsWeightV2Weight,\n TokenGatewayPrimitivesGatewayAssetUpdate,\n} from '@polkadot/types/lookup';\n\nexport type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;\nexport type __SubmittableExtrinsic<ApiType extends ApiTypes> =\n SubmittableExtrinsic<ApiType>;\nexport type __SubmittableExtrinsicFunction<ApiType extends ApiTypes> =\n SubmittableExtrinsicFunction<ApiType>;\n\ndeclare module '@polkadot/api-base/types/submittable' {\n interface AugmentedSubmittables<ApiType extends ApiTypes> {\n balances: {\n /**\n * Burn the specified liquid free balance from the origin account.\n *\n * If the origin's account ends up below the existential deposit as a result\n * of the burn and `keep_alive` is false, the account will be reaped.\n *\n * Unlike sending funds to a _burn_ address, which merely makes the funds inaccessible,\n * this `burn` operation will reduce total issuance by the amount _burned_.\n **/\n burn: AugmentedSubmittable<\n (\n value: Compact<u128> | AnyNumber | Uint8Array,\n keepAlive: bool | boolean | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [Compact<u128>, bool]\n >;\n /**\n * Adjust the total issuance in a saturating way.\n *\n * Can only be called by root and always needs a positive `delta`.\n *\n * # Example\n **/\n forceAdjustTotalIssuance: AugmentedSubmittable<\n (\n direction:\n | PalletBalancesAdjustmentDirection\n | 'Increase'\n | 'Decrease'\n | number\n | Uint8Array,\n delta: Compact<u128> | AnyNumber | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [PalletBalancesAdjustmentDirection, Compact<u128>]\n >;\n /**\n * Set the regular balance of a given account.\n *\n * The dispatch origin for this call is `root`.\n **/\n forceSetBalance: AugmentedSubmittable<\n (\n who:\n | MultiAddress\n | { Id: any }\n | { Index: any }\n | { Raw: any }\n | { Address32: any }\n | { Address20: any }\n | string\n | Uint8Array,\n newFree: Compact<u128> | AnyNumber | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [MultiAddress, Compact<u128>]\n >;\n /**\n * Exactly as `transfer_allow_death`, except the origin must be root and the source account\n * may be specified.\n **/\n forceTransfer: AugmentedSubmittable<\n (\n source:\n | MultiAddress\n | { Id: any }\n | { Index: any }\n | { Raw: any }\n | { Address32: any }\n | { Address20: any }\n | string\n | Uint8Array,\n dest:\n | MultiAddress\n | { Id: any }\n | { Index: any }\n | { Raw: any }\n | { Address32: any }\n | { Address20: any }\n | string\n | Uint8Array,\n value: Compact<u128> | AnyNumber | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [MultiAddress, MultiAddress, Compact<u128>]\n >;\n /**\n * Unreserve some balance from a user by force.\n *\n * Can only be called by ROOT.\n **/\n forceUnreserve: AugmentedSubmittable<\n (\n who:\n | MultiAddress\n | { Id: any }\n | { Index: any }\n | { Raw: any }\n | { Address32: any }\n | { Address20: any }\n | string\n | Uint8Array,\n amount: u128 | AnyNumber | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [MultiAddress, u128]\n >;\n /**\n * Transfer the entire transferable balance from the caller account.\n *\n * NOTE: This function only attempts to transfer _transferable_ balances. This means that\n * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be\n * transferred by this function. To ensure that this function results in a killed account,\n * you might need to prepare the account by removing any reference counters, storage\n * deposits, etc...\n *\n * The dispatch origin of this call must be Signed.\n *\n * - `dest`: The recipient of the transfer.\n * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all\n * of the funds the account has, causing the sender account to be killed (false), or\n * transfer everything except at least the existential deposit, which will guarantee to\n * keep the sender account alive (true).\n **/\n transferAll: AugmentedSubmittable<\n (\n dest:\n | MultiAddress\n | { Id: any }\n | { Index: any }\n | { Raw: any }\n | { Address32: any }\n | { Address20: any }\n | string\n | Uint8Array,\n keepAlive: bool | boolean | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [MultiAddress, bool]\n >;\n /**\n * Transfer some liquid free balance to another account.\n *\n * `transfer_allow_death` will set the `FreeBalance` of the sender and receiver.\n * If the sender's account is below the existential deposit as a result\n * of the transfer, the account will be reaped.\n *\n * The dispatch origin for this call must be `Signed` by the transactor.\n **/\n transferAllowDeath: AugmentedSubmittable<\n (\n dest:\n | MultiAddress\n | { Id: any }\n | { Index: any }\n | { Raw: any }\n | { Address32: any }\n | { Address20: any }\n | string\n | Uint8Array,\n value: Compact<u128> | AnyNumber | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [MultiAddress, Compact<u128>]\n >;\n /**\n * Same as the [`transfer_allow_death`] call, but with a check that the transfer will not\n * kill the origin account.\n *\n * 99% of the time you want [`transfer_allow_death`] instead.\n *\n * [`transfer_allow_death`]: struct.Pallet.html#method.transfer\n **/\n transferKeepAlive: AugmentedSubmittable<\n (\n dest:\n | MultiAddress\n | { Id: any }\n | { Index: any }\n | { Raw: any }\n | { Address32: any }\n | { Address20: any }\n | string\n | Uint8Array,\n value: Compact<u128> | AnyNumber | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [MultiAddress, Compact<u128>]\n >;\n /**\n * Upgrade a specified account.\n *\n * - `origin`: Must be `Signed`.\n * - `who`: The account to be upgraded.\n *\n * This will waive the transaction fee if at least all but 10% of the accounts needed to\n * be upgraded. (We let some not have to be upgraded just in order to allow for the\n * possibility of churn).\n **/\n upgradeAccounts: AugmentedSubmittable<\n (\n who: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[],\n ) => SubmittableExtrinsic<ApiType>,\n [Vec<AccountId32>]\n >;\n };\n bitcoinLocks: {\n adminModifyMinimumLockedSats: AugmentedSubmittable<\n (\n satoshis: u64 | AnyNumber | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [u64]\n >;\n /**\n * Submitted by a Vault operator to cosign the release of a bitcoin utxo. The Bitcoin owner\n * release fee will be burned, and the obligation will be allowed to expire without\n * penalty.\n *\n * This is submitted as a no-fee transaction off chain to allow keys to remain in cold\n * wallets.\n **/\n cosignRelease: AugmentedSubmittable<\n (\n utxoId: u64 | AnyNumber | Uint8Array,\n signature: Bytes | string | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [u64, Bytes]\n >;\n /**\n * Initialize a bitcoin lock. This will create a LockedBitcoin for the submitting account\n * and log the Bitcoin Script hash to Events.\n *\n * The pubkey submitted here will be used to create a script pubkey that will be used in a\n * timelock multisig script to lock the bitcoin.\n *\n * NOTE: A \"lock-er\" must sends btc to the cosign UTXO address in order to \"complete\" the\n * LockedBitcoin and be added to the Bitcoin Mint line.\n **/\n initialize: AugmentedSubmittable<\n (\n vaultId: u32 | AnyNumber | Uint8Array,\n satoshis: Compact<u64> | AnyNumber | Uint8Array,\n bitcoinPubkey:\n | ArgonPrimitivesBitcoinCompressedBitcoinPubkey\n | string\n | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [u32, Compact<u64>, ArgonPrimitivesBitcoinCompressedBitcoinPubkey]\n >;\n /**\n * Submitted by a Bitcoin holder to trigger the release of their Utxo out of the cosign\n * script. A transaction spending the UTXO should be pre-created so that the sighash\n * can be submitted here. The vault operator will have 10 days to counter-sign the\n * transaction. It will be published with the public key as a BitcoinUtxoCosigned Event.\n *\n * Owner must submit a script pubkey and also a fee to pay to the bitcoin network.\n **/\n requestRelease: AugmentedSubmittable<\n (\n utxoId: u64 | AnyNumber | Uint8Array,\n toScriptPubkey: Bytes | string | Uint8Array,\n bitcoinNetworkFee: u64 | AnyNumber | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [u64, Bytes, u64]\n >;\n };\n bitcoinUtxos: {\n /**\n * Sets the most recent confirmed bitcoin block height (only executable by the Oracle\n * Operator account)\n *\n * # Arguments\n * * `bitcoin_height` - the latest bitcoin block height to be confirmed\n **/\n setConfirmedBlock: AugmentedSubmittable<\n (\n bitcoinHeight: u64 | AnyNumber | Uint8Array,\n bitcoinBlockHash: ArgonPrimitivesBitcoinH256Le | string | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [u64, ArgonPrimitivesBitcoinH256Le]\n >;\n /**\n * Sets the oracle operator account id (only executable by the Root account)\n *\n * # Arguments\n * * `account_id` - the account id of the operator\n **/\n setOperator: AugmentedSubmittable<\n (\n accountId: AccountId32 | string | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [AccountId32]\n >;\n /**\n * Submitted when a bitcoin UTXO has been moved or confirmed\n **/\n sync: AugmentedSubmittable<\n (\n utxoSync:\n | ArgonPrimitivesInherentsBitcoinUtxoSync\n | { spent?: any; verified?: any; invalid?: any; syncToBlock?: any }\n | string\n | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [ArgonPrimitivesInherentsBitcoinUtxoSync]\n >;\n };\n blockRewards: {\n setBlockRewardsPaused: AugmentedSubmittable<\n (paused: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>,\n [bool]\n >;\n };\n blockSeal: {\n apply: AugmentedSubmittable<\n (\n seal:\n | ArgonPrimitivesInherentsBlockSealInherent\n | { Vote: any }\n | { Compute: any }\n | string\n | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [ArgonPrimitivesInherentsBlockSealInherent]\n >;\n };\n blockSealSpec: {\n configure: AugmentedSubmittable<\n (\n voteMinimum: Option<u128> | null | Uint8Array | u128 | AnyNumber,\n computeDifficulty:\n | Option<u128>\n | null\n | Uint8Array\n | u128\n | AnyNumber,\n ) => SubmittableExtrinsic<ApiType>,\n [Option<u128>, Option<u128>]\n >;\n };\n chainTransfer: {\n sendToLocalchain: AugmentedSubmittable<\n (\n amount: Compact<u128> | AnyNumber | Uint8Array,\n notaryId: u32 | AnyNumber | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [Compact<u128>, u32]\n >;\n };\n domains: {\n setZoneRecord: AugmentedSubmittable<\n (\n domainHash: H256 | string | Uint8Array,\n zoneRecord:\n | ArgonPrimitivesDomainZoneRecord\n | { paymentAccount?: any; notaryId?: any; versions?: any }\n | string\n | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [H256, ArgonPrimitivesDomainZoneRecord]\n >;\n };\n grandpa: {\n /**\n * Note that the current authority set of the GRANDPA finality gadget has stalled.\n *\n * This will trigger a forced authority set change at the beginning of the next session, to\n * be enacted `delay` blocks after that. The `delay` should be high enough to safely assume\n * that the block signalling the forced change will not be re-orged e.g. 1000 blocks.\n * The block production rate (which may be slowed down because of finality lagging) should\n * be taken into account when choosing the `delay`. The GRANDPA voters based on the new\n * authority will start voting on top of `best_finalized_block_number` for new finalized\n * blocks. `best_finalized_block_number` should be the highest of the latest finalized\n * block of all validators of the new authority set.\n *\n * Only callable by root.\n **/\n noteStalled: AugmentedSubmittable<\n (\n delay: u32 | AnyNumber | Uint8Array,\n bestFinalizedBlockNumber: u32 | AnyNumber | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [u32, u32]\n >;\n /**\n * Report voter equivocation/misbehavior. This method will verify the\n * equivocation proof and validate the given key ownership proof\n * against the extracted offender. If both are valid, the offence\n * will be reported.\n **/\n reportEquivocation: AugmentedSubmittable<\n (\n equivocationProof:\n | SpConsensusGrandpaEquivocationProof\n | { setId?: any; equivocation?: any }\n | string\n | Uint8Array,\n keyOwnerProof: SpCoreVoid | null,\n ) => SubmittableExtrinsic<ApiType>,\n [SpConsensusGrandpaEquivocationProof, SpCoreVoid]\n >;\n /**\n * Report voter equivocation/misbehavior. This method will verify the\n * equivocation proof and validate the given key ownership proof\n * against the extracted offender. If both are valid, the offence\n * will be reported.\n *\n * This extrinsic must be called unsigned and it is expected that only\n * block authors will call it (validated in `ValidateUnsigned`), as such\n * if the block author is defined it will be defined as the equivocation\n * reporter.\n **/\n reportEquivocationUnsigned: AugmentedSubmittable<\n (\n equivocationProof:\n | SpConsensusGrandpaEquivocationProof\n | { setId?: any; equivocation?: any }\n | string\n | Uint8Array,\n keyOwnerProof: SpCoreVoid | null,\n ) => SubmittableExtrinsic<ApiType>,\n [SpConsensusGrandpaEquivocationProof, SpCoreVoid]\n >;\n };\n ismp: {\n /**\n * Create a consensus client, using a subjectively chosen consensus state. This can also\n * be used to overwrite an existing consensus state. The dispatch origin for this\n * call must be `T::AdminOrigin`.\n *\n * - `message`: [`CreateConsensusState`] struct.\n *\n * Emits [`Event::ConsensusClientCreated`] if successful.\n **/\n createConsensusClient: AugmentedSubmittable<\n (\n message:\n | IsmpMessagingCreateConsensusState\n | {\n consensusState?: any;\n consensusClientId?: any;\n consensusStateId?: any;\n unbondingPeriod?: any;\n challengePeriods?: any;\n stateMachineCommitments?: any;\n }\n | string\n | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [IsmpMessagingCreateConsensusState]\n >;\n /**\n * Add more funds to a message (request or response) to be used for delivery and execution.\n *\n * Should not be called on a message that has been completed (delivered or timed-out) as\n * those funds will be lost forever.\n **/\n fundMessage: AugmentedSubmittable<\n (\n message:\n | PalletIsmpUtilsFundMessageParams\n | { commitment?: any; amount?: any }\n | string\n | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [PalletIsmpUtilsFundMessageParams]\n >;\n /**\n * Execute the provided batch of ISMP messages, this will short-circuit and revert if any\n * of the provided messages are invalid. This is an unsigned extrinsic that permits anyone\n * execute ISMP messages for free, provided they have valid proofs and the messages have\n * not been previously processed.\n *\n * The dispatch origin for this call must be an unsigned one.\n *\n * - `messages`: the messages to handle or process.\n *\n * Emits different message events based on the Message received if successful.\n **/\n handleUnsigned: AugmentedSubmittable<\n (\n messages:\n | Vec<IsmpMessagingMessage>\n | (\n | IsmpMessagingMessage\n | { Consensus: any }\n | { FraudProof: any }\n | { Request: any }\n | { Response: any }\n | { Timeout: any }\n | string\n | Uint8Array\n )[],\n ) => SubmittableExtrinsic<ApiType>,\n [Vec<IsmpMessagingMessage>]\n >;\n /**\n * Modify the unbonding period and challenge period for a consensus state.\n * The dispatch origin for this call must be `T::AdminOrigin`.\n *\n * - `message`: `UpdateConsensusState` struct.\n **/\n updateConsensusState: AugmentedSubmittable<\n (\n message:\n | PalletIsmpUtilsUpdateConsensusState\n | {\n consensusStateId?: any;\n unbondingPeriod?: any;\n challengePeriods?: any;\n }\n | string\n | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [PalletIsmpUtilsUpdateConsensusState]\n >;\n };\n ismpGrandpa: {\n /**\n * Add some a state machine to the list of supported state machines\n **/\n addStateMachines: AugmentedSubmittable<\n (\n newStateMachines:\n | Vec<IsmpGrandpaAddStateMachine>\n | (\n | IsmpGrandpaAddStateMachine\n | { stateMachine?: any; slotDuration?: any }\n | string\n | Uint8Array\n )[],\n ) => SubmittableExtrinsic<ApiType>,\n [Vec<IsmpGrandpaAddStateMachine>]\n >;\n /**\n * Remove a state machine from the list of supported state machines\n **/\n removeStateMachines: AugmentedSubmittable<\n (\n stateMachines:\n | Vec<IsmpHostStateMachine>\n | (\n | IsmpHostStateMachine\n | { Evm: any }\n | { Polkadot: any }\n | { Kusama: any }\n | { Substrate: any }\n | { Tendermint: any }\n | string\n | Uint8Array\n )[],\n ) => SubmittableExtrinsic<ApiType>,\n [Vec<IsmpHostStateMachine>]\n >;\n };\n liquidityPools: {\n /**\n * Bond argons to a Vault's next liquidity pool, tied to the next MiningSlot cohort (aka,\n * tomorrow after noon EST). The amount bonded to the pool cannot exceed 1/10th of the\n * activated securitization for the vault.\n *\n * The bonded argons and profits will be automatically rolled over to the next fund up to\n * the max securitization activated.\n *\n * - `origin`: The account that is joining the fund\n * - `vault_id`: The vault id that the account would like to join a fund for\n * - `amount`: The amount of argons to contribute to the fund. If you change this amount,\n * it will just add the incremental amount\n **/\n bondArgons: AugmentedSubmittable<\n (\n vaultId: u32 | AnyNumber | Uint8Array,\n amount: u128 | AnyNumber | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [u32, u128]\n >;\n /**\n * Allows a user to remove their bonded argons from the fund after the hold is released\n * (once cohort slot period is complete).\n **/\n unbondArgons: AugmentedSubmittable<\n (\n vaultId: u32 | AnyNumber | Uint8Array,\n cohortId: u64 | AnyNumber | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [u32, u64]\n >;\n };\n miningSlot: {\n /**\n * Submit a bid for a mining slot in the next cohort. Once all spots are filled in the next\n * cohort, a bidder can be supplanted by supplying a higher bid.\n *\n * Each slot has `MaxCohortSize` spots available.\n *\n * To be eligible for a slot, you must have the required ownership tokens (argonots) in\n * this account. The required amount is calculated as a percentage of the total ownership\n * tokens in the network. This percentage is adjusted before the beginning of each slot.\n *\n * If your bid is no longer winning, a `SlotBidderDropped` event will be emitted. By\n * monitoring for this event, you will be able to ensure your bid is accepted.\n *\n * NOTE: bidding for each slot will be closed at a random block within\n * `mining_config.ticks_before_bid_end_for_vrf_close` blocks of the slot end time.\n *\n * The slot duration can be calculated as `BlocksBetweenSlots * MaxMiners / MaxCohortSize`.\n *\n * Parameters:\n * - `bid`: The amount of argons to bid\n * - `reward_destination`: The account_id for the mining rewards, or `Owner` for the\n * submitting user.\n * - `keys`: The session \"hot\" keys for the slot (BlockSealAuthorityId and GrandpaId).\n * - `mining_account_id`: This account_id allows you to operate as this miner account id,\n * but use funding (argonots and bid) from the submitting account\n **/\n bid: AugmentedSubmittable<\n (\n bid: u128 | AnyNumber | Uint8Array,\n rewardDestination:\n | ArgonPrimitivesBlockSealRewardDestination\n | { Owner: any }\n | { Account: any }\n | string\n | Uint8Array,\n keys:\n | ArgonRuntimeSessionKeys\n | { grandpa?: any; blockSealAuthority?: any }\n | string\n | Uint8Array,\n miningAccountId:\n | Option<AccountId32>\n | null\n | Uint8Array\n | AccountId32\n | string,\n ) => SubmittableExtrinsic<ApiType>,\n [\n u128,\n ArgonPrimitivesBlockSealRewardDestination,\n ArgonRuntimeSessionKeys,\n Option<AccountId32>,\n ]\n >;\n /**\n * Admin function to update the mining slot delay.\n **/\n configureMiningSlotDelay: AugmentedSubmittable<\n (\n miningSlotDelay: Option<u64> | null | Uint8Array | u64 | AnyNumber,\n ticksBeforeBidEndForVrfClose:\n | Option<u64>\n | null\n | Uint8Array\n | u64\n | AnyNumber,\n ) => SubmittableExtrinsic<ApiType>,\n [Option<u64>, Option<u64>]\n >;\n };\n mint: {};\n multisig: {\n /**\n * Register approval for a dispatch to be made from a deterministic composite account if\n * approved by a total of `threshold - 1` of `other_signatories`.\n *\n * Payment: `DepositBase` will be reserved if this is the first approval, plus\n * `threshold` times `DepositFactor`. It is returned once this dispatch happens or\n * is cancelled.\n *\n * The dispatch origin for this call must be _Signed_.\n *\n * - `threshold`: The total number of approvals for this dispatch before it is executed.\n * - `other_signatories`: The accounts (other than the sender) who can approve this\n * dispatch. May not be empty.\n * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is\n * not the first approval, then it must be `Some`, with the timepoint (block number and\n * transaction index) of the first approval transaction.\n * - `call_hash`: The hash of the call to be executed.\n *\n * NOTE: If this is the final approval, you will want to use `as_multi` instead.\n *\n * ## Complexity\n * - `O(S)`.\n * - Up to one balance-reserve or unreserve operation.\n * - One passthrough operation, one insert, both `O(S)` where `S` is the number of\n * signatories. `S` is capped by `MaxSignatories`, with weight being proportional.\n * - One encode & hash, both of complexity `O(S)`.\n * - Up to one binary search and insert (`O(logS + S)`).\n * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove.\n * - One event.\n * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit\n * taken for its lifetime of `DepositBase + threshold * DepositFactor`.\n **/\n approveAsMulti: AugmentedSubmittable<\n (\n threshold: u16 | AnyNumber | Uint8Array,\n otherSignatories:\n | Vec<AccountId32>\n | (AccountId32 | string | Uint8Array)[],\n maybeTimepoint:\n | Option<PalletMultisigTimepoint>\n | null\n | Uint8Array\n | PalletMultisigTimepoint\n | { height?: any; index?: any }\n | string,\n callHash: U8aFixed | string | Uint8Array,\n maxWeight:\n | SpWeightsWeightV2Weight\n | { refTime?: any; proofSize?: any }\n | string\n | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [\n u16,\n Vec<AccountId32>,\n Option<PalletMultisigTimepoint>,\n U8aFixed,\n SpWeightsWeightV2Weight,\n ]\n >;\n /**\n * Register approval for a dispatch to be made from a deterministic composite account if\n * approved by a total of `threshold - 1` of `other_signatories`.\n *\n * If there are enough, then dispatch the call.\n *\n * Payment: `DepositBase` will be reserved if this is the first approval, plus\n * `threshold` times `DepositFactor`. It is returned once this dispatch happens or\n * is cancelled.\n *\n * The dispatch origin for this call must be _Signed_.\n *\n * - `threshold`: The total number of approvals for this dispatch before it is executed.\n * - `other_signatories`: The accounts (other than the sender) who can approve this\n * dispatch. May not be empty.\n * - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is\n * not the first approval, then it must be `Some`, with the timepoint (block number and\n * transaction index) of the first approval transaction.\n * - `call`: The call to be executed.\n *\n * NOTE: Unless this is the final approval, you will generally want to use\n * `approve_as_multi` instead, since it only requires a hash of the call.\n *\n * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise\n * on success, result is `Ok` and the result from the interior call, if it was executed,\n * may be found in the deposited `MultisigExecuted` event.\n *\n * ## Complexity\n * - `O(S + Z + Call)`.\n * - Up to one balance-reserve or unreserve operation.\n * - One passthrough operation, one insert, both `O(S)` where `S` is the number of\n * signatories. `S` is capped by `MaxSignatories`, with weight being proportional.\n * - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len.\n * - One encode & hash, both of complexity `O(S)`.\n * - Up to one binary search and insert (`O(logS + S)`).\n * - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove.\n * - One event.\n * - The weight of the `call`.\n * - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit\n * taken for its lifetime of `DepositBase + threshold * DepositFactor`.\n **/\n asMulti: AugmentedSubmittable<\n (\n threshold: u16 | AnyNumber | Uint8Array,\n otherSignatories:\n | Vec<AccountId32>\n | (AccountId32 | string | Uint8Array)[],\n maybeTimepoint:\n | Option<PalletMultisigTimepoint>\n | null\n | Uint8Array\n | PalletMultisigTimepoint\n | { height?: any; index?: any }\n | string,\n call: Call | IMethod | string | Uint8Array,\n maxWeight:\n | SpWeightsWeightV2Weight\n | { refTime?: any; proofSize?: any }\n | string\n | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [\n u16,\n Vec<AccountId32>,\n Option<PalletMultisigTimepoint>,\n Call,\n SpWeightsWeightV2Weight,\n ]\n >;\n /**\n * Immediately dispatch a multi-signature call using a single approval from the caller.\n *\n * The dispatch origin for this call must be _Signed_.\n *\n * - `other_signatories`: The accounts (other than the sender) who are part of the\n * multi-signature, but do not participate in the approval process.\n * - `call`: The call to be executed.\n *\n * Result is equivalent to the dispatched result.\n *\n * ## Complexity\n * O(Z + C) where Z is the length of the call and C its execution weight.\n **/\n asMultiThreshold1: AugmentedSubmittable<\n (\n otherSignatories:\n | Vec<AccountId32>\n | (AccountId32 | string | Uint8Array)[],\n call: Call | IMethod | string | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [Vec<AccountId32>, Call]\n >;\n /**\n * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously\n * for this operation will be unreserved on success.\n *\n * The dispatch origin for this call must be _Signed_.\n *\n * - `threshold`: The total number of approvals for this dispatch before it is executed.\n * - `other_signatories`: The accounts (other than the sender) who can approve this\n * dispatch. May not be empty.\n * - `timepoint`: The timepoint (block number and transaction index) of the first approval\n * transaction for this dispatch.\n * - `call_hash`: The hash of the call to be executed.\n *\n * ## Complexity\n * - `O(S)`.\n * - Up to one balance-reserve or unreserve operation.\n * - One passthrough operation, one insert, both `O(S)` where `S` is the number of\n * signatories. `S` is capped by `MaxSignatories`, with weight being proportional.\n * - One encode & hash, both of complexity `O(S)`.\n * - One event.\n * - I/O: 1 read `O(S)`, one remove.\n * - Storage: removes one item.\n **/\n cancelAsMulti: AugmentedSubmittable<\n (\n threshold: u16 | AnyNumber | Uint8Array,\n otherSignatories:\n | Vec<AccountId32>\n | (AccountId32 | string | Uint8Array)[],\n timepoint:\n | PalletMultisigTimepoint\n | { height?: any; index?: any }\n | string\n | Uint8Array,\n callHash: U8aFixed | string | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [u16, Vec<AccountId32>, PalletMultisigTimepoint, U8aFixed]\n >;\n };\n notaries: {\n activate: AugmentedSubmittable<\n (\n operatorAccount: AccountId32 | string | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [AccountId32]\n >;\n propose: AugmentedSubmittable<\n (\n meta:\n | ArgonPrimitivesNotaryNotaryMeta\n | { name?: any; public?: any; hosts?: any }\n | string\n | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [ArgonPrimitivesNotaryNotaryMeta]\n >;\n /**\n * Update the metadata of a notary, to be effective at the given tick height, which must be\n * >= MetaChangesTickDelay ticks in the future.\n **/\n update: AugmentedSubmittable<\n (\n notaryId: Compact<u32> | AnyNumber | Uint8Array,\n meta:\n | ArgonPrimitivesNotaryNotaryMeta\n | { name?: any; public?: any; hosts?: any }\n | string\n | Uint8Array,\n effectiveTick: Compact<u64> | AnyNumber | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [Compact<u32>, ArgonPrimitivesNotaryNotaryMeta, Compact<u64>]\n >;\n };\n notebook: {\n submit: AugmentedSubmittable<\n (\n notebooks:\n | Vec<ArgonPrimitivesNotebookSignedNotebookHeader>\n | (\n | ArgonPrimitivesNotebookSignedNotebookHeader\n | { header?: any; signature?: any }\n | string\n | Uint8Array\n )[],\n ) => SubmittableExtrinsic<ApiType>,\n [Vec<ArgonPrimitivesNotebookSignedNotebookHeader>]\n >;\n unlock: AugmentedSubmittable<\n (\n notaryId: u32 | AnyNumber | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [u32]\n >;\n };\n ownership: {\n /**\n * Burn the specified liquid free balance from the origin account.\n *\n * If the origin's account ends up below the existential deposit as a result\n * of the burn and `keep_alive` is false, the account will be reaped.\n *\n * Unlike sending funds to a _burn_ address, which merely makes the funds inaccessible,\n * this `burn` operation will reduce total issuance by the amount _burned_.\n **/\n burn: AugmentedSubmittable<\n (\n value: Compact<u128> | AnyNumber | Uint8Array,\n keepAlive: bool | boolean | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [Compact<u128>, bool]\n >;\n /**\n * Adjust the total issuance in a saturating way.\n *\n * Can only be called by root and always needs a positive `delta`.\n *\n * # Example\n **/\n forceAdjustTotalIssuance: AugmentedSubmittable<\n (\n direction:\n | PalletBalancesAdjustmentDirection\n | 'Increase'\n | 'Decrease'\n | number\n | Uint8Array,\n delta: Compact<u128> | AnyNumber | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [PalletBalancesAdjustmentDirection, Compact<u128>]\n >;\n /**\n * Set the regular balance of a given account.\n *\n * The dispatch origin for this call is `root`.\n **/\n forceSetBalance: AugmentedSubmittable<\n (\n who:\n | MultiAddress\n | { Id: any }\n | { Index: any }\n | { Raw: any }\n | { Address32: any }\n | { Address20: any }\n | string\n | Uint8Array,\n newFree: Compact<u128> | AnyNumber | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [MultiAddress, Compact<u128>]\n >;\n /**\n * Exactly as `transfer_allow_death`, except the origin must be root and the source account\n * may be specified.\n **/\n forceTransfer: AugmentedSubmittable<\n (\n source:\n | MultiAddress\n | { Id: any }\n | { Index: any }\n | { Raw: any }\n | { Address32: any }\n | { Address20: any }\n | string\n | Uint8Array,\n dest:\n | MultiAddress\n | { Id: any }\n | { Index: any }\n | { Raw: any }\n | { Address32: any }\n | { Address20: any }\n | string\n | Uint8Array,\n value: Compact<u128> | AnyNumber | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [MultiAddress, MultiAddress, Compact<u128>]\n >;\n /**\n * Unreserve some balance from a user by force.\n *\n * Can only be called by ROOT.\n **/\n forceUnreserve: AugmentedSubmittable<\n (\n who:\n | MultiAddress\n | { Id: any }\n | { Index: any }\n | { Raw: any }\n | { Address32: any }\n | { Address20: any }\n | string\n | Uint8Array,\n amount: u128 | AnyNumber | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [MultiAddress, u128]\n >;\n /**\n * Transfer the entire transferable balance from the caller account.\n *\n * NOTE: This function only attempts to transfer _transferable_ balances. This means that\n * any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be\n * transferred by this function. To ensure that this function results in a killed account,\n * you might need to prepare the account by removing any reference counters, storage\n * deposits, etc...\n *\n * The dispatch origin of this call must be Signed.\n *\n * - `dest`: The recipient of the transfer.\n * - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all\n * of the funds the account has, causing the sender account to be killed (false), or\n * transfer everything except at least the existential deposit, which will guarantee to\n * keep the sender account alive (true).\n **/\n transferAll: AugmentedSubmittable<\n (\n dest:\n | MultiAddress\n | { Id: any }\n | { Index: any }\n | { Raw: any }\n | { Address32: any }\n | { Address20: any }\n | string\n | Uint8Array,\n keepAlive: bool | boolean | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [MultiAddress, bool]\n >;\n /**\n * Transfer some liquid free balance to another account.\n *\n * `transfer_allow_death` will set the `FreeBalance` of the sender and receiver.\n * If the sender's account is below the existential deposit as a result\n * of the transfer, the account will be reaped.\n *\n * The dispatch origin for this call must be `Signed` by the transactor.\n **/\n transferAllowDeath: AugmentedSubmittable<\n (\n dest:\n | MultiAddress\n | { Id: any }\n | { Index: any }\n | { Raw: any }\n | { Address32: any }\n | { Address20: any }\n | string\n | Uint8Array,\n value: Compact<u128> | AnyNumber | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [MultiAddress, Compact<u128>]\n >;\n /**\n * Same as the [`transfer_allow_death`] call, but with a check that the transfer will not\n * kill the origin account.\n *\n * 99% of the time you want [`transfer_allow_death`] instead.\n *\n * [`transfer_allow_death`]: struct.Pallet.html#method.transfer\n **/\n transferKeepAlive: AugmentedSubmittable<\n (\n dest:\n | MultiAddress\n | { Id: any }\n | { Index: any }\n | { Raw: any }\n | { Address32: any }\n | { Address20: any }\n | string\n | Uint8Array,\n value: Compact<u128> | AnyNumber | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [MultiAddress, Compact<u128>]\n >;\n /**\n * Upgrade a specified account.\n *\n * - `origin`: Must be `Signed`.\n * - `who`: The account to be upgraded.\n *\n * This will waive the transaction fee if at least all but 10% of the accounts needed to\n * be upgraded. (We let some not have to be upgraded just in order to allow for the\n * possibility of churn).\n **/\n upgradeAccounts: AugmentedSubmittable<\n (\n who: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[],\n ) => SubmittableExtrinsic<ApiType>,\n [Vec<AccountId32>]\n >;\n };\n priceIndex: {\n /**\n * Sets the operator account id (only executable by the Root account)\n *\n * # Arguments\n * * `account_id` - the account id of the operator\n **/\n setOperator: AugmentedSubmittable<\n (\n accountId: AccountId32 | string | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [AccountId32]\n >;\n /**\n * Submit the latest price index. Only valid for the configured operator account\n **/\n submit: AugmentedSubmittable<\n (\n index:\n | PalletPriceIndexPriceIndex\n | {\n btcUsdPrice?: any;\n argonotUsdPrice?: any;\n argonUsdPrice?: any;\n argonUsdTargetPrice?: any;\n argonTimeWeightedAverageLiquidity?: any;\n tick?: any;\n }\n | string\n | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [PalletPriceIndexPriceIndex]\n >;\n };\n proxy: {\n /**\n * Register a proxy account for the sender that is able to make calls on its behalf.\n *\n * The dispatch origin for this call must be _Signed_.\n *\n * Parameters:\n * - `proxy`: The account that the `caller` would like to make a proxy.\n * - `proxy_type`: The permissions allowed for this proxy account.\n * - `delay`: The announcement period required of the initial proxy. Will generally be\n * zero.\n **/\n addProxy: AugmentedSubmittable<\n (\n delegate:\n | MultiAddress\n | { Id: any }\n | { Index: any }\n | { Raw: any }\n | { Address32: any }\n | { Address20: any }\n | string\n | Uint8Array,\n proxyType:\n | ArgonRuntimeProxyType\n | 'Any'\n | 'NonTransfer'\n | 'PriceIndex'\n | 'MiningBid'\n | 'BitcoinCosign'\n | 'VaultAdmin'\n | number\n | Uint8Array,\n delay: u32 | AnyNumber | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [MultiAddress, ArgonRuntimeProxyType, u32]\n >;\n /**\n * Publish the hash of a proxy-call that will be made in the future.\n *\n * This must be called some number of blocks before the corresponding `proxy` is attempted\n * if the delay associated with the proxy relationship is greater than zero.\n *\n * No more than `MaxPending` announcements may be made at any one time.\n *\n * This will take a deposit of `AnnouncementDepositFactor` as well as\n * `AnnouncementDepositBase` if there are no other pending announcements.\n *\n * The dispatch origin for this call must be _Signed_ and a proxy of `real`.\n *\n * Parameters:\n * - `real`: The account that the proxy will make a call on behalf of.\n * - `call_hash`: The hash of the call to be made by the `real` account.\n **/\n announce: AugmentedSubmittable<\n (\n real:\n | MultiAddress\n | { Id: any }\n | { Index: any }\n | { Raw: any }\n | { Address32: any }\n | { Address20: any }\n | string\n | Uint8Array,\n callHash: H256 | string | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [MultiAddress, H256]\n >;\n /**\n * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and\n * initialize it with a proxy of `proxy_type` for `origin` sender.\n *\n * Requires a `Signed` origin.\n *\n * - `proxy_type`: The type of the proxy that the sender will be registered as over the\n * new account. This will almost always be the most permissive `ProxyType` possible to\n * allow for maximum flexibility.\n * - `index`: A disambiguation index, in case this is called multiple times in the same\n * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just\n * want to use `0`.\n * - `delay`: The announcement period required of the initial proxy. Will generally be\n * zero.\n *\n * Fails with `Duplicate` if this has already been called in this transaction, from the\n * same sender, with the same parameters.\n *\n * Fails if there are insufficient funds to pay for deposit.\n **/\n createPure: AugmentedSubmittable<\n (\n proxyType:\n | ArgonRuntimeProxyType\n | 'Any'\n | 'NonTransfer'\n | 'PriceIndex'\n | 'MiningBid'\n | 'BitcoinCosign'\n | 'VaultAdmin'\n | number\n | Uint8Array,\n delay: u32 | AnyNumber | Uint8Array,\n index: u16 | AnyNumber | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [ArgonRuntimeProxyType, u32, u16]\n >;\n /**\n * Removes a previously spawned pure proxy.\n *\n * WARNING: **All access to this account will be lost.** Any funds held in it will be\n * inaccessible.\n *\n * Requires a `Signed` origin, and the sender account must have been created by a call to\n * `pure` with corresponding parameters.\n *\n * - `spawner`: The account that originally called `pure` to create this account.\n * - `index`: The disambiguation index originally passed to `pure`. Probably `0`.\n * - `proxy_type`: The proxy type originally passed to `pure`.\n * - `height`: The height of the chain when the call to `pure` was processed.\n * - `ext_index`: The extrinsic index in which the call to `pure` was processed.\n *\n * Fails with `NoPermission` in case the caller is not a previously created pure\n * account whose `pure` call has corresponding parameters.\n **/\n killPure: AugmentedSubmittable<\n (\n spawner:\n | MultiAddress\n | { Id: any }\n | { Index: any }\n | { Raw: any }\n | { Address32: any }\n | { Address20: any }\n | string\n | Uint8Array,\n proxyType:\n | ArgonRuntimeProxyType\n | 'Any'\n | 'NonTransfer'\n | 'PriceIndex'\n | 'MiningBid'\n | 'BitcoinCosign'\n | 'VaultAdmin'\n | number\n | Uint8Array,\n index: u16 | AnyNumber | Uint8Array,\n height: Compact<u32> | AnyNumber | Uint8Array,\n extIndex: Compact<u32> | AnyNumber | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [MultiAddress, ArgonRuntimeProxyType, u16, Compact<u32>, Compact<u32>]\n >;\n /**\n * Dispatch the given `call` from an account that the sender is authorised for through\n * `add_proxy`.\n *\n * The dispatch origin for this call must be _Signed_.\n *\n * Parameters:\n * - `real`: The account that the proxy will make a call on behalf of.\n * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call.\n * - `call`: The call to be made by the `real` account.\n **/\n proxy: AugmentedSubmittable<\n (\n real:\n | MultiAddress\n | { Id: any }\n | { Index: any }\n | { Raw: any }\n | { Address32: any }\n | { Address20: any }\n | string\n | Uint8Array,\n forceProxyType:\n | Option<ArgonRuntimeProxyType>\n | null\n | Uint8Array\n | ArgonRuntimeProxyType\n | 'Any'\n | 'NonTransfer'\n | 'PriceIndex'\n | 'MiningBid'\n | 'BitcoinCosign'\n | 'VaultAdmin'\n | number,\n call: Call | IMethod | string | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [MultiAddress, Option<ArgonRuntimeProxyType>, Call]\n >;\n /**\n * Dispatch the given `call` from an account that the sender is authorized for through\n * `add_proxy`.\n *\n * Removes any corresponding announcement(s).\n *\n * The dispatch origin for this call must be _Signed_.\n *\n * Parameters:\n * - `real`: The account that the proxy will make a call on behalf of.\n * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call.\n * - `call`: The call to be made by the `real` account.\n **/\n proxyAnnounced: AugmentedSubmittable<\n (\n delegate:\n | MultiAddress\n | { Id: any }\n | { Index: any }\n | { Raw: any }\n | { Address32: any }\n | { Address20: any }\n | string\n | Uint8Array,\n real:\n | MultiAddress\n | { Id: any }\n | { Index: any }\n | { Raw: any }\n | { Address32: any }\n | { Address20: any }\n | string\n | Uint8Array,\n forceProxyType:\n | Option<ArgonRuntimeProxyType>\n | null\n | Uint8Array\n | ArgonRuntimeProxyType\n | 'Any'\n | 'NonTransfer'\n | 'PriceIndex'\n | 'MiningBid'\n | 'BitcoinCosign'\n | 'VaultAdmin'\n | number,\n call: Call | IMethod | string | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [MultiAddress, MultiAddress, Option<ArgonRuntimeProxyType>, Call]\n >;\n /**\n * Remove the given announcement of a delegate.\n *\n * May be called by a target (proxied) account to remove a call that one of their delegates\n * (`delegate`) has announced they want to execute. The deposit is returned.\n *\n * The dispatch origin for this call must be _Signed_.\n *\n * Parameters:\n * - `delegate`: The account that previously announced the call.\n * - `call_hash`: The hash of the call to be made.\n **/\n rejectAnnouncement: AugmentedSubmittable<\n (\n delegate:\n | MultiAddress\n | { Id: any }\n | { Index: any }\n | { Raw: any }\n | { Address32: any }\n | { Address20: any }\n | string\n | Uint8Array,\n callHash: H256 | string | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [MultiAddress, H256]\n >;\n /**\n * Remove a given announcement.\n *\n * May be called by a proxy account to remove a call they previously announced and return\n * the deposit.\n *\n * The dispatch origin for this call must be _Signed_.\n *\n * Parameters:\n * - `real`: The account that the proxy will make a call on behalf of.\n * - `call_hash`: The hash of the call to be made by the `real` account.\n **/\n removeAnnouncement: AugmentedSubmittable<\n (\n real:\n | MultiAddress\n | { Id: any }\n | { Index: any }\n | { Raw: any }\n | { Address32: any }\n | { Address20: any }\n | string\n | Uint8Array,\n callHash: H256 | string | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [MultiAddress, H256]\n >;\n /**\n * Unregister all proxy accounts for the sender.\n *\n * The dispatch origin for this call must be _Signed_.\n *\n * WARNING: This may be called on accounts created by `pure`, however if done, then\n * the unreserved fees will be inaccessible. **All access to this account will be lost.**\n **/\n removeProxies: AugmentedSubmittable<\n () => SubmittableExtrinsic<ApiType>,\n []\n >;\n /**\n * Unregister a proxy account for the sender.\n *\n * The dispatch origin for this call must be _Signed_.\n *\n * Parameters:\n * - `proxy`: The account that the `caller` would like to remove as a proxy.\n * - `proxy_type`: The permissions currently enabled for the removed proxy account.\n **/\n removeProxy: AugmentedSubmittable<\n (\n delegate:\n | MultiAddress\n | { Id: any }\n | { Index: any }\n | { Raw: any }\n | { Address32: any }\n | { Address20: any }\n | string\n | Uint8Array,\n proxyType:\n | ArgonRuntimeProxyType\n | 'Any'\n | 'NonTransfer'\n | 'PriceIndex'\n | 'MiningBid'\n | 'BitcoinCosign'\n | 'VaultAdmin'\n | number\n | Uint8Array,\n delay: u32 | AnyNumber | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [MultiAddress, ArgonRuntimeProxyType, u32]\n >;\n };\n sudo: {\n /**\n * Permanently removes the sudo key.\n *\n * **This cannot be un-done.**\n **/\n removeKey: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;\n /**\n * Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo\n * key.\n **/\n setKey: AugmentedSubmittable<\n (\n updated:\n | MultiAddress\n | { Id: any }\n | { Index: any }\n | { Raw: any }\n | { Address32: any }\n | { Address20: any }\n | string\n | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [MultiAddress]\n >;\n /**\n * Authenticates the sudo key and dispatches a function call with `Root` origin.\n **/\n sudo: AugmentedSubmittable<\n (\n call: Call | IMethod | string | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [Call]\n >;\n /**\n * Authenticates the sudo key and dispatches a function call with `Signed` origin from\n * a given account.\n *\n * The dispatch origin for this call must be _Signed_.\n **/\n sudoAs: AugmentedSubmittable<\n (\n who:\n | MultiAddress\n | { Id: any }\n | { Index: any }\n | { Raw: any }\n | { Address32: any }\n | { Address20: any }\n | string\n | Uint8Array,\n call: Call | IMethod | string | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [MultiAddress, Call]\n >;\n /**\n * Authenticates the sudo key and dispatches a function call with `Root` origin.\n * This function does not check the weight of the call, and instead allows the\n * Sudo user to specify the weight of the call.\n *\n * The dispatch origin for this call must be _Signed_.\n **/\n sudoUncheckedWeight: AugmentedSubmittable<\n (\n call: Call | IMethod | string | Uint8Array,\n weight:\n | SpWeightsWeightV2Weight\n | { refTime?: any; proofSize?: any }\n | string\n | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [Call, SpWeightsWeightV2Weight]\n >;\n };\n system: {\n /**\n * Provide the preimage (runtime binary) `code` for an upgrade that has been authorized.\n *\n * If the authorization required a version check, this call will ensure the spec name\n * remains unchanged and that the spec version has increased.\n *\n * Depending on the runtime's `OnSetCode` configuration, this function may directly apply\n * the new `code` in the same block or attempt to schedule the upgrade.\n *\n * All origins are allowed.\n **/\n applyAuthorizedUpgrade: AugmentedSubmittable<\n (code: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>,\n [Bytes]\n >;\n /**\n * Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied\n * later.\n *\n * This call requires Root origin.\n **/\n authorizeUpgrade: AugmentedSubmittable<\n (codeHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>,\n [H256]\n >;\n /**\n * Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied\n * later.\n *\n * WARNING: This authorizes an upgrade that will take place without any safety checks, for\n * example that the spec name remains the same and that the version number increases. Not\n * recommended for normal use. Use `authorize_upgrade` instead.\n *\n * This call requires Root origin.\n **/\n authorizeUpgradeWithoutChecks: AugmentedSubmittable<\n (codeHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>,\n [H256]\n >;\n /**\n * Kill all storage items with a key that starts with the given prefix.\n *\n * **NOTE:** We rely on the Root origin to provide us the number of subkeys under\n * the prefix we are removing to accurately calculate the weight of this function.\n **/\n killPrefix: AugmentedSubmittable<\n (\n prefix: Bytes | string | Uint8Array,\n subkeys: u32 | AnyNumber | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [Bytes, u32]\n >;\n /**\n * Kill some items from storage.\n **/\n killStorage: AugmentedSubmittable<\n (\n keys: Vec<Bytes> | (Bytes | string | Uint8Array)[],\n ) => SubmittableExtrinsic<ApiType>,\n [Vec<Bytes>]\n >;\n /**\n * Make some on-chain remark.\n *\n * Can be executed by every `origin`.\n **/\n remark: AugmentedSubmittable<\n (remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>,\n [Bytes]\n >;\n /**\n * Make some on-chain remark and emit event.\n **/\n remarkWithEvent: AugmentedSubmittable<\n (remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>,\n [Bytes]\n >;\n /**\n * Set the new runtime code.\n **/\n setCode: AugmentedSubmittable<\n (code: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>,\n [Bytes]\n >;\n /**\n * Set the new runtime code without doing any checks of the given `code`.\n *\n * Note that runtime upgrades will not run if this is called with a not-increasing spec\n * version!\n **/\n setCodeWithoutChecks: AugmentedSubmittable<\n (code: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>,\n [Bytes]\n >;\n /**\n * Set the number of pages in the WebAssembly environment's heap.\n **/\n setHeapPages: AugmentedSubmittable<\n (pages: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>,\n [u64]\n >;\n /**\n * Set some items of storage.\n **/\n setStorage: AugmentedSubmittable<\n (\n items:\n | Vec<ITuple<[Bytes, Bytes]>>\n | [Bytes | string | Uint8Array, Bytes | string | Uint8Array][],\n ) => SubmittableExtrinsic<ApiType>,\n [Vec<ITuple<[Bytes, Bytes]>>]\n >;\n };\n ticks: {};\n timestamp: {\n /**\n * Set the current time.\n *\n * This call should be invoked exactly once per block. It will panic at the finalization\n * phase, if this call hasn't been invoked by that time.\n *\n * The timestamp should be greater than the previous one by the amount specified by\n * [`Config::MinimumPeriod`].\n *\n * The dispatch origin for this call must be _None_.\n *\n * This dispatch class is _Mandatory_ to ensure it gets executed in the block. Be aware\n * that changing the complexity of this call could result exhausting the resources in a\n * block to execute any other calls.\n *\n * ## Complexity\n * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`)\n * - 1 storage read and 1 storage mutation (codec `O(1)` because of `DidUpdate::take` in\n * `on_finalize`)\n * - 1 event handler `on_timestamp_set`. Must be `O(1)`.\n **/\n set: AugmentedSubmittable<\n (\n now: Compact<u64> | AnyNumber | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [Compact<u64>]\n >;\n };\n tokenGateway: {\n /**\n * Registers a multi-chain ERC6160 asset. The asset should not already exist.\n *\n * This works by dispatching a request to the TokenGateway module on each requested chain\n * to create the asset.\n * `native` should be true if this asset originates from this chain\n **/\n createErc6160Asset: AugmentedSubmittable<\n (\n asset:\n | PalletTokenGatewayAssetRegistration\n | { localId?: any; reg?: any; native?: any; precision?: any }\n | string\n | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [PalletTokenGatewayAssetRegistration]\n >;\n /**\n * Set the token gateway address for specified chains\n **/\n setTokenGatewayAddresses: AugmentedSubmittable<\n (\n addresses: BTreeMap<IsmpHostStateMachine, Bytes>,\n ) => SubmittableExtrinsic<ApiType>,\n [BTreeMap<IsmpHostStateMachine, Bytes>]\n >;\n /**\n * Teleports a registered asset\n * locks the asset and dispatches a request to token gateway on the destination\n **/\n teleport: AugmentedSubmittable<\n (\n params:\n | PalletTokenGatewayTeleportParams\n | {\n assetId?: any;\n destination?: any;\n recepient?: any;\n amount?: any;\n timeout?: any;\n tokenGateway?: any;\n relayerFee?: any;\n callData?: any;\n redeem?: any;\n }\n | string\n | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [PalletTokenGatewayTeleportParams]\n >;\n /**\n * Update the precision for an existing asset\n **/\n updateAssetPrecision: AugmentedSubmittable<\n (\n update:\n | PalletTokenGatewayPrecisionUpdate\n | { assetId?: any; precisions?: any }\n | string\n | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [PalletTokenGatewayPrecisionUpdate]\n >;\n /**\n * Registers a multi-chain ERC6160 asset. The asset should not already exist.\n *\n * This works by dispatching a request to the TokenGateway module on each requested chain\n * to create the asset.\n **/\n updateErc6160Asset: AugmentedSubmittable<\n (\n asset:\n | TokenGatewayPrimitivesGatewayAssetUpdate\n | {\n assetId?: any;\n addChains?: any;\n removeChains?: any;\n newAdmins?: any;\n }\n | string\n | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [TokenGatewayPrimitivesGatewayAssetUpdate]\n >;\n };\n txPause: {\n /**\n * Pause a call.\n *\n * Can only be called by [`Config::PauseOrigin`].\n * Emits an [`Event::CallPaused`] event on success.\n **/\n pause: AugmentedSubmittable<\n (\n fullName:\n | ITuple<[Bytes, Bytes]>\n | [Bytes | string | Uint8Array, Bytes | string | Uint8Array],\n ) => SubmittableExtrinsic<ApiType>,\n [ITuple<[Bytes, Bytes]>]\n >;\n /**\n * Un-pause a call.\n *\n * Can only be called by [`Config::UnpauseOrigin`].\n * Emits an [`Event::CallUnpaused`] event on success.\n **/\n unpause: AugmentedSubmittable<\n (\n ident:\n | ITuple<[Bytes, Bytes]>\n | [Bytes | string | Uint8Array, Bytes | string | Uint8Array],\n ) => SubmittableExtrinsic<ApiType>,\n [ITuple<[Bytes, Bytes]>]\n >;\n };\n utility: {\n /**\n * Send a call through an indexed pseudonym of the sender.\n *\n * Filter from origin are passed along. The call will be dispatched with an origin which\n * use the same filter as the origin of this call.\n *\n * NOTE: If you need to ensure that any account-based filtering is not honored (i.e.\n * because you expect `proxy` to have been used prior in the call stack and you do not want\n * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1`\n * in the Multisig pallet instead.\n *\n * NOTE: Prior to version *12, this was called `as_limited_sub`.\n *\n * The dispatch origin for this call must be _Signed_.\n **/\n asDerivative: AugmentedSubmittable<\n (\n index: u16 | AnyNumber | Uint8Array,\n call: Call | IMethod | string | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [u16, Call]\n >;\n /**\n * Send a batch of dispatch calls.\n *\n * May be called from any origin except `None`.\n *\n * - `calls`: The calls to be dispatched from the same origin. The number of call must not\n * exceed the constant: `batched_calls_limit` (available in constant metadata).\n *\n * If origin is root then the calls are dispatched without checking origin filter. (This\n * includes bypassing `frame_system::Config::BaseCallFilter`).\n *\n * ## Complexity\n * - O(C) where C is the number of calls to be batched.\n *\n * This will return `Ok` in all circumstances. To determine the success of the batch, an\n * event is deposited. If a call failed and the batch was interrupted, then the\n * `BatchInterrupted` event is deposited, along with the number of successful calls made\n * and the error of the failed call. If all were successful, then the `BatchCompleted`\n * event is deposited.\n **/\n batch: AugmentedSubmittable<\n (\n calls: Vec<Call> | (Call | IMethod | string | Uint8Array)[],\n ) => SubmittableExtrinsic<ApiType>,\n [Vec<Call>]\n >;\n /**\n * Send a batch of dispatch calls and atomically execute them.\n * The whole transaction will rollback and fail if any of the calls failed.\n *\n * May be called from any origin except `None`.\n *\n * - `calls`: The calls to be dispatched from the same origin. The number of call must not\n * exceed the constant: `batched_calls_limit` (available in constant metadata).\n *\n * If origin is root then the calls are dispatched without checking origin filter. (This\n * includes bypassing `frame_system::Config::BaseCallFilter`).\n *\n * ## Complexity\n * - O(C) where C is the number of calls to be batched.\n **/\n batchAll: AugmentedSubmittable<\n (\n calls: Vec<Call> | (Call | IMethod | string | Uint8Array)[],\n ) => SubmittableExtrinsic<ApiType>,\n [Vec<Call>]\n >;\n /**\n * Dispatches a function call with a provided origin.\n *\n * The dispatch origin for this call must be _Root_.\n *\n * ## Complexity\n * - O(1).\n **/\n dispatchAs: AugmentedSubmittable<\n (\n asOrigin:\n | ArgonRuntimeOriginCaller\n | { system: any }\n | string\n | Uint8Array,\n call: Call | IMethod | string | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [ArgonRuntimeOriginCaller, Call]\n >;\n /**\n * Send a batch of dispatch calls.\n * Unlike `batch`, it allows errors and won't interrupt.\n *\n * May be called from any origin except `None`.\n *\n * - `calls`: The calls to be dispatched from the same origin. The number of call must not\n * exceed the constant: `batched_calls_limit` (available in constant metadata).\n *\n * If origin is root then the calls are dispatch without checking origin filter. (This\n * includes bypassing `frame_system::Config::BaseCallFilter`).\n *\n * ## Complexity\n * - O(C) where C is the number of calls to be batched.\n **/\n forceBatch: AugmentedSubmittable<\n (\n calls: Vec<Call> | (Call | IMethod | string | Uint8Array)[],\n ) => SubmittableExtrinsic<ApiType>,\n [Vec<Call>]\n >;\n /**\n * Dispatch a function call with a specified weight.\n *\n * This function does not check the weight of the call, and instead allows the\n * Root origin to specify the weight of the call.\n *\n * The dispatch origin for this call must be _Root_.\n **/\n withWeight: AugmentedSubmittable<\n (\n call: Call | IMethod | string | Uint8Array,\n weight:\n | SpWeightsWeightV2Weight\n | { refTime?: any; proofSize?: any }\n | string\n | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [Call, SpWeightsWeightV2Weight]\n >;\n };\n vaults: {\n /**\n * Stop offering additional obligations from this vault. Will not affect existing\n * obligations. As funds are returned, they will be released to the vault owner.\n **/\n close: AugmentedSubmittable<\n (\n vaultId: u32 | AnyNumber | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [u32]\n >;\n create: AugmentedSubmittable<\n (\n vaultConfig:\n | PalletVaultsVaultConfig\n | {\n terms?: any;\n securitization?: any;\n bitcoinXpubkey?: any;\n securitizationRatio?: any;\n }\n | string\n | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [PalletVaultsVaultConfig]\n >;\n /**\n * Modify funds allocated by the vault. This will not affect issued obligations, but will\n * affect the amount of funds available for new ones.\n *\n * The securitization percent must be maintained or increased.\n *\n * The amount allocated may not go below the existing reserved amounts, but you can release\n * funds in this vault as obligations are released. To stop issuing any more obligations,\n * use the `close` api.\n **/\n modifyFunding: AugmentedSubmittable<\n (\n vaultId: u32 | AnyNumber | Uint8Array,\n securitization: u128 | AnyNumber | Uint8Array,\n securitizationRatio: u128 | AnyNumber | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [u32, u128, u128]\n >;\n /**\n * Change the terms of this vault. The change will be applied at the next mining slot\n * change that is at least `MinTermsModificationBlockDelay` blocks away.\n **/\n modifyTerms: AugmentedSubmittable<\n (\n vaultId: u32 | AnyNumber | Uint8Array,\n terms:\n | ArgonPrimitivesVaultVaultTerms\n | {\n bitcoinAnnualPercentRate?: any;\n bitcoinBaseFee?: any;\n liquidityPoolProfitSharing?: any;\n }\n | string\n | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [u32, ArgonPrimitivesVaultVaultTerms]\n >;\n /**\n * Replace the bitcoin xpubkey for this vault. This will not affect existing obligations,\n * but will be used for any obligations after this point. Will be rejected if already\n * used.\n **/\n replaceBitcoinXpub: AugmentedSubmittable<\n (\n vaultId: u32 | AnyNumber | Uint8Array,\n bitcoinXpub:\n | ArgonPrimitivesBitcoinOpaqueBitcoinXpub\n | string\n | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [u32, ArgonPrimitivesBitcoinOpaqueBitcoinXpub]\n >;\n };\n } // AugmentedSubmittables\n} // declare module\n","// Auto-generated via `yarn polkadot-types-from-chain`, do not edit\n/* eslint-disable */\n\n// import type lookup before we augment - in some environments\n// this is required to allow for ambient/previous definitions\nimport '@polkadot/rpc-core/types/jsonrpc';\n\nimport type { AugmentedRpc } from '@polkadot/rpc-core/types';\nimport type { Metadata, StorageKey } from '@polkadot/types';\nimport type {\n Bytes,\n HashMap,\n Json,\n Null,\n Option,\n Text,\n U256,\n U64,\n Vec,\n bool,\n f64,\n u32,\n u64,\n} from '@polkadot/types-codec';\nimport type { AnyNumber, Codec } from '@polkadot/types-codec/types';\nimport type {\n ExtrinsicOrHash,\n ExtrinsicStatus,\n} from '@polkadot/types/interfaces/author';\nimport type { EpochAuthorship } from '@polkadot/types/interfaces/babe';\nimport type { BeefyVersionedFinalityProof } from '@polkadot/types/interfaces/beefy';\nimport type { BlockHash } from '@polkadot/types/interfaces/chain';\nimport type { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';\nimport type { AuthorityId } from '@polkadot/types/interfaces/consensus';\nimport type {\n CodeUploadRequest,\n CodeUploadResult,\n ContractCallRequest,\n ContractExecResult,\n ContractInstantiateResult,\n InstantiateRequestV1,\n} from '@polkadot/types/interfaces/contracts';\nimport type { BlockStats } from '@polkadot/types/interfaces/dev';\nimport type { CreatedBlock } from '@polkadot/types/interfaces/engine';\nimport type {\n EthAccount,\n EthCallRequest,\n EthFeeHistory,\n EthFilter,\n EthFilterChanges,\n EthLog,\n EthReceipt,\n EthRichBlock,\n EthSubKind,\n EthSubParams,\n EthSyncStatus,\n EthTransaction,\n EthTransactionRequest,\n EthWork,\n} from '@polkadot/types/interfaces/eth';\nimport type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';\nimport type {\n EncodedFinalityProofs,\n JustificationNotification,\n ReportedRoundStates,\n} from '@polkadot/types/interfaces/grandpa';\nimport type {\n MmrHash,\n MmrLeafBatchProof,\n} from '@polkadot/types/interfaces/mmr';\nimport type { StorageKind } from '@polkadot/types/interfaces/offchain';\nimport type {\n FeeDetails,\n RuntimeDispatchInfoV1,\n} from '@polkadot/types/interfaces/payment';\nimport type { RpcMethods } from '@polkadot/types/interfaces/rpc';\nimport type {\n AccountId,\n BlockNumber,\n H160,\n H256,\n H64,\n Hash,\n Header,\n Index,\n Justification,\n KeyValue,\n SignedBlock,\n StorageData,\n} from '@polkadot/types/interfaces/runtime';\nimport type {\n MigrationStatusResult,\n ReadProof,\n RuntimeVersion,\n TraceBlockResponse,\n} from '@polkadot/types/interfaces/state';\nimport type {\n ApplyExtrinsicResult,\n ChainProperties,\n ChainType,\n Health,\n NetworkState,\n NodeRole,\n PeerInfo,\n SyncState,\n} from '@polkadot/types/interfaces/system';\nimport type { IExtrinsic, Observable } from '@polkadot/types/types';\n\nexport type __AugmentedRpc = AugmentedRpc<() => unknown>;\n\ndeclare module '@polkadot/rpc-core/types/jsonrpc' {\n interface RpcInterface {\n author: {\n /**\n * Returns true if the keystore has private keys for the given public key and key type.\n **/\n hasKey: AugmentedRpc<\n (\n publicKey: Bytes | string | Uint8Array,\n keyType: Text | string,\n ) => Observable<bool>\n >;\n /**\n * Returns true if the keystore has private keys for the given session public keys.\n **/\n hasSessionKeys: AugmentedRpc<\n (sessionKeys: Bytes | string | Uint8Array) => Observable<bool>\n >;\n /**\n * Insert a key into the keystore.\n **/\n insertKey: AugmentedRpc<\n (\n keyType: Text | string,\n suri: Text | string,\n publicKey: Bytes | string | Uint8Array,\n ) => Observable<Bytes>\n >;\n /**\n * Returns all pending extrinsics, potentially grouped by sender\n **/\n pendingExtrinsics: AugmentedRpc<() => Observable<Vec<Extrinsic>>>;\n /**\n * Remove given extrinsic from the pool and temporarily ban it to prevent reimporting\n **/\n removeExtrinsic: AugmentedRpc<\n (\n bytesOrHash:\n | Vec<ExtrinsicOrHash>\n | (\n | ExtrinsicOrHash\n | { Hash: any }\n | { Extrinsic: any }\n | string\n | Uint8Array\n )[],\n ) => Observable<Vec<Hash>>\n >;\n /**\n * Generate new session keys and returns the corresponding public keys\n **/\n rotateKeys: AugmentedRpc<() => Observable<Bytes>>;\n /**\n * Submit and subscribe to watch an extrinsic until unsubscribed\n **/\n submitAndWatchExtrinsic: AugmentedRpc<\n (\n extrinsic: Extrinsic | IExtrinsic | string | Uint8Array,\n ) => Observable<ExtrinsicStatus>\n >;\n /**\n * Submit a fully formatted extrinsic for block inclusion\n **/\n submitExtrinsic: AugmentedRpc<\n (\n extrinsic: Extrinsic | IExtrinsic | string | Uint8Array,\n ) => Observable<Hash>\n >;\n };\n babe: {\n /**\n * Returns data about which slots (primary or secondary) can be claimed in the current epoch with the keys in the keystore\n **/\n epochAuthorship: AugmentedRpc<\n () => Observable<HashMap<AuthorityId, EpochAuthorship>>\n >;\n };\n beefy: {\n /**\n * Returns hash of the latest BEEFY finalized block as seen by this client.\n **/\n getFinalizedHead: AugmentedRpc<() => Observable<H256>>;\n /**\n * Returns the block most recently finalized by BEEFY, alongside its justification.\n **/\n subscribeJustifications: AugmentedRpc<\n () => Observable<BeefyVersionedFinalityProof>\n >;\n };\n chain: {\n /**\n * Get header and body of a relay chain block\n **/\n getBlock: AugmentedRpc<\n (hash?: BlockHash | string | Uint8Array) => Observable<SignedBlock>\n >;\n /**\n * Get the block hash for a specific block\n **/\n getBlockHash: AugmentedRpc<\n (\n blockNumber?: BlockNumber | AnyNumber | Uint8Array,\n ) => Observable<BlockHash>\n >;\n /**\n * Get hash of the last finalized block in the canon chain\n **/\n getFinalizedHead: AugmentedRpc<() => Observable<BlockHash>>;\n /**\n * Retrieves the header for a specific block\n **/\n getHeader: AugmentedRpc<\n (hash?: BlockHash | string | Uint8Array) => Observable<Header>\n >;\n /**\n * Retrieves the newest header via subscription\n **/\n subscribeAllHeads: AugmentedRpc<() => Observable<Header>>;\n /**\n * Retrieves the best finalized header via subscription\n **/\n subscribeFinalizedHeads: AugmentedRpc<() => Observable<Header>>;\n /**\n * Retrieves the best header via subscription\n **/\n subscribeNewHeads: AugmentedRpc<() => Observable<Header>>;\n };\n childstate: {\n /**\n * Returns the keys with prefix from a child storage, leave empty to get all the keys\n **/\n getKeys: AugmentedRpc<\n (\n childKey: PrefixedStorageKey | string | Uint8Array,\n prefix: StorageKey | string | Uint8Array | any,\n at?: Hash | string | Uint8Array,\n ) => Observable<Vec<StorageKey>>\n >;\n /**\n * Returns the keys with prefix from a child storage with pagination support\n **/\n getKeysPaged: AugmentedRpc<\n (\n childKey: PrefixedStorageKey | string | Uint8Array,\n prefix: StorageKey | string | Uint8Array | any,\n count: u32 | AnyNumber | Uint8Array,\n startKey?: StorageKey | string | Uint8Array | any,\n at?: Hash | string | Uint8Array,\n ) => Observable<Vec<StorageKey>>\n >;\n /**\n * Returns a child storage entry at a specific block state\n **/\n getStorage: AugmentedRpc<\n (\n childKey: PrefixedStorageKey | string | Uint8Array,\n key: StorageKey | string | Uint8Array | any,\n at?: Hash | string | Uint8Array,\n ) => Observable<Option<StorageData>>\n >;\n /**\n * Returns child storage entries for multiple keys at a specific block state\n **/\n getStorageEntries: AugmentedRpc<\n (\n childKey: PrefixedStorageKey | string | Uint8Array,\n keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[],\n at?: Hash | string | Uint8Array,\n ) => Observable<Vec<Option<StorageData>>>\n >;\n /**\n * Returns the hash of a child storage entry at a block state\n **/\n getStorageHash: AugmentedRpc<\n (\n childKey: PrefixedStorageKey | string | Uint8Array,\n key: StorageKey | string | Uint8Array | any,\n at?: Hash | string | Uint8Array,\n ) => Observable<Option<Hash>>\n >;\n /**\n * Returns the size of a child storage entry at a block state\n **/\n getStorageSize: AugmentedRpc<\n (\n childKey: PrefixedStorageKey | string | Uint8Array,\n key: StorageKey | string | Uint8Array | any,\n at?: Hash | string | Uint8Array,\n ) => Observable<Option<u64>>\n >;\n };\n contracts: {\n /**\n * @deprecated Use the runtime interface `api.call.contractsApi.call` instead\n * Executes a call to a contract\n **/\n call: AugmentedRpc<\n (\n callRequest:\n | ContractCallRequest\n | {\n origin?: any;\n dest?: any;\n value?: any;\n gasLimit?: any;\n storageDepositLimit?: any;\n inputData?: any;\n }\n | string\n | Uint8Array,\n at?: BlockHash | string | Uint8Array,\n ) => Observable<ContractExecResult>\n >;\n /**\n * @deprecated Use the runtime interface `api.call.contractsApi.getStorage` instead\n * Returns the value under a specified storage key in a contract\n **/\n getStorage: AugmentedRpc<\n (\n address: AccountId | string | Uint8Array,\n key: H256 | string | Uint8Array,\n at?: BlockHash | string | Uint8Array,\n ) => Observable<Option<Bytes>>\n >;\n /**\n * @deprecated Use the runtime interface `api.call.contractsApi.instantiate` instead\n * Instantiate a new contract\n **/\n instantiate: AugmentedRpc<\n (\n request:\n | InstantiateRequestV1\n | {\n origin?: any;\n value?: any;\n gasLimit?: any;\n code?: any;\n data?: any;\n salt?: any;\n }\n | string\n | Uint8Array,\n at?: BlockHash | string | Uint8Array,\n ) => Observable<ContractInstantiateResult>\n >;\n /**\n * @deprecated Not available in newer versions of the contracts interfaces\n * Returns the projected time a given contract will be able to sustain paying its rent\n **/\n rentProjection: AugmentedRpc<\n (\n address: AccountId | string | Uint8Array,\n at?: BlockHash | string | Uint8Array,\n ) => Observable<Option<BlockNumber>>\n >;\n /**\n * @deprecated Use the runtime interface `api.call.contractsApi.uploadCode` instead\n * Upload new code without instantiating a contract from it\n **/\n uploadCode: AugmentedRpc<\n (\n uploadRequest:\n | CodeUploadRequest\n | { origin?: any; code?: any; storageDepositLimit?: any }\n | string\n | Uint8Array,\n at?: BlockHash | string | Uint8Array,\n ) => Observable<CodeUploadResult>\n >;\n };\n dev: {\n /**\n * Reexecute the specified `block_hash` and gather statistics while doing so\n **/\n getBlockStats: AugmentedRpc<\n (at: Hash | string | Uint8Array) => Observable<Option<BlockStats>>\n >;\n };\n engine: {\n /**\n * Instructs the manual-seal authorship task to create a new block\n **/\n createBlock: AugmentedRpc<\n (\n createEmpty: bool | boolean | Uint8Array,\n finalize: bool | boolean | Uint8Array,\n parentHash?: BlockHash | string | Uint8Array,\n ) => Observable<CreatedBlock>\n >;\n /**\n * Instructs the manual-seal authorship task to finalize a block\n **/\n finalizeBlock: AugmentedRpc<\n (\n hash: BlockHash | string | Uint8Array,\n justification?: Justification,\n ) => Observable<bool>\n >;\n };\n eth: {\n /**\n * Returns accounts list.\n **/\n accounts: AugmentedRpc<() => Observable<Vec<H160>>>;\n /**\n * Returns the blockNumber\n **/\n blockNumber: AugmentedRpc<() => Observable<U256>>;\n /**\n * Call contract, returning the output data.\n **/\n call: AugmentedRpc<\n (\n request:\n | EthCallRequest\n | {\n from?: any;\n to?: any;\n gasPrice?: any;\n gas?: any;\n value?: any;\n data?: any;\n nonce?: any;\n }\n | string\n | Uint8Array,\n number?: BlockNumber | AnyNumber | Uint8Array,\n ) => Observable<Bytes>\n >;\n /**\n * Returns the chain ID used for transaction signing at the current best block. None is returned if not available.\n **/\n chainId: AugmentedRpc<() => Observable<U64>>;\n /**\n * Returns block author.\n **/\n coinbase: AugmentedRpc<() => Observable<H160>>;\n /**\n * Estimate gas needed for execution of given contract.\n **/\n estimateGas: AugmentedRpc<\n (\n request:\n | EthCallRequest\n | {\n from?: any;\n to?: any;\n gasPrice?: any;\n gas?: any;\n value?: any;\n data?: any;\n nonce?: any;\n }\n | string\n | Uint8Array,\n number?: BlockNumber | AnyNumber | Uint8Array,\n ) => Observable<U256>\n >;\n /**\n * Returns fee history for given block count & reward percentiles\n **/\n feeHistory: AugmentedRpc<\n (\n blockCount: U256 | AnyNumber | Uint8Array,\n newestBlock: BlockNumber | AnyNumber | Uint8Array,\n rewardPercentiles:\n | Option<Vec<f64>>\n | null\n | Uint8Array\n | Vec<f64>\n | f64[],\n ) => Observable<EthFeeHistory>\n >;\n /**\n * Returns current gas price.\n **/\n gasPrice: AugmentedRpc<() => Observable<U256>>;\n /**\n * Returns balance of the given account.\n **/\n getBalance: AugmentedRpc<\n (\n address: H160 | string | Uint8Array,\n number?: BlockNumber | AnyNumber | Uint8Array,\n ) => Observable<U256>\n >;\n /**\n * Returns block with given hash.\n **/\n getBlockByHash: AugmentedRpc<\n (\n hash: H256 | string | Uint8Array,\n full: bool | boolean | Uint8Array,\n ) => Observable<Option<EthRichBlock>>\n >;\n /**\n * Returns block with given number.\n **/\n getBlockByNumber: AugmentedRpc<\n (\n block: BlockNumber | AnyNumber | Uint8Array,\n full: bool | boolean | Uint8Array,\n ) => Observable<Option<EthRichBlock>>\n >;\n /**\n * Returns the number of transactions in a block with given hash.\n **/\n getBlockTransactionCountByHash: AugmentedRpc<\n (hash: H256 | string | Uint8Array) => Observable<U256>\n >;\n /**\n * Returns the number of transactions in a block with given block number.\n **/\n getBlockTransactionCountByNumber: AugmentedRpc<\n (block: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>\n >;\n /**\n * Returns the code at given address at given time (block number).\n **/\n getCode: AugmentedRpc<\n (\n address: H160 | string | Uint8Array,\n number?: BlockNumber | AnyNumber | Uint8Array,\n ) => Observable<Bytes>\n >;\n /**\n * Returns filter changes since last poll.\n **/\n getFilterChanges: AugmentedRpc<\n (index: U256 | AnyNumber | Uint8Array) => Observable<EthFilterChanges>\n >;\n /**\n * Returns all logs matching given filter (in a range 'from' - 'to').\n **/\n getFilterLogs: AugmentedRpc<\n (index: U256 | AnyNumber | Uint8Array) => Observable<Vec<EthLog>>\n >;\n /**\n * Returns logs matching given filter object.\n **/\n getLogs: AugmentedRpc<\n (\n filter:\n | EthFilter\n | {\n fromBlock?: any;\n toBlock?: any;\n blockHash?: any;\n address?: any;\n topics?: any;\n }\n | string\n | Uint8Array,\n ) => Observable<Vec<EthLog>>\n >;\n /**\n * Returns proof for account and storage.\n **/\n getProof: AugmentedRpc<\n (\n address: H160 | string | Uint8Array,\n storageKeys: Vec<H256> | (H256 | string | Uint8Array)[],\n number: BlockNumber | AnyNumber | Uint8Array,\n ) => Observable<EthAccount>\n >;\n /**\n * Returns content of the storage at given address.\n **/\n getStorageAt: AugmentedRpc<\n (\n address: H160 | string | Uint8Array,\n index: U256 | AnyNumber | Uint8Array,\n number?: BlockNumber | AnyNumber | Uint8Array,\n ) => Observable<H256>\n >;\n /**\n * Returns transaction at given block hash and index.\n **/\n getTransactionByBlockHashAndIndex: AugmentedRpc<\n (\n hash: H256 | string | Uint8Array,\n index: U256 | AnyNumber | Uint8Array,\n ) => Observable<EthTransaction>\n >;\n /**\n * Returns transaction by given block number and index.\n **/\n getTransactionByBlockNumberAndIndex: AugmentedRpc<\n (\n number: BlockNumber | AnyNumber | Uint8Array,\n index: U256 | AnyNumber | Uint8Array,\n ) => Observable<EthTransaction>\n >;\n /**\n * Get transaction by its hash.\n **/\n getTransactionByHash: AugmentedRpc<\n (hash: H256 | string | Uint8Array) => Observable<EthTransaction>\n >;\n /**\n * Returns the number of transactions sent from given address at given time (block number).\n **/\n getTransactionCount: AugmentedRpc<\n (\n address: H160 | string | Uint8Array,\n number?: BlockNumber | AnyNumber | Uint8Array,\n ) => Observable<U256>\n >;\n /**\n * Returns transaction receipt by transaction hash.\n **/\n getTransactionReceipt: AugmentedRpc<\n (hash: H256 | string | Uint8Array) => Observable<EthReceipt>\n >;\n /**\n * Returns an uncles at given block and index.\n **/\n getUncleByBlockHashAndIndex: AugmentedRpc<\n (\n hash: H256 | string | Uint8Array,\n index: U256 | AnyNumber | Uint8Array,\n ) => Observable<EthRichBlock>\n >;\n /**\n * Returns an uncles at given block and index.\n **/\n getUncleByBlockNumberAndIndex: AugmentedRpc<\n (\n number: BlockNumber | AnyNumber | Uint8Array,\n index: U256 | AnyNumber | Uint8Array,\n ) => Observable<EthRichBlock>\n >;\n /**\n * Returns the number of uncles in a block with given hash.\n **/\n getUncleCountByBlockHash: AugmentedRpc<\n (hash: H256 | string | Uint8Array) => Observable<U256>\n >;\n /**\n * Returns the number of uncles in a block with given block number.\n **/\n getUncleCountByBlockNumber: AugmentedRpc<\n (number: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>\n >;\n /**\n * Returns the hash of the current block, the seedHash, and the boundary condition to be met.\n **/\n getWork: AugmentedRpc<() => Observable<EthWork>>;\n /**\n * Returns the number of hashes per second that the node is mining with.\n **/\n hashrate: AugmentedRpc<() => Observable<U256>>;\n /**\n * Returns max priority fee per gas\n **/\n maxPriorityFeePerGas: AugmentedRpc<() => Observable<U256>>;\n /**\n * Returns true if client is actively mining new blocks.\n **/\n mining: AugmentedRpc<() => Observable<bool>>;\n /**\n * Returns id of new block filter.\n **/\n newBlockFilter: AugmentedRpc<() => Observable<U256>>;\n /**\n * Returns id of new filter.\n **/\n newFilter: AugmentedRpc<\n (\n filter:\n | EthFilter\n | {\n fromBlock?: any;\n toBlock?: any;\n blockHash?: any;\n address?: any;\n topics?: any;\n }\n | string\n | Uint8Array,\n ) => Observable<U256>\n >;\n /**\n * Returns id of new block filter.\n **/\n newPendingTransactionFilter: AugmentedRpc<() => Observable<U256>>;\n /**\n * Returns protocol version encoded as a string (quotes are necessary).\n **/\n protocolVersion: AugmentedRpc<() => Observable<u64>>;\n /**\n * Sends signed transaction, returning its hash.\n **/\n sendRawTransaction: AugmentedRpc<\n (bytes: Bytes | string | Uint8Array) => Observable<H256>\n >;\n /**\n * Sends transaction; will block waiting for signer to return the transaction hash\n **/\n sendTransaction: AugmentedRpc<\n (\n tx:\n | EthTransactionRequest\n | {\n from?: any;\n to?: any;\n gasPrice?: any;\n gas?: any;\n value?: any;\n data?: any;\n nonce?: any;\n }\n | string\n | Uint8Array,\n ) => Observable<H256>\n >;\n /**\n * Used for submitting mining hashrate.\n **/\n submitHashrate: AugmentedRpc<\n (\n index: U256 | AnyNumber | Uint8Array,\n hash: H256 | string | Uint8Array,\n ) => Observable<bool>\n >;\n /**\n * Used for submitting a proof-of-work solution.\n **/\n submitWork: AugmentedRpc<\n (\n nonce: H64 | string | Uint8Array,\n headerHash: H256 | string | Uint8Array,\n mixDigest: H256 | string | Uint8Array,\n ) => Observable<bool>\n >;\n /**\n * Subscribe to Eth subscription.\n **/\n subscribe: AugmentedRpc<\n (\n kind:\n | EthSubKind\n | 'newHeads'\n | 'logs'\n | 'newPendingTransactions'\n | 'syncing'\n | number\n | Uint8Array,\n params?:\n | EthSubParams\n | { None: any }\n | { Logs: any }\n | string\n | Uint8Array,\n ) => Observable<Null>\n >;\n /**\n * Returns an object with data about the sync status or false.\n **/\n syncing: AugmentedRpc<() => Observable<EthSyncStatus>>;\n /**\n * Uninstalls filter.\n **/\n uninstallFilter: AugmentedRpc<\n (index: U256 | AnyNumber | Uint8Array) => Observable<bool>\n >;\n };\n grandpa: {\n /**\n * Prove finality for the given block number, returning the Justification for the last block in the set.\n **/\n proveFinality: AugmentedRpc<\n (\n blockNumber: BlockNumber | AnyNumber | Uint8Array,\n ) => Observable<Option<EncodedFinalityProofs>>\n >;\n /**\n * Returns the state of the current best round state as well as the ongoing background rounds\n **/\n roundState: AugmentedRpc<() => Observable<ReportedRoundStates>>;\n /**\n * Subscribes to grandpa justifications\n **/\n subscribeJustifications: AugmentedRpc<\n () => Observable<JustificationNotification>\n >;\n };\n mmr: {\n /**\n * Generate MMR proof for the given block numbers.\n **/\n generateProof: AugmentedRpc<\n (\n blockNumbers: Vec<u64> | (u64 | AnyNumber | Uint8Array)[],\n bestKnownBlockNumber?: u64 | AnyNumber | Uint8Array,\n at?: BlockHash | string | Uint8Array,\n ) => Observable<MmrLeafBatchProof>\n >;\n /**\n * Get the MMR root hash for the current best block.\n **/\n root: AugmentedRpc<\n (at?: BlockHash | string | Uint8Array) => Observable<MmrHash>\n >;\n /**\n * Verify an MMR proof\n **/\n verifyProof: AugmentedRpc<\n (\n proof:\n | MmrLeafBatchProof\n | { blockHash?: any; leaves?: any; proof?: any }\n | string\n | Uint8Array,\n ) => Observable<bool>\n >;\n /**\n * Verify an MMR proof statelessly given an mmr_root\n **/\n verifyProofStateless: AugmentedRpc<\n (\n root: MmrHash | string | Uint8Array,\n proof:\n | MmrLeafBatchProof\n | { blockHash?: any; leaves?: any; proof?: any }\n | string\n | Uint8Array,\n ) => Observable<bool>\n >;\n };\n net: {\n /**\n * Returns true if client is actively listening for network connections. Otherwise false.\n **/\n listening: AugmentedRpc<() => Observable<bool>>;\n /**\n * Returns number of peers connected to node.\n **/\n peerCount: AugmentedRpc<() => Observable<Text>>;\n /**\n * Returns protocol version.\n **/\n version: AugmentedRpc<() => Observable<Text>>;\n };\n offchain: {\n /**\n * Clear offchain local storage under given key and prefix\n **/\n localStorageClear: AugmentedRpc<\n (\n kind: StorageKind | 'PERSISTENT' | 'LOCAL' | number | Uint8Array,\n key: Bytes | string | Uint8Array,\n ) => Observable<Null>\n >;\n /**\n * Get offchain local storage under given key and prefix\n **/\n localStorageGet: AugmentedRpc<\n (\n kind: StorageKind | 'PERSISTENT' | 'LOCAL' | number | Uint8Array,\n key: Bytes | string | Uint8Array,\n ) => Observable<Option<Bytes>>\n >;\n /**\n * Set offchain local storage under given key and prefix\n **/\n localStorageSet: AugmentedRpc<\n (\n kind: StorageKind | 'PERSISTENT' | 'LOCAL' | number | Uint8Array,\n key: Bytes | string | Uint8Array,\n value: Bytes | string | Uint8Array,\n ) => Observable<Null>\n >;\n };\n payment: {\n /**\n * @deprecated Use `api.call.transactionPaymentApi.queryFeeDetails` instead\n * Query the detailed fee of a given encoded extrinsic\n **/\n queryFeeDetails: AugmentedRpc<\n (\n extrinsic: Bytes | string | Uint8Array,\n at?: BlockHash | string | Uint8Array,\n ) => Observable<FeeDetails>\n >;\n /**\n * @deprecated Use `api.call.transactionPaymentApi.queryInfo` instead\n * Retrieves the fee information for an encoded extrinsic\n **/\n queryInfo: AugmentedRpc<\n (\n extrinsic: Bytes | string | Uint8Array,\n at?: BlockHash | string | Uint8Array,\n ) => Observable<RuntimeDispatchInfoV1>\n >;\n };\n rpc: {\n /**\n * Retrieves the list of RPC methods that are exposed by the node\n **/\n methods: AugmentedRpc<() => Observable<RpcMethods>>;\n };\n state: {\n /**\n * Perform a call to a builtin on the chain\n **/\n call: AugmentedRpc<\n (\n method: Text | string,\n data: Bytes | string | Uint8Array,\n at?: BlockHash | string | Uint8Array,\n ) => Observable<Bytes>\n >;\n /**\n * Retrieves the keys with prefix of a specific child storage\n **/\n getChildKeys: AugmentedRpc<\n (\n childStorageKey: StorageKey | string | Uint8Array | any,\n childDefinition: StorageKey | string | Uint8Array | any,\n childType: u32 | AnyNumber | Uint8Array,\n key: StorageKey | string | Uint8Array | any,\n at?: BlockHash | string | Uint8Array,\n ) => Observable<Vec<StorageKey>>\n >;\n /**\n * Returns proof of storage for child key entries at a specific block state.\n **/\n getChildReadProof: AugmentedRpc<\n (\n childStorageKey: PrefixedStorageKey | string | Uint8Array,\n keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[],\n at?: BlockHash | string | Uint8Array,\n ) => Observable<ReadProof>\n >;\n /**\n * Retrieves the child storage for a key\n **/\n getChildStorage: AugmentedRpc<\n (\n childStorageKey: StorageKey | string | Uint8Array | any,\n childDefinition: StorageKey | string | Uint8Array | any,\n childType: u32 | AnyNumber | Uint8Array,\n key: StorageKey | string | Uint8Array | any,\n at?: BlockHash | string | Uint8Array,\n ) => Observable<StorageData>\n >;\n /**\n * Retrieves the child storage hash\n **/\n getChildStorageHash: AugmentedRpc<\n (\n childStorageKey: StorageKey | string | Uint8Array | any,\n childDefinition: StorageKey | string | Uint8Array | any,\n childType: u32 | AnyNumber | Uint8Array,\n key: StorageKey | string | Uint8Array | any,\n at?: BlockHash | string | Uint8Array,\n ) => Observable<Hash>\n >;\n /**\n * Retrieves the child storage size\n **/\n getChildStorageSize: AugmentedRpc<\n (\n childStorageKey: StorageKey | string | Uint8Array | any,\n childDefinition: StorageKey | string | Uint8Array | any,\n childType: u32 | AnyNumber | Uint8Array,\n key: StorageKey | string | Uint8Array | any,\n at?: BlockHash | string | Uint8Array,\n ) => Observable<u64>\n >;\n /**\n * @deprecated Use `api.rpc.state.getKeysPaged` to retrieve keys\n * Retrieves the keys with a certain prefix\n **/\n getKeys: AugmentedRpc<\n (\n key: StorageKey | string | Uint8Array | any,\n at?: BlockHash | string | Uint8Array,\n ) => Observable<Vec<StorageKey>>\n >;\n /**\n * Returns the keys with prefix with pagination support.\n **/\n getKeysPaged: AugmentedRpc<\n (\n key: StorageKey | string | Uint8Array | any,\n count: u32 | AnyNumber | Uint8Array,\n startKey?: StorageKey | string | Uint8Array | any,\n at?: BlockHash | string | Uint8Array,\n ) => Observable<Vec<StorageKey>>\n >;\n /**\n * Returns the runtime metadata\n **/\n getMetadata: AugmentedRpc<\n (at?: BlockHash | string | Uint8Array) => Observable<Metadata>\n >;\n /**\n * @deprecated Use `api.rpc.state.getKeysPaged` to retrieve keys\n * Returns the keys with prefix, leave empty to get all the keys (deprecated: Use getKeysPaged)\n **/\n getPairs: AugmentedRpc<\n (\n prefix: StorageKey | string | Uint8Array | any,\n at?: BlockHash | string | Uint8Array,\n ) => Observable<Vec<KeyValue>>\n >;\n /**\n * Returns proof of storage entries at a specific block state\n **/\n getReadProof: AugmentedRpc<\n (\n keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[],\n at?: BlockHash | string | Uint8Array,\n ) => Observable<ReadProof>\n >;\n /**\n * Get the runtime version\n **/\n getRuntimeVersion: AugmentedRpc<\n (at?: BlockHash | string | Uint8Array) => Observable<RuntimeVersion>\n >;\n /**\n * Retrieves the storage for a key\n **/\n getStorage: AugmentedRpc<\n <T = Codec>(\n key: StorageKey | string | Uint8Array | any,\n block?: Hash | Uint8Array | string,\n ) => Observable<T>\n >;\n /**\n * Retrieves the storage hash\n **/\n getStorageHash: AugmentedRpc<\n (\n key: StorageKey | string | Uint8Array | any,\n at?: BlockHash | string | Uint8Array,\n ) => Observable<Hash>\n >;\n /**\n * Retrieves the storage size\n **/\n getStorageSize: AugmentedRpc<\n (\n key: StorageKey | string | Uint8Array | any,\n at?: BlockHash | string | Uint8Array,\n ) => Observable<u64>\n >;\n /**\n * Query historical storage entries (by key) starting from a start block\n **/\n queryStorage: AugmentedRpc<\n <T = Codec[]>(\n keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[],\n fromBlock?: Hash | Uint8Array | string,\n toBlock?: Hash | Uint8Array | string,\n ) => Observable<[Hash, T][]>\n >;\n /**\n * Query storage entries (by key) starting at block hash given as the second parameter\n **/\n queryStorageAt: AugmentedRpc<\n <T = Codec[]>(\n keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[],\n at?: Hash | Uint8Array | string,\n ) => Observable<T>\n >;\n /**\n * Retrieves the runtime version via subscription\n **/\n subscribeRuntimeVersion: AugmentedRpc<() => Observable<RuntimeVersion>>;\n /**\n * Subscribes to storage changes for the provided keys\n **/\n subscribeStorage: AugmentedRpc<\n <T = Codec[]>(\n keys?: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[],\n ) => Observable<T>\n >;\n /**\n * Provides a way to trace the re-execution of a single block\n **/\n traceBlock: AugmentedRpc<\n (\n block: Hash | string | Uint8Array,\n targets: Option<Text> | null | Uint8Array | Text | string,\n storageKeys: Option<Text> | null | Uint8Array | Text | string,\n methods: Option<Text> | null | Uint8Array | Text | string,\n ) => Observable<TraceBlockResponse>\n >;\n /**\n * Check current migration state\n **/\n trieMigrationStatus: AugmentedRpc<\n (\n at?: BlockHash | string | Uint8Array,\n ) => Observable<MigrationStatusResult>\n >;\n };\n syncstate: {\n /**\n * Returns the json-serialized chainspec running the node, with a sync state.\n **/\n genSyncSpec: AugmentedRpc<\n (raw: bool | boolean | Uint8Array) => Observable<Json>\n >;\n };\n system: {\n /**\n * Retrieves the next accountIndex as available on the node\n **/\n accountNextIndex: AugmentedRpc<\n (accountId: AccountId | string | Uint8Array) => Observable<Index>\n >;\n /**\n * Adds the supplied directives to the current log filter\n **/\n addLogFilter: AugmentedRpc<\n (directives: Text | string) => Observable<Null>\n >;\n /**\n * Adds a reserved peer\n **/\n addReservedPeer: AugmentedRpc<(peer: Text | string) => Observable<Text>>;\n /**\n * Retrieves the chain\n **/\n chain: AugmentedRpc<() => Observable<Text>>;\n /**\n * Retrieves the chain type\n **/\n chainType: AugmentedRpc<() => Observable<ChainType>>;\n /**\n * Dry run an extrinsic at a given block\n **/\n dryRun: AugmentedRpc<\n (\n extrinsic: Bytes | string | Uint8Array,\n at?: BlockHash | string | Uint8Array,\n ) => Observable<ApplyExtrinsicResult>\n >;\n /**\n * Return health status of the node\n **/\n health: AugmentedRpc<() => Observable<Health>>;\n /**\n * The addresses include a trailing /p2p/ with the local PeerId, and are thus suitable to be passed to addReservedPeer or as a bootnode address for example\n **/\n localListenAddresses: AugmentedRpc<() => Observable<Vec<Text>>>;\n /**\n * Returns the base58-encoded PeerId of the node\n **/\n localPeerId: AugmentedRpc<() => Observable<Text>>;\n /**\n * Retrieves the node name\n **/\n name: AugmentedRpc<() => Observable<Text>>;\n /**\n * Returns current state of the network\n **/\n networkState: AugmentedRpc<() => Observable<NetworkState>>;\n /**\n * Returns the roles the node is running as\n **/\n nodeRoles: AugmentedRpc<() => Observable<Vec<NodeRole>>>;\n /**\n * Returns the currently connected peers\n **/\n peers: AugmentedRpc<() => Observable<Vec<PeerInfo>>>;\n /**\n * Get a custom set of properties as a JSON object, defined in the chain spec\n **/\n properties: AugmentedRpc<() => Observable<ChainProperties>>;\n /**\n * Remove a reserved peer\n **/\n removeReservedPeer: AugmentedRpc<\n (peerId: Text | string) => Observable<Text>\n >;\n /**\n * Returns the list of reserved peers\n **/\n reservedPeers: AugmentedRpc<() => Observable<Vec<Text>>>;\n /**\n * Resets the log filter to Substrate defaults\n **/\n resetLogFilter: AugmentedRpc<() => Observable<Null>>;\n /**\n * Returns the state of the syncing of the node\n **/\n syncState: AugmentedRpc<() => Observable<SyncState>>;\n /**\n * Retrieves the version of the node\n **/\n version: AugmentedRpc<() => Observable<Text>>;\n };\n web3: {\n /**\n * Returns current client version.\n **/\n clientVersion: AugmentedRpc<() => Observable<Text>>;\n /**\n * Returns sha3 of the given data\n **/\n sha3: AugmentedRpc<\n (data: Bytes | string | Uint8Array) => Observable<H256>\n >;\n };\n } // RpcInterface\n} // declare module\n","// Auto-generated via `yarn polkadot-types-from-chain`, do not edit\n/* eslint-disable */\n\n// import type lookup before we augment - in some environments\n// this is required to allow for ambient/previous definitions\nimport '@polkadot/api-base/types/calls';\n\nimport type {\n ApiTypes,\n AugmentedCall,\n DecoratedCallBase,\n} from '@polkadot/api-base/types';\nimport type {\n Bytes,\n Null,\n Option,\n Result,\n Vec,\n u32,\n} from '@polkadot/types-codec';\nimport type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';\nimport type { OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe';\nimport type {\n CheckInherentsResult,\n InherentData,\n} from '@polkadot/types/interfaces/blockbuilder';\nimport type { BlockHash } from '@polkadot/types/interfaces/chain';\nimport type { AuthorityId } from '@polkadot/types/interfaces/consensus';\nimport type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';\nimport type { GenesisBuildErr } from '@polkadot/types/interfaces/genesisBuilder';\nimport type {\n AuthorityList,\n GrandpaEquivocationProof,\n SetId,\n} from '@polkadot/types/interfaces/grandpa';\nimport type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';\nimport type {\n FeeDetails,\n RuntimeDispatchInfo,\n} from '@polkadot/types/interfaces/payment';\nimport type {\n AccountId,\n Balance,\n Block,\n Call,\n ExtrinsicInclusionMode,\n Header,\n Index,\n KeyTypeId,\n Weight,\n} from '@polkadot/types/interfaces/runtime';\nimport type { RuntimeVersion } from '@polkadot/types/interfaces/state';\nimport type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';\nimport type {\n TransactionSource,\n TransactionValidity,\n} from '@polkadot/types/interfaces/txqueue';\nimport type { IExtrinsic, Observable } from '@polkadot/types/types';\n\nexport type __AugmentedCall<ApiType extends ApiTypes> = AugmentedCall<ApiType>;\nexport type __DecoratedCallBase<ApiType extends ApiTypes> =\n DecoratedCallBase<ApiType>;\n\ndeclare module '@polkadot/api-base/types/calls' {\n interface AugmentedCalls<ApiType extends ApiTypes> {\n /** 0xbc9d89904f5b923f/1 */\n accountNonceApi: {\n /**\n * The API to query account nonce (aka transaction index)\n **/\n accountNonce: AugmentedCall<\n ApiType,\n (accountId: AccountId | string | Uint8Array) => Observable<Index>\n >;\n };\n /** 0x40fe3ad401f8959a/6 */\n blockBuilder: {\n /**\n * Apply the given extrinsic.\n **/\n applyExtrinsic: AugmentedCall<\n ApiType,\n (\n extrinsic: Extrinsic | IExtrinsic | string | Uint8Array,\n ) => Observable<ApplyExtrinsicResult>\n >;\n /**\n * Check that the inherents are valid.\n **/\n checkInherents: AugmentedCall<\n ApiType,\n (\n block:\n | Block\n | { header?: any; extrinsics?: any }\n | string\n | Uint8Array,\n data: InherentData | { data?: any } | string | Uint8Array,\n ) => Observable<CheckInherentsResult>\n >;\n /**\n * Finish the current block.\n **/\n finalizeBlock: AugmentedCall<ApiType, () => Observable<Header>>;\n /**\n * Generate inherent extrinsics.\n **/\n inherentExtrinsics: AugmentedCall<\n ApiType,\n (\n inherent: InherentData | { data?: any } | string | Uint8Array,\n ) => Observable<Vec<Extrinsic>>\n >;\n };\n /** 0xdf6acb689907609b/5 */\n core: {\n /**\n * Execute the given block.\n **/\n executeBlock: AugmentedCall<\n ApiType,\n (\n block:\n | Block\n | { header?: any; extrinsics?: any }\n | string\n | Uint8Array,\n ) => Observable<Null>\n >;\n /**\n * Initialize a block with the given header.\n **/\n initializeBlock: AugmentedCall<\n ApiType,\n (\n header:\n | Header\n | {\n parentHash?: any;\n number?: any;\n stateRoot?: any;\n extrinsicsRoot?: any;\n digest?: any;\n }\n | string\n | Uint8Array,\n ) => Observable<ExtrinsicInclusionMode>\n >;\n /**\n * Returns the version of the runtime.\n **/\n version: AugmentedCall<ApiType, () => Observable<RuntimeVersion>>;\n };\n /** 0xfbc577b9d747efd6/1 */\n genesisBuilder: {\n /**\n * Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the storage.\n **/\n buildConfig: AugmentedCall<\n ApiType,\n (\n json: Bytes | string | Uint8Array,\n ) => Observable<Result<ITuple<[]>, GenesisBuildErr>>\n >;\n /**\n * Creates the default `RuntimeGenesisConfig` and returns it as a JSON blob.\n **/\n createDefaultConfig: AugmentedCall<ApiType, () => Observable<Bytes>>;\n };\n /** 0xed99c5acb25eedf5/3 */\n grandpaApi: {\n /**\n * Get current GRANDPA authority set id.\n **/\n currentSetId: AugmentedCall<ApiType, () => Observable<SetId>>;\n /**\n * Generates a proof of key ownership for the given authority in the given set.\n **/\n generateKeyOwnershipProof: AugmentedCall<\n ApiType,\n (\n setId: SetId | AnyNumber | Uint8Array,\n authorityId: AuthorityId | string | Uint8Array,\n ) => Observable<Option<OpaqueKeyOwnershipProof>>\n >;\n /**\n * Get the current GRANDPA authorities and weights. This should not change except for when changes are scheduled and the corresponding delay has passed.\n **/\n grandpaAuthorities: AugmentedCall<\n ApiType,\n () => Observable<AuthorityList>\n >;\n /**\n * Submits an unsigned extrinsic to report an equivocation.\n **/\n submitReportEquivocationUnsignedExtrinsic: AugmentedCall<\n ApiType,\n (\n equivocationProof:\n | GrandpaEquivocationProof\n | { setId?: any; equivocation?: any }\n | string\n | Uint8Array,\n keyOwnerProof: OpaqueKeyOwnershipProof | string | Uint8Array,\n ) => Observable<Option<Null>>\n >;\n };\n /** 0x37e397fc7c91f5e4/2 */\n metadata: {\n /**\n * Returns the metadata of a runtime\n **/\n metadata: AugmentedCall<ApiType, () => Observable<OpaqueMetadata>>;\n /**\n * Returns the metadata at a given version.\n **/\n metadataAtVersion: AugmentedCall<\n ApiType,\n (\n version: u32 | AnyNumber | Uint8Array,\n ) => Observable<Option<OpaqueMetadata>>\n >;\n /**\n * Returns the supported metadata versions.\n **/\n metadataVersions: AugmentedCall<ApiType, () => Observable<Vec<u32>>>;\n };\n /** 0xf78b278be53f454c/2 */\n offchainWorkerApi: {\n /**\n * Starts the off-chain task for given block header.\n **/\n offchainWorker: AugmentedCall<\n ApiType,\n (\n header:\n | Header\n | {\n parentHash?: any;\n number?: any;\n stateRoot?: any;\n extrinsicsRoot?: any;\n digest?: any;\n }\n | string\n | Uint8Array,\n ) => Observable<Null>\n >;\n };\n /** 0xab3c0572291feb8b/1 */\n sessionKeys: {\n /**\n * Decode the given public session keys.\n **/\n decodeSessionKeys: AugmentedCall<\n ApiType,\n (\n encoded: Bytes | string | Uint8Array,\n ) => Observable<Option<Vec<ITuple<[Bytes, KeyTypeId]>>>>\n >;\n /**\n * Generate a set of session keys with optionally using the given seed.\n **/\n generateSessionKeys: AugmentedCall<\n ApiType,\n (\n seed: Option<Bytes> | null | Uint8Array | Bytes | string,\n ) => Observable<Bytes>\n >;\n };\n /** 0xd2bc9897eed08f15/3 */\n taggedTransactionQueue: {\n /**\n * Validate the transaction.\n **/\n validateTransaction: AugmentedCall<\n ApiType,\n (\n source:\n | TransactionSource\n | 'InBlock'\n | 'Local'\n | 'External'\n | number\n | Uint8Array,\n tx: Extrinsic | IExtrinsic | string | Uint8Array,\n blockHash: BlockHash | string | Uint8Array,\n ) => Observable<TransactionValidity>\n >;\n };\n /** 0x37c8bb1350a9a2a8/4 */\n transactionPaymentApi: {\n /**\n * The transaction fee details\n **/\n queryFeeDetails: AugmentedCall<\n ApiType,\n (\n uxt: Extrinsic | IExtrinsic | string | Uint8Array,\n len: u32 | AnyNumber | Uint8Array,\n ) => Observable<FeeDetails>\n >;\n /**\n * The transaction info\n **/\n queryInfo: AugmentedCall<\n ApiType,\n (\n uxt: Extrinsic | IExtrinsic | string | Uint8Array,\n len: u32 | AnyNumber | Uint8Array,\n ) => Observable<RuntimeDispatchInfo>\n >;\n /**\n * Query the output of the current LengthToFee given some input\n **/\n queryLengthToFee: AugmentedCall<\n ApiType,\n (length: u32 | AnyNumber | Uint8Array) => Observable<Balance>\n >;\n /**\n * Query the output of the current WeightToFee given some input\n **/\n queryWeightToFee: AugmentedCall<\n ApiType,\n (\n weight:\n | Weight\n | { refTime?: any; proofSize?: any }\n | string\n | Uint8Array,\n ) => Observable<Balance>\n >;\n };\n /** 0xf3ff14d5ab527059/3 */\n transactionPaymentCallApi: {\n /**\n * The call fee details\n **/\n queryCallFeeDetails: AugmentedCall<\n ApiType,\n (\n call: Call | IMethod | string | Uint8Array,\n len: u32 | AnyNumber | Uint8Array,\n ) => Observable<FeeDetails>\n >;\n /**\n * The call info\n **/\n queryCallInfo: AugmentedCall<\n ApiType,\n (\n call: Call | IMethod | string | Uint8Array,\n len: u32 | AnyNumber | Uint8Array,\n ) => Observable<RuntimeDispatchInfo>\n >;\n /**\n * Query the output of the current LengthToFee given some input\n **/\n queryLengthToFee: AugmentedCall<\n ApiType,\n (length: u32 | AnyNumber | Uint8Array) => Observable<Balance>\n >;\n /**\n * Query the output of the current WeightToFee given some input\n **/\n queryWeightToFee: AugmentedCall<\n ApiType,\n (\n weight:\n | Weight\n | { refTime?: any; proofSize?: any }\n | string\n | Uint8Array,\n ) => Observable<Balance>\n >;\n };\n } // AugmentedCalls\n} // declare module\n","// Auto-generated via `yarn polkadot-types-from-defs`, do not edit\n/* eslint-disable */\n\n// import type lookup before we augment - in some environments\n// this is required to allow for ambient/previous definitions\nimport '@polkadot/types/types/registry';\n\nimport type { Data, StorageKey } from '@polkadot/types';\nimport type {\n BitVec,\n Bool,\n Bytes,\n F32,\n F64,\n I128,\n I16,\n I256,\n I32,\n I64,\n I8,\n ISize,\n Json,\n Null,\n OptionBool,\n Raw,\n Text,\n Type,\n U128,\n U16,\n U256,\n U32,\n U64,\n U8,\n USize,\n bool,\n f32,\n f64,\n i128,\n i16,\n i256,\n i32,\n i64,\n i8,\n isize,\n u128,\n u16,\n u256,\n u32,\n u64,\n u8,\n usize,\n} from '@polkadot/types-codec';\nimport type { TAssetConversion } from '@polkadot/types/interfaces/assetConversion';\nimport type {\n AssetApproval,\n AssetApprovalKey,\n AssetBalance,\n AssetDestroyWitness,\n AssetDetails,\n AssetMetadata,\n TAssetBalance,\n TAssetDepositBalance,\n} from '@polkadot/types/interfaces/assets';\nimport type {\n BlockAttestations,\n IncludedBlocks,\n MoreAttestations,\n} from '@polkadot/types/interfaces/attestations';\nimport type { RawAuraPreDigest } from '@polkadot/types/interfaces/aura';\nimport type {\n ExtrinsicOrHash,\n ExtrinsicStatus,\n} from '@polkadot/types/interfaces/author';\nimport type { UncleEntryItem } from '@polkadot/types/interfaces/authorship';\nimport type {\n AllowedSlots,\n BabeAuthorityWeight,\n BabeBlockWeight,\n BabeEpochConfiguration,\n BabeEquivocationProof,\n BabeGenesisConfiguration,\n BabeGenesisConfigurationV1,\n BabeWeight,\n Epoch,\n EpochAuthorship,\n MaybeRandomness,\n MaybeVrf,\n NextConfigDescriptor,\n NextConfigDescriptorV1,\n OpaqueKeyOwnershipProof,\n Randomness,\n RawBabePreDigest,\n RawBabePreDigestCompat,\n RawBabePreDigestPrimary,\n RawBabePreDigestPrimaryTo159,\n RawBabePreDigestSecondaryPlain,\n RawBabePreDigestSecondaryTo159,\n RawBabePreDigestSecondaryVRF,\n RawBabePreDigestTo159,\n SlotNumber,\n VrfData,\n VrfOutput,\n VrfProof,\n} from '@polkadot/types/interfaces/babe';\nimport type {\n AccountData,\n BalanceLock,\n BalanceLockTo212,\n BalanceStatus,\n Reasons,\n ReserveData,\n ReserveIdentifier,\n VestingSchedule,\n WithdrawReasons,\n} from '@polkadot/types/interfaces/balances';\nimport type {\n BeefyAuthoritySet,\n BeefyCommitment,\n BeefyCompactSignedCommitment,\n BeefyEquivocationProof,\n BeefyId,\n BeefyNextAuthoritySet,\n BeefyPayload,\n BeefyPayloadId,\n BeefySignedCommitment,\n BeefyVersionedFinalityProof,\n BeefyVoteMessage,\n MmrRootHash,\n ValidatorSet,\n ValidatorSetId,\n} from '@polkadot/types/interfaces/beefy';\nimport type {\n BenchmarkBatch,\n BenchmarkConfig,\n BenchmarkList,\n BenchmarkMetadata,\n BenchmarkParameter,\n BenchmarkResult,\n} from '@polkadot/types/interfaces/benchmark';\nimport type {\n CheckInherentsResult,\n InherentData,\n InherentIdentifier,\n} from '@polkadot/types/interfaces/blockbuilder';\nimport type {\n BridgeMessageId,\n BridgedBlockHash,\n BridgedBlockNumber,\n BridgedHeader,\n CallOrigin,\n ChainId,\n DeliveredMessages,\n DispatchFeePayment,\n InboundLaneData,\n InboundRelayer,\n InitializationData,\n LaneId,\n MessageData,\n MessageKey,\n MessageNonce,\n MessagesDeliveryProofOf,\n MessagesProofOf,\n OperatingMode,\n OutboundLaneData,\n OutboundMessageFee,\n OutboundPayload,\n Parameter,\n RelayerId,\n UnrewardedRelayer,\n UnrewardedRelayersState,\n} from '@polkadot/types/interfaces/bridges';\nimport type { BlockHash } from '@polkadot/types/interfaces/chain';\nimport type { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';\nimport type { StatementKind } from '@polkadot/types/interfaces/claims';\nimport type {\n CollectiveOrigin,\n MemberCount,\n ProposalIndex,\n Votes,\n VotesTo230,\n} from '@polkadot/types/interfaces/collective';\nimport type {\n AuthorityId,\n RawVRFOutput,\n} from '@polkadot/types/interfaces/consensus';\nimport type {\n AliveContractInfo,\n CodeHash,\n CodeSource,\n CodeUploadRequest,\n CodeUploadResult,\n CodeUploadResultValue,\n ContractCallFlags,\n ContractCallRequest,\n ContractExecResult,\n ContractExecResultOk,\n ContractExecResultResult,\n ContractExecResultSuccessTo255,\n ContractExecResultSuccessTo260,\n ContractExecResultTo255,\n ContractExecResultTo260,\n ContractExecResultTo267,\n ContractExecResultU64,\n ContractInfo,\n ContractInstantiateResult,\n ContractInstantiateResultTo267,\n ContractInstantiateResultTo299,\n ContractInstantiateResultU64,\n ContractReturnFlags,\n ContractStorageKey,\n DeletedContract,\n ExecReturnValue,\n Gas,\n HostFnWeights,\n HostFnWeightsTo264,\n InstantiateRequest,\n InstantiateRequestV1,\n InstantiateRequestV2,\n InstantiateReturnValue,\n InstantiateReturnValueOk,\n InstantiateReturnValueTo267,\n InstructionWeights,\n Limits,\n LimitsTo264,\n PrefabWasmModule,\n RentProjection,\n Schedule,\n ScheduleTo212,\n ScheduleTo258,\n ScheduleTo264,\n SeedOf,\n StorageDeposit,\n TombstoneContractInfo,\n TrieId,\n} from '@polkadot/types/interfaces/contracts';\nimport type {\n ContractConstructorSpecLatest,\n ContractConstructorSpecV0,\n ContractConstructorSpecV1,\n ContractConstructorSpecV2,\n ContractConstructorSpecV3,\n ContractConstructorSpecV4,\n ContractContractSpecV0,\n ContractContractSpecV1,\n ContractContractSpecV2,\n ContractContractSpecV3,\n ContractContractSpecV4,\n ContractContractSpecV5,\n ContractCryptoHasher,\n ContractDiscriminant,\n ContractDisplayName,\n ContractEnvironmentV4,\n ContractEventParamSpecLatest,\n ContractEventParamSpecV0,\n ContractEventParamSpecV2,\n ContractEventSpecLatest,\n ContractEventSpecV0,\n ContractEventSpecV1,\n ContractEventSpecV2,\n ContractEventSpecV3,\n ContractLayoutArray,\n ContractLayoutCell,\n ContractLayoutEnum,\n ContractLayoutHash,\n ContractLayoutHashingStrategy,\n ContractLayoutKey,\n ContractLayoutStruct,\n ContractLayoutStructField,\n ContractMessageParamSpecLatest,\n ContractMessageParamSpecV0,\n ContractMessageParamSpecV2,\n ContractMessageSpecLatest,\n ContractMessageSpecV0,\n ContractMessageSpecV1,\n ContractMessageSpecV2,\n ContractMessageSpecV3,\n ContractMetadata,\n ContractMetadataLatest,\n ContractMetadataV0,\n ContractMetadataV1,\n ContractMetadataV2,\n ContractMetadataV3,\n ContractMetadataV4,\n ContractMetadataV5,\n ContractProject,\n ContractProjectContract,\n ContractProjectInfo,\n ContractProjectSource,\n ContractProjectV0,\n ContractSelector,\n ContractStorageLayout,\n ContractTypeSpec,\n} from '@polkadot/types/interfaces/contractsAbi';\nimport type {\n FundIndex,\n FundInfo,\n LastContribution,\n TrieIndex,\n} from '@polkadot/types/interfaces/crowdloan';\nimport type {\n CollationInfo,\n CollationInfoV1,\n ConfigData,\n MessageId,\n OverweightIndex,\n PageCounter,\n PageIndexData,\n} from '@polkadot/types/interfaces/cumulus';\nimport type {\n AccountVote,\n AccountVoteSplit,\n AccountVoteStandard,\n Conviction,\n Delegations,\n PreimageStatus,\n PreimageStatusAvailable,\n PriorLock,\n PropIndex,\n Proposal,\n ProxyState,\n ReferendumIndex,\n ReferendumInfo,\n ReferendumInfoFinished,\n ReferendumInfoTo239,\n ReferendumStatus,\n Tally,\n Voting,\n VotingDelegating,\n VotingDirect,\n VotingDirectVote,\n} from '@polkadot/types/interfaces/democracy';\nimport type { BlockStats } from '@polkadot/types/interfaces/dev';\nimport type {\n CallDryRunEffects,\n DispatchResultWithPostInfo,\n PostDispatchInfo,\n XcmDryRunApiError,\n XcmDryRunEffects,\n} from '@polkadot/types/interfaces/dryRunApi';\nimport type {\n ApprovalFlag,\n DefunctVoter,\n Renouncing,\n SetIndex,\n Vote,\n VoteIndex,\n VoteThreshold,\n VoterInfo,\n} from '@polkadot/types/interfaces/elections';\nimport type {\n CreatedBlock,\n ImportedAux,\n} from '@polkadot/types/interfaces/engine';\nimport type {\n BlockV0,\n BlockV1,\n BlockV2,\n EIP1559Transaction,\n EIP2930Transaction,\n EthAccessList,\n EthAccessListItem,\n EthAccount,\n EthAddress,\n EthBlock,\n EthBloom,\n EthCallRequest,\n EthFeeHistory,\n EthFilter,\n EthFilterAddress,\n EthFilterChanges,\n EthFilterTopic,\n EthFilterTopicEntry,\n EthFilterTopicInner,\n EthHeader,\n EthLog,\n EthReceipt,\n EthReceiptV0,\n EthReceiptV3,\n EthRichBlock,\n EthRichHeader,\n EthStorageProof,\n EthSubKind,\n EthSubParams,\n EthSubResult,\n EthSyncInfo,\n EthSyncStatus,\n EthTransaction,\n EthTransactionAction,\n EthTransactionCondition,\n EthTransactionRequest,\n EthTransactionSignature,\n EthTransactionStatus,\n EthWork,\n EthereumAccountId,\n EthereumAddress,\n EthereumLookupSource,\n EthereumSignature,\n LegacyTransaction,\n TransactionV0,\n TransactionV1,\n TransactionV2,\n} from '@polkadot/types/interfaces/eth';\nimport type {\n EvmAccount,\n EvmCallInfo,\n EvmCallInfoV2,\n EvmCreateInfo,\n EvmCreateInfoV2,\n EvmLog,\n EvmVicinity,\n EvmWeightInfo,\n ExitError,\n ExitFatal,\n ExitReason,\n ExitRevert,\n ExitSucceed,\n} from '@polkadot/types/interfaces/evm';\nimport type {\n AnySignature,\n EcdsaSignature,\n Ed25519Signature,\n Era,\n Extrinsic,\n ExtrinsicEra,\n ExtrinsicPayload,\n ExtrinsicPayloadUnknown,\n ExtrinsicPayloadV4,\n ExtrinsicPayloadV5,\n ExtrinsicSignature,\n ExtrinsicSignatureV4,\n ExtrinsicSignatureV5,\n ExtrinsicUnknown,\n ExtrinsicV4,\n ExtrinsicV5,\n ImmortalEra,\n MortalEra,\n MultiSignature,\n Signature,\n SignerPayload,\n Sr25519Signature,\n} from '@polkadot/types/interfaces/extrinsics';\nimport type { FungiblesAccessError } from '@polkadot/types/interfaces/fungibles';\nimport type {\n AssetOptions,\n Owner,\n PermissionLatest,\n PermissionVersions,\n PermissionsV1,\n} from '@polkadot/types/interfaces/genericAsset';\nimport type { GenesisBuildErr } from '@polkadot/types/interfaces/genesisBuilder';\nimport type {\n ActiveGilt,\n ActiveGiltsTotal,\n ActiveIndex,\n GiltBid,\n} from '@polkadot/types/interfaces/gilt';\nimport type {\n AuthorityIndex,\n AuthorityList,\n AuthoritySet,\n AuthoritySetChange,\n AuthoritySetChanges,\n AuthorityWeight,\n DelayKind,\n DelayKindBest,\n EncodedFinalityProofs,\n ForkTreePendingChange,\n ForkTreePendingChangeNode,\n GrandpaCommit,\n GrandpaEquivocation,\n GrandpaEquivocationProof,\n GrandpaEquivocationValue,\n GrandpaJustification,\n GrandpaPrecommit,\n GrandpaPrevote,\n GrandpaSignedPrecommit,\n JustificationNotification,\n KeyOwnerProof,\n NextAuthority,\n PendingChange,\n PendingPause,\n PendingResume,\n Precommits,\n Prevotes,\n ReportedRoundStates,\n RoundState,\n SetId,\n StoredPendingChange,\n StoredState,\n} from '@polkadot/types/interfaces/grandpa';\nimport type {\n IdentityFields,\n IdentityInfo,\n IdentityInfoAdditional,\n IdentityInfoTo198,\n IdentityJudgement,\n RegistrarIndex,\n RegistrarInfo,\n Registration,\n RegistrationJudgement,\n RegistrationTo198,\n} from '@polkadot/types/interfaces/identity';\nimport type {\n AuthIndex,\n AuthoritySignature,\n Heartbeat,\n HeartbeatTo244,\n OpaqueMultiaddr,\n OpaqueNetworkState,\n OpaquePeerId,\n} from '@polkadot/types/interfaces/imOnline';\nimport type {\n CallIndex,\n LotteryConfig,\n} from '@polkadot/types/interfaces/lottery';\nimport type {\n CustomMetadata15,\n CustomValueMetadata15,\n ErrorMetadataLatest,\n ErrorMetadataV10,\n ErrorMetadataV11,\n ErrorMetadataV12,\n ErrorMetadataV13,\n ErrorMetadataV14,\n ErrorMetadataV9,\n EventMetadataLatest,\n EventMetadataV10,\n EventMetadataV11,\n EventMetadataV12,\n EventMetadataV13,\n EventMetadataV14,\n EventMetadataV9,\n ExtrinsicMetadataLatest,\n ExtrinsicMetadataV11,\n ExtrinsicMetadataV12,\n ExtrinsicMetadataV13,\n ExtrinsicMetadataV14,\n ExtrinsicMetadataV15,\n FunctionArgumentMetadataLatest,\n FunctionArgumentMetadataV10,\n FunctionArgumentMetadataV11,\n FunctionArgumentMetadataV12,\n FunctionArgumentMetadataV13,\n FunctionArgumentMetadataV14,\n FunctionArgumentMetadataV9,\n FunctionMetadataLatest,\n FunctionMetadataV10,\n FunctionMetadataV11,\n FunctionMetadataV12,\n FunctionMetadataV13,\n FunctionMetadataV14,\n FunctionMetadataV9,\n MetadataAll,\n MetadataLatest,\n MetadataV10,\n MetadataV11,\n MetadataV12,\n MetadataV13,\n MetadataV14,\n MetadataV15,\n MetadataV9,\n ModuleConstantMetadataV10,\n ModuleConstantMetadataV11,\n ModuleConstantMetadataV12,\n ModuleConstantMetadataV13,\n ModuleConstantMetadataV9,\n ModuleMetadataV10,\n ModuleMetadataV11,\n ModuleMetadataV12,\n ModuleMetadataV13,\n ModuleMetadataV9,\n OpaqueMetadata,\n OuterEnums15,\n PalletCallMetadataLatest,\n PalletCallMetadataV14,\n PalletConstantMetadataLatest,\n PalletConstantMetadataV14,\n PalletErrorMetadataLatest,\n PalletErrorMetadataV14,\n PalletEventMetadataLatest,\n PalletEventMetadataV14,\n PalletMetadataLatest,\n PalletMetadataV14,\n PalletMetadataV15,\n PalletStorageMetadataLatest,\n PalletStorageMetadataV14,\n PortableType,\n PortableTypeV14,\n RuntimeApiMetadataLatest,\n RuntimeApiMetadataV15,\n RuntimeApiMethodMetadataV15,\n RuntimeApiMethodParamMetadataV15,\n SignedExtensionMetadataLatest,\n SignedExtensionMetadataV14,\n StorageEntryMetadataLatest,\n StorageEntryMetadataV10,\n StorageEntryMetadataV11,\n StorageEntryMetadataV12,\n StorageEntryMetadataV13,\n StorageEntryMetadataV14,\n StorageEntryMetadataV9,\n StorageEntryModifierLatest,\n StorageEntryModifierV10,\n StorageEntryModifierV11,\n StorageEntryModifierV12,\n StorageEntryModifierV13,\n StorageEntryModifierV14,\n StorageEntryModifierV9,\n StorageEntryTypeLatest,\n StorageEntryTypeV10,\n StorageEntryTypeV11,\n StorageEntryTypeV12,\n StorageEntryTypeV13,\n StorageEntryTypeV14,\n StorageEntryTypeV9,\n StorageHasher,\n StorageHasherV10,\n StorageHasherV11,\n StorageHasherV12,\n StorageHasherV13,\n StorageHasherV14,\n StorageHasherV9,\n StorageMetadataV10,\n StorageMetadataV11,\n StorageMetadataV12,\n StorageMetadataV13,\n StorageMetadataV9,\n} from '@polkadot/types/interfaces/metadata';\nimport type {\n Mixnode,\n MixnodesErr,\n SessionPhase,\n SessionStatus,\n} from '@polkadot/types/interfaces/mixnet';\nimport type {\n MmrBatchProof,\n MmrEncodableOpaqueLeaf,\n MmrError,\n MmrHash,\n MmrLeafBatchProof,\n MmrLeafIndex,\n MmrLeafProof,\n MmrNodeIndex,\n MmrProof,\n} from '@polkadot/types/interfaces/mmr';\nimport type {\n NftCollectionId,\n NftItemId,\n} from '@polkadot/types/interfaces/nfts';\nimport type { NpApiError, NpPoolId } from '@polkadot/types/interfaces/nompools';\nimport type { StorageKind } from '@polkadot/types/interfaces/offchain';\nimport type {\n DeferredOffenceOf,\n Kind,\n OffenceDetails,\n Offender,\n OpaqueTimeSlot,\n ReportIdOf,\n Reporter,\n} from '@polkadot/types/interfaces/offences';\nimport type {\n AbridgedCandidateReceipt,\n AbridgedHostConfiguration,\n AbridgedHrmpChannel,\n ApprovalVotingParams,\n AssignmentId,\n AssignmentKind,\n AsyncBackingParams,\n AttestedCandidate,\n AuctionIndex,\n AuthorityDiscoveryId,\n AvailabilityBitfield,\n AvailabilityBitfieldRecord,\n BackedCandidate,\n BackingState,\n Bidder,\n BufferedSessionChange,\n CandidateCommitments,\n CandidateDescriptor,\n CandidateEvent,\n CandidateHash,\n CandidateInfo,\n CandidatePendingAvailability,\n CandidateReceipt,\n CollatorId,\n CollatorSignature,\n CommittedCandidateReceipt,\n Constraints,\n CoreAssignment,\n CoreIndex,\n CoreOccupied,\n CoreState,\n DisputeLocation,\n DisputeProof,\n DisputeResult,\n DisputeState,\n DisputeStatement,\n DisputeStatementSet,\n DisputesTimeSlot,\n DoubleVoteReport,\n DownwardMessage,\n ExecutorParam,\n ExecutorParams,\n ExecutorParamsHash,\n ExplicitDisputeStatement,\n GlobalValidationData,\n GlobalValidationSchedule,\n GroupIndex,\n GroupRotationInfo,\n HeadData,\n HostConfiguration,\n HrmpChannel,\n HrmpChannelId,\n HrmpOpenChannelRequest,\n InboundDownwardMessage,\n InboundHrmpLimitations,\n InboundHrmpMessage,\n InboundHrmpMessages,\n IncomingParachain,\n IncomingParachainDeploy,\n IncomingParachainFixed,\n InvalidDisputeStatementKind,\n LeasePeriod,\n LeasePeriodOf,\n LocalValidationData,\n MessageIngestionType,\n MessageQueueChain,\n MessagingStateSnapshot,\n MessagingStateSnapshotEgressEntry,\n MultiDisputeStatementSet,\n NewBidder,\n NodeFeatures,\n OccupiedCore,\n OccupiedCoreAssumption,\n OldV1SessionInfo,\n OutboundHrmpChannelLimitations,\n OutboundHrmpMessage,\n ParaGenesisArgs,\n ParaId,\n ParaInfo,\n ParaLifecycle,\n ParaPastCodeMeta,\n ParaScheduling,\n ParaValidatorIndex,\n ParachainDispatchOrigin,\n ParachainInherentData,\n ParachainProposal,\n ParachainsInherentData,\n ParathreadClaim,\n ParathreadClaimQueue,\n ParathreadEntry,\n PendingSlashes,\n PersistedValidationData,\n PvfCheckStatement,\n PvfExecTimeoutKind,\n PvfPrepTimeoutKind,\n QueuedParathread,\n RegisteredParachainInfo,\n RelayBlockNumber,\n RelayChainBlockNumber,\n RelayChainHash,\n RelayHash,\n Remark,\n ReplacementTimes,\n Retriable,\n ScheduledCore,\n Scheduling,\n ScrapedOnChainVotes,\n ServiceQuality,\n SessionInfo,\n SessionInfoValidatorGroup,\n SignedAvailabilityBitfield,\n SignedAvailabilityBitfields,\n SigningContext,\n SlashingOffenceKind,\n SlotRange,\n SlotRange10,\n Statement,\n SubId,\n SystemInherentData,\n TransientValidationData,\n UpgradeGoAhead,\n UpgradeRestriction,\n UpwardMessage,\n ValidDisputeStatementKind,\n ValidationCode,\n ValidationCodeHash,\n ValidationData,\n ValidationDataType,\n ValidationFunctionParams,\n ValidatorSignature,\n ValidityAttestation,\n VecInboundHrmpMessage,\n WinnersData,\n WinnersData10,\n WinnersDataTuple,\n WinnersDataTuple10,\n WinningData,\n WinningData10,\n WinningDataEntry,\n} from '@polkadot/types/interfaces/parachains';\nimport type {\n FeeDetails,\n InclusionFee,\n RuntimeDispatchInfo,\n RuntimeDispatchInfoV1,\n RuntimeDispatchInfoV2,\n} from '@polkadot/types/interfaces/payment';\nimport type { Approvals } from '@polkadot/types/interfaces/poll';\nimport type {\n ProxyAnnouncement,\n ProxyDefinition,\n ProxyType,\n} from '@polkadot/types/interfaces/proxy';\nimport type {\n AccountStatus,\n AccountValidity,\n} from '@polkadot/types/interfaces/purchase';\nimport type {\n ActiveRecovery,\n RecoveryConfig,\n} from '@polkadot/types/interfaces/recovery';\nimport type { RpcMethods } from '@polkadot/types/interfaces/rpc';\nimport type {\n AccountId,\n AccountId20,\n AccountId32,\n AccountId33,\n AccountIdOf,\n AccountIndex,\n Address,\n AssetId,\n Balance,\n BalanceOf,\n Block,\n BlockNumber,\n BlockNumberFor,\n BlockNumberOf,\n Call,\n CallHash,\n CallHashOf,\n ChangesTrieConfiguration,\n ChangesTrieSignal,\n CodecHash,\n Consensus,\n ConsensusEngineId,\n CrateVersion,\n Digest,\n DigestItem,\n EncodedJustification,\n ExtrinsicInclusionMode,\n ExtrinsicsWeight,\n Fixed128,\n Fixed64,\n FixedI128,\n FixedI64,\n FixedU128,\n FixedU64,\n H1024,\n H128,\n H160,\n H2048,\n H256,\n H32,\n H512,\n H64,\n Hash,\n Header,\n HeaderPartial,\n I32F32,\n Index,\n IndicesLookupSource,\n Justification,\n Justifications,\n KeyTypeId,\n KeyValue,\n LockIdentifier,\n LookupSource,\n LookupTarget,\n ModuleId,\n Moment,\n MultiAddress,\n MultiSigner,\n OpaqueCall,\n Origin,\n OriginCaller,\n PalletId,\n PalletVersion,\n PalletsOrigin,\n Pays,\n PerU16,\n Perbill,\n Percent,\n Permill,\n Perquintill,\n Phantom,\n PhantomData,\n PreRuntime,\n Releases,\n RuntimeCall,\n RuntimeDbWeight,\n RuntimeEvent,\n Seal,\n SealV0,\n SignedBlock,\n SignedBlockWithJustification,\n SignedBlockWithJustifications,\n Slot,\n SlotDuration,\n StorageData,\n StorageInfo,\n StorageProof,\n TransactionInfo,\n TransactionLongevity,\n TransactionPriority,\n TransactionStorageProof,\n TransactionTag,\n U32F32,\n ValidatorId,\n ValidatorIdOf,\n Weight,\n WeightMultiplier,\n WeightV0,\n WeightV1,\n WeightV2,\n} from '@polkadot/types/interfaces/runtime';\nimport type {\n Si0Field,\n Si0LookupTypeId,\n Si0Path,\n Si0Type,\n Si0TypeDef,\n Si0TypeDefArray,\n Si0TypeDefBitSequence,\n Si0TypeDefCompact,\n Si0TypeDefComposite,\n Si0TypeDefPhantom,\n Si0TypeDefPrimitive,\n Si0TypeDefSequence,\n Si0TypeDefTuple,\n Si0TypeDefVariant,\n Si0TypeParameter,\n Si0Variant,\n Si1Field,\n Si1LookupTypeId,\n Si1Path,\n Si1Type,\n Si1TypeDef,\n Si1TypeDefArray,\n Si1TypeDefBitSequence,\n Si1TypeDefCompact,\n Si1TypeDefComposite,\n Si1TypeDefPrimitive,\n Si1TypeDefSequence,\n Si1TypeDefTuple,\n Si1TypeDefVariant,\n Si1TypeParameter,\n Si1Variant,\n SiField,\n SiLookupTypeId,\n SiPath,\n SiType,\n SiTypeDef,\n SiTypeDefArray,\n SiTypeDefBitSequence,\n SiTypeDefCompact,\n SiTypeDefComposite,\n SiTypeDefPrimitive,\n SiTypeDefSequence,\n SiTypeDefTuple,\n SiTypeDefVariant,\n SiTypeParameter,\n SiVariant,\n} from '@polkadot/types/interfaces/scaleInfo';\nimport type {\n Period,\n Priority,\n SchedulePeriod,\n SchedulePriority,\n Scheduled,\n ScheduledTo254,\n TaskAddress,\n} from '@polkadot/types/interfaces/scheduler';\nimport type {\n BeefyKey,\n FullIdentification,\n IdentificationTuple,\n Keys,\n MembershipProof,\n SessionIndex,\n SessionKeys1,\n SessionKeys10,\n SessionKeys10B,\n SessionKeys2,\n SessionKeys3,\n SessionKeys4,\n SessionKeys5,\n SessionKeys6,\n SessionKeys6B,\n SessionKeys7,\n SessionKeys7B,\n SessionKeys8,\n SessionKeys8B,\n SessionKeys9,\n SessionKeys9B,\n ValidatorCount,\n} from '@polkadot/types/interfaces/session';\nimport type {\n Bid,\n BidKind,\n SocietyJudgement,\n SocietyVote,\n StrikeCount,\n VouchingStatus,\n} from '@polkadot/types/interfaces/society';\nimport type {\n ActiveEraInfo,\n CompactAssignments,\n CompactAssignmentsTo257,\n CompactAssignmentsTo265,\n CompactAssignmentsWith16,\n CompactAssignmentsWith24,\n CompactScore,\n CompactScoreCompact,\n ElectionCompute,\n ElectionPhase,\n ElectionResult,\n ElectionResultToSpec10,\n ElectionScore,\n ElectionSize,\n ElectionStatus,\n EraIndex,\n EraPoints,\n EraRewardPoints,\n EraRewards,\n Exposure,\n ExtendedBalance,\n Forcing,\n IndividualExposure,\n KeyType,\n MomentOf,\n Nominations,\n NominatorIndex,\n NominatorIndexCompact,\n OffchainAccuracy,\n OffchainAccuracyCompact,\n PhragmenScore,\n Points,\n RawSolution,\n RawSolutionTo265,\n RawSolutionWith16,\n RawSolutionWith24,\n ReadySolution,\n RewardDestination,\n RewardPoint,\n RoundSnapshot,\n SeatHolder,\n SignedSubmission,\n SignedSubmissionOf,\n SignedSubmissionTo276,\n SlashJournalEntry,\n SlashingSpans,\n SlashingSpansTo204,\n SolutionOrSnapshotSize,\n SolutionSupport,\n SolutionSupports,\n SpanIndex,\n SpanRecord,\n StakingLedger,\n StakingLedgerTo223,\n StakingLedgerTo240,\n SubmissionIndicesOf,\n Supports,\n UnappliedSlash,\n UnappliedSlashOther,\n UnlockChunk,\n ValidatorIndex,\n ValidatorIndexCompact,\n ValidatorPrefs,\n ValidatorPrefsTo145,\n ValidatorPrefsTo196,\n ValidatorPrefsWithBlocked,\n ValidatorPrefsWithCommission,\n VoteWeight,\n Voter,\n} from '@polkadot/types/interfaces/staking';\nimport type {\n ApiId,\n BlockTrace,\n BlockTraceEvent,\n BlockTraceEventData,\n BlockTraceSpan,\n KeyValueOption,\n MigrationStatusResult,\n ReadProof,\n RuntimeVersion,\n RuntimeVersionApi,\n RuntimeVersionPartial,\n RuntimeVersionPre3,\n RuntimeVersionPre4,\n SpecVersion,\n StorageChangeSet,\n TraceBlockResponse,\n TraceError,\n} from '@polkadot/types/interfaces/state';\nimport type {\n StatementStoreInvalidStatement,\n StatementStoreStatementSource,\n StatementStoreValidStatement,\n} from '@polkadot/types/interfaces/statement';\nimport type { WeightToFeeCoefficient } from '@polkadot/types/interfaces/support';\nimport type {\n AccountInfo,\n AccountInfoWithDualRefCount,\n AccountInfoWithProviders,\n AccountInfoWithRefCount,\n AccountInfoWithRefCountU8,\n AccountInfoWithTripleRefCount,\n ApplyExtrinsicResult,\n ApplyExtrinsicResultPre6,\n ArithmeticError,\n BlockLength,\n BlockWeights,\n ChainProperties,\n ChainType,\n ConsumedWeight,\n DigestOf,\n DispatchClass,\n DispatchError,\n DispatchErrorModule,\n DispatchErrorModulePre6,\n DispatchErrorModuleU8,\n DispatchErrorModuleU8a,\n DispatchErrorPre6,\n DispatchErrorPre6First,\n DispatchErrorTo198,\n DispatchInfo,\n DispatchInfoTo190,\n DispatchInfoTo244,\n DispatchOutcome,\n DispatchOutcomePre6,\n DispatchResult,\n DispatchResultOf,\n DispatchResultTo198,\n Event,\n EventId,\n EventIndex,\n EventRecord,\n Health,\n InvalidTransaction,\n Key,\n LastRuntimeUpgradeInfo,\n NetworkState,\n NetworkStatePeerset,\n NetworkStatePeersetInfo,\n NodeRole,\n NotConnectedPeer,\n Peer,\n PeerEndpoint,\n PeerEndpointAddr,\n PeerInfo,\n PeerPing,\n PerDispatchClassU32,\n PerDispatchClassWeight,\n PerDispatchClassWeightsPerClass,\n Phase,\n RawOrigin,\n RefCount,\n RefCountTo259,\n SyncState,\n SystemOrigin,\n TokenError,\n TransactionValidityError,\n TransactionalError,\n UnknownTransaction,\n WeightPerClass,\n} from '@polkadot/types/interfaces/system';\nimport type {\n Bounty,\n BountyIndex,\n BountyStatus,\n BountyStatusActive,\n BountyStatusCuratorProposed,\n BountyStatusPendingPayout,\n OpenTip,\n OpenTipFinderTo225,\n OpenTipTip,\n OpenTipTo225,\n TreasuryProposal,\n} from '@polkadot/types/interfaces/treasury';\nimport type { Multiplier } from '@polkadot/types/interfaces/txpayment';\nimport type {\n TransactionSource,\n TransactionValidity,\n ValidTransaction,\n} from '@polkadot/types/interfaces/txqueue';\nimport type {\n ClassDetails,\n ClassId,\n ClassMetadata,\n DepositBalance,\n DepositBalanceOf,\n DestroyWitness,\n InstanceDetails,\n InstanceId,\n InstanceMetadata,\n} from '@polkadot/types/interfaces/uniques';\nimport type { Multisig, Timepoint } from '@polkadot/types/interfaces/utility';\nimport type { VestingInfo } from '@polkadot/types/interfaces/vesting';\nimport type {\n AssetIdV2,\n AssetIdV3,\n AssetIdV4,\n AssetInstance,\n AssetInstanceV0,\n AssetInstanceV1,\n AssetInstanceV2,\n AssetInstanceV3,\n AssetInstanceV4,\n BodyId,\n BodyIdV2,\n BodyIdV3,\n BodyPart,\n BodyPartV2,\n BodyPartV3,\n DoubleEncodedCall,\n Fungibility,\n FungibilityV0,\n FungibilityV1,\n FungibilityV2,\n FungibilityV3,\n FungibilityV4,\n InboundStatus,\n InstructionV2,\n InstructionV3,\n InstructionV4,\n InteriorMultiLocation,\n InteriorMultiLocationV2,\n InteriorMultiLocationV3,\n Junction,\n JunctionV0,\n JunctionV1,\n JunctionV2,\n JunctionV3,\n JunctionV4,\n Junctions,\n JunctionsV1,\n JunctionsV2,\n JunctionsV3,\n JunctionsV4,\n MaxPalletNameLen,\n MaxPalletsInfo,\n MaybeErrorCodeV3,\n MultiAsset,\n MultiAssetFilter,\n MultiAssetFilterV1,\n MultiAssetFilterV2,\n MultiAssetFilterV3,\n MultiAssetFilterV4,\n MultiAssetV0,\n MultiAssetV1,\n MultiAssetV2,\n MultiAssetV3,\n MultiAssetV4,\n MultiAssets,\n MultiAssetsV1,\n MultiAssetsV2,\n MultiAssetsV3,\n MultiAssetsV4,\n MultiLocation,\n MultiLocationV0,\n MultiLocationV1,\n MultiLocationV2,\n MultiLocationV3,\n MultiLocationV4,\n NetworkId,\n NetworkIdV2,\n NetworkIdV3,\n NetworkIdV4,\n OriginKindV0,\n OriginKindV1,\n OriginKindV2,\n OriginKindV3,\n OriginKindV4,\n OutboundStatus,\n Outcome,\n OutcomeV4,\n PalletInfoV3,\n PalletInfoV4,\n QueryId,\n QueryResponseInfoV3,\n QueryResponseInfoV4,\n QueryStatus,\n QueueConfigData,\n Response,\n ResponseV0,\n ResponseV1,\n ResponseV2,\n ResponseV2Error,\n ResponseV3,\n ResponseV3Error,\n ResponseV3Result,\n ResponseV4,\n UncheckedFungibilityV4,\n VersionMigrationStage,\n VersionV3,\n VersionV4,\n VersionedMultiAsset,\n VersionedMultiAssets,\n VersionedMultiLocation,\n VersionedResponse,\n VersionedXcm,\n WeightLimitV2,\n WeightLimitV3,\n WildFungibility,\n WildFungibilityV0,\n WildFungibilityV1,\n WildFungibilityV2,\n WildFungibilityV3,\n WildFungibilityV4,\n WildMultiAsset,\n WildMultiAssetV1,\n WildMultiAssetV2,\n WildMultiAssetV3,\n WildMultiAssetV4,\n Xcm,\n XcmAssetId,\n XcmError,\n XcmErrorV0,\n XcmErrorV1,\n XcmErrorV2,\n XcmErrorV3,\n XcmErrorV4,\n XcmOrderV0,\n XcmOrderV1,\n XcmOrigin,\n XcmOriginKind,\n XcmV0,\n XcmV1,\n XcmV2,\n XcmV3,\n XcmV4,\n XcmVersion,\n XcmpMessageFormat,\n} from '@polkadot/types/interfaces/xcm';\nimport type { XcmPaymentApiError } from '@polkadot/types/interfaces/xcmPaymentApi';\nimport type { Error } from '@polkadot/types/interfaces/xcmRuntimeApi';\n\ndeclare module '@polkadot/types/types/registry' {\n interface InterfaceTypes {\n AbridgedCandidateReceipt: AbridgedCandidateReceipt;\n AbridgedHostConfiguration: AbridgedHostConfiguration;\n AbridgedHrmpChannel: AbridgedHrmpChannel;\n AccountData: AccountData;\n AccountId: AccountId;\n AccountId20: AccountId20;\n AccountId32: AccountId32;\n AccountId33: AccountId33;\n AccountIdOf: AccountIdOf;\n AccountIndex: AccountIndex;\n AccountInfo: AccountInfo;\n AccountInfoWithDualRefCount: AccountInfoWithDualRefCount;\n AccountInfoWithProviders: AccountInfoWithProviders;\n AccountInfoWithRefCount: AccountInfoWithRefCount;\n AccountInfoWithRefCountU8: AccountInfoWithRefCountU8;\n AccountInfoWithTripleRefCount: AccountInfoWithTripleRefCount;\n AccountStatus: AccountStatus;\n AccountValidity: AccountValidity;\n AccountVote: AccountVote;\n AccountVoteSplit: AccountVoteSplit;\n AccountVoteStandard: AccountVoteStandard;\n ActiveEraInfo: ActiveEraInfo;\n ActiveGilt: ActiveGilt;\n ActiveGiltsTotal: ActiveGiltsTotal;\n ActiveIndex: ActiveIndex;\n ActiveRecovery: ActiveRecovery;\n Address: Address;\n AliveContractInfo: AliveContractInfo;\n AllowedSlots: AllowedSlots;\n AnySignature: AnySignature;\n ApiId: ApiId;\n ApplyExtrinsicResult: ApplyExtrinsicResult;\n ApplyExtrinsicResultPre6: ApplyExtrinsicResultPre6;\n ApprovalFlag: ApprovalFlag;\n Approvals: Approvals;\n ApprovalVotingParams: ApprovalVotingParams;\n ArithmeticError: ArithmeticError;\n AssetApproval: AssetApproval;\n AssetApprovalKey: AssetApprovalKey;\n AssetBalance: AssetBalance;\n AssetDestroyWitness: AssetDestroyWitness;\n AssetDetails: AssetDetails;\n AssetId: AssetId;\n AssetIdV2: AssetIdV2;\n AssetIdV3: AssetIdV3;\n AssetIdV4: AssetIdV4;\n AssetInstance: AssetInstance;\n AssetInstanceV0: AssetInstanceV0;\n AssetInstanceV1: AssetInstanceV1;\n AssetInstanceV2: AssetInstanceV2;\n AssetInstanceV3: AssetInstanceV3;\n AssetInstanceV4: AssetInstanceV4;\n AssetMetadata: AssetMetadata;\n AssetOptions: AssetOptions;\n AssignmentId: AssignmentId;\n AssignmentKind: AssignmentKind;\n AsyncBackingParams: AsyncBackingParams;\n AttestedCandidate: AttestedCandidate;\n AuctionIndex: AuctionIndex;\n AuthIndex: AuthIndex;\n AuthorityDiscoveryId: AuthorityDiscoveryId;\n AuthorityId: AuthorityId;\n AuthorityIndex: AuthorityIndex;\n AuthorityList: AuthorityList;\n AuthoritySet: AuthoritySet;\n AuthoritySetChange: AuthoritySetChange;\n AuthoritySetChanges: AuthoritySetChanges;\n AuthoritySignature: AuthoritySignature;\n AuthorityWeight: AuthorityWeight;\n AvailabilityBitfield: AvailabilityBitfield;\n AvailabilityBitfieldRecord: AvailabilityBitfieldRecord;\n BabeAuthorityWeight: BabeAuthorityWeight;\n BabeBlockWeight: BabeBlockWeight;\n BabeEpochConfiguration: BabeEpochConfiguration;\n BabeEquivocationProof: BabeEquivocationProof;\n BabeGenesisConfiguration: BabeGenesisConfiguration;\n BabeGenesisConfigurationV1: BabeGenesisConfigurationV1;\n BabeWeight: BabeWeight;\n BackedCandidate: BackedCandidate;\n BackingState: BackingState;\n Balance: Balance;\n BalanceLock: BalanceLock;\n BalanceLockTo212: BalanceLockTo212;\n BalanceOf: BalanceOf;\n BalanceStatus: BalanceStatus;\n BeefyAuthoritySet: BeefyAuthoritySet;\n BeefyCommitment: BeefyCommitment;\n BeefyCompactSignedCommitment: BeefyCompactSignedCommitment;\n BeefyEquivocationProof: BeefyEquivocationProof;\n BeefyId: BeefyId;\n BeefyKey: BeefyKey;\n BeefyNextAuthoritySet: BeefyNextAuthoritySet;\n BeefyPayload: BeefyPayload;\n BeefyPayloadId: BeefyPayloadId;\n BeefySignedCommitment: BeefySignedCommitment;\n BeefyVersionedFinalityProof: BeefyVersionedFinalityProof;\n BeefyVoteMessage: BeefyVoteMessage;\n BenchmarkBatch: BenchmarkBatch;\n BenchmarkConfig: BenchmarkConfig;\n BenchmarkList: BenchmarkList;\n BenchmarkMetadata: BenchmarkMetadata;\n BenchmarkParameter: BenchmarkParameter;\n BenchmarkResult: BenchmarkResult;\n Bid: Bid;\n Bidder: Bidder;\n BidKind: BidKind;\n BitVec: BitVec;\n Block: Block;\n BlockAttestations: BlockAttestations;\n BlockHash: BlockHash;\n BlockLength: BlockLength;\n BlockNumber: BlockNumber;\n BlockNumberFor: BlockNumberFor;\n BlockNumberOf: BlockNumberOf;\n BlockStats: BlockStats;\n BlockTrace: BlockTrace;\n BlockTraceEvent: BlockTraceEvent;\n BlockTraceEventData: BlockTraceEventData;\n BlockTraceSpan: BlockTraceSpan;\n BlockV0: BlockV0;\n BlockV1: BlockV1;\n BlockV2: BlockV2;\n BlockWeights: BlockWeights;\n BodyId: BodyId;\n BodyIdV2: BodyIdV2;\n BodyIdV3: BodyIdV3;\n BodyPart: BodyPart;\n BodyPartV2: BodyPartV2;\n BodyPartV3: BodyPartV3;\n bool: bool;\n Bool: Bool;\n Bounty: Bounty;\n BountyIndex: BountyIndex;\n BountyStatus: BountyStatus;\n BountyStatusActive: BountyStatusActive;\n BountyStatusCuratorProposed: BountyStatusCuratorProposed;\n BountyStatusPendingPayout: BountyStatusPendingPayout;\n BridgedBlockHash: BridgedBlockHash;\n BridgedBlockNumber: BridgedBlockNumber;\n BridgedHeader: BridgedHeader;\n BridgeMessageId: BridgeMessageId;\n BufferedSessionChange: BufferedSessionChange;\n Bytes: Bytes;\n Call: Call;\n CallDryRunEffects: CallDryRunEffects;\n CallHash: CallHash;\n CallHashOf: CallHashOf;\n CallIndex: CallIndex;\n CallOrigin: CallOrigin;\n CandidateCommitments: CandidateCommitments;\n CandidateDescriptor: CandidateDescriptor;\n CandidateEvent: CandidateEvent;\n CandidateHash: CandidateHash;\n CandidateInfo: CandidateInfo;\n CandidatePendingAvailability: CandidatePendingAvailability;\n CandidateReceipt: CandidateReceipt;\n ChainId: ChainId;\n ChainProperties: ChainProperties;\n ChainType: ChainType;\n ChangesTrieConfiguration: ChangesTrieConfiguration;\n ChangesTrieSignal: ChangesTrieSignal;\n CheckInherentsResult: CheckInherentsResult;\n ClassDetails: ClassDetails;\n ClassId: ClassId;\n ClassMetadata: ClassMetadata;\n CodecHash: CodecHash;\n CodeHash: CodeHash;\n CodeSource: CodeSource;\n CodeUploadRequest: CodeUploadRequest;\n CodeUploadResult: CodeUploadResult;\n CodeUploadResultValue: CodeUploadResultValue;\n CollationInfo: CollationInfo;\n CollationInfoV1: CollationInfoV1;\n CollatorId: CollatorId;\n CollatorSignature: CollatorSignature;\n CollectiveOrigin: CollectiveOrigin;\n CommittedCandidateReceipt: CommittedCandidateReceipt;\n CompactAssignments: CompactAssignments;\n CompactAssignmentsTo257: CompactAssignmentsTo257;\n CompactAssignmentsTo265: CompactAssignmentsTo265;\n CompactAssignmentsWith16: CompactAssignmentsWith16;\n CompactAssignmentsWith24: CompactAssignmentsWith24;\n CompactScore: CompactScore;\n CompactScoreCompact: CompactScoreCompact;\n ConfigData: ConfigData;\n Consensus: Consensus;\n ConsensusEngineId: ConsensusEngineId;\n Constraints: Constraints;\n ConsumedWeight: ConsumedWeight;\n ContractCallFlags: ContractCallFlags;\n ContractCallRequest: ContractCallRequest;\n ContractConstructorSpecLatest: ContractConstructorSpecLatest;\n ContractConstructorSpecV0: ContractConstructorSpecV0;\n ContractConstructorSpecV1: ContractConstructorSpecV1;\n ContractConstructorSpecV2: ContractConstructorSpecV2;\n ContractConstructorSpecV3: ContractConstructorSpecV3;\n ContractConstructorSpecV4: ContractConstructorSpecV4;\n ContractContractSpecV0: ContractContractSpecV0;\n ContractContractSpecV1: ContractContractSpecV1;\n ContractContractSpecV2: ContractContractSpecV2;\n ContractContractSpecV3: ContractContractSpecV3;\n ContractContractSpecV4: ContractContractSpecV4;\n ContractContractSpecV5: ContractContractSpecV5;\n ContractCryptoHasher: ContractCryptoHasher;\n ContractDiscriminant: ContractDiscriminant;\n ContractDisplayName: ContractDisplayName;\n ContractEnvironmentV4: ContractEnvironmentV4;\n ContractEventParamSpecLatest: ContractEventParamSpecLatest;\n ContractEventParamSpecV0: ContractEventParamSpecV0;\n ContractEventParamSpecV2: ContractEventParamSpecV2;\n ContractEventSpecLatest: ContractEventSpecLatest;\n ContractEventSpecV0: ContractEventSpecV0;\n ContractEventSpecV1: ContractEventSpecV1;\n ContractEventSpecV2: ContractEventSpecV2;\n ContractEventSpecV3: ContractEventSpecV3;\n ContractExecResult: ContractExecResult;\n ContractExecResultOk: ContractExecResultOk;\n ContractExecResultResult: ContractExecResultResult;\n ContractExecResultSuccessTo255: ContractExecResultSuccessTo255;\n ContractExecResultSuccessTo260: ContractExecResultSuccessTo260;\n ContractExecResultTo255: ContractExecResultTo255;\n ContractExecResultTo260: ContractExecResultTo260;\n ContractExecResultTo267: ContractExecResultTo267;\n ContractExecResultU64: ContractExecResultU64;\n ContractInfo: ContractInfo;\n ContractInstantiateResult: ContractInstantiateResult;\n ContractInstantiateResultTo267: ContractInstantiateResultTo267;\n ContractInstantiateResultTo299: ContractInstantiateResultTo299;\n ContractInstantiateResultU64: ContractInstantiateResultU64;\n ContractLayoutArray: ContractLayoutArray;\n ContractLayoutCell: ContractLayoutCell;\n ContractLayoutEnum: ContractLayoutEnum;\n ContractLayoutHash: ContractLayoutHash;\n ContractLayoutHashingStrategy: ContractLayoutHashingStrategy;\n ContractLayoutKey: ContractLayoutKey;\n ContractLayoutStruct: ContractLayoutStruct;\n ContractLayoutStructField: ContractLayoutStructField;\n ContractMessageParamSpecLatest: ContractMessageParamSpecLatest;\n ContractMessageParamSpecV0: ContractMessageParamSpecV0;\n ContractMessageParamSpecV2: ContractMessageParamSpecV2;\n ContractMessageSpecLatest: ContractMessageSpecLatest;\n ContractMessageSpecV0: ContractMessageSpecV0;\n ContractMessageSpecV1: ContractMessageSpecV1;\n ContractMessageSpecV2: ContractMessageSpecV2;\n ContractMessageSpecV3: ContractMessageSpecV3;\n ContractMetadata: ContractMetadata;\n ContractMetadataLatest: ContractMetadataLatest;\n ContractMetadataV0: ContractMetadataV0;\n ContractMetadataV1: ContractMetadataV1;\n ContractMetadataV2: ContractMetadataV2;\n ContractMetadataV3: ContractMetadataV3;\n ContractMetadataV4: ContractMetadataV4;\n ContractMetadataV5: ContractMetadataV5;\n ContractProject: ContractProject;\n ContractProjectContract: ContractProjectContract;\n ContractProjectInfo: ContractProjectInfo;\n ContractProjectSource: ContractProjectSource;\n ContractProjectV0: ContractProjectV0;\n ContractReturnFlags: ContractReturnFlags;\n ContractSelector: ContractSelector;\n ContractStorageKey: ContractStorageKey;\n ContractStorageLayout: ContractStorageLayout;\n ContractTypeSpec: ContractTypeSpec;\n Conviction: Conviction;\n CoreAssignment: CoreAssignment;\n CoreIndex: CoreIndex;\n CoreOccupied: CoreOccupied;\n CoreState: CoreState;\n CrateVersion: CrateVersion;\n CreatedBlock: CreatedBlock;\n CustomMetadata15: CustomMetadata15;\n CustomValueMetadata15: CustomValueMetadata15;\n Data: Data;\n DeferredOffenceOf: DeferredOffenceOf;\n DefunctVoter: DefunctVoter;\n DelayKind: DelayKind;\n DelayKindBest: DelayKindBest;\n Delegations: Delegations;\n DeletedContract: DeletedContract;\n DeliveredMessages: DeliveredMessages;\n DepositBalance: DepositBalance;\n DepositBalanceOf: DepositBalanceOf;\n DestroyWitness: DestroyWitness;\n Digest: Digest;\n DigestItem: DigestItem;\n DigestOf: DigestOf;\n DispatchClass: DispatchClass;\n DispatchError: DispatchError;\n DispatchErrorModule: DispatchErrorModule;\n DispatchErrorModulePre6: DispatchErrorModulePre6;\n DispatchErrorModuleU8: DispatchErrorModuleU8;\n DispatchErrorModuleU8a: DispatchErrorModuleU8a;\n DispatchErrorPre6: DispatchErrorPre6;\n DispatchErrorPre6First: DispatchErrorPre6First;\n DispatchErrorTo198: DispatchErrorTo198;\n DispatchFeePayment: DispatchFeePayment;\n DispatchInfo: DispatchInfo;\n DispatchInfoTo190: DispatchInfoTo190;\n DispatchInfoTo244: DispatchInfoTo244;\n DispatchOutcome: DispatchOutcome;\n DispatchOutcomePre6: DispatchOutcomePre6;\n DispatchResult: DispatchResult;\n DispatchResultOf: DispatchResultOf;\n DispatchResultTo198: DispatchResultTo198;\n DispatchResultWithPostInfo: DispatchResultWithPostInfo;\n DisputeLocation: DisputeLocation;\n DisputeProof: DisputeProof;\n DisputeResult: DisputeResult;\n DisputeState: DisputeState;\n DisputeStatement: DisputeStatement;\n DisputeStatementSet: DisputeStatementSet;\n DisputesTimeSlot: DisputesTimeSlot;\n DoubleEncodedCall: DoubleEncodedCall;\n DoubleVoteReport: DoubleVoteReport;\n DownwardMessage: DownwardMessage;\n EcdsaSignature: EcdsaSignature;\n Ed25519Signature: Ed25519Signature;\n EIP1559Transaction: EIP1559Transaction;\n EIP2930Transaction: EIP2930Transaction;\n ElectionCompute: ElectionCompute;\n ElectionPhase: ElectionPhase;\n ElectionResult: ElectionResult;\n ElectionResultToSpec10: ElectionResultToSpec10;\n ElectionScore: ElectionScore;\n ElectionSize: ElectionSize;\n ElectionStatus: ElectionStatus;\n EncodedFinalityProofs: EncodedFinalityProofs;\n EncodedJustification: EncodedJustification;\n Epoch: Epoch;\n EpochAuthorship: EpochAuthorship;\n Era: Era;\n EraIndex: EraIndex;\n EraPoints: EraPoints;\n EraRewardPoints: EraRewardPoints;\n EraRewards: EraRewards;\n Error: Error;\n ErrorMetadataLatest: ErrorMetadataLatest;\n ErrorMetadataV10: ErrorMetadataV10;\n ErrorMetadataV11: ErrorMetadataV11;\n ErrorMetadataV12: ErrorMetadataV12;\n ErrorMetadataV13: ErrorMetadataV13;\n ErrorMetadataV14: ErrorMetadataV14;\n ErrorMetadataV9: ErrorMetadataV9;\n EthAccessList: EthAccessList;\n EthAccessListItem: EthAccessListItem;\n EthAccount: EthAccount;\n EthAddress: EthAddress;\n EthBlock: EthBlock;\n EthBloom: EthBloom;\n EthCallRequest: EthCallRequest;\n EthereumAccountId: EthereumAccountId;\n EthereumAddress: EthereumAddress;\n EthereumLookupSource: EthereumLookupSource;\n EthereumSignature: EthereumSignature;\n EthFeeHistory: EthFeeHistory;\n EthFilter: EthFilter;\n EthFilterAddress: EthFilterAddress;\n EthFilterChanges: EthFilterChanges;\n EthFilterTopic: EthFilterTopic;\n EthFilterTopicEntry: EthFilterTopicEntry;\n EthFilterTopicInner: EthFilterTopicInner;\n EthHeader: EthHeader;\n EthLog: EthLog;\n EthReceipt: EthReceipt;\n EthReceiptV0: EthReceiptV0;\n EthReceiptV3: EthReceiptV3;\n EthRichBlock: EthRichBlock;\n EthRichHeader: EthRichHeader;\n EthStorageProof: EthStorageProof;\n EthSubKind: EthSubKind;\n EthSubParams: EthSubParams;\n EthSubResult: EthSubResult;\n EthSyncInfo: EthSyncInfo;\n EthSyncStatus: EthSyncStatus;\n EthTransaction: EthTransaction;\n EthTransactionAction: EthTransactionAction;\n EthTransactionCondition: EthTransactionCondition;\n EthTransactionRequest: EthTransactionRequest;\n EthTransactionSignature: EthTransactionSignature;\n EthTransactionStatus: EthTransactionStatus;\n EthWork: EthWork;\n Event: Event;\n EventId: EventId;\n EventIndex: EventIndex;\n EventMetadataLatest: EventMetadataLatest;\n EventMetadataV10: EventMetadataV10;\n EventMetadataV11: EventMetadataV11;\n EventMetadataV12: EventMetadataV12;\n EventMetadataV13: EventMetadataV13;\n EventMetadataV14: EventMetadataV14;\n EventMetadataV9: EventMetadataV9;\n EventRecord: EventRecord;\n EvmAccount: EvmAccount;\n EvmCallInfo: EvmCallInfo;\n EvmCallInfoV2: EvmCallInfoV2;\n EvmCreateInfo: EvmCreateInfo;\n EvmCreateInfoV2: EvmCreateInfoV2;\n EvmLog: EvmLog;\n EvmVicinity: EvmVicinity;\n EvmWeightInfo: EvmWeightInfo;\n ExecReturnValue: ExecReturnValue;\n ExecutorParam: ExecutorParam;\n ExecutorParams: ExecutorParams;\n ExecutorParamsHash: ExecutorParamsHash;\n ExitError: ExitError;\n ExitFatal: ExitFatal;\n ExitReason: ExitReason;\n ExitRevert: ExitRevert;\n ExitSucceed: ExitSucceed;\n ExplicitDisputeStatement: ExplicitDisputeStatement;\n Exposure: Exposure;\n ExtendedBalance: ExtendedBalance;\n Extrinsic: Extrinsic;\n ExtrinsicEra: ExtrinsicEra;\n ExtrinsicInclusionMode: ExtrinsicInclusionMode;\n ExtrinsicMetadataLatest: ExtrinsicMetadataLatest;\n ExtrinsicMetadataV11: ExtrinsicMetadataV11;\n ExtrinsicMetadataV12: ExtrinsicMetadataV12;\n ExtrinsicMetadataV13: ExtrinsicMetadataV13;\n ExtrinsicMetadataV14: ExtrinsicMetadataV14;\n ExtrinsicMetadataV15: ExtrinsicMetadataV15;\n ExtrinsicOrHash: ExtrinsicOrHash;\n ExtrinsicPayload: ExtrinsicPayload;\n ExtrinsicPayloadUnknown: ExtrinsicPayloadUnknown;\n ExtrinsicPayloadV4: ExtrinsicPayloadV4;\n ExtrinsicPayloadV5: ExtrinsicPayloadV5;\n ExtrinsicSignature: ExtrinsicSignature;\n ExtrinsicSignatureV4: ExtrinsicSignatureV4;\n ExtrinsicSignatureV5: ExtrinsicSignatureV5;\n ExtrinsicStatus: ExtrinsicStatus;\n ExtrinsicsWeight: ExtrinsicsWeight;\n ExtrinsicUnknown: ExtrinsicUnknown;\n ExtrinsicV4: ExtrinsicV4;\n ExtrinsicV5: ExtrinsicV5;\n f32: f32;\n F32: F32;\n f64: f64;\n F64: F64;\n FeeDetails: FeeDetails;\n Fixed128: Fixed128;\n Fixed64: Fixed64;\n FixedI128: FixedI128;\n FixedI64: FixedI64;\n FixedU128: FixedU128;\n FixedU64: FixedU64;\n Forcing: Forcing;\n ForkTreePendingChange: ForkTreePendingChange;\n ForkTreePendingChangeNode: ForkTreePendingChangeNode;\n FullIdentification: FullIdentification;\n FunctionArgumentMetadataLatest: FunctionArgumentMetadataLatest;\n FunctionArgumentMetadataV10: FunctionArgumentMetadataV10;\n FunctionArgumentMetadataV11: FunctionArgumentMetadataV11;\n FunctionArgumentMetadataV12: FunctionArgumentMetadataV12;\n FunctionArgumentMetadataV13: FunctionArgumentMetadataV13;\n FunctionArgumentMetadataV14: FunctionArgumentMetadataV14;\n FunctionArgumentMetadataV9: FunctionArgumentMetadataV9;\n FunctionMetadataLatest: FunctionMetadataLatest;\n FunctionMetadataV10: FunctionMetadataV10;\n FunctionMetadataV11: FunctionMetadataV11;\n FunctionMetadataV12: FunctionMetadataV12;\n FunctionMetadataV13: FunctionMetadataV13;\n FunctionMetadataV14: FunctionMetadataV14;\n FunctionMetadataV9: FunctionMetadataV9;\n FundIndex: FundIndex;\n FundInfo: FundInfo;\n Fungibility: Fungibility;\n FungibilityV0: FungibilityV0;\n FungibilityV1: FungibilityV1;\n FungibilityV2: FungibilityV2;\n FungibilityV3: FungibilityV3;\n FungibilityV4: FungibilityV4;\n FungiblesAccessError: FungiblesAccessError;\n Gas: Gas;\n GenesisBuildErr: GenesisBuildErr;\n GiltBid: GiltBid;\n GlobalValidationData: GlobalValidationData;\n GlobalValidationSchedule: GlobalValidationSchedule;\n GrandpaCommit: GrandpaCommit;\n GrandpaEquivocation: GrandpaEquivocation;\n GrandpaEquivocationProof: GrandpaEquivocationProof;\n GrandpaEquivocationValue: GrandpaEquivocationValue;\n GrandpaJustification: GrandpaJustification;\n GrandpaPrecommit: GrandpaPrecommit;\n GrandpaPrevote: GrandpaPrevote;\n GrandpaSignedPrecommit: GrandpaSignedPrecommit;\n GroupIndex: GroupIndex;\n GroupRotationInfo: GroupRotationInfo;\n H1024: H1024;\n H128: H128;\n H160: H160;\n H2048: H2048;\n H256: H256;\n H32: H32;\n H512: H512;\n H64: H64;\n Hash: Hash;\n HeadData: HeadData;\n Header: Header;\n HeaderPartial: HeaderPartial;\n Health: Health;\n Heartbeat: Heartbeat;\n HeartbeatTo244: HeartbeatTo244;\n HostConfiguration: HostConfiguration;\n HostFnWeights: HostFnWeights;\n HostFnWeightsTo264: HostFnWeightsTo264;\n HrmpChannel: HrmpChannel;\n HrmpChannelId: HrmpChannelId;\n HrmpOpenChannelRequest: HrmpOpenChannelRequest;\n i128: i128;\n I128: I128;\n i16: i16;\n I16: I16;\n i256: i256;\n I256: I256;\n i32: i32;\n I32: I32;\n I32F32: I32F32;\n i64: i64;\n I64: I64;\n i8: i8;\n I8: I8;\n IdentificationTuple: IdentificationTuple;\n IdentityFields: IdentityFields;\n IdentityInfo: IdentityInfo;\n IdentityInfoAdditional: IdentityInfoAdditional;\n IdentityInfoTo198: IdentityInfoTo198;\n IdentityJudgement: IdentityJudgement;\n ImmortalEra: ImmortalEra;\n ImportedAux: ImportedAux;\n InboundDownwardMessage: InboundDownwardMessage;\n InboundHrmpLimitations: InboundHrmpLimitations;\n InboundHrmpMessage: InboundHrmpMessage;\n InboundHrmpMessages: InboundHrmpMessages;\n InboundLaneData: InboundLaneData;\n InboundRelayer: InboundRelayer;\n InboundStatus: InboundStatus;\n IncludedBlocks: IncludedBlocks;\n InclusionFee: InclusionFee;\n IncomingParachain: IncomingParachain;\n IncomingParachainDeploy: IncomingParachainDeploy;\n IncomingParachainFixed: IncomingParachainFixed;\n Index: Index;\n IndicesLookupSource: IndicesLookupSource;\n IndividualExposure: IndividualExposure;\n InherentData: InherentData;\n InherentIdentifier: InherentIdentifier;\n InitializationData: InitializationData;\n InstanceDetails: InstanceDetails;\n InstanceId: InstanceId;\n InstanceMetadata: InstanceMetadata;\n InstantiateRequest: InstantiateRequest;\n InstantiateRequestV1: InstantiateRequestV1;\n InstantiateRequestV2: InstantiateRequestV2;\n InstantiateReturnValue: InstantiateReturnValue;\n InstantiateReturnValueOk: InstantiateReturnValueOk;\n InstantiateReturnValueTo267: InstantiateReturnValueTo267;\n InstructionV2: InstructionV2;\n InstructionV3: InstructionV3;\n InstructionV4: InstructionV4;\n InstructionWeights: InstructionWeights;\n InteriorMultiLocation: InteriorMultiLocation;\n InteriorMultiLocationV2: InteriorMultiLocationV2;\n InteriorMultiLocationV3: InteriorMultiLocationV3;\n InvalidDisputeStatementKind: InvalidDisputeStatementKind;\n InvalidTransaction: InvalidTransaction;\n isize: isize;\n ISize: ISize;\n Json: Json;\n Junction: Junction;\n Junctions: Junctions;\n JunctionsV1: JunctionsV1;\n JunctionsV2: JunctionsV2;\n JunctionsV3: JunctionsV3;\n JunctionsV4: JunctionsV4;\n JunctionV0: JunctionV0;\n JunctionV1: JunctionV1;\n JunctionV2: JunctionV2;\n JunctionV3: JunctionV3;\n JunctionV4: JunctionV4;\n Justification: Justification;\n JustificationNotification: JustificationNotification;\n Justifications: Justifications;\n Key: Key;\n KeyOwnerProof: KeyOwnerProof;\n Keys: Keys;\n KeyType: KeyType;\n KeyTypeId: KeyTypeId;\n KeyValue: KeyValue;\n KeyValueOption: KeyValueOption;\n Kind: Kind;\n LaneId: LaneId;\n LastContribution: LastContribution;\n LastRuntimeUpgradeInfo: LastRuntimeUpgradeInfo;\n LeasePeriod: LeasePeriod;\n LeasePeriodOf: LeasePeriodOf;\n LegacyTransaction: LegacyTransaction;\n Limits: Limits;\n LimitsTo264: LimitsTo264;\n LocalValidationData: LocalValidationData;\n LockIdentifier: LockIdentifier;\n LookupSource: LookupSource;\n LookupTarget: LookupTarget;\n LotteryConfig: LotteryConfig;\n MaxPalletNameLen: MaxPalletNameLen;\n MaxPalletsInfo: MaxPalletsInfo;\n MaybeErrorCodeV3: MaybeErrorCodeV3;\n MaybeRandomness: MaybeRandomness;\n MaybeVrf: MaybeVrf;\n MemberCount: MemberCount;\n MembershipProof: MembershipProof;\n MessageData: MessageData;\n MessageId: MessageId;\n MessageIngestionType: MessageIngestionType;\n MessageKey: MessageKey;\n MessageNonce: MessageNonce;\n MessageQueueChain: MessageQueueChain;\n MessagesDeliveryProofOf: MessagesDeliveryProofOf;\n MessagesProofOf: MessagesProofOf;\n MessagingStateSnapshot: MessagingStateSnapshot;\n MessagingStateSnapshotEgressEntry: MessagingStateSnapshotEgressEntry;\n MetadataAll: MetadataAll;\n MetadataLatest: MetadataLatest;\n MetadataV10: MetadataV10;\n MetadataV11: MetadataV11;\n MetadataV12: MetadataV12;\n MetadataV13: MetadataV13;\n MetadataV14: MetadataV14;\n MetadataV15: MetadataV15;\n MetadataV9: MetadataV9;\n MigrationStatusResult: MigrationStatusResult;\n Mixnode: Mixnode;\n MixnodesErr: MixnodesErr;\n MmrBatchProof: MmrBatchProof;\n MmrEncodableOpaqueLeaf: MmrEncodableOpaqueLeaf;\n MmrError: MmrError;\n MmrHash: MmrHash;\n MmrLeafBatchProof: MmrLeafBatchProof;\n MmrLeafIndex: MmrLeafIndex;\n MmrLeafProof: MmrLeafProof;\n MmrNodeIndex: MmrNodeIndex;\n MmrProof: MmrProof;\n MmrRootHash: MmrRootHash;\n ModuleConstantMetadataV10: ModuleConstantMetadataV10;\n ModuleConstantMetadataV11: ModuleConstantMetadataV11;\n ModuleConstantMetadataV12: ModuleConstantMetadataV12;\n ModuleConstantMetadataV13: ModuleConstantMetadataV13;\n ModuleConstantMetadataV9: ModuleConstantMetadataV9;\n ModuleId: ModuleId;\n ModuleMetadataV10: ModuleMetadataV10;\n ModuleMetadataV11: ModuleMetadataV11;\n ModuleMetadataV12: ModuleMetadataV12;\n ModuleMetadataV13: ModuleMetadataV13;\n ModuleMetadataV9: ModuleMetadataV9;\n Moment: Moment;\n MomentOf: MomentOf;\n MoreAttestations: MoreAttestations;\n MortalEra: MortalEra;\n MultiAddress: MultiAddress;\n MultiAsset: MultiAsset;\n MultiAssetFilter: MultiAssetFilter;\n MultiAssetFilterV1: MultiAssetFilterV1;\n MultiAssetFilterV2: MultiAssetFilterV2;\n MultiAssetFilterV3: MultiAssetFilterV3;\n MultiAssetFilterV4: MultiAssetFilterV4;\n MultiAssets: MultiAssets;\n MultiAssetsV1: MultiAssetsV1;\n MultiAssetsV2: MultiAssetsV2;\n MultiAssetsV3: MultiAssetsV3;\n MultiAssetsV4: MultiAssetsV4;\n MultiAssetV0: MultiAssetV0;\n MultiAssetV1: MultiAssetV1;\n MultiAssetV2: MultiAssetV2;\n MultiAssetV3: MultiAssetV3;\n MultiAssetV4: MultiAssetV4;\n MultiDisputeStatementSet: MultiDisputeStatementSet;\n MultiLocation: MultiLocation;\n MultiLocationV0: MultiLocationV0;\n MultiLocationV1: MultiLocationV1;\n MultiLocationV2: MultiLocationV2;\n MultiLocationV3: MultiLocationV3;\n MultiLocationV4: MultiLocationV4;\n Multiplier: Multiplier;\n Multisig: Multisig;\n MultiSignature: MultiSignature;\n MultiSigner: MultiSigner;\n NetworkId: NetworkId;\n NetworkIdV2: NetworkIdV2;\n NetworkIdV3: NetworkIdV3;\n NetworkIdV4: NetworkIdV4;\n NetworkState: NetworkState;\n NetworkStatePeerset: NetworkStatePeerset;\n NetworkStatePeersetInfo: NetworkStatePeersetInfo;\n NewBidder: NewBidder;\n NextAuthority: NextAuthority;\n NextConfigDescriptor: NextConfigDescriptor;\n NextConfigDescriptorV1: NextConfigDescriptorV1;\n NftCollectionId: NftCollectionId;\n NftItemId: NftItemId;\n NodeFeatures: NodeFeatures;\n NodeRole: NodeRole;\n Nominations: Nominations;\n NominatorIndex: NominatorIndex;\n NominatorIndexCompact: NominatorIndexCompact;\n NotConnectedPeer: NotConnectedPeer;\n NpApiError: NpApiError;\n NpPoolId: NpPoolId;\n Null: Null;\n OccupiedCore: OccupiedCore;\n OccupiedCoreAssumption: OccupiedCoreAssumption;\n OffchainAccuracy: OffchainAccuracy;\n OffchainAccuracyCompact: OffchainAccuracyCompact;\n OffenceDetails: OffenceDetails;\n Offender: Offender;\n OldV1SessionInfo: OldV1SessionInfo;\n OpaqueCall: OpaqueCall;\n OpaqueKeyOwnershipProof: OpaqueKeyOwnershipProof;\n OpaqueMetadata: OpaqueMetadata;\n OpaqueMultiaddr: OpaqueMultiaddr;\n OpaqueNetworkState: OpaqueNetworkState;\n OpaquePeerId: OpaquePeerId;\n OpaqueTimeSlot: OpaqueTimeSlot;\n OpenTip: OpenTip;\n OpenTipFinderTo225: OpenTipFinderTo225;\n OpenTipTip: OpenTipTip;\n OpenTipTo225: OpenTipTo225;\n OperatingMode: OperatingMode;\n OptionBool: OptionBool;\n Origin: Origin;\n OriginCaller: OriginCaller;\n OriginKindV0: OriginKindV0;\n OriginKindV1: OriginKindV1;\n OriginKindV2: OriginKindV2;\n OriginKindV3: OriginKindV3;\n OriginKindV4: OriginKindV4;\n OutboundHrmpChannelLimitations: OutboundHrmpChannelLimitations;\n OutboundHrmpMessage: OutboundHrmpMessage;\n OutboundLaneData: OutboundLaneData;\n OutboundMessageFee: OutboundMessageFee;\n OutboundPayload: OutboundPayload;\n OutboundStatus: OutboundStatus;\n Outcome: Outcome;\n OutcomeV4: OutcomeV4;\n OuterEnums15: OuterEnums15;\n OverweightIndex: OverweightIndex;\n Owner: Owner;\n PageCounter: PageCounter;\n PageIndexData: PageIndexData;\n PalletCallMetadataLatest: PalletCallMetadataLatest;\n PalletCallMetadataV14: PalletCallMetadataV14;\n PalletConstantMetadataLatest: PalletConstantMetadataLatest;\n PalletConstantMetadataV14: PalletConstantMetadataV14;\n PalletErrorMetadataLatest: PalletErrorMetadataLatest;\n PalletErrorMetadataV14: PalletErrorMetadataV14;\n PalletEventMetadataLatest: PalletEventMetadataLatest;\n PalletEventMetadataV14: PalletEventMetadataV14;\n PalletId: PalletId;\n PalletInfoV3: PalletInfoV3;\n PalletInfoV4: PalletInfoV4;\n PalletMetadataLatest: PalletMetadataLatest;\n PalletMetadataV14: PalletMetadataV14;\n PalletMetadataV15: PalletMetadataV15;\n PalletsOrigin: PalletsOrigin;\n PalletStorageMetadataLatest: PalletStorageMetadataLatest;\n PalletStorageMetadataV14: PalletStorageMetadataV14;\n PalletVersion: PalletVersion;\n ParachainDispatchOrigin: ParachainDispatchOrigin;\n ParachainInherentData: ParachainInherentData;\n ParachainProposal: ParachainProposal;\n ParachainsInherentData: ParachainsInherentData;\n ParaGenesisArgs: ParaGenesisArgs;\n ParaId: ParaId;\n ParaInfo: ParaInfo;\n ParaLifecycle: ParaLifecycle;\n Parameter: Parameter;\n ParaPastCodeMeta: ParaPastCodeMeta;\n ParaScheduling: ParaScheduling;\n ParathreadClaim: ParathreadClaim;\n ParathreadClaimQueue: ParathreadClaimQueue;\n ParathreadEntry: ParathreadEntry;\n ParaValidatorIndex: ParaValidatorIndex;\n Pays: Pays;\n Peer: Peer;\n PeerEndpoint: PeerEndpoint;\n PeerEndpointAddr: PeerEndpointAddr;\n PeerInfo: PeerInfo;\n PeerPing: PeerPing;\n PendingChange: PendingChange;\n PendingPause: PendingPause;\n PendingResume: PendingResume;\n PendingSlashes: PendingSlashes;\n Perbill: Perbill;\n Percent: Percent;\n PerDispatchClassU32: PerDispatchClassU32;\n PerDispatchClassWeight: PerDispatchClassWeight;\n PerDispatchClassWeightsPerClass: PerDispatchClassWeightsPerClass;\n Period: Period;\n Permill: Permill;\n PermissionLatest: PermissionLatest;\n PermissionsV1: PermissionsV1;\n PermissionVersions: PermissionVersions;\n Perquintill: Perquintill;\n PersistedValidationData: PersistedValidationData;\n PerU16: PerU16;\n Phantom: Phantom;\n PhantomData: PhantomData;\n Phase: Phase;\n PhragmenScore: PhragmenScore;\n Points: Points;\n PortableType: PortableType;\n PortableTypeV14: PortableTypeV14;\n PostDispatchInfo: PostDispatchInfo;\n Precommits: Precommits;\n PrefabWasmModule: PrefabWasmModule;\n PrefixedStorageKey: PrefixedStorageKey;\n PreimageStatus: PreimageStatus;\n PreimageStatusAvailable: PreimageStatusAvailable;\n PreRuntime: PreRuntime;\n Prevotes: Prevotes;\n Priority: Priority;\n PriorLock: PriorLock;\n PropIndex: PropIndex;\n Proposal: Proposal;\n ProposalIndex: ProposalIndex;\n ProxyAnnouncement: ProxyAnnouncement;\n ProxyDefinition: ProxyDefinition;\n ProxyState: ProxyState;\n ProxyType: ProxyType;\n PvfCheckStatement: PvfCheckStatement;\n PvfExecTimeoutKind: PvfExecTimeoutKind;\n PvfPrepTimeoutKind: PvfPrepTimeoutKind;\n QueryId: QueryId;\n QueryResponseInfoV3: QueryResponseInfoV3;\n QueryResponseInfoV4: QueryResponseInfoV4;\n QueryStatus: QueryStatus;\n QueueConfigData: QueueConfigData;\n QueuedParathread: QueuedParathread;\n Randomness: Randomness;\n Raw: Raw;\n RawAuraPreDigest: RawAuraPreDigest;\n RawBabePreDigest: RawBabePreDigest;\n RawBabePreDigestCompat: RawBabePreDigestCompat;\n RawBabePreDigestPrimary: RawBabePreDigestPrimary;\n RawBabePreDigestPrimaryTo159: RawBabePreDigestPrimaryTo159;\n RawBabePreDigestSecondaryPlain: RawBabePreDigestSecondaryPlain;\n RawBabePreDigestSecondaryTo159: RawBabePreDigestSecondaryTo159;\n RawBabePreDigestSecondaryVRF: RawBabePreDigestSecondaryVRF;\n RawBabePreDigestTo159: RawBabePreDigestTo159;\n RawOrigin: RawOrigin;\n RawSolution: RawSolution;\n RawSolutionTo265: RawSolutionTo265;\n RawSolutionWith16: RawSolutionWith16;\n RawSolutionWith24: RawSolutionWith24;\n RawVRFOutput: RawVRFOutput;\n ReadProof: ReadProof;\n ReadySolution: ReadySolution;\n Reasons: Reasons;\n RecoveryConfig: RecoveryConfig;\n RefCount: RefCount;\n RefCountTo259: RefCountTo259;\n ReferendumIndex: ReferendumIndex;\n ReferendumInfo: ReferendumInfo;\n ReferendumInfoFinished: ReferendumInfoFinished;\n ReferendumInfoTo239: ReferendumInfoTo239;\n ReferendumStatus: ReferendumStatus;\n RegisteredParachainInfo: RegisteredParachainInfo;\n RegistrarIndex: RegistrarIndex;\n RegistrarInfo: RegistrarInfo;\n Registration: Registration;\n RegistrationJudgement: RegistrationJudgement;\n RegistrationTo198: RegistrationTo198;\n RelayBlockNumber: RelayBlockNumber;\n RelayChainBlockNumber: RelayChainBlockNumber;\n RelayChainHash: RelayChainHash;\n RelayerId: RelayerId;\n RelayHash: RelayHash;\n Releases: Releases;\n Remark: Remark;\n Renouncing: Renouncing;\n RentProjection: RentProjection;\n ReplacementTimes: ReplacementTimes;\n ReportedRoundStates: ReportedRoundStates;\n Reporter: Reporter;\n ReportIdOf: ReportIdOf;\n ReserveData: ReserveData;\n ReserveIdentifier: ReserveIdentifier;\n Response: Response;\n ResponseV0: ResponseV0;\n ResponseV1: ResponseV1;\n ResponseV2: ResponseV2;\n ResponseV2Error: ResponseV2Error;\n ResponseV3: ResponseV3;\n ResponseV3Error: ResponseV3Error;\n ResponseV3Result: ResponseV3Result;\n ResponseV4: ResponseV4;\n Retriable: Retriable;\n RewardDestination: RewardDestination;\n RewardPoint: RewardPoint;\n RoundSnapshot: RoundSnapshot;\n RoundState: RoundState;\n RpcMethods: RpcMethods;\n RuntimeApiMetadataLatest: RuntimeApiMetadataLatest;\n RuntimeApiMetadataV15: RuntimeApiMetadataV15;\n RuntimeApiMethodMetadataV15: RuntimeApiMethodMetadataV15;\n RuntimeApiMethodParamMetadataV15: RuntimeApiMethodParamMetadataV15;\n RuntimeCall: RuntimeCall;\n RuntimeDbWeight: RuntimeDbWeight;\n RuntimeDispatchInfo: RuntimeDispatchInfo;\n RuntimeDispatchInfoV1: RuntimeDispatchInfoV1;\n RuntimeDispatchInfoV2: RuntimeDispatchInfoV2;\n RuntimeEvent: RuntimeEvent;\n RuntimeVersion: RuntimeVersion;\n RuntimeVersionApi: RuntimeVersionApi;\n RuntimeVersionPartial: RuntimeVersionPartial;\n RuntimeVersionPre3: RuntimeVersionPre3;\n RuntimeVersionPre4: RuntimeVersionPre4;\n Schedule: Schedule;\n Scheduled: Scheduled;\n ScheduledCore: ScheduledCore;\n ScheduledTo254: ScheduledTo254;\n SchedulePeriod: SchedulePeriod;\n SchedulePriority: SchedulePriority;\n ScheduleTo212: ScheduleTo212;\n ScheduleTo258: ScheduleTo258;\n ScheduleTo264: ScheduleTo264;\n Scheduling: Scheduling;\n ScrapedOnChainVotes: ScrapedOnChainVotes;\n Seal: Seal;\n SealV0: SealV0;\n SeatHolder: SeatHolder;\n SeedOf: SeedOf;\n ServiceQuality: ServiceQuality;\n SessionIndex: SessionIndex;\n SessionInfo: SessionInfo;\n SessionInfoValidatorGroup: SessionInfoValidatorGroup;\n SessionKeys1: SessionKeys1;\n SessionKeys10: SessionKeys10;\n SessionKeys10B: SessionKeys10B;\n SessionKeys2: SessionKeys2;\n SessionKeys3: SessionKeys3;\n SessionKeys4: SessionKeys4;\n SessionKeys5: SessionKeys5;\n SessionKeys6: SessionKeys6;\n SessionKeys6B: SessionKeys6B;\n SessionKeys7: SessionKeys7;\n SessionKeys7B: SessionKeys7B;\n SessionKeys8: SessionKeys8;\n SessionKeys8B: SessionKeys8B;\n SessionKeys9: SessionKeys9;\n SessionKeys9B: SessionKeys9B;\n SessionPhase: SessionPhase;\n SessionStatus: SessionStatus;\n SetId: SetId;\n SetIndex: SetIndex;\n Si0Field: Si0Field;\n Si0LookupTypeId: Si0LookupTypeId;\n Si0Path: Si0Path;\n Si0Type: Si0Type;\n Si0TypeDef: Si0TypeDef;\n Si0TypeDefArray: Si0TypeDefArray;\n Si0TypeDefBitSequence: Si0TypeDefBitSequence;\n Si0TypeDefCompact: Si0TypeDefCompact;\n Si0TypeDefComposite: Si0TypeDefComposite;\n Si0TypeDefPhantom: Si0TypeDefPhantom;\n Si0TypeDefPrimitive: Si0TypeDefPrimitive;\n Si0TypeDefSequence: Si0TypeDefSequence;\n Si0TypeDefTuple: Si0TypeDefTuple;\n Si0TypeDefVariant: Si0TypeDefVariant;\n Si0TypeParameter: Si0TypeParameter;\n Si0Variant: Si0Variant;\n Si1Field: Si1Field;\n Si1LookupTypeId: Si1LookupTypeId;\n Si1Path: Si1Path;\n Si1Type: Si1Type;\n Si1TypeDef: Si1TypeDef;\n Si1TypeDefArray: Si1TypeDefArray;\n Si1TypeDefBitSequence: Si1TypeDefBitSequence;\n Si1TypeDefCompact: Si1TypeDefCompact;\n Si1TypeDefComposite: Si1TypeDefComposite;\n Si1TypeDefPrimitive: Si1TypeDefPrimitive;\n Si1TypeDefSequence: Si1TypeDefSequence;\n Si1TypeDefTuple: Si1TypeDefTuple;\n Si1TypeDefVariant: Si1TypeDefVariant;\n Si1TypeParameter: Si1TypeParameter;\n Si1Variant: Si1Variant;\n SiField: SiField;\n Signature: Signature;\n SignedAvailabilityBitfield: SignedAvailabilityBitfield;\n SignedAvailabilityBitfields: SignedAvailabilityBitfields;\n SignedBlock: SignedBlock;\n SignedBlockWithJustification: SignedBlockWithJustification;\n SignedBlockWithJustifications: SignedBlockWithJustifications;\n SignedExtensionMetadataLatest: SignedExtensionMetadataLatest;\n SignedExtensionMetadataV14: SignedExtensionMetadataV14;\n SignedSubmission: SignedSubmission;\n SignedSubmissionOf: SignedSubmissionOf;\n SignedSubmissionTo276: SignedSubmissionTo276;\n SignerPayload: SignerPayload;\n SigningContext: SigningContext;\n SiLookupTypeId: SiLookupTypeId;\n SiPath: SiPath;\n SiType: SiType;\n SiTypeDef: SiTypeDef;\n SiTypeDefArray: SiTypeDefArray;\n SiTypeDefBitSequence: SiTypeDefBitSequence;\n SiTypeDefCompact: SiTypeDefCompact;\n SiTypeDefComposite: SiTypeDefComposite;\n SiTypeDefPrimitive: SiTypeDefPrimitive;\n SiTypeDefSequence: SiTypeDefSequence;\n SiTypeDefTuple: SiTypeDefTuple;\n SiTypeDefVariant: SiTypeDefVariant;\n SiTypeParameter: SiTypeParameter;\n SiVariant: SiVariant;\n SlashingOffenceKind: SlashingOffenceKind;\n SlashingSpans: SlashingSpans;\n SlashingSpansTo204: SlashingSpansTo204;\n SlashJournalEntry: SlashJournalEntry;\n Slot: Slot;\n SlotDuration: SlotDuration;\n SlotNumber: SlotNumber;\n SlotRange: SlotRange;\n SlotRange10: SlotRange10;\n SocietyJudgement: SocietyJudgement;\n SocietyVote: SocietyVote;\n SolutionOrSnapshotSize: SolutionOrSnapshotSize;\n SolutionSupport: SolutionSupport;\n SolutionSupports: SolutionSupports;\n SpanIndex: SpanIndex;\n SpanRecord: SpanRecord;\n SpecVersion: SpecVersion;\n Sr25519Signature: Sr25519Signature;\n StakingLedger: StakingLedger;\n StakingLedgerTo223: StakingLedgerTo223;\n StakingLedgerTo240: StakingLedgerTo240;\n Statement: Statement;\n StatementKind: StatementKind;\n StatementStoreInvalidStatement: StatementStoreInvalidStatement;\n StatementStoreStatementSource: StatementStoreStatementSource;\n StatementStoreValidStatement: StatementStoreValidStatement;\n StorageChangeSet: StorageChangeSet;\n StorageData: StorageData;\n StorageDeposit: StorageDeposit;\n StorageEntryMetadataLatest: StorageEntryMetadataLatest;\n StorageEntryMetadataV10: StorageEntryMetadataV10;\n StorageEntryMetadataV11: StorageEntryMetadataV11;\n StorageEntryMetadataV12: StorageEntryMetadataV12;\n StorageEntryMetadataV13: StorageEntryMetadataV13;\n StorageEntryMetadataV14: StorageEntryMetadataV14;\n StorageEntryMetadataV9: StorageEntryMetadataV9;\n StorageEntryModifierLatest: StorageEntryModifierLatest;\n StorageEntryModifierV10: StorageEntryModifierV10;\n StorageEntryModifierV11: StorageEntryModifierV11;\n StorageEntryModifierV12: StorageEntryModifierV12;\n StorageEntryModifierV13: StorageEntryModifierV13;\n StorageEntryModifierV14: StorageEntryModifierV14;\n StorageEntryModifierV9: StorageEntryModifierV9;\n StorageEntryTypeLatest: StorageEntryTypeLatest;\n StorageEntryTypeV10: StorageEntryTypeV10;\n StorageEntryTypeV11: StorageEntryTypeV11;\n StorageEntryTypeV12: StorageEntryTypeV12;\n StorageEntryTypeV13: StorageEntryTypeV13;\n StorageEntryTypeV14: StorageEntryTypeV14;\n StorageEntryTypeV9: StorageEntryTypeV9;\n StorageHasher: StorageHasher;\n StorageHasherV10: StorageHasherV10;\n StorageHasherV11: StorageHasherV11;\n StorageHasherV12: StorageHasherV12;\n StorageHasherV13: StorageHasherV13;\n StorageHasherV14: StorageHasherV14;\n StorageHasherV9: StorageHasherV9;\n StorageInfo: StorageInfo;\n StorageKey: StorageKey;\n StorageKind: StorageKind;\n StorageMetadataV10: StorageMetadataV10;\n StorageMetadataV11: StorageMetadataV11;\n StorageMetadataV12: StorageMetadataV12;\n StorageMetadataV13: StorageMetadataV13;\n StorageMetadataV9: StorageMetadataV9;\n StorageProof: StorageProof;\n StoredPendingChange: StoredPendingChange;\n StoredState: StoredState;\n StrikeCount: StrikeCount;\n SubId: SubId;\n SubmissionIndicesOf: SubmissionIndicesOf;\n Supports: Supports;\n SyncState: SyncState;\n SystemInherentData: SystemInherentData;\n SystemOrigin: SystemOrigin;\n Tally: Tally;\n TaskAddress: TaskAddress;\n TAssetBalance: TAssetBalance;\n TAssetConversion: TAssetConversion;\n TAssetDepositBalance: TAssetDepositBalance;\n Text: Text;\n Timepoint: Timepoint;\n TokenError: TokenError;\n TombstoneContractInfo: TombstoneContractInfo;\n TraceBlockResponse: TraceBlockResponse;\n TraceError: TraceError;\n TransactionalError: TransactionalError;\n TransactionInfo: TransactionInfo;\n TransactionLongevity: TransactionLongevity;\n TransactionPriority: TransactionPriority;\n TransactionSource: TransactionSource;\n TransactionStorageProof: TransactionStorageProof;\n TransactionTag: TransactionTag;\n TransactionV0: TransactionV0;\n TransactionV1: TransactionV1;\n TransactionV2: TransactionV2;\n TransactionValidity: TransactionValidity;\n TransactionValidityError: TransactionValidityError;\n TransientValidationData: TransientValidationData;\n TreasuryProposal: TreasuryProposal;\n TrieId: TrieId;\n TrieIndex: TrieIndex;\n Type: Type;\n u128: u128;\n U128: U128;\n u16: u16;\n U16: U16;\n u256: u256;\n U256: U256;\n u32: u32;\n U32: U32;\n U32F32: U32F32;\n u64: u64;\n U64: U64;\n u8: u8;\n U8: U8;\n UnappliedSlash: UnappliedSlash;\n UnappliedSlashOther: UnappliedSlashOther;\n UncheckedFungibilityV4: UncheckedFungibilityV4;\n UncleEntryItem: UncleEntryItem;\n UnknownTransaction: UnknownTransaction;\n UnlockChunk: UnlockChunk;\n UnrewardedRelayer: UnrewardedRelayer;\n UnrewardedRelayersState: UnrewardedRelayersState;\n UpgradeGoAhead: UpgradeGoAhead;\n UpgradeRestriction: UpgradeRestriction;\n UpwardMessage: UpwardMessage;\n usize: usize;\n USize: USize;\n ValidationCode: ValidationCode;\n ValidationCodeHash: ValidationCodeHash;\n ValidationData: ValidationData;\n ValidationDataType: ValidationDataType;\n ValidationFunctionParams: ValidationFunctionParams;\n ValidatorCount: ValidatorCount;\n ValidatorId: ValidatorId;\n ValidatorIdOf: ValidatorIdOf;\n ValidatorIndex: ValidatorIndex;\n ValidatorIndexCompact: ValidatorIndexCompact;\n ValidatorPrefs: ValidatorPrefs;\n ValidatorPrefsTo145: ValidatorPrefsTo145;\n ValidatorPrefsTo196: ValidatorPrefsTo196;\n ValidatorPrefsWithBlocked: ValidatorPrefsWithBlocked;\n ValidatorPrefsWithCommission: ValidatorPrefsWithCommission;\n ValidatorSet: ValidatorSet;\n ValidatorSetId: ValidatorSetId;\n ValidatorSignature: ValidatorSignature;\n ValidDisputeStatementKind: ValidDisputeStatementKind;\n ValidityAttestation: ValidityAttestation;\n ValidTransaction: ValidTransaction;\n VecInboundHrmpMessage: VecInboundHrmpMessage;\n VersionedMultiAsset: VersionedMultiAsset;\n VersionedMultiAssets: VersionedMultiAssets;\n VersionedMultiLocation: VersionedMultiLocation;\n VersionedResponse: VersionedResponse;\n VersionedXcm: VersionedXcm;\n VersionMigrationStage: VersionMigrationStage;\n VersionV3: VersionV3;\n VersionV4: VersionV4;\n VestingInfo: VestingInfo;\n VestingSchedule: VestingSchedule;\n Vote: Vote;\n VoteIndex: VoteIndex;\n Voter: Voter;\n VoterInfo: VoterInfo;\n Votes: Votes;\n VotesTo230: VotesTo230;\n VoteThreshold: VoteThreshold;\n VoteWeight: VoteWeight;\n Voting: Voting;\n VotingDelegating: VotingDelegating;\n VotingDirect: VotingDirect;\n VotingDirectVote: VotingDirectVote;\n VouchingStatus: VouchingStatus;\n VrfData: VrfData;\n VrfOutput: VrfOutput;\n VrfProof: VrfProof;\n Weight: Weight;\n WeightLimitV2: WeightLimitV2;\n WeightLimitV3: WeightLimitV3;\n WeightMultiplier: WeightMultiplier;\n WeightPerClass: WeightPerClass;\n WeightToFeeCoefficient: WeightToFeeCoefficient;\n WeightV0: WeightV0;\n WeightV1: WeightV1;\n WeightV2: WeightV2;\n WildFungibility: WildFungibility;\n WildFungibilityV0: WildFungibilityV0;\n WildFungibilityV1: WildFungibilityV1;\n WildFungibilityV2: WildFungibilityV2;\n WildFungibilityV3: WildFungibilityV3;\n WildFungibilityV4: WildFungibilityV4;\n WildMultiAsset: WildMultiAsset;\n WildMultiAssetV1: WildMultiAssetV1;\n WildMultiAssetV2: WildMultiAssetV2;\n WildMultiAssetV3: WildMultiAssetV3;\n WildMultiAssetV4: WildMultiAssetV4;\n WinnersData: WinnersData;\n WinnersData10: WinnersData10;\n WinnersDataTuple: WinnersDataTuple;\n WinnersDataTuple10: WinnersDataTuple10;\n WinningData: WinningData;\n WinningData10: WinningData10;\n WinningDataEntry: WinningDataEntry;\n WithdrawReasons: WithdrawReasons;\n Xcm: Xcm;\n XcmAssetId: XcmAssetId;\n XcmDryRunApiError: XcmDryRunApiError;\n XcmDryRunEffects: XcmDryRunEffects;\n XcmError: XcmError;\n XcmErrorV0: XcmErrorV0;\n XcmErrorV1: XcmErrorV1;\n XcmErrorV2: XcmErrorV2;\n XcmErrorV3: XcmErrorV3;\n XcmErrorV4: XcmErrorV4;\n XcmOrderV0: XcmOrderV0;\n XcmOrderV1: XcmOrderV1;\n XcmOrigin: XcmOrigin;\n XcmOriginKind: XcmOriginKind;\n XcmPaymentApiError: XcmPaymentApiError;\n XcmpMessageFormat: XcmpMessageFormat;\n XcmV0: XcmV0;\n XcmV1: XcmV1;\n XcmV2: XcmV2;\n XcmV3: XcmV3;\n XcmV4: XcmV4;\n XcmVersion: XcmVersion;\n } // InterfaceTypes\n} // declare module\n","import { ArgonClient } from './index';\n\nexport interface IArgonCpiSnapshot {\n // The target price of the argon as a fixed point number (18 decimals)\n argonUsdTargetPrice: bigint;\n // The current price of the argon as a fixed point number (18 decimals)\n argonUsdPrice: bigint;\n // The block hash in which the cpi was finalized\n finalizedBlock: Uint8Array;\n tick: bigint;\n}\n\n/**\n * The WageProtector class is used to protect wages from inflation by using the current Argon Price Index to adjust the\n * baseAmount to current conditions. This ensures that the wage is always stable and does not lose or gain value based on\n * demand for the argon or fiat monetary supply changes.\n */\nexport class WageProtector {\n constructor(public latestCpi: IArgonCpiSnapshot) {}\n\n /**\n * Converts the base wage to the current wage using the latest CPI snapshot\n *\n * @param baseWage The base wage to convert\n * @returns The protected wage\n */\n public getProtectedWage(baseWage: bigint): bigint {\n return (\n (baseWage * this.latestCpi.argonUsdTargetPrice) /\n this.latestCpi.argonUsdPrice\n );\n }\n\n /**\n * Subscribes to the current CPI and calls the callback function whenever the CPI changes\n * @param client The ArgonClient to use\n * @param callback The callback function to call when the CPI changes\n * @returns An object with an unsubscribe function that can be called to stop the subscription\n */\n public static async subscribe(\n client: ArgonClient,\n callback: (cpi: WageProtector) => void,\n ): Promise<{\n unsubscribe: () => void;\n }> {\n const unsubscribe = await client.query.priceIndex.current(async cpi => {\n if (cpi.isNone) {\n return;\n }\n const finalizedBlock = await client.rpc.chain.getFinalizedHead();\n\n callback(\n new WageProtector({\n argonUsdTargetPrice: cpi.value.argonUsdTargetPrice.toBigInt(),\n argonUsdPrice: cpi.value.argonUsdPrice.toBigInt(),\n finalizedBlock: finalizedBlock.toU8a(),\n tick: cpi.value.tick.toBigInt(),\n }),\n );\n });\n return { unsubscribe };\n }\n\n /**\n * Creates a new WageProtector instance by subscribing to the current CPI and waiting for the first value\n * @param client The ArgonClient to use\n */\n public static async create(client: ArgonClient): Promise<WageProtector> {\n return new Promise<WageProtector>(async (resolve, reject) => {\n try {\n const { unsubscribe } = await WageProtector.subscribe(client, x => {\n resolve(x);\n unsubscribe();\n });\n } catch (e) {\n reject(e);\n }\n });\n }\n}\n","import type { ISubmittableResult } from '@polkadot/types/types/extrinsic';\nimport {\n ArgonClient,\n dispatchErrorToExtrinsicError,\n ExtrinsicError,\n GenericEvent,\n KeyringPair,\n} from './index';\nimport type { SubmittableExtrinsic } from '@polkadot/api/promise/types';\nimport type { SignerOptions } from '@polkadot/api/types';\n\nexport function logExtrinsicResult(result: ISubmittableResult) {\n if (process.env.DEBUG) {\n const json = result.status.toJSON() as any;\n const status = Object.keys(json)[0];\n console.debug('Transaction update: \"%s\"', status, json[status]);\n }\n}\n\nexport class TxSubmitter {\n constructor(\n public readonly client: ArgonClient,\n public tx: SubmittableExtrinsic,\n public pair: KeyringPair,\n ) {}\n\n public async feeEstimate(tip?: bigint): Promise<bigint> {\n const { partialFee } = await this.tx.paymentInfo(this.pair, { tip });\n return partialFee.toBigInt();\n }\n\n public async canAfford(\n options: {\n tip?: bigint;\n unavailableBalance?: bigint;\n includeExistentialDeposit?: boolean;\n } = {},\n ): Promise<{ canAfford: boolean; availableBalance: bigint; txFee: bigint }> {\n const { tip, unavailableBalance } = options;\n const account = await this.client.query.system.account(this.pair.address);\n let availableBalance = account.data.free.toBigInt();\n if (unavailableBalance) {\n availableBalance -= unavailableBalance;\n }\n const existentialDeposit = options.includeExistentialDeposit\n ? this.client.consts.balances.existentialDeposit.toBigInt()\n : 0n;\n const fees = await this.feeEstimate(tip);\n const totalCharge = fees + (tip ?? 0n);\n const canAfford = availableBalance > totalCharge + existentialDeposit;\n return { canAfford, availableBalance, txFee: fees };\n }\n\n public async submit(\n options: Partial<SignerOptions> & {\n logResults?: boolean;\n waitForBlock?: boolean;\n useLatestNonce?: boolean;\n } = {},\n ): Promise<TxResult> {\n const { logResults } = options;\n const result = new TxResult(this.client, logResults);\n let toHuman = (this.tx.toHuman() as any).method as any;\n let txString = [];\n let api = formatCall(toHuman);\n const args: any[] = [];\n if (api === 'proxy.proxy') {\n toHuman = toHuman.args.call;\n txString.push('Proxy');\n api = formatCall(toHuman);\n }\n if (api.startsWith('utility.batch')) {\n const calls = toHuman.args.calls.map(formatCall).join(', ');\n txString.push(`Batch[${calls}]`);\n } else {\n txString.push(api);\n args.push(toHuman.args);\n }\n args.unshift(txString.join('->'));\n if (options.useLatestNonce && !options.nonce) {\n options.nonce = await this.client.rpc.system.accountNextIndex(\n this.pair.address,\n );\n }\n\n console.log('Submitting transaction:', ...args);\n await this.tx.signAndSend(this.pair, options, result.onResult.bind(result));\n if (options.waitForBlock) {\n await result.inBlockPromise;\n }\n return result;\n }\n}\n\nfunction formatCall(call: any): string {\n return `${call.section}.${call.method}`;\n}\n\nexport class TxResult {\n public inBlockPromise: Promise<Uint8Array>;\n public finalizedPromise: Promise<Uint8Array>;\n public status?: ISubmittableResult['status'];\n public readonly events: GenericEvent[] = [];\n\n /**\n * The index of the batch that was interrupted, if any.\n */\n public batchInterruptedIndex?: number;\n public includedInBlock?: Uint8Array;\n /**\n * The final fee paid for the transaction, including the fee tip.\n */\n public finalFee?: bigint;\n /**\n * The fee tip paid for the transaction.\n */\n public finalFeeTip?: bigint;\n\n private inBlockResolve!: (blockHash: Uint8Array) => void;\n private inBlockReject!: (error: ExtrinsicError) => void;\n private finalizedResolve!: (blockHash: Uint8Array) => void;\n private finalizedReject!: (error: ExtrinsicError) => void;\n\n constructor(\n private readonly client: ArgonClient,\n private shouldLog: boolean = false,\n ) {\n this.inBlockPromise = new Promise((resolve, reject) => {\n this.inBlockResolve = resolve;\n this.inBlockReject = reject;\n });\n this.finalizedPromise = new Promise((resolve, reject) => {\n this.finalizedResolve = resolve;\n this.finalizedReject = reject;\n });\n // drown unhandled\n this.inBlockPromise.catch(() => {});\n this.finalizedPromise.catch(() => {});\n }\n\n public onResult(result: ISubmittableResult) {\n this.status = result.status;\n if (this.shouldLog) {\n logExtrinsicResult(result);\n }\n const { events, status, dispatchError, isFinalized } = result;\n if (status.isInBlock) {\n this.includedInBlock = status.asInBlock.toU8a();\n let encounteredError = dispatchError;\n let batchErrorIndex: number | undefined;\n for (const event of events) {\n this.events.push(event.event);\n if (this.client.events.utility.BatchInterrupted.is(event.event)) {\n batchErrorIndex = event.event.data[0].toNumber();\n this.batchInterruptedIndex = batchErrorIndex;\n encounteredError = event.event.data[1] as any;\n }\n if (\n this.client.events.transactionPayment.TransactionFeePaid.is(\n event.event,\n )\n ) {\n const [_who, actualFee, tip] = event.event.data;\n this.finalFee = actualFee.toBigInt();\n this.finalFeeTip = tip.toBigInt();\n }\n }\n\n if (encounteredError) {\n const error = dispatchErrorToExtrinsicError(\n this.client,\n encounteredError,\n batchErrorIndex,\n );\n this.reject(error);\n } else {\n this.inBlockResolve(status.asInBlock.toU8a());\n }\n }\n if (isFinalized) {\n this.finalizedResolve(status.asFinalized);\n }\n }\n\n private reject(error: ExtrinsicError) {\n this.inBlockReject(error);\n this.finalizedReject(error);\n }\n}\n","import BigNumber, * as BN from 'bignumber.js';\nimport type { ArgonClient, GenericEvent } from './index';\nimport type { DispatchError } from '@polkadot/types/interfaces';\nimport { EventRecord } from '@polkadot/types/interfaces/system';\n\nconst { ROUND_FLOOR } = BN;\n\nexport const MICROGONS_PER_ARGON = 1_000_000;\n\nexport function formatArgons(x: bigint | number): string {\n if (x === undefined || x === null) return 'na';\n const isNegative = x < 0;\n let format = BigNumber(x.toString())\n .abs()\n .div(MICROGONS_PER_ARGON)\n .toFormat(2, ROUND_FLOOR);\n if (format.endsWith('.00')) {\n format = format.slice(0, -3);\n }\n return `${isNegative ? '-' : ''}₳${format}`;\n}\n\nexport function formatPercent(x: BigNumber | undefined): string {\n if (!x) return 'na';\n return `${x.times(100).decimalPlaces(3)}%`;\n}\n\nexport function filterUndefined(obj: Record<string, any>): Record<string, any> {\n return Object.fromEntries(\n Object.entries(obj).filter(\n ([_, value]) => value !== undefined && value !== null,\n ),\n );\n}\n\nexport async function gettersToObject<T>(obj: T): Promise<T> {\n if (obj === null || obj === undefined || typeof obj !== 'object') return obj;\n\n const keys = [];\n // eslint-disable-next-line guard-for-in\n for (const key in obj) {\n keys.push(key);\n }\n\n if (Symbol.iterator in obj) {\n const iterableToArray = [];\n // @ts-ignore\n for (const item of obj) {\n iterableToArray.push(await gettersToObject(item));\n }\n return iterableToArray as any;\n }\n\n const result = {} as any;\n for (const key of keys) {\n const descriptor = Object.getOwnPropertyDescriptor(obj, key);\n // Skip functions\n if (descriptor && typeof descriptor.value === 'function') {\n continue;\n }\n const value =\n descriptor && descriptor.get\n ? descriptor.get.call(obj)\n : obj[key as keyof T];\n if (typeof value === 'function') continue;\n\n result[key] = await gettersToObject(value);\n }\n return result;\n}\n\nexport function convertFixedU128ToBigNumber(fixedU128: bigint): BigNumber {\n const decimalFactor = new BigNumber(10).pow(new BigNumber(18)); // Fixed point precision (18 decimals)\n const rawValue = new BigNumber(fixedU128.toString()); // Parse the u128 string value into BN\n // Convert the value to fixed-point\n return rawValue.div(decimalFactor);\n}\n\nexport function convertPermillToBigNumber(permill: bigint): BigNumber {\n const decimalFactor = new BigNumber(1_000_000);\n const rawValue = new BigNumber(permill.toString()); // Parse the u128 string value into BN\n // Convert the value to fixed-point\n return rawValue.div(decimalFactor);\n}\n\nexport function eventDataToJson(event: GenericEvent): any {\n const obj = {} as any;\n event.data.forEach((data, index) => {\n const name = event.data.names?.[index];\n obj[name ?? `${index}`] = data.toJSON();\n });\n return obj;\n}\n\nexport function dispatchErrorToString(\n client: ArgonClient,\n error: DispatchError,\n) {\n let message = error.toString();\n if (error.isModule) {\n const decoded = client.registry.findMetaError(error.asModule);\n const { docs, name, section } = decoded;\n message = `${section}.${name}: ${docs.join(' ')}`;\n }\n return message;\n}\n\n// ExtrinsicError\nexport class ExtrinsicError extends Error {\n constructor(\n public readonly errorCode: string,\n public readonly details?: string,\n public readonly batchInterruptedIndex?: number,\n ) {\n super(errorCode);\n }\n\n public override toString() {\n if (this.batchInterruptedIndex !== undefined) {\n return `${this.errorCode} ${this.details ?? ''} (Batch interrupted at index ${this.batchInterruptedIndex})`;\n }\n return `${this.errorCode} ${this.details ?? ''}`;\n }\n}\n\nexport function dispatchErrorToExtrinsicError(\n client: ArgonClient,\n error: DispatchError,\n batchInterruptedIndex?: number,\n) {\n if (error.isModule) {\n const decoded = client.registry.findMetaError(error.asModule);\n const { docs, name, section } = decoded;\n return new ExtrinsicError(\n `${section}.${name}`,\n docs.join(' '),\n batchInterruptedIndex,\n );\n }\n return new ExtrinsicError(error.toString(), undefined, batchInterruptedIndex);\n}\n\n/**\n * Check for an extrinsic success event in the given events. Helpful to validate the result of an extrinsic inclusion in a block (it will be included even if it fails)\n * @param events The events to check\n * @param client The client to use\n * @returns A promise that resolves if the extrinsic was successful, and rejects if it failed\n */\nexport function checkForExtrinsicSuccess(\n events: EventRecord[],\n client: ArgonClient,\n): Promise<void> {\n return new Promise((resolve, reject) => {\n for (const { event } of events) {\n if (client.events.system.ExtrinsicSuccess.is(event)) {\n resolve();\n } else if (client.events.system.ExtrinsicFailed.is(event)) {\n // extract the data for this event\n const [dispatchError] = event.data;\n let errorInfo = dispatchError.toString();\n\n if (dispatchError.isModule) {\n const decoded = client.registry.findMetaError(dispatchError.asModule);\n errorInfo = `${decoded.section}.${decoded.name}`;\n }\n\n reject(\n new Error(\n `${event.section}.${event.method}:: ExtrinsicFailed:: ${errorInfo}`,\n ),\n );\n }\n }\n });\n}\n\n/**\n * JSON with support for BigInt in JSON.stringify and JSON.parse\n */\nexport class JsonExt {\n public static stringify(obj: any, space?: number): string {\n return JSON.stringify(\n obj,\n (_, v) => (typeof v === 'bigint' ? `${v}n` : v),\n space,\n );\n }\n\n public static parse<T = any>(str: string): T {\n return JSON.parse(str, (_, v) => {\n if (typeof v === 'string' && v.endsWith('n')) {\n return BigInt(v.slice(0, -1));\n }\n return v;\n });\n }\n}\n","export class AccountRegistry {\n public namedAccounts: Map<string, string> = new Map();\n public me: string = 'me';\n\n constructor(name?: string) {\n if (name) {\n this.me = name;\n }\n }\n\n public getName(address: string): string | undefined {\n return this.namedAccounts.get(address);\n }\n\n public register(address: string, name: string): void {\n this.namedAccounts.set(address, name);\n }\n\n public static factory: (name?: string) => AccountRegistry = name =>\n new AccountRegistry(name);\n}\n","import {\n type ArgonClient,\n getClient,\n Keyring,\n type KeyringPair,\n} from './index';\nimport { dispatchErrorToString, formatArgons } from './utils';\nimport { logExtrinsicResult, TxSubmitter } from './TxSubmitter';\nimport { AccountRegistry } from './AccountRegistry';\nimport * as process from 'node:process';\nimport { SubmittableExtrinsic } from '@polkadot/api/promise/types';\nimport { AccountMiners } from './AccountMiners';\nimport { ApiDecoration } from '@polkadot/api/types';\n\nexport type SubaccountRange = readonly number[];\n\nexport type IAddressNames = Map<string, string>;\n\nexport interface ISubaccountMiner {\n address: string;\n seat?: number;\n bidAmount?: bigint;\n subaccountIndex: number;\n cohortId?: number;\n isLastDay: boolean;\n}\n\nexport class Accountset {\n public txSubmitterPair: KeyringPair;\n public isProxy = false;\n public seedAddress: string;\n public subAccountsByAddress: {\n [address: string]: { index: number; pair?: KeyringPair };\n } = {};\n public accountRegistry: AccountRegistry;\n public readonly client: Promise<ArgonClient>;\n\n public get addresses(): string[] {\n return [this.seedAddress, ...Object.keys(this.subAccountsByAddress)];\n }\n\n public get namedAccounts(): IAddressNames {\n return this.accountRegistry.namedAccounts;\n }\n\n private readonly sessionKeyMnemonic: string | undefined;\n\n constructor(\n options: {\n client: Promise<ArgonClient>;\n accountRegistry?: AccountRegistry;\n subaccountRange?: SubaccountRange;\n sessionKeyMnemonic?: string;\n name?: string;\n } & (\n | { seedAccount: KeyringPair }\n | {\n seedAddress: string;\n isProxy: true;\n txSubmitter: KeyringPair;\n }\n ),\n ) {\n if ('seedAccount' in options) {\n this.txSubmitterPair = options.seedAccount;\n this.seedAddress = options.seedAccount.address;\n this.isProxy = false;\n } else {\n this.isProxy = options.isProxy;\n this.txSubmitterPair = options.txSubmitter;\n this.seedAddress = options.seedAddress;\n }\n this.sessionKeyMnemonic = options.sessionKeyMnemonic;\n this.accountRegistry =\n options.accountRegistry ?? AccountRegistry.factory(options.name);\n this.client = options.client;\n const defaultRange = options.subaccountRange ?? getDefaultSubaccountRange();\n this.accountRegistry.register(\n this.seedAddress,\n `${this.accountRegistry.me}//seed`,\n );\n for (const i of defaultRange) {\n const pair = this.txSubmitterPair.derive(`//${i}`);\n this.subAccountsByAddress[pair.address] = { pair, index: i };\n this.accountRegistry.register(\n pair.address,\n `${this.accountRegistry.me}//${i}`,\n );\n }\n }\n\n public async submitterBalance(blockHash?: Uint8Array): Promise<bigint> {\n const client = await this.client;\n const api = blockHash ? await client.at(blockHash) : client;\n const accountData = await api.query.system.account(\n this.txSubmitterPair.address,\n );\n\n return accountData.data.free.toBigInt();\n }\n\n public async balance(blockHash?: Uint8Array): Promise<bigint> {\n const client = await this.client;\n const api = blockHash ? await client.at(blockHash) : client;\n const accountData = await api.query.system.account(this.seedAddress);\n\n return accountData.data.free.toBigInt();\n }\n\n public async totalArgonsAt(\n blockHash?: Uint8Array,\n ): Promise<{ address: string; amount: bigint; index: number }[]> {\n const client = await this.client;\n const api = blockHash ? await client.at(blockHash) : client;\n const addresses = this.addresses;\n const results = await api.query.system.account.multi(addresses);\n return results.map((account, i) => {\n const address = addresses[i];\n return {\n address,\n amount: account.data.free.toBigInt(),\n index: this.subAccountsByAddress[address]?.index ?? Number.NaN,\n };\n });\n }\n\n public async totalArgonotsAt(\n blockHash?: Uint8Array,\n ): Promise<{ address: string; amount: bigint; index: number }[]> {\n const client = await this.client;\n const api = blockHash ? await client.at(blockHash) : client;\n const addresses = this.addresses;\n const results = await api.query.ownership.account.multi(addresses);\n return results.map((account, i) => {\n const address = addresses[i];\n return {\n address,\n amount: account.free.toBigInt(),\n index: this.subAccountsByAddress[address]?.index ?? Number.NaN,\n };\n });\n }\n\n public async getAvailableMinerAccounts(\n maxSeats: number,\n ): Promise<{ index: number; isRebid: boolean; address: string }[]> {\n const miningSeats = await this.miningSeats();\n const subaccountRange = [];\n for (const seat of miningSeats) {\n if (seat.hasWinningBid) {\n continue;\n }\n if (seat.isLastDay || seat.seat === undefined) {\n subaccountRange.push({\n index: seat.subaccountIndex,\n isRebid: seat.seat !== undefined,\n address: seat.address,\n });\n if (subaccountRange.length >= maxSeats) {\n break;\n }\n }\n }\n return subaccountRange;\n }\n\n public async loadRegisteredMiners(\n api: ApiDecoration<'promise'>,\n ): Promise<ISubaccountMiner[]> {\n const addresses = Object.keys(this.subAccountsByAddress);\n const rawIndices =\n await api.query.miningSlot.accountIndexLookup.multi(addresses);\n const addressToMiningIndex: { [address: string]: number } = {};\n for (let i = 0; i < addresses.length; i++) {\n const address = addresses[i];\n if (rawIndices[i].isNone) continue;\n addressToMiningIndex[address] = rawIndices[i].value.toNumber();\n }\n const indices = Object.values(addressToMiningIndex).filter(\n x => x !== undefined,\n ) as number[];\n\n const indexRegistrations = indices.length\n ? await api.query.miningSlot.activeMinersByIndex.multi(indices)\n : [];\n const registrationBySeatIndex: {\n [seatIndex: string]: { cohortId: number; bidAmount: bigint };\n } = {};\n\n for (let i = 0; i < indices.length; i++) {\n const seatIndex = indices[i];\n const registration = indexRegistrations[i];\n if (registration?.isSome) {\n registrationBySeatIndex[seatIndex] = {\n cohortId: registration.value.cohortId.toNumber(),\n bidAmount: registration.value.bid.toBigInt(),\n };\n }\n }\n const nextCohortId = await api.query.miningSlot.nextCohortId();\n\n return addresses.map(address => {\n const seat = addressToMiningIndex[address];\n const registration = registrationBySeatIndex[seat];\n let isLastDay = false;\n if (registration?.cohortId) {\n isLastDay = nextCohortId.toNumber() - registration?.cohortId === 10;\n }\n return {\n ...registration,\n address,\n seat,\n isLastDay,\n subaccountIndex:\n this.subAccountsByAddress[address]?.index ?? Number.NaN,\n };\n });\n }\n\n public async miningSeats(blockHash?: Uint8Array): Promise<\n (ISubaccountMiner & {\n hasWinningBid: boolean;\n })[]\n > {\n const client = await this.client;\n const api = blockHash ? await client.at(blockHash) : client;\n const miners = await this.loadRegisteredMiners(api);\n\n const nextCohort = await api.query.miningSlot.nextSlotCohort();\n\n return miners.map(miner => {\n const bid = nextCohort.find(x => x.accountId.toHuman() === miner.address);\n return {\n ...miner,\n hasWinningBid: !!bid,\n bidAmount: bid?.bid.toBigInt() ?? miner.bidAmount,\n };\n });\n }\n\n public async bids(\n blockHash?: Uint8Array,\n ): Promise<\n { address: string; bidPlace?: number; index: number; bidAmount: bigint }[]\n > {\n const client = await this.client;\n const api = blockHash ? await client.at(blockHash) : client;\n const addresses = Object.keys(this.subAccountsByAddress);\n const nextCohort = await api.query.miningSlot.nextSlotCohort();\n\n const registrationsByAddress = Object.fromEntries(\n nextCohort.map((x, i) => [x.accountId.toHuman(), { ...x, index: i }]),\n );\n\n return addresses.map(address => {\n const entry = registrationsByAddress[address];\n\n return {\n address,\n bidPlace: entry?.index,\n bidAmount: entry?.bid?.toBigInt(),\n index: this.subAccountsByAddress[address]?.index ?? Number.NaN,\n };\n });\n }\n\n public async consolidate(\n subaccounts?: SubaccountRange,\n ): Promise<{ index: number; inBlock?: string; failedError?: Error }[]> {\n const client = await this.client;\n const accounts = this.getAccountsInRange(subaccounts);\n const results: { index: number; inBlock?: string; failedError?: Error }[] =\n [];\n await Promise.allSettled(\n accounts.map(({ pair, index }) => {\n if (!pair) {\n results.push({\n index,\n failedError: new Error(`No keypair for //${index}`),\n });\n return Promise.resolve();\n }\n return new Promise<void>(resolve => {\n client.tx.utility\n .batchAll([\n client.tx.balances.transferAll(this.seedAddress, true),\n client.tx.ownership.transferAll(this.seedAddress, true),\n ])\n .signAndSend(pair, cb => {\n logExtrinsicResult(cb);\n if (cb.dispatchError) {\n const error = dispatchErrorToString(client, cb.dispatchError);\n\n results.push({\n index,\n failedError: new Error(\n `Error consolidating //${index}: ${error}`,\n ),\n });\n resolve();\n }\n if (cb.isInBlock) {\n results.push({ index, inBlock: cb.status.asInBlock.toHex() });\n resolve();\n }\n })\n .catch(e => {\n results.push({ index, failedError: e });\n resolve();\n });\n });\n }),\n );\n return results;\n }\n\n public status(opts: {\n argons: Awaited<ReturnType<Accountset['totalArgonsAt']>>;\n argonots: Awaited<ReturnType<Accountset['totalArgonotsAt']>>;\n seats: Awaited<ReturnType<Accountset['miningSeats']>>;\n bids: Awaited<ReturnType<Accountset['bids']>>;\n accountSubset?: ReturnType<Accountset['getAccountsInRange']>;\n }): IAccountStatus[] {\n const { argons, argonots, accountSubset, bids, seats } = opts;\n const accounts: IAccountStatus[] = [\n {\n index: 'main',\n address: this.seedAddress,\n argons: formatArgons(\n argons.find(x => x.address === this.seedAddress)?.amount ?? 0n,\n ),\n argonots: formatArgons(\n argonots.find(x => x.address === this.seedAddress)?.amount ?? 0n,\n ),\n },\n ];\n for (const [address, { index }] of Object.entries(\n this.subAccountsByAddress,\n )) {\n const argonAmount = argons.find(x => x.address === address)?.amount ?? 0n;\n const argonotAmount =\n argonots.find(x => x.address === address)?.amount ?? 0n;\n const bid = bids.find(x => x.address === address);\n const seat = seats.find(x => x.address === address)?.seat;\n const entry: IAccountStatus = {\n index: ` //${index}`,\n address,\n argons: formatArgons(argonAmount),\n argonots: formatArgons(argonotAmount),\n seat,\n bidPlace: bid?.bidPlace,\n bidAmount: bid?.bidAmount ?? 0n,\n };\n if (accountSubset) {\n entry.isWorkingOn = accountSubset.some(x => x.address === address);\n }\n accounts.push(entry);\n }\n return accounts;\n }\n\n public async registerKeys(url: string) {\n const client = await getClient(url.replace('ws:', 'http:'));\n const keys = this.keys();\n for (const [name, key] of Object.entries(keys)) {\n console.log('Registering key', name, key.publicKey);\n const result = await client.rpc.author.insertKey(\n name,\n key.privateKey,\n key.publicKey,\n );\n // verify keys\n const saved = await client.rpc.author.hasKey(key.publicKey, name);\n if (!saved) {\n console.error('Failed to register key', name, key.publicKey);\n throw new Error(`Failed to register ${name} key ${key.publicKey}`);\n }\n console.log(`Registered ${name} key`, result.toHuman());\n }\n await client.disconnect();\n }\n\n public keys(keysVersion?: number): {\n gran: { privateKey: string; publicKey: string; rawPublicKey: Uint8Array };\n seal: { privateKey: string; publicKey: string; rawPublicKey: Uint8Array };\n } {\n let version = keysVersion ?? 0;\n if (process.env.KEYS_VERSION) {\n version = parseInt(process.env.KEYS_VERSION) ?? 0;\n }\n const seedMnemonic = this.sessionKeyMnemonic ?? process.env.KEYS_MNEMONIC;\n if (!seedMnemonic) {\n throw new Error(\n 'KEYS_MNEMONIC environment variable not set. Cannot derive keys.',\n );\n }\n const blockSealKey = `${seedMnemonic}//block-seal//${version}`;\n const granKey = `${seedMnemonic}//grandpa//${version}`;\n const blockSealAccount = new Keyring().createFromUri(blockSealKey, {\n type: 'ed25519',\n });\n const grandpaAccount = new Keyring().createFromUri(granKey, {\n type: 'ed25519',\n });\n return {\n seal: {\n privateKey: blockSealKey,\n publicKey: `0x${Buffer.from(blockSealAccount.publicKey).toString('hex')}`,\n rawPublicKey: blockSealAccount.publicKey,\n },\n gran: {\n privateKey: granKey,\n publicKey: `0x${Buffer.from(grandpaAccount.publicKey).toString('hex')}`,\n rawPublicKey: grandpaAccount.publicKey,\n },\n };\n }\n\n public async tx(tx: SubmittableExtrinsic): Promise<TxSubmitter> {\n const client = await this.client;\n return new TxSubmitter(client, tx, this.txSubmitterPair);\n }\n\n /**\n * Create but don't submit a mining bid transaction.\n * @param options\n */\n public async createMiningBidTx(options: {\n subaccounts: { address: string }[];\n bidAmount: bigint;\n sendRewardsToSeed?: boolean;\n }) {\n const client = await this.client;\n const { bidAmount, subaccounts, sendRewardsToSeed } = options;\n\n const batch = client.tx.utility.batch(\n subaccounts.map(x => {\n const keys = this.keys();\n const rewards = sendRewardsToSeed\n ? { Account: this.seedAddress }\n : { Owner: null };\n return client.tx.miningSlot.bid(\n bidAmount,\n rewards,\n {\n grandpa: keys.gran.rawPublicKey,\n blockSealAuthority: keys.seal.rawPublicKey,\n },\n x.address,\n );\n }),\n );\n\n let tx = batch;\n if (this.isProxy) {\n tx = client.tx.proxy.proxy(this.seedAddress, 'MiningBid', batch);\n }\n return new TxSubmitter(client, tx, this.txSubmitterPair);\n }\n\n /**\n * Create a mining bid. This will create a bid for each account in the given range from the seed account as funding.\n */\n public async createMiningBids(options: {\n subaccountRange?: SubaccountRange;\n bidAmount: bigint;\n tip?: bigint;\n sendRewardsToSeed?: boolean;\n }): Promise<{\n finalFee?: bigint;\n blockHash?: Uint8Array;\n bidError?: Error;\n successfulBids?: number;\n }> {\n const accounts = this.getAccountsInRange(options.subaccountRange);\n const client = await this.client;\n const submitter = await this.createMiningBidTx({\n ...options,\n subaccounts: accounts,\n });\n const { tip = 0n } = options;\n const txFee = await submitter.feeEstimate(tip);\n\n let minBalance = options.bidAmount * BigInt(accounts.length);\n let totalFees = tip + 1n + txFee;\n const seedBalance = await client.query.system\n .account(this.seedAddress)\n .then(x => x.data.free.toBigInt());\n if (!this.isProxy) {\n minBalance += totalFees;\n }\n if (seedBalance < minBalance) {\n throw new Error(\n `Insufficient balance to create mining bids. Seed account has ${formatArgons(\n seedBalance,\n )} but needs ${formatArgons(minBalance)}`,\n );\n }\n if (this.isProxy) {\n const { canAfford, availableBalance } = await submitter.canAfford({\n tip,\n });\n if (!canAfford) {\n throw new Error(\n `Insufficient balance to pay proxy fees. Proxy account has ${formatArgons(\n availableBalance,\n )} but needs ${formatArgons(totalFees)}`,\n );\n }\n }\n\n console.log('Creating bids', {\n perSeatBid: options.bidAmount,\n subaccounts: options.subaccountRange,\n txFee,\n });\n\n const txResult = await submitter.submit({\n tip,\n useLatestNonce: true,\n });\n\n const bidError = await txResult.inBlockPromise\n .then(() => undefined)\n .catch((x: Error) => x);\n return {\n finalFee: txResult.finalFee,\n bidError,\n blockHash: txResult.includedInBlock,\n successfulBids:\n txResult.batchInterruptedIndex !== undefined\n ? txResult.batchInterruptedIndex\n : accounts.length,\n };\n }\n\n public getAccountsInRange(range?: SubaccountRange): IAccountAndKey[] {\n const entries = new Set(range ?? getDefaultSubaccountRange());\n return Object.entries(this.subAccountsByAddress)\n .filter(([_, account]) => {\n return entries.has(account.index);\n })\n .map(([address, { pair, index }]) => ({ pair, index, address }));\n }\n\n public async watchBlocks(shouldLog: boolean = false): Promise<AccountMiners> {\n const accountMiners = await AccountMiners.loadAt(this, { shouldLog });\n await accountMiners.watch();\n return accountMiners;\n }\n}\n\nexport function getDefaultSubaccountRange(): number[] {\n try {\n return parseSubaccountRange(process.env.SUBACCOUNT_RANGE ?? '0-9')!;\n } catch {\n console.error(\n 'Failed to parse SUBACCOUNT_RANGE environment variable. Defaulting to 0-9. Please check the format of the SUBACCOUNT_RANGE variable.',\n );\n return Array.from({ length: 10 }, (_, i) => i);\n }\n}\n\nexport function parseSubaccountRange(range?: string): number[] | undefined {\n if (!range) {\n return undefined;\n }\n const indices = [];\n for (const entry of range.split(',')) {\n if (entry.includes('-')) {\n const [start, end] = entry.split('-').map(x => parseInt(x, 10));\n for (let i = start; i <= end; i++) {\n indices.push(i);\n }\n continue;\n }\n\n const record = parseInt(entry.trim(), 10);\n if (Number.isNaN(record) || !Number.isInteger(record)) {\n throw new Error(`Invalid range entry: ${entry}`);\n }\n if (Number.isInteger(record)) {\n indices.push(record);\n }\n }\n return indices;\n}\n\nexport type IAccountAndKey = {\n pair?: KeyringPair;\n index: number;\n address: string;\n};\n\ninterface IAccountStatus {\n index: string;\n address: string;\n argons: string;\n argonots: string;\n seat?: number;\n bidPlace?: number;\n bidAmount?: bigint;\n isWorkingOn?: boolean;\n}\n","import { type ArgonClient, type GenericEvent } from './index';\nimport type { Header, SignedBlock } from '@polkadot/types/interfaces';\nimport { eventDataToJson, formatArgons } from './utils';\nimport { createNanoEvents } from 'nanoevents';\n\nexport type BlockWatchEvents = {\n block: (\n header: Header,\n digests: { tick: number; author: string },\n events: GenericEvent[],\n ) => void;\n 'vaults-updated': (header: Header, vaultIds: Set<number>) => void;\n 'bitcoin-verified': (\n header: Header,\n lockedBitcoin: { utxoId: number; vaultId: number; amount: bigint },\n ) => void;\n 'mining-bid': (\n header: Header,\n bid: { amount: bigint; accountId: string },\n ) => void;\n 'mining-bid-ousted': (\n header: Header,\n bid: {\n preservedArgonotHold: boolean;\n accountId: string;\n },\n ) => void;\n event: (header: Header, event: GenericEvent) => void;\n};\n\nexport function getTickFromHeader(\n client: ArgonClient,\n header: Header,\n): number | undefined {\n for (const x of header.digest.logs) {\n if (x.isPreRuntime) {\n const [engineId, data] = x.asPreRuntime;\n if (engineId.toString() === 'aura') {\n return client.createType('u64', data).toNumber();\n }\n }\n }\n return undefined;\n}\n\nexport function getAuthorFromHeader(\n client: ArgonClient,\n header: Header,\n): string | undefined {\n for (const x of header.digest.logs) {\n if (x.isPreRuntime) {\n const [engineId, data] = x.asPreRuntime;\n if (engineId.toString() === 'pow_') {\n return client.createType('AccountId32', data).toHuman();\n }\n }\n }\n return undefined;\n}\n\nexport class BlockWatch {\n public readonly events = createNanoEvents<BlockWatchEvents>();\n public readonly obligationsById: {\n [obligationId: number]: {\n vaultId: number;\n amount: bigint;\n utxoId?: number;\n };\n } = {};\n public readonly obligationIdByUtxoId: {\n [utxoId: number]: number;\n } = {};\n private unsubscribe?: () => void;\n\n constructor(\n private readonly mainchain: Promise<ArgonClient>,\n private options: {\n finalizedBlocks?: boolean;\n shouldLog?: boolean;\n } = {},\n ) {\n this.options.shouldLog ??= true;\n this.options.finalizedBlocks ??= false;\n }\n\n public stop() {\n if (this.unsubscribe) {\n this.unsubscribe();\n this.unsubscribe = undefined;\n }\n }\n\n public async start() {\n await this.watchBlocks();\n }\n\n private async watchBlocks() {\n const client = await this.mainchain;\n const onBlock = async (header: Header) => {\n try {\n await this.processBlock(header);\n } catch (e) {\n console.error('Error processing block', e);\n }\n };\n if (this.options.finalizedBlocks) {\n this.unsubscribe =\n await client.rpc.chain.subscribeFinalizedHeads(onBlock);\n } else {\n this.unsubscribe = await client.rpc.chain.subscribeNewHeads(onBlock);\n }\n }\n\n private async processBlock(header: Header) {\n const client = await this.mainchain;\n\n if (this.options.shouldLog) {\n console.log(`-------------------------------------\nBLOCK #${header.number}, ${header.hash.toHuman()}`);\n }\n const blockHash = header.hash;\n const api = await client.at(blockHash);\n const isBlockVote = await api.query.blockSeal.isBlockFromVoteSeal();\n if (!isBlockVote) {\n console.warn('> Compute reactivated!');\n }\n const events = await api.query.system.events();\n const reloadVaults = new Set<number>();\n let block: SignedBlock | undefined = undefined;\n\n for (const { event, phase } of events) {\n const data = eventDataToJson(event);\n if (data.vaultId) {\n const vaultId = data.vaultId as number;\n reloadVaults.add(vaultId);\n }\n\n let logEvent = false;\n\n if (event.section === 'liquidityPools') {\n if (client.events.liquidityPools.BidPoolDistributed.is(event)) {\n const { bidPoolBurned, bidPoolDistributed } = event.data;\n data.burned = formatArgons(bidPoolBurned.toBigInt());\n data.distributed = formatArgons(bidPoolDistributed.toBigInt());\n logEvent = true;\n } else if (\n client.events.liquidityPools.NextBidPoolCapitalLocked.is(event)\n ) {\n const { totalActivatedCapital } = event.data;\n data.totalActivatedCapital = formatArgons(\n totalActivatedCapital.toBigInt(),\n );\n logEvent = true;\n }\n } else if (event.section === 'bitcoinLocks') {\n if (client.events.bitcoinLocks.BitcoinLockCreated.is(event)) {\n const { lockPrice, utxoId, accountId, vaultId } = event.data;\n this.obligationsById[utxoId.toNumber()] = {\n vaultId: vaultId.toNumber(),\n amount: lockPrice.toBigInt(),\n };\n data.lockPrice = formatArgons(lockPrice.toBigInt());\n data.accountId = accountId.toHuman();\n reloadVaults.add(vaultId.toNumber());\n }\n logEvent = true;\n } else if (event.section === 'mint') {\n logEvent = true;\n if (client.events.mint.MiningMint.is(event)) {\n const { amount } = event.data;\n data.amount = formatArgons(amount.toBigInt());\n }\n } else if (event.section === 'miningSlot') {\n logEvent = true;\n if (client.events.miningSlot.SlotBidderAdded.is(event)) {\n data.amount = formatArgons(event.data.bidAmount.toBigInt());\n this.events.emit('mining-bid', header, {\n amount: event.data.bidAmount.toBigInt(),\n accountId: event.data.accountId.toString(),\n });\n } else if (client.events.miningSlot.SlotBidderDropped.is(event)) {\n this.events.emit('mining-bid-ousted', header, {\n accountId: event.data.accountId.toString(),\n preservedArgonotHold: event.data.preservedArgonotHold.toPrimitive(),\n });\n }\n } else if (event.section === 'bitcoinUtxos') {\n logEvent = true;\n if (client.events.bitcoinUtxos.UtxoVerified.is(event)) {\n const { utxoId } = event.data;\n const details = await this.getBitcoinLockDetails(\n utxoId.toNumber(),\n blockHash,\n );\n this.events.emit('bitcoin-verified', header, {\n utxoId: utxoId.toNumber(),\n vaultId: details.vaultId,\n amount: details.amount,\n });\n\n data.amount = formatArgons(details.amount);\n reloadVaults.add(details.vaultId);\n }\n } else if (event.section === 'system') {\n if (client.events.system.ExtrinsicFailed.is(event)) {\n const { dispatchError } = event.data;\n if (dispatchError.isModule) {\n const decoded = api.registry.findMetaError(dispatchError.asModule);\n const { name, section } = decoded;\n block ??= await client.rpc.chain.getBlock(header.hash);\n const extrinsicIndex = phase.asApplyExtrinsic.toNumber();\n const ext = block!.block.extrinsics[extrinsicIndex];\n // translate dispatchInfo into readable tx\n if (this.options.shouldLog) {\n console.log(\n `> [Failed Tx] ${section}.${name} -> ${ext.method.section}.${ext.method.method} (nonce=${ext.nonce})`,\n (ext.toHuman() as any)?.method?.args,\n );\n }\n } else {\n // Other, CannotLookup, BadOrigin, no extra info\n if (this.options.shouldLog) {\n console.log(`x [Failed Tx] ${dispatchError.toJSON()}`);\n }\n }\n }\n }\n if (this.options.shouldLog && logEvent) {\n console.log(`> ${event.section}.${event.method}`, data);\n }\n this.events.emit('event', header, event);\n }\n if (reloadVaults.size)\n this.events.emit('vaults-updated', header, reloadVaults);\n\n const tick = getTickFromHeader(client, header)!;\n const author = getAuthorFromHeader(client, header)!;\n\n this.events.emit(\n 'block',\n header,\n { tick, author },\n events.map(x => x.event),\n );\n }\n\n private async getBitcoinLockDetails(\n utxoId: number,\n blockHash: Uint8Array,\n ): Promise<{ vaultId: number; amount: bigint; utxoId?: number }> {\n const client = await this.mainchain;\n const api = await client.at(blockHash);\n let obligationId = this.obligationIdByUtxoId[utxoId];\n if (!obligationId) {\n const lock = await api.query.bitcoinLocks.locksByUtxoId(utxoId);\n obligationId = lock.value.obligationId.toNumber();\n this.obligationIdByUtxoId[utxoId] = obligationId;\n this.obligationsById[obligationId] = {\n vaultId: lock.value.vaultId.toNumber(),\n amount: lock.value.lockPrice.toBigInt(),\n };\n }\n return this.obligationsById[obligationId];\n }\n}\n","import { type ArgonClient, getTickFromHeader, type Header } from './index';\n\n/**\n * A rotation is the period from noon EDT to the next noon EDT that a cohort of\n * miners rotates. The first rotation was the period between bidding start and Cohort 1 beginning.\n */\nexport class MiningRotations {\n private miningConfig:\n | { ticksBetweenSlots: number; slotBiddingStartAfterTicks: number }\n | undefined;\n private genesisTick: number | undefined;\n\n async getForTick(client: ArgonClient, tick: number) {\n this.miningConfig ??= await client.query.miningSlot\n .miningConfig()\n .then(x => ({\n ticksBetweenSlots: x.ticksBetweenSlots.toNumber(),\n slotBiddingStartAfterTicks: x.slotBiddingStartAfterTicks.toNumber(),\n }));\n this.genesisTick ??= await client.query.ticks\n .genesisTick()\n .then(x => x.toNumber());\n\n const ticksBetweenSlots = this.miningConfig!.ticksBetweenSlots;\n const slot1StartTick =\n this.genesisTick! +\n this.miningConfig!.slotBiddingStartAfterTicks +\n ticksBetweenSlots;\n if (tick < slot1StartTick) return 0;\n // Calculate the number of ticks since the start of bidding. Once bidding started, it was rotation 1\n const ticksSinceSlot1 = tick - slot1StartTick;\n\n return Math.floor(ticksSinceSlot1 / ticksBetweenSlots) + 1;\n }\n\n async getForHeader(client: ArgonClient, header: Header) {\n if (header.number.toNumber() === 0) return 0;\n const tick = getTickFromHeader(client, header);\n if (tick === undefined) return undefined;\n return this.getForTick(client, tick);\n }\n}\n","import { Accountset } from './Accountset';\nimport { Header } from '@polkadot/types/interfaces/runtime';\nimport { GenericEvent } from '@polkadot/types';\nimport { BlockWatch } from './BlockWatch';\nimport { MiningRotations } from './MiningRotations';\nimport { createNanoEvents } from 'nanoevents';\n\nexport class AccountMiners {\n public events = createNanoEvents<{\n mined: (\n header: Header,\n earnings: {\n author: string;\n argons: bigint;\n argonots: bigint;\n cohortId: number;\n rotation: number;\n },\n ) => void;\n minted: (\n header: Header,\n minted: {\n accountId: string;\n argons: bigint;\n cohortId: number;\n rotation: number;\n },\n ) => void;\n }>();\n\n public miningRotations: MiningRotations;\n\n private trackedAccountsByAddress: {\n [address: string]: { cohortId: number; subaccountIndex: number };\n } = {};\n\n constructor(\n private accountset: Accountset,\n registeredMiners: {\n cohortId: number;\n address: string;\n subaccountIndex: number;\n }[],\n private options: { shouldLog: boolean } = { shouldLog: false },\n ) {\n this.miningRotations = new MiningRotations();\n for (const seat of registeredMiners) {\n this.trackedAccountsByAddress[seat.address] = {\n cohortId: seat.cohortId,\n subaccountIndex: seat.subaccountIndex,\n };\n }\n }\n\n public async watch(): Promise<BlockWatch> {\n const blockWatch = new BlockWatch(this.accountset.client, {\n shouldLog: this.options.shouldLog,\n });\n blockWatch.events.on('block', this.onBlock.bind(this));\n await blockWatch.start();\n return blockWatch;\n }\n\n public async onBlock(\n header: Header,\n digests: { author: string; tick: number },\n events: GenericEvent[],\n ) {\n const { author, tick } = digests;\n if (author) {\n const voteAuthor = this.trackedAccountsByAddress[author];\n if (voteAuthor && this.options.shouldLog) {\n console.log(\n '> Our vote author',\n this.accountset.accountRegistry.getName(author),\n );\n }\n } else {\n console.warn('> No vote author found');\n }\n const client = await this.accountset.client;\n const rotation = await this.miningRotations.getForTick(client, tick);\n let newMiners: { cohortId: number; addresses: string[] } | undefined;\n const dataByCohort: {\n rotation: number;\n [cohortId: number]: {\n argonsMinted: bigint;\n argonsMined: bigint;\n argonotsMined: bigint;\n };\n } = { rotation };\n for (const event of events) {\n if (client.events.miningSlot.NewMiners.is(event)) {\n newMiners = {\n cohortId: event.data.cohortId.toNumber(),\n addresses: event.data.newMiners.map(x => x.accountId.toHuman()),\n };\n }\n if (client.events.blockRewards.RewardCreated.is(event)) {\n const { rewards } = event.data;\n for (const reward of rewards) {\n const { argons, ownership } = reward;\n\n const entry = this.trackedAccountsByAddress[author];\n if (entry) {\n dataByCohort[entry.cohortId] ??= {\n argonsMinted: 0n,\n argonsMined: 0n,\n argonotsMined: 0n,\n };\n dataByCohort[entry.cohortId].argonotsMined += ownership.toBigInt();\n dataByCohort[entry.cohortId].argonsMined += argons.toBigInt();\n this.events.emit('mined', header, {\n author,\n argons: argons.toBigInt(),\n argonots: ownership.toBigInt(),\n cohortId: entry.cohortId,\n rotation,\n });\n }\n }\n }\n if (client.events.mint.MiningMint.is(event)) {\n const { perMiner } = event.data;\n const amountPerMiner = perMiner.toBigInt();\n if (amountPerMiner > 0n) {\n for (const [address, info] of Object.entries(\n this.trackedAccountsByAddress,\n )) {\n const { cohortId } = info;\n dataByCohort[cohortId] ??= {\n argonsMinted: 0n,\n argonsMined: 0n,\n argonotsMined: 0n,\n };\n dataByCohort[cohortId].argonsMinted += amountPerMiner;\n this.events.emit('minted', header, {\n accountId: address,\n argons: amountPerMiner,\n cohortId,\n rotation,\n });\n }\n }\n }\n }\n if (newMiners) {\n this.newCohortMiners(newMiners.cohortId, newMiners.addresses);\n }\n return dataByCohort;\n }\n\n private newCohortMiners(cohortId: number, addresses: string[]) {\n for (const [address, info] of Object.entries(\n this.trackedAccountsByAddress,\n )) {\n if (info.cohortId === cohortId - 10) {\n delete this.trackedAccountsByAddress[address];\n }\n }\n for (const address of addresses) {\n const entry = this.accountset.subAccountsByAddress[address];\n if (entry) {\n this.trackedAccountsByAddress[address] = {\n cohortId,\n subaccountIndex: entry.index,\n };\n }\n }\n }\n\n public static async loadAt(\n accountset: Accountset,\n options: {\n blockHash?: Uint8Array;\n shouldLog?: boolean;\n } = {},\n ) {\n const seats = await accountset.miningSeats(options.blockHash);\n const registered = seats.filter(x => x.cohortId !== undefined);\n return new AccountMiners(accountset, registered as any, {\n shouldLog: options.shouldLog ?? false,\n });\n }\n}\n","import {\n type ArgonClient,\n type ArgonPrimitivesBlockSealMiningRegistration,\n formatArgons,\n type Bool,\n type u64,\n} from './index';\nimport { printTable } from 'console-table-printer';\nimport type { IAddressNames } from './Accountset';\n\nexport class MiningBids {\n public nextCohort: {\n accountId: string;\n isOurs: string;\n bidAmount: bigint;\n }[] = [];\n\n constructor(\n readonly client: Promise<ArgonClient>,\n private shouldLog = true,\n ) {}\n\n public async maxCohortSize(): Promise<number> {\n const client = await this.client;\n return client.consts.miningSlot.maxCohortSize.toNumber();\n }\n\n public async onCohortChange(options: {\n onBiddingStart?: (cohortId: number) => Promise<void>;\n onBiddingEnd?: (cohortId: number) => Promise<void>;\n }): Promise<{ unsubscribe: () => void }> {\n const { onBiddingStart, onBiddingEnd } = options;\n const client = await this.client;\n let openCohortId = 0;\n const unsubscribe = await client.queryMulti<[Bool, u64]>(\n [\n client.query.miningSlot.isNextSlotBiddingOpen as any,\n client.query.miningSlot.nextCohortId as any,\n ],\n async ([isBiddingOpen, rawNextCohortId]) => {\n const nextCohortId = rawNextCohortId.toNumber();\n\n if (isBiddingOpen.isTrue) {\n if (openCohortId !== 0) {\n await onBiddingEnd?.(openCohortId);\n }\n openCohortId = nextCohortId;\n await onBiddingStart?.(nextCohortId);\n } else {\n await onBiddingEnd?.(nextCohortId);\n openCohortId = 0;\n }\n },\n );\n return { unsubscribe };\n }\n\n public async watch(\n accountNames: IAddressNames,\n blockHash?: Uint8Array,\n printFn?: (blockNumber: number) => void,\n ): Promise<{ unsubscribe: () => void }> {\n const client = await this.client;\n const api = blockHash ? await client.at(blockHash) : client;\n const unsubscribe = await api.query.miningSlot.nextSlotCohort(\n async next => {\n this.nextCohort = await Promise.all(\n next.map(x => this.toBid(accountNames, x)),\n );\n if (!this.shouldLog) return;\n console.clear();\n const block = await client.query.system.number();\n if (!printFn) {\n console.log('At block', block.toNumber());\n this.print();\n } else {\n printFn(block.toNumber());\n }\n },\n );\n return { unsubscribe };\n }\n\n public async loadAt(\n accountNames: IAddressNames,\n blockHash?: Uint8Array,\n ): Promise<void> {\n const client = await this.client;\n const api = blockHash ? await client.at(blockHash) : client;\n const nextCohort = await api.query.miningSlot.nextSlotCohort();\n this.nextCohort = await Promise.all(\n nextCohort.map(x => this.toBid(accountNames, x)),\n );\n }\n\n private async toBid(\n accountNames: IAddressNames,\n bid: ArgonPrimitivesBlockSealMiningRegistration,\n ): Promise<MiningBids['nextCohort'][0]> {\n return {\n accountId: bid.accountId.toString(),\n isOurs: accountNames.get(bid.accountId.toString()) ?? 'n',\n bidAmount: bid.bid.toBigInt(),\n };\n }\n\n public print() {\n const bids = this.nextCohort.map(bid => {\n return {\n account: bid.accountId,\n isOurs: bid.isOurs,\n bidAmount: formatArgons(bid.bidAmount),\n };\n });\n if (bids.length) {\n console.log('\\n\\nMining Bids:');\n printTable(bids);\n }\n }\n}\n","import type { ArgonPrimitivesVault } from './index';\nimport BigNumber, * as BN from 'bignumber.js';\nimport {\n convertFixedU128ToBigNumber,\n convertPermillToBigNumber,\n} from './utils';\n\nconst { ROUND_FLOOR } = BN;\n\nexport class Vault {\n public securitization: bigint;\n public securitizationRatio: BigNumber;\n public bitcoinLocked: bigint;\n public bitcoinPending: bigint;\n public terms: ITerms;\n public operatorAccountId: string;\n public isClosed: boolean;\n public vaultId: number;\n public pendingTerms?: ITerms;\n public pendingTermsChangeTick?: number;\n public openedDate: Date;\n\n constructor(id: number, vault: ArgonPrimitivesVault, tickDuration: number) {\n this.securitization = vault.securitization.toBigInt();\n this.securitizationRatio = convertFixedU128ToBigNumber(\n vault.securitizationRatio.toBigInt(),\n );\n this.bitcoinLocked = vault.bitcoinLocked.toBigInt();\n this.bitcoinPending = vault.bitcoinPending.toBigInt();\n this.terms = {\n bitcoinAnnualPercentRate: convertFixedU128ToBigNumber(\n vault.terms.bitcoinAnnualPercentRate.toBigInt(),\n ),\n bitcoinBaseFee: vault.terms.bitcoinBaseFee.toBigInt(),\n liquidityPoolProfitSharing: convertPermillToBigNumber(\n vault.terms.liquidityPoolProfitSharing.toBigInt(),\n ),\n };\n\n this.operatorAccountId = vault.operatorAccountId.toString();\n this.isClosed = vault.isClosed.valueOf();\n this.vaultId = id;\n if (vault.pendingTerms.isSome) {\n const [tickApply, terms] = vault.pendingTerms.value;\n this.pendingTermsChangeTick = tickApply.toNumber();\n this.pendingTerms = {\n bitcoinAnnualPercentRate: convertFixedU128ToBigNumber(\n terms.bitcoinAnnualPercentRate.toBigInt(),\n ),\n bitcoinBaseFee: terms.bitcoinBaseFee.toBigInt(),\n liquidityPoolProfitSharing: convertPermillToBigNumber(\n vault.terms.liquidityPoolProfitSharing.toBigInt(),\n ),\n };\n }\n this.openedDate = vault.openedTick\n ? new Date(vault.openedTick.toNumber() * tickDuration)\n : new Date();\n }\n\n public availableBitcoinSpace(): bigint {\n const recoverySecuritization = this.recoverySecuritization();\n return this.securitization - recoverySecuritization - this.bitcoinLocked;\n }\n\n public recoverySecuritization(): bigint {\n const reserved = new BigNumber(1).div(this.securitizationRatio);\n return (\n this.securitization -\n BigInt(\n reserved\n .multipliedBy(this.securitization.toString())\n .toFixed(0, ROUND_FLOOR),\n )\n );\n }\n\n public minimumSecuritization(): bigint {\n return BigInt(\n this.securitizationRatio\n .multipliedBy(this.bitcoinLocked.toString())\n .decimalPlaces(0, BigNumber.ROUND_CEIL)\n .toString(),\n );\n }\n\n public activatedSecuritization(): bigint {\n const activated = this.bitcoinLocked - this.bitcoinPending;\n let maxRatio = this.securitizationRatio;\n if (this.securitizationRatio.toNumber() > 2) {\n maxRatio = BigNumber(2);\n }\n return BigInt(\n maxRatio.multipliedBy(activated.toString()).toFixed(0, ROUND_FLOOR),\n );\n }\n\n /**\n * Returns the amount of Argons available to match per liquidity pool\n */\n public activatedSecuritizationPerSlot(): bigint {\n const activated = this.activatedSecuritization();\n return activated / 10n;\n }\n\n public calculateBitcoinFee(amount: bigint): bigint {\n const fee = this.terms.bitcoinAnnualPercentRate\n .multipliedBy(Number(amount))\n .integerValue(BigNumber.ROUND_CEIL);\n return BigInt(fee.toString()) + this.terms.bitcoinBaseFee;\n }\n}\n\nexport interface ITerms {\n readonly bitcoinAnnualPercentRate: BigNumber;\n readonly bitcoinBaseFee: bigint;\n readonly liquidityPoolProfitSharing: BigNumber;\n}\n\nexport interface IBondedArgons {\n readonly allocated: bigint;\n readonly reserved: bigint;\n}\n","import {\n type ArgonClient,\n type ArgonPrimitivesVault,\n Option,\n Vault,\n BlockWatch,\n MiningBids,\n Accountset,\n formatArgons,\n formatPercent,\n} from './index';\nimport { printTable } from 'console-table-printer';\nimport { createNanoEvents } from 'nanoevents';\n\nexport class VaultMonitor {\n public events = createNanoEvents<{\n 'bitcoin-space-above': (vaultId: number, amount: bigint) => void;\n 'liquidity-pool-space-above': (vaultId: number, amount: bigint) => void;\n }>();\n public readonly vaultsById: { [id: number]: Vault } = {};\n public readonly blockWatch: BlockWatch;\n public readonly mainchain: Promise<ArgonClient>;\n public activatedCapitalByVault: { [vaultId: number]: bigint } = {};\n private lastPrintedBids: Uint8Array | undefined;\n private readonly miningBids: MiningBids;\n private tickDuration: number = 0;\n private vaultOnlyWatchMode: boolean = false;\n private shouldLog: boolean = true;\n\n constructor(\n readonly accountset: Accountset,\n readonly alerts: WatchAlerts = {},\n readonly options: {\n vaultOnlyWatchMode?: boolean;\n shouldLog?: boolean;\n } = {},\n ) {\n this.mainchain = accountset.client;\n if (options.vaultOnlyWatchMode !== undefined) {\n this.vaultOnlyWatchMode = options.vaultOnlyWatchMode;\n }\n if (options.shouldLog !== undefined) {\n this.shouldLog = options.shouldLog;\n }\n this.miningBids = new MiningBids(this.mainchain, this.shouldLog);\n this.blockWatch = new BlockWatch(this.mainchain, {\n shouldLog: this.shouldLog,\n });\n this.blockWatch.events.on('vaults-updated', (header, vaultIds) =>\n this.onVaultsUpdated(header.hash, vaultIds),\n );\n this.blockWatch.events.on('mining-bid', async (header, _bid) => {\n await this.miningBids.loadAt(this.accountset.namedAccounts, header.hash);\n this.printBids(header.hash);\n });\n this.blockWatch.events.on('mining-bid-ousted', async header => {\n await this.miningBids.loadAt(this.accountset.namedAccounts, header.hash);\n this.printBids(header.hash);\n });\n }\n\n public stop() {\n this.blockWatch.stop();\n }\n\n public async monitor(justPrint = false) {\n const client = await this.mainchain;\n\n this.tickDuration = (\n await client.query.ticks.genesisTicker()\n ).tickDurationMillis.toNumber();\n const blockHeader = await client.rpc.chain.getHeader();\n const blockHash = blockHeader.hash.toU8a();\n console.log(\n `${justPrint ? 'Run' : 'Started'} at block ${blockHeader.number} - ${blockHeader.hash.toHuman()}`,\n );\n\n await this.miningBids.loadAt(this.accountset.namedAccounts, blockHash);\n const vaults = await client.query.vaults.vaultsById.entries();\n for (const [storageKey, rawVault] of vaults) {\n const vaultId = storageKey.args[0].toNumber();\n this.updateVault(vaultId, rawVault);\n }\n\n await client.query.liquidityPools.nextLiquidityPoolCapital(x => {\n this.activatedCapitalByVault = {};\n for (const entry of x) {\n const vaultId = entry.vaultId.toNumber();\n this.activatedCapitalByVault[vaultId] =\n entry.activatedCapital.toBigInt();\n }\n for (const [vaultId, vault] of Object.entries(this.vaultsById)) {\n const id = Number(vaultId);\n this.activatedCapitalByVault[id] ??= 0n;\n this.checkMiningBondAlerts(id, vault);\n }\n });\n this.printVaults();\n if (!this.vaultOnlyWatchMode && this.shouldLog) {\n this.miningBids.print();\n }\n\n if (!justPrint) await this.blockWatch.start();\n }\n\n public printVaults() {\n if (!this.shouldLog) return;\n const vaults = [];\n for (const [vaultId, vault] of Object.entries(this.vaultsById)) {\n vaults.push({\n id: vaultId,\n btcSpace: `${formatArgons(vault.availableBitcoinSpace())} (${formatArgons(vault.bitcoinPending)} pending)`,\n btcDeal: `${formatArgons(vault.terms.bitcoinBaseFee)} + ${formatPercent(vault.terms.bitcoinAnnualPercentRate)}`,\n securitization: `${formatArgons(vault.securitization)} at ${vault.securitizationRatio.toFormat(1)}x`,\n securActivated: `${formatArgons(vault.activatedSecuritizationPerSlot())}/slot`,\n liquidPoolDeal: `${formatPercent(vault.terms.liquidityPoolProfitSharing)} sharing`,\n operator: `${this.accountset.namedAccounts.has(vault.operatorAccountId) ? ` (${this.accountset.namedAccounts.get(vault.operatorAccountId)})` : vault.operatorAccountId}`,\n state: vault.isClosed\n ? 'closed'\n : vault.openedDate < new Date()\n ? 'open'\n : 'pending',\n });\n }\n if (vaults.length) {\n if (this.vaultOnlyWatchMode) {\n console.clear();\n }\n console.log('\\n\\nVaults:');\n printTable(vaults);\n }\n }\n\n private async recheckAfterActive(vaultId: number) {\n const activationDate = this.vaultsById[vaultId].openedDate;\n if (this.shouldLog) {\n console.log(`Waiting for vault ${vaultId} to activate ${activationDate}`);\n }\n await new Promise(resolve =>\n setTimeout(resolve, activationDate.getTime() - Date.now()),\n );\n const client = await this.mainchain;\n let isReady = false;\n while (!isReady) {\n const rawVault = await client.query.vaults.vaultsById(vaultId);\n if (!rawVault.isSome) return;\n const vault = new Vault(vaultId, rawVault.value, this.tickDuration);\n this.vaultsById[vaultId] = vault;\n if (vault.isClosed) return;\n if (vault.openedDate < new Date()) {\n isReady = true;\n break;\n }\n await new Promise(resolve => setTimeout(resolve, 100));\n }\n this.checkAlerts(vaultId, this.vaultsById[vaultId]);\n }\n\n private async onVaultsUpdated(blockHash: Uint8Array, vaultIds: Set<number>) {\n await this.reloadVaultsAt([...vaultIds], blockHash).catch(err => {\n console.error(\n `Failed to reload vault ${[...vaultIds]} at block ${blockHash}:`,\n err,\n );\n });\n this.printVaults();\n }\n\n private async reloadVaultsAt(vaultIds: number[], blockHash: Uint8Array) {\n const client = await this.mainchain;\n const api = await client.at(blockHash);\n const vaults = await api.query.vaults.vaultsById.multi(vaultIds);\n for (let i = 0; i < vaultIds.length; i += 1) {\n this.updateVault(vaultIds[i], vaults[i]);\n }\n }\n\n private updateVault(vaultId: number, rawVault: Option<ArgonPrimitivesVault>) {\n if (rawVault.isNone) return;\n const vault = new Vault(vaultId, rawVault.value, this.tickDuration);\n this.vaultsById[vaultId] = vault;\n if (vault.openedDate > new Date()) {\n void this.recheckAfterActive(vaultId);\n } else {\n this.checkAlerts(vaultId, vault);\n }\n }\n\n private checkAlerts(vaultId: number, vault: Vault) {\n if (this.alerts.bitcoinSpaceAvailable !== undefined) {\n const availableBitcoinSpace = vault.availableBitcoinSpace();\n if (availableBitcoinSpace >= this.alerts.bitcoinSpaceAvailable) {\n console.warn(\n `Vault ${vaultId} has available bitcoins above ${formatArgons(this.alerts.bitcoinSpaceAvailable)}`,\n );\n this.events.emit('bitcoin-space-above', vaultId, availableBitcoinSpace);\n }\n }\n }\n\n private checkMiningBondAlerts(vaultId: number, vault: Vault) {\n if (this.alerts.liquidityPoolSpaceAvailable === undefined) return;\n\n const activatedSecuritization = vault.activatedSecuritizationPerSlot();\n const capitalization = this.activatedCapitalByVault[vaultId] ?? 0n;\n const available = activatedSecuritization - capitalization;\n if (available >= this.alerts.liquidityPoolSpaceAvailable) {\n this.events.emit('liquidity-pool-space-above', vaultId, available);\n }\n }\n\n private printBids(blockHash: Uint8Array) {\n if (!this.shouldLog) return;\n if (this.lastPrintedBids === blockHash) return;\n this.miningBids.print();\n this.lastPrintedBids = blockHash;\n }\n}\n\nexport type WatchAlerts = {\n /**\n * Alert when a vault has available space for bitcoins to move in greater than or equal to this amount\n */\n bitcoinSpaceAvailable?: bigint;\n /**\n * Liquidity pool space available\n */\n liquidityPoolSpaceAvailable?: bigint;\n};\n","import { convertFixedU128ToBigNumber, ExtrinsicError, JsonExt } from './utils';\nimport { AccountId } from '@polkadot/types/interfaces/runtime';\nimport { Compact, u128 } from '@polkadot/types-codec';\nimport { ArgonClient } from './index';\nimport { ApiDecoration } from '@polkadot/api/types';\n\nexport enum SeatReductionReason {\n InsufficientFunds = 'InsufficientFunds',\n MaxBidTooLow = 'MaxBidTooLow',\n MaxBudgetTooLow = 'MaxBudgetTooLow',\n}\n\nexport interface IBidHistoryEntry {\n cohortId: number;\n blockNumber: number;\n tick: number;\n // changes to the bid list\n bidChanges: {\n address: string;\n bidAmount: bigint;\n // null if no longer in the list\n bidPosition: number | null;\n // null if newly added\n prevPosition: number | null;\n // prev bid amount\n prevBidAmount?: bigint;\n }[];\n // activity by the bot\n myBidsPlaced?: {\n bids: number;\n bidPerSeat: bigint;\n txFeePlusTip: bigint;\n successfulBids: number;\n failureReason?: ExtrinsicError;\n };\n // my current winning number of bids\n winningSeats: number;\n // the max seats that are still in play\n maxSeatsInPlay: number;\n // did we reduce the max seats in play?\n maxSeatsReductionReason?: SeatReductionReason;\n}\n\nexport class CohortBidderHistory {\n public bidHistory: IBidHistoryEntry[] = [];\n\n public stats = {\n // number of seats won\n seatsWon: 0,\n // sum of argons bid in successful bids\n totalArgonsBid: 0n,\n // total number of bids placed (includes 1 per seat)\n bidsAttempted: 0,\n // fees including the tip\n fees: 0n,\n // Max bid per seat\n maxBidPerSeat: 0n,\n // The cost in argonots of each seat\n argonotsPerSeat: 0n,\n // The argonot price in USD for cost basis\n argonotUsdPrice: 0.0,\n // The cohort expected argons per block\n cohortArgonsPerBlock: 0n,\n // The last block that bids are synced to\n lastBlockNumber: 0,\n };\n private lastBids: { address: string; bid: bigint }[] = [];\n private readonly myAddresses: Set<string> = new Set();\n private maxSeatsInPlay: number = 0;\n\n constructor(\n readonly cohortId: number,\n readonly subaccounts: {\n index: number;\n isRebid: boolean;\n address: string;\n }[],\n ) {\n this.maxSeatsInPlay = this.subaccounts.length;\n this.subaccounts.forEach(x => {\n this.myAddresses.add(x.address);\n });\n }\n\n public async init(client: ArgonClient) {\n if (!this.stats.argonotsPerSeat) {\n const startingStats = await CohortBidderHistory.getStartingData(client);\n Object.assign(this.stats, startingStats);\n }\n }\n\n public maybeReducingSeats(\n maxSeats: number,\n reason: SeatReductionReason,\n historyEntry: IBidHistoryEntry,\n ): void {\n if (this.maxSeatsInPlay > maxSeats) {\n historyEntry.maxSeatsReductionReason = reason;\n }\n this.maxSeatsInPlay = maxSeats;\n historyEntry.maxSeatsInPlay = maxSeats;\n }\n\n public trackChange(\n next: { accountId: AccountId; bid: u128 | Compact<u128> }[],\n blockNumber: number,\n tick: number,\n isLastEntry = false,\n ): IBidHistoryEntry {\n let winningBids = 0;\n let totalArgonsBid = 0n;\n const nextEntrants: { address: string; bid: bigint }[] = [];\n for (const x of next) {\n const bid = x.bid.toBigInt();\n const address = x.accountId.toHuman();\n nextEntrants.push({ address, bid });\n if (this.myAddresses.has(address)) {\n winningBids++;\n totalArgonsBid += bid;\n }\n }\n this.stats.seatsWon = winningBids;\n this.stats.totalArgonsBid = totalArgonsBid;\n this.stats.lastBlockNumber = Math.max(\n blockNumber,\n this.stats.lastBlockNumber,\n );\n\n const historyEntry: IBidHistoryEntry = {\n cohortId: this.cohortId,\n blockNumber,\n tick,\n bidChanges: [],\n winningSeats: winningBids,\n maxSeatsInPlay: this.maxSeatsInPlay,\n };\n const hasDiffs =\n JsonExt.stringify(nextEntrants) !== JsonExt.stringify(this.lastBids);\n\n if (!isLastEntry || hasDiffs) {\n this.bidHistory.unshift(historyEntry);\n }\n if (hasDiffs) {\n nextEntrants.forEach(({ address, bid }, i) => {\n const prevBidIndex = this.lastBids.findIndex(\n y => y.address === address,\n );\n const entry: any = {\n address,\n bidAmount: bid,\n bidPosition: i,\n prevPosition: prevBidIndex === -1 ? null : prevBidIndex,\n };\n if (prevBidIndex !== -1) {\n const prevBidAmount = this.lastBids[prevBidIndex].bid;\n if (prevBidAmount !== bid) {\n entry.prevBidAmount = prevBidAmount;\n }\n }\n historyEntry.bidChanges.push(entry);\n });\n\n this.lastBids.forEach(({ address, bid }, i) => {\n const nextBid = nextEntrants.some(y => y.address === address);\n if (!nextBid) {\n historyEntry.bidChanges.push({\n address,\n bidAmount: bid,\n bidPosition: null,\n prevPosition: i,\n });\n }\n });\n this.lastBids = nextEntrants;\n }\n\n return historyEntry;\n }\n\n public onBidResult(\n historyEntry: IBidHistoryEntry,\n param: {\n txFeePlusTip: bigint;\n bidPerSeat: bigint;\n blockNumber: number | undefined;\n bidsAttempted: number;\n successfulBids: number;\n bidError?: ExtrinsicError;\n },\n ) {\n const {\n txFeePlusTip,\n bidPerSeat,\n bidsAttempted,\n successfulBids,\n blockNumber,\n bidError,\n } = param;\n this.stats.fees += txFeePlusTip;\n this.stats.bidsAttempted += bidsAttempted;\n if (bidPerSeat > this.stats.maxBidPerSeat) {\n this.stats.maxBidPerSeat = bidPerSeat;\n }\n if (blockNumber !== undefined) {\n this.stats.lastBlockNumber = Math.max(\n blockNumber,\n this.stats.lastBlockNumber,\n );\n }\n historyEntry.myBidsPlaced!.failureReason = bidError;\n historyEntry.myBidsPlaced!.successfulBids = successfulBids;\n historyEntry.myBidsPlaced!.txFeePlusTip = txFeePlusTip;\n }\n\n public static async getStartingData(\n api: ApiDecoration<'promise'>,\n ): Promise<\n Pick<\n CohortBidderHistory['stats'],\n 'argonotUsdPrice' | 'argonotsPerSeat' | 'cohortArgonsPerBlock'\n >\n > {\n const argonotPrice = await api.query.priceIndex.current();\n let argonotUsdPrice = 0;\n if (argonotPrice.isSome) {\n argonotUsdPrice = convertFixedU128ToBigNumber(\n argonotPrice.unwrap().argonotUsdPrice.toBigInt(),\n ).toNumber();\n }\n\n const argonotsPerSeat = await api.query.miningSlot\n .argonotsPerMiningSeat()\n .then(x => x.toBigInt());\n const cohortArgonsPerBlock = await api.query.blockRewards\n .argonsPerBlock()\n .then(x => x.toBigInt());\n return { argonotsPerSeat, argonotUsdPrice, cohortArgonsPerBlock };\n }\n}\n","import type { Accountset } from './Accountset';\nimport {\n ArgonClient,\n ArgonPrimitivesBlockSealMiningRegistration,\n ExtrinsicError,\n} from './index';\nimport { formatArgons } from './utils';\nimport { Bool, u64, Vec } from '@polkadot/types-codec';\nimport {\n CohortBidderHistory,\n IBidHistoryEntry,\n SeatReductionReason,\n} from './CohortBidderHistory';\n\nexport class CohortBidder {\n public get client(): Promise<ArgonClient> {\n return this.accountset.client;\n }\n\n public get stats(): CohortBidderHistory['stats'] {\n return this.history.stats;\n }\n\n public get bidHistory(): CohortBidderHistory['bidHistory'] {\n return this.history.bidHistory;\n }\n\n private unsubscribe?: () => void;\n private pendingRequest: Promise<any> | undefined;\n private retryTimeout?: NodeJS.Timeout;\n private isStopped = false;\n private needsRebid = false;\n private lastBidTime = 0;\n private history: CohortBidderHistory;\n\n private millisPerTick?: number;\n\n private readonly myAddresses = new Set<string>();\n\n constructor(\n public accountset: Accountset,\n public cohortId: number,\n public subaccounts: { index: number; isRebid: boolean; address: string }[],\n public options: {\n minBid: bigint;\n maxBid: bigint;\n maxBudget: bigint;\n bidIncrement: bigint;\n bidDelay: number;\n tipPerTransaction?: bigint;\n },\n ) {\n this.history = new CohortBidderHistory(cohortId, subaccounts);\n this.subaccounts.forEach(x => {\n this.myAddresses.add(x.address);\n });\n }\n\n public async stop(): Promise<CohortBidder['stats']> {\n if (this.isStopped) return this.stats;\n this.isStopped = true;\n console.log('Stopping bidder for cohort', this.cohortId);\n clearTimeout(this.retryTimeout);\n if (this.unsubscribe) {\n this.unsubscribe();\n }\n const client = await this.client;\n const [nextCohortId, isBiddingOpen] = await client.queryMulti<[u64, Bool]>([\n client.query.miningSlot.nextCohortId as any,\n client.query.miningSlot.isNextSlotBiddingOpen,\n ]);\n if (nextCohortId.toNumber() === this.cohortId && isBiddingOpen.isTrue) {\n console.log('Bidding is still open, waiting for it to close');\n await new Promise<void>(async resolve => {\n const unsub = await client.query.miningSlot.isNextSlotBiddingOpen(\n isOpen => {\n if (isOpen.isFalse) {\n unsub();\n resolve();\n }\n },\n );\n });\n }\n // wait for any pending request to finish updating stats\n void (await this.pendingRequest);\n\n // go back to last block with this cohort\n let header = await client.rpc.chain.getHeader();\n while (true) {\n const api = await client.at(header.hash);\n const cohortId = await api.query.miningSlot.nextCohortId();\n if (cohortId.toNumber() === this.cohortId) {\n break;\n }\n header = await client.rpc.chain.getHeader(header.parentHash);\n }\n const api = await client.at(header.hash);\n const tick = await api.query.ticks.currentTick().then(x => x.toNumber());\n const cohort = await api.query.miningSlot.nextSlotCohort();\n\n this.history.trackChange(cohort, header.number.toNumber(), tick, true);\n console.log('Bidder stopped', {\n cohortId: this.cohortId,\n blockNumber: header.number.toNumber(),\n tick,\n cohort: cohort.map(x => ({\n address: x.accountId.toHuman(),\n bid: x.bid.toBigInt(),\n })),\n });\n\n return this.stats;\n }\n\n public async start() {\n console.log(`Starting cohort ${this.cohortId} bidder`, {\n maxBid: formatArgons(this.options.maxBid),\n minBid: formatArgons(this.options.minBid),\n bidIncrement: formatArgons(this.options.bidIncrement),\n maxBudget: formatArgons(this.options.maxBudget),\n bidDelay: this.options.bidDelay,\n subaccounts: this.subaccounts,\n });\n\n const client = await this.client;\n await this.history.init(client);\n this.millisPerTick ??= await client.query.ticks\n .genesisTicker()\n .then(x => x.tickDurationMillis.toNumber());\n\n this.unsubscribe = await client.queryMulti<\n [Vec<ArgonPrimitivesBlockSealMiningRegistration>, u64]\n >(\n [\n client.query.miningSlot.nextSlotCohort as any,\n client.query.miningSlot.nextCohortId as any,\n ],\n async ([next, nextCohortId]) => {\n if (nextCohortId.toNumber() === this.cohortId) {\n await this.checkSeats(next);\n }\n },\n );\n }\n\n private async checkSeats(next: ArgonPrimitivesBlockSealMiningRegistration[]) {\n if (this.isStopped) return;\n clearTimeout(this.retryTimeout);\n\n const client = await this.client;\n const bestBlock = await client.rpc.chain.getBlockHash();\n const api = await client.at(bestBlock);\n const blockNumber = await api.query.system.number().then(x => x.toNumber());\n if (this.bidHistory[0]?.blockNumber >= blockNumber) {\n return;\n }\n const tick = await api.query.ticks.currentTick().then(x => x.toNumber());\n const historyEntry = this.history.trackChange(next, blockNumber, tick);\n\n if (this.pendingRequest) return;\n\n const ticksSinceLastBid = Math.floor(\n (Date.now() - this.lastBidTime) / this.millisPerTick!,\n );\n if (ticksSinceLastBid < this.options.bidDelay) {\n this.retryTimeout = setTimeout(\n () => void this.checkCurrentSeats(),\n this.millisPerTick!,\n );\n return;\n }\n console.log(\n 'Checking bids for cohort',\n this.cohortId,\n this.subaccounts.map(x => x.index),\n );\n\n const winningBids = historyEntry.winningSeats;\n this.needsRebid = winningBids < this.subaccounts.length;\n if (!this.needsRebid) return;\n\n const winningAddresses = new Set(next.map(x => x.accountId.toHuman()));\n let lowestBid = -this.options.bidIncrement;\n if (next.length) {\n for (let i = next.length - 1; i >= 0; i--) {\n // find the lowest bid that is not us\n if (!this.myAddresses.has(next[i].accountId.toHuman())) {\n lowestBid = next.at(i)!.bid.toBigInt();\n break;\n }\n }\n }\n const MIN_INCREMENT = 10_000n;\n\n // 1. determine next bid based on current bids and settings\n let nextBid = lowestBid + this.options.bidIncrement;\n if (nextBid < this.options.minBid) {\n nextBid = this.options.minBid;\n }\n if (nextBid > this.options.maxBid) {\n nextBid = this.options.maxBid;\n }\n\n const fakeTx = await this.accountset.createMiningBidTx({\n subaccounts: this.subaccounts,\n bidAmount: nextBid,\n sendRewardsToSeed: true,\n });\n let availableBalanceForBids = await api.query.system\n .account(this.accountset.txSubmitterPair.address)\n .then(x => x.data.free.toBigInt());\n\n // add our current balance used to the budget\n for (const bid of next) {\n if (this.myAddresses.has(bid.accountId.toHuman())) {\n availableBalanceForBids += bid.bid.toBigInt();\n }\n }\n const tip = this.options.tipPerTransaction ?? 0n;\n const feeEstimate = await fakeTx.feeEstimate(tip);\n const feePlusTip = feeEstimate + tip;\n\n let budgetForSeats = this.options.maxBudget - feePlusTip;\n if (budgetForSeats > availableBalanceForBids) {\n budgetForSeats = availableBalanceForBids - feePlusTip;\n }\n if (nextBid < lowestBid) {\n console.log(\n `Can't bid ${formatArgons(nextBid)}. Current lowest bid is ${formatArgons(\n lowestBid,\n )}.`,\n );\n this.history.maybeReducingSeats(\n winningBids,\n SeatReductionReason.MaxBidTooLow,\n historyEntry,\n );\n return;\n }\n\n if (nextBid - lowestBid < MIN_INCREMENT) {\n console.log(\n `Can't make any more bids for ${this.cohortId} with given constraints.`,\n {\n lowestCurrentBid: formatArgons(lowestBid),\n nextAttemptedBid: formatArgons(nextBid),\n maxBid: formatArgons(this.options.maxBid),\n },\n );\n this.history.maybeReducingSeats(\n winningBids,\n SeatReductionReason.MaxBidTooLow,\n historyEntry,\n );\n return;\n }\n\n const seatsInBudget =\n nextBid === 0n\n ? this.subaccounts.length\n : Number(budgetForSeats / nextBid);\n\n let accountsToUse = [...this.subaccounts];\n // 3. if we have more seats than we can afford, we need to remove some\n if (accountsToUse.length > seatsInBudget) {\n const reason =\n availableBalanceForBids - feePlusTip < nextBid * BigInt(seatsInBudget)\n ? SeatReductionReason.InsufficientFunds\n : SeatReductionReason.MaxBudgetTooLow;\n this.history.maybeReducingSeats(seatsInBudget, reason, historyEntry);\n // Sort accounts by winning bids first, then rebids, then by index\n accountsToUse.sort((a, b) => {\n const isWinningA = winningAddresses.has(a.address);\n const isWinningB = winningAddresses.has(b.address);\n if (isWinningA && !isWinningB) return -1;\n if (!isWinningA && isWinningB) return 1;\n\n if (a.isRebid && !b.isRebid) return -1;\n if (!a.isRebid && b.isRebid) return 1;\n return a.index - b.index;\n });\n // only keep the number of accounts we can afford\n accountsToUse.length = seatsInBudget;\n }\n if (accountsToUse.length > winningBids) {\n historyEntry.myBidsPlaced = {\n bids: accountsToUse.length,\n bidPerSeat: nextBid,\n txFeePlusTip: feePlusTip,\n successfulBids: 0,\n };\n this.pendingRequest = this.bid(nextBid, accountsToUse, historyEntry);\n } else if (historyEntry.bidChanges.length === 0) {\n this.history.bidHistory.shift();\n }\n this.needsRebid = false;\n }\n\n private async bid(\n bidPerSeat: bigint,\n subaccounts: { address: string }[],\n historyEntry: IBidHistoryEntry,\n ) {\n const prevLastBidTime = this.lastBidTime;\n try {\n this.lastBidTime = Date.now();\n const submitter = await this.accountset.createMiningBidTx({\n subaccounts,\n bidAmount: bidPerSeat,\n sendRewardsToSeed: true,\n });\n const tip = this.options.tipPerTransaction ?? 0n;\n const txResult = await submitter.submit({\n tip,\n useLatestNonce: true,\n });\n\n const bidError = await txResult.inBlockPromise\n .then(() => undefined)\n .catch((x: ExtrinsicError) => x);\n let blockNumber: number | undefined;\n if (txResult.includedInBlock) {\n const client = await this.client;\n const api = await client.at(txResult.includedInBlock);\n blockNumber = await api.query.system.number().then(x => x.toNumber());\n }\n\n const successfulBids =\n txResult.batchInterruptedIndex ?? subaccounts.length;\n this.history.onBidResult(historyEntry, {\n blockNumber,\n successfulBids,\n bidPerSeat,\n txFeePlusTip: txResult.finalFee ?? 0n,\n bidsAttempted: subaccounts.length,\n bidError,\n });\n\n console.log('Done creating bids for cohort', {\n successfulBids,\n bidPerSeat,\n blockNumber,\n });\n if (bidError) throw bidError;\n } catch (err) {\n this.lastBidTime = prevLastBidTime;\n console.error(`Error bidding for cohort ${this.cohortId}:`, err);\n clearTimeout(this.retryTimeout);\n this.retryTimeout = setTimeout(() => void this.checkCurrentSeats(), 1000);\n } finally {\n this.pendingRequest = undefined;\n }\n\n if (this.needsRebid) {\n this.needsRebid = false;\n await this.checkCurrentSeats();\n }\n }\n\n private async checkCurrentSeats() {\n const client = await this.client;\n const next = await client.query.miningSlot.nextSlotCohort();\n await this.checkSeats(next);\n }\n}\n","import {\n convertPermillToBigNumber,\n filterUndefined,\n formatArgons,\n formatPercent,\n} from './utils';\nimport { Table } from 'console-table-printer';\nimport BigNumber from 'bignumber.js';\nimport { BlockWatch } from './BlockWatch';\nimport {\n type ArgonClient,\n type ArgonPrimitivesBlockSealMiningRegistration,\n type KeyringPair,\n type u32,\n type u64,\n type Vec,\n} from './index';\nimport { Vault } from './Vault';\nimport {\n type PalletLiquidityPoolsLiquidityPool,\n type PalletLiquidityPoolsLiquidityPoolCapital,\n} from '@polkadot/types/lookup';\nimport { TxResult, TxSubmitter } from './TxSubmitter';\nimport { AccountRegistry } from './AccountRegistry';\n\nconst EMPTY_TABLE = {\n headerBottom: { left: ' ', mid: ' ', other: '─', right: ' ' },\n headerTop: { left: ' ', mid: ' ', other: ' ', right: ' ' },\n rowSeparator: { left: ' ', mid: ' ', other: ' ', right: ' ' },\n tableBottom: { left: ' ', mid: ' ', other: ' ', right: ' ' },\n vertical: ' ',\n};\n\ninterface IContributor {\n address: string;\n amount: bigint;\n}\n\ninterface IVaultMiningBondFund {\n activatedCapital: bigint;\n contributors?: IContributor[];\n vaultSharingPercent?: BigNumber;\n earnings?: bigint;\n}\n\nexport class BidPool {\n public bidPoolAmount: bigint = 0n;\n public nextCohortId: number = 1;\n public poolVaultCapitalByCohort: {\n [cohortId: number]: {\n [vaultId: number]: IVaultMiningBondFund;\n };\n } = {};\n\n private vaultSecuritization: {\n vaultId: number;\n activatedSecuritization: bigint;\n bitcoinSpace: bigint;\n vaultSharingPercent: BigNumber;\n }[] = [];\n private printTimeout?: NodeJS.Timeout;\n private blockWatch: BlockWatch;\n private vaultsById: { [id: number]: Vault } = {};\n private tickDuration?: number;\n private lastDistributedCohortId?: number;\n\n private cohortSubscriptions: { [cohortId: number]: () => void } = {};\n\n constructor(\n readonly client: Promise<ArgonClient>,\n readonly keypair: KeyringPair,\n readonly accountRegistry: AccountRegistry = AccountRegistry.factory(),\n ) {\n this.blockWatch = new BlockWatch(client, { shouldLog: false });\n }\n\n private async onVaultsUpdated(\n blockHash: Uint8Array,\n vaultIdSet: Set<number>,\n ) {\n const client = await this.client;\n\n this.tickDuration ??= (\n await client.query.ticks.genesisTicker()\n ).tickDurationMillis.toNumber();\n const api = await client.at(blockHash);\n const vaultIds = [...vaultIdSet];\n const rawVaults = await api.query.vaults.vaultsById.multi(vaultIds);\n for (let i = 0; i < vaultIds.length; i += 1) {\n const rawVault = rawVaults[i];\n if (rawVault.isNone) continue;\n const vaultId = vaultIds[i];\n this.vaultsById[vaultId] = new Vault(\n vaultId,\n rawVault.unwrap(),\n this.tickDuration,\n );\n }\n\n const vaults = Object.entries(this.vaultsById);\n const newSecuritization: BidPool['vaultSecuritization'] = [];\n for (const [vaultId, vault] of vaults) {\n const amount = vault.activatedSecuritizationPerSlot();\n newSecuritization.push({\n vaultId: Number(vaultId),\n bitcoinSpace: vault.availableBitcoinSpace(),\n activatedSecuritization: amount,\n vaultSharingPercent: vault.terms.liquidityPoolProfitSharing,\n });\n }\n newSecuritization.sort((a, b) => {\n const diff2 = b.activatedSecuritization - a.activatedSecuritization;\n if (diff2 !== 0n) return Number(diff2);\n return a.vaultId - b.vaultId;\n });\n this.vaultSecuritization = newSecuritization;\n this.printDebounce();\n }\n\n public async getBidPool(): Promise<bigint> {\n const client = await this.client;\n const balanceBytes = await client.rpc.state.call(\n 'MiningSlotApi_bid_pool',\n '',\n );\n const balance = client.createType('U128', balanceBytes);\n return balance.toBigInt();\n }\n\n public async loadAt(blockHash?: Uint8Array) {\n const client = await this.client;\n blockHash ??= (await client.rpc.chain.getHeader()).hash.toU8a();\n const api = await client.at(blockHash);\n const rawVaultIds = await api.query.vaults.vaultsById.keys();\n const vaultIds = rawVaultIds.map(x => x.args[0].toNumber());\n this.bidPoolAmount = await this.getBidPool();\n this.nextCohortId = (await api.query.miningSlot.nextCohortId()).toNumber();\n\n const contributors =\n await api.query.liquidityPools.liquidityPoolsByCohort.entries();\n for (const [cohortId, funds] of contributors) {\n const cohortIdNumber = cohortId.args[0].toNumber();\n this.loadCohortData(cohortIdNumber, funds);\n }\n for (const entrant of await api.query.liquidityPools.openLiquidityPoolCapital()) {\n this.setVaultCohortData(this.nextCohortId, entrant.vaultId.toNumber(), {\n activatedCapital: entrant.activatedCapital.toBigInt(),\n });\n }\n for (const entrant of await api.query.liquidityPools.nextLiquidityPoolCapital()) {\n this.setVaultCohortData(this.nextCohortId, entrant.vaultId.toNumber(), {\n activatedCapital: entrant.activatedCapital.toBigInt(),\n });\n }\n await this.onVaultsUpdated(blockHash, new Set(vaultIds));\n this.print();\n }\n\n public async watch(): Promise<{ unsubscribe: () => void }> {\n await this.loadAt();\n await this.blockWatch.start();\n this.blockWatch.events.on('vaults-updated', (b, v) =>\n this.onVaultsUpdated(b.hash, v),\n );\n const api = await this.client;\n this.blockWatch.events.on('event', async (_, event) => {\n if (api.events.liquidityPools.BidPoolDistributed.is(event)) {\n const { cohortId: rawCohortId } = event.data;\n this.lastDistributedCohortId = rawCohortId.toNumber();\n this.bidPoolAmount = await this.getBidPool();\n\n this.cohortSubscriptions[rawCohortId.toNumber()]?.();\n const entrant =\n await api.query.liquidityPools.liquidityPoolsByCohort(rawCohortId);\n this.loadCohortData(rawCohortId.toNumber(), entrant);\n this.printDebounce();\n }\n if (api.events.liquidityPools.NextBidPoolCapitalLocked.is(event)) {\n const { cohortId } = event.data;\n\n for (let inc = 0; inc < 2; inc++) {\n const id = cohortId.toNumber() + inc;\n if (!this.cohortSubscriptions[id]) {\n this.cohortSubscriptions[id] =\n await api.query.liquidityPools.liquidityPoolsByCohort(\n id,\n async entrant => {\n this.loadCohortData(id, entrant);\n this.printDebounce();\n },\n );\n }\n }\n }\n });\n\n const unsubscribe = await api.queryMulti<\n [\n Vec<ArgonPrimitivesBlockSealMiningRegistration>,\n u64,\n Vec<PalletLiquidityPoolsLiquidityPoolCapital>,\n Vec<PalletLiquidityPoolsLiquidityPoolCapital>,\n ]\n >(\n [\n api.query.miningSlot.nextSlotCohort as any,\n api.query.miningSlot.nextCohortId as any,\n api.query.liquidityPools.openLiquidityPoolCapital as any,\n api.query.liquidityPools.nextLiquidityPoolCapital as any,\n ],\n async ([\n _nextSlotCohort,\n nextCohortId,\n openVaultBidPoolCapital,\n nextPoolCapital,\n ]) => {\n this.bidPoolAmount = await this.getBidPool();\n this.nextCohortId = nextCohortId.toNumber();\n for (const entrant of [\n ...openVaultBidPoolCapital,\n ...nextPoolCapital,\n ]) {\n this.setVaultCohortData(\n entrant.cohortId.toNumber(),\n entrant.vaultId.toNumber(),\n {\n activatedCapital: entrant.activatedCapital.toBigInt(),\n },\n );\n }\n this.printDebounce();\n },\n );\n\n return { unsubscribe };\n }\n\n public async bondArgons(\n vaultId: number,\n amount: bigint,\n options?: { tip: bigint },\n ): Promise<TxResult> {\n const client = await this.client;\n\n const tx = client.tx.liquidityPools.bondArgons(vaultId, amount);\n const txSubmitter = new TxSubmitter(client, tx, this.keypair);\n const affordability = await txSubmitter.canAfford({\n tip: options?.tip,\n unavailableBalance: amount,\n });\n\n if (!affordability.canAfford) {\n console.warn('Insufficient balance to bond argons to liquidity pool', {\n ...affordability,\n argonsNeeded: amount,\n });\n throw new Error('Insufficient balance to bond argons to liquidity pool');\n }\n\n const result = await txSubmitter.submit({\n tip: options?.tip,\n useLatestNonce: true,\n });\n await result.inBlockPromise;\n return result;\n }\n\n public printDebounce() {\n if (this.printTimeout) {\n clearTimeout(this.printTimeout);\n }\n this.printTimeout = setTimeout(() => {\n this.print();\n }, 100);\n }\n\n public getOperatorName(vaultId: number): string {\n const vault = this.vaultsById[vaultId];\n return (\n this.accountRegistry.getName(vault.operatorAccountId) ??\n vault.operatorAccountId\n );\n }\n\n public print() {\n console.clear();\n const lastDistributedCohortId = this.lastDistributedCohortId;\n const distributedCohort =\n this.poolVaultCapitalByCohort[this.lastDistributedCohortId ?? -1] ?? {};\n if (Object.keys(distributedCohort).length > 0) {\n console.log(`\\n\\nDistributed (cohort ${lastDistributedCohortId})`);\n\n const rows = [];\n let maxWidth = 0;\n for (const [key, entry] of Object.entries(distributedCohort)) {\n const { table, width } = this.createBondCapitalTable(\n entry.earnings ?? 0n,\n entry.contributors ?? [],\n `Earnings (shared = ${formatPercent(entry.vaultSharingPercent)})`,\n );\n if (width > maxWidth) {\n maxWidth = width;\n }\n rows.push({\n Vault: key,\n Who: this.getOperatorName(Number(key)),\n Balances: table,\n });\n }\n new Table({\n columns: [\n { name: 'Vault', alignment: 'left' },\n { name: 'Who', alignment: 'left' },\n {\n name: 'Balances',\n title: 'Contributor Balances',\n alignment: 'center',\n minLen: maxWidth,\n },\n ],\n rows,\n }).printTable();\n }\n console.log(\n `\\n\\nActive Bid Pool: ${formatArgons(this.bidPoolAmount)} (cohort ${this.nextCohortId})`,\n );\n const cohort = this.poolVaultCapitalByCohort[this.nextCohortId];\n if (Object.keys(cohort ?? {}).length > 0) {\n const rows = [];\n let maxWidth = 0;\n for (const [key, entry] of Object.entries(cohort)) {\n const { table, width } = this.createBondCapitalTable(\n entry.activatedCapital,\n entry.contributors ?? [],\n );\n if (width > maxWidth) {\n maxWidth = width;\n }\n rows.push({\n Vault: key,\n Who: this.getOperatorName(Number(key)),\n 'Pool Capital': table,\n });\n }\n new Table({\n columns: [\n { name: 'Vault', alignment: 'left' },\n { name: 'Who', alignment: 'left' },\n { name: 'Pool Capital', alignment: 'left', minLen: maxWidth },\n ],\n rows,\n }).printTable();\n }\n\n const nextPool = this.poolVaultCapitalByCohort[this.nextCohortId + 1] ?? [];\n let maxWidth = 0;\n const nextCapital = [];\n for (const x of this.vaultSecuritization) {\n const entry = nextPool[x.vaultId] ?? {};\n const { table, width } = this.createBondCapitalTable(\n x.activatedSecuritization,\n entry.contributors ?? [],\n );\n if (width > maxWidth) {\n maxWidth = width;\n }\n nextCapital.push({\n Vault: x.vaultId,\n Owner: this.getOperatorName(x.vaultId),\n 'Bitcoin Space': formatArgons(x.bitcoinSpace),\n 'Activated Securitization': `${formatArgons(x.activatedSecuritization)} / slot`,\n 'Liquidity Pool': `${formatPercent(x.vaultSharingPercent)} profit sharing${table}`,\n });\n }\n if (nextCapital.length) {\n console.log(`\\n\\nNext (cohort ${this.nextCohortId + 1}):`);\n new Table({\n columns: [\n { name: 'Vault', alignment: 'left' },\n { name: 'Owner', alignment: 'left' },\n { name: 'Bitcoin Space', alignment: 'right' },\n { name: 'Activated Securitization', alignment: 'right' },\n { name: 'Liquidity Pool', alignment: 'left', minLen: maxWidth },\n ],\n rows: nextCapital,\n }).printTable();\n }\n }\n\n private setVaultCohortData(\n cohortId: number,\n vaultId: number,\n data: Partial<IVaultMiningBondFund>,\n ) {\n this.poolVaultCapitalByCohort ??= {};\n this.poolVaultCapitalByCohort[cohortId] ??= {};\n this.poolVaultCapitalByCohort[cohortId][vaultId] ??= {\n activatedCapital:\n data.activatedCapital ??\n data.contributors?.reduce((a, b) => a + b.amount, 0n) ??\n 0n,\n };\n\n Object.assign(\n this.poolVaultCapitalByCohort[cohortId][vaultId],\n filterUndefined(data),\n );\n }\n\n private createBondCapitalTable(\n total: bigint,\n contributors: IContributor[],\n title = 'Total',\n ) {\n const table = new Table({\n style: EMPTY_TABLE,\n columns: [\n { name: 'who', title: title, minLen: 10, alignment: 'right' },\n {\n name: 'amount',\n title: formatArgons(total),\n minLen: 7,\n alignment: 'left',\n },\n ],\n });\n for (const x of contributors) {\n table.addRow({\n who: this.accountRegistry.getName(x.address) ?? x.address,\n amount: formatArgons(x.amount),\n });\n }\n const str = table.render();\n const width = str.indexOf('\\n');\n return { table: str, width };\n }\n\n private loadCohortData(\n cohortId: number,\n vaultFunds: Iterable<[u32, PalletLiquidityPoolsLiquidityPool]>,\n ): void {\n for (const [vaultId, fund] of vaultFunds) {\n const vaultIdNumber = vaultId.toNumber();\n const contributors = fund.contributorBalances.map(([a, b]) => ({\n address: a.toHuman(),\n amount: b.toBigInt(),\n }));\n if (fund.distributedProfits.isSome) {\n if (cohortId > (this.lastDistributedCohortId ?? 0)) {\n this.lastDistributedCohortId = cohortId;\n }\n }\n this.setVaultCohortData(cohortId, vaultIdNumber, {\n earnings: fund.distributedProfits.isSome\n ? fund.distributedProfits.unwrap().toBigInt()\n : undefined,\n vaultSharingPercent: convertPermillToBigNumber(\n fund.vaultSharingPercent.toBigInt(),\n ),\n contributors,\n });\n }\n }\n}\n","import {\n Accountset,\n type ArgonClient,\n type KeyringPair,\n VaultMonitor,\n} from './index';\nimport { formatArgons } from './utils';\nimport { Vault } from './Vault';\n\nconst SATS_PER_BTC = 100_000_000n;\n\nexport class BitcoinLocks {\n constructor(readonly client: Promise<ArgonClient>) {}\n\n public async getMarketRate(satoshis: bigint): Promise<bigint> {\n const client = await this.client;\n const sats = client.createType('U64', satoshis.toString());\n const marketRate = await client.rpc.state.call(\n 'BitcoinApis_market_rate',\n sats.toHex(true),\n );\n const rate = client.createType('Option<U128>', marketRate);\n if (!rate.isSome) {\n throw new Error('Market rate not available');\n }\n return rate.value.toBigInt();\n }\n\n public async buildBitcoinLockTx(args: {\n vaultId: number;\n keypair: KeyringPair;\n amount: bigint;\n bitcoinXpub: string;\n tip?: bigint;\n reducedBalanceBy?: bigint;\n }) {\n const { vaultId, keypair, bitcoinXpub, tip } = args;\n let amount = args.amount;\n const marketRatePerBitcoin = await this.getMarketRate(100_000_000n);\n\n const client = await this.client;\n const account = await client.query.system.account(keypair.address);\n const freeBalance = account.data.free.toBigInt();\n let availableBalance = freeBalance;\n if (args.reducedBalanceBy) {\n availableBalance -= args.reducedBalanceBy;\n }\n\n /**\n * If 1_000_000 microgons are available, and the market rate is 100 microgons per satoshi, then\n * 1_000_000 / 100 = 10_000 satoshis needed\n */\n // Add wiggle room for fluctuating price\n const satoshisNeeded =\n (amount * SATS_PER_BTC) / marketRatePerBitcoin - 500n;\n\n const tx = client.tx.bitcoinLocks.initialize(\n vaultId,\n satoshisNeeded,\n bitcoinXpub,\n );\n const existentialDeposit =\n client.consts.balances.existentialDeposit.toBigInt();\n const finalTip = tip ?? 0n;\n const fees = await tx.paymentInfo(keypair.address, { tip });\n const txFee = fees.partialFee.toBigInt();\n const tickDuration = (\n await client.query.ticks.genesisTicker()\n ).tickDurationMillis.toNumber();\n const rawVault = await client.query.vaults.vaultsById(vaultId);\n const vault = new Vault(vaultId, rawVault.unwrap(), tickDuration);\n const btcFee = vault.calculateBitcoinFee(amount);\n const totalCharge = txFee + finalTip + btcFee;\n if (amount + totalCharge + existentialDeposit > availableBalance) {\n throw new Error('Insufficient balance to lock bitcoins');\n }\n console.log(\n `Locking ${satoshisNeeded} satoshis in vault ${vaultId} with market rate of ${formatArgons(marketRatePerBitcoin)}/btc. Xpub: ${bitcoinXpub}`,\n );\n return { tx, txFee, btcFee, satoshis: satoshisNeeded, freeBalance };\n }\n\n public static async waitForSpace(\n accountset: Accountset,\n options: {\n argonAmount: bigint;\n bitcoinXpub: string;\n maxLockFee?: bigint;\n tip?: bigint;\n },\n ): Promise<{\n satoshis: bigint;\n argons: bigint;\n vaultId: number;\n txFee: bigint;\n btcFee: bigint;\n utxoId: number;\n finalizedPromise: Promise<Uint8Array>;\n }> {\n const { argonAmount, bitcoinXpub, maxLockFee, tip = 0n } = options;\n const vaults = new VaultMonitor(accountset, {\n bitcoinSpaceAvailable: argonAmount,\n });\n\n return new Promise(async (resolve, reject) => {\n vaults.events.on('bitcoin-space-above', async (vaultId, amount) => {\n const vault = vaults.vaultsById[vaultId];\n const fee = vault.calculateBitcoinFee(amount);\n console.log(\n `Vault ${vaultId} has ${formatArgons(amount)} argons available for bitcoin. Lock fee is ${formatArgons(fee)}`,\n );\n if (maxLockFee !== undefined && fee > maxLockFee) {\n console.log(\n `Skipping vault ${vaultId} due to high lock fee: ${formatArgons(maxLockFee)}`,\n );\n return;\n }\n\n try {\n const bitcoinLock = new BitcoinLocks(accountset.client);\n const { tx, satoshis, btcFee, txFee } =\n await bitcoinLock.buildBitcoinLockTx({\n vaultId,\n keypair: accountset.txSubmitterPair,\n amount: argonAmount,\n bitcoinXpub,\n tip,\n });\n const result = await accountset\n .tx(tx)\n .then(x => x.submit({ waitForBlock: true, tip }));\n\n const client = await accountset.client;\n const utxoId = result.events\n .find(x => client.events.bitcoinLocks.BitcoinLockCreated.is(x))\n ?.data.utxoId?.toNumber();\n if (!utxoId) {\n throw new Error('Failed to find UTXO ID');\n }\n\n resolve({\n satoshis,\n argons: argonAmount,\n vaultId,\n btcFee,\n txFee,\n finalizedPromise: result.finalizedPromise,\n utxoId,\n });\n } catch (err) {\n console.error('Error submitting bitcoin lock tx:', err);\n reject(err);\n } finally {\n vaults.stop();\n }\n });\n await vaults.monitor();\n });\n }\n}\n","import { Keyring, KeyringPair, mnemonicGenerate } from './index';\n\nexport function keyringFromSuri(\n suri: string,\n cryptoType: 'sr25519' | 'ed25519' = 'sr25519',\n): KeyringPair {\n return new Keyring({ type: cryptoType }).createFromUri(suri);\n}\n\nexport function createKeyringPair(opts: {\n cryptoType?: 'sr25519' | 'ed25519';\n}): KeyringPair {\n const { cryptoType } = opts;\n const seed = mnemonicGenerate();\n return keyringFromSuri(seed, cryptoType);\n}\n","import { Command } from '@commander-js/extra-typings';\nimport { VaultMonitor } from '../VaultMonitor';\nimport { TxSubmitter } from '../TxSubmitter';\nimport { Vault } from '../Vault';\nimport { BitcoinLocks } from '../BitcoinLocks';\nimport { accountsetFromCli } from './index';\nimport { MICROGONS_PER_ARGON } from '../utils';\n\nexport default function vaultCli() {\n const program = new Command('vaults').description(\n 'Monitor vaults and manage securitization',\n );\n\n program\n .command('list', { isDefault: true })\n .description('Show current state of vaults')\n .action(async () => {\n const accountset = await accountsetFromCli(program);\n const vaults = new VaultMonitor(accountset, undefined, {\n vaultOnlyWatchMode: true,\n });\n await vaults.monitor(true);\n process.exit(0);\n });\n\n program\n .command('modify-securitization')\n .description('Change the vault securitization ratio')\n .requiredOption('-v, --vault-id <id>', 'The vault id to use', parseInt)\n .requiredOption(\n '-a, --argons <amount>',\n 'The number of argons to set as securitization',\n parseFloat,\n )\n .option('--ratio <ratio>', 'The new securitization ratio', parseFloat)\n .option(\n '--tip <amount>',\n 'The tip to include with the transaction',\n parseFloat,\n )\n .action(async ({ tip, argons, vaultId, ratio }) => {\n const accountset = await accountsetFromCli(program);\n const client = await accountset.client;\n const resolvedTip = tip ? BigInt(tip * MICROGONS_PER_ARGON) : 0n;\n const microgons = BigInt(argons * MICROGONS_PER_ARGON);\n\n const rawVault = (await client.query.vaults.vaultsById(vaultId)).unwrap();\n if (rawVault.operatorAccountId.toHuman() !== accountset.seedAddress) {\n console.error('Vault does not belong to this account');\n process.exit(1);\n }\n const existingFunds = rawVault.securitization.toBigInt();\n const additionalFunds =\n microgons > existingFunds ? microgons - existingFunds : 0n;\n const tx = client.tx.vaults.modifyFunding(\n vaultId,\n microgons,\n ratio !== undefined\n ? BigNumber(ratio).times(BigNumber(2).pow(64)).toFixed(0)\n : rawVault.securitizationRatio.toBigInt(),\n );\n const submit = new TxSubmitter(client, tx, accountset.txSubmitterPair);\n const canAfford = await submit.canAfford({\n tip: resolvedTip,\n unavailableBalance: additionalFunds,\n });\n if (!canAfford.canAfford) {\n console.warn('Insufficient balance to modify vault securitization', {\n ...canAfford,\n addedSecuritization: additionalFunds,\n });\n process.exit(1);\n }\n try {\n const result = await submit.submit({ tip: resolvedTip });\n await result.inBlockPromise;\n console.log('Vault securitization modified');\n process.exit();\n } catch (error) {\n console.error('Error modifying vault securitization', error);\n process.exit(1);\n }\n });\n\n program\n .command('make-bitcoin-space')\n .description(\n 'Make bitcoin space in a vault and lock it immediately in the same tx.',\n )\n .requiredOption('-v, --vault-id <id>', 'The vault id to use', parseInt)\n .requiredOption(\n '-a, --argons <amount>',\n 'The number of argons to add',\n parseFloat,\n )\n .requiredOption(\n '--bitcoin-pubkey <pubkey>',\n 'The pubkey to use for the bitcoin lock',\n )\n .option(\n '--tip <amount>',\n 'The tip to include with the transaction',\n parseFloat,\n )\n .action(async ({ tip, argons, vaultId, bitcoinPubkey }) => {\n let pubkey = bitcoinPubkey;\n if (!bitcoinPubkey.startsWith('0x')) {\n pubkey = `0x${bitcoinPubkey}`;\n }\n if (pubkey.length !== 68) {\n throw new Error(\n 'Bitcoin pubkey must be 66 characters (add 0x in front optionally)',\n );\n }\n const accountset = await accountsetFromCli(program);\n const client = await accountset.client;\n const resolvedTip = tip ? BigInt(tip * MICROGONS_PER_ARGON) : 0n;\n const microgons = BigInt(argons * MICROGONS_PER_ARGON);\n const bitcoinLocks = new BitcoinLocks(Promise.resolve(client));\n const existentialDeposit =\n client.consts.balances.existentialDeposit.toBigInt();\n const tickDuration = (\n await client.query.ticks.genesisTicker()\n ).tickDurationMillis.toNumber();\n\n const rawVault = (await client.query.vaults.vaultsById(vaultId)).unwrap();\n if (rawVault.operatorAccountId.toHuman() !== accountset.seedAddress) {\n console.error('Vault does not belong to this account');\n process.exit(1);\n }\n const vaultModifyTx = client.tx.vaults.modifyFunding(\n vaultId,\n microgons,\n rawVault.securitizationRatio.toBigInt(),\n );\n const vaultTxFee = (\n await vaultModifyTx.paymentInfo(accountset.txSubmitterPair)\n ).partialFee.toBigInt();\n const vault = new Vault(vaultId, rawVault, tickDuration);\n\n const argonsNeeded = microgons - vault.securitization;\n const argonsAvailable = microgons - vault.availableBitcoinSpace();\n\n const account = await client.query.system.account(accountset.seedAddress);\n const freeBalance = account.data.free.toBigInt();\n const {\n tx: lockTx,\n btcFee,\n txFee,\n } = await bitcoinLocks.buildBitcoinLockTx({\n vaultId,\n keypair: accountset.txSubmitterPair,\n amount: argonsAvailable,\n bitcoinXpub: pubkey,\n tip: resolvedTip,\n reducedBalanceBy: argonsNeeded + vaultTxFee + resolvedTip,\n });\n if (\n argonsNeeded +\n txFee +\n vaultTxFee +\n resolvedTip +\n btcFee +\n existentialDeposit >\n freeBalance\n ) {\n console.warn(\n 'Insufficient balance to add bitcoin space and use bitcoins',\n {\n freeBalance,\n txFee,\n vaultTxFee,\n btcFee,\n argonsAvailable,\n vaultMicrogons: microgons,\n existentialDeposit,\n neededBalanceAboveED:\n argonsNeeded + txFee + resolvedTip + btcFee + vaultTxFee,\n },\n );\n process.exit(1);\n }\n console.log('Adding bitcoin space and locking bitcoins...', {\n newArgonsAvailable: argonsAvailable,\n txFee,\n vaultTxFee,\n btcFee,\n resolvedTip,\n });\n\n const txSubmitter = new TxSubmitter(\n client,\n client.tx.utility.batchAll([vaultModifyTx, lockTx]),\n accountset.txSubmitterPair,\n );\n const result = await txSubmitter.submit({ tip: resolvedTip });\n try {\n await result.inBlockPromise;\n console.log('Bitcoin space done');\n } catch (error) {\n console.error('Error using bitcoin space', error);\n process.exit(1);\n }\n });\n return program;\n}\n","import { Command } from '@commander-js/extra-typings';\nimport {\n createKeyringPair,\n getClient,\n type KeyringPair,\n MICROGONS_PER_ARGON,\n} from '../index';\nimport { printTable } from 'console-table-printer';\nimport { Accountset } from '../Accountset';\nimport { MiningBids } from '../MiningBids';\nimport { formatArgons } from '../utils';\nimport { TxSubmitter } from '../TxSubmitter';\nimport { accountsetFromCli, globalOptions, saveKeyringPair } from './index';\nimport { CohortBidder } from '../CohortBidder';\n\nexport default function miningCli() {\n const program = new Command('mining').description(\n 'Watch mining seats or setup bidding',\n );\n\n program\n .command('list', { isDefault: true })\n .description('Monitor all miners')\n .action(async () => {\n const accountset = await accountsetFromCli(program);\n const bids = new MiningBids(accountset.client);\n const api = await accountset.client;\n let lastMiners: {\n [seat: number]: {\n miner: string;\n bid?: bigint;\n cohort?: number;\n isLastDay?: boolean;\n };\n } = {};\n\n function print(blockNumber: number) {\n console.clear();\n const toPrint = Object.entries(lastMiners).map(([seat, miner]) => ({\n seat,\n ...miner,\n }));\n if (!toPrint.length) {\n console.log('No active miners');\n } else {\n console.log(`Miners at block ${blockNumber}`);\n printTable(\n toPrint.map(x => ({\n ...x,\n bid: x.bid ? formatArgons(x.bid) : '-',\n cohort: x.cohort,\n isLastDay: x.isLastDay ? 'Y' : '',\n miner: x.miner,\n })),\n );\n }\n if (!bids.nextCohort.length) {\n console.log(\n '-------------------------------------\\nNo bids for next cohort',\n );\n } else {\n bids.print();\n }\n }\n\n const { unsubscribe } = await bids.watch(\n accountset.namedAccounts,\n undefined,\n print,\n );\n const maxMiners = api.consts.miningSlot.maxMiners.toNumber();\n const seatIndices = new Array(maxMiners).fill(0).map((_, i) => i);\n console.log('Watching miners...');\n\n const unsub = await api.query.miningSlot.nextCohortId(\n async nextCohortId => {\n const entries =\n await api.query.miningSlot.activeMinersByIndex.entries();\n const block = await api.query.system.number();\n\n const seatsWithMiner = new Set(seatIndices);\n\n for (const [rawIndex, maybeMiner] of entries) {\n const index = rawIndex.args[0].toNumber();\n if (!maybeMiner.isSome) {\n continue;\n }\n seatsWithMiner.delete(index);\n\n const miner = maybeMiner.unwrap();\n const address = miner.accountId.toHuman();\n const cohortId = miner.cohortId.toNumber();\n lastMiners[index] = {\n miner: accountset.namedAccounts.get(address) ?? address,\n bid: miner.bid.toBigInt(),\n cohort: cohortId,\n isLastDay: nextCohortId.toNumber() - cohortId === 10,\n };\n }\n for (const index of seatsWithMiner) {\n lastMiners[index] = {\n miner: 'none',\n };\n }\n print(block.toNumber());\n },\n );\n process.on('SIGINT', () => {\n unsubscribe();\n unsub();\n process.exit(0);\n });\n });\n\n program\n .command('bid')\n .description('Submit mining bids within a range of parameters')\n .option('--min-bid <amount>', 'The minimum bid amount to use', parseFloat)\n .option('--max-bid <amount>', 'The maximum bid amount to use', parseFloat)\n .option(\n '--max-seats <n>',\n 'The maximum number of seats to bid on for the slot',\n parseInt,\n )\n .option(\n '--max-balance <argons>',\n \"Use a maximum amount of the user's balance for the slot. If this ends in a percent, it will be a percent of the funds\",\n )\n .option('--bid-increment <argons>', 'The bid increment', parseFloat, 0.01)\n .option('--bid-delay <ticks>', 'Delay between bids in ticks', parseInt, 0)\n .option('--run-continuous', 'Keep running and rebid every day')\n .option(\n '--proxy-for-address <address>',\n 'The seed account to proxy for (eg: 5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty)',\n )\n .action(\n async ({\n maxSeats,\n runContinuous,\n maxBid,\n minBid,\n maxBalance,\n bidDelay,\n bidIncrement,\n proxyForAddress,\n }) => {\n const accountset = await accountsetFromCli(program, proxyForAddress);\n\n let cohortBidder: CohortBidder | undefined;\n const miningBids = new MiningBids(accountset.client, false);\n const maxCohortSize = await miningBids.maxCohortSize();\n\n const stopBidder = async (unsubscribe: () => void) => {\n if (cohortBidder) {\n const stats = await cohortBidder.stop();\n console.log('Final bidding result', {\n cohortId: cohortBidder.cohortId,\n ...stats,\n });\n cohortBidder = undefined;\n if (!runContinuous) {\n unsubscribe();\n process.exit();\n }\n }\n };\n const { unsubscribe } = await miningBids.onCohortChange({\n async onBiddingEnd(cohortId) {\n if (cohortBidder?.cohortId === cohortId) {\n await stopBidder(unsubscribe);\n }\n },\n async onBiddingStart(cohortId) {\n const seatsToWin = maxSeats ?? maxCohortSize;\n const balance = await accountset.balance();\n const feeWiggleRoom = BigInt(25e3);\n const amountAvailable = balance - feeWiggleRoom;\n let maxBidAmount = maxBid\n ? BigInt(maxBid * MICROGONS_PER_ARGON)\n : undefined;\n let maxBalanceToUse = amountAvailable;\n if (maxBalance !== undefined) {\n if (maxBalance!.endsWith('%')) {\n let maxBalancePercent = parseInt(maxBalance);\n let amountToBid =\n (amountAvailable * BigInt(maxBalancePercent)) / 100n;\n if (amountToBid > balance) {\n amountToBid = balance;\n }\n maxBalanceToUse = amountToBid;\n } else {\n maxBalanceToUse = BigInt(\n Math.floor(parseFloat(maxBalance) * MICROGONS_PER_ARGON),\n );\n }\n\n maxBidAmount ??= maxBalanceToUse / BigInt(seatsToWin);\n }\n if (maxBalanceToUse > amountAvailable) {\n maxBalanceToUse = amountAvailable;\n }\n if (!maxBidAmount) {\n console.error('No max bid amount set');\n process.exit(1);\n }\n const subaccountRange =\n await accountset.getAvailableMinerAccounts(seatsToWin);\n\n if (cohortBidder && cohortBidder?.cohortId !== cohortId) {\n await stopBidder(unsubscribe);\n }\n cohortBidder = new CohortBidder(\n accountset,\n cohortId,\n subaccountRange,\n {\n maxBid: maxBidAmount,\n minBid: BigInt((minBid ?? 0) * MICROGONS_PER_ARGON),\n bidIncrement: BigInt(\n Math.floor(bidIncrement * MICROGONS_PER_ARGON),\n ),\n maxBudget: maxBalanceToUse,\n bidDelay,\n },\n );\n await cohortBidder.start();\n },\n });\n },\n );\n\n program\n .command('create-bid-proxy')\n .description('Create a mining-bid proxy account for your main account')\n .requiredOption(\n '--outfile <path>',\n 'The file to use to store the proxy account json (eg: proxy.json)',\n )\n .requiredOption(\n '--fee-argons <argons>',\n 'How many argons should be sent to the proxy account for fees (proxies must pay fees)',\n parseFloat,\n )\n .option(\n '--proxy-passphrase <passphrase>',\n 'The passphrase for your proxy account',\n )\n .action(async ({ outfile, proxyPassphrase, feeArgons }) => {\n const { mainchainUrl } = globalOptions(program);\n const client = await getClient(mainchainUrl);\n\n const keyringPair = await saveKeyringPair({\n filePath: outfile,\n passphrase: proxyPassphrase,\n });\n const address = keyringPair.address;\n console.log(\n `✅ Created proxy account at \"${outfile}\" with address ${address}`,\n );\n const tx = client.tx.utility.batchAll([\n client.tx.proxy.addProxy(address, 'MiningBid', 0),\n client.tx.balances.transferAllowDeath(\n address,\n BigInt(feeArgons * MICROGONS_PER_ARGON),\n ),\n ]);\n let keypair: KeyringPair;\n try {\n const accountset = await accountsetFromCli(program);\n keypair = accountset.txSubmitterPair;\n } catch (e) {\n const polkadotLink = `https://polkadot.js.org/apps/?rpc=${mainchainUrl}#/extrinsics/decode/${tx.toHex()}`;\n console.log(`Complete the registration at this link:`, polkadotLink);\n process.exit(0);\n }\n try {\n await new TxSubmitter(client, tx, keypair).submit({\n waitForBlock: true,\n });\n\n console.log('Mining bid proxy added and funded.');\n process.exit();\n } catch (error) {\n console.error('Error adding mining proxy', error);\n process.exit(1);\n }\n });\n return program;\n}\n","import { Command } from '@commander-js/extra-typings';\nimport { BidPool } from '../BidPool';\nimport { VaultMonitor } from '../VaultMonitor';\nimport { formatArgons, MICROGONS_PER_ARGON } from '../utils';\nimport { accountsetFromCli } from './index';\n\nexport default function liquidityCli() {\n const program = new Command('liquidity-pools').description(\n 'Monitor or bond to liquidity pools',\n );\n program\n .command('list', { isDefault: true })\n .description('Show or watch the vault bid pool rewards')\n .action(async () => {\n const accountset = await accountsetFromCli(program);\n const bidPool = new BidPool(\n accountset.client,\n accountset.txSubmitterPair,\n );\n await bidPool.watch();\n });\n\n program\n .command('bond')\n .description('Bond argons to a liquidity pool')\n .requiredOption('-v, --vault-id <id>', 'The vault id to use', parseInt)\n .requiredOption(\n '-a, --argons <amount>',\n 'The number of argons to set the vault to',\n parseFloat,\n )\n .option(\n '--tip <amount>',\n 'The tip to include with the transaction',\n parseFloat,\n )\n .action(async ({ tip, argons, vaultId }) => {\n const accountset = await accountsetFromCli(program);\n const resolvedTip = tip ? BigInt(tip * MICROGONS_PER_ARGON) : 0n;\n\n const microgons = BigInt(argons * MICROGONS_PER_ARGON);\n const bidPool = new BidPool(\n accountset.client,\n accountset.txSubmitterPair,\n );\n await bidPool.bondArgons(vaultId, microgons, { tip: resolvedTip });\n console.log('Bonded argons to liquidity pool bond');\n process.exit();\n });\n\n program\n .command('wait-for-space')\n .description(\n 'Add bonded argons to a liquidity pool when the market rate is favorable',\n )\n .requiredOption(\n '--max-argons <amount>',\n 'Max daily argons to use per slot',\n parseFloat,\n )\n .option(\n '--min-pct-sharing <percent>',\n 'The minimum profit sharing percent to allow',\n parseInt,\n 100,\n )\n .option(\n '--tip <amount>',\n 'The tip to include with the transaction',\n parseFloat,\n )\n .action(async ({ maxArgons, minPctSharing, tip }) => {\n const maxAmountPerSlot = BigInt(maxArgons * MICROGONS_PER_ARGON);\n\n const accountset = await accountsetFromCli(program);\n const vaults = new VaultMonitor(\n accountset,\n {\n liquidityPoolSpaceAvailable: 1_000_000n,\n },\n { shouldLog: false },\n );\n const bidPool = new BidPool(\n accountset.client,\n accountset.txSubmitterPair,\n );\n const resolvedTip = tip ? BigInt(tip * MICROGONS_PER_ARGON) : 0n;\n console.log('Waiting for liquidity pool space...');\n\n vaults.events.on(\n 'liquidity-pool-space-above',\n async (vaultId, amount) => {\n const vault = vaults.vaultsById[vaultId];\n if (\n vault.terms.liquidityPoolProfitSharing.times(100).toNumber() <\n minPctSharing\n ) {\n console.info(\n `Skipping vault ${vaultId} due to lower profit sharing than ${minPctSharing}%`,\n );\n return;\n }\n let amountToAdd = amount;\n if (amountToAdd > maxAmountPerSlot) {\n amountToAdd = maxAmountPerSlot;\n }\n await bidPool.bondArgons(vaultId, amountToAdd, { tip: resolvedTip });\n console.log('Bonding argons to vault liquidity pool', {\n vaultId,\n amount: formatArgons(amountToAdd),\n });\n },\n );\n await vaults.monitor();\n });\n return program;\n}\n","import { Command } from '@commander-js/extra-typings';\nimport { VaultMonitor } from '../VaultMonitor';\nimport { BitcoinLocks } from '../BitcoinLocks';\nimport { Accountset } from '../Accountset';\nimport { MICROGONS_PER_ARGON, formatArgons } from '../utils';\nimport { accountsetFromCli } from './index';\n\nexport default function bitcoinCli() {\n const program = new Command('bitcoin').description('Wait for bitcoin space');\n\n program\n .command('watch')\n .requiredOption(\n '-a, --argons <argons>',\n 'Alert when bitcoin space exceeds this amount',\n parseFloat,\n )\n .description('Watch for bitcoin space available')\n .action(async ({ argons }) => {\n const accountset = await accountsetFromCli(program);\n const bot = new VaultMonitor(accountset, {\n bitcoinSpaceAvailable: argons\n ? BigInt(argons * MICROGONS_PER_ARGON)\n : 1n,\n });\n bot.events.on('bitcoin-space-above', async (vaultId, amount) => {\n const vault = bot.vaultsById[vaultId];\n const fee = vault.calculateBitcoinFee(amount);\n const ratio = (100n * fee) / amount;\n console.log(\n `Vault ${vaultId} has ${formatArgons(amount)} argons available for bitcoin. Fee ratio is ${ratio}%`,\n );\n });\n await bot.monitor();\n });\n\n program\n .command('wait-for-space')\n .description('Lock bitcoin when available at a given rate')\n .requiredOption(\n '-a, --argons <amount>',\n 'Bitcoin argons needed. NOTE: your account must have enough to cover fees + tip after this amount.',\n parseFloat,\n )\n .requiredOption(\n '--bitcoin-xpub <xpub>',\n 'The xpub key to use for bitcoin locking',\n )\n .option(\n '--max-lock-fee <argons>',\n \"The max lock fee you're willing to pay\",\n parseFloat,\n )\n .option(\n '--tip <amount>',\n 'The tip to include with the transaction',\n parseFloat,\n 0.0,\n )\n .action(async ({ argons, bitcoinXpub, maxLockFee, tip }) => {\n const amountToLock = BigInt(argons * MICROGONS_PER_ARGON);\n\n const accountset = await accountsetFromCli(program);\n await BitcoinLocks.waitForSpace(accountset, {\n argonAmount: amountToLock,\n bitcoinXpub,\n maxLockFee:\n maxLockFee !== undefined\n ? BigInt(maxLockFee * MICROGONS_PER_ARGON)\n : undefined,\n tip: BigInt(tip * MICROGONS_PER_ARGON),\n }).then(({ vaultId, satoshis, txFee, btcFee }) => {\n console.log(\n `Locked ${satoshis} satoshis in vault ${vaultId}. Tx fee=${formatArgons(\n txFee,\n )}, Lock fee=${formatArgons(btcFee)}.`,\n );\n process.exit(0);\n });\n });\n\n return program;\n}\n","import { createKeyringPair, Keyring, KeyringPair } from '../index';\nimport { promises } from 'node:fs';\nimport * as os from 'node:os';\n\nconst { readFile, writeFile } = promises;\n\nexport async function keyringFromFile(opts: {\n filePath: string;\n passphrase?: string;\n passphraseFile?: string;\n}): Promise<KeyringPair> {\n if (!opts.filePath) {\n throw new Error(\n 'No ACCOUNT account loaded (either ACCOUNT_SURI or ACCOUNT_JSON_PATH required)',\n );\n }\n const path = opts.filePath.replace('~', os.homedir());\n const json = JSON.parse(await readFile(path, 'utf-8'));\n let passphrase = opts.passphrase;\n if (opts.passphraseFile) {\n const passphrasePath = opts.passphraseFile.replace('~', os.homedir());\n passphrase = await readFile(passphrasePath, 'utf-8');\n }\n const mainAccount = new Keyring().createFromJson(json);\n mainAccount.decodePkcs8(passphrase);\n return mainAccount;\n}\n\nexport async function saveKeyringPair(opts: {\n filePath: string;\n passphrase?: string;\n cryptoType?: 'sr25519' | 'ed25519';\n}): Promise<KeyringPair> {\n const { filePath, passphrase, cryptoType } = opts;\n const keyring = createKeyringPair({ cryptoType });\n if (filePath) {\n const json = keyring.toJson(passphrase);\n await writeFile(filePath, JSON.stringify(json, null, 2));\n }\n return keyring;\n}\n","#!/bin/env node\nimport { addGlobalArgs, applyEnv, buildCli } from './clis';\n\nconst program = buildCli();\naddGlobalArgs(program);\n// load env\napplyEnv(program);\nprogram.parseAsync(process.argv).catch(console.error);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,wBAAgC;;;ACAhC,2BAAwB;;;ACAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACKA,oBAAO;;;ACAP,oBAAO;;;ACAP,oBAAO;;;ACAP,qBAAO;;;ACAP,yBAAO;;;ACAP,qBAAO;;;ACAP,mBAAO;;;ACAP,sBAAO;;;ARDP,iBAA8D;AAC9D,yBAIO;AAKP,0BAAc;;;ASGP,IAAM,gBAAN,MAAM,eAAc;AAAA,EACzB,YAAmB,WAA8B;AAA9B;AAAA,EAA+B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQ3C,iBAAiB,UAA0B;AAChD,WACG,WAAW,KAAK,UAAU,sBAC3B,KAAK,UAAU;AAAA,EAEnB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,aAAoB,UAClB,QACA,UAGC;AACD,UAAM,cAAc,MAAM,OAAO,MAAM,WAAW,QAAQ,OAAM,QAAO;AACrE,UAAI,IAAI,QAAQ;AACd;AAAA,MACF;AACA,YAAM,iBAAiB,MAAM,OAAO,IAAI,MAAM,iBAAiB;AAE/D;AAAA,QACE,IAAI,eAAc;AAAA,UAChB,qBAAqB,IAAI,MAAM,oBAAoB,SAAS;AAAA,UAC5D,eAAe,IAAI,MAAM,cAAc,SAAS;AAAA,UAChD,gBAAgB,eAAe,MAAM;AAAA,UACrC,MAAM,IAAI,MAAM,KAA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;AACzB,cAAc,OAAO;AAErB,SAAS,OAAO;AAChB,QAAQ,WAAW,QAAQ,IAAI,EAAE,MAAM,QAAQ,KAAK;","names":["import_extra_typings","ExtrinsicError","BigNumber","ExtrinsicError","process","import_nanoevents","BN","ROUND_FLOOR","BN","BigNumber","import_console_table_printer","import_nanoevents","api","import_console_table_printer","maxWidth","import_console_table_printer","import_util_crypto","process","program","addresses","import_extra_typings","program","import_extra_typings","import_console_table_printer","program","unsubscribe","import_extra_typings","program","import_extra_typings","program","import_node_fs","program","env","Path"]}
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/mainchain/mainchain/client/nodejs/lib/cli.cjs","../src/cli.ts"],"names":[],"mappings":"AAAA;AACA;AACE;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACA;ACLA,IAAM,QAAA,EAAU,wCAAA,CAAS;AACzB,6CAAA,OAAqB,CAAA;AAErB,wCAAA,OAAgB,CAAA;AAChB,OAAA,CAAQ,UAAA,CAAW,OAAA,CAAQ,IAAI,CAAA,CAAE,KAAA,CAAM,OAAA,CAAQ,KAAK,CAAA","file":"/home/runner/work/mainchain/mainchain/client/nodejs/lib/cli.cjs","sourcesContent":[null,"#!/bin/env node\nimport { addGlobalArgs, applyEnv, buildCli } from './clis';\n\nconst program = buildCli();\naddGlobalArgs(program);\n// load env\napplyEnv(program);\nprogram.parseAsync(process.argv).catch(console.error);\n"]}
|