Search in sources :

Example 1 with MessageGroup

use of io.nem.symbol.sdk.openapi.okhttp_gson.model.MessageGroup in project nem2-sdk-java by nemtech.

the class FinalizationRepositoryOkHttpImplTest method createFinalizationProofDTO.

private FinalizationProofDTO createFinalizationProofDTO() {
    FinalizationProofDTO dto = new FinalizationProofDTO();
    dto.finalizationEpoch(1L);
    dto.finalizationPoint(2L);
    dto.setVersion(3);
    dto.hash("abc");
    dto.height(BigInteger.valueOf(4));
    MessageGroup messageGroup = new MessageGroup();
    messageGroup.stage(StageEnum.NUMBER_1);
    messageGroup.addHashesItem("hash1");
    messageGroup.setHeight(BigInteger.valueOf(20));
    messageGroup.addSignaturesItem(new BmTreeSignature().bottom(new ParentPublicKeySignaturePair().signature("sp").parentPublicKey("pp")).root(new ParentPublicKeySignaturePair().signature("sr").parentPublicKey("pr")));
    dto.addMessageGroupsItem(messageGroup);
    return dto;
}
Also used : BmTreeSignature(io.nem.symbol.sdk.openapi.okhttp_gson.model.BmTreeSignature) MessageGroup(io.nem.symbol.sdk.openapi.okhttp_gson.model.MessageGroup) FinalizationProofDTO(io.nem.symbol.sdk.openapi.okhttp_gson.model.FinalizationProofDTO) ParentPublicKeySignaturePair(io.nem.symbol.sdk.openapi.okhttp_gson.model.ParentPublicKeySignaturePair)

Aggregations

BmTreeSignature (io.nem.symbol.sdk.openapi.okhttp_gson.model.BmTreeSignature)1 FinalizationProofDTO (io.nem.symbol.sdk.openapi.okhttp_gson.model.FinalizationProofDTO)1 MessageGroup (io.nem.symbol.sdk.openapi.okhttp_gson.model.MessageGroup)1 ParentPublicKeySignaturePair (io.nem.symbol.sdk.openapi.okhttp_gson.model.ParentPublicKeySignaturePair)1