@@ -26,9 +26,10 @@ import {Address} from '../../src/model/account/Address';
2626import { PublicAccount } from '../../src/model/account/PublicAccount' ;
2727import { NetworkType } from '../../src/model/blockchain/NetworkType' ;
2828import { MosaicId } from '../../src/model/mosaic/MosaicId' ;
29+ import { MosaicNonce } from '../../src/model/mosaic/MosaicNonce' ;
2930import { MosaicProperties } from '../../src/model/mosaic/MosaicProperties' ;
3031import { MosaicSupplyType } from '../../src/model/mosaic/MosaicSupplyType' ;
31- import { XEM } from '../../src/model/mosaic/XEM ' ;
32+ import { NetworkCurrencyMosaic } from '../../src/model/mosaic/NetworkCurrencyMosaic ' ;
3233import { AggregateTransaction } from '../../src/model/transaction/AggregateTransaction' ;
3334import { CosignatureSignedTransaction } from '../../src/model/transaction/CosignatureSignedTransaction' ;
3435import { CosignatureTransaction } from '../../src/model/transaction/CosignatureTransaction' ;
@@ -97,7 +98,7 @@ describe('TransactionHttp', () => {
9798 const transferTransaction = TransferTransaction . create (
9899 Deadline . create ( ) ,
99100 Address . createFromRawAddress ( 'SBILTA367K2LX2FEXG5TFWAS7GEFYAGY7QLFBYKC' ) ,
100- [ XEM . createRelative ( 10 ) ] ,
101+ [ NetworkCurrencyMosaic . createRelative ( 10 ) ] ,
101102 PlainMessage . create ( 'test-message' ) ,
102103 NetworkType . MIJIN_TEST ,
103104 ) ;
@@ -151,8 +152,8 @@ describe('TransactionHttp', () => {
151152 it ( 'standalone' , ( done ) => {
152153 const mosaicDefinitionTransaction = MosaicDefinitionTransaction . create (
153154 Deadline . create ( ) ,
154- 'test-mosaic-name-' + Math . floor ( Math . random ( ) * 10000 ) ,
155- namespaceName ,
155+ new MosaicNonce ( new Uint8Array ( [ 0xE6 , 0xDE , 0x84 , 0xB8 ] ) ) , // nonce
156+ new MosaicId ( UInt64 . fromUint ( 1 ) . toDTO ( ) ) , // ID
156157 MosaicProperties . create ( {
157158 supplyMutable : true ,
158159 transferable : true ,
@@ -170,8 +171,8 @@ describe('TransactionHttp', () => {
170171 it ( 'aggregate' , ( done ) => {
171172 const mosaicDefinitionTransaction = MosaicDefinitionTransaction . create (
172173 Deadline . create ( ) ,
173- 'test-mosaic-name-' + Math . floor ( Math . random ( ) * 10000 ) ,
174- namespaceName ,
174+ new MosaicNonce ( new Uint8Array ( [ 0xE6 , 0xDE , 0x84 , 0xB8 ] ) ) , // nonce
175+ new MosaicId ( UInt64 . fromUint ( 1 ) . toDTO ( ) ) , // ID
175176 MosaicProperties . create ( {
176177 supplyMutable : true ,
177178 transferable : true ,
@@ -244,7 +245,7 @@ describe('TransactionHttp', () => {
244245 ) ;
245246
246247 const lockFundsTransaction = LockFundsTransaction . create ( Deadline . create ( ) ,
247- XEM . createRelative ( 10 ) ,
248+ NetworkCurrencyMosaic . createRelative ( 10 ) ,
248249 UInt64 . fromUint ( 10000 ) ,
249250 signedTransaction ,
250251 NetworkType . MIJIN_TEST ) ;
@@ -265,7 +266,7 @@ describe('TransactionHttp', () => {
265266 const transferTransaction = TransferTransaction . create (
266267 Deadline . create ( ) ,
267268 Address . createFromRawAddress ( 'SBILTA367K2LX2FEXG5TFWAS7GEFYAGY7QLFBYKC' ) ,
268- [ XEM . createRelative ( 1 ) ] ,
269+ [ NetworkCurrencyMosaic . createRelative ( 1 ) ] ,
269270 PlainMessage . create ( 'test-message' ) ,
270271 NetworkType . MIJIN_TEST ,
271272 ) ;
@@ -279,7 +280,7 @@ describe('TransactionHttp', () => {
279280 ) ;
280281
281282 const lockFundsTransaction = LockFundsTransaction . create ( Deadline . create ( ) ,
282- XEM . createRelative ( 10 ) ,
283+ NetworkCurrencyMosaic . createRelative ( 10 ) ,
283284 UInt64 . fromUint ( 10000 ) ,
284285 signedTransaction ,
285286 NetworkType . MIJIN_TEST ) ;
@@ -316,7 +317,7 @@ describe('TransactionHttp', () => {
316317 const signedTransaction = account . sign ( aggregateTransaction ) ;
317318
318319 const lockFundsTransaction = LockFundsTransaction . create ( Deadline . create ( ) ,
319- XEM . createRelative ( 10 ) ,
320+ NetworkCurrencyMosaic . createRelative ( 10 ) ,
320321 UInt64 . fromUint ( 10000 ) ,
321322 signedTransaction ,
322323 NetworkType . MIJIN_TEST ) ;
@@ -333,7 +334,7 @@ describe('TransactionHttp', () => {
333334 ) ;
334335 const signedTransaction = account . sign ( aggregateTransaction ) ;
335336 const lockFundsTransaction = LockFundsTransaction . create ( Deadline . create ( ) ,
336- XEM . createRelative ( 10 ) ,
337+ NetworkCurrencyMosaic . createRelative ( 10 ) ,
337338 UInt64 . fromUint ( 10 ) ,
338339 signedTransaction ,
339340 NetworkType . MIJIN_TEST ) ;
@@ -351,7 +352,7 @@ describe('TransactionHttp', () => {
351352 it ( 'standalone' , ( done ) => {
352353 const secretLockTransaction = SecretLockTransaction . create (
353354 Deadline . create ( ) ,
354- XEM . createAbsolute ( 10 ) ,
355+ NetworkCurrencyMosaic . createAbsolute ( 10 ) ,
355356 UInt64 . fromUint ( 100 ) ,
356357 HashType . Op_Sha3_256 ,
357358 sha3_256 . create ( ) . update ( nacl_catapult . randomBytes ( 20 ) ) . hex ( ) ,
@@ -365,7 +366,7 @@ describe('TransactionHttp', () => {
365366 it ( 'aggregate' , ( done ) => {
366367 const secretLockTransaction = SecretLockTransaction . create (
367368 Deadline . create ( ) ,
368- XEM . createAbsolute ( 10 ) ,
369+ NetworkCurrencyMosaic . createAbsolute ( 10 ) ,
369370 UInt64 . fromUint ( 100 ) ,
370371 HashType . Op_Sha3_256 ,
371372 sha3_256 . create ( ) . update ( nacl_catapult . randomBytes ( 20 ) ) . hex ( ) ,
@@ -384,7 +385,7 @@ describe('TransactionHttp', () => {
384385 it ( 'standalone' , ( done ) => {
385386 const secretLockTransaction = SecretLockTransaction . create (
386387 Deadline . create ( ) ,
387- XEM . createAbsolute ( 10 ) ,
388+ NetworkCurrencyMosaic . createAbsolute ( 10 ) ,
388389 UInt64 . fromUint ( 100 ) ,
389390 HashType . Op_Keccak_256 ,
390391 sha3_256 . create ( ) . update ( nacl_catapult . randomBytes ( 20 ) ) . hex ( ) ,
@@ -398,7 +399,7 @@ describe('TransactionHttp', () => {
398399 it ( 'aggregate' , ( done ) => {
399400 const secretLockTransaction = SecretLockTransaction . create (
400401 Deadline . create ( ) ,
401- XEM . createAbsolute ( 10 ) ,
402+ NetworkCurrencyMosaic . createAbsolute ( 10 ) ,
402403 UInt64 . fromUint ( 100 ) ,
403404 HashType . Op_Keccak_256 ,
404405 sha3_256 . create ( ) . update ( nacl_catapult . randomBytes ( 20 ) ) . hex ( ) ,
@@ -417,7 +418,7 @@ describe('TransactionHttp', () => {
417418 it ( 'standalone' , ( done ) => {
418419 const secretLockTransaction = SecretLockTransaction . create (
419420 Deadline . create ( ) ,
420- XEM . createAbsolute ( 10 ) ,
421+ NetworkCurrencyMosaic . createAbsolute ( 10 ) ,
421422 UInt64 . fromUint ( 100 ) ,
422423 HashType . Op_Hash_160 ,
423424 sha3_256 . create ( ) . update ( nacl_catapult . randomBytes ( 20 ) ) . hex ( ) ,
@@ -431,7 +432,7 @@ describe('TransactionHttp', () => {
431432 it ( 'aggregate' , ( done ) => {
432433 const secretLockTransaction = SecretLockTransaction . create (
433434 Deadline . create ( ) ,
434- XEM . createAbsolute ( 10 ) ,
435+ NetworkCurrencyMosaic . createAbsolute ( 10 ) ,
435436 UInt64 . fromUint ( 100 ) ,
436437 HashType . Op_Hash_160 ,
437438 sha3_256 . create ( ) . update ( nacl_catapult . randomBytes ( 20 ) ) . hex ( ) ,
@@ -450,7 +451,7 @@ describe('TransactionHttp', () => {
450451 it ( 'standalone' , ( done ) => {
451452 const secretLockTransaction = SecretLockTransaction . create (
452453 Deadline . create ( ) ,
453- XEM . createAbsolute ( 10 ) ,
454+ NetworkCurrencyMosaic . createAbsolute ( 10 ) ,
454455 UInt64 . fromUint ( 100 ) ,
455456 HashType . Op_Hash_256 ,
456457 sha3_256 . create ( ) . update ( nacl_catapult . randomBytes ( 20 ) ) . hex ( ) ,
@@ -464,7 +465,7 @@ describe('TransactionHttp', () => {
464465 it ( 'aggregate' , ( done ) => {
465466 const secretLockTransaction = SecretLockTransaction . create (
466467 Deadline . create ( ) ,
467- XEM . createAbsolute ( 10 ) ,
468+ NetworkCurrencyMosaic . createAbsolute ( 10 ) ,
468469 UInt64 . fromUint ( 100 ) ,
469470 HashType . Op_Hash_256 ,
470471 sha3_256 . create ( ) . update ( nacl_catapult . randomBytes ( 20 ) ) . hex ( ) ,
@@ -488,7 +489,7 @@ describe('TransactionHttp', () => {
488489 const proof = convert . uint8ToHex ( secretSeed ) ;
489490 const secretLockTransaction = SecretLockTransaction . create (
490491 Deadline . create ( ) ,
491- XEM . createAbsolute ( 10 ) ,
492+ NetworkCurrencyMosaic . createAbsolute ( 10 ) ,
492493 UInt64 . fromUint ( 100 ) ,
493494 HashType . Op_Sha3_256 ,
494495 secret ,
@@ -515,7 +516,7 @@ describe('TransactionHttp', () => {
515516 const proof = convert . uint8ToHex ( secretSeed ) ;
516517 const secretLockTransaction = SecretLockTransaction . create (
517518 Deadline . create ( ) ,
518- XEM . createAbsolute ( 10 ) ,
519+ NetworkCurrencyMosaic . createAbsolute ( 10 ) ,
519520 UInt64 . fromUint ( 100 ) ,
520521 HashType . Op_Sha3_256 ,
521522 secret ,
@@ -548,7 +549,7 @@ describe('TransactionHttp', () => {
548549 const proof = convert . uint8ToHex ( secretSeed ) ;
549550 const secretLockTransaction = SecretLockTransaction . create (
550551 Deadline . create ( ) ,
551- XEM . createAbsolute ( 10 ) ,
552+ NetworkCurrencyMosaic . createAbsolute ( 10 ) ,
552553 UInt64 . fromUint ( 100 ) ,
553554 HashType . Op_Keccak_256 ,
554555 secret ,
@@ -575,7 +576,7 @@ describe('TransactionHttp', () => {
575576 const proof = convert . uint8ToHex ( secretSeed ) ;
576577 const secretLockTransaction = SecretLockTransaction . create (
577578 Deadline . create ( ) ,
578- XEM . createAbsolute ( 10 ) ,
579+ NetworkCurrencyMosaic . createAbsolute ( 10 ) ,
579580 UInt64 . fromUint ( 100 ) ,
580581 HashType . Op_Keccak_256 ,
581582 secret ,
@@ -607,7 +608,7 @@ describe('TransactionHttp', () => {
607608 const proof = convert . uint8ToHex ( secretSeed ) ;
608609 const secretLockTransaction = SecretLockTransaction . create (
609610 Deadline . create ( ) ,
610- XEM . createAbsolute ( 10 ) ,
611+ NetworkCurrencyMosaic . createAbsolute ( 10 ) ,
611612 UInt64 . fromUint ( 100 ) ,
612613 HashType . Op_Hash_160 ,
613614 secret ,
@@ -634,7 +635,7 @@ describe('TransactionHttp', () => {
634635 const proof = convert . uint8ToHex ( secretSeed ) ;
635636 const secretLockTransaction = SecretLockTransaction . create (
636637 Deadline . create ( ) ,
637- XEM . createAbsolute ( 10 ) ,
638+ NetworkCurrencyMosaic . createAbsolute ( 10 ) ,
638639 UInt64 . fromUint ( 100 ) ,
639640 HashType . Op_Hash_160 ,
640641 secret ,
@@ -666,7 +667,7 @@ describe('TransactionHttp', () => {
666667 const proof = convert . uint8ToHex ( secretSeed ) ;
667668 const secretLockTransaction = SecretLockTransaction . create (
668669 Deadline . create ( ) ,
669- XEM . createAbsolute ( 10 ) ,
670+ NetworkCurrencyMosaic . createAbsolute ( 10 ) ,
670671 UInt64 . fromUint ( 100 ) ,
671672 HashType . Op_Hash_256 ,
672673 secret ,
@@ -693,7 +694,7 @@ describe('TransactionHttp', () => {
693694 const proof = convert . uint8ToHex ( secretSeed ) ;
694695 const secretLockTransaction = SecretLockTransaction . create (
695696 Deadline . create ( ) ,
696- XEM . createAbsolute ( 10 ) ,
697+ NetworkCurrencyMosaic . createAbsolute ( 10 ) ,
697698 UInt64 . fromUint ( 100 ) ,
698699 HashType . Op_Hash_256 ,
699700 secret ,
@@ -857,7 +858,7 @@ describe('TransactionHttp', () => {
857858 const tx = TransferTransaction . create (
858859 Deadline . create ( ) ,
859860 Address . createFromRawAddress ( 'SAGY2PTFX4T2XYKYXTJXYCTQRP3FESQH5MEQI2RQ' ) ,
860- [ XEM . createRelative ( 10 ) ] ,
861+ [ NetworkCurrencyMosaic . createRelative ( 10 ) ] ,
861862 EmptyMessage ,
862863 NetworkType . MIJIN_TEST ,
863864 ) ;
0 commit comments