Search in sources :

Example 6 with NemAnnounceResult

use of com.github.rosklyar.client.transaction.domain.NemAnnounceResult in project nem-library by rosklyar.

the class TransactionClientTest method multisigCreateNamespace.

@Test
void multisigCreateNamespace() {
    NemAnnounceResult nemAnnounceResult = transactionClient.multisigCreateNamespace("2ee2a08ad2ebc1371330c9977d15e52f482aa514554e085bec5ed076e8b11581", null, "testm", "d9728f3002d6292d54aa2e5c75f1e72bb7f7b800645c46e91171935285e77747", 3600);
    assertNotNull(nemAnnounceResult.innerTransactionHash);
    assertEquals(1, nemAnnounceResult.code);
    NemAnnounceResult cosignNemAnnounceResult = transactionClient.cosignTransaction("fcf0dadc958510dca65651df81aa22c82b2bfe5b29bf8dfb92816bc5f1f11a54", nemAnnounceResult.innerTransactionHash.data, "TD4F657BT4MDBAJXMOZR37MN5T2CRXQW66MPSONE", 3600);
    assertEquals(1, cosignNemAnnounceResult.code);
}
Also used : NemAnnounceResult(com.github.rosklyar.client.transaction.domain.NemAnnounceResult) Test(org.junit.jupiter.api.Test)

Example 7 with NemAnnounceResult

use of com.github.rosklyar.client.transaction.domain.NemAnnounceResult in project nem-library by rosklyar.

the class TransactionClientTest method multisigMosaicTransfer.

@Test
void multisigMosaicTransfer() {
    MosaicTransfer mosaicTransfer = MosaicTransfer.builder().mosaicId(new MosaicId("library", "testcoin")).quantity(3000).build();
    NemAnnounceResult nemAnnounceResult = transactionClient.multisigTransferMosaics("2ee2a08ad2ebc1371330c9977d15e52f482aa514554e085bec5ed076e8b11581", "TCHCCSUCSBE2OSYXLISPYGOVLOVZYCYYI5V73K4Y", newArrayList(mosaicTransfer), 2, "test multisig", "d9728f3002d6292d54aa2e5c75f1e72bb7f7b800645c46e91171935285e77747", 3600);
    assertEquals(1, nemAnnounceResult.code);
}
Also used : MosaicTransfer(com.github.rosklyar.client.transaction.domain.mosaic.MosaicTransfer) MosaicId(com.github.rosklyar.client.transaction.domain.mosaic.MosaicId) NemAnnounceResult(com.github.rosklyar.client.transaction.domain.NemAnnounceResult) Test(org.junit.jupiter.api.Test)

Example 8 with NemAnnounceResult

use of com.github.rosklyar.client.transaction.domain.NemAnnounceResult in project nem-library by rosklyar.

the class TransactionClientTest method removeCosignatoryFromMultisigAccount.

@Test
void removeCosignatoryFromMultisigAccount() {
    NemAnnounceResult nemAnnounceResult = transactionClient.removeCosignatoriesFromMultisigAccount("2ee2a08ad2ebc1371330c9977d15e52f482aa514554e085bec5ed076e8b11581", newArrayList("caf46cc7e7c6a91c782b4a74d4c28fcf872e8a111d2662fc0d3080e1bb32b3f5"), -1, "d9728f3002d6292d54aa2e5c75f1e72bb7f7b800645c46e91171935285e77747", 3600);
    assertEquals(1, nemAnnounceResult.code);
    assertNotNull(nemAnnounceResult.innerTransactionHash.data);
    NemAnnounceResult cosigningResult = transactionClient.cosignTransaction("fcf0dadc958510dca65651df81aa22c82b2bfe5b29bf8dfb92816bc5f1f11a54", nemAnnounceResult.innerTransactionHash.data, "TD4F657BT4MDBAJXMOZR37MN5T2CRXQW66MPSONE", 3600);
    assertEquals(1, cosigningResult.code);
}
Also used : NemAnnounceResult(com.github.rosklyar.client.transaction.domain.NemAnnounceResult) Test(org.junit.jupiter.api.Test)

Example 9 with NemAnnounceResult

use of com.github.rosklyar.client.transaction.domain.NemAnnounceResult in project nem-library by rosklyar.

