Variable hashesConst

hashes: {
    hashAccountRoot: ((address: string) => string);
    hashEscrow: ((address: string, sequence: number) => string);
    hashLedger: ((ledger: Ledger, options?: {
        computeTreeHashes?: boolean;
    }) => string);
    hashLedgerHeader: ((ledgerHeader: Ledger) => string);
    hashOfferId: ((address: string, sequence: number) => string);
    hashPaymentChannel: ((address: string, dstAddress: string, sequence: number) => string);
    hashSignedTx: ((tx: string | Transaction) => string);
    hashSignerListId: ((address: string) => string);
    hashStateTree: ((entries: LedgerEntry[]) => string);
    hashTrustline: ((address1: string, address2: string, currency: string) => string);
    hashTx: ((txBlobHex: string) => string);
    hashTxTree: ((transactions: Object[]) => string);
} = ...

Type declaration

  • hashAccountRoot: ((address: string) => string)
      • (address: string): 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.

        Returns

        The Ledger Object Index for the account.

        Parameters

        • address: string

          The classic account address.

        Returns string

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

        Returns

        The hash of the Escrow LedgerEntry.

        Parameters

        • address: string

          Address of the Escrow.

        • sequence: number

          OfferSequence of the Escrow.

        Returns string

  • hashLedger: ((ledger: Ledger, options?: {
        computeTreeHashes?: boolean;
    }) => string)
      • (ledger: Ledger, options?: {
            computeTreeHashes?: boolean;
        }): string
      • Compute the hash of a ledger.

        Returns

        The has of 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

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

        Returns

        The hash of the ledger.

        Parameters

        • ledgerHeader: Ledger

          Ledger to compute the hash of.

        Returns string

  • hashOfferId: ((address: string, sequence: number) => string)
      • (address: string, sequence: number): 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.

        Returns

        The Index of the account's Offer object.

        Parameters

        • address: string

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

        • sequence: number

          Sequence of the Offer.

        Returns string

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

        Returns

        Hash of the 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

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

        Returns

        A hash of tx.

        Throws

        ValidationError 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

  • hashSignerListId: ((address: string) => string)
      • (address: string): 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.

        Returns

        The Index of the account's SignerList object.

        Parameters

        • address: string

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

        Returns string

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

        Returns

        Hash of SHAMap that consists of all entries.

        Parameters

        Returns string

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

        Returns

        The hash of the 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

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

        See Serialization Format.

        Returns

        The hash to sign.

        Parameters

        • txBlobHex: string

          The binary transaction blob as a hexadecimal string.

        Returns string

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

        Returns

        The root hash of the SHAMap.

        Parameters

        • transactions: Object[]

          List of Transactions.

        Returns string

Generated using TypeDoc