import { Beef, HexString } from '@bsv/sdk'; import { GetMerklePathResult, GetStatusForTxidsResult, PostBeefResult, PostTxResultForTxid, WalletServices } from '../../sdk/WalletServices.interfaces'; import { ArcConfig, ArcMinerGetTxData } from './ARC'; export declare const ARCADE_POST_BEEF_CONCURRENCY = 4; export { validateArcTxData as validateArcadeTxData } from './arcTxDataValidation'; /** * Broadcaster for bsv-blockchain/arcade — the Teranode-native, ARC-compatible broadcaster. * * Arcade is intentionally a separate, self-contained class (not a subclass of {@link ARC}) so * the audited ARC transport is never altered. It is ARC-compatible on headers, configuration and * the `getTxData` response shape — but differs where it must: * * - Endpoints are served at the root: `/tx` and `/tx/{txid}` (no `/v1` prefix). * - A submit returns HTTP 202; HTTP 400 is a terminal validation failure (REJECTED) and is * surfaced as an invalid-transaction status error rather than a transient service error. * - Submission encoding is Extended Format (EF), not BEEF: Arcade's `/tx` parser rejects BEEF * ("failed to parse transaction") and runs fee/script validation that needs per-input source * data, which EF carries inline. */ export declare class Arcade { readonly name: string; readonly URL: string; readonly apiKey: string | undefined; readonly deploymentId: string; readonly callbackUrl: string | undefined; readonly callbackToken: string | undefined; readonly headers: Record | undefined; private readonly httpClient; /** * @param URL - The Arcade endpoint base URL. * @param config - Arcade configuration (shares ARC's {@link ArcConfig} shape). */ constructor(URL: string, config?: ArcConfig, name?: string); constructor(URL: string, apiKey?: string, name?: string); /** Constructs a dictionary of the default & supplied request headers. */ private requestHeaders; private applySuccessfulPostRawTx; private applyFailedPostRawTx; private applyPostRawTxResponse; private applyPostRawTxCatch; /** * Submit a single transaction to Arcade's `POST /tx` endpoint. * * `rawTx` must be a single (raw or Extended Format) transaction hex — NOT BEEF. The canonical * txid is taken from `txids` when supplied (Arcade derives the same txid from the parsed tx). */ postRawTx(rawTx: HexString, txids?: string[]): Promise; /** * Post each tx of interest as Extended Format (EF). * * EF needs each input's source output (satoshis + locking script). For a BEEF that carries every * direct parent transaction in full (e.g. the atomic BEEF produced by createAction), that data is * present and {@link Transaction.fromBEEF} can reconstruct EF. A BEEF is NOT guaranteed to contain * it, however: BEEF V2 `txidOnly` entries (or an otherwise pruned BEEF) can reference a direct * parent without its bytes, leaving no source output to embed — so BEEF -> EF is not always * possible. When EF cannot be built for a txid, it is recorded as a (non-terminal) service error * so cross-provider aggregation falls through to a BEEF-capable broadcaster, which can still * broadcast the (valid) transaction. */ postBeef(beef: Beef, txids: string[]): Promise; /** Look up a transaction's current status (and merkle path once mined) via `GET /tx/{txid}`. */ getTxData(txid: string): Promise; /** * Adapt Arcade's lifecycle endpoint to the shared transaction-status * provider contract. This lets monitor reconciliation remain operational * when an explorer such as WhatsOnChain is absent. Only network-observed * states count as known; RECEIVED/PENDING_RETRY and terminal rejection * states remain unknown, while MINED/IMMUTABLE are authoritative mined * observations whose proof is validated separately. */ getStatusForTxids(txids: string[]): Promise; /** * `getMerklePath` provider: obtain a BUMP merkle proof for a mined transaction from Arcade. * * Arcade only has a proof for transactions it tracked (i.e. broadcast through it) that have * been mined while tracked; for anything else `GET /tx/{txid}` reports a non-mined status (or * 404) and this returns no `merklePath`, so {@link Services.getMerklePath} falls through to the * other providers (WhatsOnChain/Bitails). * * The proof is NOT trusted blindly: the canonical block header is resolved from the wallet's * own chaintracker via `services.hashToHeader(blockHash)` (which only knows real, mined blocks), * and the BUMP's computed merkle root must equal that header's `merkleRoot`. Only then is the * proof returned, with the canonical `header` that downstream proof completion requires. */ getMerklePath(txid: string, services: WalletServices): Promise; } //# sourceMappingURL=Arcade.d.ts.map