com.casper.sdk.model.event.transaction.BytesMessagePayload Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of casper-java-sdk Show documentation
Show all versions of casper-java-sdk Show documentation
SDK to streamline the 3rd party Java client integration processes. Such 3rd parties include exchanges & app developers.
The newest version!
package com.casper.sdk.model.event.transaction;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.syntifi.crypto.key.encdec.Hex;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
/**
* Message represented as raw bytes.
*
* @author [email protected]
*/
@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter
@JsonTypeName("Bytes")
public class BytesMessagePayload implements MessagePayload {
@JsonValue
private byte[] message;
@JsonCreator
public BytesMessagePayload(final String message) {
this.message = Hex.decode(message);
}
}