Skip to Content

XRPL(XRP Ledger)

XRPL (XRP Ledger) is fundamentally different from other public blockchains like Ethereum and Solana. In a nutshell: while other chains act as “general-purpose computers,” XRPL functions as a “banking system with built-in features.” Within the XRP Ledger, Reserves and Trustlines are the two core financial mechanisms that set it apart from other chains. They are designed to maintain ledger cleanliness and prevent malicious asset spam.

  • Reserves: Accounts on XRPL come with a “cost.” To prevent the creation of massive numbers of malicious addresses that could clutter node memory (ledger bloat attacks), XRPL introduced the Reserve mechanism::

    1. Base Reserve: Activating a new account currently requires 10 XRP. When transferring to a new address, the initial transaction must be at least 10 XRP, or it will fail. Note: This 10 XRP is locked on the ledger and cannot be withdrawn (unless you choose to delete/terminate the account, at which point a portion is refundable).
    2. Owner Reserve: For every “object” attached to the account, an additional 2 XRP must be locked. These objects include trustlines, DEX open offers, NFT pages, or multi-sign settings. Logic: If you have 3 trustlines (holding 3 different tokens), your account will have $10 + (3 \times 2) = 16$ XRP in a locked state that cannot be spent.
  • Trustlines: This is the cornerstone of XRPL’s security. On Ethereum (EVM), anyone can air-drop “shitcoins” into your wallet; however, on XRPL, no one can send you a token unless you explicitly agree to it.

    1. Two-way Authorization: If you wish to hold a specific token (e.g., USDT issued by Issuer A), you must first send a TrustSet transaction. This transaction essentially says: “I trust the USDT asset provided by Issuer A and authorize my account to hold it.”
    2. Limit: When establishing a trustline, you can set a maximum cap (e.g., “I am willing to hold a maximum of 1 million of this token”).
    3. Asset Isolation: In XRPL, a token is defined by its Currency Code + Issuer Address. Even if two tokens are both named “CNY,” if the issuer addresses are different, they are treated as completely isolated assets that do not interfere with each other.

Wallet Standard

MethodSupported
connect
network
isConnected
disconnect
signMessage
signTransaction
sendTransaction

Connect to Bitget Wallet

Provider

const provider = window.bitkeep.xrp;

Connect

Preview

Usage

const provider = window.bitkeep?.xrp; await provider?.connect();

Try It

Loading live editor...

Sign Message

Preview

Parameters

type signedMessageInput string;

Returns

type signedMessageOutput string;

Usage

// @param signedMessageInput // @return signedMessageOutput const provider = window.bitkeep?.xrp; await provider?.signMessage(message);

Try It

Loading live editor...

Sign And Send Transaction

Chrome
App
Preview
Preview
const TrustSetTx = { TransactionType: "TrustSet", Account: address, LimitAmount: { currency: "524C555344000000000000000000000000000000", issuer: `rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De`, value: "100000000", }, }; const provider = window.bitkeep?.xrp; const sig = await provider.sendTransaction(TrustSetTx); console.log(sig); const dropsPerXrp = "1000000"; const paymentTx = { TransactionType: "Payment", Account: senderWallet.classicAddress, Destination: destWallet.classicAddress, Amount: (1 * Number(dropsPerXrp)).toString(), // 1 XRP }; const provider = window.bitkeep?.xrp; const txid = await provider.sendTransaction(paymentTx); console.log(txid);
Last updated on