use of io.nem.symbol.catapult.builders.MosaicBuilder in project nem2-sdk-java by nemtech.
the class InflationReceipt method serialize.
/**
* Serialize receipt and returns receipt bytes
*
* @return receipt bytes
*/
@Override
public byte[] serialize() {
short version = (short) getVersion().getValue();
ReceiptTypeDto type = ReceiptTypeDto.rawValueOf((short) getType().getValue());
MosaicBuilder mosaic = MosaicBuilder.create(new MosaicIdDto(getMosaicId().getIdAsLong()), SerializationUtils.toAmount(getAmount()));
return InflationReceiptBuilder.create(version, type, mosaic).serialize();
}
Aggregations