How to send using CLI
To use your wallet with Klever Toolchain, you will need to map your wallet private key (the .pem file created in the session How to create a wallet) into the toolchain by adding:
-v $(pwd)/wallet:/opt/klever-blockchain
Or if you are using a self-hosted node, use
--network=host
to access the local node API. You can also use a public node by adding an environment variable into the toolchain:-e KLEVR_NODE=
https://node.mainnet.klever.finance
Send tokens with the following code:
docker run -it --rm --user "$(id -u):$(id -g)" \
-v $(pwd)/wallet:/opt/klever-blockchain \
--network=host \
--entrypoint=/usr/local/bin/operator \
kleverapp/klever-go:latest \
--key-file=./walletKey.pem \
--node=https://node.mainnet.klever.finance \
account send klv1h7vx629mwuv4pnecn0k9clxp9rt7rquat3kvydgu8npt20e0ntjq3jhd40 137
On the last line, after the "send" command (
send klv1h7vx629mwuv4pnecn0k9clxp9rt7rquat3kvydgu8npt20e0ntjq3jhd40 137
), the code represents the following scheme: [TO] [AMOUNT]. [TO]
is the address to whom the tokens are being sent.[AMOUNT]
is how much is being sent.--kda
is the Asset ID.If no
--kda
is passed, as in the example above, the default KDA is KLV.Here is another example, sending KFI:
docker run -it --rm --user "$(id -u):$(id -g)" \
-v $(pwd)/wallet:/opt/klever-blockchain \
--network=host \
--entrypoint=/usr/local/bin/operator \
kleverapp/klever-go:latest \
--key-file=./walletKey.pem \
--node=https://node.mainnet.klever.finance \
account send klv1h7vx629mwuv4pnecn0k9clxp9rt7rquat3kvydgu8npt20e0ntjq3jhd40 \
137 --kda=KFI
Last modified 1yr ago