com.casper.sdk.model.transaction.pricing.ReservedPricingMode 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.transaction.pricing;
import com.casper.sdk.exception.NoSuchTypeException;
import com.casper.sdk.model.clvalue.serde.Target;
import com.casper.sdk.model.common.Digest;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.oak3.sbs4j.SerializerBuffer;
import dev.oak3.sbs4j.exception.ValueSerializationException;
import lombok.*;
/**
* The payment for this transaction was previously reserved, as proven by
* the receipt hash (this is for future use, not currently implemented).
*
* @author [email protected]
*/
@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter
@Builder
public class ReservedPricingMode implements PricingMode {
@JsonProperty("receipt")
private Digest receipt;
@Override
public void serialize(SerializerBuffer ser, Target target) throws ValueSerializationException, NoSuchTypeException {
ser.writeU8(getByteTag());
receipt.serialize(ser, target);
}
@Override
@JsonIgnore
public byte getByteTag() {
return RESERVED_TAG;
}
}