2.2.6.4. mijin Catapult(v.2) Balance transfer of balance account when commissioned mode is enabled¶
This chapter explains how to move balances from one account with a balance of a mijin Catapult(v.2) node on AWS to another.
The moved account is recommended as the account for the mijin Catapult(v.2) operation.
Note
In a blockchain, there is always a base currency and transaction fees must be paid in operating the blockchain.
mijin Catapult(v.2) also requires a fee to create a transaction if you enable the with fee mode, and you must operate with an account that has a base currency balance for all transaction fees, Mosaic rental fees, etc.
Conversely, the no-fee mode allows you to create transactions using accounts that do not carry a balance.
- creation-day:
Aug. 1, 2022
- update date:
October 1, 2022
2.2.6.4.1. Verify accounts with balance¶
Outstanding accounts are stored in nemesis_addresses_harvesting.json in the AWS Systems Manager parameter store.
The list of accounts in this file is all tied to each node.

All accounts have balances, but here we will check the following data at the top using mijin-catapult-cli.
{
"address": "MDBFPEAECQTM5CTDXWGAMEQQ5GRQ5ORMXFNTA4A",
"public_key": "7D7C86B3229CC1B6551A1526DB4ADF646CD0A3DAB1C7090DBE70798FA63E9BD5",
"private_key": "562B913CADD35D2FA18CA26B9F357966AFF6908DEFCBC6DA33535C1791D949E4"
},
2.2.6.4.2. Preparation Install nodejs and yarn¶
Install nodejs to use mijin-catapult-tools. Install nodejs using NodeSource
$ curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash - && sudo apt-get install -y nodejs
$ node --version
$ sudo npm install -g yarn
2.2.6.4.3. Installing mijin-catapult-tools¶
Use yarn to install mijin-catapult-tools.
$ yarn global add @tech-bureau/mijin-catapult-tools
$ echo 'export PATH="$HOME/.yarn/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc
2.2.6.4.4. Import of balance accounts¶
Import balance accounts.
-u specifies the mijinLBENdpoint or mijinEndpoint URL in the CloudFormation output.
-p specifies the private_key of the balance account.
$ mijin-catapult-tools account generate -w aws.json -u http://xxxxxxxxxxxxxxxxxxxxx.elb.ap-northeast-1.amazonaws.com:3000 -s -p 562B913CADD35D2FA18CA26B9F357966AFF6908DEFCBC6DA33535C1791D949E4
2023-01-17T07:35:12.266Z [info] : mijin URL: http://xxxxxxxxxxxxxxxxxxxxx.elb.ap-northeast-1.amazonaws.com:3000
2023-01-17T07:35:12.268Z [info] : Network: 96
2023-01-17T07:35:12.268Z [info] : Mosaic Currency Id: 769E11974E2CAD76
2023-01-17T07:35:12.269Z [info] : Mosaic Harvest Id: 792022E7945425E4
2023-01-17T07:35:12.269Z [info] : Start Account Generate...
2023-01-17T07:35:12.343Z [info] : Write Config File: aws.json
2023-01-17T07:35:12.345Z [info] : New Account: {
"url": "http://xxxxxxxxxxxxxxxxxxxxx.elb.ap-northeast-1.amazonaws.com:3000",
"workAccount": {
"publicKey": "E28BF2A27FE64DF392CBF6D6883BE4858CF26790B4EABC3BCA8E08854BC6A9BF",
"privateKey": "C3BE65EB9055405ED8CCB7AD568D1368067174F969E9321C0AB4379A7565C9C2",
"address": "MB2ZQXQQQHOVYU4GX2TKNNJK6XLZPIZV6LK62MY"
},
"balanceAccount": {
"publicKey": "7D7C86B3229CC1B6551A1526DB4ADF646CD0A3DAB1C7090DBE70798FA63E9BD5",
"privateKey": "562B913CADD35D2FA18CA26B9F357966AFF6908DEFCBC6DA33535C1791D949E4",
"address": "MDBFPEAECQTM5CTDXWGAMEQQ5GRQ5ORMXFNTA4A"
},
"mainAccount": {
"publicKey": "DAF95081E2D816062108424CF2404B9C3B7C4C7CD1DF6E1446158CC2A2D9B29B",
"privateKey": "ACF704D53457DF418E1784BACB6D0977B2626BC2847506C7D91B39CDD0515F0F",
"address": "MD4J2ZVP2AW3BCH6UKZOJNNBGS35DBKTNS4KGVI"
},
"keylink": {
"vrf": {
"publicKey": "E3D05474D23B57EEFCF953EB7A1AF7A44F9BA338C83900AB0A72927D933CD56A",
"privateKey": "D0F48B1926ECA6C32C1D3A61AE25A7A483EF47B6DE96B9B4E4970773F904CB73",
"address": "MBR5NJKKF66GVIOFQKCJOAOTR5KWFE5AKWTVLOQ"
},
"voting": {
"publicKey": "8A615FD6E66CBCB6361FAE0156CB6E22E0932F7157F04849551FCAE9CC6E494F",
"privateKey": "1615F3484A2123131A624FA065E4B17A0CE916FF6D5A772501FBC83876B3B912",
"address": "MDWPSE2HLW4HFFTLSECCIMWQPF6IKFPQAI76V3Y"
}
},
"test1Account": {
"publicKey": "889E1705185A2138F4408D70C28A015536F05A69185392F8C683BB39A0BDB951",
"privateKey": "8636D903270275A3A6459B41E73E8E7365A6A55ED2437AB25F3321230FD64C35",
"address": "MBRU2UKYC5C7J6MNQU7F3KYXFVMSIUKUZTPWFHI"
},
"test2Account": {
"publicKey": "24323D2D3594BF0A1993E018571EBD1175BD4B461EF3D15FE4EB09FADAB95834",
"privateKey": "2A4F1B1E98BF4F91F6FE6D6F90844D9FCA78BCF198028AD8778CC85C409F6B5E",
"address": "MAWOT4JSX3OYBMNGRM47ZQDDUHCJ3LLQKKO6RKA"
}
}
Verify account information.
Mosaic Id 769E11974E2CAD76 with “currency”: true is the base currency.
Currency with “harvest”: true must be owned by the node entitled to generate the block.
Warning
Note that the Mosaic Id for the base currency is created at the time of deployment and is not the same Id.
$ mijin-catapult-tools account info -r aws.json -t balance
2023-01-17T07:36:16.432Z [info] : mijin URL: http://xxxxxxxxxxxxxxxxxxxxx.elb.ap-northeast-1.amazonaws.com:3000
2023-01-17T07:36:16.433Z [info] : Network: 96
2023-01-17T07:36:16.433Z [info] : Mosaic Currency Id: 769E11974E2CAD76
2023-01-17T07:36:16.434Z [info] : Mosaic Harvest Id: 792022E7945425E4
2023-01-17T07:36:16.434Z [info] : Start Account Info
2023-01-17T07:36:16.603Z [info] : balance Account: {
"publicKey": "7D7C86B3229CC1B6551A1526DB4ADF646CD0A3DAB1C7090DBE70798FA63E9BD5",
"address": "MDBFPEAECQTM5CTDXWGAMEQQ5GRQ5ORMXFNTA4A",
"mosaics": [
{
"id": "769E11974E2CAD76",
"amount": "1799799999600000",
"currency": true,
"harvest": false
},
{
"id": "792022E7945425E4",
"amount": "3000000",
"currency": false,
"harvest": true
}
],
"keylink": {
"vrf": {
"publicKey": "9CD207F9A6DE6D485D350C29B749590251924A29C0EFD8E38DDE24866D71F160"
},
"voting": {
"publicKey": "E3822AA0720F610847E4BE2B740F8FFF9130BEC4E9140BA845150DC2D591D86D",
"startEpoch": 1,
"endEpoch": 26280
}
}
}
2.2.6.4.5. Create a new account¶
Create a new account with no balance.
Move the balance to address MDJMNVU47CWHTZBMX7B6M6WWT5NEEY4GTG66GLQ later.
$ mijin-catapult-tools account generate -r aws.json
2023-01-17T07:38:41.738Z [info] : mijin URL: http://xxxxxxxxxxxxxxxxxxxxx.elb.ap-northeast-1.amazonaws.com:3000
2023-01-17T07:38:41.740Z [info] : Network: 96
2023-01-17T07:38:41.740Z [info] : Mosaic Currency Id: 769E11974E2CAD76
2023-01-17T07:38:41.740Z [info] : Mosaic Harvest Id: 792022E7945425E4
2023-01-17T07:38:41.740Z [info] : Start Account Generate...
2023-01-17T07:38:41.768Z [info] : New Account: {
"publicKey": "7437EB45A39AF335F08CABD203503632115CA1793902F5106BC03963C96AEE4F",
"privateKey": "708AB4973F37B89195340AEA7EBD733ED16AE51B99EB648E7A3885869CBAF3C9",
"address": "MDJMNVU47CWHTZBMX7B6M6WWT5NEEY4GTG66GLQ"
Query the node for account information.
Verify that this account has a non-existent error because there is no record of a balance in the node.
$ mijin-catapult-tools account info -r aws.json -t other -a MDJMNVU47CWHTZBMX7B6M6WWT5NEEY4GTG66GLQ
2023-01-17T07:39:44.832Z [info] : mijin URL: http://xxxxxxxxxxxxxxxxxxxxx.elb.ap-northeast-1.amazonaws.com:3000
2023-01-17T07:39:44.834Z [info] : Network: 96
2023-01-17T07:39:44.834Z [info] : Mosaic Currency Id: 769E11974E2CAD76
2023-01-17T07:39:44.834Z [info] : Mosaic Harvest Id: 792022E7945425E4
2023-01-17T07:39:44.834Z [info] : Start Account Info
2023-01-17T07:39:45.061Z [error] : Address Not Found
2.2.6.4.6. Balance transfers¶
Transfer the balance from the balance account to a new account (MDJMNVU47CWHTZBMX7B6M6WWT5NEEY4GTG66GLQ).
Here we will transfer 100,000 cat.currency.
Announce a transfer transaction from your balance account (mijin-have-currency-account).
$ mijin-catapult-tools transaction transfer -r aws.json -f balance -d MDJMNVU47CWHTZBMX7B6M6WWT5NEEY4GTG66GLQ -a 100000
2023-01-17T07:41:40.559Z [info] : mijin URL: http://xxxxxxxxxxxxxxxxxxxxx.elb.ap-northeast-1.amazonaws.com:3000
2023-01-17T07:41:40.562Z [info] : Network: 96
2023-01-17T07:41:40.562Z [info] : Start Transfer Account...
2023-01-17T07:41:40.585Z [info] : From Account Address: MDBFPEAECQTM5CTDXWGAMEQQ5GRQ5ORMXFNTA4A
2023-01-17T07:41:40.585Z [info] : Dest Account Address: MDJMNVU47CWHTZBMX7B6M6WWT5NEEY4GTG66GLQ
2023-01-17T07:41:40.585Z [info] : Currecny Amount: 100000000000
2023-01-17T07:41:40.594Z [info] : Start Transfer Transaction...
2023-01-17T07:41:55.775Z [info] : End Transfer Transaction
2023-01-17T07:41:55.775Z [info] : http://xxxxxxxxxxxxxxxxxxxxx.elb.ap-northeast-1.amazonaws.com:3000/transactionStatus/EC5FE12DBEFD1DF7DDE2D49287EC4DA1649546BB1EC43DE75641D5D4A7BEE770
2023-01-17T07:41:55.775Z [info] : http://xxxxxxxxxxxxxxxxxxxxx.elb.ap-northeast-1.amazonaws.com:3000/transactions/confirmed/EC5FE12DBEFD1DF7DDE2D49287EC4DA1649546BB1EC43DE75641D5D4A7BEE770
Verify that the new account has a balance.
The account information that was in error earlier is recognized by mijin Catapult(v.2) and you can confirm that you have a balance.
$ mijin-catapult-tools account info -r aws.json -t other -a MDJMNVU47CWHTZBMX7B6M6WWT5NEEY4GTG66GLQ
2023-01-17T07:42:26.802Z [info] : mijin URL: http://xxxxxxxxxxxxxxxxxxxxx.elb.ap-northeast-1.amazonaws.com:3000
2023-01-17T07:42:26.803Z [info] : Network: 96
2023-01-17T07:42:26.804Z [info] : Mosaic Currency Id: 769E11974E2CAD76
2023-01-17T07:42:26.804Z [info] : Mosaic Harvest Id: 792022E7945425E4
2023-01-17T07:42:26.804Z [info] : Start Account Info
2023-01-17T07:42:26.927Z [info] : get Account: {
"publicKey": "0000000000000000000000000000000000000000000000000000000000000000",
"address": "MDJMNVU47CWHTZBMX7B6M6WWT5NEEY4GTG66GLQ",
"mosaics": [
{
"id": "769E11974E2CAD76",
"amount": "100000000000",
"currency": true,
"harvest": false
}
],
"keylink": {
"vrf": {
"publicKey": ""
},
"voting": {
"publicKey": "",
"startEpoch": "",
"endEpoch": ""
}
}
}