Search in sources :

Example 1 with VotingKeyDto

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

the class AccountInfo method toPinnedVotingKeyBuilder.

private PinnedVotingKeyBuilder toPinnedVotingKeyBuilder(AccountLinkVotingKey accountLinkVotingKey) {
    VotingKeyDto votingKey = SerializationUtils.toVotingKeyDto(accountLinkVotingKey.getPublicKey());
    FinalizationEpochDto startEpoch = new FinalizationEpochDto((int) accountLinkVotingKey.getStartEpoch());
    FinalizationEpochDto endEpoch = new FinalizationEpochDto((int) accountLinkVotingKey.getEndEpoch());
    return PinnedVotingKeyBuilder.create(votingKey, startEpoch, endEpoch);
}
Also used : VotingKeyDto(io.nem.symbol.catapult.builders.VotingKeyDto) FinalizationEpochDto(io.nem.symbol.catapult.builders.FinalizationEpochDto)

Aggregations

FinalizationEpochDto (io.nem.symbol.catapult.builders.FinalizationEpochDto)1 VotingKeyDto (io.nem.symbol.catapult.builders.VotingKeyDto)1