Variable hashesConst

hashes: {
    hashAccountRoot: ((address) => string);
    hashEscrow: ((address, sequence) => string);
    hashLedger: ((ledger, options?) => string);
    hashLedgerHeader: ((ledgerHeader) => string);
    hashOfferId: ((address, sequence) => string);
    hashPaymentChannel: ((address, dstAddress, sequence) => string);
    hashSignedTx: ((tx) => string);
    hashSignerListId: ((address) => string);
    hashStateTree: ((entries) => string);
    hashTrustline: ((address1, address2, currency) => string);
    hashTx: ((txBlobHex) => string);
    hashTxTree: ((transactions) => string);
} = ...

Type declaration

  • hashAccountRoot: ((address) => string)
      • (address): string
      • Compute AccountRoot Ledger Object Index.

        All objects in a ledger's state tree have a unique Index. The AccountRoot Ledger Object Index is derived by hashing the address with a namespace identifier. This ensures every Index is unique.

        See Ledger Object Indexes.

        Parameters

        • address: string

          The classic account address.

        Returns string

        The Ledger Object Index for the account.

  • hashEscrow: ((address, sequence) => string)
      • (address, sequence): string
      • Compute the Hash of an Escrow LedgerEntry.

        Parameters

        • address: string

          Address of the Escrow.

        • sequence: number

          OfferSequence of the Escrow.

        Returns string

        The hash of the Escrow LedgerEntry.

  • hashLedger: ((ledger, options?) => string)
      • (ledger, options?): string
      • Compute the hash of a ledger.

        Parameters

        • ledger: Ledger

          Ledger to compute the hash for.

        • options: {
              computeTreeHashes?: boolean;
          } = {}

          Allow client to recompute Transaction and State Hashes.

          • Optional computeTreeHashes?: boolean

            Whether to recompute the Transaction and State Hashes.

        Returns string

        The has of ledger.

  • hashLedgerHeader: ((ledgerHeader) => string)
      • (ledgerHeader): string
      • Compute the hash of a ledger.

        Parameters

        • ledgerHeader: Ledger

          Ledger to compute the hash of.

        Returns string

        The hash of the ledger.

  • hashOfferId: ((address, sequence) => string)
      • (address, sequence): string
      • Offer Index Format.

        The Index of a Offer object is the SHA-512Half of the following values, concatenated in order:

        • The Offer space key (0x006F)
        • The AccountID of the account placing the offer
        • The Sequence number of the OfferCreate transaction that created the offer.

        This method computes an Offer Index.

        Parameters

        • address: string

          The classic account address of the SignerList owner (starting with r).

        • sequence: number

          Sequence of the Offer.

        Returns string

        The Index of the account's Offer object.

  • hashPaymentChannel: ((address, dstAddress, sequence) => string)
      • (address, dstAddress, sequence): string
      • Compute the hash of a Payment Channel.

        Parameters

        • address: string

          Account of the Payment Channel.

        • dstAddress: string

          Destination Account of the Payment Channel.

        • sequence: number

          Sequence number of the Transaction that created the Payment Channel.

        Returns string

        Hash of the Payment Channel.

  • hashSignedTx: ((tx) => string)
      • (tx): string
      • Hashes the Transaction object as the ledger does. Throws if the transaction is unsigned.

        Parameters

        • tx: string | Transaction

          A transaction to hash. Tx may be in binary blob form. Tx must be signed.

        Returns string

        A hash of tx.

        Throws

        ValidationError if the Transaction is unsigned.\

  • hashSignerListId: ((address) => string)
      • (address): string
      • SignerList Index Format.

        The Index of a SignerList object is the SHA-512Half of the following values, concatenated in order:

        • The RippleState space key (0x0053)
        • The AccountID of the owner of the SignerList
        • The SignerListID (currently always 0).

        This method computes a SignerList Ledger Object Index.

        Parameters

        • address: string

          The classic account address of the SignerList owner (starting with r).

        Returns string

        The Index of the account's SignerList object.

  • hashStateTree: ((entries) => string)
      • (entries): string
      • Compute the state hash of a list of LedgerEntries.

        Parameters

        Returns string

        Hash of SHAMap that consists of all entries.

  • hashTrustline: ((address1, address2, currency) => string)
      • (address1, address2, currency): string
      • Compute the hash of a Trustline.

        Parameters

        • address1: string

          One of the addresses in the Trustline.

        • address2: string

          The other address in the Trustline.

        • currency: string

          Currency in the Trustline.

        Returns string

        The hash of the Trustline.

  • hashTx: ((txBlobHex) => string)
      • (txBlobHex): string
      • Hash the given binary transaction data with the single-signing prefix.

        See Serialization Format.

        Parameters

        • txBlobHex: string

          The binary transaction blob as a hexadecimal string.

        Returns string

        The hash to sign.

  • hashTxTree: ((transactions) => string)
      • (transactions): string
      • Compute the root hash of the SHAMap containing all transactions.

        Parameters

        • transactions: Object[]

          List of Transactions.

        Returns string

        The root hash of the SHAMap.

Generated using TypeDoc