UNPKG

bigblocks

Version:

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

88 lines 2.47 kB
import type { PrivateKey, Script, Transaction } from "@bsv/sdk"; import type { ContentType, SocialActionType, SocialContext } from "./social.js"; export interface ProtocolConfig { app: string; feePerByte?: number; changeAddress?: string; } export interface SocialTransactionInput { type: SocialActionType; content?: string; contentType?: ContentType; context?: SocialContext; metadata?: Record<string, string>; signingKey: PrivateKey; config: ProtocolConfig; } export type ProtocolDataArray = string[]; export interface BProtocolBuilder { content: string; contentType: ContentType; encoding?: string; filename?: string; } export interface MAPProtocolBuilder { app: string; type: SocialActionType; context?: SocialContext; metadata?: Record<string, string>; } export interface AIPProtocolBuilder { dataToSign: ProtocolDataArray; signingKey: PrivateKey; address: string; } export interface SignedProtocolData { data: ProtocolDataArray; signature: string; address: string; algorithm: string; } export interface TransactionBuildResult { transaction: Transaction; script: Script; fee: number; txid?: string; } export interface BroadcastConfig { broadcaster?: "whatsonchain" | "gorillapool" | "taal" | string; timeout?: number; retries?: number; } export type { BroadcastResult } from "./social.js"; export interface UTXO { txid: string; vout: number; satoshis: number; script: string; tx?: Transaction; } export interface TransactionOutput { script?: Script; address?: string; satoshis: number; } export interface TransactionBuilderConfig { outputs: TransactionOutput[]; utxos: UTXO[]; changeAddress: string; paymentKey: PrivateKey; feePerByte?: number; } export declare const PROTOCOL_IDS: { readonly B: "19HxigV4QyBv3tHpQVcUEQyq1pzZVdoAut"; readonly MAP: "1PuQa7K62MiKCtssSLKy1kh56WWU7MtUR5"; readonly BAP: "1BAPSuaPnfGnSBM3GLV9yhxUdYe4vGbdMT"; readonly AIP: "15PciHG22SNLQJXMoSUaWVi7WSqc7hCfva"; readonly PIPE: "|"; }; export declare const DEFAULT_PROTOCOL_CONFIG: Partial<ProtocolConfig>; export declare const CONTENT_TYPE_EXTENSIONS: { readonly "text/plain": ".txt"; readonly "text/markdown": ".md"; }; export declare const DEFAULT_FILENAMES: { readonly "text/plain": "post.txt"; readonly "text/markdown": "post.md"; }; //# sourceMappingURL=protocol.d.ts.map