import { Transaction } from '@ckb-lumos/base'; import { helpers } from '@ckb-lumos/lumos'; /** * Calculates the size of a transaction. * * Note: Why adding 4 bytes to the size of transaction: * [Calculate transaction fee](https://github.com/nervosnetwork/ckb/wiki/Transaction-%C2%BB-Transaction-Fee#calculate-transaction-fee) */ export declare function getTransactionSize(tx: Transaction): number; /** * Calculates the size of a TransactionSkeleton. */ export declare function getTransactionSkeletonSize(txSkeleton: helpers.TransactionSkeletonType): number; /** * Check if the Transaction's size (in bytes) is as expected. * Expected: min < size <= max. */ export declare function isTransactionSizeInRange(tx: Transaction, min?: number, max?: number): boolean; /** * Check if the TransactionSkeleton's size (in bytes) is as expected. * Expected: min < size <= max. */ export declare function isTransactionSkeletonSizeInRange(txSkeleton: helpers.TransactionSkeletonType, min?: number, max?: number): boolean; /** * Throw an error if the Transaction's size (in bytes) is not as expected. * Expected: min < size <= max. */ export declare function assetTransactionSize(tx: Transaction, min?: number, max?: number): void; /** * Throw an error if the TransactionSkeleton's size (in bytes) is not as expected. * Expected: min < size <= max. */ export declare function assetTransactionSkeletonSize(txSkeleton: helpers.TransactionSkeletonType, min?: number, max?: number): void;