XRP

XRP

XRP is the native asset on the XRP Ledger blockchain. XRP can be accessed with the following coin types:

EnvironmentCoin TypeFaucet
XRP Productionxrp
XRP Altnettxrp
XRP Testnettxrphttps://xrpl.org/resources/dev-tools/xrp-faucets/

Explorer

https://livenet.xrpl.org/

Generating wallets

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

Before you can use an XRP wallet, it must be initialized on the XRP blockchain (or XRP Ledger). When you create an XRP wallet, BitGo sends 4 initialization transactions on the XRP network to generate the wallet.

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 an XRP wallet while it is being initialized or you may lose funds.

The fee for creating an XRP wallet is currently 12 XRP. In production, there is limit of 5 wallets total per enterprise plus a mandatory payment agreement. In testnet, there is no limit.

Note: To inquire about increasing your limit, contact BitGo at support@bitgo.com.

Creating addresses

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

A key difference between XRP and Bitcoin is that XRP has no concept of UTXOs, and operates on an account-based model instead. Additionally, XRP transactions only support one input and one output. That means that the sendMany call is not supported.

The BIP-32 standard therefore cannot be taken advantage of, and hence generated XRP addresses differ only in their sequentially incrementing destination tag components.

Destination tags indicate beneficiaries or destinations for payments. You can make transactions without a destination tag. However, a destination tag is required when sending to a BitGo wallet.

Balances

XRP (XRP) is the native asset of the XRP ledger. The base unit of XRP is drop:

  • 1 drop is (10-6) or 0.000001 XRP.
  • 1 XRP is (106) or 1000000 drops (1 million).

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

Transactions

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