Menu
Developers / Verification / XRPL Demo

XRPL Verification Live Demo

Verifies RLUSD trust-line balances and returns signed boolean attestations for merchant eligibility. Try it live with your own r-address.

Scenario: A coffee shop wants to give 10% off to customers holding 100+ RLUSD. The merchant calls POST /v1/attest with the customer's r-address. The API checks the trust line balance and returns a signed boolean — eligible or not — without ever exposing the actual balance. The response is ECDSA P-256 signed and verifiable by anyone at /.well-known/jwks.json.

How an XRPL Attestation Works

1

The Request

You send a POST request with the XRPL wallet address, the token issuer, and a minimum balance threshold. The API checks the trust line without ever exposing the actual balance.

POST /v1/attest
{
  "xrplWallet": "ra8xqX4QhcogFfxpMxMByvFnXyxw9E8rzY",
  "conditions": [
    {
      "type": "token_balance",
      "chainId": "xrpl",
      "contractAddress": "rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De",
      "currency": "RLUSD",
      "threshold": 50
    }
  ]
}
xrplWallet instead of wallet currency field is XRPL-specific No decimals needed
2

The Response

The API returns a signed attestation. The pass field tells you if all conditions were met. The sig is an ECDSA P-256 signature you can verify independently.

Response
{
  "ok": true,
  "data": {
    "attestation": {
      "id": "ATST-8F3A2E7B1C9D4056",
      "pass": true,
      "results": [
        {
          "condition": 0,
          "label": "",
          "type": "token_balance",
          "chainId": "xrpl",
          "met": true,
          "evaluatedCondition": {
            "type": "token_balance",
            "chainId": "xrpl",
            "contractAddress": "rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De",
            "operator": "gte",
            "threshold": 50,
            "currency": "524C555344000000000000000000000000000000",
            "decimals": null
          },
          "conditionHash": "0xa7c3f2...",
          "ledgerIndex": 95482163,
          "ledgerHash": "BB9023D447285923C36E3DF18EF0FC37A5...",
          "trustLineState": { "frozen": false }
        }
      ],
      "passCount": 1,
      "failCount": 0,
      "attestedAt": "2026-03-01T12:00:00Z",
      "expiresAt": "2026-03-01T12:30:00Z"
    },
    "sig": "MEUCIQC4xR...base64...",
    "kid": "insumer-attest-v1"
  },
  "meta": { "creditsRemaining": 98, "creditsCharged": 1, "version": "1.0", "timestamp": "2026-03-01T12:00:01.000Z" }
}
pass = all conditions met ledgerIndex + ledgerHash = XRPL snapshot reference trustLineState.frozen = whether trust line is spendable sig verifiable at /.well-known/jwks.json
3

Verify the Signature

Use the insumer-verify npm package to verify the attestation signature against the public key. Anyone can verify — no API key required.

JavaScript
import { verifyAttestation } from 'insumer-verify';

// Pass the full API response envelope, not response.data
const response = await res.json();
const result = await verifyAttestation(response, {
  jwksUrl: 'https://insumermodel.com/.well-known/jwks.json'
});

console.log(result.valid);  // true

insumer-verify on npm · Full verification docs

Run a Live Attestation

Enter your XRPL wallet address below and run a real attestation against the API.

API Key

Paste an existing key or generate a free one instantly.

No API key set

By generating a key, you agree to our Terms of Service.

Verification Parameters

Pre-populated with a sample RLUSD check. Change the wallet or token to try your own.

Enter a valid XRPL r-address

Keep Building

Browse the XRPL code examples on GitHub.