Skip to main content

Overview

XRP uses the secp256k1 elliptic curve — the same as Ethereum. The address is derived from the compressed public key using SHA-256 + RIPEMD-160, then base58check-encoded with the Ripple alphabet (which differs from the Bitcoin alphabet).

Dependencies

Add to pubspec.yaml:

Derive Address

XRP address derivation requires the compressed secp256k1 public key. You recover it once per session from the EVM wallet:
Cache the compressedPubkey — key recovery only needs to happen once per session.

Sign a Message

XRP message signing uses SHA-256 of the raw message bytes:

Sign a Transaction

XRP transactions use a binary serialization format with canonical field ordering. The signing hash is the first 32 bytes of SHA-512 applied to a prefix (0x53545800) concatenated with the serialized transaction. The signature must be DER-encoded with low-S normalization:
For the full XRP binary serialization helpers (_serializePayment, _xrpAddressToAccountId, etc.), see flutter-multichain-demo/lib/chains/ripple.dart.

Check Balance

Last modified on March 28, 2026