UNPKG

@bsv/overlay-express

Version:
37 lines 1.38 kB
import { BroadcastFailure, Broadcaster, BroadcastResponse, MerklePath, Transaction } from '@bsv/sdk'; export interface ArcadeProviderConfig { apiKey?: string; callbackUrl?: string; callbackToken?: string; deploymentId?: string; headers?: Record<string, string>; fetch?: typeof fetch; } export interface ArcadeMerkleProof { txid: string; merklePath: MerklePath; blockHeight?: number; blockHash?: string; merkleRoot: string; } export declare function isTerminalArcStatus(status: unknown, extraInfo?: unknown): boolean; /** * Broadcaster/proof client for bsv-blockchain/arcade. * * Arcade exposes transaction propagation at `/tx` and status/proofs at * `/tx/{txid}`. It returns terminal validation and double-spend statuses in the * body, so callers must classify those as failed broadcasts even when HTTP * accepted the request. */ export declare class ArcadeProvider implements Broadcaster { private readonly config; readonly name = "Arcade"; private readonly baseUrl; private readonly fetcher; constructor(url: string, config?: ArcadeProviderConfig); broadcast(tx: Transaction): Promise<BroadcastResponse | BroadcastFailure>; fetchMerkleProof(txid: string): Promise<ArcadeMerkleProof | undefined>; private requestHeaders; private readResponse; } //# sourceMappingURL=ArcadeProvider.d.ts.map