How to Use mijin Catapult (v.2) Free Trial

This page walks you through how to launch mijin Catapult (v.2) Free Trial version from cloudformation in the AWS Marketplace.

Prepare node environment

Install symbol-cli

$ npm i -g symbol-cli@0.20.7
npm WARN deprecated @types/ora@3.2.0: This is a stub types definition. ora provides its own type definitions, so you do not need this installed.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
/usr/local/var/nodebrew/node/v10.17.0/bin/symbol-cli -> /usr/local/var/nodebrew/node/v10.17.0/lib/node_modules/symbol-cli/bin/symbol-cli
npm WARN eslint-plugin-prettier@3.1.4 requires a peer of eslint@>=5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-prettier@3.1.4 requires a peer of prettier@>=1.13.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-prettier@6.11.0 requires a peer of eslint@>=3.14.1 but none is installed. You must install peer dependencies yourself.
npm WARN symbol-sdk@0.20.7 requires a peer of utf8@^2.1.2 but none is installed. You must install peer dependencies yourself.
npm WARN ws@7.3.1 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws@7.3.1 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.

+ symbol-cli@0.20.7

Register an account to hold native currency

Select the Outouts tab in the Cloudformation Stack. Please write down the URL for the Key mijinEndpint. Next, click the URL for the Value of the Key "HarvestAddress".

Please write down the private_key value in the Value.

Import the private_key with symbol-cli.

Item Input Value
Select the network type MIJIN_TEST
Enter the Symbol node URL Key “mijinEndpint” URL that you wrote down
Enter a profile name Profile name
Enter your wallet password Password
Do you want to set the account as the default profile This tutorial selects No
Select an import type PrivateKey
Enter your account private key private_key that you wrote down
$ symbol-cli profile import
? Select the network type: › - Use arrow-keys. Return to submit.
    MAIN_NET
    TEST_NET
    MIJIN
❯   MIJIN_TEST

