@argonprotocol/mainchain 1.3.5 → 1.3.7

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.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/mainchain/mainchain/client/nodejs/lib/chunk-VXYWJG66.cjs","../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/index.ts","../src/WageProtector.ts","../src/config.ts","../src/TxSubmitter.ts","../src/utils.ts","../src/AccountRegistry.ts","../src/BlockWatch.ts","../src/FrameCalculator.ts","../src/AccountMiners.ts","../src/Accountset.ts","../src/MiningBids.ts","../src/Vault.ts","../src/VaultMonitor.ts","../src/CohortBidder.ts","../src/BidPool.ts","../src/BitcoinLocks.ts","../src/keyringUtils.ts"],"names":["ExtrinsicError","config","BigNumber","printTable","maxWidth"],"mappings":"AAAA;ACKA,2CAAO;ADHP;AACA;AEEA,2CAAO;AFAP;AACA;AGDA,2CAAO;AHGP;AACA;AIJA,4CAAO;AJMP;AACA;AKPA,gDAAO;ALSP;AACA;AMVA,4CAAO;ANYP;AACA;AObA,0CAAO;APeP;AACA;AQhBA,0CAAO;ARkBP;AACA;ASpBA,oCAA8D;AAC9D,mDAAiE;ATsBjE;AACA;AUXO,IAAM,cAAA,EAAN,MAAM,eAAc;AAAA,EACzB,WAAA,CAAmB,SAAA,EAA8B;AAA9B,IAAA,IAAA,CAAA,UAAA,EAAA,SAAA;AAAA,EAA+B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQ3C,gBAAA,CAAiB,QAAA,EAA0B;AAChD,IAAA,OAAQ,SAAA,EAAW,IAAA,CAAK,SAAA,CAAU,oBAAA,EAAuB,IAAA,CAAK,SAAA,CAAU,aAAA;AAAA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AACA,MAAA;AACA,MAAA;AACF,IAAA;AACF,EAAA;AAEA,EAAA;AAkBQ,IAAA;AACA,IAAA;AACJ,MAAA;AACD,IAAA;AACK,IAAA;AAEN,IAAA;AACE,MAAA;AACE,QAAA;AACA,QAAA;AACA,QAAA;AACE,UAAA;AACF,QAAA;AACA,QAAA;AACE,UAAA;AAAQ,YAAA;AAER,UAAA;AACA,UAAA;AACF,QAAA;AAEA,QAAA;AACE,UAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AAAyE,YAAA;AACvE,YAAA;AACA,YAAA;AACyB,YAAA;AACL,YAAA;AAEtB,UAAA;AAEA,UAAA;AAAQ,YAAA;AACN,YAAA;AACQ,YAAA;AACR,YAAA;AACA,YAAA;AACgB,YAAA;AACW,YAAA;AAE7B,UAAA;AACF,QAAA;AACE,UAAA;AACA,UAAA;AACF,QAAA;AACE,UAAA;AACF,QAAA;AACD,MAAA;AACD,MAAA;AACD,IAAA;AACH,EAAA;AACF;AxBkqEU;AACA;AyBryFM;AAIP,EAAA;AACT;AAEgB;AACN,EAAA;AACF,EAAA;AACC,EAAA;AACT;AzBmyFU;AACA;ASrxFD;AAGA;AACT;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACK;AA6BP;AACQ,EAAA;AACR;AAOA;AACM,EAAA;AACA,EAAA;AACF,IAAA;AACK,EAAA;AACL,IAAA;AACF,EAAA;AACO,EAAA;AACT;ATmvFU;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/mainchain/mainchain/client/nodejs/lib/chunk-VXYWJG66.cjs","sourcesContent":[null,"// 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> = 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 tick 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 a BitcoinLock expires which the vault will be allowed to claim\n * a bitcoin\n **/\n lockReclamationBlocks: u64 & AugmentedConst<ApiType>;\n /**\n * Number of frames a vault has to counter-sign a bitcoin release\n **/\n lockReleaseCosignDeadlineFrames: u64 & AugmentedConst<ApiType>;\n /**\n * Pallet storage requires bounds, so we have to set a maximum number that can expire in a\n * single block\n **/\n maxConcurrentlyExpiringLocks: u32 & AugmentedConst<ApiType>;\n /**\n * Maximum releasing utxos at a time\n **/\n maxConcurrentlyReleasingLocks: u32 & AugmentedConst<ApiType>;\n /**\n * Number of ticks per bitcoin block\n **/\n ticksPerBitcoinBlock: u64 & 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 * The number of frames a miner operates for\n **/\n framesPerMiningTerm: u32 & AugmentedConst<ApiType>;\n /**\n * How many new miners can be in the cohort for each slot. The actual maximum will adjust\n * dynamically\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 minimum number of miners per cohort\n **/\n minCohortSize: u32 & AugmentedConst<ApiType>;\n /**\n * The minimum argonots needed per seat\n **/\n minimumArgonotsPerSeat: u128 & AugmentedConst<ApiType>;\n /**\n * The damper on the price per seat adjustment (from the last price)\n **/\n pricePerSeatAdjustmentDamper: 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 * The target price per seat.\n **/\n targetPricePerSeat: u128 & 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 * Max concurrent cosigns pending per vault\n **/\n maxPendingCosignsPerVault: u32 & AugmentedConst<ApiType>;\n /**\n * The max pending vault term changes per block\n **/\n maxPendingTermModificationsPerTick: u32 & AugmentedConst<ApiType>;\n /**\n * The max number of vaults that can be created\n **/\n maxVaults: u32 & AugmentedConst<ApiType>;\n /**\n * The number of frames within which revenue must be collected\n **/\n revenueCollectionExpirationFrames: u64 & 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> = 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 * An overflow occurred recording a lock expiration\n **/\n ExpirationAtBlockOverflow: AugmentedError<ApiType>;\n GenericVaultError: 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 /**\n * A lock in process of release cannot be ratcheted\n **/\n LockInProcessOfRelease: AugmentedError<ApiType>;\n LockNotFound: AugmentedError<ApiType>;\n NoBitcoinPricesAvailable: AugmentedError<ApiType>;\n NoPermissions: AugmentedError<ApiType>;\n /**\n * Nothing to ratchet\n **/\n NoRatchetingAvailable: AugmentedError<ApiType>;\n /**\n * No Vault public keys are available\n **/\n NoVaultBitcoinPubkeysAvailable: AugmentedError<ApiType>;\n /**\n * An overflow or underflow occurred while calculating the redemption price\n **/\n OverflowError: 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 /**\n * The lock is not verified\n **/\n UnverifiedLock: 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 * The xor distance supplied is invalid\n **/\n InvalidMinerXorDistance: 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 * The prebond amount cannot be reduced and this takes it below the previous allocation\n **/\n MaxAmountBelowMinimum: 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 * Vault operator only\n **/\n NotAVaultOperator: AugmentedError<ApiType>;\n /**\n * The given vault is not accepting mining bonds\n **/\n VaultNotAcceptingMiningBonds: AugmentedError<ApiType>;\n };\n miningSlot: {\n /**\n * The mining bid cannot be reduced\n **/\n BidCannotBeReduced: AugmentedError<ApiType>;\n /**\n * The given bid isn't high enough to be in the cohort\n **/\n BidTooLow: AugmentedError<ApiType>;\n /**\n * An account can only have one active registration\n **/\n CannotRegisterOverlappingSessions: AugmentedError<ApiType>;\n /**\n * The funding account does not have enough funds to cover the bid\n **/\n InsufficientFunds: AugmentedError<ApiType>;\n /**\n * This funding account does not hold the minimum argonots needed\n **/\n InsufficientOwnershipTokens: AugmentedError<ApiType>;\n /**\n * Bids must be in allowed increments\n **/\n InvalidBidAmount: AugmentedError<ApiType>;\n /**\n * Bidding for the next cohort has closed\n **/\n SlotNotTakingBids: AugmentedError<ApiType>;\n /**\n * The cohort registration overflowed\n **/\n TooManyBlockRegistrants: AugmentedError<ApiType>;\n /**\n * The argonots on hold cannot be released\n **/\n UnrecoverableHold: 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 in storage.\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 or update\n * its deposits.\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 * A funding change is already scheduled\n **/\n FundingChangeAlreadyScheduled: AugmentedError<ApiType>;\n HoldUnexpectedlyModified: AugmentedError<ApiType>;\n /**\n * The user doesn't have enough funds to complete this request\n **/\n InsufficientFunds: AugmentedError<ApiType>;\n /**\n * There aren't enough funds in the vault to cover the requested bitcoin lock\n **/\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 /**\n * Internally, the vault ids are maxed out\n **/\n NoMoreVaultIds: AugmentedError<ApiType>;\n NoPermissions: AugmentedError<ApiType>;\n /**\n * No Vault public keys are available\n **/\n NoVaultBitcoinPubkeysAvailable: AugmentedError<ApiType>;\n /**\n * A vault must clear out all pending cosigns before it can collect\n **/\n PendingCosignsBeforeCollect: 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 /**\n * This vault is closed\n **/\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 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 PalletProxyDepositKind,\n SpConsensusGrandpaAppPublic,\n SpRuntimeDispatchError,\n} from '@polkadot/types/lookup';\n\nexport type __AugmentedEvent<ApiType extends ApiTypes> = 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<ApiType, [who: AccountId32], { who: AccountId32 }>;\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 [utxoId: u64, vaultId: u32, compensationAmount: u128, compensatedAccountId: AccountId32],\n { utxoId: u64; vaultId: u32; compensationAmount: u128; compensatedAccountId: AccountId32 }\n >;\n BitcoinLockBurned: AugmentedEvent<\n ApiType,\n [utxoId: u64, vaultId: u32, wasUtxoSpent: bool],\n { utxoId: u64; vaultId: u32; wasUtxoSpent: bool }\n >;\n BitcoinLockCreated: AugmentedEvent<\n ApiType,\n [utxoId: u64, vaultId: u32, lockPrice: u128, accountId: AccountId32, securityFee: u128],\n { utxoId: u64; vaultId: u32; lockPrice: u128; accountId: AccountId32; securityFee: u128 }\n >;\n BitcoinLockRatcheted: AugmentedEvent<\n ApiType,\n [\n utxoId: u64,\n vaultId: u32,\n originalLockPrice: u128,\n securityFee: u128,\n newLockPrice: u128,\n amountBurned: u128,\n accountId: AccountId32,\n ],\n {\n utxoId: u64;\n vaultId: u32;\n originalLockPrice: u128;\n securityFee: u128;\n newLockPrice: u128;\n amountBurned: u128;\n accountId: AccountId32;\n }\n >;\n BitcoinUtxoCosigned: AugmentedEvent<\n ApiType,\n [utxoId: u64, vaultId: u32, signature: Bytes],\n { utxoId: u64; vaultId: u32; signature: Bytes }\n >;\n BitcoinUtxoCosignRequested: AugmentedEvent<\n ApiType,\n [utxoId: u64, vaultId: u32],\n { utxoId: 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 * An error occurred while completing a lock\n **/\n LockExpirationError: 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 { utxoRef: ArgonPrimitivesBitcoinUtxoRef; error: SpRuntimeDispatchError }\n >;\n UtxoRejected: AugmentedEvent<\n ApiType,\n [utxoId: u64, rejectedReason: ArgonPrimitivesBitcoinBitcoinRejectedReason],\n { utxoId: u64; rejectedReason: ArgonPrimitivesBitcoinBitcoinRejectedReason }\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 [expectedBlockTime: u64, actualBlockTime: u64, startDifficulty: u128, newDifficulty: u128],\n { expectedBlockTime: u64; actualBlockTime: u64; startDifficulty: u128; newDifficulty: u128 }\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 [notaryId: u32, notebookNumber: u32, tax: u128, error: SpRuntimeDispatchError],\n { notaryId: u32; notebookNumber: u32; tax: u128; error: SpRuntimeDispatchError }\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 [accountId: AccountId32, amount: u128, transferId: u32, notaryId: u32, expirationTick: u64],\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<ApiType, [domainHash: H256], { domainHash: H256 }>;\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 [domainHash: H256, accountId: AccountId32, error: SpRuntimeDispatchError],\n { domainHash: H256; accountId: AccountId32; error: SpRuntimeDispatchError }\n >;\n /**\n * A domain was registered\n **/\n DomainRenewed: AugmentedEvent<ApiType, [domainHash: H256], { domainHash: H256 }>;\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 [old: PalletHyperbridgeVersionedHostParams, new_: PalletHyperbridgeVersionedHostParams],\n { old: PalletHyperbridgeVersionedHostParams; new_: PalletHyperbridgeVersionedHostParams }\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<ApiType, [IsmpEventsRequestResponseHandled]>;\n /**\n * Get request timeout handled\n **/\n GetRequestTimeoutHandled: AugmentedEvent<ApiType, [IsmpEventsTimeoutHandled]>;\n /**\n * Post Request Handled\n **/\n PostRequestHandled: AugmentedEvent<ApiType, [IsmpEventsRequestResponseHandled]>;\n /**\n * Post request timeout handled\n **/\n PostRequestTimeoutHandled: AugmentedEvent<ApiType, [IsmpEventsTimeoutHandled]>;\n /**\n * Post Response Handled\n **/\n PostResponseHandled: AugmentedEvent<ApiType, [IsmpEventsRequestResponseHandled]>;\n /**\n * Post response timeout handled\n **/\n PostResponseTimeoutHandled: AugmentedEvent<ApiType, [IsmpEventsTimeoutHandled]>;\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 [frameId: u64, bidPoolDistributed: u128, bidPoolBurned: u128, bidPoolShares: u32],\n { frameId: u64; bidPoolDistributed: u128; bidPoolBurned: u128; bidPoolShares: u32 }\n >;\n /**\n * An error occurred burning from the bid pool\n **/\n CouldNotBurnBidPool: AugmentedEvent<\n ApiType,\n [frameId: u64, amount: u128, dispatchError: SpRuntimeDispatchError],\n { frameId: 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 frameId: u64,\n vaultId: u32,\n amount: u128,\n dispatchError: SpRuntimeDispatchError,\n isForVault: bool,\n ],\n {\n accountId: AccountId32;\n frameId: 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 frameId: u64,\n vaultId: u32,\n amount: u128,\n accountId: AccountId32,\n dispatchError: SpRuntimeDispatchError,\n ],\n {\n frameId: 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 [frameId: u64, totalActivatedCapital: u128, participatingVaults: u32],\n { frameId: 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 [frameId: u64, vaultId: u32, amount: u128, accountId: AccountId32],\n { frameId: u64; vaultId: u32; amount: u128; accountId: AccountId32 }\n >;\n /**\n * The vault operator pre-registered to bond argons for a vault\n **/\n VaultOperatorPrebond: AugmentedEvent<\n ApiType,\n [vaultId: u32, accountId: AccountId32, amountPerFrame: u128],\n { vaultId: u32; accountId: AccountId32; amountPerFrame: u128 }\n >;\n };\n miningSlot: {\n /**\n * Bids are closed due to the VRF randomized function triggering\n **/\n MiningBidsClosed: AugmentedEvent<ApiType, [frameId: u64], { frameId: u64 }>;\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 newMiners: Vec<ArgonPrimitivesBlockSealMiningRegistration>,\n releasedMiners: u32,\n frameId: u64,\n ],\n {\n newMiners: Vec<ArgonPrimitivesBlockSealMiningRegistration>;\n releasedMiners: u32;\n frameId: 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 * The deposit for a multisig operation has been updated/poked.\n **/\n DepositPoked: AugmentedEvent<\n ApiType,\n [who: AccountId32, callHash: U8aFixed, oldDeposit: u128, newDeposit: u128],\n { who: AccountId32; callHash: U8aFixed; oldDeposit: u128; newDeposit: u128 }\n >;\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 [notaryId: u32, error: SpRuntimeDispatchError, meta: ArgonPrimitivesNotaryNotaryMeta],\n { notaryId: u32; error: SpRuntimeDispatchError; meta: ArgonPrimitivesNotaryNotaryMeta }\n >;\n /**\n * Notary metadata queued for update\n **/\n NotaryMetaUpdateQueued: AugmentedEvent<\n ApiType,\n [notaryId: u32, meta: ArgonPrimitivesNotaryNotaryMeta, effectiveTick: u64],\n { notaryId: u32; meta: ArgonPrimitivesNotaryNotaryMeta; effectiveTick: u64 }\n >;\n /**\n * A user has proposed operating as a notary\n **/\n NotaryProposed: AugmentedEvent<\n ApiType,\n [operatorAccount: AccountId32, meta: ArgonPrimitivesNotaryNotaryMeta, expires: u32],\n { operatorAccount: AccountId32; meta: ArgonPrimitivesNotaryNotaryMeta; expires: u32 }\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<ApiType, [who: AccountId32], { who: AccountId32 }>;\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 deposit stored for proxies or announcements was poked / updated.\n **/\n DepositPoked: AugmentedEvent<\n ApiType,\n [who: AccountId32, kind: PalletProxyDepositKind, oldDeposit: u128, newDeposit: u128],\n { who: AccountId32; kind: PalletProxyDepositKind; oldDeposit: u128; newDeposit: u128 }\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 [dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSystemDispatchEventInfo],\n { dispatchError: SpRuntimeDispatchError; dispatchInfo: FrameSystemDispatchEventInfo }\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<ApiType, [account: AccountId32], { account: AccountId32 }>;\n /**\n * A new account was created.\n **/\n NewAccount: AugmentedEvent<ApiType, [account: AccountId32], { account: AccountId32 }>;\n /**\n * An invalid authorized upgrade was rejected while trying to apply it.\n **/\n RejectedInvalidAuthorizedUpgrade: AugmentedEvent<\n ApiType,\n [codeHash: H256, error: SpRuntimeDispatchError],\n { codeHash: H256; error: SpRuntimeDispatchError }\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 [from: AccountId32, to: H256, amount: u128, dest: IsmpHostStateMachine, commitment: H256],\n { from: AccountId32; to: H256; amount: u128; dest: IsmpHostStateMachine; commitment: H256 }\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 * The fallback call was dispatched.\n **/\n IfElseFallbackCalled: AugmentedEvent<\n ApiType,\n [mainError: SpRuntimeDispatchError],\n { mainError: SpRuntimeDispatchError }\n >;\n /**\n * Main call was dispatched.\n **/\n IfElseMainSuccess: AugmentedEvent<ApiType, []>;\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 FundLockCanceled: AugmentedEvent<\n ApiType,\n [vaultId: u32, amount: u128],\n { vaultId: u32; amount: u128 }\n >;\n FundsLocked: AugmentedEvent<\n ApiType,\n [vaultId: u32, locker: AccountId32, amount: u128, isRatchet: bool, feeRevenue: u128],\n { vaultId: u32; locker: AccountId32; amount: u128; isRatchet: bool; feeRevenue: u128 }\n >;\n FundsReleased: AugmentedEvent<\n ApiType,\n [vaultId: u32, amount: u128],\n { vaultId: u32; amount: u128 }\n >;\n FundsReleasedError: AugmentedEvent<\n ApiType,\n [vaultId: u32, error: SpRuntimeDispatchError],\n { vaultId: u32; error: SpRuntimeDispatchError }\n >;\n FundsScheduledForRelease: AugmentedEvent<\n ApiType,\n [vaultId: u32, amount: u128, releaseHeight: u64],\n { vaultId: u32; amount: u128; releaseHeight: u64 }\n >;\n LiquidityPoolRecordingError: AugmentedEvent<\n ApiType,\n [vaultId: u32, frameId: u64, vaultEarnings: u128, error: SpRuntimeDispatchError],\n { vaultId: u32; frameId: u64; vaultEarnings: u128; error: SpRuntimeDispatchError }\n >;\n LostBitcoinCompensated: AugmentedEvent<\n ApiType,\n [vaultId: u32, beneficiary: AccountId32, toBeneficiary: u128, burned: u128],\n { vaultId: u32; beneficiary: AccountId32; toBeneficiary: u128; burned: u128 }\n >;\n VaultBitcoinXpubChange: AugmentedEvent<ApiType, [vaultId: u32], { vaultId: u32 }>;\n VaultClosed: AugmentedEvent<\n ApiType,\n [vaultId: u32, securitizationRemaining: u128, securitizationReleased: u128],\n { vaultId: u32; securitizationRemaining: u128; securitizationReleased: u128 }\n >;\n /**\n * The vault collected revenue and cosigned all pending bitcoin locks\n **/\n VaultCollected: AugmentedEvent<\n ApiType,\n [vaultId: u32, revenue: u128],\n { vaultId: u32; revenue: 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 /**\n * Vault revenue was not collected within the required window, so has been burned\n **/\n VaultRevenueUncollected: AugmentedEvent<\n ApiType,\n [vaultId: u32, frameId: u64, amount: u128],\n { vaultId: u32; frameId: u64; amount: u128 }\n >;\n VaultTermsChanged: AugmentedEvent<ApiType, [vaultId: u32], { vaultId: u32 }>;\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 { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types';\nimport type {\n BTreeMap,\n BTreeSet,\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 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 PalletLiquidityPoolsPrebondedArgons,\n PalletMintMintAction,\n PalletMultisigMultisig,\n PalletPriceIndexPriceIndex,\n PalletProxyAnnouncement,\n PalletProxyProxyDefinition,\n PalletTransactionPaymentReleases,\n PalletVaultsVaultFrameRevenue,\n SpConsensusGrandpaAppPublic,\n SpRuntimeDigest,\n SpWeightsWeightV2Weight,\n} from '@polkadot/types/lookup';\nimport type { Observable } from '@polkadot/types/types';\n\nexport type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;\nexport type __QueryableStorageEntry<ApiType extends ApiTypes> = 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<ApiType, () => Observable<Option<AccountId32>>, []>;\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 (arg: AccountId32 | string | Uint8Array) => 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 (arg: AccountId32 | string | Uint8Array) => 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 (arg: AccountId32 | string | Uint8Array) => 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 * Utxos that have been requested to be cosigned for releasing\n **/\n lockCosignDueByFrame: AugmentedQuery<\n ApiType,\n (arg: u64 | AnyNumber | Uint8Array) => Observable<BTreeSet<u64>>,\n [u64]\n >;\n /**\n * Expiration of bitcoin locks by bitcoin height. Funds are burned since the user did not\n * unlock it\n **/\n lockExpirationsByBitcoinHeight: AugmentedQuery<\n ApiType,\n (arg: u64 | AnyNumber | Uint8Array) => Observable<BTreeSet<u64>>,\n [u64]\n >;\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 lockReleaseRequestsByUtxoId: AugmentedQuery<\n ApiType,\n (\n arg: u64 | AnyNumber | Uint8Array,\n ) => Observable<Option<PalletBitcoinLocksLockReleaseRequest>>,\n [u64]\n >;\n /**\n * Stores bitcoin utxos that have requested to be released\n **/\n locksByUtxoId: AugmentedQuery<\n ApiType,\n (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<PalletBitcoinLocksLockedBitcoin>>,\n [u64]\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 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 (arg: u64 | AnyNumber | Uint8Array) => 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 funds are 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<ApiType, () => Observable<Option<AccountId32>>, []>;\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<ApiType, () => Observable<bool>, []>;\n utxoIdToRef: AugmentedQuery<\n ApiType,\n (arg: u64 | AnyNumber | Uint8Array) => 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 blockFees: AugmentedQuery<ApiType, () => Observable<u128>, []>;\n /**\n * The cohort block rewards by mining cohort (ie, with the same starting frame id)\n **/\n blockRewardsByCohort: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u64, u128]>>>, []>;\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 (arg: u32 | AnyNumber | Uint8Array) => 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<ApiType, () => Observable<ArgonPrimitivesForkPower>, []>;\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<ApiType, () => Observable<Option<H256>>, []>;\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<ApiType, () => Observable<Vec<ITuple<[u64, u32]>>>, []>;\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<ApiType, () => Observable<u128>, []>;\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<ApiType, () => Observable<Option<H256>>, []>;\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<ApiType, () => Observable<Vec<ITuple<[u64, u32, u128]>>>, []>;\n pastComputeBlockTimes: AugmentedQuery<ApiType, () => Observable<Vec<u64>>, []>;\n /**\n * The timestamp from the previous block\n **/\n previousBlockTimestamp: AugmentedQuery<ApiType, () => Observable<Option<u64>>, []>;\n tempBlockTimestamp: AugmentedQuery<ApiType, () => Observable<Option<u64>>, []>;\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<Vec<ArgonPrimitivesNotaryNotaryNotebookVoteDigestDetails>>,\n []\n >;\n /**\n * Keeps the last 3 vote minimums. The first one applies to the current block.\n **/\n voteMinimumHistory: AugmentedQuery<ApiType, () => Observable<Vec<u128>>, []>;\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<ApiType, () => Observable<Option<AccountId32>>, []>;\n nextTransferId: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []>;\n pendingTransfersOut: AugmentedQuery<\n ApiType,\n (\n arg: u32 | AnyNumber | Uint8Array,\n ) => Observable<Option<PalletChainTransferQueuedTransferOut>>,\n [u32]\n >;\n transfersUsedInBlockNotebooks: AugmentedQuery<\n ApiType,\n (arg: u32 | AnyNumber | Uint8Array) => 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 (arg: H256 | string | Uint8Array) => Observable<Option<PalletDomainsDomainRegistration>>,\n [H256]\n >;\n zoneRecordsByDomain: AugmentedQuery<\n ApiType,\n (arg: H256 | string | Uint8Array) => 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<ApiType, () => Observable<Option<ITuple<[u32, u32]>>>, []>;\n /**\n * State of the current authority set.\n **/\n state: AugmentedQuery<ApiType, () => Observable<PalletGrandpaStoredState>, []>;\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 * The previous verified height for a state machine\n **/\n previousStateMachineHeight: 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 * 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: IsmpConsensusStateMachineHeight | { id?: any; height?: any } | string | 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: IsmpConsensusStateMachineHeight | { id?: any; height?: any } | string | 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 | { Relay: any }\n | string\n | Uint8Array,\n ) => Observable<Option<u64>>,\n [IsmpHostStateMachine]\n >;\n };\n liquidityPools: {\n /**\n * The liquidity pool for the current frame. This correlates with the bids coming in for the\n * current frame. Sorted with the biggest share last. (current frame + 1)\n **/\n capitalActive: AugmentedQuery<\n ApiType,\n () => Observable<Vec<PalletLiquidityPoolsLiquidityPoolCapital>>,\n []\n >;\n /**\n * The liquidity pool still raising capital. (current frame + 2)\n **/\n capitalRaising: AugmentedQuery<\n ApiType,\n () => Observable<Vec<PalletLiquidityPoolsLiquidityPoolCapital>>,\n []\n >;\n /**\n * Any vaults that have been pre-registered for bonding argons. This is used by the vault\n * operator to allocate argons to be bonded once bitcoins are securitized in their vault.\n **/\n prebondedByVaultId: AugmentedQuery<\n ApiType,\n (\n arg: u32 | AnyNumber | Uint8Array,\n ) => Observable<Option<PalletLiquidityPoolsPrebondedArgons>>,\n [u32]\n >;\n /**\n * The currently earning contributors for the current epoch's bond funds. Sorted by highest\n * bids first\n **/\n vaultPoolsByFrame: AugmentedQuery<\n ApiType,\n (\n arg: u64 | AnyNumber | Uint8Array,\n ) => Observable<BTreeMap<u32, PalletLiquidityPoolsLiquidityPool>>,\n [u64]\n >;\n };\n miningSlot: {\n /**\n * Lookup by account id to the corresponding index in MinersByCohort and MinerXorKeysByCohort\n **/\n accountIndexLookup: AugmentedQuery<\n ApiType,\n (arg: AccountId32 | string | Uint8Array) => Observable<Option<ITuple<[u64, u32]>>>,\n [AccountId32]\n >;\n activeMinersCount: AugmentedQuery<ApiType, () => Observable<u16>, []>;\n /**\n * Argonots that must be locked to take a Miner role\n **/\n argonotsPerMiningSeat: AugmentedQuery<ApiType, () => Observable<u128>, []>;\n /**\n * The average price per seat for the last 10 frames (newest first)\n **/\n averagePricePerSeat: AugmentedQuery<ApiType, () => Observable<Vec<u128>>, []>;\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 bidsForNextSlotCohort: AugmentedQuery<\n ApiType,\n () => Observable<Vec<ArgonPrimitivesBlockSealMiningRegistration>>,\n []\n >;\n /**\n * Did this block activate a new frame\n **/\n didStartNewCohort: AugmentedQuery<ApiType, () => Observable<bool>, []>;\n /**\n * The previous 10 frame start block numbers\n **/\n frameStartBlockNumbers: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []>;\n hasAddedGrandpaRotation: AugmentedQuery<ApiType, () => Observable<bool>, []>;\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<ApiType, () => Observable<bool>, []>;\n /**\n * Miners that are active in the current block (post initialize) by their starting frame\n **/\n minersByCohort: AugmentedQuery<\n ApiType,\n (\n arg: u64 | AnyNumber | Uint8Array,\n ) => Observable<Vec<ArgonPrimitivesBlockSealMiningRegistration>>,\n [u64]\n >;\n /**\n * This is a lookup of each miner's XOR key to use. It's a blake2 256 hash of the miner account\n * id and the block hash at time of activation.\n **/\n minerXorKeysByCohort: AugmentedQuery<ApiType, () => Observable<BTreeMap<u64, Vec<U256>>>, []>;\n /**\n * The mining slot configuration set in genesis\n **/\n miningConfig: AugmentedQuery<\n ApiType,\n () => Observable<ArgonPrimitivesBlockSealMiningSlotConfig>,\n []\n >;\n /**\n * The number of allow miners to bid for the next mining cohort\n **/\n nextCohortSize: AugmentedQuery<ApiType, () => Observable<u32>, []>;\n /**\n * The next frameId. A frame in argon is the 24 hours between the start of two different mining\n * cohorts.\n **/\n nextFrameId: AugmentedQuery<ApiType, () => Observable<u64>, []>;\n /**\n * The miners released in the last block (only kept for a single block)\n **/\n releasedMinersByAccountId: AugmentedQuery<\n ApiType,\n () => Observable<BTreeMap<AccountId32, ArgonPrimitivesBlockSealMiningRegistration>>,\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 mining cohort (ie, grouped by starting frame id)\n **/\n miningMintPerCohort: AugmentedQuery<ApiType, () => Observable<BTreeMap<u64, u128>>, []>;\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 (arg: u32 | AnyNumber | Uint8Array) => 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<Vec<ITuple<[ArgonPrimitivesNotaryNotaryNotebookKeyDetails, bool]>>>,\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<Option<ITuple<[u32, u64, ArgonNotaryAuditErrorVerifyError]>>>,\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 (arg: AccountId32 | string | Uint8Array) => 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 (arg: AccountId32 | string | Uint8Array) => 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 (arg: AccountId32 | string | Uint8Array) => 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<ApiType, () => Observable<Option<PalletPriceIndexPriceIndex>>, []>;\n /**\n * The price index operator account\n **/\n operator: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []>;\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 (arg: AccountId32 | string | Uint8Array) => Observable<FrameSystemAccountInfo>,\n [AccountId32]\n >;\n /**\n * Total length (in bytes) for all extrinsics put together, for the current block.\n **/\n allExtrinsicsLen: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []>;\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<ApiType, () => Observable<Vec<FrameSystemEventRecord>>, []>;\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 (arg: H256 | string | Uint8Array) => Observable<Vec<ITuple<[u32, u32]>>>,\n [H256]\n >;\n /**\n * The execution phase of the block.\n **/\n executionPhase: AugmentedQuery<ApiType, () => Observable<Option<FrameSystemPhase>>, []>;\n /**\n * Total extrinsics count for the current block.\n **/\n extrinsicCount: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []>;\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 * The weight reclaimed for the extrinsic.\n *\n * This information is available until the end of the extrinsic execution.\n * More precisely this information is removed in `note_applied_extrinsic`.\n *\n * Logic doing some post dispatch weight reduction must update this storage to avoid duplicate\n * reduction.\n **/\n extrinsicWeightReclaimed: AugmentedQuery<\n ApiType,\n () => Observable<SpWeightsWeightV2Weight>,\n []\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<ApiType, () => Observable<bool>, []>;\n /**\n * True if we have upgraded so that `type RefCount` is `u32`. False (default) if not.\n **/\n upgradedToU32RefCount: AugmentedQuery<ApiType, () => Observable<bool>, []>;\n };\n ticks: {\n currentTick: AugmentedQuery<ApiType, () => Observable<u64>, []>;\n genesisTick: AugmentedQuery<ApiType, () => Observable<u64>, []>;\n genesisTicker: AugmentedQuery<ApiType, () => Observable<ArgonPrimitivesTickTicker>, []>;\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 | { Relay: 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 | { Relay: 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: ITuple<[Bytes, Bytes]> | [Bytes | string | Uint8Array, Bytes | string | Uint8Array],\n ) => Observable<Option<Null>>,\n [ITuple<[Bytes, Bytes]>]\n >;\n };\n vaults: {\n /**\n * The last collect frame of each vault\n **/\n lastCollectFrameByVaultId: AugmentedQuery<\n ApiType,\n (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<u64>>,\n [u32]\n >;\n nextVaultId: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []>;\n /**\n * Bitcoin Locks pending cosign by vault id\n **/\n pendingCosignByVaultId: AugmentedQuery<\n ApiType,\n (arg: u32 | AnyNumber | Uint8Array) => Observable<BTreeSet<u64>>,\n [u32]\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 from Bitcoin Locks and Liquidity Pools for the trailing frames for each vault\n * (a frame is a \"mining day\" in Argon). Newest frames are first. Frames are removed after the\n * collect expiration window (`RevenueCollectionExpirationFrames`).\n **/\n revenuePerFrameByVault: AugmentedQuery<\n ApiType,\n (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<PalletVaultsVaultFrameRevenue>>,\n [u32]\n >;\n /**\n * The vaults that have funds releasing at a given bitcoin height\n **/\n vaultFundsReleasingByHeight: AugmentedQuery<\n ApiType,\n (arg: u64 | AnyNumber | Uint8Array) => Observable<BTreeSet<u32>>,\n [u64]\n >;\n /**\n * Vaults by id\n **/\n vaultsById: AugmentedQuery<\n ApiType,\n (arg: u32 | AnyNumber | Uint8Array) => 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<Option<ITuple<[ArgonPrimitivesBitcoinBitcoinXPub, u32]>>>,\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 { AccountId32, Call, H256, MultiAddress } from '@polkadot/types/interfaces/runtime';\nimport type {\n ArgonPrimitivesBitcoinCompressedBitcoinPubkey,\n ArgonPrimitivesBitcoinH256Le,\n ArgonPrimitivesBitcoinOpaqueBitcoinXpub,\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> = 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 (satoshis: u64 | AnyNumber | Uint8Array) => 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 lock will be allowed to expire without a 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 send btc to the cosigner UTXO address 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: ArgonPrimitivesBitcoinCompressedBitcoinPubkey | string | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [u32, Compact<u64>, ArgonPrimitivesBitcoinCompressedBitcoinPubkey]\n >;\n /**\n * Ratcheting allows a user to change the lock price of their bitcoin lock. This is\n * functionally the same as releasing and re-initializing, but it allows a user to skip\n * sending transactions through bitcoin and any associated fees. It also allows you to stay\n * on your original lock expiration without having to pay the full year of fees again.\n *\n * Ratcheting \"down\" - when the price of bitcoin is lower than your lock price, you pay the\n * full release price and get added back to the mint queue at the current market rate. You\n * pocket the difference between the already minted \"lock price\" and the new market value\n * (which you just had burned). Your new lock price is set to the market low, so you can\n * take advantage of ratchets \"up\" in the future.\n *\n * Ratcheting \"up\" - when the price of bitcoin is higher than your lock price, you pay a\n * prorated fee for the remainder of your existing lock duration. You are added to the mint\n * queue for the difference in your new lock price vs the previous lock price.\n **/\n ratchet: AugmentedSubmittable<\n (utxoId: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>,\n [u64]\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 (accountId: AccountId32 | string | Uint8Array) => 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: Option<u128> | null | Uint8Array | u128 | 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 | { consensusStateId?: any; unbondingPeriod?: any; challengePeriods?: any }\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 | { Relay: 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 frame (aka,\n * tomorrow noon EDT to day after tomorrow noon). The amount bonded to the pool cannot\n * exceed 1/10th of the 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 epoch starting at bonded frame is complete).\n **/\n unbondArgons: AugmentedSubmittable<\n (\n vaultId: u32 | AnyNumber | Uint8Array,\n frameId: u64 | AnyNumber | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [u32, u64]\n >;\n /**\n * Set the prebonded argons for a vault. This is used by the vault operator to\n * pre-register funding for each frame. The total allocation will be capped per frame using\n * the `max_amount_per_frame` parameter.\n *\n * NOTE: calling this a second time will ensure your max_amount_per_frame is updated.\n * However, it will not reduce your allocation\n **/\n vaultOperatorPrebond: AugmentedSubmittable<\n (\n vaultId: u32 | AnyNumber | Uint8Array,\n maxAmountPerFrame: u128 | AnyNumber | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [u32, u128]\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 * - `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 keys:\n | ArgonRuntimeSessionKeys\n | { grandpa?: any; blockSealAuthority?: any }\n | string\n | Uint8Array,\n miningAccountId: Option<AccountId32> | null | Uint8Array | AccountId32 | string,\n ) => SubmittableExtrinsic<ApiType>,\n [u128, ArgonRuntimeSessionKeys, Option<AccountId32>]\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: Option<u64> | null | Uint8Array | u64 | 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: Vec<AccountId32> | (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 [u16, Vec<AccountId32>, Option<PalletMultisigTimepoint>, U8aFixed, SpWeightsWeightV2Weight]\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: Vec<AccountId32> | (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 [u16, Vec<AccountId32>, Option<PalletMultisigTimepoint>, Call, SpWeightsWeightV2Weight]\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: Vec<AccountId32> | (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: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[],\n timepoint: PalletMultisigTimepoint | { height?: any; index?: any } | string | Uint8Array,\n callHash: U8aFixed | string | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [u16, Vec<AccountId32>, PalletMultisigTimepoint, U8aFixed]\n >;\n /**\n * Poke the deposit reserved for an existing multisig operation.\n *\n * The dispatch origin for this call must be _Signed_ and must be the original depositor of\n * the multisig operation.\n *\n * The transaction fee is waived if the deposit amount has changed.\n *\n * - `threshold`: The total number of approvals needed for this multisig.\n * - `other_signatories`: The accounts (other than the sender) who are part of the\n * multisig.\n * - `call_hash`: The hash of the call this deposit is reserved for.\n *\n * Emits `DepositPoked` if successful.\n **/\n pokeDeposit: AugmentedSubmittable<\n (\n threshold: u16 | AnyNumber | Uint8Array,\n otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[],\n callHash: U8aFixed | string | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [u16, Vec<AccountId32>, U8aFixed]\n >;\n };\n notaries: {\n activate: AugmentedSubmittable<\n (operatorAccount: AccountId32 | string | Uint8Array) => 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 (notaryId: u32 | AnyNumber | Uint8Array) => 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 (accountId: AccountId32 | string | Uint8Array) => 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 * Poke / Adjust deposits made for proxies and announcements based on current values.\n * This can be used by accounts to possibly lower their locked amount.\n *\n * The dispatch origin for this call must be _Signed_.\n *\n * The transaction fee is waived if the deposit amount has changed.\n *\n * Emits `DepositPoked` if successful.\n **/\n pokeDeposit: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;\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<() => SubmittableExtrinsic<ApiType>, []>;\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 (call: Call | IMethod | string | Uint8Array) => 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 (keys: Vec<Bytes> | (Bytes | string | Uint8Array)[]) => 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 (now: Compact<u64> | AnyNumber | Uint8Array) => 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 (addresses: BTreeMap<IsmpHostStateMachine, Bytes>) => 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 | { assetId?: any; addChains?: any; removeChains?: any; newAdmins?: any }\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: ArgonRuntimeOriginCaller | { system: any } | string | Uint8Array,\n call: Call | IMethod | string | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [ArgonRuntimeOriginCaller, Call]\n >;\n /**\n * Dispatches a function call with a provided origin.\n *\n * Almost the same as [`Pallet::dispatch_as`] but forwards any error of the inner call.\n *\n * The dispatch origin for this call must be _Root_.\n **/\n dispatchAsFallible: AugmentedSubmittable<\n (\n asOrigin: ArgonRuntimeOriginCaller | { system: any } | string | 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 fallback call in the event the main call fails to execute.\n * May be called from any origin except `None`.\n *\n * This function first attempts to dispatch the `main` call.\n * If the `main` call fails, the `fallback` is attemted.\n * if the fallback is successfully dispatched, the weights of both calls\n * are accumulated and an event containing the main call error is deposited.\n *\n * In the event of a fallback failure the whole call fails\n * with the weights returned.\n *\n * - `main`: The main call to be dispatched. This is the primary action to execute.\n * - `fallback`: The fallback call to be dispatched in case the `main` call fails.\n *\n * ## Dispatch Logic\n * - If the origin is `root`, both the main and fallback calls are executed without\n * applying any origin filters.\n * - If the origin is not `root`, the origin filter is applied to both the `main` and\n * `fallback` calls.\n *\n * ## Use Case\n * - Some use cases might involve submitting a `batch` type call in either main, fallback\n * or both.\n **/\n ifElse: AugmentedSubmittable<\n (\n main: Call | IMethod | string | Uint8Array,\n fallback: Call | IMethod | string | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [Call, 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 bitcoin locks from this vault. Will not affect existing\n * locks. As funds are returned, they will be released to the vault owner.\n **/\n close: AugmentedSubmittable<\n (vaultId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>,\n [u32]\n >;\n collect: AugmentedSubmittable<\n (vaultId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>,\n [u32]\n >;\n create: AugmentedSubmittable<\n (\n vaultConfig:\n | PalletVaultsVaultConfig\n | { terms?: any; securitization?: any; bitcoinXpubkey?: any; securitizationRatio?: any }\n | string\n | Uint8Array,\n ) => SubmittableExtrinsic<ApiType>,\n [PalletVaultsVaultConfig]\n >;\n /**\n * Modify funds allocated by the vault. This will not affect issued bitcoin locks, 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 bitcoin locks are released. To stop issuing any more bitcoin\n * locks, 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 bitcoin locks,\n * but will be used for any locks after this point. Will be rejected if already\n * used.\n **/\n replaceBitcoinXpub: AugmentedSubmittable<\n (\n vaultId: u32 | AnyNumber | Uint8Array,\n bitcoinXpub: ArgonPrimitivesBitcoinOpaqueBitcoinXpub | string | 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 { ExtrinsicOrHash, ExtrinsicStatus } 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 { MmrHash, MmrLeafBatchProof } from '@polkadot/types/interfaces/mmr';\nimport type { StorageKind } from '@polkadot/types/interfaces/offchain';\nimport type { FeeDetails, RuntimeDispatchInfoV1 } 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 (publicKey: Bytes | string | Uint8Array, keyType: Text | string) => Observable<bool>\n >;\n /**\n * Returns true if the keystore has private keys for the given session public keys.\n **/\n hasSessionKeys: AugmentedRpc<(sessionKeys: Bytes | string | Uint8Array) => Observable<bool>>;\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 | (ExtrinsicOrHash | { Hash: any } | { Extrinsic: any } | string | Uint8Array)[],\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 (extrinsic: Extrinsic | IExtrinsic | string | Uint8Array) => Observable<ExtrinsicStatus>\n >;\n /**\n * Submit a fully formatted extrinsic for block inclusion\n **/\n submitExtrinsic: AugmentedRpc<\n (extrinsic: Extrinsic | IExtrinsic | string | Uint8Array) => 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<() => Observable<HashMap<AuthorityId, EpochAuthorship>>>;\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<() => Observable<BeefyVersionedFinalityProof>>;\n };\n chain: {\n /**\n * Get header and body of a relay chain block\n **/\n getBlock: AugmentedRpc<(hash?: BlockHash | string | Uint8Array) => Observable<SignedBlock>>;\n /**\n * Get the block hash for a specific block\n **/\n getBlockHash: AugmentedRpc<\n (blockNumber?: BlockNumber | AnyNumber | Uint8Array) => 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<(hash?: BlockHash | string | Uint8Array) => Observable<Header>>;\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 | { origin?: any; value?: any; gasLimit?: any; code?: any; data?: any; salt?: any }\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 (hash: BlockHash | string | Uint8Array, justification?: Justification) => 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: Option<Vec<f64>> | null | Uint8Array | Vec<f64> | 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 | { fromBlock?: any; toBlock?: any; blockHash?: any; address?: any; topics?: any }\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 | { fromBlock?: any; toBlock?: any; blockHash?: any; address?: any; topics?: any }\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<(bytes: Bytes | string | Uint8Array) => Observable<H256>>;\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 (index: U256 | AnyNumber | Uint8Array, hash: H256 | string | Uint8Array) => 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?: EthSubParams | { None: any } | { Logs: any } | string | 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<(index: U256 | AnyNumber | Uint8Array) => Observable<bool>>;\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<() => Observable<JustificationNotification>>;\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<(at?: BlockHash | string | Uint8Array) => Observable<MmrHash>>;\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<(at?: BlockHash | string | Uint8Array) => Observable<Metadata>>;\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 (at?: BlockHash | string | Uint8Array) => Observable<MigrationStatusResult>\n >;\n };\n syncstate: {\n /**\n * Returns the json-serialized chainspec running the node, with a sync state.\n **/\n genSyncSpec: AugmentedRpc<(raw: bool | boolean | Uint8Array) => Observable<Json>>;\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<(directives: Text | string) => Observable<Null>>;\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<(peerId: Text | string) => Observable<Text>>;\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<(data: Bytes | string | Uint8Array) => Observable<H256>>;\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 { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types';\nimport type { Bytes, Null, Option, Result, Vec, u32 } from '@polkadot/types-codec';\nimport type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';\nimport type { OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe';\nimport type { CheckInherentsResult, InherentData } 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 { FeeDetails, RuntimeDispatchInfo } 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 { TransactionSource, TransactionValidity } 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> = 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: Block | { header?: any; extrinsics?: any } | string | 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: Block | { header?: any; extrinsics?: any } | string | 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 (json: Bytes | string | Uint8Array) => 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<ApiType, () => Observable<AuthorityList>>;\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 (version: u32 | AnyNumber | Uint8Array) => 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 (seed: Option<Bytes> | null | Uint8Array | Bytes | string) => Observable<Bytes>\n >;\n };\n /** 0xd2bc9897eed08f15/3 */\n taggedTransactionQueue: {\n /**\n * Validate the transaction.\n **/\n validateTransaction: AugmentedCall<\n ApiType,\n (\n source: TransactionSource | 'InBlock' | 'Local' | 'External' | number | 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: Weight | { refTime?: any; proofSize?: any } | string | 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: Weight | { refTime?: any; proofSize?: any } | string | 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 { ExtrinsicOrHash, ExtrinsicStatus } 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 { AuthorityId, RawVRFOutput } 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 ContractContractSpecV6,\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 ContractMetadataV6,\n ContractProject,\n ContractProjectContract,\n ContractProjectInfo,\n ContractProjectSource,\n ContractProjectV0,\n ContractReviveProjectInfo,\n ContractReviveProjectSource,\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 { CreatedBlock, ImportedAux } 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 { CallIndex, LotteryConfig } from '@polkadot/types/interfaces/lottery';\nimport type {\n CustomMetadata15,\n CustomValueMetadata15,\n EnumDeprecationInfoV16,\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 ExtrinsicMetadataV16,\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 ItemDeprecationInfoV16,\n MetadataAll,\n MetadataLatest,\n MetadataV10,\n MetadataV11,\n MetadataV12,\n MetadataV13,\n MetadataV14,\n MetadataV15,\n MetadataV16,\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 PalletAssociatedTypeMetadataV16,\n PalletCallMetadataLatest,\n PalletCallMetadataV14,\n PalletCallMetadataV16,\n PalletConstantMetadataLatest,\n PalletConstantMetadataV14,\n PalletConstantMetadataV16,\n PalletErrorMetadataLatest,\n PalletErrorMetadataV14,\n PalletErrorMetadataV16,\n PalletEventMetadataLatest,\n PalletEventMetadataV14,\n PalletEventMetadataV16,\n PalletMetadataLatest,\n PalletMetadataV14,\n PalletMetadataV15,\n PalletMetadataV16,\n PalletStorageMetadataLatest,\n PalletStorageMetadataV14,\n PalletStorageMetadataV16,\n PalletViewFunctionMetadataV16,\n PortableType,\n PortableTypeV14,\n RuntimeApiMetadataLatest,\n RuntimeApiMetadataV15,\n RuntimeApiMetadataV16,\n RuntimeApiMethodMetadataV15,\n RuntimeApiMethodMetadataV16,\n RuntimeApiMethodParamMetadataV15,\n SignedExtensionMetadataLatest,\n SignedExtensionMetadataV14,\n StorageEntryMetadataLatest,\n StorageEntryMetadataV10,\n StorageEntryMetadataV11,\n StorageEntryMetadataV12,\n StorageEntryMetadataV13,\n StorageEntryMetadataV14,\n StorageEntryMetadataV16,\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 TransactionExtensionMetadataLatest,\n TransactionExtensionMetadataV16,\n VariantDeprecationInfoV16,\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 { NftCollectionId, NftItemId } 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 { AccountStatus, AccountValidity } from '@polkadot/types/interfaces/purchase';\nimport type { ActiveRecovery, RecoveryConfig } 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 AssetIdV5,\n AssetInstance,\n AssetInstanceV0,\n AssetInstanceV1,\n AssetInstanceV2,\n AssetInstanceV3,\n AssetInstanceV4,\n AssetInstanceV5,\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 FungibilityV5,\n HintV5,\n InboundStatus,\n InstructionV2,\n InstructionV3,\n InstructionV4,\n InstructionV5,\n InteriorMultiLocation,\n InteriorMultiLocationV2,\n InteriorMultiLocationV3,\n InteriorMultiLocationV5,\n Junction,\n JunctionV0,\n JunctionV1,\n JunctionV2,\n JunctionV3,\n JunctionV4,\n JunctionV5,\n Junctions,\n JunctionsV1,\n JunctionsV2,\n JunctionsV3,\n JunctionsV4,\n JunctionsV5,\n MaxPalletNameLen,\n MaxPalletsInfo,\n MaybeErrorCodeV3,\n MultiAsset,\n MultiAssetFilter,\n MultiAssetFilterV1,\n MultiAssetFilterV2,\n MultiAssetFilterV3,\n MultiAssetFilterV4,\n MultiAssetFilterV5,\n MultiAssetTransferFilterV5,\n MultiAssetV0,\n MultiAssetV1,\n MultiAssetV2,\n MultiAssetV3,\n MultiAssetV4,\n MultiAssetV5,\n MultiAssets,\n MultiAssetsV1,\n MultiAssetsV2,\n MultiAssetsV3,\n MultiAssetsV4,\n MultiAssetsV5,\n MultiLocation,\n MultiLocationV0,\n MultiLocationV1,\n MultiLocationV2,\n MultiLocationV3,\n MultiLocationV4,\n MultiLocationV5,\n NetworkId,\n NetworkIdV2,\n NetworkIdV3,\n NetworkIdV4,\n NetworkIdV5,\n OriginKindV0,\n OriginKindV1,\n OriginKindV2,\n OriginKindV3,\n OriginKindV4,\n OutboundStatus,\n Outcome,\n OutcomeV4,\n PalletInfoV3,\n PalletInfoV4,\n PalletInfoV5,\n QueryId,\n QueryResponseInfoV3,\n QueryResponseInfoV4,\n QueryResponseInfoV5,\n QueryStatus,\n QueueConfigData,\n Response,\n ResponseV0,\n ResponseV1,\n ResponseV2,\n ResponseV2Error,\n ResponseV3,\n ResponseV3Error,\n ResponseV3Result,\n ResponseV4,\n ResponseV5,\n UncheckedFungibilityV4,\n UncheckedFungibilityV5,\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 WildFungibilityV5,\n WildMultiAsset,\n WildMultiAssetV1,\n WildMultiAssetV2,\n WildMultiAssetV3,\n WildMultiAssetV4,\n WildMultiAssetV5,\n Xcm,\n XcmAssetId,\n XcmError,\n XcmErrorV0,\n XcmErrorV1,\n XcmErrorV2,\n XcmErrorV3,\n XcmErrorV4,\n XcmErrorV5,\n XcmOrderV0,\n XcmOrderV1,\n XcmOrigin,\n XcmOriginKind,\n XcmV0,\n XcmV1,\n XcmV2,\n XcmV3,\n XcmV4,\n XcmV5,\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 AssetIdV5: AssetIdV5;\n AssetInstance: AssetInstance;\n AssetInstanceV0: AssetInstanceV0;\n AssetInstanceV1: AssetInstanceV1;\n AssetInstanceV2: AssetInstanceV2;\n AssetInstanceV3: AssetInstanceV3;\n AssetInstanceV4: AssetInstanceV4;\n AssetInstanceV5: AssetInstanceV5;\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 ContractContractSpecV6: ContractContractSpecV6;\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 ContractMetadataV6: ContractMetadataV6;\n ContractProject: ContractProject;\n ContractProjectContract: ContractProjectContract;\n ContractProjectInfo: ContractProjectInfo;\n ContractProjectSource: ContractProjectSource;\n ContractProjectV0: ContractProjectV0;\n ContractReturnFlags: ContractReturnFlags;\n ContractReviveProjectInfo: ContractReviveProjectInfo;\n ContractReviveProjectSource: ContractReviveProjectSource;\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 EnumDeprecationInfoV16: EnumDeprecationInfoV16;\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 ExtrinsicMetadataV16: ExtrinsicMetadataV16;\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 FungibilityV5: FungibilityV5;\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 HintV5: HintV5;\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 InstructionV5: InstructionV5;\n InstructionWeights: InstructionWeights;\n InteriorMultiLocation: InteriorMultiLocation;\n InteriorMultiLocationV2: InteriorMultiLocationV2;\n InteriorMultiLocationV3: InteriorMultiLocationV3;\n InteriorMultiLocationV5: InteriorMultiLocationV5;\n InvalidDisputeStatementKind: InvalidDisputeStatementKind;\n InvalidTransaction: InvalidTransaction;\n isize: isize;\n ISize: ISize;\n ItemDeprecationInfoV16: ItemDeprecationInfoV16;\n Json: Json;\n Junction: Junction;\n Junctions: Junctions;\n JunctionsV1: JunctionsV1;\n JunctionsV2: JunctionsV2;\n JunctionsV3: JunctionsV3;\n JunctionsV4: JunctionsV4;\n JunctionsV5: JunctionsV5;\n JunctionV0: JunctionV0;\n JunctionV1: JunctionV1;\n JunctionV2: JunctionV2;\n JunctionV3: JunctionV3;\n JunctionV4: JunctionV4;\n JunctionV5: JunctionV5;\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 MetadataV16: MetadataV16;\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 MultiAssetFilterV5: MultiAssetFilterV5;\n MultiAssets: MultiAssets;\n MultiAssetsV1: MultiAssetsV1;\n MultiAssetsV2: MultiAssetsV2;\n MultiAssetsV3: MultiAssetsV3;\n MultiAssetsV4: MultiAssetsV4;\n MultiAssetsV5: MultiAssetsV5;\n MultiAssetTransferFilterV5: MultiAssetTransferFilterV5;\n MultiAssetV0: MultiAssetV0;\n MultiAssetV1: MultiAssetV1;\n MultiAssetV2: MultiAssetV2;\n MultiAssetV3: MultiAssetV3;\n MultiAssetV4: MultiAssetV4;\n MultiAssetV5: MultiAssetV5;\n MultiDisputeStatementSet: MultiDisputeStatementSet;\n MultiLocation: MultiLocation;\n MultiLocationV0: MultiLocationV0;\n MultiLocationV1: MultiLocationV1;\n MultiLocationV2: MultiLocationV2;\n MultiLocationV3: MultiLocationV3;\n MultiLocationV4: MultiLocationV4;\n MultiLocationV5: MultiLocationV5;\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 NetworkIdV5: NetworkIdV5;\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 PalletAssociatedTypeMetadataV16: PalletAssociatedTypeMetadataV16;\n PalletCallMetadataLatest: PalletCallMetadataLatest;\n PalletCallMetadataV14: PalletCallMetadataV14;\n PalletCallMetadataV16: PalletCallMetadataV16;\n PalletConstantMetadataLatest: PalletConstantMetadataLatest;\n PalletConstantMetadataV14: PalletConstantMetadataV14;\n PalletConstantMetadataV16: PalletConstantMetadataV16;\n PalletErrorMetadataLatest: PalletErrorMetadataLatest;\n PalletErrorMetadataV14: PalletErrorMetadataV14;\n PalletErrorMetadataV16: PalletErrorMetadataV16;\n PalletEventMetadataLatest: PalletEventMetadataLatest;\n PalletEventMetadataV14: PalletEventMetadataV14;\n PalletEventMetadataV16: PalletEventMetadataV16;\n PalletId: PalletId;\n PalletInfoV3: PalletInfoV3;\n PalletInfoV4: PalletInfoV4;\n PalletInfoV5: PalletInfoV5;\n PalletMetadataLatest: PalletMetadataLatest;\n PalletMetadataV14: PalletMetadataV14;\n PalletMetadataV15: PalletMetadataV15;\n PalletMetadataV16: PalletMetadataV16;\n PalletsOrigin: PalletsOrigin;\n PalletStorageMetadataLatest: PalletStorageMetadataLatest;\n PalletStorageMetadataV14: PalletStorageMetadataV14;\n PalletStorageMetadataV16: PalletStorageMetadataV16;\n PalletVersion: PalletVersion;\n PalletViewFunctionMetadataV16: PalletViewFunctionMetadataV16;\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 QueryResponseInfoV5: QueryResponseInfoV5;\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 ResponseV5: ResponseV5;\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 RuntimeApiMetadataV16: RuntimeApiMetadataV16;\n RuntimeApiMethodMetadataV15: RuntimeApiMethodMetadataV15;\n RuntimeApiMethodMetadataV16: RuntimeApiMethodMetadataV16;\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 StorageEntryMetadataV16: StorageEntryMetadataV16;\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 TransactionExtensionMetadataLatest: TransactionExtensionMetadataLatest;\n TransactionExtensionMetadataV16: TransactionExtensionMetadataV16;\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 UncheckedFungibilityV5: UncheckedFungibilityV5;\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 VariantDeprecationInfoV16: VariantDeprecationInfoV16;\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 WildFungibilityV5: WildFungibilityV5;\n WildMultiAsset: WildMultiAsset;\n WildMultiAssetV1: WildMultiAssetV1;\n WildMultiAssetV2: WildMultiAssetV2;\n WildMultiAssetV3: WildMultiAssetV3;\n WildMultiAssetV4: WildMultiAssetV4;\n WildMultiAssetV5: WildMultiAssetV5;\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 XcmErrorV5: XcmErrorV5;\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 XcmV5: XcmV5;\n XcmVersion: XcmVersion;\n } // InterfaceTypes\n} // declare module\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 { cryptoWaitReady, decodeAddress, mnemonicGenerate } 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 { WageProtector } from './WageProtector';\nexport { TxSubmitter, TxResult, ITxProgressCallback } from './TxSubmitter';\nexport { Accountset, type ISubaccountMiner, type IMiningIndex } from './Accountset';\nexport { MiningBids } from './MiningBids';\nexport { AccountMiners } from './AccountMiners';\nexport { FrameCalculator } from './FrameCalculator';\nexport { BlockWatch, getAuthorFromHeader, getTickFromHeader } from './BlockWatch';\nexport * from './utils';\nexport { AccountRegistry } from './AccountRegistry';\nexport { Vault } from './Vault';\nexport { VaultMonitor } from './VaultMonitor';\nexport { CohortBidder } from './CohortBidder';\nexport { BidPool } from './BidPool';\nexport * from './BitcoinLocks';\nexport * from './keyringUtils';\nexport { Keyring, KeyringPair, KeyringPair$Json, KeypairType, mnemonicGenerate, decodeAddress };\nexport { setConfig, getConfig, type ArgonClientConfig } from './config';\n\nexport { u8aToHex, hexToU8a, u8aEq } from '@polkadot/util';\n\nexport * from '@polkadot/types/lookup';\nexport { GenericEvent, GenericBlock, GenericAddress } from '@polkadot/types/generic';\nexport {\n BTreeMap,\n Bytes,\n Compact,\n Enum,\n Null,\n Option,\n Result,\n Bool,\n Tuple,\n Range,\n Struct,\n Text,\n U256,\n U8aFixed,\n Vec,\n bool,\n i128,\n u128,\n u16,\n u32,\n u64,\n u8,\n} from '@polkadot/types-codec';\nexport type {\n ISubmittableResult,\n IExtrinsic,\n SignerResult,\n Signer,\n ISignerPayload,\n} from '@polkadot/types/types/extrinsic';\nexport { type ITuple, type Codec } from '@polkadot/types-codec/types';\nexport {\n type AccountId32,\n type Call,\n type H160,\n type H256,\n type MultiAddress,\n type Permill,\n type AccountId,\n type Header,\n type Block,\n} from '@polkadot/types/interfaces/runtime';\nexport type { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author';\nexport { type BlockHash } from '@polkadot/types/interfaces/chain';\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","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 (baseWage * this.latestCpi.argonUsdTargetPrice) / this.latestCpi.argonUsdPrice;\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: new Uint8Array(finalizedBlock),\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","export interface ArgonClientConfig {\n debug?: boolean;\n keysVersion?: number;\n keySeedOrMnemonic?: string;\n subaccountRange?: string;\n}\n\nlet config: ArgonClientConfig = {};\n\n// Safe environment variable access that works in both Node.js and browser\nfunction getEnvVar(key: string): string | undefined {\n if (typeof process !== 'undefined' && process.env) {\n return process.env[key];\n }\n return undefined;\n}\n\nexport function setConfig(newConfig: ArgonClientConfig): void {\n config = { ...config, ...newConfig };\n}\n\nexport function getConfig(): ArgonClientConfig {\n return {\n debug: config.debug ?? getEnvVar('DEBUG') === 'true',\n keysVersion:\n config.keysVersion ??\n (getEnvVar('KEYS_VERSION') ? parseInt(getEnvVar('KEYS_VERSION')!) : undefined),\n keySeedOrMnemonic: config.keySeedOrMnemonic ?? getEnvVar('KEYS_MNEMONIC'),\n subaccountRange: config.subaccountRange ?? getEnvVar('SUBACCOUNT_RANGE') ?? '0-9',\n };\n}\n","import type { ISubmittableResult } from '@polkadot/types/types/extrinsic';\nimport {\n ArgonClient,\n dispatchErrorToExtrinsicError,\n ExtrinsicError,\n GenericEvent,\n KeyringPair,\n waitForLoad,\n} from './index';\nimport type { SubmittableExtrinsic } from '@polkadot/api/promise/types';\nimport type { SignerOptions } from '@polkadot/api/types';\nimport { getConfig } from './config';\n\nexport function logExtrinsicResult(result: ISubmittableResult) {\n if (getConfig().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 const userBalance = availableBalance;\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: userBalance, txFee: fees };\n }\n\n public async submit(\n options: Partial<SignerOptions> & {\n logResults?: boolean;\n waitForBlock?: boolean;\n useLatestNonce?: boolean;\n txProgressCallback?: ITxProgressCallback;\n } = {},\n ): Promise<TxResult> {\n const { logResults, waitForBlock, useLatestNonce, ...apiOptions } = options;\n await waitForLoad();\n const result = new TxResult(this.client, logResults);\n result.txProgressCallback = options.txProgressCallback;\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 (useLatestNonce && !apiOptions.nonce) {\n apiOptions.nonce = await this.client.rpc.system.accountNextIndex(this.pair.address);\n }\n\n console.log('Submitting transaction from %s:', this.pair.address, ...args);\n await this.tx.signAndSend(this.pair, apiOptions, result.onResult.bind(result));\n if (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 type ITxProgressCallback = (progressToInBlock: number, result?: TxResult) => void;\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 public txProgressCallback?: ITxProgressCallback;\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 = new Uint8Array(status.asInBlock);\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 (this.client.events.transactionPayment.TransactionFeePaid.is(event.event)) {\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(this.client, encounteredError, batchErrorIndex);\n this.reject(error);\n } else {\n this.inBlockResolve(new Uint8Array(status.asInBlock));\n }\n }\n if (isFinalized) {\n this.finalizedResolve(status.asFinalized);\n }\n if (this.txProgressCallback) {\n let percent = 0;\n if (result.status.isBroadcast) {\n percent = 50;\n } else if (result.status.isInBlock) {\n percent = 100;\n }\n this.txProgressCallback(percent, this);\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';\nimport { ed25519DeriveHard, keyExtractSuri, mnemonicToMiniSecret } from '@polkadot/util-crypto';\nimport { u8aToHex } from '@polkadot/util';\n\nconst { ROUND_FLOOR } = BN;\n\nexport const MICROGONS_PER_ARGON = 1_000_000;\n\nexport function miniSecretFromUri(uri: string, password?: string): string {\n const { phrase, path } = keyExtractSuri(uri);\n let mini = mnemonicToMiniSecret(phrase, password); // base 32B\n for (const j of path) {\n if (!j.isHard) throw new Error('ed25519 soft derivation not supported');\n mini = ed25519DeriveHard(mini, j.chainCode);\n }\n return u8aToHex(mini);\n}\n\nexport function formatArgons(microgons: bigint | number): string {\n if (microgons === undefined || microgons === null) return 'na';\n const isNegative = microgons < 0;\n let format = BigNumber(microgons.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\ntype NonNullableProps<T> = {\n [K in keyof T]-?: Exclude<T[K], undefined | null>;\n};\n\nexport function filterUndefined<T extends Record<string, any>>(\n obj: Partial<T>,\n): NonNullableProps<T> {\n return Object.fromEntries(\n Object.entries(obj).filter(([_, value]) => value !== undefined && value !== null),\n ) as NonNullableProps<T>;\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 = descriptor && descriptor.get ? descriptor.get.call(obj) : 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 toFixedNumber(\n value: string | number | BigNumber, // accept string to avoid early precision loss\n decimals: number,\n): bigint {\n const factor = new BigNumber(10).pow(decimals);\n const bn = new BigNumber(value);\n // truncate toward 0; use ROUND_FLOOR if you really need floor for positives\n const int = bn.times(factor).integerValue(BigNumber.ROUND_DOWN);\n return BigInt(int.toFixed(0));\n}\n\nexport function convertNumberToFixedU128(value: number): bigint {\n return toFixedNumber(value, 18);\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 convertNumberToPermill(value: number): bigint {\n return toFixedNumber(value, 6);\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(client: ArgonClient, error: DispatchError) {\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(`${section}.${name}`, docs.join(' '), batchInterruptedIndex);\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(new Error(`${event.section}.${event.method}:: ExtrinsicFailed:: ${errorInfo}`));\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) => {\n if (typeof v === 'bigint') {\n return `${v}n`; // Append 'n' to indicate BigInt\n }\n // convert Uint8Array objects to a JSON representation\n if (v instanceof Uint8Array) {\n return {\n type: 'Buffer',\n data: Array.from(v), // Convert Uint8Array to an array of numbers\n };\n }\n return v;\n },\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.match(/^-?\\d+n$/)) {\n return BigInt(v.slice(0, -1));\n }\n // rehydrate Uint8Array objects\n if (typeof v === 'object' && v !== null && v.type === 'Buffer' && Array.isArray(v.data)) {\n return Uint8Array.from(v.data);\n }\n return v;\n });\n }\n}\n\nexport function createNanoEvents<Events extends EventsMap = DefaultEvents>(): TypedEmitter<Events> {\n return new TypedEmitter<Events>();\n}\n\nexport class TypedEmitter<Events extends EventsMap = DefaultEvents> {\n private events: Partial<{ [E in keyof Events]: Events[E][] }> = {};\n\n emit<K extends keyof Events>(this: this, event: K, ...args: Parameters<Events[K]>): void {\n for (const cb of this.events[event] || []) {\n cb(...args);\n }\n }\n\n on<K extends keyof Events>(this: this, event: K, cb: Events[K]): () => void {\n (this.events[event] ||= []).push(cb);\n return () => {\n this.events[event] = this.events[event]?.filter(i => cb !== i);\n };\n }\n}\n\ninterface EventsMap {\n [event: string]: any;\n}\n\ninterface DefaultEvents extends EventsMap {\n [event: string]: (...args: any) => void;\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 => new AccountRegistry(name);\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 './utils';\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; lockPrice: bigint },\n ) => void;\n 'mining-bid': (header: Header, bid: { amount: bigint; accountId: string }) => 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(client: ArgonClient, header: Header): 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(client: ArgonClient, header: Header): 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 locksById: {\n [utxoId: number]: {\n vaultId: number;\n lockPrice: bigint;\n };\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 = 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 (client.events.liquidityPools.NextBidPoolCapitalLocked.is(event)) {\n const { totalActivatedCapital } = event.data;\n data.totalActivatedCapital = formatArgons(totalActivatedCapital.toBigInt());\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.locksById[utxoId.toNumber()] = {\n vaultId: vaultId.toNumber(),\n lockPrice: 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(utxoId.toNumber(), blockHash);\n this.events.emit('bitcoin-verified', header, {\n utxoId: utxoId.toNumber(),\n vaultId: details.vaultId,\n lockPrice: details.lockPrice,\n });\n\n data.lockPrice = formatArgons(details.lockPrice);\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) 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; lockPrice: bigint }> {\n const client = await this.mainchain;\n const api = await client.at(blockHash);\n if (!this.locksById[utxoId]) {\n const lock = await api.query.bitcoinLocks.locksByUtxoId(utxoId);\n this.locksById[utxoId] = {\n vaultId: lock.value.vaultId.toNumber(),\n lockPrice: lock.value.lockPrice.toBigInt(),\n };\n }\n return this.locksById[utxoId];\n }\n}\n","import { type ArgonClient, getTickFromHeader, type Header } from './index';\n\n/**\n * A frame starts with the bidding start time (noon EDT), and ends the next day at noon EDT. Frame 0 was the first day of\n * bidding, and frame 1 began once the first miners were selected. This occurred on February 24th, 2025 at 12pm EDT.\n *\n * This class calculates fromeId from ticks.\n */\nexport class FrameCalculator {\n miningConfig: { ticksBetweenSlots: number; slotBiddingStartAfterTicks: number } | undefined;\n genesisTick: number | undefined;\n tickMillis: number | undefined;\n\n async load(client: ArgonClient) {\n return await this.getConfig(client);\n }\n\n async getForTick(client: ArgonClient, tick: number) {\n const { ticksBetweenFrames, biddingStartTick } = await this.getConfig(client);\n\n const ticksSinceMiningStart = tick - biddingStartTick;\n\n return Math.floor(ticksSinceMiningStart / ticksBetweenFrames);\n }\n\n async getTickRangeForFrame(client: ArgonClient, frameId: number): Promise<[number, number]> {\n const { ticksBetweenFrames, biddingStartTick } = await this.getConfig(client);\n\n return FrameCalculator.calculateTickRangeForFrame(frameId, {\n ticksBetweenFrames,\n biddingStartTick,\n });\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 static frameToDateRange(\n frameId: number,\n config: {\n ticksBetweenFrames: number;\n biddingStartTick: number;\n tickMillis: number;\n },\n ): [Date, Date] {\n const [start, end] = FrameCalculator.calculateTickRangeForFrame(frameId, config);\n return [new Date(start * config.tickMillis), new Date(end * config.tickMillis)];\n }\n\n static calculateTickRangeForFrame(\n frameId: number,\n config: {\n ticksBetweenFrames: number;\n biddingStartTick: number;\n },\n ): [number, number] {\n const { ticksBetweenFrames, biddingStartTick } = config;\n\n const startingTick = biddingStartTick + Math.floor(frameId * ticksBetweenFrames);\n const endingTick = startingTick + ticksBetweenFrames - 1;\n\n return [startingTick, endingTick];\n }\n\n private async getConfig(client: ArgonClient) {\n this.miningConfig ??= await client.query.miningSlot.miningConfig().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: { toNumber: () => number }) => x.toNumber());\n this.tickMillis ??= await client.query.ticks\n .genesisTicker()\n .then(x => x.tickDurationMillis.toNumber());\n const config = this.miningConfig!;\n const genesisTick = this.genesisTick!;\n return {\n ticksBetweenFrames: config.ticksBetweenSlots,\n slotBiddingStartAfterTicks: config.slotBiddingStartAfterTicks,\n genesisTick,\n tickMillis: this.tickMillis!,\n biddingStartTick: genesisTick + config.slotBiddingStartAfterTicks,\n };\n }\n}\n","import { Accountset, IMiningIndex, ISubaccountMiner } from './Accountset';\nimport { Header } from '@polkadot/types/interfaces/runtime';\nimport { GenericEvent } from '@polkadot/types';\nimport { BlockWatch } from './BlockWatch';\nimport { FrameCalculator } from './FrameCalculator';\nimport { createNanoEvents } from './utils';\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 forCohortWithStartingFrameId: number;\n duringFrameId: number;\n },\n ) => void;\n minted: (\n header: Header,\n minted: {\n accountId: string;\n argons: bigint;\n forCohortWithStartingFrameId: number;\n duringFrameId: number;\n },\n ) => void;\n }>();\n\n public frameCalculator: FrameCalculator;\n\n private trackedAccountsByAddress: {\n [address: string]: {\n startingFrameId: number;\n subaccountIndex: number;\n };\n } = {};\n\n constructor(\n private accountset: Accountset,\n registeredMiners: (ISubaccountMiner & { seat: IMiningIndex })[],\n private options: { shouldLog: boolean } = { shouldLog: false },\n ) {\n this.frameCalculator = new FrameCalculator();\n for (const miner of registeredMiners) {\n this.trackedAccountsByAddress[miner.address] = {\n startingFrameId: miner.seat.startingFrameId,\n subaccountIndex: miner.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('> Our vote author', this.accountset.accountRegistry.getName(author));\n }\n } else {\n console.warn('> No vote author found');\n }\n const client = await this.accountset.client;\n const currentFrameId = await this.frameCalculator.getForTick(client, tick);\n let newMiners: { frameId: number; addresses: string[] } | undefined;\n const dataByCohort: {\n duringFrameId: number;\n [cohortStartingFrameId: number]: {\n argonsMinted: bigint;\n argonsMined: bigint;\n argonotsMined: bigint;\n };\n } = { duringFrameId: currentFrameId };\n for (const event of events) {\n if (client.events.miningSlot.NewMiners.is(event)) {\n newMiners = {\n frameId: event.data.frameId.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.startingFrameId] ??= {\n argonsMinted: 0n,\n argonsMined: 0n,\n argonotsMined: 0n,\n };\n dataByCohort[entry.startingFrameId].argonotsMined += ownership.toBigInt();\n dataByCohort[entry.startingFrameId].argonsMined += argons.toBigInt();\n this.events.emit('mined', header, {\n author,\n argons: argons.toBigInt(),\n argonots: ownership.toBigInt(),\n forCohortWithStartingFrameId: entry.startingFrameId,\n duringFrameId: currentFrameId,\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(this.trackedAccountsByAddress)) {\n const { startingFrameId } = info;\n dataByCohort[startingFrameId] ??= {\n argonsMinted: 0n,\n argonsMined: 0n,\n argonotsMined: 0n,\n };\n dataByCohort[startingFrameId].argonsMinted += amountPerMiner;\n this.events.emit('minted', header, {\n accountId: address,\n argons: amountPerMiner,\n forCohortWithStartingFrameId: startingFrameId,\n duringFrameId: currentFrameId,\n });\n }\n }\n }\n }\n if (newMiners) {\n this.newCohortMiners(newMiners.frameId, newMiners.addresses);\n }\n return dataByCohort;\n }\n\n private newCohortMiners(frameId: number, addresses: string[]) {\n for (const [address, info] of Object.entries(this.trackedAccountsByAddress)) {\n if (info.startingFrameId === frameId - 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 startingFrameId: frameId,\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.seat !== undefined);\n return new AccountMiners(accountset, registered as any, {\n shouldLog: options.shouldLog ?? false,\n });\n }\n}\n","import { type ArgonClient, getClient, Keyring, type KeyringPair } from './index';\nimport { dispatchErrorToString, formatArgons } from './utils';\nimport { logExtrinsicResult, TxSubmitter } from './TxSubmitter';\nimport { AccountRegistry } from './AccountRegistry';\nimport { SubmittableExtrinsic } from '@polkadot/api/promise/types';\nimport { AccountMiners } from './AccountMiners';\nimport { ApiDecoration } from '@polkadot/api/types';\nimport { getConfig } from './config';\nimport { u8aToHex } from '@polkadot/util';\n\nexport type SubaccountRange = readonly number[];\n\nexport type IAddressNames = Map<string, string>;\n\nexport interface ISubaccountMiner {\n address: string;\n subaccountIndex: number;\n seat?: IMiningIndex;\n isLastDay: boolean;\n}\n\nexport interface IMiningIndex {\n startingFrameId: number;\n index: number;\n bidAmount: bigint;\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 sessionKeySeed: string | undefined;\n\n constructor(\n options: {\n client: Promise<ArgonClient>;\n accountRegistry?: AccountRegistry;\n subaccountRange?: SubaccountRange;\n sessionKeySeedOrMnemonic?: 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.sessionKeySeed = options.sessionKeySeedOrMnemonic;\n this.accountRegistry = options.accountRegistry ?? AccountRegistry.factory(options.name);\n this.client = options.client;\n const defaultRange = options.subaccountRange ?? getDefaultSubaccountRange();\n this.accountRegistry.register(this.seedAddress, `${this.accountRegistry.me}//seed`);\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(pair.address, `${this.accountRegistry.me}//${i}`);\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(this.txSubmitterPair.address);\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(api: ApiDecoration<'promise'>): Promise<ISubaccountMiner[]> {\n const addresses = Object.keys(this.subAccountsByAddress);\n const rawIndices = await api.query.miningSlot.accountIndexLookup.multi(addresses);\n const frameIds = [\n ...new Set(\n rawIndices\n .map(x => (x.isNone ? undefined : x.value[0].toNumber()))\n .filter(x => x !== undefined),\n ),\n ];\n const bidAmountsByFrame: { [frameId: number]: bigint[] } = {};\n if (frameIds.length) {\n const cohorts = await api.query.miningSlot.minersByCohort.multi(frameIds);\n for (let i = 0; i < frameIds.length; i++) {\n const cohort = cohorts[i];\n const frameId = frameIds[i]!;\n bidAmountsByFrame[frameId] = cohort.map(x => x.bid.toBigInt());\n }\n }\n const addressToMiningIndex: { [address: string]: IMiningIndex } = {};\n for (let i = 0; i < addresses.length; i++) {\n const address = addresses[i];\n if (rawIndices[i].isNone) continue;\n const [frameIdRaw, indexRaw] = rawIndices[i].value;\n const frameId = frameIdRaw.toNumber();\n const index = indexRaw.toNumber();\n const bidAmount = bidAmountsByFrame[frameId]?.[index];\n addressToMiningIndex[address] = {\n startingFrameId: frameId,\n index,\n bidAmount: bidAmount ?? 0n,\n };\n }\n const nextFrameId = await api.query.miningSlot.nextFrameId();\n\n return addresses.map(address => {\n const cohort = addressToMiningIndex[address];\n let isLastDay = false;\n if (cohort !== undefined) {\n isLastDay = nextFrameId.toNumber() - cohort.startingFrameId === 10;\n }\n return {\n address,\n seat: cohort,\n isLastDay,\n subaccountIndex: this.subAccountsByAddress[address]?.index ?? Number.NaN,\n };\n });\n }\n\n public async miningSeats(blockHash?: Uint8Array): Promise<\n (ISubaccountMiner & {\n hasWinningBid: boolean;\n bidAmount?: bigint;\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.bidsForNextSlotCohort();\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.seat?.bidAmount ?? 0n,\n };\n });\n }\n\n public async bids(\n blockHash?: Uint8Array,\n ): Promise<{ address: string; bidPlace?: number; index: number; bidAmount: bigint }[]> {\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.bidsForNextSlotCohort();\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 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(`Error consolidating //${index}: ${error}`),\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(argons.find(x => x.address === this.seedAddress)?.amount ?? 0n),\n argonots: formatArgons(argonots.find(x => x.address === this.seedAddress)?.amount ?? 0n),\n },\n ];\n for (const [address, { index }] of Object.entries(this.subAccountsByAddress)) {\n const argonAmount = argons.find(x => x.address === address)?.amount ?? 0n;\n const argonotAmount = 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(name, key.privateKey, key.publicKey);\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 const config = getConfig();\n let version = keysVersion ?? config.keysVersion ?? 0;\n const seed = this.sessionKeySeed ?? config.keySeedOrMnemonic;\n if (!seed) {\n throw new Error('KEYS_MNEMONIC environment variable not set. Cannot derive keys.');\n }\n const blockSealKey = `${seed}//block-seal//${version}`;\n const granKey = `${seed}//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: u8aToHex(blockSealAccount.publicKey),\n rawPublicKey: blockSealAccount.publicKey,\n },\n gran: {\n privateKey: granKey,\n publicKey: u8aToHex(grandpaAccount.publicKey),\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 }) {\n const client = await this.client;\n const { bidAmount, subaccounts } = options;\n\n const batch = client.tx.utility.batch(\n subaccounts.map(x => {\n const keys = this.keys();\n return client.tx.miningSlot.bid(\n bidAmount,\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 }): 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.then(() => undefined).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 const config = getConfig();\n return parseSubaccountRange(config.subaccountRange ?? '0-9')!;\n } catch {\n console.error(\n 'Failed to parse SUBACCOUNT_RANGE configuration. Defaulting to 0-9. Please check the format of the subaccountRange config value.',\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?: IMiningIndex;\n bidPlace?: number;\n bidAmount?: bigint;\n isWorkingOn?: boolean;\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.query.miningSlot.nextCohortSize().then(x => x.toNumber());\n }\n\n public async onCohortChange(options: {\n onBiddingStart?: (cohortStartingFrameId: number) => Promise<void>;\n onBiddingEnd?: (cohortStartingFrameId: number) => Promise<void>;\n }): Promise<{ unsubscribe: () => void }> {\n const { onBiddingStart, onBiddingEnd } = options;\n const client = await this.client;\n let openCohortStartingFrameId = 0;\n const unsubscribe = await client.queryMulti<[Bool, u64]>(\n [\n client.query.miningSlot.isNextSlotBiddingOpen as any,\n client.query.miningSlot.nextFrameId as any,\n ],\n async ([isBiddingOpen, rawNextCohortStartingFrameId]) => {\n const nextFrameId = rawNextCohortStartingFrameId.toNumber();\n\n if (isBiddingOpen.isTrue) {\n if (openCohortStartingFrameId !== 0) {\n await onBiddingEnd?.(openCohortStartingFrameId);\n }\n openCohortStartingFrameId = nextFrameId;\n await onBiddingStart?.(nextFrameId);\n } else {\n await onBiddingEnd?.(nextFrameId);\n openCohortStartingFrameId = 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.bidsForNextSlotCohort(async next => {\n this.nextCohort = await Promise.all(next.map(x => this.toBid(accountNames, x)));\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 return { unsubscribe };\n }\n\n public async loadAt(accountNames: IAddressNames, blockHash?: Uint8Array): Promise<void> {\n const client = await this.client;\n const api = blockHash ? await client.at(blockHash) : client;\n const nextCohort = await api.query.miningSlot.bidsForNextSlotCohort();\n this.nextCohort = await Promise.all(nextCohort.map(x => this.toBid(accountNames, x)));\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 {\n ArgonClient,\n type ArgonPrimitivesVault,\n formatArgons,\n ITxProgressCallback,\n KeyringPair,\n toFixedNumber,\n TxSubmitter,\n} from './index';\nimport BigNumber, * as BN from 'bignumber.js';\nimport { convertFixedU128ToBigNumber, convertPermillToBigNumber } from './utils';\nimport bs58check from 'bs58check';\nimport { hexToU8a } from '@polkadot/util';\nimport { TxResult } from './TxSubmitter';\n\nconst { ROUND_FLOOR } = BN;\n\nexport class Vault {\n public securitization!: bigint;\n public argonsLocked!: bigint;\n public argonsPendingActivation!: bigint;\n public argonsScheduledForRelease: Map<number, 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 public openedTick: number;\n public securitizationRatio!: number;\n\n constructor(\n id: number,\n vault: ArgonPrimitivesVault,\n public tickDuration: number,\n ) {\n this.vaultId = id;\n this.openedTick = vault.openedTick.toNumber();\n this.openedDate = new Date(this.openedTick * this.tickDuration);\n this.argonsScheduledForRelease = new Map();\n this.load(vault);\n }\n\n public load(vault: ArgonPrimitivesVault) {\n this.securitization = vault.securitization.toBigInt();\n this.securitizationRatio = convertFixedU128ToBigNumber(\n vault.securitizationRatio.toBigInt(),\n ).toNumber();\n this.argonsLocked = vault.argonsLocked.toBigInt();\n this.argonsPendingActivation = vault.argonsPendingActivation.toBigInt();\n if (vault.argonsScheduledForRelease.size > 0) {\n this.argonsScheduledForRelease.clear();\n for (const [tick, amount] of vault.argonsScheduledForRelease.entries()) {\n this.argonsScheduledForRelease.set(tick.toNumber(), amount.toBigInt());\n }\n }\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 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 }\n\n public availableBitcoinSpace(): bigint {\n const recoverySecuritization = this.recoverySecuritization();\n const reLockable = this.getRelockCapacity();\n return this.securitization - recoverySecuritization - this.argonsLocked + reLockable;\n }\n\n public getRelockCapacity(): bigint {\n return [...this.argonsScheduledForRelease.values()].reduce((acc, val) => acc + val, 0n);\n }\n\n public securitizationRatioBN(): BigNumber {\n return new BigNumber(this.securitizationRatio);\n }\n\n public recoverySecuritization(): bigint {\n const reserved = new BigNumber(1).div(this.securitizationRatioBN());\n return (\n this.securitization -\n BigInt(reserved.multipliedBy(this.securitization.toString()).toFixed(0, ROUND_FLOOR))\n );\n }\n\n public minimumSecuritization(): bigint {\n return BigInt(\n this.securitizationRatioBN()\n .multipliedBy(this.argonsLocked.toString())\n .decimalPlaces(0, BigNumber.ROUND_CEIL)\n .toString(),\n );\n }\n\n public activatedSecuritization(): bigint {\n const activated = this.argonsLocked - this.argonsPendingActivation;\n const maxRatio = BigNumber(Math.min(this.securitizationRatio, 2));\n\n return BigInt(maxRatio.multipliedBy(activated.toString()).toFixed(0, ROUND_FLOOR));\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 public static async get(\n client: ArgonClient,\n vaultId: number,\n tickDurationMillis?: number,\n ): Promise<Vault> {\n const rawVault = await client.query.vaults.vaultsById(vaultId);\n if (rawVault.isNone) {\n throw new Error(`Vault with id ${vaultId} not found`);\n }\n const tickDuration =\n tickDurationMillis ??\n (await client.query.ticks.genesisTicker().then(x => x.tickDurationMillis.toNumber()))!;\n return new Vault(vaultId, rawVault.unwrap(), tickDuration);\n }\n\n public static async create(\n client: ArgonClient,\n keypair: KeyringPair,\n args: {\n securitization: bigint | number;\n securitizationRatio: number;\n annualPercentRate: number;\n baseFee: bigint | number;\n bitcoinXpub: string;\n liquidityPoolProfitSharing: number;\n tip?: bigint;\n doNotExceedBalance?: bigint;\n txProgressCallback?: ITxProgressCallback;\n },\n config: { tickDurationMillis?: number } = {},\n ): Promise<{ vault: Vault; txResult: TxResult }> {\n const {\n securitization,\n securitizationRatio,\n annualPercentRate,\n baseFee,\n bitcoinXpub,\n tip,\n doNotExceedBalance,\n txProgressCallback,\n } = args;\n let xpubBytes = hexToU8a(bitcoinXpub);\n if (xpubBytes.length !== 78) {\n if (\n bitcoinXpub.startsWith('xpub') ||\n bitcoinXpub.startsWith('tpub') ||\n bitcoinXpub.startsWith('zpub')\n ) {\n const bytes = bs58check.decode(bitcoinXpub);\n if (bytes.length !== 78) {\n throw new Error('Invalid Bitcoin xpub key length, must be 78 bytes');\n }\n xpubBytes = bytes;\n }\n }\n let vaultParams = {\n terms: {\n // convert to fixed u128\n bitcoinAnnualPercentRate: toFixedNumber(annualPercentRate, 18),\n bitcoinBaseFee: BigInt(baseFee),\n liquidityPoolProfitSharing: toFixedNumber(args.liquidityPoolProfitSharing, 6),\n },\n securitizationRatio: toFixedNumber(securitizationRatio, 18),\n securitization: BigInt(securitization),\n bitcoinXpubkey: xpubBytes,\n };\n let tx = new TxSubmitter(client, client.tx.vaults.create(vaultParams), keypair);\n if (doNotExceedBalance) {\n const finalTip = tip ?? 0n;\n let txFee = await tx.feeEstimate(finalTip);\n while (txFee + finalTip + vaultParams.securitization > doNotExceedBalance) {\n vaultParams.securitization = doNotExceedBalance - txFee - finalTip;\n tx.tx = client.tx.vaults.create(vaultParams);\n txFee = await tx.feeEstimate(finalTip);\n }\n }\n const canAfford = await tx.canAfford({ tip, unavailableBalance: BigInt(securitization) });\n if (!canAfford.canAfford) {\n throw new Error(\n `Insufficient balance to create vault. Required: ${formatArgons(securitization)}, Available: ${formatArgons(canAfford.availableBalance)}`,\n );\n }\n\n const result = await tx.submit({\n tip,\n useLatestNonce: true,\n waitForBlock: true,\n txProgressCallback,\n });\n await result.inBlockPromise;\n let vaultId: number | undefined;\n for (const event of result.events) {\n if (client.events.vaults.VaultCreated.is(event)) {\n vaultId = event.data.vaultId.toNumber();\n break;\n }\n }\n if (vaultId === undefined) {\n throw new Error('Vault creation failed, no VaultCreated event found');\n }\n const rawVault = await client.query.vaults.vaultsById(vaultId);\n if (rawVault.isNone) {\n throw new Error('Vault creation failed, vault not found');\n }\n const tickDuration =\n config.tickDurationMillis ??\n (await client.query.ticks.genesisTicker().then(x => x.tickDurationMillis.toNumber()))!;\n const vault = new Vault(vaultId, rawVault.unwrap(), tickDuration);\n return { vault, txResult: result };\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 './utils';\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 = (await client.query.ticks.genesisTicker()).tickDurationMillis.toNumber();\n const blockHeader = await client.rpc.chain.getHeader();\n const blockHash = new Uint8Array(blockHeader.hash);\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.capitalRaising(x => {\n this.activatedCapitalByVault = {};\n for (const entry of x) {\n const vaultId = entry.vaultId.toNumber();\n this.activatedCapitalByVault[vaultId] = 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.argonsPendingActivation)} pending)`,\n btcDeal: `${formatArgons(vault.terms.bitcoinBaseFee)} + ${formatPercent(vault.terms.bitcoinAnnualPercentRate)}`,\n securitization: `${formatArgons(vault.securitization)} at ${vault.securitizationRatio}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 ? 'closed' : vault.openedDate < new Date() ? 'open' : '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 => setTimeout(resolve, activationDate.getTime() - Date.now()));\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(`Failed to reload vault ${[...vaultIds]} at block ${blockHash}:`, err);\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 type { Accountset } from './Accountset';\nimport {\n ArgonClient,\n type ArgonPrimitivesBlockSealMiningRegistration,\n ExtrinsicError,\n} from './index';\nimport { formatArgons } from './utils';\nimport { Bool, u32, u64, Vec } from '@polkadot/types-codec';\n\ninterface IBidDetail {\n address: string;\n bidMicrogons: bigint;\n bidAtTick: number;\n}\n\nexport class CohortBidder {\n public get clientPromise(): Promise<ArgonClient> {\n return this.accountset.client;\n }\n\n public txFees = 0n;\n public bidsAttempted = 0;\n public winningBids: IBidDetail[] = [];\n\n public readonly myAddresses = new Set<string>();\n\n public readonly currentBids: {\n atBlockNumber: number;\n atTick: number;\n mostRecentBidTick: number;\n bids: IBidDetail[];\n } = {\n bids: [],\n mostRecentBidTick: 0,\n atTick: 0,\n atBlockNumber: 0,\n };\n private unsubscribe?: () => void;\n\n private pendingRequest: Promise<any> | undefined;\n private isStopped = false;\n private millisPerTick?: number;\n private minIncrement = 10_000n;\n\n private nextCohortSize?: number;\n\n private lastBidTick: number = 0;\n\n private evaluateInterval?: NodeJS.Timeout;\n\n constructor(\n public accountset: Accountset,\n public cohortStartingFrameId: 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 public callbacks?: {\n onBidsUpdated?(args: { bids: IBidDetail[]; atBlockNumber: number; tick: number }): void;\n onBidParamsAdjusted?(args: {\n tick: number;\n blockNumber: number;\n maxSeats: number;\n winningBidCount: number;\n reason: 'max-bid-too-low' | 'insufficient-balance' | 'max-budget-too-low';\n availableBalanceForBids: bigint;\n }): void;\n onBidsSubmitted?(args: {\n tick: number;\n blockNumber: number;\n microgonsPerSeat: bigint;\n txFeePlusTip: bigint;\n submittedCount: number;\n }): void;\n onBidsRejected?(args: {\n tick: number;\n blockNumber: number;\n microgonsPerSeat: bigint;\n submittedCount: number;\n rejectedCount: number;\n bidError: ExtrinsicError;\n }): void;\n },\n ) {\n this.subaccounts.forEach(x => {\n this.myAddresses.add(x.address);\n });\n }\n\n public async start() {\n console.log(`Starting cohort ${this.cohortStartingFrameId} 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.clientPromise;\n\n this.minIncrement = client.consts.miningSlot.bidIncrements.toBigInt();\n\n this.nextCohortSize = await client.query.miningSlot.nextCohortSize().then(x => x.toNumber());\n if (this.subaccounts.length > this.nextCohortSize) {\n console.info(\n `Cohort size ${this.nextCohortSize} is less than provided subaccounts ${this.subaccounts.length}.`,\n );\n this.subaccounts.length = this.nextCohortSize;\n }\n this.millisPerTick = await client.query.ticks\n .genesisTicker()\n .then(x => x.tickDurationMillis.toNumber());\n\n let didStart = false;\n this.unsubscribe = await client.queryMulti<\n [Vec<ArgonPrimitivesBlockSealMiningRegistration>, u64, u64, u32]\n >(\n [\n client.query.miningSlot.bidsForNextSlotCohort as any,\n client.query.miningSlot.nextFrameId as any,\n client.query.ticks.currentTick as any,\n client.query.system.number as any,\n ],\n async ([rawBids, nextFrameId, currentTick, blockNumber]) => {\n if (nextFrameId.toNumber() === this.cohortStartingFrameId) {\n this.updateBidList(rawBids, blockNumber.toNumber(), currentTick.toNumber());\n if (!didStart) {\n didStart = true;\n // reset schedule to the tick changes\n this.scheduleEvaluation();\n void this.checkWinningBids();\n }\n }\n },\n );\n }\n\n public async stop(): Promise<CohortBidder['winningBids']> {\n if (this.isStopped) return this.winningBids;\n this.isStopped = true;\n clearInterval(this.evaluateInterval);\n console.log('Stopping bidder for cohort', this.cohortStartingFrameId);\n if (this.unsubscribe) {\n this.unsubscribe();\n }\n const client = await this.clientPromise;\n const [nextFrameId, isBiddingOpen] = await client.queryMulti<[u64, Bool]>([\n client.query.miningSlot.nextFrameId as any,\n client.query.miningSlot.isNextSlotBiddingOpen,\n ]);\n if (nextFrameId.toNumber() === this.cohortStartingFrameId && 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(isOpen => {\n if (isOpen.isFalse) {\n unsub();\n resolve();\n }\n });\n });\n }\n // wait for any pending request to finish updating stats\n void (await this.pendingRequest);\n\n const currentFrameId = await client.query.miningSlot.nextFrameId();\n let blockNumber: number;\n // go back to last block with this cohort\n if (currentFrameId.toNumber() > this.cohortStartingFrameId) {\n blockNumber =\n (await client.query.miningSlot.frameStartBlockNumbers().then(x => x[0]?.toNumber())) - 1;\n } else {\n blockNumber = await client.query.system.number().then(x => x.toNumber());\n }\n\n const blockHash = await client.rpc.chain.getBlockHash(blockNumber);\n const api = await client.at(blockHash);\n const rawBids = await api.query.miningSlot.bidsForNextSlotCohort();\n const currentTick = await api.query.ticks.currentTick().then(x => x.toNumber());\n this.updateBidList(rawBids, blockNumber, currentTick);\n\n console.log('Bidder stopped', {\n cohortStartingFrameId: this.cohortStartingFrameId,\n blockNumber,\n winningBids: this.winningBids,\n });\n\n return this.winningBids;\n }\n\n private async checkWinningBids() {\n if (this.isStopped) return;\n\n // don't process two bids at the same time\n if (this.pendingRequest) {\n console.log('Current bid is still in progress, skipping this check');\n return;\n }\n\n // if we submitted a bid more recently than the max bid tick, hold off\n if (this.currentBids.mostRecentBidTick < this.lastBidTick) {\n console.log(`Waiting for bids more recent than our last attempt.`, {\n ownAttemptedBidTick: this.lastBidTick,\n liveBidsTick: this.currentBids.mostRecentBidTick,\n });\n return;\n }\n const bids = [...this.currentBids.bids];\n const bidsAtTick = this.currentBids.atTick;\n const blockNumber = this.currentBids.atBlockNumber;\n const winningBids = bids.filter(x => this.myAddresses.has(x.address));\n if (winningBids.length >= this.subaccounts.length) {\n console.log(`No updates needed. Winning all remaining seats (${winningBids.length}).`);\n return;\n }\n\n console.log(\n `Checking bids for cohort ${this.cohortStartingFrameId}, Still trying for seats: ${this.subaccounts.length}`,\n );\n\n const winningAddresses = new Set(winningBids.map(x => x.address));\n let lowestBid: bigint;\n let myAllocatedBids = 0n;\n for (const bid of bids) {\n lowestBid ??= bid.bidMicrogons;\n if (this.myAddresses.has(bid.address)) {\n myAllocatedBids += bid.bidMicrogons;\n }\n // don't compete against own bids\n else {\n if (bid.bidMicrogons < lowestBid) {\n lowestBid = bid.bidMicrogons;\n }\n }\n }\n lowestBid ??= -this.options.bidIncrement;\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 });\n let availableBalanceForBids = await this.accountset.submitterBalance();\n availableBalanceForBids += myAllocatedBids;\n\n const tip = this.options.tipPerTransaction ?? 0n;\n const feeEstimate = await fakeTx.feeEstimate(tip);\n const estimatedFeePlusTip = feeEstimate + tip;\n\n let budgetForSeats = this.options.maxBudget - estimatedFeePlusTip;\n if (budgetForSeats > availableBalanceForBids) {\n budgetForSeats = availableBalanceForBids - estimatedFeePlusTip;\n }\n if (nextBid < lowestBid) {\n console.log(\n `Next bid within parameters is ${formatArgons(nextBid)}, but it's not enough. Current lowest bid is ${formatArgons(lowestBid)}.`,\n );\n this.safeRecordParamsAdjusted({\n tick: bidsAtTick,\n blockNumber,\n maxSeats: 0,\n winningBidCount: winningBids.length,\n reason: 'max-bid-too-low',\n availableBalanceForBids,\n });\n return;\n }\n\n if (nextBid - lowestBid < Number(this.minIncrement)) {\n console.log(\n `Can't make any more bids for ${this.cohortStartingFrameId} with given constraints (next bid below min increment).`,\n {\n lowestCurrentBid: formatArgons(lowestBid),\n nextAttemptedBid: formatArgons(nextBid),\n maxBid: formatArgons(this.options.maxBid),\n },\n );\n this.safeRecordParamsAdjusted({\n tick: bidsAtTick,\n blockNumber,\n maxSeats: 0,\n winningBidCount: winningBids.length,\n reason: 'max-bid-too-low',\n availableBalanceForBids,\n });\n return;\n }\n\n const seatsInBudget =\n nextBid === 0n ? this.subaccounts.length : 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 this.safeRecordParamsAdjusted({\n tick: bidsAtTick,\n blockNumber,\n maxSeats: this.subaccounts.length,\n winningBidCount: winningBids.length,\n reason:\n availableBalanceForBids - estimatedFeePlusTip < nextBid * BigInt(seatsInBudget)\n ? 'insufficient-balance'\n : 'max-budget-too-low',\n availableBalanceForBids,\n });\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.length) {\n this.pendingRequest = this.submitBids(nextBid, accountsToUse);\n }\n }\n\n private async submitBids(microgonsPerSeat: bigint, subaccounts: { address: string }[]) {\n try {\n this.bidsAttempted += subaccounts.length;\n const submitter = await this.accountset.createMiningBidTx({\n subaccounts,\n bidAmount: microgonsPerSeat,\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\n const client = await this.clientPromise;\n let api = txResult.includedInBlock ? await client.at(txResult.includedInBlock) : client;\n\n this.lastBidTick = await api.query.ticks.currentTick().then(x => x.toNumber());\n const blockNumber = await api.query.system.number().then(x => x.toNumber());\n const bidAtTick = this.lastBidTick;\n\n try {\n this.callbacks?.onBidsSubmitted?.({\n tick: bidAtTick,\n blockNumber,\n microgonsPerSeat,\n txFeePlusTip: txResult.finalFee ?? 0n,\n submittedCount: subaccounts.length,\n });\n } catch (error) {\n console.error('Error in onBidsSubmitted callback:', error);\n }\n\n const successfulBids = txResult.batchInterruptedIndex ?? subaccounts.length;\n\n this.txFees += txResult.finalFee ?? 0n;\n\n console.log('Result of bids for cohort', {\n successfulBids,\n bidsPlaced: subaccounts.length,\n bidPerSeat: formatArgons(microgonsPerSeat),\n bidAtTick,\n });\n\n if (bidError) {\n try {\n this.callbacks?.onBidsRejected?.({\n tick: bidAtTick,\n blockNumber,\n microgonsPerSeat,\n submittedCount: subaccounts.length,\n rejectedCount: subaccounts.length - successfulBids,\n bidError,\n });\n } catch (error) {\n console.error('Error in onBidsRejected callback:', error);\n }\n throw bidError;\n }\n } catch (err) {\n console.error(`Error bidding for cohort ${this.cohortStartingFrameId}:`, err);\n } finally {\n this.pendingRequest = undefined;\n // always delay after submitting\n this.scheduleEvaluation();\n }\n }\n\n private scheduleEvaluation() {\n if (this.isStopped) return;\n const millisPerTick = this.millisPerTick!;\n const delayTicks = Math.max(this.options.bidDelay, 1);\n const delay = delayTicks * millisPerTick;\n\n if (this.evaluateInterval) clearInterval(this.evaluateInterval);\n console.log(`Scheduling next evaluation in ${delay}ms`);\n this.evaluateInterval = setInterval(() => this.checkWinningBids().catch(console.error), delay);\n }\n\n private updateBidList(\n rawBids: Vec<ArgonPrimitivesBlockSealMiningRegistration>,\n blockNumber: number,\n tick: number,\n ) {\n try {\n let mostRecentBidTick = 0;\n let hasDiffs = this.currentBids.bids.length !== rawBids.length;\n const bids = [];\n for (let i = 0; i < rawBids.length; i += 1) {\n const rawBid = rawBids[i];\n const bidAtTick = rawBid.bidAtTick.toNumber();\n if (bidAtTick > mostRecentBidTick) {\n mostRecentBidTick = bidAtTick;\n }\n const address = rawBid.accountId.toHuman();\n const bidMicrogons = rawBid.bid.toBigInt();\n if (!hasDiffs) {\n const existing = this.currentBids.bids[i];\n hasDiffs = existing?.address !== address || existing?.bidMicrogons !== bidMicrogons;\n }\n bids.push({\n address,\n bidMicrogons,\n bidAtTick,\n });\n }\n\n if (blockNumber > this.currentBids.atBlockNumber && hasDiffs) {\n this.currentBids.bids = bids;\n this.currentBids.mostRecentBidTick = mostRecentBidTick;\n this.currentBids.atTick = tick;\n this.currentBids.atBlockNumber = blockNumber;\n this.winningBids = bids.filter(x => this.myAddresses.has(x.address));\n console.log('Now winning bids:', this.winningBids.length);\n if (this.callbacks?.onBidsUpdated) {\n this.callbacks.onBidsUpdated({\n bids: this.winningBids,\n atBlockNumber: blockNumber,\n tick: mostRecentBidTick,\n });\n }\n }\n } catch (err) {\n console.error('Error processing updated bids list:', err);\n }\n }\n\n private safeRecordParamsAdjusted(args: {\n tick: number;\n blockNumber: number;\n winningBidCount: number;\n maxSeats: number;\n reason: 'max-bid-too-low' | 'insufficient-balance' | 'max-budget-too-low';\n availableBalanceForBids: bigint;\n }) {\n try {\n this.callbacks?.onBidParamsAdjusted?.(args);\n } catch (err) {\n console.error('Error in onBidParamsAdjusted callback:', err);\n }\n }\n}\n","import { convertPermillToBigNumber, filterUndefined, formatArgons, formatPercent } 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 PalletLiquidityPoolsLiquidityPool,\n type PalletLiquidityPoolsLiquidityPoolCapital,\n type u32,\n type u64,\n type Vec,\n} from './index';\nimport { Vault } from './Vault';\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 nextFrameId: number = 1;\n public poolVaultCapitalByFrame: {\n [frameId: 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 lastDistributedFrameId?: number;\n\n private FrameSubscriptions: { [frameId: 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(blockHash: Uint8Array, vaultIdSet: Set<number>) {\n const client = await this.client;\n\n this.tickDuration ??= (await client.query.ticks.genesisTicker()).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(vaultId, rawVault.unwrap(), this.tickDuration);\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('MiningSlotApi_bid_pool', '');\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 ??= new Uint8Array((await client.rpc.chain.getHeader()).hash);\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.nextFrameId = (await api.query.miningSlot.nextFrameId()).toNumber();\n\n const contributors = await api.query.liquidityPools.vaultPoolsByFrame.entries();\n for (const [frameId, funds] of contributors) {\n const FrameIdNumber = frameId.args[0].toNumber();\n this.loadFrameData(FrameIdNumber, funds);\n }\n for (const entrant of await api.query.liquidityPools.capitalActive()) {\n this.setVaultFrameData(entrant.frameId.toNumber(), entrant.vaultId.toNumber(), {\n activatedCapital: entrant.activatedCapital.toBigInt(),\n });\n }\n for (const entrant of await api.query.liquidityPools.capitalRaising()) {\n this.setVaultFrameData(entrant.frameId.toNumber(), 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) => this.onVaultsUpdated(b.hash, v));\n const api = await this.client;\n this.blockWatch.events.on('event', async (_, event) => {\n if (api.events.liquidityPools.BidPoolDistributed.is(event)) {\n const { frameId: rawFrameId } = event.data;\n this.lastDistributedFrameId = rawFrameId.toNumber();\n this.bidPoolAmount = await this.getBidPool();\n\n this.FrameSubscriptions[rawFrameId.toNumber()]?.();\n const entrant = await api.query.liquidityPools.vaultPoolsByFrame(rawFrameId);\n this.loadFrameData(rawFrameId.toNumber(), entrant);\n this.printDebounce();\n }\n if (api.events.liquidityPools.NextBidPoolCapitalLocked.is(event)) {\n const { frameId } = event.data;\n\n for (let inc = 0; inc < 2; inc++) {\n const id = frameId.toNumber() + inc;\n if (!this.FrameSubscriptions[id]) {\n this.FrameSubscriptions[id] = await api.query.liquidityPools.vaultPoolsByFrame(\n id,\n async entrant => {\n this.loadFrameData(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.bidsForNextSlotCohort as any,\n api.query.miningSlot.nextFrameId as any,\n api.query.liquidityPools.capitalActive as any,\n api.query.liquidityPools.capitalRaising as any,\n ],\n async ([_bids, nextFrameId, openVaultBidPoolCapital, nextPoolCapital]) => {\n this.bidPoolAmount = await this.getBidPool();\n this.nextFrameId = nextFrameId.toNumber();\n for (const entrant of [...openVaultBidPoolCapital, ...nextPoolCapital]) {\n this.setVaultFrameData(entrant.frameId.toNumber(), entrant.vaultId.toNumber(), {\n activatedCapital: entrant.activatedCapital.toBigInt(),\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 this.accountRegistry.getName(vault.operatorAccountId) ?? vault.operatorAccountId;\n }\n\n public print() {\n console.clear();\n const lastDistributedFrameId = this.lastDistributedFrameId;\n const distributedFrame = this.poolVaultCapitalByFrame[this.lastDistributedFrameId ?? -1] ?? {};\n if (Object.keys(distributedFrame).length > 0) {\n console.log(`\\n\\nDistributed (Frame ${lastDistributedFrameId})`);\n\n const rows = [];\n let maxWidth = 0;\n for (const [key, entry] of Object.entries(distributedFrame)) {\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)} (Frame ${this.nextFrameId})`,\n );\n const Frame = this.poolVaultCapitalByFrame[this.nextFrameId];\n if (Object.keys(Frame ?? {}).length > 0) {\n const rows = [];\n let maxWidth = 0;\n for (const [key, entry] of Object.entries(Frame)) {\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 raisingFunds = this.poolVaultCapitalByFrame[this.nextFrameId + 1] ?? [];\n let maxWidth = 0;\n const nextCapital = [];\n for (const x of this.vaultSecuritization) {\n const entry = raisingFunds[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\\nRaising Funds (Frame ${this.nextFrameId + 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 setVaultFrameData(frameId: number, vaultId: number, data: Partial<IVaultMiningBondFund>) {\n this.poolVaultCapitalByFrame ??= {};\n this.poolVaultCapitalByFrame[frameId] ??= {};\n this.poolVaultCapitalByFrame[frameId][vaultId] ??= {\n activatedCapital:\n data.activatedCapital ?? data.contributors?.reduce((a, b) => a + b.amount, 0n) ?? 0n,\n };\n\n Object.assign(this.poolVaultCapitalByFrame[frameId][vaultId], filterUndefined(data));\n }\n\n private createBondCapitalTable(total: bigint, contributors: IContributor[], title = 'Total') {\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 loadFrameData(\n frameId: 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 (frameId > (this.lastDistributedFrameId ?? 0)) {\n this.lastDistributedFrameId = frameId;\n }\n }\n this.setVaultFrameData(frameId, vaultIdNumber, {\n earnings: fund.distributedProfits.isSome\n ? fund.distributedProfits.unwrap().toBigInt()\n : undefined,\n vaultSharingPercent: convertPermillToBigNumber(fund.vaultSharingPercent.toBigInt()),\n contributors,\n });\n }\n }\n}\n","import {\n Accountset,\n type ArgonClient,\n type ArgonPrimitivesBitcoinBitcoinNetwork,\n ITxProgressCallback,\n type KeyringPair,\n TxSubmitter,\n VaultMonitor,\n} from './index';\nimport { formatArgons } from './utils';\nimport { Vault } from './Vault';\nimport { GenericEvent } from '@polkadot/types';\nimport { TxResult } from './TxSubmitter';\nimport { hexToU8a, u8aToHex } from '@polkadot/util';\n\nexport const SATS_PER_BTC = 100_000_000n;\n\nexport class BitcoinLocks {\n constructor(readonly client: Promise<ArgonClient>) {}\n\n async getUtxoIdFromEvents(events: GenericEvent[]) {\n const client = await this.client;\n for (const event of events) {\n if (client.events.bitcoinLocks.BitcoinLockCreated.is(event)) {\n return event.data.utxoId.toNumber();\n }\n }\n return undefined;\n }\n\n 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('BitcoinApis_market_rate', sats.toHex(true));\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 async getRedemptionRate(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('BitcoinApis_redemption_rate', sats.toHex(true));\n const rate = client.createType('Option<U128>', marketRate);\n if (!rate.isSome) {\n throw new Error('Redemption rate not available');\n }\n return rate.value.toBigInt();\n }\n\n async getConfig(): Promise<IBitcoinLockConfig> {\n const client = await this.client;\n const bitcoinNetwork = await client.query.bitcoinUtxos.bitcoinNetwork();\n return {\n lockReleaseCosignDeadlineFrames:\n client.consts.bitcoinLocks.lockReleaseCosignDeadlineFrames.toNumber(),\n pendingConfirmationExpirationBlocks:\n client.consts.bitcoinUtxos.maxPendingConfirmationBlocks.toNumber(),\n tickDurationMillis: await client.query.ticks\n .genesisTicker()\n .then(x => x.tickDurationMillis.toNumber()),\n bitcoinNetwork,\n };\n }\n\n async getBitcoinConfirmedBlockHeight(): Promise<number> {\n const client = await this.client;\n return await client.query.bitcoinUtxos\n .confirmedBitcoinBlockTip()\n .then(x => x.value?.blockHeight.toNumber() ?? 0);\n }\n\n /**\n * Gets the UTXO reference by ID.\n * @param utxoId - The UTXO ID to look up.\n * @param atHeight - Optional block height to query the UTXO reference at a specific point in time.\n * @return An object containing the transaction ID and output index, or undefined if not found.\n * @return.txid - The Bitcoin transaction ID of the UTXO.\n * @return.vout - The output index of the UTXO in the transaction.\n * @return.bitcoinTxid - The Bitcoin transaction ID of the UTXO formatted in little endian\n */\n async getUtxoRef(\n utxoId: number,\n atHeight?: number,\n ): Promise<{ txid: string; vout: number; bitcoinTxid: string } | undefined> {\n let client = await this.client;\n if (atHeight !== undefined) {\n const blockHash = await client.rpc.chain.getBlockHash(atHeight);\n client = (await client.at(blockHash)) as ArgonClient;\n }\n const refRaw = await client.query.bitcoinUtxos.utxoIdToRef(utxoId);\n if (!refRaw) {\n return;\n }\n const ref = refRaw.unwrap();\n\n const txid = u8aToHex(ref.txid);\n const bitcoinTxid = u8aToHex(ref.txid.reverse());\n const vout = ref.outputIndex.toNumber();\n return { txid, vout, bitcoinTxid };\n }\n\n async getReleaseRequest(\n utxoId: number,\n atHeight?: number,\n ): Promise<IReleaseRequestDetails | undefined> {\n let client = await this.client;\n if (atHeight !== undefined) {\n const blockHash = await client.rpc.chain.getBlockHash(atHeight);\n client = (await client.at(blockHash)) as ArgonClient;\n }\n const requestMaybe = await client.query.bitcoinLocks.lockReleaseRequestsByUtxoId(utxoId);\n if (!requestMaybe.isSome) {\n return undefined;\n }\n const request = requestMaybe.unwrap();\n return {\n toScriptPubkey: request.toScriptPubkey.toHex(),\n bitcoinNetworkFee: request.bitcoinNetworkFee.toBigInt(),\n dueFrame: request.cosignDueFrame.toNumber(),\n vaultId: request.vaultId.toNumber(),\n redemptionPrice: request.redemptionPrice.toBigInt(),\n };\n }\n\n async submitVaultSignature(args: {\n utxoId: number;\n vaultSignature: Uint8Array;\n argonKeyring: KeyringPair;\n txProgressCallback?: ITxProgressCallback;\n }): Promise<TxResult> {\n const { utxoId, vaultSignature, argonKeyring, txProgressCallback } = args;\n const client = await this.client;\n if (!vaultSignature || vaultSignature.byteLength < 70 || vaultSignature.byteLength > 73) {\n throw new Error(\n `Invalid vault signature length: ${vaultSignature.byteLength}. Must be 70-73 bytes.`,\n );\n }\n const signature = u8aToHex(vaultSignature);\n const tx = client.tx.bitcoinLocks.cosignRelease(utxoId, signature);\n const submitter = new TxSubmitter(client, tx, argonKeyring);\n\n return await submitter.submit({ txProgressCallback });\n }\n\n async getBitcoinLock(utxoId: number): Promise<IBitcoinLock | undefined> {\n const client = await this.client;\n const utxoRaw = await client.query.bitcoinLocks.locksByUtxoId(utxoId);\n if (!utxoRaw.isSome) {\n return;\n }\n const utxo = utxoRaw.unwrap();\n const p2shBytesPrefix = '0020';\n const wscriptHash = utxo.utxoScriptPubkey.asP2wsh.wscriptHash.toHex().replace('0x', '');\n const p2wshScriptHashHex = `0x${p2shBytesPrefix}${wscriptHash}`;\n const vaultId = utxo.vaultId.toNumber();\n const lockPrice = utxo.lockPrice.toBigInt();\n const ownerAccount = utxo.ownerAccount.toHuman();\n const satoshis = utxo.satoshis.toBigInt();\n const vaultPubkey = utxo.vaultPubkey.toHex();\n const vaultClaimPubkey = utxo.vaultClaimPubkey.toHex();\n const ownerPubkey = utxo.ownerPubkey.toHex();\n const [fingerprint, cosign_hd_index, claim_hd_index] = utxo.vaultXpubSources;\n const vaultXpubSources = {\n parentFingerprint: new Uint8Array(fingerprint),\n cosignHdIndex: cosign_hd_index.toNumber(),\n claimHdIndex: claim_hd_index.toNumber(),\n };\n\n const vaultClaimHeight = utxo.vaultClaimHeight.toNumber();\n const openClaimHeight = utxo.openClaimHeight.toNumber();\n const createdAtHeight = utxo.createdAtHeight.toNumber();\n const isVerified = utxo.isVerified.toJSON();\n const isRejectedNeedsRelease = utxo.isRejectedNeedsRelease.toJSON();\n const fundHoldExtensionsByBitcoinExpirationHeight = Object.fromEntries(\n [...utxo.fundHoldExtensions.entries()].map(([x, y]) => [x.toNumber(), y.toBigInt()]),\n );\n\n return {\n utxoId,\n p2wshScriptHashHex,\n vaultId,\n lockPrice,\n ownerAccount,\n satoshis,\n vaultPubkey,\n vaultClaimPubkey,\n ownerPubkey,\n vaultXpubSources,\n vaultClaimHeight,\n openClaimHeight,\n createdAtHeight,\n isVerified,\n isRejectedNeedsRelease,\n fundHoldExtensionsByBitcoinExpirationHeight,\n };\n }\n\n /**\n * Finds the cosign signature for a vault lock by UTXO ID. Optionally waits for the signature\n * @param utxoId - The UTXO ID of the bitcoin lock\n * @param waitForSignatureMillis - Optional timeout in milliseconds to wait for the signature. If -1, waits indefinitely.\n */\n async findVaultCosignSignature(\n utxoId: number,\n waitForSignatureMillis?: number,\n ): Promise<{ blockHeight: number; signature: Uint8Array } | undefined> {\n const client = await this.client;\n const releaseHeight = await client.query.bitcoinLocks.lockReleaseCosignHeightById(utxoId);\n if (releaseHeight.isSome) {\n const releaseHeightValue = releaseHeight.unwrap().toNumber();\n const signature = await this.getVaultCosignSignature(utxoId, releaseHeightValue);\n if (signature) {\n return { blockHeight: releaseHeightValue, signature };\n }\n }\n\n if (!waitForSignatureMillis) {\n return undefined;\n }\n\n return await new Promise(async (resolve, reject) => {\n let timeout: NodeJS.Timeout | undefined;\n const unsub = await client.rpc.chain.subscribeNewHeads(header => {\n const atHeight = header.number.toNumber();\n this.getVaultCosignSignature(utxoId, atHeight)\n .then(signature => {\n if (signature) {\n unsub?.();\n clearTimeout(timeout);\n resolve({ signature, blockHeight: atHeight });\n }\n })\n .catch(err => {\n console.error(`Error checking for cosign signature at height ${atHeight}:`, err);\n });\n });\n if (waitForSignatureMillis !== -1) {\n timeout = setTimeout(() => {\n unsub?.();\n reject(new Error(`Timeout waiting for cosign signature for UTXO ID ${utxoId}`));\n }, waitForSignatureMillis);\n }\n });\n }\n\n async blockHashAtHeight(atHeight: number): Promise<string | undefined> {\n const client = await this.client;\n\n for (let i = 0; i < 10; i++) {\n const currentHeight = await client.query.system.number().then(x => x.toNumber());\n if (atHeight > currentHeight) {\n console.warn(\n `Requested block height ${atHeight} is greater than current height ${currentHeight}. Retrying...`,\n );\n await new Promise(resolve => setTimeout(resolve, 1000)); // wait 1 second before retrying\n continue;\n }\n const hash = await client.rpc.chain.getBlockHash(atHeight).then(x => x.toHex());\n if (hash === '0x0000000000000000000000000000000000000000000000000000000000000000') {\n console.warn(`Block hash not found for height ${atHeight}. Retrying...`);\n await new Promise(resolve => setTimeout(resolve, 1000)); // wait 1 second before retrying\n continue;\n }\n return hash;\n }\n return undefined;\n }\n\n async getVaultCosignSignature(utxoId: number, atHeight: number): Promise<Uint8Array | undefined> {\n const client = await this.client;\n\n const blockHash = await this.blockHashAtHeight(atHeight);\n if (!blockHash) {\n console.warn(`Block hash not found for height ${atHeight}`);\n return undefined;\n }\n\n const blockEvents = await client.at(blockHash).then(api => api.query.system.events());\n for (const event of blockEvents) {\n if (client.events.bitcoinLocks.BitcoinUtxoCosigned.is(event.event)) {\n const { utxoId: id, signature } = event.event.data;\n if (id.toNumber() === utxoId) {\n return new Uint8Array(signature);\n }\n }\n }\n return undefined;\n }\n\n async findPendingMints(utxoId: number): Promise<bigint[]> {\n const client = await this.client;\n const pendingMint = await client.query.mint.pendingMintUtxos();\n const mintsPending: bigint[] = [];\n for (const [utxoIdRaw, _accountId, mintAmountRaw] of pendingMint) {\n if (utxoIdRaw.toNumber() === utxoId) {\n mintsPending.push(mintAmountRaw.toBigInt());\n }\n }\n return mintsPending;\n }\n\n async createInitializeLockTx(args: {\n vault: Vault;\n ownerBitcoinPubkey: Uint8Array;\n satoshis: bigint;\n argonKeyring: KeyringPair;\n reducedBalanceBy?: bigint;\n tip?: bigint;\n }) {\n const { vault, argonKeyring, satoshis, tip = 0n, ownerBitcoinPubkey } = args;\n const client = await this.client;\n if (ownerBitcoinPubkey.length !== 33) {\n throw new Error(\n `Invalid Bitcoin key length: ${ownerBitcoinPubkey.length}. Must be a compressed pukey (33 bytes).`,\n );\n }\n\n const tx = client.tx.bitcoinLocks.initialize(vault.vaultId, satoshis, ownerBitcoinPubkey);\n const submitter = new TxSubmitter(\n client,\n client.tx.bitcoinLocks.initialize(vault.vaultId, satoshis, ownerBitcoinPubkey),\n argonKeyring,\n );\n const marketPrice = await this.getMarketRate(BigInt(satoshis));\n const isVaultOwner = argonKeyring.address === vault.operatorAccountId;\n const securityFee = isVaultOwner ? 0n : vault.calculateBitcoinFee(marketPrice);\n\n const { canAfford, availableBalance, txFee } = await submitter.canAfford({\n tip,\n unavailableBalance: securityFee + (args.reducedBalanceBy ?? 0n),\n includeExistentialDeposit: true,\n });\n if (!canAfford) {\n throw new Error(\n `Insufficient funds to initialize lock. Available: ${formatArgons(availableBalance)}, Required: ${satoshis}`,\n );\n }\n return { tx, securityFee, txFee };\n }\n\n async getBitcoinLockFromTxResult(txResult: TxResult): Promise<{\n lock: IBitcoinLock;\n createdAtHeight: number;\n txResult: TxResult;\n }> {\n const client = await this.client;\n const blockHash = await txResult.inBlockPromise;\n const blockHeight = await client\n .at(blockHash)\n .then(x => x.query.system.number())\n .then(x => x.toNumber());\n const utxoId = (await this.getUtxoIdFromEvents(txResult.events)) ?? 0;\n if (utxoId === 0) {\n throw new Error('Bitcoin lock creation failed, no UTXO ID found in transaction events');\n }\n const lock = await this.getBitcoinLock(utxoId);\n if (!lock) {\n throw new Error(`Lock with ID ${utxoId} not found after initialization`);\n }\n return { lock, createdAtHeight: blockHeight, txResult };\n }\n\n async initializeLock(args: {\n vault: Vault;\n ownerBitcoinPubkey: Uint8Array;\n argonKeyring: KeyringPair;\n satoshis: bigint;\n tip?: bigint;\n txProgressCallback?: ITxProgressCallback;\n }): Promise<{\n lock: IBitcoinLock;\n createdAtHeight: number;\n txResult: TxResult;\n securityFee: bigint;\n }> {\n const { argonKeyring, tip = 0n, txProgressCallback } = args;\n const client = await this.client;\n\n const { tx, securityFee } = await this.createInitializeLockTx(args);\n const submitter = new TxSubmitter(client, tx, argonKeyring);\n const txResult = await submitter.submit({\n waitForBlock: true,\n logResults: true,\n tip,\n txProgressCallback,\n });\n\n const { lock, createdAtHeight } = await this.getBitcoinLockFromTxResult(txResult);\n return {\n lock,\n createdAtHeight,\n txResult,\n securityFee,\n };\n }\n\n async requiredSatoshisForArgonLiquidity(argonAmount: bigint): Promise<bigint> {\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 const marketRatePerBitcoin = await this.getMarketRate(SATS_PER_BTC);\n return (argonAmount * SATS_PER_BTC) / marketRatePerBitcoin;\n }\n\n async requestRelease(args: {\n lock: IBitcoinLock;\n releaseRequest: IReleaseRequest;\n argonKeyring: KeyringPair;\n tip?: bigint;\n txProgressCallback?: ITxProgressCallback;\n }): Promise<{ blockHash: Uint8Array; blockHeight: number }> {\n const client = await this.client;\n const {\n lock,\n releaseRequest: { bitcoinNetworkFee, toScriptPubkey },\n argonKeyring,\n tip,\n txProgressCallback,\n } = args;\n\n if (!toScriptPubkey.startsWith('0x')) {\n throw new Error('toScriptPubkey must be a hex string starting with 0x');\n }\n\n const submitter = new TxSubmitter(\n client,\n client.tx.bitcoinLocks.requestRelease(lock.utxoId, toScriptPubkey, bitcoinNetworkFee),\n argonKeyring,\n );\n\n let redemptionPrice = await this.getRedemptionRate(lock.satoshis);\n if (redemptionPrice > lock.lockPrice) {\n redemptionPrice = lock.lockPrice;\n }\n\n const canAfford = await submitter.canAfford({\n tip,\n unavailableBalance: BigInt(redemptionPrice),\n });\n\n if (!canAfford.canAfford) {\n throw new Error(\n `Insufficient funds to release lock. Available: ${formatArgons(canAfford.availableBalance)}, Required: ${formatArgons(redemptionPrice)}`,\n );\n }\n const txResult = await submitter.submit({\n waitForBlock: true,\n logResults: true,\n tip,\n txProgressCallback,\n });\n const blockHash = await txResult.inBlockPromise;\n const blockHeight = await client\n .at(blockHash)\n .then(x => x.query.system.number())\n .then(x => x.toNumber());\n return {\n blockHash,\n blockHeight,\n };\n }\n\n async releasePrice(satoshis: bigint, lockPrice: bigint): Promise<bigint> {\n const client = await this.client;\n const redemptionRate = await this.getRedemptionRate(satoshis);\n if (redemptionRate > lockPrice) {\n return redemptionRate;\n }\n return lockPrice;\n }\n\n async getRatchetPrice(\n lock: IBitcoinLock,\n vault: Vault,\n ): Promise<{ burnAmount: bigint; ratchetingFee: bigint; marketRate: bigint }> {\n const { createdAtHeight, vaultClaimHeight, lockPrice, satoshis } = lock;\n const client = await this.client;\n const marketRate = await this.getMarketRate(BigInt(satoshis));\n\n let ratchetingFee = vault.terms.bitcoinBaseFee;\n let burnAmount = 0n;\n // ratchet up\n if (marketRate > lockPrice) {\n const lockFee = vault.calculateBitcoinFee(marketRate);\n const currentBitcoinHeight = await client.query.bitcoinUtxos\n .confirmedBitcoinBlockTip()\n .then(x => x.unwrap().blockHeight.toNumber());\n const blockLength = vaultClaimHeight - createdAtHeight;\n const elapsed = (currentBitcoinHeight - createdAtHeight) / blockLength;\n const remainingDuration = 1 - elapsed;\n ratchetingFee = BigInt(remainingDuration * Number(lockFee));\n } else {\n burnAmount = await this.releasePrice(lock.satoshis, lockPrice);\n }\n\n return {\n ratchetingFee,\n burnAmount,\n marketRate,\n };\n }\n\n async ratchet(args: {\n lock: IBitcoinLock;\n argonKeyring: KeyringPair;\n tip?: bigint;\n vault: Vault;\n txProgressCallback?: ITxProgressCallback;\n }): Promise<{\n securityFee: bigint;\n txFee: bigint;\n newLockPrice: bigint;\n pendingMint: bigint;\n burned: bigint;\n blockHeight: number;\n bitcoinBlockHeight: number;\n }> {\n const { lock, argonKeyring, tip = 0n, vault, txProgressCallback } = args;\n const client = await this.client;\n\n const ratchetPrice = await this.getRatchetPrice(lock, vault);\n const txSubmitter = new TxSubmitter(\n client,\n client.tx.bitcoinLocks.ratchet(lock.utxoId),\n argonKeyring,\n );\n const canAfford = await txSubmitter.canAfford({\n tip,\n unavailableBalance: BigInt(ratchetPrice.burnAmount + ratchetPrice.ratchetingFee),\n });\n if (!canAfford.canAfford) {\n throw new Error(\n `Insufficient funds to ratchet lock. Available: ${formatArgons(canAfford.availableBalance)}, Required: ${formatArgons(\n ratchetPrice.burnAmount + ratchetPrice.ratchetingFee,\n )}`,\n );\n }\n\n const submission = await txSubmitter.submit({\n waitForBlock: true,\n tip,\n txProgressCallback,\n });\n const ratchetEvent = submission.events.find(x =>\n client.events.bitcoinLocks.BitcoinLockRatcheted.is(x),\n );\n if (!ratchetEvent) {\n throw new Error(`Ratchet event not found in transaction events`);\n }\n const blockHash = await submission.inBlockPromise;\n const api = await client.at(blockHash);\n const blockHeight = await api.query.system.number().then(x => x.toNumber());\n const bitcoinBlockHeight = await api.query.bitcoinUtxos\n .confirmedBitcoinBlockTip()\n .then(x => x.unwrap().blockHeight.toNumber());\n const { amountBurned, newLockPrice, originalLockPrice } = ratchetEvent.data;\n let mintAmount = newLockPrice.toBigInt();\n if (newLockPrice > originalLockPrice) {\n mintAmount -= originalLockPrice.toBigInt();\n }\n return {\n txFee: submission.finalFee ?? 0n,\n securityFee: ratchetPrice.ratchetingFee,\n pendingMint: mintAmount,\n newLockPrice: newLockPrice.toBigInt(),\n burned: amountBurned.toBigInt(),\n blockHeight,\n bitcoinBlockHeight,\n };\n }\n\n static async waitForSpace(\n accountset: Accountset,\n options: {\n argonAmount: bigint;\n bitcoinXpub: string;\n maxLockFee?: bigint;\n tip?: bigint;\n satoshiWiggleRoomForDynamicPrice?: bigint;\n },\n ): Promise<{\n satoshis: bigint;\n argons: bigint;\n vaultId: number;\n txFee: bigint;\n securityFee: 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 const bitcoinXpubBuffer = hexToU8a(bitcoinXpub);\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 let satoshis = await bitcoinLock.requiredSatoshisForArgonLiquidity(amount);\n satoshis -= options.satoshiWiggleRoomForDynamicPrice ?? 500n;\n const { txResult, lock, securityFee } = await bitcoinLock.initializeLock({\n vault,\n satoshis,\n argonKeyring: accountset.txSubmitterPair,\n ownerBitcoinPubkey: bitcoinXpubBuffer,\n tip,\n });\n\n resolve({\n satoshis,\n argons: argonAmount,\n vaultId,\n securityFee,\n txFee: txResult.finalFee!,\n finalizedPromise: txResult.finalizedPromise,\n utxoId: lock.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\nexport interface IBitcoinLockConfig {\n lockReleaseCosignDeadlineFrames: number;\n pendingConfirmationExpirationBlocks: number;\n tickDurationMillis: number;\n bitcoinNetwork: ArgonPrimitivesBitcoinBitcoinNetwork;\n}\nexport interface IReleaseRequest {\n toScriptPubkey: string;\n bitcoinNetworkFee: bigint;\n}\n\nexport interface IReleaseRequestDetails extends IReleaseRequest {\n dueFrame: number;\n vaultId: number;\n redemptionPrice: bigint;\n}\n\nexport interface IBitcoinLock {\n utxoId: number;\n p2wshScriptHashHex: string;\n vaultId: number;\n lockPrice: bigint;\n ownerAccount: string;\n satoshis: bigint;\n vaultPubkey: string;\n vaultClaimPubkey: string;\n ownerPubkey: string;\n vaultXpubSources: {\n parentFingerprint: Uint8Array;\n cosignHdIndex: number;\n claimHdIndex: number;\n };\n vaultClaimHeight: number;\n openClaimHeight: number;\n createdAtHeight: number;\n isVerified: boolean;\n isRejectedNeedsRelease: boolean;\n fundHoldExtensionsByBitcoinExpirationHeight: Record<number, bigint>;\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: { cryptoType?: 'sr25519' | 'ed25519' }): KeyringPair {\n const { cryptoType } = opts;\n const seed = mnemonicGenerate();\n return keyringFromSuri(seed, cryptoType);\n}\n"]}