{"id":21420215,"url":"https://github.com/ethjs/ethjs-signer","last_synced_at":"2025-09-19T18:56:15.198Z","repository":{"id":66080773,"uuid":"75977434","full_name":"ethjs/ethjs-signer","owner":"ethjs","description":"A simple module for signing Ethereum transactions.","archived":false,"fork":false,"pushed_at":"2021-09-14T09:26:15.000Z","size":246,"stargazers_count":28,"open_issues_count":3,"forks_count":15,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-10T21:18:30.107Z","etag":null,"topics":["account","accounts","ethereum","ethjs","sign","signer"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/ethjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2016-12-08T21:40:20.000Z","updated_at":"2024-10-08T13:34:58.000Z","dependencies_parsed_at":"2023-03-10T23:36:45.997Z","dependency_job_id":null,"html_url":"https://github.com/ethjs/ethjs-signer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ethjs/ethjs-signer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethjs%2Fethjs-signer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethjs%2Fethjs-signer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethjs%2Fethjs-signer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethjs%2Fethjs-signer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ethjs","download_url":"https://codeload.github.com/ethjs/ethjs-signer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethjs%2Fethjs-signer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265252580,"owners_count":23735082,"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":["account","accounts","ethereum","ethjs","sign","signer"],"created_at":"2024-11-22T20:13:31.367Z","updated_at":"2025-09-19T18:56:10.132Z","avatar_url":"https://github.com/ethjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## ethjs-signer\n\n\u003cdiv\u003e\n  \u003c!-- Dependency Status --\u003e\n  \u003ca href=\"https://david-dm.org/ethjs/ethjs-signer\"\u003e\n    \u003cimg src=\"https://david-dm.org/ethjs/ethjs-signer.svg\"\n    alt=\"Dependency Status\" /\u003e\n  \u003c/a\u003e\n\n  \u003c!-- devDependency Status --\u003e\n  \u003ca href=\"https://david-dm.org/ethjs/ethjs-signer#info=devDependencies\"\u003e\n    \u003cimg src=\"https://david-dm.org/ethjs/ethjs-signer/dev-status.svg\" alt=\"devDependency Status\" /\u003e\n  \u003c/a\u003e\n\n  \u003c!-- Build Status --\u003e\n  \u003ca href=\"https://travis-ci.org/ethjs/ethjs-signer\"\u003e\n    \u003cimg src=\"https://travis-ci.org/ethjs/ethjs-signer.svg\"\n    alt=\"Build Status\" /\u003e\n  \u003c/a\u003e\n\n  \u003c!-- NPM Version --\u003e\n  \u003ca href=\"https://www.npmjs.org/package/ethjs-signer\"\u003e\n    \u003cimg src=\"http://img.shields.io/npm/v/ethjs-signer.svg\"\n    alt=\"NPM version\" /\u003e\n  \u003c/a\u003e\n\n  \u003c!-- Test Coverage --\u003e\n  \u003ca href=\"https://coveralls.io/r/ethjs/ethjs-signer\"\u003e\n    \u003cimg src=\"https://coveralls.io/repos/github/ethjs/ethjs-signer/badge.svg\" alt=\"Test Coverage\" /\u003e\n  \u003c/a\u003e\n\n  \u003c!-- Javascript Style --\u003e\n  \u003ca href=\"http://airbnb.io/javascript/\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/code%20style-airbnb-brightgreen.svg\" alt=\"js-airbnb-style\" /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\nA simple Ethereum signing and recovery utility.\n\n**WARNING: This module does not have EIP155 replay protection, do not use until it is upgraded.**\n\n## Install\n\n```\nnpm install --save ethjs-signer\n```\n\n## Usage\n\n```js\nconst HttpProvider = require('ethjs-provider-http');\nconst Eth = require('ethjs-query');\nconst eth = new Eth(new HttpProvider('http://localhost:8545'));\nconst sign = require('ethjs-signer').sign;\nconst BN = require('bignumber.js');\n\nconst address = '0x0F6af8F8D7AAD198a7607C96fb74Ffa02C5eD86B';\nconst privateKey = '0xecbcd9838f7f2afa6e809df8d7cdae69aa5dfc14d563ee98e97effd3f6a652f2';\n\neth.getTransactionCount(address).then((nonce) =\u003e {\n  eth.sendRawTransaction(sign({\n    to: '0xce31a19193d4b23f4e9d6163d7247243bAF801c3',\n    value: 300000,\n    gas: new BN('43092000'),\n    // when sending a raw transactions it's necessary to set the gas price, currently 0.00000002 ETH\n    gasPrice: new BN('20000000000'),\n    nonce: nonce,\n  }, privateKey)).then((txHash) =\u003e {\n    console.log('Transaction Hash', txHash);\n  });\n});\n```\n\nNote, that address and private key are a valid address and private key. Only use this example address for local testing and setup. You will loose your Ether if you send it to this address.\n\n## About\n\nThis module is meant to help sign and recover Ethereum transactions. You can either sign the transaction and have it return a serilized hex payload (the default), or return the raw array of Buffer values.\n\n## Method API\n\n```\nsign     \u003cFunction  (Object, String [, Boolean]) : (String|Array)\u003e\nrecover  \u003cFunction  (Object|String, Number, Object, Object) : (Object)\u003e\n```\n\n## Contributing\n\nPlease help better the ecosystem by submitting issues and pull requests to `ethjs-signer`. We need all the help we can get to build the absolute best linting standards and utilities. We follow the AirBNB linting standard and the unix philosophy.\n\n## Guides\n\nYou'll find more detailed information on using `ethjs-signer` and tailoring it to your needs in our guides:\n\n- [User guide](docs/user-guide.md) - Usage, configuration, FAQ and complementary tools.\n- [Developer guide](docs/developer-guide.md) - Contributing to `ethjs-signer` and writing your own code and coverage.\n\n## Help out\n\nThere is always a lot of work to do, and will have many rules to maintain. So please help out in any way that you can:\n\n- Create, enhance, and debug ethjs rules (see our guide to [\"Working on rules\"](./github/CONTRIBUTING.md)).\n- Improve documentation.\n- Chime in on any open issue or pull request.\n- Open new issues about your ideas for making `ethjs-signer` better, and pull requests to show us how your idea works.\n- Add new tests to *absolutely anything*.\n- Create or contribute to ecosystem tools.\n- Spread the word!\n\nPlease consult our [Code of Conduct](CODE_OF_CONDUCT.md) docs before helping out.\n\nWe communicate via [issues](https://github.com/ethjs/ethjs-signer/issues) and [pull requests](https://github.com/ethjs/ethjs-signer/pulls).\n\n## Important documents\n\n- [Changelog](CHANGELOG.md)\n- [Code of Conduct](CODE_OF_CONDUCT.md)\n- [License](https://raw.githubusercontent.com/ethjs/ethjs-signer/master/LICENSE)\n\n## Licence\n\nThis project is licensed under the MIT license, Copyright (c) 2016 Nick Dodson. For more information see LICENSE.md.\n\n```\nThe MIT License (MIT)\n \nCopyright (c) 2016 Nick Dodson\nCopyright (c) 2014 Richard Moore\n \nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n \nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethjs%2Fethjs-signer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fethjs%2Fethjs-signer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethjs%2Fethjs-signer/lists"}