XRPL
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.Core Concepts
- Accounts: XRPL Accounts
- Transactions: Transaction Basics
- Consensus: XRPL Consensus
- Fees: XRPL Fees
Setting up your wallet
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 XRPL Faucet.Creating the SDK Instance
Import the SDK and create a new instance: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.
Connecting your wallet
To perform transactions, connect your wallet to the SDK:getAddress method:
Getting balance
To get the balance of an account:Token transfer
To create a transaction to transfer XRP, use thepreparePay method:
signedTx object contains the signed transaction that can be used in a DEMOS transaction.
Multiple transfers
To prepare multiple transfers at once, use thepreparePays method: