Skip to main content

Get Started with CLI Wallet

This quick start guide covers basic steps you need to set up Alphabill command-line wallet (CLI wallet), get testnet assets in your wallet, and make a transaction from your wallet on public Alphabill testnet.

info

If you have already set up CLI wallet, you can skip the first two steps and start from step 3.

Prerequisites

  • The Alphabill repository is private and visible only to GitHub users who have been given direct permission to see the repository. If you don't have access to the repository, sign up for Alphabill Discord using the invite link and request access on the #github-access channel.

  • To build Alphabill CLI binary, you must have following build dependencies installed on your system:

    • Go (version 1.21 and later). For installation instructions, see Go's installation guide.
    • C compiler, recent versions of GCC are recommended. In Debian and Ubuntu repositories, GCC is part of the build-essential package. If you are on macOS, you can install GCC with Homebrew.

Step 1: Build Alphabill CLI Binary

  1. Clone the remote Alphabill repository to create your local copy:

    git clone https://github.com/alphabill-org/alphabill
  2. Once you have cloned the repository, go to the new alphabill directory and run the make build command:

    make build

    This command will download all necessary build dependencies, run the tests, and build the alphabill binary. The output directory for the binary is /alphabill/build.

Step 2: Create a New Wallet

  1. To create a new wallet, go to the build directory and run the wallet create command:

    ./alphabill wallet create

    This command returns mnemonic key you can use to recover your wallet. The mnemonic key, also known as a recovery phrase or a seed phrase, is a unique 12-word phrase that is generated when you create a new wallet. This phrase is the key to your wallet and controls access to all your funds.

    Warning

    Write down the phrase in the exact order in which you receive it, and keep it in a safe, offline place. You will only see this phrase once during the wallet creation. Never give your wallet's seed phrase to anyone, as it can be used to steal your wallet funds.

    The wallet create command creates a database for keys that will be used by the wallet, located at ~/.alphabill/wallet/accounts.db.

  2. List the wallet public key you just created using the wallet get-pubkeys command:

    ./alphabill wallet get-pubkeys
    Example response:

    #1 0x029871a8fbc1844d41ddd7cf0ceb292dbe33b8c29694c9675d13f8926f5deeb00b

    Make a note of it, including the 0x prefix, as you will need it in later steps.

  3. Also add a second public key to your wallet, as you need it later when transferring testnet ALPHA:

    ./alphabill wallet add-key
    Example response:

    Added key #2 0x03ddeb805aba6bb56b5f6351d51f44d11a374070032f95be5841e9b6420099a00a

Step 3: Request Testnet Assets

Once you have set up your wallet, you can request testnet assets from the faucet by using Alphabill Discord channel. The faucet distributes a standard amount of testnet ALPHA and fungible tokens to a specific address. If you haven't yet signed up for Alphabill Discord, then join now using the invite link.

  1. Go to the #testnet-faucet channel, paste your wallet public key address into the channel's chat window, and press Enter.

  2. You will get automatic replies to your message as "Bills sent!" and "Tokens sent!".

    payment-sent

    info

    For each request, the faucet transfers 100 ALPHA and 100 TEST-FT tokens to the given address. The testnet faucet imposes a maximum number of requests for a period of time. By default, the faucet service accepts 5 requests per day per address.

  3. In a matter of seconds, you should see 100 ALPHA and 100 TEST-FT tokens on your wallet balance. You may need to click Refresh to update the balance.

    • Check your wallet balance:

      ./alphabill wallet get-balance \
      --alphabill-api-uri https://money-backend.testnet.alphabill.org
      Example response:

      #1 100.000'000'00
      #2 0.000'000'00
      Total 100.000'000'00

    • List tokens in your wallet:

      ./alphabill wallet token list \
      --alphabill-api-uri https://tokens-backend.testnet.alphabill.org
      Example response:

      Tokens owned by account #1
      ID='4BBD81AB755A26741C19C1AAB54B61031D5FC5C1E7A053521D94B3421DE243D8', symbol='TEST-FT', amount='100.000'000', token-type='DE4EE474E513FFACAC81D0141CF334A1DDFD366340E0D4F619DD4266895A25FD' (fungible)
      Tokens owned by account #2

