UNPKG

bigblocks

Version:

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

152 lines 3.4 kB
import type { PrivateKey } from "@bsv/sdk"; import type { NftUtxo, TokenUtxo, Utxo } from "js-1sat-ord"; export interface WalletConfig { paymentKey?: PrivateKey; ordinalKey?: PrivateKey; changeAddress?: string; ordinalAddress?: string; feeRate?: number; } export interface BSVBalance { confirmed: number; unconfirmed: number; total: number; } export interface TokenBalance { id: string; symbol: string; name?: string; icon?: string; decimals: number; balance: { confirmed: string; unconfirmed: string; total: string; }; listed: { confirmed: string; unconfirmed: string; total: string; }; price?: number; value?: number; type: "bsv20" | "bsv21"; } export interface OrdinalBalance { txid: string; vout: number; origin: string; contentType: string; collectionId?: string; name?: string; preview?: string; listed?: boolean; price?: number; } export interface WalletBalance { bsv: BSVBalance; tokens: TokenBalance[]; ordinals: OrdinalBalance[]; totalValue: { bsv: number; usd: number; }; } export interface UTXOSet { payment: Utxo[]; ordinals: NftUtxo[]; tokens: TokenUtxo[]; total: { utxos: number; satoshis: number; }; } export interface WalletActivity { txid: string; type: "send" | "receive" | "mint" | "burn" | "list" | "buy" | "cancel"; amount?: number; token?: { id: string; symbol: string; amount: string; }; ordinal?: { origin: string; contentType: string; }; timestamp: number; height?: number; status: "confirmed" | "unconfirmed" | "failed"; from?: string; to?: string; fee?: number; } export interface SendTransactionConfig { to: string; amount: number; message?: string; feeRate?: number; broadcast?: boolean; } export interface SendTokenConfig { to: string; tokenId: string; amount: string; message?: string; feeRate?: number; broadcast?: boolean; } export interface SendOrdinalConfig { to: string; ordinal: { txid: string; vout: number; }; message?: string; feeRate?: number; broadcast?: boolean; } export interface SendConfig { toAddress: string; satoshis: number; message?: string; feeRate?: number; broadcast?: boolean; } export interface SendResult { txid: string; fee: number; amount: number; recipient: string; message?: string; size: number; } export interface ConsolidateConfig { maxInputs?: number; feeRate?: number; targetAddress?: string; broadcast?: boolean; } export interface TransactionResult { txid: string; rawTx: string; fee: number; size: number; inputs: number; outputs: number; } export interface WalletError { code: string; message: string; details?: Error | Record<string, unknown>; } export declare enum WalletErrorCode { INSUFFICIENT_FUNDS = "INSUFFICIENT_FUNDS", INVALID_ADDRESS = "INVALID_ADDRESS", INVALID_AMOUNT = "INVALID_AMOUNT", TRANSACTION_FAILED = "TRANSACTION_FAILED", BROADCAST_FAILED = "BROADCAST_FAILED", MISSING_UTXOS = "MISSING_UTXOS", MISSING_PRIVATE_KEY = "MISSING_PRIVATE_KEY" } //# sourceMappingURL=wallet.d.ts.map