Download the PHP package crypto2/php-xrpl-tagged-address-codec without Composer

On this page you can find all versions of the php package crypto2/php-xrpl-tagged-address-codec. 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 php-xrpl-tagged-address-codec

XRPL Tagged Address Codec for PHP

Encode and Decode an XRPL account address and destination tag to/from X-formatted (tagged) address.

Destination tags provide a way for exchanges, payment processors, corporates or entities which accept incoming payments, escrows, checks and similar transcations to use a single receiving wallet while being able to disambiguate incoming transactions by instructing the senders to include a destination tag.

This package allows encoding and decoding from an XRPL address and destination tag to / from 'Tagged Addresses', containing both the destination account address and tag in one string. This way users can simply copy-paste the string, eliminating possible user error when copying / entering a numeric destination tag.

Hopefully all exchanges, wallets & other software using destination tags will implement this address codec. A migration period will be required to allow users to enter both address formats.

The website https://xrpaddress.info is available for users, exchanges and developers to provide some context and best practices.

Install

Install with composer: crypto2/php-xrpl-tagged-address-codec

Use

Encoding

require('./vendor/autoload.php');

$x = new Crypto2\XAddress();
//Main Net - No Tag
$address = $x->Encode('rGWrZyQqhTp9Xu7G5Pkayo7bXjH4k4QYpf', null, false);
//Main Net - With Tag
$address = $x->Encode('rGWrZyQqhTp9Xu7G5Pkayo7bXjH4k4QYpf', 12345, false);
//Test Net - With Tag
$address = $x->Encode('rGWrZyQqhTp9Xu7G5Pkayo7bXjH4k4QYpf', 12345, true);

Decoding

require('./vendor/autoload.php');

$x = new Crypto2\XAddress();
$tmp = $x->Decode('XVLhHMPHU98es4dbozjVtdWzVrDjtV8xvjGQTYPiAx6gwDC');

Return is an array with keys: address, dest_tag, testnet
address: The Ripple address
dest_tag: The Destination Tag or null if one wasn't set in the tag
testnet: true if it is a testnet address, false otherwise

Credits

This readme based on the one for the Java/NPM package at https://github.com/xrp-community/xrpl-tagged-address-codec

This concept is based on the concept from @nbougalis

Big thanks to @sublimator for his fiddles, ideas and fixes and @intelliot for the idea of adding an X / T prefix for (new) address recognizability.


All versions of php-xrpl-tagged-address-codec with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3
stephenhill/base58 Version ~1.0
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 crypto2/php-xrpl-tagged-address-codec contains the following files

Loading the files please wait ....