{"_id":"@0xkey-io/eip-1193-provider","_rev":"3-dd08323bf9e189658801420686ccc0c4","name":"@0xkey-io/eip-1193-provider","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0":{"name":"@0xkey-io/eip-1193-provider","version":"0.1.0","keywords":["0xkey","EIP-1193","Ethereum","Ethereum Provider"],"author":{"url":"https://0xkey.com/","name":"0xkey"},"license":"Apache-2.0","_id":"@0xkey-io/eip-1193-provider@0.1.0","maintainers":[{"name":"0xkey-developer","email":"developer@0xkey.io"}],"homepage":"https://github.com/0xkey-io/sdk-js/tree/main/packages/eip-1193-provider","bugs":{"url":"https://github.com/0xkey-io/sdk-js/issues"},"dist":{"shasum":"c879288afe0b2e9a9e123965c7d8a141df49b245","tarball":"https://registry.npmjs.org/@0xkey-io/eip-1193-provider/-/eip-1193-provider-0.1.0.tgz","fileCount":42,"integrity":"sha512-BFmGPvYXhs1VIaBhdVuI3aMV+2gqf/bJVqAr1RJwuKo7/UKb3B9BdQheKAKrCgj/Yz48PBk8v3L4h93Bk0zIFg==","signatures":[{"sig":"MEYCIQCRYLTndCDhsaW1tWkS7OvBJRaSBWMQwA7+M40WiIX4tgIhAKy5ftoFhoj37yuw/VMP9xHmvs6OorV7KoUaF1XeHSJs","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":132318},"main":"./dist/index.js","_from":"file:0xkey-io-eip-1193-provider-0.1.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","default":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"test":"jest","anvil":"anvil","build":"rollup -c","clean":"rimraf ./dist ./.cache","version":"node -p \"'export const VERSION = ' + JSON.stringify(require('./package.json').name + '@' + require('./package.json').version) + ';'\" > src/version.ts","typecheck":"tsc -p tsconfig.typecheck.json"},"_npmUser":{"name":"0xkey-developer","email":"developer@0xkey.io"},"_resolved":"/private/var/folders/lf/b69416ms3zvccf0ght6bq02r0000gn/T/f399cdb8f6c88e5ba29341852881d912/0xkey-io-eip-1193-provider-0.1.0.tgz","_integrity":"sha512-BFmGPvYXhs1VIaBhdVuI3aMV+2gqf/bJVqAr1RJwuKo7/UKb3B9BdQheKAKrCgj/Yz48PBk8v3L4h93Bk0zIFg==","repository":{"url":"git+https://github.com/0xkey-io/sdk-js.git","type":"git","directory":"packages/eip-1193-provider"},"_npmVersion":"11.4.2","description":"EIP-1193 Provider for 0xkey.","directories":{},"_nodeVersion":"24.3.0","dependencies":{"viem":"2.7.19","@0xkey-io/core":"0.1.0","@0xkey-io/http":"0.1.0","@0xkey-io/sdk-browser":"0.1.0","@0xkey-io/api-key-stamper":"0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"hardhat":"^2.22.2","typescript":"5.4.3"},"_npmOperationalInternal":{"tmp":"tmp/eip-1193-provider_0.1.0_1779443572507_0.7553158347500908","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@0xkey-io/eip-1193-provider","version":"0.1.1","keywords":["0xkey","EIP-1193","Ethereum","Ethereum Provider"],"author":{"url":"https://0xkey.com/","name":"0xkey"},"license":"Apache-2.0","_id":"@0xkey-io/eip-1193-provider@0.1.1","maintainers":[{"name":"0xkey-developer","email":"developer@0xkey.io"}],"homepage":"https://github.com/0xkey-io/sdk-js/tree/main/packages/eip-1193-provider","bugs":{"url":"https://github.com/0xkey-io/sdk-js/issues"},"dist":{"shasum":"c205aae431248e1aec36867c5096d3cf71e93eb0","tarball":"https://registry.npmjs.org/@0xkey-io/eip-1193-provider/-/eip-1193-provider-0.1.1.tgz","fileCount":42,"integrity":"sha512-uTtuTHvQYw7qvgAof8lpC3/4I2H+yd489v2482iNUdWnZrYpCRr5/e8JqDXLtpQ4fboObTTAQ3EcVc3r5c+ekA==","signatures":[{"sig":"MEQCIH63WKzq5KjsmbkNqAHUDCYR3ja7bFSNuj1S7fV3lO9jAiAtMSqh+WpPceRb3JYDmohF8Gg0t82py8P6P9sijEQyig==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":132493},"main":"./dist/index.js","_from":"file:0xkey-io-eip-1193-provider-0.1.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","default":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"test":"jest","anvil":"anvil","build":"rollup -c","clean":"rimraf ./dist ./.cache","version":"node -p \"'export const VERSION = ' + JSON.stringify(require('./package.json').name + '@' + require('./package.json').version) + ';'\" > src/version.ts","typecheck":"tsc -p tsconfig.typecheck.json"},"_npmUser":{"name":"0xkey-developer","email":"developer@0xkey.io"},"_resolved":"/private/var/folders/lf/b69416ms3zvccf0ght6bq02r0000gn/T/3330ae391e2f2bc73ead4d0da21a9355/0xkey-io-eip-1193-provider-0.1.1.tgz","_integrity":"sha512-uTtuTHvQYw7qvgAof8lpC3/4I2H+yd489v2482iNUdWnZrYpCRr5/e8JqDXLtpQ4fboObTTAQ3EcVc3r5c+ekA==","repository":{"url":"git+https://github.com/0xkey-io/sdk-js.git","type":"git","directory":"packages/eip-1193-provider"},"_npmVersion":"11.4.2","description":"EIP-1193 Provider for 0xkey.","directories":{},"_nodeVersion":"24.3.0","dependencies":{"viem":"2.7.19","@0xkey-io/core":"0.1.1","@0xkey-io/http":"0.1.1","@0xkey-io/sdk-browser":"0.1.1","@0xkey-io/api-key-stamper":"0.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"hardhat":"^2.22.2","typescript":"5.4.3"},"_npmOperationalInternal":{"tmp":"tmp/eip-1193-provider_0.1.1_1779452031579_0.18060977539508638","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@0xkey-io/eip-1193-provider","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":"EIP-1193 Provider for 0xkey.","keywords":["0xkey","EIP-1193","Ethereum","Ethereum Provider"],"author":{"name":"0xkey","url":"https://0xkey.com/"},"homepage":"https://github.com/0xkey-io/sdk-js/tree/main/packages/eip-1193-provider","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/eip-1193-provider"},"publishConfig":{"access":"public"},"dependencies":{"viem":"2.7.19","@0xkey-io/api-key-stamper":"0.1.2","@0xkey-io/http":"0.1.2","@0xkey-io/core":"0.2.0","@0xkey-io/sdk-browser":"0.1.2"},"devDependencies":{"hardhat":"^2.22.2","typescript":"5.4.3"},"scripts":{"version":"node -p \"'export const VERSION = ' + JSON.stringify(require('./package.json').name + '@' + require('./package.json').version) + ';'\" > src/version.ts","build":"rollup -c","clean":"rimraf ./dist ./.cache","test":"jest","anvil":"anvil","typecheck":"tsc -p tsconfig.typecheck.json"},"_id":"@0xkey-io/eip-1193-provider@0.1.3","_integrity":"sha512-4qc2Mp6j7l0obtuRjOC4dht9IT0QOu3ra2wDuEVhkOjh4PThX9H3aIrgud0qM1nAOK9hGVfAILDKQY8wXceHXA==","_resolved":"/tmp/da480b03b0508086a1bee679a9fdbd3d/0xkey-io-eip-1193-provider-0.1.3.tgz","_from":"file:0xkey-io-eip-1193-provider-0.1.3.tgz","_nodeVersion":"20.17.0","_npmVersion":"11.5.1","dist":{"integrity":"sha512-4qc2Mp6j7l0obtuRjOC4dht9IT0QOu3ra2wDuEVhkOjh4PThX9H3aIrgud0qM1nAOK9hGVfAILDKQY8wXceHXA==","shasum":"e50321fc90c32573d566a40cbb7c4c5eba30c61c","tarball":"https://registry.npmjs.org/@0xkey-io/eip-1193-provider/-/eip-1193-provider-0.1.3.tgz","fileCount":42,"unpackedSize":132842,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBG0/Vs+D1juKJVUABuD96cN9wd8Zm7hcrFkbjoxmv35AiAmZi+LHqKMHJmSmAbg+mZDi9qENrmIAdPOv+B+jt9Rbg=="}]},"_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/eip-1193-provider_0.1.3_1782244180935_0.14937344458309987"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-22T09:52:52.329Z","modified":"2026-06-23T19:49:41.249Z","0.1.0":"2026-05-22T09:52:52.651Z","0.1.1":"2026-05-22T12:13:51.778Z","0.1.3":"2026-06-23T19:49:41.106Z"},"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/eip-1193-provider","keywords":["0xkey","EIP-1193","Ethereum","Ethereum Provider"],"repository":{"type":"git","url":"git+https://github.com/0xkey-io/sdk-js.git","directory":"packages/eip-1193-provider"},"description":"EIP-1193 Provider for 0xkey.","maintainers":[{"name":"0xkey-developer","email":"developer@0xkey.io"}],"readme":"# ZeroXKey EIP-1193 Provider\n\nThe `@0xkey-io/eip-1193-provider` package delivers a ZeroXKey-compatible Ethereum provider that adheres to the EIP-1193 standards. It's built to integrate seamlessly with a broad spectrum of EVM-compatible chains, offering capabilities like account management, transaction signing, and blockchain interaction. This initial setup is intended for use in conjunction with the [`@0xkey-io/http`](https://www.npmjs.com/package/@0xkey-io/http) and [`@0xkey-io/webauthn-stamper`](https://www.npmjs.com/package/@0xkey-io/webauthn-stamper) package, for initial authentication.\n\n## Installation\n\nBefore you start using the ZeroXKey EIP-1193 Provider, make sure to install the necessary packages in your project. This guide assumes you have a Node.js environment ready for development.\n\nInstall the required packages using NPM or Yarn:\n\n```bash\nnpm install @0xkey-io/eip-1193-provider @0xkey-io/http @0xkey-io/webauthn-stamper\n```\n\n```bash\npnpm add @0xkey-io/eip-1193-provider @0xkey-io/http @0xkey-io/webauthn-stamper\n```\n\n```bash\nyarn add @0xkey-io/eip-1193-provider @0xkey-io/http @0xkey-io/webauthn-stamper\n```\n\n## Initialization\n\nTo set up the ZeroXKey EIP-1193 Provider, you need to initialize it with your configuration, which includes setting up the ZeroXKey client with your base URL and stamper.\n\n```ts\nimport { WebauthnStamper } from \"@0xkey-io/webauthn-stamper\";\nimport { ZeroXKeyClient } from \"@0xkey-io/http\";\n\nconst stamper = new WebauthnStamper({\n  rpId: \"example.com\",\n});\n\n// Initialize the ZeroXKey HTTP client\nconst zeroXKeyClient = new ZeroXKeyClient(\n  { baseUrl: \"https://api.0xkey.com\" },\n  stamper,\n);\n\n// Get the organizationId of the sub-organization connected to the users account\nconst { organizationId } = await zeroXKeyClient.getWhoami({\n  organizationId: process.env.ORGANIZATION_ID,\n});\n\n// Get the user wallets associated with their sub-organization\nconst { wallets } = await zeroXKeyClient.getWallets({\n  organizationId,\n});\n\n// Get the walletId to connect to the provider\nconst walletId = wallets[0].walletId;\n\nconst chain = {\n  chainName: \"Ethereum Mainnet\",\n  chainId: \"0x1\",\n  rpcUrls: [\"https://mainnet.infura.io/v3/your-infura-project-id\"],\n};\n\n// Initialize the EIP-1193 Provider with your configuration\nconst provider = await createEIP1193Provider({\n  walletId,\n  organizationId,\n  zeroXKeyClient,\n  chains: [\n    chain,\n    // Add more chains as needed\n  ],\n});\n```\n\n## Usage\n\n### `eth_requestAccounts`\n\nRequests the user to provide an Ethereum address for identification, as specified by [EIP-1102](https://eips.ethereum.org/EIPS/eip-1102). This method initiates connectivity with the client and will prompt for passkey authentication.\n\n```javascript\nconst accounts = await provider.request({ method: \"eth_requestAccounts\" });\n// Logs the array accounts associated with the provided walletId & organization\nconsole.log(accounts);\n```\n\n### Authentication Prompt Methods\n\nThe following methods also prompt for passkey authentication:\n\n- `personal_sign`: Signs a message with the specified account.\n- `eth_sign`: Signs data with the specified account.\n- `eth_signTransaction`: Signs a transaction with the specified account.\n- `eth_signTypedData_v4`: Signs typed data according to EIP-712 with the specified account.\n- `eth_sendTransaction`: Submits a transaction to the network for execution.\n\n## Testing (Local)\n\n1. Copy `.env.example` to `.env`\n\n   ```bash\n   $ cp .env.example .env\n   ```\n\n2. Start the Anvil node in one shell:\n   - Install [Foundry](https://book.getfoundry.sh/getting-started/installation) & Anvil if you haven't done so already\n   - Add Foundry to your `$PATH`\n     ```bash\n     $ export PATH=\"$PATH:$HOME/.foundry/bin\"\n     ```\n   - Source your env e.g.\n     ```bash\n     $ source ~/.zshrc\n     ```\n   - Run `foundryup` to install `Anvil`\n     ```bash\n     $ foundryup\n     ```\n   - Start Anvil\n     ```\n     $ pnpm anvil\n     ```\n\n3. Run the tests in a new shell:\n\n   ```\n   $ pnpm test\n   ```\n\n## Contributing\n\nWe welcome contributions to improve the `ZeroXKey EIP-1193 Provider`. Please follow the project's [contribution guidelines](https://github.com/0xkey-io/sdk-js/blob/ad9071716919d062ba67fd623a01cbd4523ed444/CONTRIBUTING.md).\n\n## License\n\nThis project is licensed under [LICENSE](./LICENSE), with detailed information available in the repository.\n","readmeFilename":"README.md"}