{"_id":"@biuauth/ethereum-provider","_rev":"1-542e93e6927fdba51d24ec84c0aa8343","name":"@biuauth/ethereum-provider","dist-tags":{"latest":"6.1.5"},"versions":{"6.1.4":{"name":"@biuauth/ethereum-provider","version":"6.1.4","homepage":"https://github.com/Web3Auth/Web3Auth#readme","license":"ISC","main":"dist/ethereumProvider.cjs.js","module":"dist/ethereumProvider.esm.js","unpkg":"dist/ethereumProvider.umd.min.js","jsdelivr":"dist/ethereumProvider.umd.min.js","types":"dist/types/index.d.ts","author":{"name":"Torus Labs"},"scripts":{"test":"mocha --config ../../.mocharc.json test/**.ts","test-debugger":"mocha --config ../../.mocharc.json --inspect-brk test/**.ts","dev":"torus-scripts start","build":"torus-scripts build","lint":"eslint --fix 'src/**/*.ts'","prepack":"npm run build","pre-commit":"lint-staged --cwd ."},"dependencies":{"@ethereumjs/common":"^3.1.2","@ethereumjs/tx":"^4.1.2","@ethereumjs/util":"^8.0.6","@metamask/eth-sig-util":"^5.1.0","@toruslabs/base-controllers":"^3.1.0","@toruslabs/http-helpers":"^4.0.0","@toruslabs/openlogin-jrpc":"^4.6.0","@walletconnect/legacy-types":"2.0.0","@walletconnect/utils":"^2.8.1","@web3auth/base":"^6.1.1","@web3auth/base-provider":"^6.1.1","assert":"^2.0.0","bignumber.js":"^9.1.1","bn.js":"^5.2.1","eth-rpc-errors":"^4.0.3","jsonschema":"^1.4.1"},"devDependencies":{"@types/bn.js":"^5.1.1","@types/json-rpc-random-id":"^1.0.1","@walletconnect/types":"^2.8.1"},"peerDependencies":{"@babel/runtime":"7.x"},"lint-staged":{"!(*d).ts":["eslint --cache --fix","prettier --write"]},"repository":{"type":"git","url":"git+https://github.com/Web3Auth/Web3Auth.git"},"bugs":{"url":"https://github.com/Web3Auth/Web3Auth/issues"},"keywords":[],"publishConfig":{"access":"public"},"engines":{"node":">=16.18.1","npm":">=8.x"},"gitHead":"2b31084875b8f95081c04c80a53adbda5782e70f","description":"[![npm version](https://img.shields.io/npm/v/@biuauth/ethereum-provider?label=%22%22)](https://www.npmjs.com/package/@biuauth/ethereum-provider/v/latest) [![minzip](https://img.shields.io/bundlephobia/minzip/@biuauth/ethereum-provider?label=%22%22)](https","_id":"@biuauth/ethereum-provider@6.1.4","_nodeVersion":"20.2.0","_npmVersion":"9.6.6","dist":{"integrity":"sha512-P6NE60wTQfSKNQadFr7HaSPIR+GjWPSCGh4LFk8PmLnCf2CuL39DbBRRtNx4p7U9yY3+IX1nQbiD9qmt9Wo+3A==","shasum":"de1c6afecf8796fe661b32364a2ad3e797223335","tarball":"https://registry.npmjs.org/@biuauth/ethereum-provider/-/ethereum-provider-6.1.4.tgz","fileCount":89,"unpackedSize":4272474,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCN8khvEO3LGrTQ2/B+6BhKAmuY/YTFqK0L5MiPGwH6gwIgH5eAMsilMaz5LCvhZj/3NDZXq1G1TN4hrVH8FpR+7xo="}]},"_npmUser":{"name":"leekone","email":"fengwang8888888@gmail.com"},"directories":{},"maintainers":[{"name":"leekone","email":"fengwang8888888@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ethereum-provider_6.1.4_1689142967109_0.328085633115186"},"_hasShrinkwrap":false},"6.1.5":{"name":"@biuauth/ethereum-provider","version":"6.1.5","homepage":"https://github.com/Web3Auth/Web3Auth#readme","license":"ISC","main":"dist/ethereumProvider.cjs.js","module":"dist/ethereumProvider.esm.js","unpkg":"dist/ethereumProvider.umd.min.js","jsdelivr":"dist/ethereumProvider.umd.min.js","types":"dist/types/index.d.ts","author":{"name":"Torus Labs"},"scripts":{"test":"mocha --config ../../.mocharc.json test/**.ts","test-debugger":"mocha --config ../../.mocharc.json --inspect-brk test/**.ts","dev":"torus-scripts start","build":"torus-scripts build","lint":"eslint --fix 'src/**/*.ts'","prepack":"npm run build","pre-commit":"lint-staged --cwd ."},"dependencies":{"@ethereumjs/common":"^3.1.2","@ethereumjs/tx":"^4.1.2","@ethereumjs/util":"^8.0.6","@metamask/eth-sig-util":"^5.1.0","@toruslabs/base-controllers":"^3.1.0","@toruslabs/http-helpers":"^4.0.0","@toruslabs/openlogin-jrpc":"^4.6.0","@walletconnect/legacy-types":"2.0.0","@walletconnect/utils":"^2.8.1","@web3auth/base":"^6.1.1","@web3auth/base-provider":"^6.1.1","assert":"^2.0.0","bignumber.js":"^9.1.1","bn.js":"^5.2.1","eth-rpc-errors":"^4.0.3","jsonschema":"^1.4.1"},"devDependencies":{"@types/bn.js":"^5.1.1","@types/json-rpc-random-id":"^1.0.1","@walletconnect/types":"^2.8.1"},"peerDependencies":{"@babel/runtime":"7.x"},"lint-staged":{"!(*d).ts":["eslint --cache --fix","prettier --write"]},"repository":{"type":"git","url":"git+https://github.com/Web3Auth/Web3Auth.git"},"bugs":{"url":"https://github.com/Web3Auth/Web3Auth/issues"},"keywords":[],"publishConfig":{"access":"public"},"engines":{"node":">=16.18.1","npm":">=8.x"},"gitHead":"e4773f8159b6fc49f6f846bf264b773b9ee35a88","description":"[![npm version](https://img.shields.io/npm/v/@biuauth/ethereum-provider?label=%22%22)](https://www.npmjs.com/package/@biuauth/ethereum-provider/v/latest) [![minzip](https://img.shields.io/bundlephobia/minzip/@biuauth/ethereum-provider?label=%22%22)](https","_id":"@biuauth/ethereum-provider@6.1.5","_nodeVersion":"20.2.0","_npmVersion":"9.6.6","dist":{"integrity":"sha512-W8zg/9n5YJGOdSyKdBcBxiEU941V4axjr+DNyzd0jFvnL6ovmlHD6N+DCbx6DdxqXJ/LwbmTC+TMLV6gxaW0KA==","shasum":"80a1d4996f259a448f382e7d890c81078ecd84bd","tarball":"https://registry.npmjs.org/@biuauth/ethereum-provider/-/ethereum-provider-6.1.5.tgz","fileCount":89,"unpackedSize":4272484,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC4o8Q9eolPS/2m671jVsbxsVLtS8A5DPCglKLavKz55gIgAhtqht0OkbaSO63LeAUh7wWc8e9DRDdEn+cUmlSlvlM="}]},"_npmUser":{"name":"leekone","email":"fengwang8888888@gmail.com"},"directories":{},"maintainers":[{"name":"leekone","email":"fengwang8888888@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ethereum-provider_6.1.5_1689822213923_0.6987983765313739"},"_hasShrinkwrap":false}},"time":{"created":"2023-07-12T06:22:47.052Z","6.1.4":"2023-07-12T06:22:47.431Z","modified":"2023-07-20T03:03:34.332Z","6.1.5":"2023-07-20T03:03:34.114Z"},"maintainers":[{"name":"leekone","email":"fengwang8888888@gmail.com"}],"description":"[![npm version](https://img.shields.io/npm/v/@biuauth/ethereum-provider?label=%22%22)](https://www.npmjs.com/package/@biuauth/ethereum-provider/v/latest) [![minzip](https://img.shields.io/bundlephobia/minzip/@biuauth/ethereum-provider?label=%22%22)](https","homepage":"https://github.com/Web3Auth/Web3Auth#readme","keywords":[],"repository":{"type":"git","url":"git+https://github.com/Web3Auth/Web3Auth.git"},"author":{"name":"Torus Labs"},"bugs":{"url":"https://github.com/Web3Auth/Web3Auth/issues"},"license":"ISC","readme":"# Web3Auth Ethereum Provider\n\n[![npm version](https://img.shields.io/npm/v/@biuauth/ethereum-provider?label=%22%22)](https://www.npmjs.com/package/@biuauth/ethereum-provider/v/latest)\n[![minzip](https://img.shields.io/bundlephobia/minzip/@biuauth/ethereum-provider?label=%22%22)](https://bundlephobia.com/result?p=@biuauth/ethereum-provider@latest)\n\n> Web3Auth is where passwordless auth meets non-custodial key infrastructure for Web3 apps and wallets. By aggregating OAuth (Google, Twitter, Discord) logins, different wallets and innovative Multi Party Computation (MPC) - Web3Auth provides a seamless login experience to every user on your application.\n\nWeb3Auth Ethereum Provider can be used to interact with wallet or connected EVM compatible chain using RPC calls. This is an EIP-1193 compatible JRPC provider. This package exposes a class `EthereumPrivateKeyProvider`, which accepts a `secp251k1` private key and returns `EIP1193` compatible provider, which can be used with various wallet sdks.\n\n## 📖 Documentation\n\nRead more about Web3Auth Ethereum Provider in the [official Web3Auth Documentation](https://web3auth.io/docs/sdk/web/providers/evm#getting-a-provider-from-any-secp256k1-private-key).\n\n## 💡 Features\n- Plug and Play, OAuth based Web3 Authentication Service\n- Fully decentralized, non-custodial key infrastructure\n- End to end Whitelabelable solution\n- Threshold Cryptography based Key Reconstruction\n- Multi Factor Authentication Setup & Recovery (Includes password, backup phrase, device factor editing/deletion etc)\n- Support for WebAuthn & Passwordless Login\n- Support for connecting to multiple wallets\n- DApp Active Session Management\n\n...and a lot more\n\n## 🔗 Installation\n\n```shell\nnpm install --save @biuauth/ethereum-provider\n```\n\n## 🩹 Example\n\n```ts\nimport { EthereumPrivateKeyProvider } from \"@biuauth/ethereum-provider\";\nimport type { SafeEventEmitterProvider } from \"@web3auth/base\";\nconst signEthMessage = async (provider: SafeEventEmitterProvider): Promise<string> => {\n  const web3 = new Web3(provider as any);\n  const accounts = await web3.eth.getAccounts();\n  // hex message\n  const message = \"0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad\";\n  const signature = await web3.eth.sign(message, accounts[0]);\n  return signature;\n};\n\n(async () => {\n  const provider = await EthereumPrivateKeyProvider.getProviderInstance({\n    chainConfig: {\n      rpcTarget: \"https://polygon-rpc.com\",\n      chainId: \"0x89\", // hex chain id\n      networkName: \"matic\",\n      ticker: \"matic\",\n      tickerName: \"matic\",\n    },\n    privKey: \"4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318\",\n  });\n  const signedMessage = await signEthMessage(provider);\n})();\n```\n\nCheckout the examples for your preferred blockchain and platform in our [examples repository](https://github.com/Web3Auth/examples/)\n\n## 🌐 Demo\n\nCheckout the [Web3Auth Demo](https://demo-app.web3auth.io/) to see how Web3Auth can be used in your application.\n\n## 💬 Troubleshooting and Support\n\n- Have a look at our [Community Portal](https://community.web3auth.io/) to see if anyone has any questions or issues you might be having. Feel free to reate new topics and we'll help you out as soon as possible.\n- Checkout our [Troubleshooting Documentation Page](https://web3auth.io/docs/troubleshooting) to know the common issues and solutions.\n- For Priority Support, please have a look at our [Pricing Page](https://web3auth.io/pricing.html) for the plan that suits your needs.\n","readmeFilename":"README.md"}