cli_wallet Server

Access the RPC port of the blockchain and record the information and transaction of the blockchain.
You can run it as a websocket server with the -r option.
Do not run both the websocket server mode and the normal mode at the same file. You may lose your wallet private key.
Keep the wallet.json file generated after creating the wallet safely.

Setting

Download and run the execute file.

$ wget  http://developer.aladdinchain.io/download/adc_testnet_wallet.gz
$ gzip -d adc_testnet_wallet.gz
$ chmod 777 cli_wallet
$ cli_wallet -s ws://[node ip]:[rpc port]
Logging RPC to file: logs/rpc/rpc.log
Starting a new wallet
Wallet is online mode
1384016ms th_a       main.cpp:178                  startOnlineWallet    ] wdata.ws_server: ws://127.0.0.1:7002
1384017ms th_a       main.cpp:183                  startOnlineWallet    ] wdata.ws_user:  wdata.ws_password:
1384017ms th_a       websocket_api.cpp:88          on_message           ] message: {"id":1,"result":true}
1384017ms th_a       websocket_api.cpp:88          on_message           ] message: {"id":2,"result":0}
1384018ms th_a       websocket_api.cpp:88          on_message           ] message: {"id":3,"result":3}
Please use the set_password method to initialize a new wallet before continuing
new >>>

websocket

You can run it as a websocket server by adding the -r-d option.

$ ./cli_wallet -s ws://127.0.0.1:7002 -r 0.0.0.0:11222 -d
Logging RPC to file: logs/rpc/rpc.log
Starting a new wallet
Wallet is online mode
3298161ms th_a       main.cpp:178                  startOnlineWallet    ] wdata.ws_server: ws://127.0.0.1:7002
3298162ms th_a       main.cpp:183                  startOnlineWallet    ] wdata.ws_user:  wdata.ws_password:
3298162ms th_a       websocket_api.cpp:88          on_message           ] message: {"id":1,"result":true}
3298163ms th_a       websocket_api.cpp:88          on_message           ] message: {"id":2,"result":0}
3298163ms th_a       websocket_api.cpp:88          on_message           ] message: {"id":3,"result":3}
Please use the set_password method to initialize a new wallet before continuing
3298163ms th_a       main.cpp:226                  startOnlineWallet    ] Listening for incoming RPC requests on 0.0.0.0:11222
3298163ms th_a       main.cpp:290                  startOnlineWallet    ] Entering Daemon Mode, ^C to exit

Password

You must set a password when you first run cli_wallet.

  • A wallet.json file is created on the same path as the executable file, and key information of the wallet created with cli_wallet is recorded.
> {"jsonrpc": "2.0", "method": "set_password", "params": ["my_password"], "id":1 }

< {"id":1,"result":null}
Copy
new >>> set_password my_password
set_password my_password
null
locked >>>
                        
Copy

Unlock

To access your stored wallet, you must unlock your wallet.

> {"jsonrpc": "2.0", "method": "unlock", "params": ["my password"], "id":1 }

< {"id":1,"result":null}
Copy
locked >>>
unlock my password
locked >>> unlock my password
null

unlocked >>>
Copy

©2021 ADC. All rights reserved.

Close

Create Post

Close

Edit Post

Close

Post Password

Please enter the password
you entered when writing the post to edit the post.

Close

Post Password

Please enter the password
you entered when creating the post to delete the post.

Close

Please enter a nickname.

Your post has been completed.