Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SecretMemo

Utility to create secret Stellar memos.

Hierarchy

  • SecretMemo

Index

Constructors

Properties

Methods

Constructors

constructor

  • Parameters

    • secretKey: string

      The secret used to encrypt/decrypt the secret memo. Whoever knows the secret key will be able to read any memos created with this tool.

    Returns SecretMemo

Properties

Private cryptr

cryptr: Cryptr

Methods

fromMemo

  • fromMemo(memo: Memo): string
  • Returns the original text from a secret Stellar Memo.

    Parameters

    • memo: Memo

      The Stellar Memo that contains the secret memo hash.

    Returns string

fromMemoHash

  • fromMemoHash(memoHash: string): string
  • Takes a secret memo hash and returns the original memo data.

    Parameters

    • memoHash: string

      The encrypted memo hash, a 64 hex-character string.

    Returns string

toMemo

  • toMemo(data: string): Memo
  • Takes a string and turns it into a secret Stellar Memo. The string will be padded with random bytes and encrypted so that running it multiple times will produce different results each time.

    Because of the additional randomization added to the memo, the data to keep secret must be 23 characters or less.

    Parameters

    • data: string

      The data to secretize, like a user id or email.

    Returns Memo

Generated using TypeDoc