Package org.stellar.sdk
Class Memo
java.lang.Object
org.stellar.sdk.Memo
- Direct Known Subclasses:
MemoHash
,MemoId
,MemoNone
,MemoReturnHash
,MemoText
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:
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.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
static Memo
static MemoHash
hash
(byte[] bytes) Creates newMemoHash
instance from byte array.static MemoHash
Creates newMemoHash
instance from hex-encoded stringstatic MemoId
Creates newMemoId
instance.static MemoId
id
(BigInteger id) Creates newMemoId
instance.static MemoNone
none()
Creates new MemoNone instance.static MemoReturnHash
returnHash
(byte[] bytes) Creates newMemoReturnHash
instance from byte array.static MemoReturnHash
returnHash
(String hexString) Creates newMemoReturnHash
instance from hex-encoded string.static MemoText
text
(byte[] text) Creates newMemoText
instance.static MemoText
Creates newMemoText
instance.
-
Constructor Details
-
Memo
public Memo()
-
-
Method Details
-
none
Creates new MemoNone instance. -
text
Creates newMemoText
instance.- Parameters:
text
- Memo text.
-
text
Creates newMemoText
instance.- Parameters:
text
- Memo text as bytes.
-
id
Creates newMemoId
instance.- Parameters:
id
- Memo id.
-
id
Creates newMemoId
instance.- Parameters:
id
- Memo id.
-
hash
Creates newMemoHash
instance from byte array.- Parameters:
bytes
- Memo hash bytes.
-
hash
Creates newMemoHash
instance from hex-encoded string- Parameters:
hexString
- Memo hash hex-encoded string
-
returnHash
Creates newMemoReturnHash
instance from byte array.- Parameters:
bytes
- Memo return hash bytes.
-
returnHash
Creates newMemoReturnHash
instance from hex-encoded string.- Parameters:
hexString
- Memo return hash hex-encoded string.
-
fromXdr
-
equals
-