// Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ import type { Bytes, Compact, Option, Vec, bool, i64, u16, u32, u64 } from '@polkadot/types'; import type { AnyNumber } from '@polkadot/types/types'; import type { BtcAddress, BtcPublicKey, Collateral, ErrorCode, H256Le, RawBlockHeader, RelayerEvent, SignedFixedPoint, StatusCode, UnsignedFixedPoint, Wrapped } from '@interlay/polkabtc/interfaces/default'; import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics'; import type { GrandpaEquivocationProof, KeyOwnerProof } from '@polkadot/types/interfaces/grandpa'; import type { AccountId, Balance, BlockNumber, Call, ChangesTrieConfiguration, H256, KeyValue, LookupSource, Moment, Perbill, Weight } from '@polkadot/types/interfaces/runtime'; import type { Key } from '@polkadot/types/interfaces/system'; import type { ApiTypes, SubmittableExtrinsic } from '@polkadot/api/types'; declare module '@polkadot/api/types/submittable' { export interface AugmentedSubmittables { btcRelay: { /** * Insert an error at the specified block. * * # Arguments * * * `origin` - the dispatch origin of this call (must be _Root_) * * `block_hash` - the hash of the bitcoin block * * `error` - the error code to insert * * # Weight: `O(1)` **/ insertBlockError: AugmentedSubmittable<(blockHash: H256Le | string | Uint8Array, error: ErrorCode | 'None' | 'NoDataBTCRelay' | 'InvalidBTCRelay' | 'OracleOffline' | number | Uint8Array) => SubmittableExtrinsic, [H256Le, ErrorCode]>; /** * Remove an error from the specified block. * * # Arguments * * * `origin` - the dispatch origin of this call (must be _Root_) * * `block_hash` - the hash of the bitcoin block * * `error` - the error code to remove * * # Weight: `O(1)` **/ removeBlockError: AugmentedSubmittable<(blockHash: H256Le | string | Uint8Array, error: ErrorCode | 'None' | 'NoDataBTCRelay' | 'InvalidBTCRelay' | 'OracleOffline' | number | Uint8Array) => SubmittableExtrinsic, [H256Le, ErrorCode]>; /** * Validates a given raw Bitcoin transaction, according to the supported transaction * format (see ) * This DOES NOT check if the transaction is included in a block, nor does it guarantee that the * transaction is fully valid according to the consensus (needs full node). * * # Arguments * * `raw_tx` - raw Bitcoin transaction * * `minimum_btc` - minimum amount of BTC (satoshis) sent to the recipient * * `recipient_btc_address` - expected Bitcoin address of recipient (p2sh, p2pkh, p2wpkh) * * `op_return_id` - 32 byte hash identifier expected in OP_RETURN (replay protection) **/ validateTransaction: AugmentedSubmittable<(rawTx: Bytes | string | Uint8Array, minimumBtc: i64 | AnyNumber | Uint8Array, recipientBtcAddress: BtcAddress | { P2PKH: any } | { P2SH: any } | { P2WPKHv0: any } | { P2WSHv0: any } | string | Uint8Array, opReturnId: Option | null | object | string | Uint8Array) => SubmittableExtrinsic, [Bytes, i64, BtcAddress, Option]>; /** * Verifies the inclusion of `tx_id` into the relay, and validates the given raw Bitcoin transaction, according * to the supported transaction format (see ) * * # Arguments * * * `raw_merkle_proof` - The raw merkle proof as returned by bitcoin `gettxoutproof` * * `confirmations` - The number of confirmations needed to accept the proof. If `none`, the value stored in * the StableBitcoinConfirmations storage item is used. * * `raw_tx` - raw Bitcoin transaction * * `minimum_btc` - minimum amount of BTC (satoshis) sent to the recipient * * `recipient_btc_address` - 20 byte Bitcoin address of recipient of the BTC in the 1st / payment UTXO * * `op_return_id` - 32 byte hash identifier expected in OP_RETURN (replay protection) **/ verifyAndValidateTransaction: AugmentedSubmittable<(rawMerkleProof: Bytes | string | Uint8Array, confirmations: Option | null | object | string | Uint8Array, rawTx: Bytes | string | Uint8Array, minimumBtc: i64 | AnyNumber | Uint8Array, recipientBtcAddress: BtcAddress | { P2PKH: any } | { P2SH: any } | { P2WPKHv0: any } | { P2WSHv0: any } | string | Uint8Array, opReturnId: Option | null | object | string | Uint8Array) => SubmittableExtrinsic, [Bytes, Option, Bytes, i64, BtcAddress, Option]>; /** * Verifies the inclusion of `tx_id` * * # Arguments * * * `tx_id` - The hash of the transaction to check for * * `raw_merkle_proof` - The raw merkle proof as returned by bitcoin `gettxoutproof` * * `confirmations` - The number of confirmations needed to accept the proof. If `none`, the value stored in * the `StableBitcoinConfirmations` storage item is used. * * # * Key: C (len of chains), P (len of positions) * - Storage Reads: * - One storage read to check if inclusion check is disabled. O(1) * - One storage read to retrieve best block height. O(1) * - One storage read to check if transaction is in active fork. O(1) * - One storage read to retrieve block header. O(1) * - One storage read to check that parachain is not shutdown. O(1) * - One storage read to check stable bitcoin confirmations. O(1) * - One storage read to check stable parachain confirmations. O(1) * # **/ verifyTransactionInclusion: AugmentedSubmittable<(txId: H256Le | string | Uint8Array, rawMerkleProof: Bytes | string | Uint8Array, confirmations: Option | null | object | string | Uint8Array) => SubmittableExtrinsic, [H256Le, Bytes, Option]>; /** * Generic tx **/ [key: string]: SubmittableExtrinsicFunction; }; collateral: { /** * Exactly as `transfer`, except the origin must be root and the source account may be * specified. * # * - Same as transfer, but additional read and write because the source account is * not assumed to be in the overlay. * # **/ forceTransfer: AugmentedSubmittable<(source: LookupSource | string | Uint8Array, dest: LookupSource | string | Uint8Array, value: Compact | AnyNumber | Uint8Array) => SubmittableExtrinsic, [LookupSource, LookupSource, Compact]>; /** * Set the balances of a given account. * * This will alter `FreeBalance` and `ReservedBalance` in storage. it will * also decrease the total issuance of the system (`TotalIssuance`). * If the new free or reserved balance is below the existential deposit, * it will reset the account nonce (`frame_system::AccountNonce`). * * The dispatch origin for this call is `root`. * * # * - Independent of the arguments. * - Contains a limited number of reads and writes. * --------------------- * - Base Weight: * - Creating: 27.56 µs * - Killing: 35.11 µs * - DB Weight: 1 Read, 1 Write to `who` * # **/ setBalance: AugmentedSubmittable<(who: LookupSource | string | Uint8Array, newFree: Compact | AnyNumber | Uint8Array, newReserved: Compact | AnyNumber | Uint8Array) => SubmittableExtrinsic, [LookupSource, Compact, Compact]>; /** * Transfer some liquid free balance to another account. * * `transfer` will set the `FreeBalance` of the sender and receiver. * It will decrease the total issuance of the system by the `TransferFee`. * If the sender's account is below the existential deposit as a result * of the transfer, the account will be reaped. * * The dispatch origin for this call must be `Signed` by the transactor. * * # * - Dependent on arguments but not critical, given proper implementations for * input config types. See related functions below. * - It contains a limited number of reads and writes internally and no complex computation. * * Related functions: * * - `ensure_can_withdraw` is always called internally but has a bounded complexity. * - Transferring balances to accounts that did not exist before will cause * `T::OnNewAccount::on_new_account` to be called. * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. * - `transfer_keep_alive` works the same way as `transfer`, but has an additional * check that the transfer will not kill the origin account. * --------------------------------- * - Base Weight: 73.64 µs, worst case scenario (account created, account removed) * - DB Weight: 1 Read and 1 Write to destination account * - Origin account is already in memory, so no DB operations for them. * # **/ transfer: AugmentedSubmittable<(dest: LookupSource | string | Uint8Array, value: Compact | AnyNumber | Uint8Array) => SubmittableExtrinsic, [LookupSource, Compact]>; /** * Same as the [`transfer`] call, but with a check that the transfer will not kill the * origin account. * * 99% of the time you want [`transfer`] instead. * * [`transfer`]: struct.Pallet.html#method.transfer * # * - Cheaper than transfer because account cannot be killed. * - Base Weight: 51.4 µs * - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already) * # **/ transferKeepAlive: AugmentedSubmittable<(dest: LookupSource | string | Uint8Array, value: Compact | AnyNumber | Uint8Array) => SubmittableExtrinsic, [LookupSource, Compact]>; /** * Generic tx **/ [key: string]: SubmittableExtrinsicFunction; }; exchangeRateOracle: { /** * Adds an authorized oracle account (only executable by the Root account) * * # Arguments * * `account_id` - the account Id of the oracle * * `name` - a descriptive name for the oracle **/ insertAuthorizedOracle: AugmentedSubmittable<(accountId: AccountId | string | Uint8Array, name: Bytes | string | Uint8Array) => SubmittableExtrinsic, [AccountId, Bytes]>; /** * Removes an authorized oracle account (only executable by the Root account) * * # Arguments * * `account_id` - the account Id of the oracle **/ removeAuthorizedOracle: AugmentedSubmittable<(accountId: AccountId | string | Uint8Array) => SubmittableExtrinsic, [AccountId]>; /** * Sets the estimated transaction inclusion fees based on the estimated inclusion time * * # Arguments * * `fast` - The estimated Satoshis per bytes to get included in the next block (~10 min) * * `half` - The estimated Satoshis per bytes to get included in the next 3 blocks (~half hour) * * `hour` - The estimated Satoshis per bytes to get included in the next 6 blocks (~hour) **/ setBtcTxFeesPerByte: AugmentedSubmittable<(fast: u32 | AnyNumber | Uint8Array, half: u32 | AnyNumber | Uint8Array, hour: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic, [u32, u32, u32]>; /** * Sets the exchange rate. * * # Arguments * * * `collateral_per_wrapped` - exchange rate expressed as the amount of backing collateral per whole issued * token. * Note that this is _not_ the same unit that is stored in the ExchangeRate storage item which is multiplied by * the conversion factor - i.e. planck_per_satoshi = dot_per_btc * (10**10 / 10**8) * The stored unit is planck_per_satoshi **/ setExchangeRate: AugmentedSubmittable<(collateralPerWrapped: UnsignedFixedPoint | AnyNumber | Uint8Array) => SubmittableExtrinsic, [UnsignedFixedPoint]>; /** * Generic tx **/ [key: string]: SubmittableExtrinsicFunction; }; fee: { /** * Withdraw all relayer collateral rewards. * * # Arguments * * * `origin` - signing account **/ withdrawRelayerCollateralRewards: AugmentedSubmittable<() => SubmittableExtrinsic, []>; /** * Withdraw all relayer wrapped rewards. * * # Arguments * * * `origin` - signing account **/ withdrawRelayerWrappedRewards: AugmentedSubmittable<() => SubmittableExtrinsic, []>; /** * Withdraw all vault collateral rewards. * * # Arguments * * * `origin` - signing account **/ withdrawVaultCollateralRewards: AugmentedSubmittable<() => SubmittableExtrinsic, []>; /** * Withdraw all vault wrapped rewards. * * # Arguments * * * `origin` - signing account **/ withdrawVaultWrappedRewards: AugmentedSubmittable<() => SubmittableExtrinsic, []>; /** * Generic tx **/ [key: string]: SubmittableExtrinsicFunction; }; grandpa: { /** * Note that the current authority set of the GRANDPA finality gadget has * stalled. This will trigger a forced authority set change at the beginning * of the next session, to be enacted `delay` blocks after that. The delay * should be high enough to safely assume that the block signalling the * forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters * will start the new authority set using the given finalized block as base. * Only callable by root. **/ noteStalled: AugmentedSubmittable<(delay: BlockNumber | AnyNumber | Uint8Array, bestFinalizedBlockNumber: BlockNumber | AnyNumber | Uint8Array) => SubmittableExtrinsic, [BlockNumber, BlockNumber]>; /** * Report voter equivocation/misbehavior. This method will verify the * equivocation proof and validate the given key ownership proof * against the extracted offender. If both are valid, the offence * will be reported. **/ reportEquivocation: AugmentedSubmittable<(equivocationProof: GrandpaEquivocationProof | { setId?: any; equivocation?: any } | string | Uint8Array, keyOwnerProof: KeyOwnerProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic, [GrandpaEquivocationProof, KeyOwnerProof]>; /** * Report voter equivocation/misbehavior. This method will verify the * equivocation proof and validate the given key ownership proof * against the extracted offender. If both are valid, the offence * will be reported. * * This extrinsic must be called unsigned and it is expected that only * block authors will call it (validated in `ValidateUnsigned`), as such * if the block author is defined it will be defined as the equivocation * reporter. **/ reportEquivocationUnsigned: AugmentedSubmittable<(equivocationProof: GrandpaEquivocationProof | { setId?: any; equivocation?: any } | string | Uint8Array, keyOwnerProof: KeyOwnerProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic, [GrandpaEquivocationProof, KeyOwnerProof]>; /** * Generic tx **/ [key: string]: SubmittableExtrinsicFunction; }; issue: { /** * Cancel the issuance of tokens if expired * * # Arguments * * * `origin` - sender of the transaction * * `issue_id` - identifier of issue request as output from request_issue **/ cancelIssue: AugmentedSubmittable<(issueId: H256 | string | Uint8Array) => SubmittableExtrinsic, [H256]>; /** * Finalize the issuance of tokens * * # Arguments * * * `origin` - sender of the transaction * * `issue_id` - identifier of issue request as output from request_issue * * `tx_block_height` - block number of collateral chain * * `merkle_proof` - raw bytes * * `raw_tx` - raw bytes **/ executeIssue: AugmentedSubmittable<(issueId: H256 | string | Uint8Array, merkleProof: Bytes | string | Uint8Array, rawTx: Bytes | string | Uint8Array) => SubmittableExtrinsic, [H256, Bytes, Bytes]>; /** * Request the issuance of tokens * * # Arguments * * * `origin` - sender of the transaction * * `amount` - amount of BTC the user wants to convert to issued tokens. Note that the * amount of issued tokens received will be less, because a fee is subtracted. * * `vault` - address of the vault * * `griefing_collateral` - amount of collateral **/ requestIssue: AugmentedSubmittable<(amount: Compact | AnyNumber | Uint8Array, vaultId: AccountId | string | Uint8Array, griefingCollateral: Compact | AnyNumber | Uint8Array) => SubmittableExtrinsic, [Compact, AccountId, Compact]>; /** * Set the default issue period for tx verification. * * # Arguments * * * `origin` - the dispatch origin of this call (must be _Root_) * * `period` - default period for new requests * * # Weight: `O(1)` **/ setIssuePeriod: AugmentedSubmittable<(period: BlockNumber | AnyNumber | Uint8Array) => SubmittableExtrinsic, [BlockNumber]>; /** * Generic tx **/ [key: string]: SubmittableExtrinsicFunction; }; nomination: { depositNominatedCollateral: AugmentedSubmittable<(operatorId: AccountId | string | Uint8Array, amount: Collateral | AnyNumber | Uint8Array) => SubmittableExtrinsic, [AccountId, Collateral]>; /** * Become an Operator in the Vault Nomination protocol **/ optInToNomination: AugmentedSubmittable<() => SubmittableExtrinsic, []>; /** * Deregister from being Operator in the Vault Nomination protocol **/ optOutOfNomination: AugmentedSubmittable<() => SubmittableExtrinsic, []>; setNominationEnabled: AugmentedSubmittable<(enabled: bool | boolean | Uint8Array) => SubmittableExtrinsic, [bool]>; withdrawCollateral: AugmentedSubmittable<(operatorId: AccountId | string | Uint8Array, amount: Collateral | AnyNumber | Uint8Array) => SubmittableExtrinsic, [AccountId, Collateral]>; /** * Generic tx **/ [key: string]: SubmittableExtrinsicFunction; }; redeem: { /** * If a redeem request is not completed on time, the redeem request can be cancelled. * The user that initially requested the redeem process calls this function to obtain * the Vault’s collateral as compensation for not refunding the BTC back to their address. * * # Arguments * * * `origin` - sender of the transaction * * `redeem_id` - identifier of redeem request as output from request_redeem * * `reimburse` - specifying if the user wishes to be reimbursed in collateral * and slash the Vault, or wishes to keep the tokens (and retry * Redeem with another Vault) **/ cancelRedeem: AugmentedSubmittable<(redeemId: H256 | string | Uint8Array, reimburse: bool | boolean | Uint8Array) => SubmittableExtrinsic, [H256, bool]>; /** * A Vault calls this function after receiving an RequestRedeem event with their public key. * Before calling the function, the Vault transfers the specific amount of BTC to the BTC address * given in the original redeem request. The Vault completes the redeem with this function. * * # Arguments * * * `origin` - anyone executing this redeem request * * `redeem_id` - identifier of redeem request as output from request_redeem * * `tx_id` - transaction hash * * `tx_block_height` - block number of collateral chain * * `merkle_proof` - raw bytes * * `raw_tx` - raw bytes **/ executeRedeem: AugmentedSubmittable<(redeemId: H256 | string | Uint8Array, merkleProof: Bytes | string | Uint8Array, rawTx: Bytes | string | Uint8Array) => SubmittableExtrinsic, [H256, Bytes, Bytes]>; /** * When a Vault is liquidated, its collateral is slashed up to 150% of the liquidated BTC value. * To re-establish the physical 1:1 peg, the bridge allows users to burn issued tokens in return for * collateral at a premium rate. * * # Arguments * * * `origin` - sender of the transaction * * `amount_wrapped` - amount of issued tokens to burn **/ liquidationRedeem: AugmentedSubmittable<(amountWrapped: Compact | AnyNumber | Uint8Array) => SubmittableExtrinsic, [Compact]>; /** * Mint tokens for a redeem that was cancelled with reimburse=true. This is * only possible if at the time of the cancel_redeem, the vault did not have * sufficient collateral after being slashed to back the tokens that the user * used to hold. * * # Arguments * * * `origin` - the dispatch origin of this call (must be _Root_) * * `redeem_id` - identifier of redeem request as output from request_redeem * * # Weight: `O(1)` **/ mintTokensForReimbursedRedeem: AugmentedSubmittable<(redeemId: H256 | string | Uint8Array) => SubmittableExtrinsic, [H256]>; /** * Initializes a request to burn issued tokens against a Vault with sufficient tokens. It will * also ensure that the Parachain status is RUNNING. * * # Arguments * * * `origin` - sender of the transaction * * `amount` - amount of issued tokens * * `btc_address` - the address to receive BTC * * `vault_id` - address of the vault **/ requestRedeem: AugmentedSubmittable<(amountWrapped: Compact | AnyNumber | Uint8Array, btcAddress: BtcAddress | { P2PKH: any } | { P2SH: any } | { P2WPKHv0: any } | { P2WSHv0: any } | string | Uint8Array, vaultId: AccountId | string | Uint8Array) => SubmittableExtrinsic, [Compact, BtcAddress, AccountId]>; /** * Set the default redeem period for tx verification. * * # Arguments * * * `origin` - the dispatch origin of this call (must be _Root_) * * `period` - default period for new requests * * # Weight: `O(1)` **/ setRedeemPeriod: AugmentedSubmittable<(period: BlockNumber | AnyNumber | Uint8Array) => SubmittableExtrinsic, [BlockNumber]>; /** * Generic tx **/ [key: string]: SubmittableExtrinsicFunction; }; refund: { executeRefund: AugmentedSubmittable<(refundId: H256 | string | Uint8Array, merkleProof: Bytes | string | Uint8Array, rawTx: Bytes | string | Uint8Array) => SubmittableExtrinsic, [H256, Bytes, Bytes]>; /** * Generic tx **/ [key: string]: SubmittableExtrinsicFunction; }; replace: { /** * Accept request of vault replacement * * # Arguments * * * `origin` - the initiator of the transaction: the new vault * * `old_vault` - id of the old vault that we are (possibly partially) replacing * * `collateral` - the collateral for replacement * * `btc_address` - the address that old-vault should transfer the btc to **/ acceptReplace: AugmentedSubmittable<(oldVault: AccountId | string | Uint8Array, amountBtc: Compact | AnyNumber | Uint8Array, collateral: Compact | AnyNumber | Uint8Array, btcAddress: BtcAddress | { P2PKH: any } | { P2SH: any } | { P2WPKHv0: any } | { P2WSHv0: any } | string | Uint8Array) => SubmittableExtrinsic, [AccountId, Compact, Compact, BtcAddress]>; /** * Cancel vault replacement * * # Arguments * * * `origin` - sender of the transaction: the new vault * * `replace_id` - the ID of the replacement request **/ cancelReplace: AugmentedSubmittable<(replaceId: H256 | string | Uint8Array) => SubmittableExtrinsic, [H256]>; /** * Execute vault replacement * * # Arguments * * * `origin` - sender of the transaction: the new vault * * `replace_id` - the ID of the replacement request * * 'merkle_proof' - the merkle root of the block * * `raw_tx` - the transaction id in bytes **/ executeReplace: AugmentedSubmittable<(replaceId: H256 | string | Uint8Array, merkleProof: Bytes | string | Uint8Array, rawTx: Bytes | string | Uint8Array) => SubmittableExtrinsic, [H256, Bytes, Bytes]>; /** * Request the replacement of a new vault ownership * * # Arguments * * * `origin` - sender of the transaction * * `amount` - amount of issued tokens * * `griefing_collateral` - amount of collateral **/ requestReplace: AugmentedSubmittable<(amount: Compact | AnyNumber | Uint8Array, griefingCollateral: Compact | AnyNumber | Uint8Array) => SubmittableExtrinsic, [Compact, Compact]>; /** * Set the default replace period for tx verification. * * # Arguments * * * `origin` - the dispatch origin of this call (must be _Root_) * * `period` - default period for new requests * * # Weight: `O(1)` **/ setReplacePeriod: AugmentedSubmittable<(period: BlockNumber | AnyNumber | Uint8Array) => SubmittableExtrinsic, [BlockNumber]>; /** * Withdraw a request of vault replacement * * # Arguments * * * `origin` - sender of the transaction: the old vault **/ withdrawReplace: AugmentedSubmittable<(amount: Compact | AnyNumber | Uint8Array) => SubmittableExtrinsic, [Compact]>; /** * Generic tx **/ [key: string]: SubmittableExtrinsicFunction; }; security: { /** * Insert a new parachain error. * * # Arguments * * * `origin` - the dispatch origin of this call (must be _Root_) * * `error_code` - the error code to insert * * # Weight: `O(1)` **/ insertParachainError: AugmentedSubmittable<(errorCode: ErrorCode | 'None' | 'NoDataBTCRelay' | 'InvalidBTCRelay' | 'OracleOffline' | number | Uint8Array) => SubmittableExtrinsic, [ErrorCode]>; /** * Remove a parachain error. * * # Arguments * * * `origin` - the dispatch origin of this call (must be _Root_) * * `error_code` - the error code to remove * * # Weight: `O(1)` **/ removeParachainError: AugmentedSubmittable<(errorCode: ErrorCode | 'None' | 'NoDataBTCRelay' | 'InvalidBTCRelay' | 'OracleOffline' | number | Uint8Array) => SubmittableExtrinsic, [ErrorCode]>; /** * Set the parachain status code. * * # Arguments * * * `origin` - the dispatch origin of this call (must be _Root_) * * `status_code` - the status code to set * * # Weight: `O(1)` **/ setParachainStatus: AugmentedSubmittable<(statusCode: StatusCode | 'Running' | 'Error' | 'Shutdown' | number | Uint8Array) => SubmittableExtrinsic, [StatusCode]>; /** * Generic tx **/ [key: string]: SubmittableExtrinsicFunction; }; sla: { /** * Set the sla delta for the given relayer event. * * # Arguments * * * `origin` - the dispatch origin of this call (must be _Root_) * * `event` - relayer event to update * * `value` - sla delta * * # Weight: `O(1)` **/ setRelayerSla: AugmentedSubmittable<(event: RelayerEvent | 'StoreBlock' | 'TheftReport' | number | Uint8Array, value: SignedFixedPoint | AnyNumber | Uint8Array) => SubmittableExtrinsic, [RelayerEvent, SignedFixedPoint]>; /** * Generic tx **/ [key: string]: SubmittableExtrinsicFunction; }; stakedRelayers: { /** * One time function to initialize the BTC-Relay with the first block * * # Arguments * * * `block_header_bytes` - 80 byte raw Bitcoin block header. * * `block_height` - starting Bitcoin block height of the submitted block header. * * # * - Storage Reads: * - One storage read to check that parachain is not shutdown. O(1) * - One storage read to check if relayer authorization is disabled. O(1) * - One storage read to check if relayer is authorized. O(1) * - Storage Writes: * - One storage write to store block hash. O(1) * - One storage write to store block header. O(1) * - One storage write to initialize main chain. O(1) * - One storage write to store best block hash. O(1) * - One storage write to store best block height. O(1) * - Events: * - One event for initialization. * * Total Complexity: O(1) * # **/ initialize: AugmentedSubmittable<(rawBlockHeader: RawBlockHeader | { 0?: any } | string | Uint8Array, blockHeight: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic, [RawBlockHeader, u32]>; /** * A Staked Relayer reports misbehavior by a Vault, providing a fraud proof * (malicious Bitcoin transaction and the corresponding transaction inclusion proof). * * # Arguments * * * `origin`: Any signed user. * * `vault_id`: The account of the vault to check. * * `tx_id`: The hash of the transaction * * `merkle_proof`: The proof of tx inclusion. * * `raw_tx`: The raw Bitcoin transaction. **/ reportVaultTheft: AugmentedSubmittable<(vaultId: AccountId | string | Uint8Array, merkleProof: Bytes | string | Uint8Array, rawTx: Bytes | string | Uint8Array) => SubmittableExtrinsic, [AccountId, Bytes, Bytes]>; /** * Stores a single new block header * * # Arguments * * * `raw_block_header` - 80 byte raw Bitcoin block header. * * # * Key: C (len of chains), P (len of positions) * - Storage Reads: * - One storage read to check that parachain is not shutdown. O(1) * - One storage read to check if relayer authorization is disabled. O(1) * - One storage read to check if relayer is authorized. O(1) * - One storage read to check if block header is stored. O(1) * - One storage read to retrieve parent block hash. O(1) * - One storage read to check if difficulty check is disabled. O(1) * - One storage read to retrieve last re-target. O(1) * - One storage read to retrieve all Chains. O(C) * - Storage Writes: * - One storage write to store block hash. O(1) * - One storage write to store block header. O(1) * - One storage mutate to extend main chain. O(1) * - One storage write to store best block hash. O(1) * - One storage write to store best block height. O(1) * - Notable Computation: * - O(P) sort to reorg chains. * - External Module Operations: * - Updates relayer sla score. * - Events: * - One event for block stored (fork or extension). * * Total Complexity: O(C + P) * # **/ storeBlockHeader: AugmentedSubmittable<(rawBlockHeader: RawBlockHeader | { 0?: any } | string | Uint8Array) => SubmittableExtrinsic, [RawBlockHeader]>; /** * Generic tx **/ [key: string]: SubmittableExtrinsicFunction; }; sudo: { /** * Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key. * * The dispatch origin for this call must be _Signed_. * * # * - O(1). * - Limited storage reads. * - One DB change. * # **/ setKey: AugmentedSubmittable<(updated: LookupSource | string | Uint8Array) => SubmittableExtrinsic, [LookupSource]>; /** * Authenticates the sudo key and dispatches a function call with `Root` origin. * * The dispatch origin for this call must be _Signed_. * * # * - O(1). * - Limited storage reads. * - One DB write (event). * - Weight of derivative `call` execution + 10,000. * # **/ sudo: AugmentedSubmittable<(call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic, [Call]>; /** * Authenticates the sudo key and dispatches a function call with `Signed` origin from * a given account. * * The dispatch origin for this call must be _Signed_. * * # * - O(1). * - Limited storage reads. * - One DB write (event). * - Weight of derivative `call` execution + 10,000. * # **/ sudoAs: AugmentedSubmittable<(who: LookupSource | string | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic, [LookupSource, Call]>; /** * Authenticates the sudo key and dispatches a function call with `Root` origin. * This function does not check the weight of the call, and instead allows the * Sudo user to specify the weight of the call. * * The dispatch origin for this call must be _Signed_. * * # * - O(1). * - The weight of this call is defined by the caller. * # **/ sudoUncheckedWeight: AugmentedSubmittable<(call: Call | { callIndex?: any; args?: any } | string | Uint8Array, weight: Weight | AnyNumber | Uint8Array) => SubmittableExtrinsic, [Call, Weight]>; /** * Generic tx **/ [key: string]: SubmittableExtrinsicFunction; }; system: { /** * A dispatch that will fill the block weight up to the given ratio. **/ fillBlock: AugmentedSubmittable<(ratio: Perbill | AnyNumber | Uint8Array) => SubmittableExtrinsic, [Perbill]>; /** * Kill all storage items with a key that starts with the given prefix. * * **NOTE:** We rely on the Root origin to provide us the number of subkeys under * the prefix we are removing to accurately calculate the weight of this function. * * # * - `O(P)` where `P` amount of keys with prefix `prefix` * - `P` storage deletions. * - Base Weight: 0.834 * P µs * - Writes: Number of subkeys + 1 * # **/ killPrefix: AugmentedSubmittable<(prefix: Key | string | Uint8Array, subkeys: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic, [Key, u32]>; /** * Kill some items from storage. * * # * - `O(IK)` where `I` length of `keys` and `K` length of one key * - `I` storage deletions. * - Base Weight: .378 * i µs * - Writes: Number of items * # **/ killStorage: AugmentedSubmittable<(keys: Vec | (Key | string | Uint8Array)[]) => SubmittableExtrinsic, [Vec]>; /** * Make some on-chain remark. * * # * - `O(1)` * # **/ remark: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic, [Bytes]>; /** * Make some on-chain remark and emit event. * * # * - `O(b)` where b is the length of the remark. * - 1 event. * # **/ remarkWithEvent: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic, [Bytes]>; /** * Set the new changes trie configuration. * * # * - `O(1)` * - 1 storage write or delete (codec `O(1)`). * - 1 call to `deposit_log`: Uses `append` API, so O(1) * - Base Weight: 7.218 µs * - DB Weight: * - Writes: Changes Trie, System Digest * # **/ setChangesTrieConfig: AugmentedSubmittable<(changesTrieConfig: Option | null | object | string | Uint8Array) => SubmittableExtrinsic, [Option]>; /** * Set the new runtime code. * * # * - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` * - 1 storage write (codec `O(C)`). * - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is expensive). * - 1 event. * The weight of this function is dependent on the runtime, but generally this is very expensive. * We will treat this as a full block. * # **/ setCode: AugmentedSubmittable<(code: Bytes | string | Uint8Array) => SubmittableExtrinsic, [Bytes]>; /** * Set the new runtime code without doing any checks of the given `code`. * * # * - `O(C)` where `C` length of `code` * - 1 storage write (codec `O(C)`). * - 1 event. * The weight of this function is dependent on the runtime. We will treat this as a full block. * # **/ setCodeWithoutChecks: AugmentedSubmittable<(code: Bytes | string | Uint8Array) => SubmittableExtrinsic, [Bytes]>; /** * Set the number of pages in the WebAssembly environment's heap. * * # * - `O(1)` * - 1 storage write. * - Base Weight: 1.405 µs * - 1 write to HEAP_PAGES * # **/ setHeapPages: AugmentedSubmittable<(pages: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic, [u64]>; /** * Set some items of storage. * * # * - `O(I)` where `I` length of `items` * - `I` storage writes (`O(1)`). * - Base Weight: 0.568 * i µs * - Writes: Number of items * # **/ setStorage: AugmentedSubmittable<(items: Vec | (KeyValue)[]) => SubmittableExtrinsic, [Vec]>; /** * Generic tx **/ [key: string]: SubmittableExtrinsicFunction; }; timestamp: { /** * Set the current time. * * This call should be invoked exactly once per block. It will panic at the finalization * phase, if this call hasn't been invoked by that time. * * The timestamp should be greater than the previous one by the amount specified by * `MinimumPeriod`. * * The dispatch origin for this call must be `Inherent`. * * # * - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in `on_finalize`) * - 1 event handler `on_timestamp_set`. Must be `O(1)`. * # **/ set: AugmentedSubmittable<(now: Compact | AnyNumber | Uint8Array) => SubmittableExtrinsic, [Compact]>; /** * Generic tx **/ [key: string]: SubmittableExtrinsicFunction; }; utility: { /** * Send a call through an indexed pseudonym of the sender. * * Filter from origin are passed along. The call will be dispatched with an origin which * use the same filter as the origin of this call. * * NOTE: If you need to ensure that any account-based filtering is not honored (i.e. * because you expect `proxy` to have been used prior in the call stack and you do not want * the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` * in the Multisig pallet instead. * * NOTE: Prior to version *12, this was called `as_limited_sub`. * * The dispatch origin for this call must be _Signed_. **/ asDerivative: AugmentedSubmittable<(index: u16 | AnyNumber | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic, [u16, Call]>; /** * Send a batch of dispatch calls. * * May be called from any origin. * * - `calls`: The calls to be dispatched from the same origin. * * If origin is root then call are dispatch without checking origin filter. (This includes * bypassing `frame_system::Config::BaseCallFilter`). * * # * - Complexity: O(C) where C is the number of calls to be batched. * # * * This will return `Ok` in all circumstances. To determine the success of the batch, an * event is deposited. If a call failed and the batch was interrupted, then the * `BatchInterrupted` event is deposited, along with the number of successful calls made * and the error of the failed call. If all were successful, then the `BatchCompleted` * event is deposited. **/ batch: AugmentedSubmittable<(calls: Vec | (Call | { callIndex?: any; args?: any } | string | Uint8Array)[]) => SubmittableExtrinsic, [Vec]>; /** * Send a batch of dispatch calls and atomically execute them. * The whole transaction will rollback and fail if any of the calls failed. * * May be called from any origin. * * - `calls`: The calls to be dispatched from the same origin. * * If origin is root then call are dispatch without checking origin filter. (This includes * bypassing `frame_system::Config::BaseCallFilter`). * * # * - Complexity: O(C) where C is the number of calls to be batched. * # **/ batchAll: AugmentedSubmittable<(calls: Vec | (Call | { callIndex?: any; args?: any } | string | Uint8Array)[]) => SubmittableExtrinsic, [Vec]>; /** * Generic tx **/ [key: string]: SubmittableExtrinsicFunction; }; vaultRegistry: { /** * Configures whether or not the vault accepts new issues. * * # Arguments * * * `origin` - sender of the transaction (i.e. the vault) * * `accept_new_issues` - true indicates that the vault accepts new issues * * # Weight: `O(1)` **/ acceptNewIssues: AugmentedSubmittable<(acceptNewIssues: bool | boolean | Uint8Array) => SubmittableExtrinsic, [bool]>; /** * Deposit collateral as a security against stealing the * Bitcoin locked with the caller. * * # Arguments * * `amount` - the amount of extra collateral to lock **/ depositCollateral: AugmentedSubmittable<(amount: Compact | AnyNumber | Uint8Array) => SubmittableExtrinsic, [Compact]>; registerAddress: AugmentedSubmittable<(btcAddress: BtcAddress | { P2PKH: any } | { P2SH: any } | { P2WPKHv0: any } | { P2WSHv0: any } | string | Uint8Array) => SubmittableExtrinsic, [BtcAddress]>; /** * Initiates the registration procedure for a new Vault. * The Vault provides its BTC address and locks up collateral, * which is to be used in the issuing process. * * # Arguments * * `collateral` - the amount of collateral to lock * * `public_key` - the BTC public key of the vault to register * * # Errors * * `InsufficientVaultCollateralAmount` - if the collateral is below the minimum threshold * * `VaultAlreadyRegistered` - if a vault is already registered for the origin account * * `InsufficientCollateralAvailable` - if the vault does not own enough collateral **/ registerVault: AugmentedSubmittable<(collateral: Compact | AnyNumber | Uint8Array, publicKey: BtcPublicKey | string | Uint8Array) => SubmittableExtrinsic, [Compact, BtcPublicKey]>; reportUndercollateralizedVault: AugmentedSubmittable<(vaultId: AccountId | string | Uint8Array) => SubmittableExtrinsic, [AccountId]>; /** * Registers a new Bitcoin address for the vault. * * # Arguments * * `public_key` - the BTC public key of the vault to update **/ updatePublicKey: AugmentedSubmittable<(publicKey: BtcPublicKey | string | Uint8Array) => SubmittableExtrinsic, [BtcPublicKey]>; /** * Withdraws `amount` of the collateral from the amount locked by * the vault corresponding to the origin account * The collateral left after withdrawal must be more * (free or used in collateral issued tokens) than MinimumCollateralVault * and above the SecureCollateralThreshold. Collateral that is currently * being used to back issued tokens remains locked until the Vault * is used for a redeem request (full release can take multiple redeem requests). * * # Arguments * * `amount` - the amount of collateral to withdraw * * # Errors * * `VaultNotFound` - if no vault exists for the origin account * * `InsufficientCollateralAvailable` - if the vault does not own enough collateral **/ withdrawCollateral: AugmentedSubmittable<(amount: Compact | AnyNumber | Uint8Array) => SubmittableExtrinsic, [Compact]>; /** * Generic tx **/ [key: string]: SubmittableExtrinsicFunction; }; wrapped: { /** * Exactly as `transfer`, except the origin must be root and the source account may be * specified. * # * - Same as transfer, but additional read and write because the source account is * not assumed to be in the overlay. * # **/ forceTransfer: AugmentedSubmittable<(source: LookupSource | string | Uint8Array, dest: LookupSource | string | Uint8Array, value: Compact | AnyNumber | Uint8Array) => SubmittableExtrinsic, [LookupSource, LookupSource, Compact]>; /** * Set the balances of a given account. * * This will alter `FreeBalance` and `ReservedBalance` in storage. it will * also decrease the total issuance of the system (`TotalIssuance`). * If the new free or reserved balance is below the existential deposit, * it will reset the account nonce (`frame_system::AccountNonce`). * * The dispatch origin for this call is `root`. * * # * - Independent of the arguments. * - Contains a limited number of reads and writes. * --------------------- * - Base Weight: * - Creating: 27.56 µs * - Killing: 35.11 µs * - DB Weight: 1 Read, 1 Write to `who` * # **/ setBalance: AugmentedSubmittable<(who: LookupSource | string | Uint8Array, newFree: Compact | AnyNumber | Uint8Array, newReserved: Compact | AnyNumber | Uint8Array) => SubmittableExtrinsic, [LookupSource, Compact, Compact]>; /** * Transfer some liquid free balance to another account. * * `transfer` will set the `FreeBalance` of the sender and receiver. * It will decrease the total issuance of the system by the `TransferFee`. * If the sender's account is below the existential deposit as a result * of the transfer, the account will be reaped. * * The dispatch origin for this call must be `Signed` by the transactor. * * # * - Dependent on arguments but not critical, given proper implementations for * input config types. See related functions below. * - It contains a limited number of reads and writes internally and no complex computation. * * Related functions: * * - `ensure_can_withdraw` is always called internally but has a bounded complexity. * - Transferring balances to accounts that did not exist before will cause * `T::OnNewAccount::on_new_account` to be called. * - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`. * - `transfer_keep_alive` works the same way as `transfer`, but has an additional * check that the transfer will not kill the origin account. * --------------------------------- * - Base Weight: 73.64 µs, worst case scenario (account created, account removed) * - DB Weight: 1 Read and 1 Write to destination account * - Origin account is already in memory, so no DB operations for them. * # **/ transfer: AugmentedSubmittable<(dest: LookupSource | string | Uint8Array, value: Compact | AnyNumber | Uint8Array) => SubmittableExtrinsic, [LookupSource, Compact]>; /** * Same as the [`transfer`] call, but with a check that the transfer will not kill the * origin account. * * 99% of the time you want [`transfer`] instead. * * [`transfer`]: struct.Pallet.html#method.transfer * # * - Cheaper than transfer because account cannot be killed. * - Base Weight: 51.4 µs * - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already) * # **/ transferKeepAlive: AugmentedSubmittable<(dest: LookupSource | string | Uint8Array, value: Compact | AnyNumber | Uint8Array) => SubmittableExtrinsic, [LookupSource, Compact]>; /** * Generic tx **/ [key: string]: SubmittableExtrinsicFunction; }; } export interface SubmittableExtrinsics extends AugmentedSubmittables { (extrinsic: Call | Extrinsic | Uint8Array | string): SubmittableExtrinsic; [key: string]: SubmittableModuleExtrinsics; } }