Download the PHP package jeavenguitar/web3php without Composer

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

web3php

PHP 版 web3.js —— 面向以太坊 / EVM 兼容链(BSC、Arbitrum、Polygon、Base 等)的开发工具包。

核心目标:像 web3.js 一样好用,但把「RPC 节点抖动」当作一等公民来对待。

为什么再造一个轮子

社区常用的 web3 PHP 包在生产上反复被这些问题坑:

痛点 本包的做法
默认 1 秒超时,节点稍慢就抛异常 连接超时 15s + 总超时 60s 双层可配,防挂起也防误杀
每次请求重做 DNS/TCP/TLS 握手 按节点复用 keep-alive curl 句柄(公网节点单次握手 1~3 秒)
节点偶发断连直接炸业务 陈旧长连接自动换句柄重试;失败按线性退避重试
单节点,挂了就全挂 多端点列表 + 自动故障转移,成功后粘住命中节点复用连接
空响应 / 网关 502 HTML 页静默失败 既无 result 也无 error、HTTP 非 200、非 JSON 一律按传输失败重试
tuple[] 解码崩溃、多值返回键名漂移 完整 ABI v2 编解码(嵌套 tuple / 定长与动态数组 / 任意组合),多值输出全命名时只返回字段名键,与链上结构一致
返回数据被截断时静默给出错值 解码前逐字节校验长度,截断即抛明确异常
revert 只抛一个 "execution reverted" 自动解出 Error(string) / Panic(uint256) 的人类可读原因
数值精度丢失(float/int 硬转) 全链路 GMP:uint256 一律十进制字符串;编码侧拒绝浮点入参
交易签名依赖节点 personal_unlockAccount 本地 secp256k1 签名(EIP-155 / EIP-1559),公网节点友好

安装

要求 PHP >= 8.1,扩展:curl、gmp、bcmath、json。

快速上手

初始化(推荐多节点)

链数据

大数(余额、gas、totalSupply…)统一返回十进制字符串,配合 bcmath / GMP 使用:

合约查询(eth_call + ABI 自动解码)

发送交易(本地签名 + 自动补费)

sendTransaction 缺省行为:nonce 取 pending、gasPrice 取 eth_gasPrice、gas 走 eth_estimateGas; estimateGas 被 revert 时会抛出带人类可读原因的异常(Error(string) / Panic(uint256) 自动解码)。

批量查询

错误语义

测试与验证

目录结构

已知边界

License

MIT


All versions of web3php with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-bcmath Version *
ext-curl Version *
ext-gmp Version *
ext-json Version *
kornrunner/keccak Version ^1.1
simplito/elliptic-php Version ^1.0.6
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 jeavenguitar/web3php contains the following files

Loading the files please wait ...