public abstract class Memo
extends java.lang.Object
MEMO_NONE
: Empty memo.
MEMO_TEXT
: A string up to 28-bytes long.
MEMO_ID
: A 64 bit unsigned integer.
MEMO_HASH
: A 32 byte hash.
MEMO_RETURN
: A 32 byte hash intended to be interpreted as the hash of the
transaction the sender is refunding.
Use static methods to generate any of above types.
Transaction
Constructor and Description |
---|
Memo() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
equals(java.lang.Object o) |
static Memo |
fromXdr(Memo memo) |
static MemoHash |
hash(byte[] bytes)
Creates new
MemoHash instance from byte array. |
static MemoHash |
hash(java.lang.String hexString)
Creates new
MemoHash instance from hex-encoded string |
static MemoId |
id(java.math.BigInteger id)
Creates new
MemoId instance. |
static MemoId |
id(java.lang.Long id)
Creates new
MemoId instance. |
static MemoNone |
none()
Creates new MemoNone instance.
|
static MemoReturnHash |
returnHash(byte[] bytes)
Creates new
MemoReturnHash instance from byte array. |
static MemoReturnHash |
returnHash(java.lang.String hexString)
Creates new
MemoReturnHash instance from hex-encoded string. |
static MemoText |
text(byte[] text)
Creates new
MemoText instance. |
static MemoText |
text(java.lang.String text)
Creates new
MemoText instance. |
public static MemoNone none()
public static MemoText text(java.lang.String text)
MemoText
instance.text
- Memo text.public static MemoText text(byte[] text)
MemoText
instance.text
- Memo text as bytes.public static MemoId id(java.math.BigInteger id)
MemoId
instance.id
- Memo id.public static MemoId id(java.lang.Long id)
MemoId
instance.id
- Memo id.public static MemoHash hash(byte[] bytes)
MemoHash
instance from byte array.bytes
- Memo hash bytes.public static MemoHash hash(java.lang.String hexString)
MemoHash
instance from hex-encoded stringhexString
- Memo hash hex-encoded stringpublic static MemoReturnHash returnHash(byte[] bytes)
MemoReturnHash
instance from byte array.bytes
- Memo return hash bytes.public static MemoReturnHash returnHash(java.lang.String hexString)
MemoReturnHash
instance from hex-encoded string.hexString
- Memo return hash hex-encoded string.public abstract boolean equals(java.lang.Object o)
equals
in class java.lang.Object