ripple-wallet-cli の導入と基本操作
● ripple-wallet-cli の導入
1. nvm のダウンロード
$ git clone https://github.com/creationix/nvm.git ~/.nvm $ source ~/.nvm/nvm.sh
Cloning into '/home/ubuntu/.nvm'... remote: Enumerating objects: 11, done. remote: Counting objects: remote: Counting objects: 100% (11/11), done. remote: Compressing objects: remote: Compressing objects: 100% (9/9), done. Receiving objects: remote: Total 7297 (delta 2), reused 8 (delta 2), pack-reused 7286 Receiving objects: Receiving objects: 100% (7297/7297), 2.32 MiB | 4.57 MiB/s, done. Resolving deltas: Resolving deltas: 100% (4589/4589), done.
2. nvm のインストール
$ nvm install 10.15.0
Downloading and installing node v10.15.0... Downloading https://nodejs.org/dist/v10.15.0/node-v10.15.0-linux-x64.tar.xz... ##O=-# # 0.1% 0.3%# 0.9%#### 2.1%######## 4.4%############## 7.3%###################### 11.6%##################################### 19.3%################################################## 26.1%############################################################### 32.9%############################################################################ 39.5%######################################################################################### 46.6%###################################################################################################### 53.2%##################################################################################################################### 61.0%################################################################################################################################### 67.9%################################################################################################################################################## 75.9%################################################################################################################################################################ 83.3%############################################################################################################################################################################### 91.2%############################################################################################################################################################################################## 98.9%################################################################################################################################################################################################# 100.0% Computing checksum with sha256sum Checksums matched! Now using node v10.15.0 (npm v6.4.1)
3. ripple-wallet-cli のインストール
$ npm install -g ripple-wallet-cli
[..................] / rollbackFailedOptional: verb npm-session 2f3cc929f5059233 [..................] | fetchMetadata: sill resolveWithNewModule ripple-wallet-cli@1.1.3 checking installable status [..................] - fetchMetadata: sill resolveWithNewModule ripple-lib@1.0.0-beta.0 checking installable status [..................] - fetchMetadata: sill resolveWithNewModule color-convert@1.9.3 checking installable status [..................] | fetchMetadata: sill resolveWithNewModule has-flag@3.0.0 checking installable status [..................] - fetchMetadata: sill resolveWithNewModule has-flag@3.0.0 checking installable status [ .................] \ fetchMetadata: sill resolveWithNewModule restore-cursor@2.0.0 checking installable status [ .................] \ fetchMetadata: sill resolveWithNewModule mimic-fn@1.2.0 checking installable status [ .................] | fetchMetadata: sill resolveWithNewModule os-tmpdir@1.0.2 checking installable status [ .................] - loadDep:strip-ansi: sill resolveWithNewModule symbol-observable@1.0.1 checking installable status [ ................] | fetchMetadata: sill resolveWithNewModule ansi-regex@3.0.0 checking installable status [ ................] / fetchMetadata: sill resolveWithNewModule inherits@2.0.3 checking installable status [ ................] \ fetchMetadata: sill resolveWithNewModule babel-runtime@5.8.38 checking installable status [ ...............] \ fetchMetadata: sill resolveWithNewModule core-js@1.2.7 checking installable status [ ...............] / fetchMetadata: sill resolveWithNewModule ripple-hashes@0.3.1 checking installable status [ ...............] - fetchMetadata: sill resolveWithNewModule debug@3.2.6 checking installable status [ ...............] | fetchMetadata: sill resolveWithNewModule es6-promise@4.2.5 checking installable status [ ...............] \ fetchMetadata: sill resolveWithNewModule create-hash@1.2.0 checking installable status [ ...............] - fetchMetadata: sill resolveWithNewModule md5.js@1.3.5 checking installable status [ ...............] | fetchMetadata: sill resolveWithNewModule hash-base@3.0.4 checking installable status [ ...........] \ diffTrees: sill install generateActionsToTake [ ...........] - extract:ripple-wallet-cli: verb lock using /home/ubuntu/.npm/_locks/staging-d99f3fc276c8223b.lock for /home/ubuntu/.nvm/versions/node/v10.15.0/lib/node_modules/.staging [ ..........] - extract:inherits: sill extract symbol-observable@1.0.1 [ .........] - extract:color-convert: sill extract iconv-lite@0.4.24 [ .........] / extract:agent-base: sill extract agent-base@^4.1.0 extracted to /home/ubuntu/.nvm/versions/node/v10.15.0/lib/node_modules/.staging/agent-base-caa6328c (356ms) [ ........] | extract:create-hash: sill extract create-hash@^1.1.2 extracted to /home/ubuntu/.nvm/versions/node/v10.15.0/lib/node_modules/.staging/create-hash-241dd954 (155ms) [ .......] \ extract:@types/node: sill extract @types/node@* extracted to /home/ubuntu/.nvm/versions/node/v10.15.0/lib/node_modules/.staging/@types/node-c022954a (515ms) [ .......] | extract:iconv-lite: sill extract iconv-lite@^0.4.17 extracted to /home/ubuntu/.nvm/versions/node/v10.15.0/lib/node_modules/.staging/iconv-lite-11eee509 (217ms) [ .......] / extract:ripple-hashes: sill extract ripple-hashes@^0.3.1 extracted to /home/ubuntu/.nvm/versions/node/v10.15.0/lib/node_modules/.staging/ripple-hashes-a484e3bc (327ms) [ .......] - extract:ripple-binary-codec: sill extract ripple-binary-codec@^0.1.13 extracted to /home/ubuntu/.nvm/versions/node/v10.15.0/lib/node_modules/.staging/ripple-binary-codec-0cb652 [ ......] / extract:babel-runtime: sill extract babel-runtime@^5.8.20 extracted to /home/ubuntu/.nvm/versions/node/v10.15.0/lib/node_modules/.staging/babel-runtime-256eb41f (808ms) [ ......] \ extract:@types/lodash: sill extract @types/lodash@^4.14.85 extracted to /home/ubuntu/.nvm/versions/node/v10.15.0/lib/node_modules/.staging/@types/lodash-0fe77f11 (1124ms) [ ......] / extract:ripple-lib: sill extract ripple-lib@1.0.0-beta.0 extracted to /home/ubuntu/.nvm/versions/node/v10.15.0/lib/node_modules/.staging/ripple-lib-57881479 (962ms) [ ......] - extract:lodash: sill extract lodash@^4.3.0 extracted to /home/ubuntu/.nvm/versions/node/v10.15.0/lib/node_modules/.staging/lodash-2bd8bc21 (1273ms) [ ......] \ extract:core-js: sill extract core-js@^2.4.0 extracted to /home/ubuntu/.nvm/versions/node/v10.15.0/lib/node_modules/.staging/core-js-5916630c (1387ms) [ ......] \ finalize:es6-promisify: sill finalize /home/ubuntu/.nvm/versions/node/v10.15.0/lib/node_modules/ripple-wallet-cli/node_modules/es6-promisify [ ......] | refresh-package-json:ripple-wallet-cli: timing action:finalize Completed in 60ms [ ......] | refresh-package-json:safe-buffer: sill refresh-package-json /home/ubuntu/.nvm/versions/node/v10.15.0/lib/node_modules/ripple-wallet-cli/node_modules/safer-buffer/home/ubuntu/.nvm/versions/node/v10.15.0/bin/ripple-wallet-cli -> /home/ubuntu/.nvm/versions/node/v10.15.0/lib/node_modules/ripple-wallet-cli/bin/cmd.js [ ......] \ install:ripple-wallet-cli: sill doSerial install 624+ ripple-wallet-cli@1.1.3 added 78 packages from 89 contributors in 3.863s
※ ripple-wallet-cli の接続先は export RIPPLE_API="**://アドレス:ポート" で変更する。
●ウォレット作成
$ ripple-wallet-cli generate
----------------------------------------------- Ripple Wallet Generate Wallet ----------------------------------------------- Public address: rMPzJ******************** Wallet secret: sstGF******************** Print this wallet and make sure to store it somewhere safe! Note: You need to put at least 20 XRP on this key for it to be an active account
●残高照会
$ ripple-wallet-cli balance rHb9C********************
----------------------------------------------- Ripple Wallet Balance Check ----------------------------------------------- Current Balance ***.*** XRP Last 10 transactions trustline trustline trustline order trustline trustline trustline trustline trustline trustline
●送金処理
$ ripple-wallet-cli pay
----------------------------------------------- Ripple Wallet Make Payment ----------------------------------------------- ? Enter XRP amount to send: ? Enter destination address: ? Enter destination tag (optional): ? Enter sender secret: Current destination balance: *** XRP Current sender balance: ***.*** XRP ? Ready to send? (y/N) Preparing payment transaction... Submitting payment... Waiting for balance to update (use Ctrl-C to abort) New source balance: ***.*** XRP New destination balance: *** XRP