qbit-rpc
    Preparing search index...

    Type Alias ZmqMessage

    ZmqMessage: { sequence: number } & (
        | { hash: string; topic: "hashblock" }
        | { topic: "hashtx"; txid: string }
        | { bytes: Uint8Array; topic: "rawblock" }
        | { bytes: Uint8Array; topic: "rawtx" }
        | {
            event:
                | "block_connected"
                | "block_disconnected"
                | "mempool_added"
                | "mempool_removed";
            hash: string;
            mempoolSequence?: bigint;
            topic: "sequence";
        }
    )

    A parsed notification. Hashes are hex in the byte order RPC and explorers show; qbit Core already puts them on the wire in that order.

    Type Declaration

    • Readonlysequence: number

      The publisher's per-topic message counter, an unsigned 32-bit value that wraps.

    • { hash: string; topic: "hashblock" }
      • Readonlyhash: string

        The new tip's block hash.

      • Readonlytopic: "hashblock"

        The active chain has a new tip.

    • { topic: "hashtx"; txid: string }
      • Readonlytopic: "hashtx"

        A transaction entered the mempool, or is in a block connected or disconnected.

      • Readonlytxid: string

        The transaction's txid.

    • { bytes: Uint8Array; topic: "rawblock" }
      • Readonlybytes: Uint8Array

        The serialized block, as qbit Core stores it: a copy of the frame, not decoded here.

      • Readonlytopic: "rawblock"

        The active chain has a new tip.

    • { bytes: Uint8Array; topic: "rawtx" }
      • Readonlybytes: Uint8Array

        The serialized transaction: a copy of the frame, not decoded here.

      • Readonlytopic: "rawtx"

        A transaction entered the mempool, or is in a block connected or disconnected.

    • {
          event:
              | "block_connected"
              | "block_disconnected"
              | "mempool_added"
              | "mempool_removed";
          hash: string;
          mempoolSequence?: bigint;
          topic: "sequence";
      }
      • Readonlyevent: "block_connected" | "block_disconnected" | "mempool_added" | "mempool_removed"

        Block connected (C) or disconnected (D), or a transaction added to (A) or removed from (R) the mempool.

      • Readonlyhash: string

        Block hash for block events, txid for mempool events.

      • Optional ReadonlymempoolSequence?: bigint

        The mempool sequence number, an unsigned 64-bit value, for mempool events only.

      • Readonlytopic: "sequence"

        A block was connected or disconnected, or a transaction entered or left the mempool.