Guides
Flare
Overview
Flare is the blockchain for data , offering developers and users secure, decentralized access to high-integrity data from other chains and the internet. The Flare Layer-1 network uniquely supports enshrined data protocols at the network layer, making it the only EVM-compatible smart contract platform optimized for decentralized data acquisition, including price and time-series data, blockchain event and state data, and Web2 API data.
Explorer
https://flare-explorer.flare.network/
Wallets Types
BitGo enables holding Flare in the following wallet types:
| Multisig Cold | Multisig Hot | MPC Cold | MPC Hot | |
|---|---|---|---|---|
| Custody | ❌ | ❌ | ✅ | ❌ |
| Self-Custody | ❌ | ❌ | ✅ | ✅ |
Ticker Symbols
| Mainnet | Testnet |
|---|---|
| flr | tflr |
Faucet
You can use a faucet to obtain free testnet Flare for development and testing purposes.
Faucet: https://faucet.flare.network/
Units
Each flare consists of 1,000,000,000,000,000,000 (1018) wei, so not even a single flare can be stored numerically without exceeding the range of JavaScript numbers. Gas fees use gwei.
- 1 flare =
1018wei - 1 wei =
10-18flare - 1 gwei =
10-9flare
For that reason, only string balance properties are available, which are balanceString, confirmedBalanceString, and
spendableBalanceString.
Tokens
The Flare blockchain natively supports tokens.
Create Wallet
export BITGO_EXPRESS_HOST="<YOUR_LOCALHOST>"
export COIN="tflr"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
export LABEL="<DESIRED_WALLET_NAME>"
export PASSPHRASE="<YOUR_BITGO_LOGIN_PASSPHRASE>"
export ENTERPRISE_ID="<YOUR_ENTERPRISE_ID>"
curl -X POST \
http://$BITGO_EXPRESS_HOST/api/v2/$COIN/wallet/generate \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{
"label": "'"$LABEL"'",
"passphrase": "'"$PASSPHRASE"'",
"enterprise": "'"$ENTERPRISE_ID"'",
"walletVersion": 4
}'
bitgo
.coin('tflr')
.wallets()
.generateWallet({
label: 'My Test Wallet',
passphrase: 'secretpassphrase1a5df8380e0e30',
enterprise: '5612c2beeecf83610b621b90964448cd',
walletVersion: 4,
})
.then(function (wallet) {
// print the new wallet
console.dir(wallet);
});
Create Address
export WALLET="585c51a5df8380e0e3082e46"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
curl -X POST \
-H "Authorization: Bearer $ACCESS_TOKEN" \
https://app.bitgo-test.com/api/v2/tflr/wallet/$WALLET/address
bitgo
.coin('tflr')
.wallets()
.getWallet({ id: '585c51a5df8380e0e3082e46' })
.then(function (wallet) {
return wallet.createAddress();
})
.then(function (newAddress) {
// print new address details
console.dir(newAddress);
});
Consolidate Balance
Consolidation Fee Source: Flare Gas Tank
Flare uses forwarders, so it does not support manual consolidation
Estimate Fee
export COIN="tflr"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
curl -X GET \
https://app.bitgo-test.com/api/v2/$COIN/tx/fee \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $ACCESS_TOKEN"
const BitGoJS = require('../../../src/index.js');
const bitgo = new BitGoJS.BitGo({ env: 'test' });
const accessToken = '<YOUR_ACCESS_TOKEN>';
const coin = 'tflr';
async function getFeeEstimate() {
try {
await bitgo.authenticateWithAccessToken({ accessToken });
const res = await bitgo.coin(coin).feeEstimate({ numBlocks: 2 });
console.dir(res);
} catch (err) {
console.error('Error fetching fee estimate:', err);
}
}
getFeeEstimate();
Transact
Withdrawal Fee Source: Wallet Base Address
export BITGO_EXPRESS_HOST="<YOUR_LOCALHOST>"
export COIN="tflr"
export WALLET_ID="<YOUR_WALLET_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
export ADDRESS="<DESTINATION_ADDRESS>"
export AMOUNT="<AMOUNT_IN_BASE_UNITS>"
export WALLET_PASSPHRASE="<YOUR_WALLET_PASSPHRASE>"
curl -X POST \
http://$BITGO_EXPRESS_HOST/api/v2/$COIN/wallet/$WALLET_ID/sendcoins \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{
"address": "'"$ADDRESS"'",
"amount": "'"$AMOUNT"'",
"walletPassphrase": "'"$WALLET_PASSPHRASE"'"
}'
export BITGO_EXPRESS_HOST="<YOUR_LOCALHOST>"
export COIN="tflr"
export WALLET_ID="<YOUR_WALLET_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
export ADDRESS_1="<DESTINATION_ADDRESS_1>"
export AMOUNT_1="<AMOUNT_1_IN_BASE_UNITS>"
export WALLET_PASSPHRASE="<YOUR_WALLET_PASSPHRASE>"
curl -X POST \
http://$BITGO_EXPRESS_HOST/api/v2/$COIN/wallet/$WALLET_ID/sendmany \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{
"recipients": [
{
"address": "'"$ADDRESS_1"'",
"amount": "'"$AMOUNT_1"'"
}
],
"walletPassphrase": "'"$WALLET_PASSPHRASE"'"
}'
const tx = await fundedWallet.send({
address: `<DESTINATION_ADDRESS>`,
amount: `<AMOUNT>`,
walletPassphrase: process.env.PASSWORD as string,
});
let params = {
recipients: [
{
amount: "<AMOUNT_1>",
address: "<DESTINATION_ADDRESS_1>",
}
],
walletPassphrase: "<YOUR_WALLET_PASSPHRASE>",
};
wallet.sendMany(params).then(function (transaction) {
// Print transaction details
console.dir(transaction);
});
Cross-Chain Transfers
Move native FLR between Flare's C-Chain (flr) and P-Chain (flrp) in either direction. Each transfer requires two separate on-chain transactions: export from the source chain, then import on the destination chain. The exported amount remains in shared atomic UTXO memory until the import confirms. An export alone does not complete the transfer.
Use an MPC/TSS wallet and wait for the export to confirm before importing. If the assets are staked, complete the applicable unstaking process before transferring them.
| Chain | Mainnet | Testnet | Address | Base unit |
|---|---|---|---|---|
| C-Chain | flr |
tflr |
0x EVM address |
wei: 1 FLR = 10^18 wei |
| P-Chain | flrp |
tflrp |
Bech32 P-Chain address | nanoFLR: 1 FLR = 10^9 nanoFLR |
Amounts are decimal strings, not floating-point numbers. One nanoFLR equals 10^9 wei.
Prerequisites
- Create MPC wallets for the relevant network and fund the source wallet. Set up BitGo Express for the
sendmanyexamples. The examples use testnet: useflrandflrpfor mainnet, and the corresponding BitGo environment. - Obtain the FLRP wallet ID and its
coinSpecific.rootAddress. The C-to-P export recipient must be the root address of a BitGo FLRP wallet. For a P-to-C import, use a0xaddress recorded on a BitGo FLR wallet. - Have an access token and the wallet passphrase available. These examples use
jqto encode the JSON request bodies. Replace the placeholders before running them. Never commit credentials or expose your Express server publicly.
export BITGO_API="https://app.bitgo-test.com"
export EXPRESS="http://localhost:3080"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
export FLR_WALLET_ID="<YOUR_TFLR_WALLET_ID>"
export FLRP_WALLET_ID="<YOUR_TFLRP_WALLET_ID>"
export FLRP_ROOT_ADDRESS="<YOUR_TFLRP_ROOT_ADDRESS>"
export FLR_ADDRESS="<YOUR_BITGO_TFLR_ADDRESS>"
export WALLET_PASSPHRASE="<YOUR_WALLET_PASSPHRASE>"
WALLET_PASSPHRASE must correspond to the wallet used in each call. If the two wallets use different passphrases, change it when switching wallets.
Create a Paired C-Chain Wallet (Optional)
If you have an MPC FLRP wallet, create a corresponding FLR wallet sharing its key triple. The request goes to the BitGo API, not Express. If a paired wallet already exists, the endpoint returns it instead of creating another. The paired wallet ID is stored in coinSpecific.pairedWalletId.
curl -X POST "$BITGO_API/api/v2/tflrp/wallet/$FLRP_WALLET_ID/create-paired-wallet" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"label":"My FLR C-Chain Wallet"}'
FLR C-Chain to FLRP P-Chain
1. Export from C-Chain
Call sendmany on the FLR wallet with type: Export. The recipient is the registered coinSpecific.rootAddress of the FLRP wallet, and the amount is in wei. This example requests 500 FLR. Wallet Platform adds the estimated P-Chain import fee, including a 20% buffer, to the exported UTXO. Ensure the C-Chain wallet can cover the amount and applicable fees.
jq -n --arg address "$FLRP_ROOT_ADDRESS" --arg passphrase "$WALLET_PASSPHRASE" \
'{type: "Export", recipients: [{address: $address, amount: "500000000000000000000"}], walletPassphrase: $passphrase}' |
curl -X POST "$EXPRESS/api/v2/tflr/wallet/$FLR_WALLET_ID/sendmany" \
-H "Authorization: Bearer $ACCESS_TOKEN" -H 'Content-Type: application/json' -d @-
2. Check the Export (Optional)
After confirmation, query the FLRP wallet for atomic UTXOs exported from C-Chain and awaiting import. Amounts in the response are in nanoFLR.
curl "$BITGO_API/api/v2/tflrp/wallet/$FLRP_WALLET_ID/crossChainUnspents?sourceChain=C" \
-H "Authorization: Bearer $ACCESS_TOKEN"
3. Import to P-Chain
Call sendmany on the FLRP wallet with type: Import and an empty recipients array. The FLRP wallet imports to its own unlock addresses.
jq -n --arg passphrase "$WALLET_PASSPHRASE" \
'{type: "Import", recipients: [], walletPassphrase: $passphrase}' |
curl -X POST "$EXPRESS/api/v2/tflrp/wallet/$FLRP_WALLET_ID/sendmany" \
-H "Authorization: Bearer $ACCESS_TOKEN" -H 'Content-Type: application/json' -d @-
FLRP P-Chain to FLR C-Chain
Both transactions are built and signed using the FLRP wallet. Wallet Platform routes the C-Chain import broadcast to the C-Chain node.
1. Export from P-Chain
Call sendmany on the FLRP wallet with type: Export. Specify the amount in nanoFLR and leave the recipient address empty: the export locks the UTXO to the C-Chain keys of the FLRP wallet itself. Supply the destination 0x address during import, not export. This example exports 500 FLR. To check the maximum spendable amount, call GET /api/v2/tflrp/wallet/{walletId}/maximumSpendable.
jq -n --arg passphrase "$WALLET_PASSPHRASE" \
'{type: "Export", recipients: [{address: "", amount: "500000000000"}], walletPassphrase: $passphrase}' |
curl -X POST "$EXPRESS/api/v2/tflrp/wallet/$FLRP_WALLET_ID/sendmany" \
-H "Authorization: Bearer $ACCESS_TOKEN" -H 'Content-Type: application/json' -d @-
2. Check the Export (Optional)
After confirmation, query the FLRP wallet for atomic UTXOs exported from P-Chain and awaiting import on C-Chain.
curl "$BITGO_API/api/v2/tflrp/wallet/$FLRP_WALLET_ID/crossChainUnspents?sourceChain=P" \
-H "Authorization: Bearer $ACCESS_TOKEN"
3. Import to C-Chain
Call sendmany on the FLRP wallet with type: ImportToC. The 0x recipient must be an address record belonging to a BitGo FLR wallet. The amount field is "0" in the import request.
jq -n --arg address "$FLR_ADDRESS" --arg passphrase "$WALLET_PASSPHRASE" \
'{type: "ImportToC", recipients: [{address: $address, amount: "0"}], walletPassphrase: $passphrase}' |
curl -X POST "$EXPRESS/api/v2/tflrp/wallet/$FLRP_WALLET_ID/sendmany" \
-H "Authorization: Bearer $ACCESS_TOKEN" -H 'Content-Type: application/json' -d @-
MPC Transaction Requests
For a manual MPC flow, create a transaction request for each export and import with POST /api/v2/wallet/{walletId}/txrequests on the BitGo API. Use the FLR wallet ID for C-to-P export and the FLRP wallet ID for the other three operations. After creating each request, complete the appropriate approval, signing, and broadcast flow for your wallet type. See Self-Custody MPC (Manual) or Custody MPC. The intentType values are lowercase.
C-to-P export, with the FLRP root address and an amount in wei:
{
"apiVersion": "full",
"intent": {
"intentType": "export",
"recipients": [{
"address": { "address": "<TFLRP_ROOT_ADDRESS>" },
"amount": { "value": "500000000000000000000", "symbol": "tflr" }
}]
}
}
C-to-P import, with no recipients:
{
"apiVersion": "full",
"intent": {
"intentType": "import",
"sourceChain": "C",
"destinationChain": "P",
"recipients": []
}
}
P-to-C export, with an empty address and an amount in nanoFLR:
{
"apiVersion": "full",
"intent": {
"intentType": "export",
"recipients": [{
"address": { "address": "" },
"amount": { "value": "500000000000", "symbol": "tflrp" }
}]
}
}
P-to-C import, with the BitGo FLR address:
{
"apiVersion": "full",
"intent": {
"intentType": "importtoc",
"destinationChain": "C",
"recipients": [{ "address": { "address": "<BITGO_TFLR_ADDRESS>" } }]
}
}
Troubleshooting
| Error | Action |
|---|---|
Invalid flrp recipient address for export transaction |
Use the coinSpecific.rootAddress registered on the FLRP wallet for C-to-P export. |
recipient address must be empty |
Set the P-to-C export recipient address to "". Provide the destination address in the import. |
expecting recipients to be an empty array |
Set recipients to [] for C-to-P import. |
missing c-chain recipient |
Provide the destination 0x recipient for P-to-C import. |
Failed to find receiver wallet |
Use an address recorded on a BitGo flr or tflr wallet, matching the network. |
If the export has not confirmed or its atomic UTXO is not yet visible, wait for confirmation before attempting the import.
Stake
The Flare P-Chain supports staking. For the staking workflow, see Stake Assets.