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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanstatic Memostatic MemoHashhash(byte[] bytes) Creates newMemoHashinstance from byte array.static MemoHashCreates newMemoHashinstance from hex-encoded stringstatic MemoIdCreates newMemoIdinstance.static MemoIdid(BigInteger id) Creates newMemoIdinstance.static MemoNonenone()Creates new MemoNone instance.static MemoReturnHashreturnHash(byte[] bytes) Creates newMemoReturnHashinstance from byte array.static MemoReturnHashreturnHash(String hexString) Creates newMemoReturnHashinstance from hex-encoded string.static MemoTexttext(byte[] text) Creates newMemoTextinstance.static MemoTextCreates newMemoTextinstance.
-
Constructor Details
-
Memo
public Memo()
-
-
Method Details
-
none
Creates new MemoNone instance. -
text
Creates newMemoTextinstance.- Parameters:
text- Memo text.
-
text
Creates newMemoTextinstance.- Parameters:
text- Memo text as bytes.
-
id
Creates newMemoIdinstance.- Parameters:
id- Memo id.
-
id
Creates newMemoIdinstance.- Parameters:
id- Memo id.
-
hash
Creates newMemoHashinstance from byte array.- Parameters:
bytes- Memo hash bytes.
-
hash
Creates newMemoHashinstance from hex-encoded string- Parameters:
hexString- Memo hash hex-encoded string
-
returnHash
Creates newMemoReturnHashinstance from byte array.- Parameters:
bytes- Memo return hash bytes.
-
returnHash
Creates newMemoReturnHashinstance from hex-encoded string.- Parameters:
hexString- Memo return hash hex-encoded string.
-
fromXdr
-
equals
-