I need ethereumjs-tx in PHP. Seems there is no PHP library so far. I found only JS and Python Library. Is it possible to serialize transaction data on geth? If not, I will use nodejs or create the PHP library. Before that, I want to ask this question.

What I need:

$rawTx = [
  'nonce' => '0x17',
  'gasPrice' => '0x4a817c800',
  'gasLimit' => '0x5209',
  'to' => '0x5dbb9793537515398a1176d365b636a5321d9e39',
  'value' => '0xde0b6b3a7640000',
  'data' => '',
  'chainId' => 3

$tx = new Tx($rawTx);
$serializedTx = $tx->serialize(); // or access geth function if it possible


Create and sign OFFLINE raw transactions?

  • any luck for your problem? If yes please share I am also looking same solution Commented Nov 7, 2017 at 5:22
  • Data serialization should be easy with ethereum-php. I would love to add this feature but it's not in hight priority yet. Ping me if you want to help to implement "serialize()" and by adding tests. Commented Jun 14, 2018 at 10:35

1 Answer 1


If someone is looking for a solution, there is this implementation available:



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.