UNPKG

bigblocks

Version:

Complete Bitcoin UI component library - authentication, social, wallet, market, inscriptions, and blockchain interactions for React

41 lines 1.35 kB
/** * useInscription Hook * * Core hook for handling blockchain inscriptions * Provides shared functionality for all inscription types */ import { type Payment, type PreMAP, type Utxo } from "js-1sat-ord"; export interface InscriptionResult { txid: string; rawTx: string; fee: number; size: number; numInputs: number; numOutputs: number; spentOutpoints: string[]; payChange?: Utxo; } export interface UseInscriptionOptions { onSuccess?: (result: InscriptionResult) => void; onError?: (error: Error) => void; onProgress?: (status: string) => void; } export interface InscribeParams { content: string | ArrayBuffer; contentType: string; metadata?: PreMAP; iterations?: number; identityKey?: string; additionalPayments?: Payment[]; utxos?: Utxo[]; } export declare function useInscription(options?: UseInscriptionOptions): { inscribe: ({ content, contentType, metadata, iterations, identityKey, additionalPayments, utxos, }: InscribeParams) => Promise<InscriptionResult>; estimateFee: (content: string | ArrayBuffer, _contentType: string, iterations?: number) => Promise<number>; loading: boolean; error: Error | null; result: InscriptionResult | null; feeEstimate: number | null; reset: () => void; }; //# sourceMappingURL=useInscription.d.ts.map