qbit-rpc
    Preparing search index...

    Type Alias WalletHistoryEntry

    WalletHistoryEntry: (
        | {
            address?: string;
            amountBits: bigint;
            category: WalletTxCategory;
            feeBits?: bigint;
            label?: string;
            parentDescs?: readonly string[];
            vout: number;
        }
        | {
            address?: never;
            amountBits: bigint;
            category: "send";
            feeBits: bigint;
            label?: never;
            parentDescs?: never;
            vout?: never;
        }
    ) & {
        abandoned: boolean;
        bip125Replaceable: "yes"
        | "no"
        | "unknown";
        blockHash?: string;
        blockHeight?: number;
        blockIndex?: number;
        blockTime?: number;
        comment?: string;
        confirmations: number;
        generated?: boolean;
        mempoolConflicts: readonly string[];
        replacedByTxid?: string;
        replacesTxid?: string;
        time: number;
        timeReceived: number;
        to?: string;
        trusted?: boolean;
        txid: string;
        walletConflicts: readonly string[];
        wtxid: string;
    }

    One listsinceblock or listtransactions entry: one output of a wallet transaction, seen from one side, or the fee-only send entry of a change-only self-transfer. A payment to the wallet itself is a send and a receive entry for the same vout. Amounts are signed bits.

    A change-only self-transfer (every input is this wallet's, every output is change, as in a consolidation or a cancel paid to a change address) has no output to list without includeChange. If it pays a fee, qbit Core v1.0.1 and later list it as one fee-only send entry, the second member of the union and the transaction's only entry in the list: amountBits 0n, the fee in feeBits, and no vout, address, label or parentDescs. v1.0.0 lists nothing for it. With includeChange, each of its outputs is a send and a receive entry instead, and there is no fee-only entry. Check vout !== undefined, or a category other than send, before using an entry as an output: TypeScript then narrows it to the first member.

    Type Declaration

    • {
          address?: string;
          amountBits: bigint;
          category: WalletTxCategory;
          feeBits?: bigint;
          label?: string;
          parentDescs?: readonly string[];
          vout: number;
      }
      • Optional Readonlyaddress?: string

        Absent for an output with no address, such as OP_RETURN.

      • ReadonlyamountBits: bigint

        At most 0 for send (0 for OP_RETURN); at least 0 for every other category.

      • Readonlycategory: WalletTxCategory

        What the entry is: sent, received, or mined (by maturity).

      • Optional ReadonlyfeeBits?: bigint

        Only on send entries, and always on them. All outputs minus this wallet's inputs, repeated on each of the transaction's send entries, so do not sum it per entry. When every input is this wallet's, that is the fee, negative; with inputs from other wallets it is not the fee, and it can be positive.

      • Optional Readonlylabel?: string

        The address book label of address; '' is the default label. Absent when the address has no entry.

      • Optional ReadonlyparentDescs?: readonly string[]

        Only on entries that receive: the descriptors of the output's script. Can be empty.

      • Readonlyvout: number

        The output's index.

    • {
          address?: never;
          amountBits: bigint;
          category: "send";
          feeBits: bigint;
          label?: never;
          parentDescs?: never;
          vout?: never;
      }
      • Optional Readonlyaddress?: never

        Never present: the entry is the transaction's, not an output's.

      • ReadonlyamountBits: bigint

        Always 0n: only the fee left the wallet.

      • Readonlycategory: "send"

        Always send.

      • ReadonlyfeeBits: bigint

        The fee, in bits, negative: every input is this wallet's.

      • Optional Readonlylabel?: never

        Never present.

      • Optional ReadonlyparentDescs?: never

        Never present.

      • Optional Readonlyvout?: never

        Never present: no output of the transaction is listed.

    • Readonlyabandoned: boolean

      The wallet abandoned the transaction (its inputs can be spent again), or its coinbase was orphaned. At 0 confirmations, listSinceBlock lists it on every call until it is mined after all (it confirms, abandoned false), a conflict is mined (negative confirmations), or the orphaned block is reconnected. An entry that stops being listed may have gone either way: getTransaction tells which.

    • Readonlybip125Replaceable: "yes" | "no" | "unknown"

      Whether it or an unconfirmed ancestor signals BIP 125 replaceability; unknown for an unconfirmed transaction outside the mempool whose ancestors the wallet does not know.

    • Optional ReadonlyblockHash?: string

      The block holding the transaction. This and the next three are present exactly when confirmations is above 0.

    • Optional ReadonlyblockHeight?: number

      The height of the block holding the transaction.

    • Optional ReadonlyblockIndex?: number

      The transaction's position in that block.

    • Optional ReadonlyblockTime?: number

      That block's header time, Unix seconds, as the miner set it.

    • Optional Readonlycomment?: string

      The comment stored with the transaction, when not empty.

    • Readonlyconfirmations: number

      0 when unconfirmed. Negative when the transaction conflicted that many blocks ago.

    • Optional Readonlygenerated?: boolean

      True for a coinbase transaction.

    • ReadonlymempoolConflicts: readonly string[]

      txids of mempool transactions that conflict with this one or an ancestor.

    • Optional ReadonlyreplacedByTxid?: string

      On a replaced transaction's entries, when bumpfee replaced it; it is never cleared, so the original keeps it even if the original is the one mined. A replacement sent with sendRawTransaction (as after psbtBumpFee) sets neither this nor replacesTxid: the transactions list each other in walletConflicts (and in mempoolConflicts while in the mempool). Count an original and its replacements as one payment: the mined one once one is mined (the others then have negative confirmations), and otherwise once, as pending.

    • Optional ReadonlyreplacesTxid?: string

      On a replacement's entries, when bumpfee made it: the transaction it replaces. See replacedByTxid.

    • Readonlytime: number

      The wallet's own time for the transaction, Unix seconds. Not a block time.

    • ReadonlytimeReceived: number

      When this wallet first recorded the transaction, by the node's clock, Unix seconds.

    • Optional Readonlyto?: string

      The to comment stored with the transaction, when there is one.

    • Optional Readonlytrusted?: boolean

      Whether the wallet would spend from it. Present exactly when confirmations is 0 or negative.

    • Readonlytxid: string

      The transaction's txid.

    • ReadonlywalletConflicts: readonly string[]

      txids of wallet transactions spending the same inputs.

    • Readonlywtxid: string

      The transaction's witness txid (wtxid).