the class TransactionClientTest method namespaceProvision.

@Test
void namespaceProvision() {
    NemAnnounceResult nemAnnounceResult = transactionClient.createNamespace("fcf0dadc958510dca65651df81aa22c82b2bfe5b29bf8dfb92816bc5f1f11a54", null, "testlibrary", 3600);
    assertEquals(1, nemAnnounceResult.code);
    NemAnnounceResult secondNemAnnounceResult = transactionClient.createNamespace("fcf0dadc958510dca65651df81aa22c82b2bfe5b29bf8dfb92816bc5f1f11a54", "testlibrary", "innertestlibrary", 3600);
    assertEquals(1, secondNemAnnounceResult.code);
}
Also used : NemAnnounceResult(com.github.rosklyar.client.transaction.domain.NemAnnounceResult) Test(org.junit.jupiter.api.Test)

Example 10 with NemAnnounceResult

use of com.github.rosklyar.client.transaction.domain.NemAnnounceResult in project nem-library by rosklyar.

the class TransactionClientTest method multisigChangeMosaicSupply.

@Test
void multisigChangeMosaicSupply() {
    NemAnnounceResult nemAnnounceResult = transactionClient.multisigChangeMosaicSupply("2ee2a08ad2ebc1371330c9977d15e52f482aa514554e085bec5ed076e8b11581", new MosaicId("testm", "testmult"), SupplyType.INCREASE, 1000000, "d9728f3002d6292d54aa2e5c75f1e72bb7f7b800645c46e91171935285e77747", 3600);
    assertEquals(1, nemAnnounceResult.code);
    NemAnnounceResult cosignNemAnnounceResult = transactionClient.cosignTransaction("fcf0dadc958510dca65651df81aa22c82b2bfe5b29bf8dfb92816bc5f1f11a54", nemAnnounceResult.innerTransactionHash.data, "TD4F657BT4MDBAJXMOZR37MN5T2CRXQW66MPSONE", 3600);
    assertEquals(1, cosignNemAnnounceResult.code);
}
Also used : NemAnnounceResult(com.github.rosklyar.client.transaction.domain.NemAnnounceResult) MosaicId(com.github.rosklyar.client.transaction.domain.mosaic.MosaicId) Test(org.junit.jupiter.api.Test)

Aggregations

NemAnnounceResult (com.github.rosklyar.client.transaction.domain.NemAnnounceResult)18 Test (org.junit.jupiter.api.Test)15 MosaicId (com.github.rosklyar.client.transaction.domain.mosaic.MosaicId)6 Levy (com.github.rosklyar.client.mosaic.domain.Levy)4 Hash (com.github.rosklyar.client.account.domain.Hash)3 Message (com.github.rosklyar.client.account.domain.Message)3 MosaicProperty (com.github.rosklyar.client.mosaic.domain.MosaicProperty)3 NodeClient (com.github.rosklyar.client.node.NodeClient)3 TransactionType (com.github.rosklyar.client.transaction.TransactionType)3 ProvisionNamespaceTransaction (com.github.rosklyar.client.transaction.domain.ProvisionNamespaceTransaction)3 RequestAnnounce (com.github.rosklyar.client.transaction.domain.RequestAnnounce)3 Transaction (com.github.rosklyar.client.transaction.domain.Transaction)3 Action (com.github.rosklyar.client.transaction.domain.importance.Action)3 ImportanceTransferTransaction (com.github.rosklyar.client.transaction.domain.importance.ImportanceTransferTransaction)3 com.github.rosklyar.client.transaction.domain.mosaic (com.github.rosklyar.client.transaction.domain.mosaic)3 Modification (com.github.rosklyar.client.transaction.domain.multisig.Modification)3 ADD_COSIGNATORY (com.github.rosklyar.client.transaction.domain.multisig.ModificationType.ADD_COSIGNATORY)3 REMOVE_COSIGNATORY (com.github.rosklyar.client.transaction.domain.multisig.ModificationType.REMOVE_COSIGNATORY)3 MultisigTransaction (com.github.rosklyar.client.transaction.domain.multisig.MultisigTransaction)3 RelativeChange (com.github.rosklyar.client.transaction.domain.multisig.RelativeChange)3