Download the PHP package americanexpress/hyperledger-fabric-sdk-php without Composer
On this page you can find all versions of the php package americanexpress/hyperledger-fabric-sdk-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download americanexpress/hyperledger-fabric-sdk-php
More information about americanexpress/hyperledger-fabric-sdk-php
Files in americanexpress/hyperledger-fabric-sdk-php
Package hyperledger-fabric-sdk-php
Short Description Hyperledger Fabric client SDK in PHP
License Apache-2.0
Homepage http://americanexpress.io/
Informations about the package hyperledger-fabric-sdk-php
Hyperledger Fabric Client SDK for PHP
Welcome to PHP SDK for Hyperledger project. The main objective of this SDK is to facilitate a client to perform basic chaincode related operations like: creating a channel, installing and accessing a chaincode etc.
Note, the fabric-sdk-php is a standalone client side interface to access the network information and ledger data over running blockchain network, it cannot be used as a persistence medium for application defined channels data.
Installation
Usage
Below, you will find high-level and concise snippets of code demonstrating how to interact with this SDK.
Channel::queryByChaincode
Query first peer in first organization (default behavior):
Query specific organization:
Query specific organization and peer:
Query chaincode by path and version:
Phase 1
- For phase 1, we are providing client access for basic chaincode operations like query by chain code.
- It’s assumed that we have a running blockchain network, with a predefined channel and an installed chaincode.
- A predefined script is provided to bring up the test network as per the test cases.
Phase 2 (Upcoming)
- In next release we are targeting to add more chaincode operations like create channel, invoke & install etc
Latest builds of Fabric and Fabric-ca v1.1.0
Hyperledger Fabric v1.1.0 is currently under active development.
You can clone these projects by going to the Hyperledger repository.
Prerequisites
Docker version ^17.0
Check version of Docker:
PHP version ^7.1
Check version of PHP:
PHP GMP extension
Check PHP-GMP setup in php.ini
Composer tool
Check composer version (it should be 1.5 or plus)
Installing SDK (for development)
Generating SDK API Documentation
Running the End2End test case
Before running the tests, we need to bring up the fabric network and fixture(s):
At present, we are providing example test case for Querying a chaincode, which can be run as below:
After running the tests, feel free to bring down the fabric network:
Read more about Docker Compose
Regenerating PHP Class files from .proto
files
Read more about compiling PHP code from proto files.
Contributing
We welcome Your interest in the American Express Open Source Community on Github. Any Contributor to any Open Source Project managed by the American Express Open Source Community must accept and sign an Agreement indicating agreement to the terms below. Except for the rights granted in this Agreement to American Express and to recipients of software distributed by American Express, You reserve all right, title, and interest, if any, in and to Your Contributions. Please fill out the Agreement.
Please feel free to open pull requests and see CONTRIBUTING.md
for commit formatting details.
License
Any contributions made under this project will be governed by the Apache License 2.0.
Code of Conduct
This project adheres to the American Express Community Guidelines. By participating, you are expected to honor these guidelines.
All versions of hyperledger-fabric-sdk-php with dependencies
ext-grpc Version *
beberlei/assert Version ^2.6
google/protobuf Version ^v3.5.0
grpc/grpc Version ^v1.3.0
igorw/get-in Version ^1.0
mdanter/ecc Version ^v0.5.0