btcutil-js - v0.2.0
    Preparing search index...

    Variable txConst

    tx: {
        decode(rawTx: Bytes): Promise<TxDecodeResult>;
        encode(data: TxData): Promise<Uint8Array<ArrayBufferLike>>;
        hash(rawTx: Bytes): Promise<string>;
        hasWitness(rawTx: Bytes): Promise<boolean>;
        witnessHash(rawTx: Bytes): Promise<string>;
    } = ...

    Transaction utilities.

    Type Declaration

    • decode: function
    • encode: function
      • Encode a tx (just TxData — no derived fields needed) back to raw bytes.

        Parameters

        Returns Promise<Uint8Array<ArrayBufferLike>>

    • hash: function
      • Compute the txid (double-SHA256, reversed) of a raw transaction.

        Parameters

        Returns Promise<string>

    • hasWitness: function
      • Check if a raw transaction contains witness data.

        Parameters

        Returns Promise<boolean>

    • witnessHash: function
      • Compute the witness txid (wtxid) of a raw transaction.

        Parameters

        Returns Promise<string>