Cardano

Cardano (ADA)

Cardano can be accessed with the following coin types:

EnvironmentCoin TypeFaucet
Cardano Productionada
Cardano Testnettadahttps://docs.cardano.org/cardano-testnets/tools/faucet

For testnet faucet, you have the option for Preprod or Preview testnet faucet funds. Preview refers to the time before the Vasil hard-fork, and Preprod refers to the most recent testnet. For the current testnet, use Preprod funds.

Note: Don't attempt to withdraw ADA from a BitGo wallet to a Byron address. BitGo wallets don't support withdrawing to Byron addresses. You can identify Byron addresses by their prefix DdzFFz.

Generating wallets

1 2 3 4 5 6 7 8 9 10 11 bitgo .coin('tada') .wallets() .generateWallet({ label: 'My Test Wallet', passphrase: 'secretpassphrase1a5df8380e0e30', }) .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/tada/wallet/generate

You can create wallets with a single line of code using the BitGo SDK.

Creating addresses

Note: BitGo doesn't support creating Byron addresses.

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

Balances

Cardano (ADA) is the native asset of the Cardano blockchain. The base unit of Cardano is a Lovelace (1/1000000) of 1 ADA coin:

  • 1 Lovelace is (10-6) or 0.0000001 ADA.
  • 1 Bitcoin is (106) or 1000000 Lovelace (1 million).

Balances are the sum of all the unspents in a given wallet.

Balances are supported in string and number format but string is recommended to ensure values do not exceed the programmable number limit: balanceString, confirmedBalanceString, and spendableBalanceString.

Fee rate

Cardano's fee rate depends on the size of the transaction in bytes. The formula for determining the minimum fee required to cover the transaction is based on two protocol parameters, a and b.

The formula for determining the minimum fee is (a * size(tx)) + b.

Transactions

Cardano uses a UTXO model, which supports multiple inputs and multiple outputs of a transaction.

Transactions on Cardano have a minimum UTXO amount of 1 ADA. This means that in your transaction unspents, you cannot have any value less than 1 UTXO.

You can use the sendMany() function to send ADA to multiple receive addresses.

Staking

The BitGo web UI doesn't currently support staking ADA. However, you can stake ADA by sending a staking transaction in BitGoJS. You can view scripts to stake, unstake, and withdraw rewards in BitGoJS/examples/js/ada.

Consolidation

In order to consolidate funds into your root address via SDK, you can use the following:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 async function consolidate(walletId) { await bitgo.authenticateWithAccessToken({ accessToken }); const unlock = await bitgo.unlock({ otp: '000000', duration: 3600 }); if (!unlock) { console.log('We did not unlock.'); throw new Error(); } const walletInstance = await bitgo.coin(coin).wallets().get({ id: walletId }); const consolidationTxs = await walletInstance.sendAccountConsolidations({ walletPassphrase: walletPassphrase, }); console.dir(JSON.stringify(consolidationTxs, null, 2)); }