Class

Memo

Memo(type, value)

Constructor

# new Memo(type, value)

Memo represents memos attached to transactions.

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

See:

View Source js-stellar-base/src/memo.js, line 26

Members

# type

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

View Source js-stellar-base/src/memo.js, line 64

# value

Contains memo value:

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

View Source js-stellar-base/src/memo.js, line 79

Methods

# toXDRObject() → {xdr.Memo}

Returns XDR memo object.

View Source js-stellar-base/src/memo.js, line 203

xdr.Memo

# static fromXDRObject(object) → {Memo}

Returns Memo from XDR memo object.

Parameters:
Name Type Description
object xdr.Memo

XDR memo object

View Source js-stellar-base/src/memo.js, line 225

Memo

# static hash(hash) → {Memo}

Creates and returns a MemoHash memo.

Parameters:
Name Type Description
hash array | string

32 byte hash or hex encoded string

View Source js-stellar-base/src/memo.js, line 186

Memo

# static id(id) → {Memo}

Creates and returns a MemoID memo.

Parameters:
Name Type Description
id string

64-bit number represented as a string

View Source js-stellar-base/src/memo.js, line 177

Memo

# static none() → {Memo}

Returns an empty memo (MemoNone).

View Source js-stellar-base/src/memo.js, line 159

Memo

# static return(hash) → {Memo}

Creates and returns a MemoReturn memo.

Parameters:
Name Type Description
hash array | string

32 byte hash or hex encoded string

View Source js-stellar-base/src/memo.js, line 195

Memo

# static text(text) → {Memo}

Creates and returns a MemoText memo.

Parameters:
Name Type Description
text string

memo text

View Source js-stellar-base/src/memo.js, line 168

Memo