Download the PHP package xrplwin/xrpl without Composer

On this page you can find all versions of the php package xrplwin/xrpl. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package xrpl

main workflow GitHub license Total Downloads

PHP XRPL API Connector

Requirements

Installation

Usage sample

In sample below we will be using account_tx method.

Init Client

Creating first request

This will return an instance of XRPLWin\XRPL\Api\Methods\AccountTx.

Custom rate limit handling

If you wish to define custom behaviour when request is rate-limited you can via Closure function. Define this before executing send().

Fetching response

Class method send() executes request against XRPLedger and response is stored into instance object. After that you can use one of provided class methods to retrieve result.

Promises

Alternative to fetch syncronous response as defined above, you can get Promise
Read more about Promises. Returned object is Promises/A+ implementation.

Notes: You will need to handle rate limiting and exception handling yourself when using Promises. Also each promise must be created from new instance of \XRPLWin\XRPL\Client this is to make sure each promise has its own seperated HttpClient instance.

Paginating result

To quick retrieve next instance to be executed (next page) you can use next(). This class method will return instance of XRPLWin\XRPL\Api\Methods\AccountTx with same parameters plus added marker from previous request. This helper function is not mandatory, you can always create new method instance manually like this $client->api('account_tx')->params([ ..., ['marker'] => [ ... ]].

See samples for more information.

Request workflow

  1. Prepare instance by setting params
  2. Use send() to execute request and handle errors by using try catch. (Request will be re-tried x amount of times if rate-limit is detected)
  3. XRPLedger response is stored in memory and it is available to read via
    ->result()
    ->resultArray()
    ->finalResult()

Methods

account_tx

tx

For other methods refer to https://xrpl.org/websocket-api-tool.html and src/Api/Methods

Utilities

There are few utilities available with this package:

Flags

UNLReportFlagLedger

Flag ledger is calculated using modulo formula LedgerIndex % 256.

Util class

Converts Currency Code ISO or HEX to human readable representation.

Read more:

Running tests

Run all tests in "tests" directory.

or


All versions of xrpl with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1.0
guzzlehttp/guzzle Version ^7.4
brick/math Version ^0.10.2|^0.11|^0.12
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package xrplwin/xrpl contains the following files

Loading the files please wait ....