All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.casper.sdk.model.event.transaction.BytesMessagePayload Maven / Gradle / Ivy

Go to download

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);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy