Skip to content
XRPAuthority

Read the code. Run the idea.

A practical XRPL workspace for developers who want to see the JSON, execute the safe parts, and understand what the open-source server does next.

Interactive code lab

Change an input. Run the code. Inspect the result.

These examples execute in your browser. The live ledger sample makes a read-only request to a public XRPL server; none of the examples signs or submits a transaction.

JavaScriptCore logic
const DROPS_PER_XRP = 1_000_000n;

function xrpToDrops(xrp) {
  const [whole, fraction = ""] = xrp.split(".");
  return (
    BigInt(whole) * DROPS_PER_XRP +
    BigInt(fraction.padEnd(6, "0"))
  ).toString();
}

xrpToDrops("12.345678");
OutputJSON
Run a sample to see its output.
Developer tinker bench

Probe the protocol without risking funds.

Four small experiments turn common XRPL implementation details into inspectable output. Everything is local except the allowlisted, read-only Mainnet request.

No signing surface

No seed, secret, wallet connection, transaction signing, or submission method is accepted by this bench.

Read the current open-ledger fee requirements and queue conditions in drops.

Fixed endpointhttps://xrplcluster.com/
JavaScriptExperiment logic
const request = {
  "method": "fee",
  "params": [
    {}
  ]
};

const response = await fetch(
  "https://xrplcluster.com/",
  {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify(request)
  }
);

const { result } = await response.json();
OutputJSON
Choose an experiment, then run it to inspect the output.
Why flags matter

Readable names become one integer.

Transaction flags are bit values combined into the unsigned Flags field. The composer shows both decimal JSON output and the hexadecimal representation used in protocol references.

Why encoding matters

Human text is not ledger bytes.

Memo fields store hexadecimal data, while close times use a ledger-specific epoch. Seeing each conversion makes explorers, indexers, and debugging output easier to reason about.

xrpld source map

From API request to validated ledger.

The production server is primarily C++. These links point into the public repository so an example can be followed into the implementation.

Execution model

What happens after your code runs?

  1. 01

    Construct

    Your application creates a case-sensitive transaction object. XRP values are integer drops, and tags are unsigned integers.

  2. 02

    Autofill and sign

    A client or wallet adds account state such as Sequence, Fee, and an expiration ledger, then signs locally. Secrets never belong in sample code.

  3. 03

    Submit and apply

    An XRPL server checks the signed transaction and tentatively applies it to its open-ledger view. The first response is not final.

  4. 04

    Reach consensus

    Servers agree on the candidate set and canonical order for the next ledger; validators publish signed validations.

  5. 05

    Verify

    Your application looks up the transaction until validated is true, then reads TransactionResult and delivered_amount from metadata.

Primary references

Examples are intentionally small. Production integrations should follow maintained documentation, handle server failures and pagination, and use a reliable submission process.

Build from a verified foundation.

Continue into the developer curriculum for APIs, subscriptions, pagination, simulation, metadata, and result codes.

Open developer guides