PHPackages                             he426100/filecoin-tx - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. he426100/filecoin-tx

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

he426100/filecoin-tx
====================

Filecoin transaction library in PHP

0.0.2(3y ago)113MITPHPPHP ^7.4|^8.0

Since Jul 28Pushed 3y agoCompare

[ Source](https://github.com/he426100/filecoin-tx)[ Packagist](https://packagist.org/packages/he426100/filecoin-tx)[ RSS](/packages/he426100-filecoin-tx/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (3)Used By (0)

filecoin-tx
===========

[](#filecoin-tx)

此项目源自

Filecoin transaction library in PHP(Only for secp256k1).

Install
=======

[](#install)

```
composer require he426100/filecoin-tx

```

Usage
=====

[](#usage)

#### sign

[](#sign)

Returns signed of transaction data.

`sign(array $message, string $privateKey)`

###### Example

[](#example)

- Sign the transaction data.

```
use He426100\FilecoinTx\Sign;

$fromAddress = 't1hb4737umuzzbcfd3xxk3bdtwezgistj7dycypvi';
$rpc = new Rpc(...);
$nonce = $rpc->request('MpoolGetNonce', $fromAddress);

$message = [
    'Version' => 0,
    'From' => $fromAddress,
    'To' => 't1qkqqbmrbhsvjdturbalnyb3tudqxtmbp6x7ohry',
    'Value' => '100000000000000000', // 此参数必须是字符串 0.1 FIL
    'Method' => 0, // 表示send
    'Nonce' => $nonce, // 交易序号，用接口 MpoolGetNonce 获取
    'Params' => '', // base64 编码数据
    'GasLimit' => 0, // 可用接口估算 GasEstimateGasLimit
    'GasPremium' => "0", // 此参数必须是字符串，可用接口估算 GasEstimateGasPremium
    'GasFeeCap' => "0" // 此参数必须是字符串，可用接口估算 GasEstimateFeeCap
];

$gas = $rpc->request('GasEstimateMessageGas', $message, ['MaxFee' => bcmul('0.1', bcpow(10, 18))], null);
$message['GasPremium'] = $gas['GasPremium'];
$message['GasFeeCap'] = $gas['GasFeeCap'];
$message['GasLimit'] = $gas['GasLimit'];

$sign = new Sign();
$signData = $sign->sign($message, "ee2868ca9485673b36c38ba4f18551be25d08dd9be9bd24c44cd626b37cadae4");
//获取messageID
$message['cid'] = ['/' => $sign->getMessageId()];
//获取离线计算发送返回CID
$sign->getCid();
$signMessageData = [
    'message' => $message,
    'signature' => [
        'data' => $signData,
        'type' => 1 //SECP256K1=1
    ]
];
```

License
=======

[](#license)

MIT

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1381d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f496f5618977a1eeb3f64de28aa1a130e33c0c3f847043177f7496916cc8eecf?d=identicon)[he426100](/maintainers/he426100)

---

Top Contributors

[![DevMinions](https://avatars.githubusercontent.com/u/14174210?v=4)](https://github.com/DevMinions "DevMinions (6 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/he426100-filecoin-tx/health.svg)

```
[![Health](https://phpackages.com/badges/he426100-filecoin-tx/health.svg)](https://phpackages.com/packages/he426100-filecoin-tx)
```

###  Alternatives

[bitwasp/bitcoin-lib

Implementation of raw transactions in bitcoin, HD wallets, Electrum wallets, and other fun stuff.

13922.3k5](/packages/bitwasp-bitcoin-lib)[web3p/ethereum-util

A collection of utility functions for Ethereum written in PHP.

30420.2k26](/packages/web3p-ethereum-util)[swentel/nostr-php

Nostr helper library for PHP

6725.9k3](/packages/swentel-nostr-php)[digitaldonkey/ecverify

A library integrating Ethereum with typed PHP.

14109.2k2](/packages/digitaldonkey-ecverify)[deemru/waveskit

Waves Platform Development Kit

243.7k5](/packages/deemru-waveskit)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
