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.

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.

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.

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