import { ParseAbiValuesReturnType } from "../../../../types/parseAbiValues.types"; import { EncodingFormat } from "./encode"; /** * Parameters for creating a Bitcoin inscription call transaction */ export interface InscriptionCallParams { /** Optional API URL override */ bitcoinApi?: string; /** Optional commit fee in satoshis (defaults to DEFAULT_COMMIT_FEE_SAT) */ commitFee?: number; /** Raw hex data (alternative to types/values/receiver) */ data?: string; /** Encoding format for the inscription */ format?: EncodingFormat; /** User's BTC address for receiving change */ fromAddress: string; /** ZetaChain gateway address to send to */ gatewayAddress: string; /** Network (signet or mainnet) */ network: "signet" | "mainnet"; /** x-only public key (32 bytes hex string or Uint8Array) for Taproot. If 33 bytes (compressed), first byte will be stripped automatically. */ publicKey: string | Uint8Array; /** Universal Contract address (required if using types/values) */ receiver?: string; /** Optional revert address (defaults to fromAddress) */ revertAddress?: string; /** ABI types array (alternative to data) */ types?: string[]; /** Values corresponding to types (alternative to data) */ values?: ParseAbiValuesReturnType; } /** * Result from building the commit PSBT */ export interface InscriptionCallCommitPsbtResult { /** Data needed to build the reveal transaction later */ commitData: { controlBlock: Buffer; internalKey: Buffer; leafScript: Buffer; }; /** Commit fee in satoshis */ commitFee: number; /** PSBT encoded as base64 string for wallet signing */ commitPsbtBase64: string; /** Deposit fee in satoshis */ depositFee: number; /** Raw inscription data as hex string */ rawInscriptionData: string; /** Reveal fee in satoshis */ revealFee: number; /** Address that should sign the commit PSBT */ signingAddress: string; /** Input indexes that need to be signed */ signingIndexes: number[]; } /** * Parameters for broadcasting commit and building reveal PSBT */ export interface BroadcastCommitAndBuildRevealParams { /** Optional API URL override */ bitcoinApi?: string; /** Data needed to build the reveal transaction */ commitData: { controlBlock: Buffer; internalKey: Buffer; leafScript: Buffer; }; /** Deposit fee in satoshis (from commit result) */ depositFee: number; /** User's address for signing */ fromAddress: string; /** ZetaChain gateway address */ gatewayAddress: string; /** Network (signet or mainnet) */ network: "signet" | "mainnet"; /** Reveal fee in satoshis (from commit result) */ revealFee: number; /** The commit PSBT after wallet signing (base64 encoded) */ signedCommitPsbtBase64: string; } /** * Result from broadcasting commit and building reveal PSBT */ export interface InscriptionCallRevealPsbtResult { /** Commit transaction ID */ commitTxid: string; /** Deposit fee in satoshis */ depositFee: number; /** Reveal fee in satoshis */ revealFee: number; /** PSBT encoded as base64 string for wallet signing */ revealPsbtBase64: string; /** Address that should sign the reveal PSBT */ signingAddress: string; /** Input indexes that need to be signed */ signingIndexes: number[]; } /** * Result from broadcasting the reveal transaction */ export interface InscriptionRevealBroadcastResult { /** Reveal transaction ID */ revealTxid: string; /** Raw reveal transaction hex */ txHex: string; } /** * Builds an unsigned commit PSBT for an inscription call transaction * This PSBT must be signed by the wallet before broadcasting */ export declare const buildBitcoinInscriptionCallCommitPsbt: (params: InscriptionCallParams) => Promise; /** * Broadcasts the signed commit PSBT and builds the reveal PSBT * @param params - Parameters including signed commit PSBT, commit data, and fees * @returns Commit txid and unsigned reveal PSBT */ export declare const broadcastCommitAndBuildRevealPsbt: (params: BroadcastCommitAndBuildRevealParams) => Promise; /** * Finalizes a signed reveal PSBT and broadcasts it to the network * @param signedRevealPsbtBase64 - The reveal PSBT after wallet signing (base64 encoded) * @param bitcoinApi - Optional API URL override * @returns Reveal transaction ID and hex */ export declare const finalizeBitcoinInscriptionCallReveal: (signedRevealPsbtBase64: string, bitcoinApi?: string) => Promise;