Download the PHP package ericychu/ethereum-php without Composer

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

Ethereum Client for PHP

PHP 版本以太坊 JSON RPC 客户端。

可通过简单的添加合约地址和 ABI 来方便的调用合约内的方法,对于需要对交易签名的请求,客户端会自动完成。

支持对事件(Log)的监听,但需要通过定时器执行 \Ethereum\Client::synchronizer->sync() 方法来轮询, 当有事件到达会执行自定义的回调并传递一个 \Ethereum\Types\Event 的实例,该实例包含了反序列化后的事件输入和相关的区块、交易数据。

JSON RPC API 实现度

已实现

未实现

依赖

使用

安装

示例

实例化客户端

添加合约

调用合约中的方法

pureview 的方法,可以直接以数组的形式返回反序列化后的数据;nonpayablepayable 的方法返回交易的哈希(\Ethereum\Types\Hash 实例)。

监听事件

这里的事件名称是你在合约中定义的事件名称。

注意,监听事件需要通过定时器执行 \Ethereum\Client::synchronizer->sync() 方法来轮询以太坊节点。当有事件到达会执行自定义的回调并传递一个 \Ethereum\Types\Event 的实例,该实例包含了反序列化后的事件输入和相关的区块、交易数据。

如果使用 Swoole,可以通过 Swoole 的定时器来来轮询。

调用 JSON RPC API

支持的方法请查阅 \Ethereum\Methods\Eth\Ethereum\Methods\Web3\Ethereum\Methods\Net 类。


All versions of ethereum-php with dependencies

PHP Build Version
Package Version
Requires php-64bit Version ~7.2
ext-gmp Version *
ext-scrypt Version ~1.4
ext-secp256k1 Version ~0.1
ext-keccak Version ~0.2
graze/guzzle-jsonrpc Version ^3.2
bitwasp/buffertools Version ^0.5.0
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 ericychu/ethereum-php contains the following files

Loading the files please wait ....