Search in sources :

Example 1 with StateProofService

use of io.nem.symbol.sdk.api.StateProofService in project nem2-sdk-java by nemtech.

the class AAASetupIntegrationTest method createMultisigAccountBondedUsingNemesis.

@Test
@Order(7)
void createMultisigAccountBondedUsingNemesis() {
    Account multisig = config().getNemesisAccount8();
    RepositoryFactory repositoryFactory = getRepositoryFactory(DEFAULT_REPOSITORY_TYPE);
    MultisigAccountInfo info = helper().createMultisigAccountBonded(type, multisig, config().getNemesisAccount9(), config().getNemesisAccount10());
    StateProofService service = new StateProofServiceImpl(repositoryFactory);
    StateMerkleProof<MultisigAccountInfo> proof = get(service.multisig(info));
    Assertions.assertTrue(proof.isValid());
}
Also used : Account(io.nem.symbol.sdk.model.account.Account) StateProofService(io.nem.symbol.sdk.api.StateProofService) MultisigAccountInfo(io.nem.symbol.sdk.model.account.MultisigAccountInfo) RepositoryFactory(io.nem.symbol.sdk.api.RepositoryFactory) TestMethodOrder(org.junit.jupiter.api.TestMethodOrder) Order(org.junit.jupiter.api.Order) Test(org.junit.jupiter.api.Test)

Example 2 with StateProofService

use of io.nem.symbol.sdk.api.StateProofService in project nem2-sdk-java by nemtech.

the class AAASetupIntegrationTest method createMultisigAccountCompleteUsingNemesis.

@Test
@Order(6)
void createMultisigAccountCompleteUsingNemesis() {
    Account multisig = config().getNemesisAccount8();
    System.out.println(multisig.getAddress().plain());
    RepositoryFactory repositoryFactory = getRepositoryFactory(DEFAULT_REPOSITORY_TYPE);
    MultisigAccountInfo info = helper().createMultisigAccountComplete(type, multisig, config().getNemesisAccount9(), config().getNemesisAccount10());
    StateProofService service = new StateProofServiceImpl(repositoryFactory);
    StateMerkleProof<MultisigAccountInfo> proof = get(service.multisig(info));
    Assertions.assertTrue(proof.isValid());
}
Also used : Account(io.nem.symbol.sdk.model.account.Account) StateProofService(io.nem.symbol.sdk.api.StateProofService) MultisigAccountInfo(io.nem.symbol.sdk.model.account.MultisigAccountInfo) RepositoryFactory(io.nem.symbol.sdk.api.RepositoryFactory) TestMethodOrder(org.junit.jupiter.api.TestMethodOrder) Order(org.junit.jupiter.api.Order) Test(org.junit.jupiter.api.Test)

Aggregations

RepositoryFactory (io.nem.symbol.sdk.api.RepositoryFactory)2 StateProofService (io.nem.symbol.sdk.api.StateProofService)2 Account (io.nem.symbol.sdk.model.account.Account)2 MultisigAccountInfo (io.nem.symbol.sdk.model.account.MultisigAccountInfo)2 Order (org.junit.jupiter.api.Order)2 Test (org.junit.jupiter.api.Test)2 TestMethodOrder (org.junit.jupiter.api.TestMethodOrder)2