UNPKG

zkverifyjs

Version:

Submit proofs to zkVerify and query proof state with ease using our npm package.

22 lines 1.21 kB
import { ApiPromise } from '@polkadot/api'; import { SubmittableExtrinsic } from '@polkadot/api/types'; import { ExtrinsicCostEstimate } from './types'; import { KeyringPair } from '@polkadot/keyring/types'; /** * Converts a fee in the smallest unit to the base token unit. * * @param {string} feeInSmallestUnit - Fee in the blockchain's smallest unit. * @param {number} decimals - The number of decimals in the blockchain's base token. * @returns {string} - The fee in the base token unit. */ export declare function convertFeeToToken(feeInSmallestUnit: string, decimals: number): string; /** * Estimates the cost of a given extrinsic for the specified account. * * @param {ApiPromise} api - The Polkadot API instance. * @param {SubmittableExtrinsic<'promise', ISubmittableResult>} extrinsic - The extrinsic to estimate. * @param {KeyringPair} account - The account to use. * @returns {Promise<ExtrinsicCostEstimate>} - A promise that resolves to an object containing the estimated fee and extrinsic details. */ export declare function estimateCost(api: ApiPromise, extrinsic: SubmittableExtrinsic<'promise'>, account: KeyringPair): Promise<ExtrinsicCostEstimate>; //# sourceMappingURL=index.d.ts.map