Algorand

Algorand

Algorand can be accessed with the following coin types:

EnvironmentCoin TypeFaucet
Algorand Productionalgo
Algorand Testnettalgohttps://bank.testnet.algorand.network/

Generating wallets

To create an Algo wallet using BitGoJS:

1 2 3 4 5 6 7 8 9 10 11 bitgo .coin('talgo') .wallets() .generateWallet({ label: 'My Test Wallet', passphrase: 'secretpassphrase1a5df8380e0e30', }) .then(function (wallet) { // print the new wallet console.dir(wallet); });

To create an Algo wallet using the platform API:

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/talgo/wallet/generate

Algorand accounts must maintain a minimum balance of 100,000 microAlgos (0.1 Algos). Account operations (send, receive, etc) that trigger a balance lower than the minimum are not permitted.

In addition every enabled token will increase the minimum balance in 100,000 microAlgos. For example :

  • given a wallet without tokens enabled minimum balance is 100,000 microalgos.
  • given a wallet with one token enabled minimum balance is 200,000 microAlgos
  • given a wallet with two token enabled minimum balance is 300,000 microAlgos

Creating addresses

1 2 3 4 5 6 7 8 9 10 11 bitgo .coin('talgo') .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/talgo/wallet/$WALLET/address

Algorand is an account-based coin. The creation of receive addresses results in additional accounts. When a user receives funds on a receive address, those funds need to be consolidated in the base address of the wallet first in order to be spent. See Consolidate account.

Sending

Funds can only be sent out from the wallet's base address. If your wallet has sufficient funds but you are unable to send, you may first need to sweep the funds from the receive addresses into the base address by calling Consolidate account.

Note: sendMany is not supported as Algo transactions only support one input and one output.

Balances

Algo (ALGO) is the native asset of the Algorand blockchain. The base unit of Algo is microAlgo:

  • 1 microAlgo is (10-6) or 0.000001 Algo.
  • 1 Algo is (106) or 1000000 microAlgos (1 million).

Note: The minimum earning unit (MEU) of Algorand is 1 Algo.

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.

Tokens

Algorand supports tokens transactions. This means you can now make transactions with other tokens apart from native algo coin.

Enable token

In order to make token transactions you first need to enable the token in your wallet address(es). Once enabled, you will be able to receive and send that respective token. This process will take some fees from your account (1,000 microAlgos is the minimum and most common fee for enabling tokens).

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 bitgo .coin('talgo:tokenID') .wallets() .get({ id: walletId }) .then(function (wallet) { return wallet.sendMany({ type: 'enabletoken', recipients: [ { amount: '0', address: yourWalletAddress, }, ], feeRate: 1, yourWalletPassphrase, }); });

Disable token

In order to reduce minimum balance needed into account, or just for stop receiving transactions from some tokens, you can disable each previous enabled from your wallet address(es).

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 bitgo .coin('talgo:tokenID') .wallets() .get({ id: walletId }) .then(function (wallet) { return wallet.sendMany({ type: 'disabletoken', recipients: [ { amount: '0', address: yourWalletAddress, }, ], feeRate: 1, yourWalletPassphrase, closeRemainderTo, }); });

Note: closeRemainderTo is the address you want to send all remaining token balance when disable it.

Send tokens

Just as for your native token (ALGOs) you would be able to send tokens (from token enabled addresses) to other wallets. Here is an example of it:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 bitgo .coin('talgo:tokenID') .wallets() .get({ id: walletId }) .then(function (wallet) { return wallet.sendMany({ type: 'transfer', recipients: [ { amount, receiverAddress, }, ], walletPassphrase: yourWalletPassphrase, }); });

Receive tokens

Once you have enabled the token you desire, and the token enable transaction has been confirmed, you will be able to receive tokens from other wallets.

Rewards

Accounts holding at least 1 MEU (1 Algo or more) are eligible to earn rewards. Rewards are accrued in the Algorand network and claimed by a specific account when a transaction involving that account is confirmed.

BitGo does not keep track of pending rewards. Balances only account for rewards received in confirmed pay transactions.

Reward calculation is complex and the amounts change every 500,000 blocks (the Rewards Period). To learn more, see Algorand Rewards - A Technical Overview.

Fee rate

Algorand's minimum transaction fee is 1000 microAlgos. For example, if you set feeRate to "1" microAlgo/kByte and the fee size is 247 kBytes, then the fee amount=247 microAlgos. But because this is less than the required minimum, the default of 1000 microAlgos is applied.