XRPL
Last updated
Last updated
The XRP Ledger is a decentralized cryptographic ledger powered by a network of peer-to-peer servers. It is fast, energy efficient, and reliable, with low transaction costs. XRP is the native cryptocurrency of the XRP Ledger, used to facilitate transactions on the network.
Accounts:
Transactions:
Consensus:
Fees:
To interact with the XRP Ledger, you need a wallet. You can use various wallet solutions, such as:
For development purposes, you can generate a test wallet using the .
Import the SDK and create a new instance:
The with_reconnect
parameter is optional and defaults to true
. It is used to specify whether the SDK should attempt to reconnect to the XRPL if the web socket connection is lost.
The XRPL SDK uses a web socket connection. HTTP RPCs are not supported.
To perform transactions, connect your wallet to the SDK:
You can view the address of your connected wallet using the getAddress
method:
To get the balance of an account:
To create a transaction to transfer XRP, use the preparePay
method:
The signedTx
object contains the signed transaction that can be used in a DEMOS transaction.
To prepare multiple transfers at once, use the preparePays
method:
For more advanced use cases, you can access the underlying API to have more control over the transactions and interactions with the blockchain.
Here is a list of the objects you can access:
instance.provider
instance.wallet
instance.signTransaction(s)
Sign one or multiple transactions
xrplGetLastSequence
Get the last sequence number for an address
The DEMOS XRPL SDK is built on top of the , and provides a limited set of methods to interact with the XRP Ledger.
The instance from the xrpl
library
The instance for the connected account