Memo

Memo

new Memo(type, value)

Memo represents memos attached to transactions.

Source:
See:
Parameters:
Name Type Description
type string

MemoNone, MemoID, MemoText, MemoHash or MemoReturn

value *

string for MemoID, MemoText, buffer of hex string for MemoHash or MemoReturn

Members

type

Contains memo type: MemoNone, MemoID, MemoText, MemoHash or MemoReturn

Source:

value

Contains memo value:

  • null for MemoNone,
  • string for MemoID,
  • Buffer for MemoText after decoding using fromXDRObject, original value otherwise,
  • Buffer for MemoHash, MemoReturn.
Source:

Methods

toXDRObject() → {xdr.Memo}

Returns XDR memo object.

Source:
Returns:
Type:
xdr.Memo

(static) fromXDRObject(object) → {Memo}

Returns Memo from XDR memo object.

Source:
Parameters:
Name Type Description
object xdr.Memo

XDR memo object

Returns:
Type:
Memo

(static) hash(hash) → {Memo}

Creates and returns a MemoHash memo.

Source:
Parameters:
Name Type Description
hash array | string

32 byte hash or hex encoded string

Returns:
Type:
Memo

(static) id(id) → {Memo}

Creates and returns a MemoID memo.

Source:
Parameters:
Name Type Description
id string

64-bit number represented as a string

Returns:
Type:
Memo

(static) none() → {Memo}

Returns an empty memo (MemoNone).

Source:
Returns:
Type:
Memo

(static) return(hash) → {Memo}

Creates and returns a MemoReturn memo.

Source:
Parameters:
Name Type Description
hash array | string

32 byte hash or hex encoded string

Returns:
Type:
Memo

(static) text(text) → {Memo}

Creates and returns a MemoText memo.

Source:
Parameters:
Name Type Description
text string

memo text

Returns:
Type:
Memo