allmediaindo / infura
infura client
Installs: 1 033
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- ext-curl: *
- ext-json: *
This package is auto-updated.
Last update: 2025-04-29 01:11:26 UTC
README
infura client.
Installing
$ composer require allmediaindo/infura
Usage
<?php /** * Infura constructor. * * @param string $network Ethereum network 'rinkenby', 'ropsten', 'mainnet', etc * @param string $projectId Your Infura project 'PROJECT ID' */ $client = new Infura($network, $projectId);
To invoke infura.io methods just call the method
example:
$client->eth_blockNumber();
return
[ "jsonrpc" => "2.0", "id" => 1, "result" => "0x65a8db", ];
example:
$client->eth_getBlockTransactionCountByHash("0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35");
return
[ "jsonrpc" => "2.0", "id" => 1, "result" => "0x50", ];
Contributing
You can contribute in one of three ways:
- File bug reports using the issue tracker.
- Answer questions or fix bugs on the issue tracker.
- Contribute new features or update the wiki.
The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.
License
MIT