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.
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