Download the PHP package evias/nem-php without Composer

On this page you can find all versions of the php package evias/nem-php. 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 nem-php

Build Status Total Downloads Latest Stable Version Latest Unstable Version License

This package aims to provide with an easy-to-use PHP Laravel Namespace helping developers to communicate with the NEM blockchain through its NIS API.

This package should be an aid to any developer working on Laravel/Lumen/Symfony applications with the NEM blockchain.

This package is currently still in development, please do not use in production.

The author of this package cannot be held responsible for any loss of money or any malintentioned usage forms of this package. Please use this package with caution.

Package licensed under MIT License.

Documentation

Reader-friendly Documentation will be added in development period and will be available on the Github Wiki at evias/nem-php Wiki.

Currently phpdocumentor is integrated to the project in order to automatically generate API documentation from the source code. You must run the phpdoc and phpdocmd command if you wish to generate the Documentation, the first stable release will include a generated Documentation version.

Pot de vin

If you like the initiative, and for the sake of good mood, I recommend you take a few minutes to Donate a beer or Three [because belgians like that] by sending some XEM (or whatever Mosaic you think pays me a few beers someday!) to my Wallet:

NB72EM6TTSX72O47T3GQFL345AB5WYKIDODKPPYW
Username Role
eVias Project Lead
RobertoSnap Developer

Installation

You can install this package with Composer. You only need to require evias/nem-php.

The package can also be downloaded manually by cloning this repository or by downloading the packagist archive:

Once you have required the package in your composer.json file (or using the command above), you can install the dependencies of this package:

Unit Tests

The library provides with a Unit Test Suite for the implemented SDK features.

The unit test suite is also configured on Travis-CI with the current Build Status:

If you wish to run the unitary test suite, you can use the executable file provided by PHPUnit which is located under vendor/bin/phpunit.

Alernatively, you can create a symbolic link to this executable file in the nem-php clone root folder.

Now you can simply run phpunit in the terminal and it will launch the Rocket.. meh, the Unit Tests Suite.

Laravel advanced features

Modify your config/app.php configuration file to include the NEM\ServiceProvider service provider. Look out for the providers configuration array and add our class as shown below:

If you wish to make use of the Laravel Facades provided by this library, you will also need to list the alias in your config/app.php configuration file under the aliases configuration array as described below:

Usage / Examples

When you have installed the evias/nem-php package you will be able to use the API class to send API requests to the configured NIS. By default, the config/nem.php file defines the localhost NIS to be used, this can be changed.

If you are using Laravel or Lumen, you will need to register the Service Provider of this package into your app:

Example 1: Using the Service Provider (Laravel only)

Example 2: Using the API wrapper

Example 3: Sending GET/POST request to the NIS API and getting back JSON

Example 4: Custom Headers and response callback configurations

Example 5: Use the SDK to create NEM NIS compliant Objects

Example 6: Use the SDK NIS Web Service implementations

Example 7: Use the SDK to read an account's transactions

Example 8: Derive a Public Key with a hexadecimal or binary Private Key

Example 9: Create New KeyPair and Address (randomly)

Example 10: Sign Data with a NEM KeyPair

Troubleshoot / Issues Resolution

Installing dependencies with MacOS MAMP or MAMP Pro

It may happen that your PHP server is not installed in the correct version or does not load the right extensions so here is a little snippet that will provide you with the exact PHP version needed (you also need to compile httpd).

First you will need to rebuilt the httpd service :

The above step is only because MAMP does not include the Apache build/ folder (which you can now find under ~/httpd-2.2.34/). Ok, next step is to recompile PHP as an Apache Module as required by MAMP. Following snippet will let you download and compile the PHP package with MacOS and MAMP, enabling GMP, GD, MySQL, XML, CURL, GETTEXT, MBSTRING and BCMATH modules.

After building the PHP source code you will also need to link to that file in your system. Following is an easy workaround, but please, make sure to backup any file before you overwrite executables.

The compilation of PHP will have installed a file: ~/httpd-2.2.34/modules/libphp7.so, you must link your system to that file in order to use the correct PHP modules. Use following snippet to link both, the PHP apache module and the PHP executable in your MAMP installation.

Changelog

Important versions listed below. Refer to the Changelog for a full history of the project.

License

This software is released under the MIT License.

© 2017-2018 Grégory Saive [email protected], All rights reserved.


All versions of nem-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
illuminate/contracts Version 5.0.33|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*|^8.0
illuminate/support Version 5.0.33|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*|^8.0
guzzlehttp/guzzle Version 5.3.1|6.*
mdanter/ecc Version *
paragonie/sodium_compat Version ~1.4.0
christian-riesen/base32 Version ~1.3.1
kornrunner/keccak Version dev-master
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 evias/nem-php contains the following files

Loading the files please wait ....