Download the PHP package opensourcewebsite-org/php-stellar-sdk without Composer

On this page you can find all versions of the php package opensourcewebsite-org/php-stellar-sdk. 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-stellar-sdk

PHP Stellar SDK

PHP Version

PHP Stellar SDK provides APIs to build and sign transactions, connect and query Stellar Horizon server.

This library is under active development and should be considered beta quality. Please ensure that you've tested extensively on a test network and have added sanity checks in other places in your code.

The repository is a part of the OpenSourceWebsite Organization. This project and everyone participating in it is governed by the Code of Conduct.

Getting Started

See the release notes for breaking changes.

See the examples directory.

Please read through Stellar API Documentation and Stellar Testnet Documentation.

Contributing

Please read through our Contribution Guidelines.

Installation

The preferred way to install this extension is through composer.

Either run

or add

to the require section of your composer.json file.

Usage

Large Integer Support

The largest PHP integer is 64-bits when on a 64-bit platform. This is especially important to pay attention to when working with large balance transfers. The native representation of a single XLM (1 XLM) is 10000000 stroops.

Therefore, if you try to use a MAX_INT number of XLM (or a custom asset) it is possible to overflow PHP's integer type when the value is converted to stroops and sent to the network.

This library attempts to add checks for this scenario and also uses a BigInteger class to work around this problem.

If your application uses large amounts of XLM or a custom asset please do extensive testing with large values and use the StellarAmount helper class or the BigInteger class if possible.

Floating point issues

Although not specific to Stellar or PHP, it's important to be aware of problems when doing comparisons between floating point numbers.

For example:

The above code considers the two values not to be equal even though the same value is printed out:

Output:

To work around this issue, always work with and store amounts as an integer representing stroops. Only convert back to a decimal number when you need to display a balance to the user.

The static StellarAmount::STROOP_SCALE property can be used to help with this conversion.

Tests

Feedback

To request a new feature, submit a bug report, give us feedback, start a design discussion or have an idea to make this code better feel free to open an issue, or create a pull request.

Please send all security issues to [email protected].

License

This project is open source and available freely under the MIT license.


All versions of php-stellar-sdk with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ^6.2
christian-riesen/base32 Version ^1.3
paragonie/sodium_compat Version ^1.0
phpseclib/phpseclib Version ^2.0.6
symfony/filesystem Version ^4.1
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 opensourcewebsite-org/php-stellar-sdk contains the following files

Loading the files please wait ....