bcphp/ethereum
Composer 安装命令:
composer require bcphp/ethereum
包简介
Ethereum for PHP: Make JSON-RPC with nodes.
README 文档
README
This library provides useful functions to operate an ethereum node.
Requirements
- PHP 7.0+
- gmp
- mbstring
- secp256k1-lastest
- secp256k1-php-0.1.2
- autoconf
- libtool
- phpize
Instalation
- Install secp256k1-lastest:
curl -L0k https://github.com/bitcoin-core/secp256k1/archive/master.zip > secp256k1-latest.zip unzip secp256k1-latest.zip cd secp256k1-master ./autogen.sh ./configure --enable-experimental --enable-module-{ecdh,recovery} make sudo make install cd .. # go out
- Install secp256k1-php-0.1.2:
curl -L0k https://github.com/Bit-Wasp/secp256k1-php/archive/v0.1.2.zip > secp256k1-php-0.1.2.zip unzip secp256k1-php-0.1.2.zip cd secp256k1-php-0.1.2/secp256k1 phpize ./configure --with-secp256k1 make sudo make install cd .. # go out
- Modify php.ini
Find your extension directory location:
php -i | grep extension_dir
If secp256k1.so dosen't exists, move secp256k1.so to the extension directory location:
cd secp256k1-php-0.1.2/secp256k1/.libs/ mv /secp256k1.so <EXTENSION_DIRECTORY_LOCATION>
Find your php.ini:
php --ini
Add this line for enable secp256k1 lib:
extension=secp256k1.so
- Install via composer
Add to composer:
"require-dev": { "bcphp/ethereum": "*", },
or
composer require bcphp/ethereum
JSON-RCP
Connect to an ethereum node through json rpc.
SEND RAW TRANSACTIONS
Make raw signed transactions.
统计信息
- 总下载量: 60
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-05-09