Search in sources :

Example 1 with MosaicProperties

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

the class TransactionClientTest method createMosaic.

@Test
void createMosaic() {
    Levy levy = Levy.builder().fee(1000).mosaicId(new MosaicId("library", "testcoin")).recipient("TCHCCSUCSBE2OSYXLISPYGOVLOVZYCYYI5V73K4Y").type(ABSOLUTE.type).build();
    MosaicProperties mosaicProperties = MosaicProperties.builder().divisibility(6).initialSupply(1000000).supplyMutable(true).transferable(true).build();
    NemAnnounceResult nemAnnounceResult = transactionClient.createMosaic("fcf0dadc958510dca65651df81aa22c82b2bfe5b29bf8dfb92816bc5f1f11a54", new MosaicId("library", "somecoin1"), "test mosaic", mosaicProperties, levy, 3600);
    assertEquals(1, nemAnnounceResult.code);
}
Also used : MosaicId(com.github.rosklyar.client.transaction.domain.mosaic.MosaicId) NemAnnounceResult(com.github.rosklyar.client.transaction.domain.NemAnnounceResult) Levy(com.github.rosklyar.client.mosaic.domain.Levy) MosaicProperties(com.github.rosklyar.client.transaction.domain.mosaic.MosaicProperties) Test(org.junit.jupiter.api.Test)

Example 2 with MosaicProperties

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

the class TransactionClientTest method multisigCreateMosaic.

@Test
void multisigCreateMosaic() {
    MosaicProperties mosaicProperties = MosaicProperties.builder().divisibility(6).initialSupply(1000000).supplyMutable(true).transferable(true).build();
    NemAnnounceResult nemAnnounceResult = transactionClient.multisigCreateMosaic("2ee2a08ad2ebc1371330c9977d15e52f482aa514554e085bec5ed076e8b11581", new MosaicId("testm", "testmult"), "test multisig mosaic creation", mosaicProperties, null, "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) MosaicId(com.github.rosklyar.client.transaction.domain.mosaic.MosaicId) MosaicProperties(com.github.rosklyar.client.transaction.domain.mosaic.MosaicProperties) Test(org.junit.jupiter.api.Test)

Aggregations

NemAnnounceResult (com.github.rosklyar.client.transaction.domain.NemAnnounceResult)2 MosaicId (com.github.rosklyar.client.transaction.domain.mosaic.MosaicId)2 MosaicProperties (com.github.rosklyar.client.transaction.domain.mosaic.MosaicProperties)2 Test (org.junit.jupiter.api.Test)2 Levy (com.github.rosklyar.client.mosaic.domain.Levy)1