@okxweb3/coin-bitcoin
Version:
@ok/coin-bitcoin is a Bitcoin SDK for building Web3 wallets and applications. It supports BTC, BSV, DOGE, LTC, and TBTC, enabling private key management, transaction signing, address generation, and inscriptions like BRC-20, Runes, CAT, and Atomicals.
30 lines (29 loc) • 1.12 kB
TypeScript
import { btc, GuardContract, TokenContract } from "../common";
import { CAT20State, GuardInfo, ProtocolState } from "@cat-protocol/cat-smartcontracts";
import { SignTxParams } from "@okxweb3/coin-base";
export declare function estimateFee(param: SignTxParams): Promise<{
mergeTx: any;
commitTx: any;
revealTx: any;
} | {
commitTx: any;
revealTx: any;
mergeTx?: undefined;
} | null>;
export declare function transfer(param: SignTxParams): Promise<{
mergeTx: any;
commitTx: any;
revealTx: any;
} | {
commitTx: any;
revealTx: any;
mergeTx?: undefined;
} | null>;
export declare const calcVsizeTransfer: (tokens: TokenContract[], guardContract: GuardContract, revealTx: btc.Transaction, guardInfo: GuardInfo, tokenTxs: Array<{
prevTx: btc.Transaction;
prevPrevTx: btc.Transaction;
prevTokenInputIndex: number;
}>, tokenTapScript: string, guardTapScript: string, newState: ProtocolState, receiverTokenState: CAT20State, changeTokenState: null | CAT20State, satoshisChangeScript: btc.Script, minterP2TR: string) => Promise<{
vsize: any;
fee: number;
}>;