Search in sources :

Example 1 with MosaicId

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

the class TransactionClientTest method makeMosaicTransfer.

@Test
void makeMosaicTransfer() {
    MosaicTransfer mosaicTransfer = MosaicTransfer.builder().mosaicId(new MosaicId("library", "testcoin")).quantity(3000).build();
    NemAnnounceResult nemAnnounceResult = transactionClient.transferMosaics("fcf0dadc958510dca65651df81aa22c82b2bfe5b29bf8dfb92816bc5f1f11a54", "TDIOE7BZR4J3DXNJ4SL6WOE4HM3QUI3PVUWW3YI3", newArrayList(mosaicTransfer), 2, "test mosaic", 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 2 with MosaicId

use of com.github.rosklyar.client.transaction.domain.mosaic.MosaicId 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 3 with MosaicId

use of com.github.rosklyar.client.transaction.domain.mosaic.MosaicId 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)

Example 4 with MosaicId

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

the class AccountClientTest method getOwnedMosaics.

@Test
void getOwnedMosaics() {
    List<OwnedMosaic> expectedOwnedMosaics = new ArrayList<>();
    expectedOwnedMosaics.add(new OwnedMosaic(new MosaicId("nem", "xem"), 13000000));
    OwnedMosaicsResponse ownedMosaicsResponse = accountClient.ownedMosaics(address);
    assertEquals(expectedOwnedMosaics, ownedMosaicsResponse.data);
}
Also used : OwnedMosaic(com.github.rosklyar.client.account.domain.mosaic.OwnedMosaic) MosaicId(com.github.rosklyar.client.transaction.domain.mosaic.MosaicId) ArrayList(java.util.ArrayList) OwnedMosaicsResponse(com.github.rosklyar.client.account.domain.mosaic.OwnedMosaicsResponse) Test(org.junit.jupiter.api.Test)

Example 5 with MosaicId

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

the class TransactionClientTest method changeMosaicSupply.

@Test
void changeMosaicSupply() {
    NemAnnounceResult nemAnnounceResult = transactionClient.changeMosaicSupply("fcf0dadc958510dca65651df81aa22c82b2bfe5b29bf8dfb92816bc5f1f11a54", new MosaicId("library", "somecoin1"), SupplyType.INCREASE, 1000000, 3600);
    assertEquals(1, nemAnnounceResult.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

MosaicId (com.github.rosklyar.client.transaction.domain.mosaic.MosaicId)7 Test (org.junit.jupiter.api.Test)7 NemAnnounceResult (com.github.rosklyar.client.transaction.domain.NemAnnounceResult)6 MosaicProperties (com.github.rosklyar.client.transaction.domain.mosaic.MosaicProperties)2 MosaicTransfer (com.github.rosklyar.client.transaction.domain.mosaic.MosaicTransfer)2 OwnedMosaic (com.github.rosklyar.client.account.domain.mosaic.OwnedMosaic)1 OwnedMosaicsResponse (com.github.rosklyar.client.account.domain.mosaic.OwnedMosaicsResponse)1 Levy (com.github.rosklyar.client.mosaic.domain.Levy)1 ArrayList (java.util.ArrayList)1