kornrunner/ethereum-offline-raw-tx
Composer 安装命令:
composer require kornrunner/ethereum-offline-raw-tx
包简介
Pure PHP Ethereum Offline Raw Transaction Signer
关键字:
README 文档
README
Pure PHP Ethereum Offline Raw Transaction Signer
Ethereum raw transaction hash offline in PHP
Installation
$ composer require kornrunner/ethereum-offline-raw-tx
Usage
use kornrunner\Ethereum\Transaction; $nonce = '04'; $gasPrice = '03f5476a00'; $gasLimit = '027f4b'; $to = '1a8c8adfbe1c59e8b58cc0d515f07b7225f51c72'; $value = '2a45907d1bef7c00'; $privateKey = 'b2f2698dd7343fa5afc96626dee139cb92e58e5d04e855f4c712727bf198e898'; $transaction = new Transaction ($nonce, $gasPrice, $gasLimit, $to, $value); $transaction->getRaw ($privateKey); // f86d048503f5476a0083027f4b941a8c8adfbe1c59e8b58cc0d515f07b7225f51c72882a45907d1bef7c00801ba0e68be766b40702e6d9c419f53d5e053c937eda36f0e973074d174027439e2b5da0790df3e4d0294f92d69104454cd96005e21095efd5f2970c2829736ca39195d8
With different chainId
use kornrunner\Ethereum\Transaction; $nonce = '04'; $gasPrice = '03f5476a00'; $gasLimit = '027f4b'; $to = '1a8c8adfbe1c59e8b58cc0d515f07b7225f51c72'; $value = '2a45907d1bef7c00'; $chainId = 1; $privateKey = 'b2f2698dd7343fa5afc96626dee139cb92e58e5d04e855f4c712727bf198e898'; $transaction = new Transaction ($nonce, $gasPrice, $gasLimit, $to, $value); $transaction->getRaw ($privateKey, $chainId); // f86d048503f5476a0083027f4b941a8c8adfbe1c59e8b58cc0d515f07b7225f51c72882a45907d1bef7c008025a0db4efcc22a7d9b2cab180ce37f81959412594798cb9af7c419abb6323763cdd5a0631a0c47d27e5b6e3906a419de2d732e290b73ead4172d8598ce4799c13bda69
Create a EIP1559 transaction
use kornrunner\Ethereum\EIP1559Transaction; $nonce = '02'; $maxPriorityFeePerGas = 'b2d05e00'; $maxFeePerGas = '6fc23ac00'; $gasLimit = '5208'; $to = '1a8c8adfbe1c59e8b58cc0d515f07b7225f51c72'; $value = '29a2241af62c0000'; $data = ''; $chainId = 1; $privateKey = 'b2f2698dd7343fa5afc96626dee139cb92e58e5d04e855f4c712727bf198e898'; $transaction = new EIP1559Transaction($nonce, $maxPriorityFeePerGas, $maxFeePerGas, $gasLimit, $to, $value, $data); $rawTx = $transaction->getRaw($privateKey, $chainId); // 02f873010284b2d05e008506fc23ac00825208941a8c8adfbe1c59e8b58cc0d515f07b7225f51c728829a2241af62c000080c080a0dd32dc794af9a9085d6772c40656fc156a577570c6fd32f2a2d4126673373919a066cf1859672a9e6fdbb00ebd230bcfec66cac1c99f5c83598ecae6025d0e91f4
Crypto
kornrunner/ethereum-offline-raw-tx 适用场景与选型建议
kornrunner/ethereum-offline-raw-tx 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 206.16k 次下载、GitHub Stars 达 62, 最近一次更新时间为 2018 年 06 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「transaction」 「offline」 「tx」 「ethereum」 「eth」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 kornrunner/ethereum-offline-raw-tx 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 kornrunner/ethereum-offline-raw-tx 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 kornrunner/ethereum-offline-raw-tx 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
DUKPT implementation in PHP
Rich payment solutions for Laravel framework. Paypal, payex, authorize.net, be2bill, omnipay, recurring paymens, instant notifications and many more
The BlockTrail PHP SDK, for integration of Bitcoin functionality through the BlockTrail API
Set Facebook offline conversion
Rich payment solutions for Yii framework. Paypal, payex, authorize.net, be2bill, omnipay, recurring paymens, instant notifications and many more
Bitcoin and Altcoin Payment Gateway for Magento 2 via CoinGate
统计信息
- 总下载量: 206.16k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 64
- 点击次数: 33
- 依赖项目数: 32
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-06-06
0x9c7b7a00972121fb843af7af74526d7eb585b171