Step 4: Add Fee Credits

Before you can make any transaction from your wallet, you need to have enough funds on your fee credit balance to cover the associated transaction costs. Each wallet account (public key) has its own fee credit balance for every partition.

Transaction fees are paid in Alphabill native currency ALPHA, and the fee per transaction is 0.000'000'01 ALPHA. Actions that consist of two transactions (2 x 0.000'000'01 ALPHA): adding fee credits, reclaiming fee credits, and consolidating bills.

  1. Add 1 ALPHA to your fee credit balance for managing fees on Money Partition:

    ./alphabill wallet fees add \
    --alphabill-api-uri https://money-backend.testnet.alphabill.org \
    --log-file ~/.alphabill/wallet.log
    Example response:

    Successfully created 1 fee credits on money partition.
    Paid 0.000'000'01 fee for transferFC transaction from wallet balance.
    Paid 0.000'000'01 fee for addFC transaction from fee credit balance.

    If you want to add 1 ALPHA to other partition's fee credit balance, specify the partition name and its backend URL:

    • User Token Partition

      ./alphabill wallet fees add \
      --alphabill-api-uri https://money-backend.testnet.alphabill.org \
      --partition tokens \
      --partition-backend-url https://tokens-backend.testnet.alphabill.org \
      --log-file ~/.alphabill/wallet.log
    • EVM Partition

      ./alphabill wallet fees add \
      --alphabill-api-uri https://money-backend.testnet.alphabill.org \
      --partition evm \
      --partition-backend-url https://evm-partition.testnet.alphabill.org \
      --log-file ~/.alphabill/wallet.log
    tip

    If you want to add more funds to the fee credit balance than the default 1 ALPHA, use the --amount flag at the end of the command and specify the amount.

  2. Check your wallet fee credit balance on Money Partition:

    ./alphabill wallet fees list \
    --alphabill-api-uri https://money-backend.testnet.alphabill.org
    Example response:

    Partition: money
    Account #1 0.999'999'98
    Account #2 0.000'000'00

    To check the fee credit balance on other partitions:

    • User Token Partition

      ./alphabill wallet fees list \
      --alphabill-api-uri https://money-backend.testnet.alphabill.org \
      --partition tokens \
      --partition-backend-url https://tokens-backend.testnet.alphabill.org
    • EVM Partition

      ./alphabill wallet fees list \
      --alphabill-api-uri https://money-backend.testnet.alphabill.org \
      --partition evm \
      --partition-backend-url https://evm-partition.testnet.alphabill.org

Step 5: Transfer Assets

  1. Transfer a bill worth of 10 ALPHA to your second account:

    ./alphabill wallet send \
    --address INSERT_YOUR_WALLET_PUBKEY_#2 \
    --alphabill-api-uri https://money-backend.testnet.alphabill.org \
    --amount 10 \
    --log-file ~/.alphabill/wallet.log

    You should see similar output like in the example below:

    Example response:

    Successfully confirmed transaction(s)
    Paid 0.000'000'01 fees for transaction(s).

  2. Finally, check your wallet balance:

    ./alphabill wallet get-balance \
    --alphabill-api-uri https://money-backend.testnet.alphabill.org
    Example response:

    #1 89.000'000'00
    #2 10.000'000'00
    Total 99.000'000'00

Next Steps

  • See the tokens quick start guide to create, mint and transfer your own fungible and non-fungible tokens using CLI wallet.
  • The smart contracts quick guide shows you how to deploy and execute smart contracts implemented in Solidity on Alphabill EVM Partition using the CLI wallet.