Skip to main content
With Privy, your app can create embedded XRPL wallets, sign transactions, and enforce Privy’s policy engine to constrain what each wallet can do. XRPL wallets use the secp256k1 curve with BIP-44 derivation path m/44'/144'/0'/0/{index}. Your app signs XRPL transactions via the xrpl_signTransaction RPC method or via raw hash signing. Then, submit the signed transaction to the network using xrpl.js.

Features

  • Embedded XRPL wallets: create wallets with the xrpl chain type. Addresses use the standard r-prefix format.
  • Transaction signing: sign any XRPL transaction via xrpl_signTransaction, which returns a DER-encoded signature and a ready-to-submit transaction blob.
  • Raw hash signing: sign arbitrary hashes with raw_sign for full control over serialization.
  • Policy enforcement: constrain transactions with Privy’s policy engine — restrict destinations, cap amounts, and limit transaction types.
  • Key export: export the hex private key or BIP-39 seed phrase for full portability.

Account activation

XRPL wallets do not exist on-ledger until they receive the base reserve (currently 10 XRP). Calling account_info on an unfunded address returns actNotFound. Your app must fund the wallet before it can submit transactions.
On testnet, fund wallets using the XRPL faucet:

Create a wallet

Sign a transaction

Sign an XRPL transaction using the xrpl_signTransaction RPC method. Your app builds and encodes the transaction with xrpl.js, passes the prefixed bytes to Privy, and receives a signed transaction blob ready to submit.
To sign a transaction, make a POST request to:

Usage

A successful response looks like:

Parameters

string
required
Must be "xrpl_signTransaction".
string
required
The XRPL signing prefix 53545800 concatenated with the STObject-encoded transaction bytes, as an even-length hex string. Use encodeForSigning() from xrpl.js to produce this directly.
string
required
Must be "hex".

Returns

string
DER-encoded ECDSA signature (hex, no 0x prefix). This is the value for the TxnSignature field in the signed transaction.
string
The fully signed XRPL transaction blob (hex, no 0x prefix), ready to pass to client.submit() from xrpl.js.
string
Always "hex".

Sign a raw hash

For full control over serialization, your app can compute the XRPL signing hash and sign it directly with raw_sign in hash mode.
To sign a raw hash, make a POST request to:

Usage

A successful response looks like:

Parameters

string
required
The hash to sign, as an even-length hex string prefixed with 0x. For XRPL, this is the SHA-512Half of the signing-prefixed, STObject-encoded transaction bytes.

Returns

string
Compact (r||s) ECDSA signature, hex, no 0x prefix. XRPL requires a DER-encoded signature for TxnSignature, so convert this before attaching it to the transaction.
string
Always "hex".
xrpl_signTransaction handles DER encoding and blob assembly automatically. Use raw_sign only when your app needs to control the full signing pipeline.

Export keys

XRPL wallets support both private key export (raw hex format) and BIP-39 seed phrase export. The exported private key is a raw hex secp256k1 key. XRPL’s native “family seed” format (base58-encoded 16-byte seed) is not compatible with BIP-44 derivation and is not supported.

Enforce policies

XRPL wallets support Privy’s policy engine, so your app can constrain transactions signed via xrpl_signTransaction:
  • Transaction types: restrict which transaction types a wallet can sign using the TransactionType field.
  • Payment destinations: allowlist or denylist recipient addresses using Payment.Destination.
  • Amount limits: cap XRP payment amounts using Payment.Amount.drops, or IOU values using Payment.Amount.value.
  • Offer limits: constrain DEX offers using OfferCreate.TakerPays and OfferCreate.TakerGets fields.
  • Trust line limits: restrict trust line creation using TrustSet.LimitAmount fields.
  • System conditions: gate signing on values such as the current timestamp using the system field source.
See XRPL policy examples for complete configuration examples.

Supported transaction types for policy evaluation

Policies can evaluate decoded fields on these transaction types: Payment, OfferCreate, OfferCancel, and TrustSet.
Wallets with policies can sign any valid XRPL transaction type. However, if the transaction type is not supported for policy evaluation, the request is denied unless a matching system-level rule (e.g., a time-based condition) allows it.