mijin Catapult (v.2) Free Trial操作編
本ページはAWSマーケットプレイス内にあるcloudformationからmijin Catapult (v.2) Free Trial版を操作する手順となります。
node環境の準備
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
基軸通貨の保持アカウント登録
Cloudformation Stack内にあるOutoutsタブを選択します。 Key「mijinEndpint」のURLを控えてください。 次に、Key「HarvestAddress」のValueのURLをクリックしてください。

Vauleにあるprivate_keyの値を控えてください。

symbol-cliにて上記のprivate_keyをimportします。
項目 | 入力値 |
---|---|
Select the network type | MIJIN_TEST |
Enter the Symbol node URL | 控えていたKey「mijinEndpint」のURLを入力 |
Enter a profile name | 任意のプロファイル名を入力 |
Enter your wallet password | 任意のパスワードを入力 |
Do you want to set the account as the default profile | DefaultProfileにするかどうか、ここではYesを選択 |
Select an import type | PrivateKey |
Enter your account private key | 控えていたprivate_keyを入力 |
$ 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
アカウントの情報を確認します。
Balance Informationが基軸通貨(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 │
└──────────────────┴─────────────────┴─────────────────┴───────────────────┘
空アカウントの登録
Cloudformation Stack内にあるOutoutsタブを再度表示します。 Key「emptyAddress」のValueのURLをクリックしてください。

Valueにアドレスが10件登録されているため、1つ目のprivate_keyを控えてください。

symbol-cliにて上記のprivate_keyをimportします。
項目 | 入力値 |
---|---|
Select the network type | MIJIN_TEST |
Enter the Symbol node URL | 控えていたKey「mijinEndpint」のURLを入力 |
Enter a profile name | 任意のプロファイル名を入力 |
Enter your wallet password | 任意のパスワードを入力 |
Do you want to set the account as the default profile | DefaultProfileにするかどうか、ここではNoを選択 |
Select an import type | PrivateKey |
Enter your account private key | 控えていたprivate_keyを入力 |
$ 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
この時点でアカウントを確認しても、存在しないことになっています。
ブロックチェーン上で、このアドレスのやり取りがないため、存在を確認できないからです。
$ 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
基軸通貨を送信する
先程登録した空のアドレスに対して、基軸通貨を送信してみます。 以下のコマンドを実行し、AddressのValueを控えてください。
$ 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 │
└──────────────────┴──────────────────────────────────────────────────────────────────┘
1cat.currencyを空のアドレスへ送信します。
項目 | 入力値 |
---|---|
Mosaics to transfer in the format | cat.currencyは可分性6のため、1送る場合は以下のようにする @cat.currency::1000000 |
Enter the recipient address | ここでは、プロファイル「mijin-free-empty1」のアドレスを指定 |
Enter a message | トランザクションのメッセージを追加 test |
Enter the maximum fee | トランザクション手数料を指定。手数料は計算が必要だが、ここでは以下を指定 20000 |
$ 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'
トランザクションが送信できたかを確認します。
$ 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 │
└─────────────┴──────────────────────────────────────────────────────────────────┘
送信元のアカウントを確認します。
1cat.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 │ 1,998.999 │ 1998999005 │ Never │
└──────────────────┴─────────────────┴─────────────────┴───────────────────┘
送信元の空アドレスを確認します。
1cat.currecnyを持っていることを確認できます。
$ 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 │
└──────────────────┴─────────────────┴─────────────────┴───────────────────┘