XRPL is a decentralized public blockchain. With Tatum, you can access the most commonly used XRPL methods. These methods bring a certain level of abstraction and are used for applications that communicate with the blockchain directly. Some of the methods are used alongside virtual accounts to connect the blockchain and a virtual account, like generating a wallet or getting information about transactions.
Tatum supports the following XRPL networks:
To start using the XRPL blockchain, create an XRPL account. On XRPL, the same account is used for the mainnet and the testnet. To activate the account, credit it with 20 XRP.
Because of the activation requirement, it is common to use one account for all customers and differentiate them via Destination
tags. A Destination
tag is a number included in every transaction as an account distinguisher.
When an off-chain deposit address is created for a virtual account, a Destination
tag is generated for that account (for example, 12345
). When you make a transaction to the blockchain, be sure to include the address of the recipient and the Destination
tag as an account distinguisher. Examples of working with the XRP blockchain can be found in Tatum XRP SDK.
Generate XRP account. Tatum does not support HD wallet for XRP, only specific address and private key can be generated.
OK
Unauthorized. Not valid or inactive subscription key present in the HTTP Header.
Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.
Internal server error. There was an error on the server while processing the request.
{- "address": "rPRxSZzTFd6Yez3UMxFUPJvnhUhjewpjfV",
- "secret": "snSFTHdvSYQKKkYntvEt8cnmZuPJB"
}
Get XRP Blockchain last closed ledger index and hash.
OK
Unauthorized. Not valid or inactive subscription key present in the HTTP Header.
Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.
Internal server error. There was an error on the server while processing the request.
{- "ledger_hash": "20C40AAF14D52FB614E41625218AF6C97B43076C30060E85AEFB38D54A99050F",
- "ledger_index": 760383
}
Get XRP Blockchain fee. Standard fee for the transaction is available in the drops.base_fee section and is 10 XRP drops by default. When there is a heavy traffic on the blockchain, fees are increasing according to current traffic.
OK
Unauthorized. Not valid or inactive subscription key present in the HTTP Header.
Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.
Internal server error. There was an error on the server while processing the request.
{- "current_ledger_size": "8",
- "current_queue_size": "0",
- "drops": {
- "base_fee": "10",
- "median_fee": "5000",
- "minimum_fee": "10",
- "open_ledger_fee": "10"
}, - "expected_ledger_size": "67",
- "ledger_current_index": 760411,
- "levels": {
- "median_level": "128000",
- "minimum_level": "256",
- "open_ledger_level": "256",
- "reference_level": "256"
}, - "max_queue_size": "2000"
}
List all Account transactions.
OK
Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.
Unauthorized. Not valid or inactive subscription key present in the HTTP Header.
Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.
Internal server error. There was an error on the server while processing the request.
{- "account": "rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe",
- "ledger_index_max": 760762,
- "ledger_index_min": 614,
- "marker": {
- "ledger": 759571,
- "seq": 2
}, - "transactions": [
- {
- "meta": {
- "AffectedNodes": [
- {
- "CreatedNode": {
- "LedgerEntryType": "AccountRoot",
- "LedgerIndex": "0C9EDA0CDF11B0ACBF4B356C329607E5DDC25B7FCCC51A12579B58220AF6AF54",
- "NewFields": {
- "Account": null,
- "Balance": null,
- "Sequence": null
}
}
}
], - "TransactionIndex": 2,
- "TransactionResult": "tesSUCCESS",
- "delivered_amount": "1000000000"
}, - "tx": {
- "hash": "1A32A054B04AC9D6814710DDCA416E72C4CD2D78D6C3DFC06CC9369CC4F6B250",
- "ledger_index": 760469,
- "Account": "rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe",
- "Amount": "1000000000",
- "Destination": "rDA3DJBUBjA1X3PtLLFAEXxX31oA5nL3QF",
- "Fee": "12",
- "TransactionType": "Payment",
- "Flags": 2147483648,
- "LastLedgerSequence": 760473,
- "Sequence": 118697,
- "date": 622916620,
- "inLedger": 760469,
- "SigningPubKey": "02356E89059A75438887F9FEE2056A2890DB82A68353BE9C0C0C8F89C0018B37FC",
- "TxnSignature": "304402206BB719587C55513515C092122813BC71C0BA28E7061830ABE6395308A1CAA0B302205B8256181965BB1345902597B2D3F1670F5F23A2E62097B3CCAA1F2EE631655E",
- "meta": {
- "AffectedNodes": [
- {
- "ModifiedNode": {
- "FinalFields": { },
- "LedgerEntryType": null,
- "LedgerIndex": null,
- "PreviousFields": { },
- "PreviousTxnID": null,
- "PreviousTxnLgrSeq": null
}
}
], - "TransactionIndex": 2,
- "TransactionResult": "tesSUCCESS",
- "delivered_amount": "1000000000"
}, - "validated": true
}, - "validated": true
}
]
}
Get ledger by sequence.
OK
Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.
Unauthorized. Not valid or inactive subscription key present in the HTTP Header.
Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.
Internal server error. There was an error on the server while processing the request.
{- "ledger": {
- "accepted": true,
- "account_hash": "9E081790E520046EBA4B2ED3869C762C16EEAC6817293D40AFFD1F1B602A2321",
- "close_flags": 0,
- "close_time": 640976331,
- "close_time_human": "2020-Apr-23 16:58:51.000000000 UTC",
- "close_time_resolution": 10,
- "closed": true,
- "hash": "198E3A43EFD03F61CF11EAD6585E8C82A21C1B91CCF782A3264973867E697906",
- "ledger_hash": "198E3A43EFD03F61CF11EAD6585E8C82A21C1B91CCF782A3264973867E697906",
- "ledger_index": "6543210",
- "parent_close_time": 640976330,
- "parent_hash": "02860E47A797340505B51DE00E21AA576B1E50509C0C7FF8D5475954DA5FE7B5",
- "seqNum": "6543210",
- "totalCoins": "99999971496551645",
- "total_coins": "99999971496551645",
- "transaction_hash": "F415CCAB1ED22B2E81C8BE588A0521634F1CBC478BE3A5563B1E09D283A082C9",
- "transactions": [
- {
- "hash": "1A32A054B04AC9D6814710DDCA416E72C4CD2D78D6C3DFC06CC9369CC4F6B250",
- "ledger_index": 760469,
- "Account": "rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe",
- "Amount": "1000000000",
- "Destination": "rDA3DJBUBjA1X3PtLLFAEXxX31oA5nL3QF",
- "Fee": "12",
- "TransactionType": "Payment",
- "Flags": 2147483648,
- "LastLedgerSequence": 760473,
- "Sequence": 118697,
- "date": 622916620,
- "inLedger": 760469,
- "SigningPubKey": "02356E89059A75438887F9FEE2056A2890DB82A68353BE9C0C0C8F89C0018B37FC",
- "TxnSignature": "304402206BB719587C55513515C092122813BC71C0BA28E7061830ABE6395308A1CAA0B302205B8256181965BB1345902597B2D3F1670F5F23A2E62097B3CCAA1F2EE631655E",
- "meta": {
- "AffectedNodes": [
- {
- "ModifiedNode": {
- "FinalFields": { },
- "LedgerEntryType": null,
- "LedgerIndex": null,
- "PreviousFields": { },
- "PreviousTxnID": null,
- "PreviousTxnLgrSeq": null
}
}
], - "TransactionIndex": 2,
- "TransactionResult": "tesSUCCESS",
- "delivered_amount": "1000000000"
}, - "validated": true
}
]
}, - "ledger_hash": "198E3A43EFD03F61CF11EAD6585E8C82A21C1B91CCF782A3264973867E697906",
- "ledger_index": 6543210,
- "validated": true
}
Get XRP Transaction by transaction hash.
OK
Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.
Unauthorized. Not valid or inactive subscription key present in the HTTP Header.
Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.
Internal server error. There was an error on the server while processing the request.
{- "hash": "1A32A054B04AC9D6814710DDCA416E72C4CD2D78D6C3DFC06CC9369CC4F6B250",
- "ledger_index": 760469,
- "Account": "rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe",
- "Amount": "1000000000",
- "Destination": "rDA3DJBUBjA1X3PtLLFAEXxX31oA5nL3QF",
- "Fee": "12",
- "TransactionType": "Payment",
- "Flags": 2147483648,
- "LastLedgerSequence": 760473,
- "Sequence": 118697,
- "date": 622916620,
- "inLedger": 760469,
- "SigningPubKey": "02356E89059A75438887F9FEE2056A2890DB82A68353BE9C0C0C8F89C0018B37FC",
- "TxnSignature": "304402206BB719587C55513515C092122813BC71C0BA28E7061830ABE6395308A1CAA0B302205B8256181965BB1345902597B2D3F1670F5F23A2E62097B3CCAA1F2EE631655E",
- "meta": {
- "AffectedNodes": [
- {
- "ModifiedNode": {
- "FinalFields": {
- "Account": "rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe",
- "Balance": "99871289963167439",
- "Flags": 0,
- "OwnerCount": 0,
- "Sequence": 118698
}, - "LedgerEntryType": "AccountRoot",
- "LedgerIndex": "31CCE9D28412FF973E9AB6D0FA219BACF19687D9A2456A0C2ABC3280E9D47E37",
- "PreviousFields": {
- "Balance": "99871290963167451",
- "Sequence": 118697
}, - "PreviousTxnID": "C72E7E2C5D6C123F739689DD6C286910667CC4C2C65F8E6CBBE264E32B08E1B4",
- "PreviousTxnLgrSeq": 760443
}
}
], - "TransactionIndex": 2,
- "TransactionResult": "tesSUCCESS",
- "delivered_amount": "1000000000"
}, - "validated": true
}
Get XRP Account info.
OK
Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.
Unauthorized. Not valid or inactive subscription key present in the HTTP Header.
Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.
Internal server error. There was an error on the server while processing the request.
{- "account_data": {
- "Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
- "Balance": "1000000000",
- "Flags": 0,
- "LedgerEntryType": "AccountRoot",
- "OwnerCount": 0,
- "PreviousTxnID": "1A32A054B04AC9D6814710DDCA416E72C4CD2D78D6C3DFC06CC9369CC4F6B250",
- "PreviousTxnLgrSeq": 760469,
- "Sequence": 1,
- "index": "BB899D5C7C5E13AFFD702514FC78BE59313AC72AF02A3FC94E5F54F05EB2E20D"
}, - "ledger_current_index": 760476,
- "validated": false
}
Get XRP Account Balance. Obtain balance of the XRP and other assets on the account.
OK
Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.
Unauthorized. Not valid or inactive subscription key present in the HTTP Header.
Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.
Internal server error. There was an error on the server while processing the request.
{- "assets": [
- {
- "balance": "1000000000",
- "currency": "015841551A748AD2C1F76FF6ECB0CCCD00000000"
}
], - "balance": "1000000000"
}
Send XRP from account to account.
This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key.
No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and loss of funds. In this method, it is possible to enter privateKey
or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production,
Tatum KMS should be used for the highest security standards, and signatureId should be present in the request.
Alternatively, using the Tatum client library for supported languages.
OK
Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.
Unauthorized. Not valid or inactive subscription key present in the HTTP Header.
Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.
Internal server error. There was an error on the server while processing the request.
{- "fromAccount": "rPRxSZzTFd6Yez3UMxFUPJvnhUhjewpjfV",
- "to": "rPRxSZzTFd6Yez3UMxFUPJvnhUhjewpjfV",
- "amount": "10000",
- "fromSecret": "snSFTHdvSYQKKkYntvEt8cnmZuPJB"
}
{- "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9"
}
Create / Update / Delete XRP trust line between accounts to transfer private assets.
By creating trustline for the first time, the asset is created automatically and can be used in the transactions.
Account setting rippling must be enabled on the issuer account before the trust line creation to asset work correctly.
Creating a trust line will cause an additional 5 XRP to be blocked on the account.
This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key.
No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and loss of funds. In this method, it is possible to enter privateKey
or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production,
Tatum KMS should be used for the highest security standards, and signatureId should be present in the request.
Alternatively, using the Tatum client library for supported languages.
OK
Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.
Unauthorized. Not valid or inactive subscription key present in the HTTP Header.
Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.
Internal server error. There was an error on the server while processing the request.
{- "fromAccount": "rPRxSZzTFd6Yez3UMxFUPJvnhUhjewpjfV",
- "issuerAccount": "rsP3mgGb2tcYUrxiLFiHJiQXhsziegtwBc",
- "limit": "10000",
- "token": "DA39A3EE5E6B4B0D3255BFEF95601890AFD80709",
- "fromSecret": "snSFTHdvSYQKKkYntvEt8cnmZuPJB"
}
{- "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9"
}
Modify XRP account settings. If an XRP account should be an issuer of the custom asset, this accounts should have rippling enabled to true.
In order to support off-chain processing, required destination tag should be set on the account.
This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key.
No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and loss of funds. In this method, it is possible to enter privateKey
or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production,
Tatum KMS should be used for the highest security standards, and signatureId should be present in the request.
Alternatively, using the Tatum client library for supported languages.
OK
Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.
Unauthorized. Not valid or inactive subscription key present in the HTTP Header.
Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.
Internal server error. There was an error on the server while processing the request.
{- "fromAccount": "rPRxSZzTFd6Yez3UMxFUPJvnhUhjewpjfV",
- "fromSecret": "snSFTHdvSYQKKkYntvEt8cnmZuPJB"
}
{- "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9"
}
Broadcast signed transaction to XRP blockchain. This method is used internally from Tatum KMS or Tatum client libraries. It is possible to create custom signing mechanism and use this method only for broadcasting data to the blockchain.
OK
Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.
Unauthorized. Not valid or inactive subscription key present in the HTTP Header.
Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.
Internal server error. There was an error on the server while processing the request.
{- "txData": "62BD544D1B9031EFC330A3E855CC3A0D51CA5131455C1AB3BCAC6D243F65460D"
}
{- "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9"
}