ordspv
    Preparing search index...

    Interface AnchorBackend

    What it takes to anchor a transaction into a PoW-checked header. Shared with the sat genealogy builder, which needs anchoring but no outspend pathfinding.

    interface AnchorBackend {
        baseUrl: string;
        getBlockInfo(blockHash: string): Promise<BlockInfoAnswer>;
        getBlockRaw?(blockHash: string): Promise<Uint8Array<ArrayBufferLike>>;
        getHeaderHex(blockHash: string): Promise<string>;
        getMerkleProof(
            txid: string,
        ): Promise<{ block_height: number; merkle: string[]; pos: number }>;
        getTxHex(txid: string): Promise<string>;
        getTxStatus(
            txid: string,
        ): Promise<
            { block_hash?: string; block_height?: number; confirmed: boolean },
        >;
    }

    Hierarchy (View Summary)

    Index
    baseUrl: string
    • The block's own summary. tx_count is what the bundle carries; the other three fields arrive in the same response an esplora backend has already been paid for, and checkHopAnswers folds each one it is given against the answers the same backend gave elsewhere. They are optional because this interface describes what the builder needs rather than what esplora happens to send, and a backend that omits one is simply not checked on it.

      Parameters

      • blockHash: string

      Returns Promise<BlockInfoAnswer>

    • Optional: the raw block, used to build the reveal's wtxid proof on multi-input reveals. A backend without it still builds bundles for single-input reveals; a multi-input reveal needs the section from some backend or the bundle cannot be verified at all.

      Parameters

      • blockHash: string

      Returns Promise<Uint8Array<ArrayBufferLike>>

    • Parameters

      • txid: string

      Returns Promise<{ block_height: number; merkle: string[]; pos: number }>

    • Parameters

      • txid: string

      Returns Promise<{ block_hash?: string; block_height?: number; confirmed: boolean }>