Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ProofResponse

Proof of transaction in a block.

Hierarchy

Index

Constructors

  • new ProofResponse(__namedParameters: { hashtype?: string; idx: number | bigint; proof: string | Uint8Array; stibhash: string | Uint8Array; treedepth: number | bigint }): ProofResponse
  • Creates a new ProofResponse object.

    Parameters

    • __namedParameters: { hashtype?: string; idx: number | bigint; proof: string | Uint8Array; stibhash: string | Uint8Array; treedepth: number | bigint }
      • Optional hashtype?: string
      • idx: number | bigint
      • proof: string | Uint8Array
      • stibhash: string | Uint8Array
      • treedepth: number | bigint

    Returns ProofResponse

Properties

attribute_map: Record<string, string>
hashtype?: string

The type of hash function used to create the proof, must be one of:

  • sha512_256
  • sha256
idx: number | bigint

Index of the transaction in the block's payset.

proof: Uint8Array

Merkle proof of transaction membership.

stibhash: Uint8Array

Hash of SignedTxnInBlock for verifying proof.

treedepth: number | bigint

Represents the depth of the tree that is being proven, i.e. the number of edges from a leaf to the root.

Methods

  • get_obj_for_encoding(binary?: boolean): Record<string, any>
  • Get an object ready for encoding to either JSON or msgpack.

    Parameters

    • binary: boolean = false

      Use true to indicate that the encoding can handle raw binary objects (Uint8Arrays). Use false to indicate that raw binary objects should be converted to base64 strings. True should be used for objects that will be encoded with msgpack, and false should be used for objects that will be encoded with JSON.

    Returns Record<string, any>

Generated using TypeDoc