Interface TransactionMessage
-
public interface TransactionMessageAn Exonum transaction message.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classTransactionMessage.BuilderBuilder for the binary transaction message.
-
Field Summary
Fields Modifier and Type Field Description static intAUTHOR_PUBLIC_KEY_OFFSETstatic intAUTHOR_PUBLIC_KEY_SIZEstatic intCLS_OFFSETstatic intMIN_MESSAGE_SIZEstatic intPAYLOAD_OFFSETstatic intSERVICE_ID_OFFSETstatic intSIGNATURE_SIZEstatic intTAG_OFFSETstatic intTRANSACTION_ID_OFFSET
-
Method Summary
Modifier and Type Method Description static TransactionMessage.Builderbuilder()Creates a new builder for the transaction message.static TransactionMessagefromBuffer(ByteBuffer buffer)Creates the transaction message from the given bytes buffer.static TransactionMessagefromBytes(byte[] bytes)Creates the transaction message from the given bytes array.PublicKeygetAuthor()Returns a public key of the author of the transaction message.byte[]getPayload()Returns the payload containing the serialized transaction parameters.shortgetServiceId()Returns the identifier of the service this message belongs to.byte[]getSignature()Returns the Ed25519 signature over this binary message.shortgetTransactionId()Returns the transaction type identifier which is unique within the service.HashCodehash()Returns the SHA-256 hash of the binary message representation.intsize()Returns the transaction message size in bytes.byte[]toBytes()Returns the transaction message in binary format.
-
-
-
Field Detail
-
AUTHOR_PUBLIC_KEY_OFFSET
static final int AUTHOR_PUBLIC_KEY_OFFSET
- See Also:
- Constant Field Values
-
CLS_OFFSET
static final int CLS_OFFSET
- See Also:
- Constant Field Values
-
TAG_OFFSET
static final int TAG_OFFSET
- See Also:
- Constant Field Values
-
SERVICE_ID_OFFSET
static final int SERVICE_ID_OFFSET
- See Also:
- Constant Field Values
-
TRANSACTION_ID_OFFSET
static final int TRANSACTION_ID_OFFSET
- See Also:
- Constant Field Values
-
PAYLOAD_OFFSET
static final int PAYLOAD_OFFSET
- See Also:
- Constant Field Values
-
AUTHOR_PUBLIC_KEY_SIZE
static final int AUTHOR_PUBLIC_KEY_SIZE
- See Also:
- Constant Field Values
-
SIGNATURE_SIZE
static final int SIGNATURE_SIZE
- See Also:
- Constant Field Values
-
MIN_MESSAGE_SIZE
static final int MIN_MESSAGE_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAuthor
PublicKey getAuthor()
Returns a public key of the author of the transaction message.
-
getServiceId
short getServiceId()
Returns the identifier of the service this message belongs to.
-
getTransactionId
short getTransactionId()
Returns the transaction type identifier which is unique within the service.
-
getPayload
byte[] getPayload()
Returns the payload containing the serialized transaction parameters.
-
hash
HashCode hash()
Returns the SHA-256 hash of the binary message representation.
-
getSignature
byte[] getSignature()
Returns the Ed25519 signature over this binary message.The signature is not guaranteed to be valid and must be verified against the signer’s public key.
- See Also:
CryptoFunctions.ed25519()
-
toBytes
byte[] toBytes()
Returns the transaction message in binary format.
-
size
int size()
Returns the transaction message size in bytes.
-
builder
static TransactionMessage.Builder builder()
Creates a new builder for the transaction message.
-
fromBytes
static TransactionMessage fromBytes(byte[] bytes)
Creates the transaction message from the given bytes array.
-
fromBuffer
static TransactionMessage fromBuffer(ByteBuffer buffer)
Creates the transaction message from the given bytes buffer.
-
-