Skip to Content

Create a Supra Account

A profile holds an account’s keys and the network that the CLI sends the account’s transactions to. The CLI keeps its profiles in the configs directory of your network’s directory, so each network’s container has its own profiles. Setup Supra CLI creates the first one. This page creates more, imports an existing account and manages them.

Run the commands on this page in the shell of your network’s container.

Generate a new account

supra profile new <PROFILE_NAME> --network devnet

The CLI generates a new key pair, stores it under <PROFILE_NAME> and makes the new profile the active one. The first profile you create also sets the password that protects the CLI’s profile database.

Profile names must be unique within a container. supra profile new with a name that is already taken fails.

Or import an existing account

To use an account you already have, give its address:

supra profile new <PROFILE_NAME> --account-address <ACCOUNT_ADDRESS> --network devnet

The CLI asks for the private key that currently authenticates the account. For an account that has never rotated its authentication key, that is the account’s own private key.


Managing Profiles

List profiles: supra profile list

supra profile list

This prints each profile’s account address, public keys and network, and marks the active profile with (*). supra profile list <PROFILE_NAME> prints one profile.

Show private keys: supra profile list --reveal-secrets

This prints the private keys of all profiles to your terminal. Anyone who can see your screen, a recording or a screen share of it can then take control of the accounts.

supra profile list --reveal-secrets

-r is the short form of --reveal-secrets. The CLI asks for the password in the terminal, even when the CLI_PROFILE_PASSWORD environment variable is set.

Change the active profile: supra profile activate

supra profile activate <PROFILE_NAME>

CLI commands use the active profile. To use another profile for a single command, pass --profile <PROFILE_NAME> to it.

Change a profile’s network: supra profile modify

supra profile modify <PROFILE_NAME> --network <NETWORK>

--network takes testnet, mainnet or localnet in the Testnet and Mainnet images, and also devnet in the Devnet image. It sets the profile’s chain ID, RPC URL and faucet URL to that network’s. For a network without a name, set them with --chain-id, --rpc-url and --faucet-url instead.

A container’s CLI is the release that its network runs. To use a profile on another network, create it in that network’s container, as described in Using more than one network.


Check a balance and send SUPRA

After the account is funded, for example from the faucet on Devnet and Testnet, check its balance:

supra move account balance

This prints the balance of the active profile’s account. --profile <PROFILE_NAME> selects another profile, and --account <ADDRESS> looks up any account.

To send SUPRA from the active profile’s account:

supra move account transfer --account <RECIPIENT_ADDRESS> --amount <AMOUNT>

--amount is in quants, where one SUPRA is 100,000,000 quants. --simulate runs the transfer on the RPC node without committing it. By default the command moves SUPRA. To move another coin, pass --coin-type <COIN_TYPE> for a coin type or --fa-address <FA_ADDRESS> for a fungible asset, which cannot be combined. balance takes the same two options.

Last updated on