PHPackages                             tonystark/kardiachain-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. tonystark/kardiachain-tx

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

tonystark/kardiachain-tx
========================

Kardiachain transaction library in PHP.

0.4.3(4y ago)013MITPHPPHP ^7.1 | ^8.0

Since Mar 13Pushed 4y agoCompare

[ Source](https://github.com/tonystark199x202x/kardiachain-tx)[ Packagist](https://packagist.org/packages/tonystark/kardiachain-tx)[ RSS](/packages/tonystark-kardiachain-tx/feed)WikiDiscussions master Synced 2d ago

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

kardiachain-tx
==============

[](#kardiachain-tx)

[![PHP](https://github.com/web3p/ethereum-tx/actions/workflows/php.yml/badge.svg)](https://github.com/web3p/ethereum-tx/actions/workflows/php.yml)[![codecov](https://camo.githubusercontent.com/cbb9c75ea5cd57b148f26d8d58ddee1b52387e4fdd0ef870c495b8904b2d97db/68747470733a2f2f636f6465636f762e696f2f67682f77656233702f6b6172646961636861696e2d74782f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/web3p/ethereum-tx)

Kardiachain transaction library in PHP.

Install
=======

[](#install)

```
composer require tonystark/kardiachain-tx

```

Usage
=====

[](#usage)

Create a transaction:

```
use Web3p\KardiachainTx\Transaction;

// without chainId
$transaction = new Transaction([
    'nonce' => '0x01',
    'from' => '0xb60e8dd61c5d32be8058bb8eb970870f07233155',
    'to' => '0xd46e8dd67c5d32be8058bb8eb970870f07244567',
    'gas' => '0x76c0',
    'gasPrice' => '0x9184e72a000',
    'value' => '0x9184e72a',
    'data' => '0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675'
]);

// with chainId
$transaction = new Transaction([
    'nonce' => '0x01',
    'from' => '0xb60e8dd61c5d32be8058bb8eb970870f07233155',
    'to' => '0xd46e8dd67c5d32be8058bb8eb970870f07244567',
    'gas' => '0x76c0',
    'gasPrice' => '0x9184e72a000',
    'value' => '0x9184e72a',
    'chainId' => 1,
    'data' => '0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675'
]);

// hex encoded transaction
$transaction = new Transaction('0xf86c098504a817c800825208943535353535353535353535353535353535353535880de0b6b3a76400008025a028ef61340bd939bc2195fe537567866003e1a15d3c71ff63e1590620aa636276a067cbe9d8997f761aecb703304b3800ccf555c9f3dc64214b297fb1966a3b6d83');
```

Sign a transaction:

```
use Web3p\KardiachainTx\Transaction;

$signedTransaction = $transaction->sign('your private key');
```

API
===

[](#api)

### Web3p\\KardiachainTx\\Transaction

[](#web3pkardiachaintxtransaction)

#### sha3

[](#sha3)

Returns keccak256 encoding of given data.

> It will be removed in the next version.

`sha3(string $input)`

String input

###### Example

[](#example)

- Encode string.

```
use Web3p\KardiachainTx\Transaction;

$transaction = new Transaction([
    'nonce' => '0x01',
    'from' => '0xb60e8dd61c5d32be8058bb8eb970870f07233155',
    'to' => '0xd46e8dd67c5d32be8058bb8eb970870f07244567',
    'gas' => '0x76c0',
    'gasPrice' => '0x9184e72a000',
    'value' => '0x9184e72a',
    'data' => '0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675'
]);
$hashedString = $transaction->sha3('web3p');
```

#### serialize

[](#serialize)

Returns recursive length prefix encoding of transaction data.

`serialize()`

###### Example

[](#example-1)

- Serialize the transaction data.

```
use Web3p\KardiachainTx\Transaction;

$transaction = new Transaction([
    'nonce' => '0x01',
    'from' => '0xb60e8dd61c5d32be8058bb8eb970870f07233155',
    'to' => '0xd46e8dd67c5d32be8058bb8eb970870f07244567',
    'gas' => '0x76c0',
    'gasPrice' => '0x9184e72a000',
    'value' => '0x9184e72a',
    'data' => '0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675'
]);
$serializedTx = $transaction->serialize();
```

#### sign

[](#sign)

Returns signed of transaction data.

`sign(string $privateKey)`

String privateKey - hexed private key with zero prefixed.

###### Example

[](#example-2)

- Sign the transaction data.

```
use Web3p\KardiachainTx\Transaction;

$transaction = new Transaction([
    'nonce' => '0x01',
    'from' => '0xb60e8dd61c5d32be8058bb8eb970870f07233155',
    'to' => '0xd46e8dd67c5d32be8058bb8eb970870f07244567',
    'gas' => '0x76c0',
    'gasPrice' => '0x9184e72a000',
    'value' => '0x9184e72a',
    'data' => '0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675'
]);
$signedTx = $transaction->sign($stringPrivateKey);
```

#### hash

[](#hash)

Returns keccak256 encoding of serialized transaction data.

`hash()`

###### Example

[](#example-3)

- Hash serialized transaction data.

```
use Web3p\KardiachainTx\Transaction;

$transaction = new Transaction([
    'nonce' => '0x01',
    'from' => '0xb60e8dd61c5d32be8058bb8eb970870f07233155',
    'to' => '0xd46e8dd67c5d32be8058bb8eb970870f07244567',
    'gas' => '0x76c0',
    'gasPrice' => '0x9184e72a000',
    'value' => '0x9184e72a',
    'data' => '0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675'
]);
$hashedTx = $transaction->serialize();
```

License
=======

[](#license)

MIT

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 95.5% 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 ~126 days

Recently: every ~276 days

Total

11

Last Release

1721d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/89031610?v=4)[tonystark199x202x](/maintainers/tonystark199x202x)[@tonystark199x202x](https://github.com/tonystark199x202x)

---

Top Contributors

[![sc0Vu](https://avatars.githubusercontent.com/u/10494397?v=4)](https://github.com/sc0Vu "sc0Vu (63 commits)")[![olegabr](https://avatars.githubusercontent.com/u/2850808?v=4)](https://github.com/olegabr "olegabr (2 commits)")[![kasra73](https://avatars.githubusercontent.com/u/7995238?v=4)](https://github.com/kasra73 "kasra73 (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tonystark-kardiachain-tx/health.svg)

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

###  Alternatives

[web3p/ethereum-util

A collection of utility functions for Ethereum written in PHP.

30420.2k26](/packages/web3p-ethereum-util)[digitaldonkey/ecverify

A library integrating Ethereum with typed PHP.

14109.2k2](/packages/digitaldonkey-ecverify)

PHPackages © 2026

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