use of io.vertx.core.json.JsonObject in project nem2-sdk-java by nemtech.
the class TransactionMappingTest method shouldCreateStandaloneSecretLockTransaction.
@Test
void shouldCreateStandaloneSecretLockTransaction() throws Exception {
JsonObject secretLockTransactionDTO = new JsonObject("{\"meta\": {\"height\": [22211,0],\"hash\": \"B802E29269DC8DF68B63D8C802092D51854C42253E6F8083AE3304C17C0BEAF3\",\"merkleComponentHash\": \"B802E29269DC8DF68B63D8C802092D51854C42253E6F8083AE3304C17C0BEAF3\",\"index\": 0,\"id\": \"5A86FDCE5F8AE10001776BCF\"},\"transaction\": {\"signature\": \"9D66CA66BE5D02775A6ACD8913DC39D422FD60D36F1E67CEDE8B8615AD3258B2B1C9DBABA13208F571F2DD10C70B76DB6963E9BA237AC5281C2E2549B1F2D602\",\"signer\": \"846B4439154579A5903B1459C9CF69CB8153F6D0110A7A0ED61DE29AE4810BF2\",\"version\": 36867,\"type\": 16972,\"fee\": [0,0],\"deadline\": [3496454111,13],\"duration\": [100,0],\"mosaicId\": [3646934825,3576016193],\"amount\": [10000000,0],\"hashAlgorithm\": 0,\"secret\": \"428A9DEB1DC6B938AD7C83617E4A558D5316489ADE176AE0C821568A2AD6F700470901532716F83D43F2A7240FBB2C34BDD9536BCF6CC7601904782C385CD8B4\",\"recipient\": \"90C9B099BAEBB743A4D2D8D3B1520F6DD0A0E9D6C9D968C155\"}}");
Transaction secretLockTransaction = new TransactionMapping().apply(secretLockTransactionDTO);
validateStandaloneTransaction(secretLockTransaction, secretLockTransactionDTO);
}
use of io.vertx.core.json.JsonObject in project nem2-sdk-java by nemtech.
the class TransactionMappingTest method shouldCreateStandaloneTransferTransaction.
@Test
void shouldCreateStandaloneTransferTransaction() throws Exception {
JsonObject transferTransactionDTO = new JsonObject("{\"meta\":{\"hash\":\"18C036C20B32348D63684E09A13128A2C18F6A75650D3A5FB43853D716E5E219\",\"height\":[1,0],\"id\":\"59FDA0733F17CF0001772CA7\",\"index\":19,\"merkleComponentHash\":\"18C036C20B32348D63684E09A13128A2C18F6A75650D3A5FB43853D716E5E219\"},\"transaction\":{\"deadline\":[10000,0],\"fee\":[0,0],\"message\":{\"payload\":\"746573742D6D657373616765\",\"type\":0},\"mosaics\":[{\"amount\":[3863990592,95248],\"id\":[3646934825,3576016193]}],\"recipient\":\"9050B9837EFAB4BBE8A4B9BB32D812F9885C00D8FC1650E142\",\"signature\":\"553E696EB4A54E43A11D180EBA57E4B89D0048C9DD2604A9E0608120018B9E02F6EE63025FEEBCED3293B622AF8581334D0BDAB7541A9E7411E7EE4EF0BC5D0E\",\"signer\":\"B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF\",\"type\":16724,\"version\":36867}}");
Transaction transferTransaction = new TransactionMapping().apply(transferTransactionDTO);
validateStandaloneTransaction(transferTransaction, transferTransactionDTO);
}
use of io.vertx.core.json.JsonObject in project nem2-sdk-java by nemtech.
the class TransactionMappingTest method shouldCreateAggregateLockFundsTransaction.
@Test
void shouldCreateAggregateLockFundsTransaction() throws Exception {
JsonObject aggregateLockFundsTransactionDTO = new JsonObject("{\"meta\": {\"hash\": \"671653C94E2254F2A23EFEDB15D67C38332AED1FBD24B063C0A8E675582B6A96\",\"height\": [18160,0],\"id\": \"5A0069D83F17CF0001777E55\",\"index\": 0,\"merkleComponentHash\": \"81E5E7AE49998802DABC816EC10158D3A7879702FF29084C2C992CD1289877A7\"},\"transaction\": {\"cosignatures\": [{\"signature\": \"5780C8DF9D46BA2BCF029DCC5D3BF55FE1CB5BE7ABCF30387C4637DDEDFC2152703CA0AD95F21BB9B942F3CC52FCFC2064C7B84CF60D1A9E69195F1943156C07\",\"signer\": \"A5F82EC8EBB341427B6785C8111906CD0DF18838FB11B51CE0E18B5E79DFF630\"}],\"deadline\": [3266625578,11],\"fee\": [0,0],\"signature\": \"939673209A13FF82397578D22CC96EB8516A6760C894D9B7535E3A1E068007B9255CFA9A914C97142A7AE18533E381C846B69D2AE0D60D1DC8A55AD120E2B606\",\"signer\": \"7681ED5023141D9CDCF184E5A7B60B7D466739918ED5DA30F7E71EA7B86EFF2D\",\"transactions\": [{\"meta\": {\"aggregateHash\": \"3D28C804EDD07D5A728E5C5FFEC01AB07AFA5766AE6997B38526D36015A4D006\",\"aggregateId\": \"5A0069D83F17CF0001777E55\",\"height\": [18160,0],\"id\": \"5A0069D83F17CF0001777E56\",\"index\": 0},\"transaction\": {\"signer\": \"1026D70E1954775749C6811084D6450A3184D977383F0E4282CD47118AF37755\",\"version\": 36867,\"type\": 16716,\"duration\": [100,0],\"mosaicId\": [3646934825,3576016193],\"amount\": [10000000,0],\"hash\": \"49E9F58867FB9399F32316B99CCBC301A5790E5E0605E25F127D28CEF99740A3\"}}],\"type\": 16705,\"version\": 36867}}");
Transaction lockFundsTransaction = new TransactionMapping().apply(aggregateLockFundsTransactionDTO);
validateAggregateTransaction((AggregateTransaction) lockFundsTransaction, aggregateLockFundsTransactionDTO);
}
use of io.vertx.core.json.JsonObject in project nem2-sdk-java by nemtech.
the class TransactionMappingTest method shouldCreateStandaloneMosaicSupplyChangeTransaction.
@Test
void shouldCreateStandaloneMosaicSupplyChangeTransaction() throws Exception {
JsonObject mosaicSupplyChangeTransactionDTO = new JsonObject("{\"meta\":{\"hash\":\"18C036C20B32348D63684E09A13128A2C18F6A75650D3A5FB43853D716E5E219\",\"height\":[1,0],\"id\":\"59FDA0733F17CF0001772CA7\",\"index\":19,\"merkleComponentHash\":\"18C036C20B32348D63684E09A13128A2C18F6A75650D3A5FB43853D716E5E219\"},\"transaction\":{\"deadline\":[1,0],\"delta\":[100000,0],\"direction\":1,\"fee\":[0,0],\"mosaicId\":[3070467832,2688515262],\"signature\":\"553E696EB4A54E43A11D180EBA57E4B89D0048C9DD2604A9E0608120018B9E02F6EE63025FEEBCED3293B622AF8581334D0BDAB7541A9E7411E7EE4EF0BC5D0E\",\"signer\":\"B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF\",\"type\":16973,\"version\":36867}}");
Transaction mosaicSupplyChangeTransaction = new TransactionMapping().apply(mosaicSupplyChangeTransactionDTO);
validateStandaloneTransaction(mosaicSupplyChangeTransaction, mosaicSupplyChangeTransactionDTO);
}
use of io.vertx.core.json.JsonObject in project nem2-sdk-java by nemtech.
the class TransactionMappingTest method shouldCreateAggregateMosaicCreationTransaction.
@Test
void shouldCreateAggregateMosaicCreationTransaction() throws Exception {
JsonObject aggregateMosaicCreationTransactionDTO = new JsonObject("{\"meta\":{\"hash\":\"671653C94E2254F2A23EFEDB15D67C38332AED1FBD24B063C0A8E675582B6A96\",\"height\":[18160,0],\"id\":\"5A0069D83F17CF0001777E55\",\"index\":0,\"merkleComponentHash\":\"81E5E7AE49998802DABC816EC10158D3A7879702FF29084C2C992CD1289877A7\"},\"transaction\":{\"cosignatures\":[{\"signature\":\"5780C8DF9D46BA2BCF029DCC5D3BF55FE1CB5BE7ABCF30387C4637DDEDFC2152703CA0AD95F21BB9B942F3CC52FCFC2064C7B84CF60D1A9E69195F1943156C07\",\"signer\":\"A5F82EC8EBB341427B6785C8111906CD0DF18838FB11B51CE0E18B5E79DFF630\"}],\"deadline\":[3266625578,11],\"fee\":[0,0],\"signature\":\"939673209A13FF82397578D22CC96EB8516A6760C894D9B7535E3A1E068007B9255CFA9A914C97142A7AE18533E381C846B69D2AE0D60D1DC8A55AD120E2B606\",\"signer\":\"7681ED5023141D9CDCF184E5A7B60B7D466739918ED5DA30F7E71EA7B86EFF2D\",\"transactions\":[{\"meta\":{\"aggregateHash\":\"3D28C804EDD07D5A728E5C5FFEC01AB07AFA5766AE6997B38526D36015A4D006\",\"aggregateId\":\"5A0069D83F17CF0001777E55\",\"height\":[18160,0],\"id\":\"5A0069D83F17CF0001777E56\",\"index\":0},\"transaction\":{\"mosaicId\":[3248159581,740240531],\"name\":\"ie7rfaqxiorum1jor\",\"parentId\":[3316183705,3829351378],\"properties\":[{\"id\":0,\"value\":[7,0]},{\"id\":1,\"value\":[6,0]},{\"id\":2,\"value\":[1000,0]}],\"signer\":\"B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF\",\"type\":16717,\"version\":36867}}],\"type\":16705,\"version\":36867}}");
Transaction aggregateMosaicCreationTransaction = new TransactionMapping().apply(aggregateMosaicCreationTransactionDTO);
validateAggregateTransaction((AggregateTransaction) aggregateMosaicCreationTransaction, aggregateMosaicCreationTransactionDTO);
}
Aggregations