Memo
The memo contains optional extra information. It is the responsibility of the client to interpret this value.
Memos can be one of the following types:
MemoNone: Empty memo (no additional information)
MemoText: A string up to 28-bytes long
MemoId: A 64 bit unsigned integer
MemoHash: A 32 byte hash
MemoReturn: A 32 byte hash intended to be interpreted as the hash of the transaction the sender is refunding
Usage
// No memo
val memo1 = MemoNone
// Text memo (max 28 bytes)
val memo2 = MemoText("Hello Stellar")
// ID memo
val memo3 = MemoId(123456789UL)
// Hash memo (from hex string)
val memo4 = MemoHash("e98869bba8bce08c10b78406202127f3888c25454cd37b02600862452751f526")
// Hash memo (from bytes)
val hash = ByteArray(32) { it.toByte() }
val memo5 = MemoHash(hash)
// Return hash memo
val memo6 = MemoReturn("e98869bba8bce08c10b78406202127f3888c25454cd37b02600862452751f526")Content copied to clipboard