Celo

Celo

Celo can be accessed with the following coin types:

EnvironmentCoin TypeFaucet
Celo Productioncelo
Celo Testnettcelohttps://celo.org/developers/faucet

Enterprise fee address

1 2 3 4 5 ENTERPRISEID=585c51a5df8380e0e3082e46 curl -X POST \ -H "Authorization: Bearer $ACCESS_TOKEN" \ https://app.bitgo-test.com/api/v2/tcelo/enterprise/$ENTERPRISEID/feeAddressBalance

Celo uses the same fee address structure as Ethereum. Each enterprise has a fee address that is used to pay for transaction fees on all Celo wallets in that enterprise. The fee address is displayed in the dashboard of the BitGo website, and you must fund it before creating a wallet, address, or sending a transaction.

If the enterprise's fee address runs out of funds, you cannot create new wallets or addresses, and cannot send transactions until you fund the fee address. If the balance of your fee address gets too low, you will not be able to fund it with one of your own Celo wallets (because you will not be able to send transactions from your Celo wallet). BitGo recommends that you create and fund a non-BitGo Celo account, so you can use it to fund your BitGo enterprise fee address. Any open source Celo wallet can be used to create an account.

Note: A best practice is to create and fund a non-BitGo Celo account to fund your BitGo enterprise fee address.

Note that the fee address is a single-signature account, and the private key is created and owned by BitGo. You cannot send funds out of the fee address once you have sent them in. There is a feeAddress field under the CoinSpecific key for Celo wallets. Use this address to pay the fees for creating transactions and addresses.

Generating wallets

1 2 3 4 5 6 7 8 9 10 11 12 bitgo .coin('tcelo') .wallets() .generateWallet({ label: 'My Test Wallet', passphrase: 'secretpassphrase1a5df8380e0e30', enterprise: '5612c2beeecf83610b621b90964448cd', }) .then(function (wallet) { // print the new wallet console.dir(wallet); });
1 2 3 4 5 6 7 8 LABEL="My Test Wallet" PASSPHRASE="secretpassphrase1a5df8380e0e30" curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $ACCESS_TOKEN" \ -d "{ \"label\": \"$LABEL\", \"passphrase\": \"$PASSPHRASE\" }" \ http://$BITGO_EXPRESS_HOST:3080/api/v2/tcelo/wallet/generate

Before you can use a Celo wallet, it must be initialized on the Celo blockchain. A funding transaction must first be sent to the wallet's address. When BitGo detects this funding transaction, it automatically sends another initialization transaction to set up the signers and the home domain of the account.

Until the initialization transaction is confirmed, the wallet is not ready for use, and the receive address is not exposed in the API. This is to protect users from losing funds by sending to a wallet that does not exist on the network.

Warning: Do not use a Celo wallet while it is being initialized or you may lose funds.

Creating addresses

1 2 3 4 5 6 7 8 9 10 11 bitgo .coin('tcelo') .wallets() .getWallet({ id: '585c51a5df8380e0e3082e46' }) .then(function (wallet) { return wallet.createAddress(); }) .then(function (newAddress) { // print new address details console.dir(newAddress); });
1 2 3 4 5 WALLET=585c51a5df8380e0e3082e46 curl -X POST \ -H "Authorization: Bearer $ACCESS_TOKEN" \ https://app.bitgo-test.com/api/v2/tcelo/wallet/$WALLET/address

As with Celo wallets, Celo address must be initialized on the Celo blockchain before they can be used.

To deploy a receive address contract, BitGo sends a transaction on the Celo network. Remember that you must fund the fee address. Like wallet creation process, a Celo address is not immediately usable and so the caller of this function must wait for the initialization transaction to be confirmed before attempting to fetch, or send to, the address.

Warning: Do not use a Celo address while it is being initialized or you may lose funds.

Balances

CELO (CELO) is the native asset of the Celo blockchain. The base unit of CELO is wei:

  • 1 wei is (10-18) or 0.000000000000000001 CELO.
  • 1 CELO is (1018) or 1000000000000000000 wei (1 quintillion).

Balances are supported in string format: balanceString, confirmedBalanceString, and spendableBalanceString.

Transactions

BitGo's Celo multisig contract currently only supports one sender and one recipient so the sendMany is not supported.