✔ Select the network type: › MIJIN_TEST
✔ Enter the Symbol node URL. (Example: http://localhost:3000): … http://13.230.253.80:3000
✔ Enter a profile name: … mijin-free
✔ Enter your wallet password: … **********
✔ Do you want to set the account as the default profile? … yes
? Select an import type: › - Use arrow-keys. Return to submit.
❯   PrivateKey
    Mnemonic

✔ Enter your account private key: … ****************************************************************

Account
┌───────────────┬──────────────────────────────────────────────────────────────────────┐
│ Property      │ Value                                                                │
├───────────────┼──────────────────────────────────────────────────────────────────────┤
│ Address       │ SCKNXY-3FCDH2-S5NFWF-6BZ5I2-WADC5Z-F7CZAJ-PHY                        │
├───────────────┼──────────────────────────────────────────────────────────────────────┤
│ Public Key    │ 534642E39A466B9AC61F08B47B25AE6F8A55DE118A93218C8FB1AEDA6BC18A55     │
├───────────────┼──────────────────────────────────────────────────────────────────────┤
│ Private Key   │ 003D6C16C4929CDC8901C46E8919D50E8A81236CD2F7FE5F5CB7E22A1A657C4E     │
├───────────────┼──────────────────────────────────────────────────────────────────────┤
│ Password      │ mijin-free                                                           │
└───────────────┴──────────────────────────────────────────────────────────────────────┘

SUCCESS Stored mijin-free profile

Check your account information.
Balance Information will be the native currency (cat.currency).

$ symbol-cli account info
⠇ Processing
Account Information
┌───────────────────┬──────────────────────────────────────────────────────────────────┐
│ Property          │ Value                                                            │
├───────────────────┼──────────────────────────────────────────────────────────────────┤
│ Address           │ SCKNXY-3FCDH2-S5NFWF-6BZ5I2-WADC5Z-F7CZAJ-PHY                    │
├───────────────────┼──────────────────────────────────────────────────────────────────┤
│ Address Height    │ 1                                                                │
├───────────────────┼──────────────────────────────────────────────────────────────────┤
│ Public Key        │ 534642E39A466B9AC61F08B47B25AE6F8A55DE118A93218C8FB1AEDA6BC18A55 │
├───────────────────┼──────────────────────────────────────────────────────────────────┤
│ Public Key Height │ 1                                                                │
├───────────────────┼──────────────────────────────────────────────────────────────────┤
│ Importance        │ 2000000000                                                       │
├───────────────────┼──────────────────────────────────────────────────────────────────┤
│ Importance Height │ 1                                                                │
└───────────────────┴──────────────────────────────────────────────────────────────────┘
Balance Information
┌──────────────────┬─────────────────┬─────────────────┬───────────────────┐
│ Mosaic Id        │ Relative Amount │ Absolute Amount │ Expiration Height │
├──────────────────┼─────────────────┼─────────────────┼───────────────────┤
│ 30D00C06BFCFF8B6 │ 2,000           │ 2000000000      │ Never             │
└──────────────────┴─────────────────┴─────────────────┴───────────────────┘

Register an empty account

Click the Outouts tab in the Cloudformation Stack and click the URL for the Key "emptyAddress" Value.

Please write down the first private_key among 10 addresses that are registered in Value.

Import the private_key with symbol-cli

Item Input Value
Select the network type MIJIN_TEST
Enter the Symbol node URL Key “mijinEndpint” URL that you wrote down
Enter a profile name Profile name
Enter your wallet password Password
Do you want to set the account as the default profile This tutorial selects No
Select an import type PrivateKey
Enter your account private key private_key that you wrote down
$ symbol-cli profile import

✔ Select the network type: › MIJIN_TEST
✔ Enter the Symbol node URL. (Example: http://localhost:3000): … http://13.230.253.80:3000
✔ Enter a profile name: … mijin-free-empty1
✔ Enter your wallet password: … ************
✔ Do you want to set the account as the default profile? … no
✔ Select an import type: › PrivateKey
✔ Enter your account private key: … ****************************************************************

Account
┌───────────────┬──────────────────────────────────────────────────────────────────────┐
│ Property      │ Value                                                                │
├───────────────┼──────────────────────────────────────────────────────────────────────┤
│ Address       │ SBBI5D-K2735Y-63YNOI-4PJ4U4-F6XDB7-KKEHZP-L5A                        │
├───────────────┼──────────────────────────────────────────────────────────────────────┤
│ Public Key    │ 24737825D42B970C90ECF04657B3F931DD97E25155A677A6385D499DFED1BF76     │
├───────────────┼──────────────────────────────────────────────────────────────────────┤
│ Private Key   │ 9EAB981AE0F6D0B39D38BCFF1C50C5343E2D66AA6A1C46FA69E6893DFEFEFB3D     │
├───────────────┼──────────────────────────────────────────────────────────────────────┤
│ Password      │ mijin-empty1                                                         │
└───────────────┴──────────────────────────────────────────────────────────────────────┘

SUCCESS Stored mijin-free-empty1 profile

At this point, if you check your account, it doesn't exist.
This is because there is no interaction with this address on the blockchain yet, so you cannot confirm its existence.

$ symbol-cli account info --profile  mijin-free-empty1

ERR {"statusCode":404,"statusMessage":"Not Found","body":"{\"code\":\"ResourceNotFound\",\"message\":\"no resource exists with id 'SBBI5DK2735Y63YNOI4PJ4U4F6XDB7KKEHZPL5A'\"}"}

TIP The account has to receive at least one transaction to be recorded on the network

Send native currency

Let's send the native currency to the empty address registered earlier. Execute the following command and write down the Value of the Address.


$ symbol-cli profile list --profile  mijin-free-empty1

┌──────────────────┬──────────────────────────────────────────────────────────────────┐
│ Property         │ Value                                                            │
├──────────────────┼──────────────────────────────────────────────────────────────────┤
│ Name             │ mijin-free-empty1                                                │
├──────────────────┼──────────────────────────────────────────────────────────────────┤
│ Address          │ SBBI5D-K2735Y-63YNOI-4PJ4U4-F6XDB7-KKEHZP-L5A                    │
├──────────────────┼──────────────────────────────────────────────────────────────────┤
│ Network          │ MIJIN_TEST                                                       │
├──────────────────┼──────────────────────────────────────────────────────────────────┤
│ Node URL         │ http://13.230.253.80:3000                                        │
├──────────────────┼──────────────────────────────────────────────────────────────────┤
│ Generation Hash  │ 5099CF98B38F51FFAAFEFFF4C1890E3E853F801DDBCE88762C1F2B962EE57A0E │
├──────────────────┼──────────────────────────────────────────────────────────────────┤
│ Network Currency │ name: cat.currency, divisibility: 6                              │
├──────────────────┼──────────────────────────────────────────────────────────────────┤
│ Profile type     │ PrivateKey                                                       │
└──────────────────┴──────────────────────────────────────────────────────────────────┘

Send 1 cat.currency.

$ symbol-cli transaction transfer
✔ Enter your wallet password: … **********
✔ Mosaics to transfer in the format (mosaicId(hex)|@aliasName)::absoluteAmount, (Ex: sending 1 symbol.xym, @symbol.xym::1000000). Add multiple mosaics separated by commas: … @cat.currency::1000000
✔ Enter the recipient address or @alias: … SBBI5D-K2735Y-63YNOI-4PJ4U4-F6XDB7-KKEHZP-L5A
✔ Enter a message: … test
✔ Enter the maximum fee (absolute amount): … 20000
✔ Select the transaction announce mode: › normal
┌──────────────────────────────────────────────────────────────────────────────────┐
│                                     TRANSFER                                     │
├───────────────┬──────────────────────────────────────────────────────────────────┤
│ Max fee:      │ 20,000                                                           │
├───────────────┼──────────────────────────────────────────────────────────────────┤
│ Network type: │ MIJIN_TEST                                                       │
├───────────────┼──────────────────────────────────────────────────────────────────┤
│ Deadline:     │ 2020-08-28 17:41:08.512                                          │
├───────────────┼──────────────────────────────────────────────────────────────────┤
│ Recipient:    │ SBBI5D-K2735Y-63YNOI-4PJ4U4-F6XDB7-KKEHZP-L5A                    │
├───────────────┼──────────────────────────────────────────────────────────────────┤
│ Message:      │ test                                                             │
├───────────────┼──────────────────────────────────────────────────────────────────┤
│ Mosaic (1/1): │ 1,000,000 cat.currency (85BBEA6CC462B244)                        │
├───────────────┴──────────────────────────────────────────────────────────────────┤
│                                Signature details                                 │
├───────────────┬──────────────────────────────────────────────────────────────────┤
│ Payload:      │ B50000000000000042B404182D3BA9DB07C8284E459FD7442664110E52171ED1 │
│               │ 63C9D713976376A55F9C7FF91226CBE1C0B5F97F66D9BBB04B660094886A7D64 │
│               │ F39639C2CE730804534642E39A466B9AC61F08B47B25AE6F8A55DE118A93218C │
│               │ 8FB1AEDA6BC18A550000000001905441204E000000000000A0B277DC05000000 │
│               │ 90428E8D5AFEFB8F6F0D7238F4F29C2FAE30FD4A21F2F5F40500010000000000 │
│               │ 44B262C46CEABB8540420F00000000000074657374                       │
├───────────────┼──────────────────────────────────────────────────────────────────┤
│ Hash:         │ 8874ABF30B9B1D8A1F962C7EECCE4008B4B05D4839E9DB5C14557677E131962F │
├───────────────┼──────────────────────────────────────────────────────────────────┤
│ Signer:       │ 534642E39A466B9AC61F08B47B25AE6F8A55DE118A93218C8FB1AEDA6BC18A55 │
└───────────────┴──────────────────────────────────────────────────────────────────┘
✔ Do you want to announce this transaction? … yes

SUCCESS Transaction announced correctly

TIP To check if the network confirms or rejects the transaction, run the command 'symbol-cli transaction status'

Check whether the transaction passed successfully.

$ symbol-cli transaction status
✔ Enter a transaction hash: … 8874ABF30B9B1D8A1F962C7EECCE4008B4B05D4839E9DB5C14557677E131962F

Transaction Status
┌─────────────┬──────────────────────────────────────────────────────────────────┐
│ Property    │ Value                                                            │
├─────────────┼──────────────────────────────────────────────────────────────────┤
│ Group       │ confirmed                                                        │
├─────────────┼──────────────────────────────────────────────────────────────────┤
│ Hash        │ 8874ABF30B9B1D8A1F962C7EECCE4008B4B05D4839E9DB5C14557677E131962F │
├─────────────┼──────────────────────────────────────────────────────────────────┤
│ Status Code │ Success                                                          │
├─────────────┼──────────────────────────────────────────────────────────────────┤
│ Deadline    │ 2020-08-28T17:41:08.512                                          │
├─────────────┼──────────────────────────────────────────────────────────────────┤
│ Height      │ 120                                                              │
└─────────────┴──────────────────────────────────────────────────────────────────┘

Check the sender account. You can see the 1 cat.currency and fee are deducted from the account.

$ symbol-cli account info
⠙ Processing
Account Information
┌───────────────────┬──────────────────────────────────────────────────────────────────┐
│ Property          │ Value                                                            │
├───────────────────┼──────────────────────────────────────────────────────────────────┤
│ Address           │ SCKNXY-3FCDH2-S5NFWF-6BZ5I2-WADC5Z-F7CZAJ-PHY                    │
├───────────────────┼──────────────────────────────────────────────────────────────────┤
│ Address Height    │ 1                                                                │
├───────────────────┼──────────────────────────────────────────────────────────────────┤
│ Public Key        │ 534642E39A466B9AC61F08B47B25AE6F8A55DE118A93218C8FB1AEDA6BC18A55 │
├───────────────────┼──────────────────────────────────────────────────────────────────┤
│ Public Key Height │ 1                                                                │
├───────────────────┼──────────────────────────────────────────────────────────────────┤
│ Importance        │ 2000000000                                                       │
├───────────────────┼──────────────────────────────────────────────────────────────────┤
│ Importance Height │ 1                                                                │
└───────────────────┴──────────────────────────────────────────────────────────────────┘
Balance Information
┌──────────────────┬─────────────────┬─────────────────┬───────────────────┐
│ Mosaic Id        │ Relative Amount │ Absolute Amount │ Expiration Height │
├──────────────────┼─────────────────┼─────────────────┼───────────────────┤
│ 30D00C06BFCFF8B6 │ 1,998.999       │ 1998999005      │ Never             │
└──────────────────┴─────────────────┴─────────────────┴───────────────────┘

Check the empty address. You can see the address has now 1 cat.currency.

$ symbol-cli account info --profile  mijin-free-empty1
⠙ Processing
Account Information
┌───────────────────┬──────────────────────────────────────────────────────────────────┐
│ Property          │ Value                                                            │
├───────────────────┼──────────────────────────────────────────────────────────────────┤
│ Address           │ SBBI5D-K2735Y-63YNOI-4PJ4U4-F6XDB7-KKEHZP-L5A                    │
├───────────────────┼──────────────────────────────────────────────────────────────────┤
│ Address Height    │ 120                                                              │
├───────────────────┼──────────────────────────────────────────────────────────────────┤
│ Public Key        │ 0000000000000000000000000000000000000000000000000000000000000000 │
├───────────────────┼──────────────────────────────────────────────────────────────────┤
│ Public Key Height │ 0                                                                │
├───────────────────┼──────────────────────────────────────────────────────────────────┤
│ Importance        │ 0                                                                │
├───────────────────┼──────────────────────────────────────────────────────────────────┤
│ Importance Height │ 0                                                                │
└───────────────────┴──────────────────────────────────────────────────────────────────┘
Balance Information
┌──────────────────┬─────────────────┬─────────────────┬───────────────────┐
│ Mosaic Id        │ Relative Amount │ Absolute Amount │ Expiration Height │
├──────────────────┼─────────────────┼─────────────────┼───────────────────┤
│ 30D00C06BFCFF8B6 │ 1               │ 1000000         │ Never             │
└──────────────────┴─────────────────┴─────────────────┴───────────────────┘