Creditcoin CLI

creditcoin is a terminal-based general-purpose tool developed by the Creditcoin team and includes all the essential functionalities required to manage CTC balances, manage nominator and validator accounts, and initialize EVM accounts.

The creditcoin terminal is available in the docker image specified in the Using a Docker container guide.

Creditcoin CLI is recommended for users with previous CLI and technical experience. If you have no systems administrator or CLI tools experience, consider using a GUI wallet. For detailed information about the Creditcoin CLI refer to the documentation on Github or use the --help command.

Creating accounts

Create accounts using the new command and write down the newly generated mnemonic phrase and store it securely.

creditcoin new

Sending & Receiving CTC

The CLI tool also allows sending and receiving CTC. To send funds use the send command as shown below. It will prompt you for the seed phrase of the account from which funds will be sent.

creditcoin send --amount <amount> --substrate-address <address>

To receive CTC, you can provide the sender with the receiving account's address.

Showing an Account's Address

To get an account's address from its seed phrase, use the show-address command. The show-address command will prompt you for the seed phrase.

creditcoin show-address

Checking your Balance

You can check the balance of an account using the command below. This is an unauthenticated command; it does not require the private key or seed phrase to the account. Verify that creditcoin is connected to a node you trust to provide you with accurate data. You can check the balance of any account without incurring transaction fees.

creditcoin balance --substrate-address <address>

Staking

You can stake CTC by using the bond command with an amount. You will be prompted for your stash account's seed phrase. You can use the --reward-destination flag to change how the staking rewards will be handled. The default is Staked, which will re-stake the rewards, but it can be changed to Stash to keep them unstaked and available to use.

creditcoin bond --amount <amount> --reward-destination <Staked/Stash>

Once CTC was successfully bonded, the account can be used to set up a new validator node or nominate validators.

If you want to set up a Validator or become a Nominator, read the detailed guides and make sure you understand both the risks and the responsibilities.

Interacting with EVM accounts

You can also use the CLI to fund EVM accounts and withdraw CTC received from an EVM transfer using the evm command.

You can fund an EVM account using a Substrate account with the fund command:

creditcoin evm fund --amount <amount> --evm-address <address>

To withdraw from the EVM side, you must send funds to the EVM account associated to your Substrate account. Get your associated EVM address with the convert-address command.

The conversion done by the convert-address command is not a two-way function. If you run it again using the resulting address you will get yet another different Substrate or EVM address. Make sure you have the private keys for the account you are converting before sending funds to its associated address.

creditcoin convert-address <address>

Then send funds to your associated EVM account from any EVM account and withdraw them by running the withdraw command.

creditcoin evm withdraw

This will transfer all CTC from your associated EVM account to your Substrate account.

For a full list of the EVM features of creditcoin check the evm --help command.

Last updated