alleochain / multichain-jsonrpc
Multichain JSON-RPC Client
Installs: 1 156
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Requires
- php: >=7.0
- ext-curl: *
- ext-json: *
Requires (Dev)
- brainmaestro/composer-git-hooks: *
- friendsofphp/php-cs-fixer: *
- icanhazstring/composer-unused: *
- maglnet/composer-require-checker: *
- phpmd/phpmd: *
- phpmetrics/phpmetrics: *
- phpstan/extension-installer: *
- phpstan/phpstan: *
- phpstan/phpstan-deprecation-rules: *
- phpstan/phpstan-phpunit: *
- phpunit/phpunit: *
- pyrech/composer-changelogs: *
- roave/backward-compatibility-check: *
- roave/security-advisories: dev-master
- squizlabs/php_codesniffer: *
- symfony/var-dumper: *
- thecodingmachine/phpstan-strict-rules: *
README
About
Multichain JsonRPC Client class allows to interact with a JSON RPC blockchain APIs by sending the commands and getting back response arrays of data.
This implementation also allows to work with MultiChain (https://www.multichain.com) blockchain platform by providing chain name during the initialization of the instance.
As none of the blockchain APIs are directly defined in the Client, but instead a proxy via magic method is used, it should be possible to use this client with more or less any blockchain JSON-RPC service.
Developed by AlleoChain Ltd (https://alleochain.com)
Usage Example
# Create new instance $instance = new AlleoChain\Multichain\JsonRPC\Client([ 'url' => 'http://127.0.0.1:7208', 'user' => 'rpcuser', 'pass' => 'rpcpass', 'chain' => 'test' ]); # Get blockchain info print_r($instance->getinfo()); # For MultiChain streams print_r($instance->liststreamitems('test_stream'));