Download the PHP package ecourty/xrpl-php without Composer
On this page you can find all versions of the php package ecourty/xrpl-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package xrpl-php
xrpl-php
A PHP library to interact with an XRP Ledger Node.
Table of Contents
- Features
- Installation
- Usage
- XRP Ledger Communication
- XRP Ledger Wallet Management
- Submitting a transaction to the XRP Ledger
- Code examples
- Adding funds on a TestNet / DevNet wallet
- Contracts
- Examples
Features
This library provides a simple way to interact with an XRP Ledger Node.
It covers 100% of the public XRP Ledger API JSON-RPC methods at date of writing.
The library is designed to be simple to use and easy to understand.
xrpl-php
allows you to:
- Communicate with the XRP Ledger
- Manage and generate XRP Ledger wallets
- Fund your testnet / devnet wallets using the Faucet
- Sign and submit transactions to the XRP Ledger
- Support for Single-Signature and Multi-Signature transactions
- Translate XRP to Drops amounts
Here are some usage examples.
Installation
Install the package using Composer:
Usage
XRP Ledger Communication
If you wish to communicate with an XRP Ledger Node, you can use the XRPLClient
class as follows:
XRP Ledger Wallet Management
xrpl-php
allows you to create and import XRP Ledger Wallets.
You can generate or import a wallet as follows:
Submitting a transaction to the XRP Ledger
You can submit a transaction to the XRP Ledger with multiple approaches:
Autofilling Transaction Fields
The XRP Ledger requires some fields to be set in the transaction data.
These fields are:
Fee
Sequence
LastLedgerSequence
If you want to automatically fill these fields in the transaction data, you can use the autofillTransaction
method.
This will query the correct values from your account and fill them in the transaction data.
Code examples
Code examples can be found in the examples directory.
Adding funds on a TestNet / DevNet wallet
You can add funds to a TestNet / DevNet wallet using either the Wallet
class or the Faucet
class.
-
Adding funds using the
Wallet
class - Adding funds using the
Faucet
class
Contracts
xrpl-php
implements two contracts to allow for seamless integration with external systems:
XRPL\Contract\Wallet
XRPL\Contract\KeyPair
The provided Wallet
and KeyPair
classes implement these contracts.
You can implement these interfaces in your own classes to allow for easy integration with xrpl-php
.
Examples
-
Getting the balance of an account
-
Getting the last transactions of a Ledger (by hash / index)
If no ledger hash or index is passed, the latest Ledger data will be returned.
-
Getting the NFTs of an account
- Trading (Paths & Order Book)
© Edouard Courty, 2025
All versions of xrpl-php with dependencies
ext-bcmath Version *
ext-gmp Version *
symfony/http-client Version ^7.2|^6.4
symfony/property-access Version ^7.2|^6.4
symfony/serializer Version ^7.2|^6.4
phpdocumentor/reflection-docblock Version ^5.6
simplito/elliptic-php Version ^1.0
stephenhill/base58 Version ^1.1