Search in sources :

Example 1 with AccountRestrictionsInfoBuilder

use of io.nem.symbol.catapult.builders.AccountRestrictionsInfoBuilder in project nem2-sdk-java by nemtech.

the class AccountRestrictions method serialize.

/**
 * @return serializes the state of this object.
 */
public byte[] serialize() {
    AddressDto address = SerializationUtils.toAddressDto(getAddress());
    List<AccountRestrictionsInfoBuilder> restrictions = getRestrictions().stream().map(this::toAccountRestrictionsInfoBuilder).collect(Collectors.toList());
    return AccountRestrictionsBuilder.create((short) getVersion(), address, restrictions).serialize();
}
Also used : AccountRestrictionsInfoBuilder(io.nem.symbol.catapult.builders.AccountRestrictionsInfoBuilder) AddressDto(io.nem.symbol.catapult.builders.AddressDto)

Aggregations

AccountRestrictionsInfoBuilder (io.nem.symbol.catapult.builders.AccountRestrictionsInfoBuilder)1 AddressDto (io.nem.symbol.catapult.builders.AddressDto)1