-
Notifications
You must be signed in to change notification settings - Fork 8
Mosaic supply change transaction
Yaaccount edited this page Oct 13, 2019
·
4 revisions
import { Deadline, Account, NetworkType, UInt64, MosaicId, MosaicSupplyChangeTransaction, MosaicSupplyType } from 'tsjs-xpx-chain-sdk';
import { Network } from '../utils';
const network = new Network('http://localhost:3000');
const sender = Account.createFromPrivateKey(
'28FCECEA252231D2C86E1BCF7DD541552BDBBEFBB09324758B3AC199B4AA7B78',
NetworkType.MIJIN_TEST);
const mosaicSupplyChangeTransaction = MosaicSupplyChangeTransaction.create(
Deadline.create(),
new MosaicId([2441356910,72797447]),
MosaicSupplyType.Increase,
UInt64.fromUint(1000),
NetworkType.MIJIN_TEST
)
network.networkProperties.then(networkProperties => {
const signedMosaicSupplyChangeTransaction = sender.sign(mosaicSupplyChangeTransaction, networkProperties.generationHash);
network.announceAndWaitForConfirmation(signedMosaicSupplyChangeTransaction).then(tx => {
console.log('Confirmed:');
console.log(tx);
});
});