{"id":21270062,"url":"https://github.com/kornrunner/php-ethereum-offline-raw-tx","last_synced_at":"2025-04-07T07:12:39.303Z","repository":{"id":47694778,"uuid":"135711291","full_name":"kornrunner/php-ethereum-offline-raw-tx","owner":"kornrunner","description":"Pure PHP Ethereum Offline (Raw) Transaction Signer","archived":false,"fork":false,"pushed_at":"2024-07-23T21:37:29.000Z","size":263,"stargazers_count":55,"open_issues_count":4,"forks_count":30,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-31T05:07:37.233Z","etag":null,"topics":["eip1559","eth","ethereum","offline","raw","transaction"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kornrunner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-01T11:48:19.000Z","updated_at":"2025-03-07T16:18:05.000Z","dependencies_parsed_at":"2024-12-11T03:01:53.253Z","dependency_job_id":"b803c835-0f9e-4c61-845b-c1a56bd75c09","html_url":"https://github.com/kornrunner/php-ethereum-offline-raw-tx","commit_stats":{"total_commits":159,"total_committers":3,"mean_commits":53.0,"dds":0.05031446540880502,"last_synced_commit":"6a7d88746c09bed7bb7ef088b707ef63eadc2bbd"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kornrunner%2Fphp-ethereum-offline-raw-tx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kornrunner%2Fphp-ethereum-offline-raw-tx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kornrunner%2Fphp-ethereum-offline-raw-tx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kornrunner%2Fphp-ethereum-offline-raw-tx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kornrunner","download_url":"https://codeload.github.com/kornrunner/php-ethereum-offline-raw-tx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247608153,"owners_count":20965952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eip1559","eth","ethereum","offline","raw","transaction"],"created_at":"2024-11-21T08:14:47.917Z","updated_at":"2025-04-07T07:12:39.281Z","avatar_url":"https://github.com/kornrunner.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# php-ethereum-offline-tx [![Tests](https://github.com/kornrunner/php-ethereum-offline-tx/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/kornrunner/php-ethereum-offline-tx/actions/workflows/tests.yml) [![Coverage Status](https://coveralls.io/repos/github/kornrunner/php-ethereum-offline-raw-tx/badge.svg?branch=master)](https://coveralls.io/github/kornrunner/php-ethereum-offline-raw-tx?branch=master) [![Latest Stable Version](https://poser.pugx.org/kornrunner/ethereum-offline-raw-tx/v/stable)](https://packagist.org/packages/kornrunner/ethereum-offline-raw-tx)\n\nPure PHP Ethereum Offline Raw Transaction Signer\n\nEthereum raw transaction hash offline in PHP\n\n## Installation\n\n```sh\n$ composer require kornrunner/ethereum-offline-raw-tx\n```\n\n## Usage\n\n```php\nuse kornrunner\\Ethereum\\Transaction;\n\n$nonce    = '04';\n$gasPrice = '03f5476a00';\n$gasLimit = '027f4b';\n$to       = '1a8c8adfbe1c59e8b58cc0d515f07b7225f51c72';\n$value    = '2a45907d1bef7c00';\n\n$privateKey = 'b2f2698dd7343fa5afc96626dee139cb92e58e5d04e855f4c712727bf198e898';\n\n$transaction = new Transaction ($nonce, $gasPrice, $gasLimit, $to, $value);\n$transaction-\u003egetRaw ($privateKey);\n// f86d048503f5476a0083027f4b941a8c8adfbe1c59e8b58cc0d515f07b7225f51c72882a45907d1bef7c00801ba0e68be766b40702e6d9c419f53d5e053c937eda36f0e973074d174027439e2b5da0790df3e4d0294f92d69104454cd96005e21095efd5f2970c2829736ca39195d8\n```\n\nWith different `chainId`\n\n```php\nuse kornrunner\\Ethereum\\Transaction;\n\n$nonce    = '04';\n$gasPrice = '03f5476a00';\n$gasLimit = '027f4b';\n$to       = '1a8c8adfbe1c59e8b58cc0d515f07b7225f51c72';\n$value    = '2a45907d1bef7c00';\n$chainId  = 1;\n\n$privateKey = 'b2f2698dd7343fa5afc96626dee139cb92e58e5d04e855f4c712727bf198e898';\n\n$transaction = new Transaction ($nonce, $gasPrice, $gasLimit, $to, $value);\n$transaction-\u003egetRaw ($privateKey, $chainId);\n// f86d048503f5476a0083027f4b941a8c8adfbe1c59e8b58cc0d515f07b7225f51c72882a45907d1bef7c008025a0db4efcc22a7d9b2cab180ce37f81959412594798cb9af7c419abb6323763cdd5a0631a0c47d27e5b6e3906a419de2d732e290b73ead4172d8598ce4799c13bda69\n```\n\nCreate a EIP1559 transaction\n\n```php\nuse kornrunner\\Ethereum\\EIP1559Transaction;\n\n$nonce = '02';\n$maxPriorityFeePerGas = 'b2d05e00';\n$maxFeePerGas = '6fc23ac00';\n$gasLimit = '5208';\n$to = '1a8c8adfbe1c59e8b58cc0d515f07b7225f51c72';\n$value = '29a2241af62c0000';\n$data = '';\n$chainId = 1;\n\n$privateKey = 'b2f2698dd7343fa5afc96626dee139cb92e58e5d04e855f4c712727bf198e898';\n\n$transaction = new EIP1559Transaction($nonce, $maxPriorityFeePerGas, $maxFeePerGas, $gasLimit, $to, $value, $data);\n\n$rawTx = $transaction-\u003egetRaw($privateKey, $chainId);\n// 02f873010284b2d05e008506fc23ac00825208941a8c8adfbe1c59e8b58cc0d515f07b7225f51c728829a2241af62c000080c080a0dd32dc794af9a9085d6772c40656fc156a577570c6fd32f2a2d4126673373919a066cf1859672a9e6fdbb00ebd230bcfec66cac1c99f5c83598ecae6025d0e91f4\n```\n\n## Crypto\n\n[![Ethereum](https://user-images.githubusercontent.com/725986/61891022-0d0c7f00-af09-11e9-829f-096c039bbbfa.png) 0x9c7b7a00972121fb843af7af74526d7eb585b171][Ethereum]\n\n[Ethereum]: https://etherscan.io/address/0x9c7b7a00972121fb843af7af74526d7eb585b171 \"Donate with Ethereum\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkornrunner%2Fphp-ethereum-offline-raw-tx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkornrunner%2Fphp-ethereum-offline-raw-tx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkornrunner%2Fphp-ethereum-offline-raw-tx/lists"}