{"_id":"@0xkey-io/ethers","_rev":"3-a480490814bf21c557da7f846ec76220","name":"@0xkey-io/ethers","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0":{"name":"@0xkey-io/ethers","version":"0.1.0","keywords":["0xkey","Ethers","ethers.js"],"author":{"url":"https://0xkey.com/","name":"0xkey"},"license":"Apache-2.0","_id":"@0xkey-io/ethers@0.1.0","maintainers":[{"name":"0xkey-developer","email":"developer@0xkey.io"}],"homepage":"https://github.com/0xkey-io/sdk-js/tree/main/packages/ethers","bugs":{"url":"https://github.com/0xkey-io/sdk-js/issues"},"dist":{"shasum":"a53297d5a8eecb92d1d976202054406490c0661b","tarball":"https://registry.npmjs.org/@0xkey-io/ethers/-/ethers-0.1.0.tgz","fileCount":10,"integrity":"sha512-C87jDMEAyDbsaOb5u9Uu5GQr9BkL89zQuiwJJmKJUoG5yLD79GJ43PU0XKyTWXq84+6PhXdJpIhLQspxoGzoUQ==","signatures":[{"sig":"MEUCIATfsGzf9p9dWE7HLyBupwG8fHBCq9KTEJf7N888NYsdAiEAxUoN3kVvV8PasK2NpO2snwM0pG7c+NeOjYN9JZE1GKM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":50656},"main":"./dist/index.js","_from":"file:0xkey-io-ethers-0.1.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","default":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"test":"jest","build":"rollup -c","clean":"rimraf ./dist ./.cache","typecheck":"tsc -p tsconfig.typecheck.json","hardhat:clean":"hardhat clean","compile:contracts":"hardhat compile"},"_npmUser":{"name":"0xkey-developer","email":"developer@0xkey.io"},"_resolved":"/private/var/folders/lf/b69416ms3zvccf0ght6bq02r0000gn/T/c19887e0556cc33ffadcd04c81809692/0xkey-io-ethers-0.1.0.tgz","_integrity":"sha512-C87jDMEAyDbsaOb5u9Uu5GQr9BkL89zQuiwJJmKJUoG5yLD79GJ43PU0XKyTWXq84+6PhXdJpIhLQspxoGzoUQ==","repository":{"url":"git+https://github.com/0xkey-io/sdk-js.git","type":"git","directory":"packages/ethers"},"_npmVersion":"11.4.2","description":"0xkey Signer for Ethers","directories":{},"_nodeVersion":"24.3.0","dependencies":{"@0xkey-io/core":"0.1.0","@0xkey-io/http":"0.1.0","@0xkey-io/sdk-server":"0.1.0","@0xkey-io/sdk-browser":"0.1.0","@0xkey-io/api-key-stamper":"0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ethers":"^6.10.0","hardhat":"^2.19.4","typechain":"^8.3.2","@typechain/hardhat":"^9.1.0","@typechain/ethers-v6":"^0.5.1","@openzeppelin/contracts":"^5.0.2","@nomicfoundation/hardhat-ethers":"3.0.5","@nomicfoundation/hardhat-network-helpers":"^1.0.8"},"peerDependencies":{"ethers":"^6.10.0"},"_npmOperationalInternal":{"tmp":"tmp/ethers_0.1.0_1779443577882_0.7714238949328609","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@0xkey-io/ethers","version":"0.1.1","keywords":["0xkey","Ethers","ethers.js"],"author":{"url":"https://0xkey.com/","name":"0xkey"},"license":"Apache-2.0","_id":"@0xkey-io/ethers@0.1.1","maintainers":[{"name":"0xkey-developer","email":"developer@0xkey.io"}],"homepage":"https://github.com/0xkey-io/sdk-js/tree/main/packages/ethers","bugs":{"url":"https://github.com/0xkey-io/sdk-js/issues"},"dist":{"shasum":"06b75ab3c99cb18469b28cad871216b609281664","tarball":"https://registry.npmjs.org/@0xkey-io/ethers/-/ethers-0.1.1.tgz","fileCount":10,"integrity":"sha512-uc/KJD4hIgd0JQpFFv83g/3T4lzLbKD8F2VM/Ut18oPl7M85MU0yoCuMjr1t5heQ2lZ+6rQmQYyahUEjxkXNwg==","signatures":[{"sig":"MEUCIQCPSojfSr7kBVwEgoCpaD/s09TmMLSP26ngjWvTk7BqWAIgH76CbBYt9qCzlsQVEXYFY1ru6rOAGCAqbhytmN5H9pM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":50862},"main":"./dist/index.js","_from":"file:0xkey-io-ethers-0.1.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","default":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"test":"jest","build":"rollup -c","clean":"rimraf ./dist ./.cache","typecheck":"tsc -p tsconfig.typecheck.json","hardhat:clean":"hardhat clean","compile:contracts":"hardhat compile"},"_npmUser":{"name":"0xkey-developer","email":"developer@0xkey.io"},"_resolved":"/private/var/folders/lf/b69416ms3zvccf0ght6bq02r0000gn/T/05e9ab3fbd36db9954090c4ebe0653c9/0xkey-io-ethers-0.1.1.tgz","_integrity":"sha512-uc/KJD4hIgd0JQpFFv83g/3T4lzLbKD8F2VM/Ut18oPl7M85MU0yoCuMjr1t5heQ2lZ+6rQmQYyahUEjxkXNwg==","repository":{"url":"git+https://github.com/0xkey-io/sdk-js.git","type":"git","directory":"packages/ethers"},"_npmVersion":"11.4.2","description":"0xkey Signer for Ethers","directories":{},"_nodeVersion":"24.3.0","dependencies":{"@0xkey-io/core":"0.1.1","@0xkey-io/http":"0.1.1","@0xkey-io/sdk-server":"0.1.1","@0xkey-io/sdk-browser":"0.1.1","@0xkey-io/api-key-stamper":"0.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ethers":"^6.10.0","hardhat":"^2.19.4","typechain":"^8.3.2","@typechain/hardhat":"^9.1.0","@typechain/ethers-v6":"^0.5.1","@openzeppelin/contracts":"^5.0.2","@nomicfoundation/hardhat-ethers":"3.0.5","@nomicfoundation/hardhat-network-helpers":"^1.0.8"},"peerDependencies":{"ethers":"^6.10.0"},"_npmOperationalInternal":{"tmp":"tmp/ethers_0.1.1_1779452037203_0.6633014160978941","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@0xkey-io/ethers","version":"0.1.3","main":"./dist/index.js","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js","default":"./dist/index.mjs"}},"types":"./dist/index.d.ts","license":"Apache-2.0","description":"0xkey Signer for Ethers","keywords":["0xkey","Ethers","ethers.js"],"author":{"name":"0xkey","url":"https://0xkey.com/"},"homepage":"https://github.com/0xkey-io/sdk-js/tree/main/packages/ethers","bugs":{"url":"https://github.com/0xkey-io/sdk-js/issues"},"repository":{"type":"git","url":"git+https://github.com/0xkey-io/sdk-js.git","directory":"packages/ethers"},"publishConfig":{"access":"public"},"peerDependencies":{"ethers":"^6.10.0"},"dependencies":{"@0xkey-io/api-key-stamper":"0.1.2","@0xkey-io/http":"0.1.2","@0xkey-io/sdk-browser":"0.1.2","@0xkey-io/sdk-server":"0.1.2","@0xkey-io/core":"0.2.0"},"devDependencies":{"@nomicfoundation/hardhat-ethers":"3.0.5","@nomicfoundation/hardhat-network-helpers":"^1.0.8","@openzeppelin/contracts":"^5.0.2","@typechain/ethers-v6":"^0.5.1","@typechain/hardhat":"^9.1.0","ethers":"^6.10.0","hardhat":"^2.19.4","typechain":"^8.3.2"},"engines":{"node":">=18.0.0"},"scripts":{"build":"rollup -c","clean":"rimraf ./dist ./.cache","hardhat:clean":"hardhat clean","compile:contracts":"hardhat compile","test":"jest","typecheck":"tsc -p tsconfig.typecheck.json"},"_id":"@0xkey-io/ethers@0.1.3","_integrity":"sha512-tr8EfF3qOCt+gq4ZVQXQiLt/J+2yQf57V/z0i4Af/x1ybyJ0Wo2OViw6a2UMj7VXABXttA3hEWu59TdciotP2w==","_resolved":"/tmp/0cc53786c3bed5eaf9dd22531dd82020/0xkey-io-ethers-0.1.3.tgz","_from":"file:0xkey-io-ethers-0.1.3.tgz","_nodeVersion":"20.17.0","_npmVersion":"11.5.1","dist":{"integrity":"sha512-tr8EfF3qOCt+gq4ZVQXQiLt/J+2yQf57V/z0i4Af/x1ybyJ0Wo2OViw6a2UMj7VXABXttA3hEWu59TdciotP2w==","shasum":"16168ef0881703361653a786fa7a5d019d406313","tarball":"https://registry.npmjs.org/@0xkey-io/ethers/-/ethers-0.1.3.tgz","fileCount":10,"unpackedSize":51245,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIF4l58NClR1P6hMVbWFwk8NY2dN4WVzv6nwiejvEQWLqAiAODTPciy8ZeFIP7f0HFKA22lr1Cf9pDOSTmSFh+eTbQQ=="}]},"_npmUser":{"name":"0xkey-developer","email":"developer@0xkey.io"},"directories":{},"maintainers":[{"name":"0xkey-developer","email":"developer@0xkey.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ethers_0.1.3_1782244190254_0.3785076566851724"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-22T09:52:57.772Z","modified":"2026-06-23T19:49:50.561Z","0.1.0":"2026-05-22T09:52:58.009Z","0.1.1":"2026-05-22T12:13:57.345Z","0.1.3":"2026-06-23T19:49:50.424Z"},"bugs":{"url":"https://github.com/0xkey-io/sdk-js/issues"},"author":{"name":"0xkey","url":"https://0xkey.com/"},"license":"Apache-2.0","homepage":"https://github.com/0xkey-io/sdk-js/tree/main/packages/ethers","keywords":["0xkey","Ethers","ethers.js"],"repository":{"type":"git","url":"git+https://github.com/0xkey-io/sdk-js.git","directory":"packages/ethers"},"description":"0xkey Signer for Ethers","maintainers":[{"name":"0xkey-developer","email":"developer@0xkey.io"}],"readme":"# @0xkey-io/ethers\n\n[![npm](https://img.shields.io/npm/v/@0xkey-io/ethers?color=%234C48FF)](https://www.npmjs.com/package/@0xkey-io/ethers)\n\n[ZeroXKey](https://0xkey.com) Signer for [`Ethers`](https://docs.ethers.org/v6/api/providers/#Signer).\n\nIf you need a lower-level, fully typed HTTP client for interacting with ZeroXKey API, check out [`@0xkey-io/http`](/packages/http/).\n\nAPI Docs: https://docs.0xkey.com/\n\n## Getting started\n\n```bash\n$ npm install ethers @0xkey-io/ethers\n```\n\n```typescript\nimport { ethers } from \"ethers\";\nimport { ZeroXKeySigner } from \"@0xkey-io/ethers\";\nimport { ZeroXKeyClient } from \"@0xkey-io/http\";\nimport { ApiKeyStamper } from \"@0xkey-io/api-key-stamper\";\n\nasync function main() {\n  const network = \"goerli\";\n  const provider = new ethers.providers.InfuraProvider(network);\n\n  const zeroXKeyClient = new ZeroXKeyClient(\n    {\n      baseUrl: \"https://api.0xkey.com\",\n    },\n    // This uses API key credentials.\n    // If you're using passkeys, use `@0xkey-io/webauthn-stamper` to collect webauthn signatures:\n    // new WebauthnStamper({...options...})\n    new ApiKeyStamper({\n      apiPublicKey: \"...\",\n      apiPrivateKey: \"...\",\n    }),\n  );\n\n  // Initialize a ZeroXKey Signer\n  const zeroXKeySigner = new ZeroXKeySigner({\n    client: zeroXKeyClient,\n    organizationId: \"...\",\n    signWith: \"...\",\n  });\n\n  // Connect it with a Provider (https://docs.ethers.org/v6/api/providers/)\n  const connectedSigner = zeroXKeySigner.connect(provider);\n\n  const chainId = await connectedSigner.getChainId();\n  const address = await connectedSigner.getAddress();\n  const balance = await connectedSigner.getBalance();\n  const transactionCount = await connectedSigner.getTransactionCount();\n\n  console.log(`Network\\n\\t${network} (chain ID ${chainId})`);\n  console.log(`Address\\n\\t${address}`);\n  console.log(`Balance\\n\\t${String(balance)}`);\n  console.log(`Transaction count\\n\\t${transactionCount}`);\n\n  const transactionRequest = {\n    to: \"0x2Ad9eA1E677949a536A270CEC812D6e868C88108\",\n    value: ethers.utils.parseEther(\"0.0001\"),\n    type: 2,\n  };\n\n  const signedTx = await connectedSigner.signTransaction(transactionRequest);\n\n  console.log(`Signed transaction\\n\\t${signedTx}`);\n\n  if (balance.isZero()) {\n    let warningMessage =\n      \"\\nWarning: the transaction won't be broadcasted because your account balance is zero.\\n\";\n    if (network === \"goerli\") {\n      warningMessage +=\n        \"Use https://goerlifaucet.com/ to request funds on Goerli, then run the script again.\\n\";\n    }\n\n    console.warn(warningMessage);\n    return;\n  }\n\n  const sentTx = await connectedSigner.sendTransaction(transactionRequest);\n\n  console.log(\n    `Transaction sent!\\n\\thttps://${network}.etherscan.io/tx/${sentTx.hash}`,\n  );\n}\n\nmain().catch((error) => {\n  console.error(error);\n  process.exit(1);\n});\n```\n\n## Testing (Local)\n\nSee `.env.example` to get your local testing environment right. Run `pnpm jest` to run the tests.\n\n## More examples\n\n| Example                                               | Description                                                                                                        |\n| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |\n| [`with-ethers`](/examples/with-ethers/)               | Create a new Ethereum address, then sign and broadcast a transaction using the Ethers signer with Infura           |\n| [`with-gnosis`](/examples/with-gnosis/)               | Create new Ethereum addresses, configure a 3/3 Gnosis safe, and create + execute a transaction from it             |\n| [`with-uniswap`](/examples/with-uniswap/)             | Sign and broadcast a Uniswap v3 trade using the Ethers signer with Infura                                          |\n| [`with-nonce-manager`](/examples/with-nonce-manager/) | Create a new Ethereum address, then sign and broadcast multiple transactions in a sequential or optimistic manner. |\n| [`sweeper`](/examples/sweeper/)                       | Sweep funds from one address to a different address                                                                |\n| [`deployer`](/examples/deployer/)                     | Compile and deploy a smart contract                                                                                |\n\n## See also\n\n- [`@0xkey-io/http`](/packages/http/): lower-level fully typed HTTP client for interacting with ZeroXKey API\n","readmeFilename":"README.md"}