PHPackages                             arcgen/myeth-php - 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. [API Development](/categories/api)
4. /
5. arcgen/myeth-php

ActiveLibrary[API Development](/categories/api)

arcgen/myeth-php
================

interact with evm compatible chains with ease on php

v0.1.0(2y ago)05MITPHP

Since Apr 10Pushed 2y ago1 watchersCompare

[ Source](https://github.com/chibuzoraustine/myeth-php)[ Packagist](https://packagist.org/packages/arcgen/myeth-php)[ RSS](/packages/arcgen-myeth-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

MyEth PHP
=========

[](#myeth-php)

interact with EVM (ethereum virtual machine) compatible chains with ease on php, sign messages, sign transactions, sign and send transactions.

Table of content
----------------

[](#table-of-content)

- [Requirements](#requirements)
- [Installation](#installation)
- [Sign message](#sign-message)
- [Sign transaction](#sign-transaction)
- [Sign and Send Transaction](#sign-and-send-transaction)
- [Using different chains](#using-different-chains)
- [Error handling](#error-handling)
- [Testing](#testing)
- [License](#license)

Requirements
------------

[](#requirements)

1. PHP 8 or higher.

Installation
------------

[](#installation)

```
composer require arcgen/myeth-php
```

Sign message
------------

[](#sign-message)

```
use MYETH\MyEth;

$message = "Hello, world!";
$privateKey = ''; // without 0x (remove 0x before passing private key)

$signedMessage = MyEth::signMessage($message, $privateKey);

echo json_encode($signedMessage);
```

Sign transaction
----------------

[](#sign-transaction)

```
use MYETH\MyEth;

$transactionEncodedJson = '{"nonce":0,"gasPrice":1000000000,"gas":21000,"to":"0x4bbeEB066eD09B7AEd07bF39EEe0460DFa261520","value":1000000000000000000,"data":""}';
$privateKey = ''; // without 0x (remove 0x before passing private key)

$signedTransaction = MyEth::signTransaction($transactionEncodedJson, $privateKey);

echo $signedTransaction;
```

Sign and Send Transaction
-------------------------

[](#sign-and-send-transaction)

```
use MYETH\MyEth;

$transactionEncodedJson = '{"nonce":0,"gasPrice":1000000000,"gas":21000,"to":"0x4bbeEB066eD09B7AEd07bF39EEe0460DFa261520","value":1000000000000000000,"data":""}';
$privateKey = ''; // without 0x (remove 0x before passing private key)
$web3Provider = 'https://mainnet.infura.io/v3/YOUR_INFURA_PROJECT_ID';

// Invoke the signAndSendTransaction method
$response = MyEth::signAndSendTransaction($transactionEncodedJson, $privateKey, $web3Provider);

echo $response;
```

Using different chains
----------------------

[](#using-different-chains)

when using other evm chains or testnets it is advisable to pass chain ID as the last parameter.

```
use MYETH\MyEth;

$message = "Hello, world!";
$privateKey = ''; // without 0x (remove 0x before passing private key)
$chainID = '80001' // Polygon matic

$signedMessage = MyEth::signMessage($message, $privateKey, $chainID);

echo json_encode($signedMessage);
```

Error handling
--------------

[](#error-handling)

You can catch request errors by wrapping the method in a try / catch block.

```
use MYETH\MyEth;

$transactionEncodedJson = '{"nonce":0,"gasPrice":1000000000,"gas":21000,"to":"0x4bbeEB066eD09B7AEd07bF39EEe0460DFa261520","value":1000000000000000000,"data":""}';
$privateKey = ''; // without 0x (remove 0x before passing private key)
$web3Provider = 'https://mainnet.infura.io/v3/YOUR_INFURA_PROJECT_ID';

try {
    $response = MyEth::signAndSendTransaction($transactionEncodedJson, $privateKey, $web3Provider);
    echo $response;
} catch (\Exception $e) {
            $this->fail("Exception thrown: " . $e->getMessage());
}
```

Response :

```
Exception thrown: Error message
```

Testing
-------

[](#testing)

```
./vendor/bin/phpunit
```

License
-------

[](#license)

[MIT](https://choosealicense.com/licenses/mit/)

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

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

Unknown

Total

1

Last Release

768d ago

### Community

Maintainers

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/arcgen-myeth-php/health.svg)

```
[![Health](https://phpackages.com/badges/arcgen-myeth-php/health.svg)](https://phpackages.com/packages/arcgen-myeth-php)
```

###  Alternatives

[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[drlecks/simple-web3-php

Web3 library in PHP

7641.6k2](/packages/drlecks-simple-web3-php)[fenguoz/tron-api

A PHP API for interacting with Tron (Trx)

1146.8k3](/packages/fenguoz-tron-api)

PHPackages © 2026

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