{"_id":"@bangjelkoski/ethereum-provider","_rev":"1-2364adb53ccdefcee2eec10633ad03a8","name":"@bangjelkoski/ethereum-provider","dist-tags":{"latest":"2.18.1"},"versions":{"2.17.2":{"name":"@bangjelkoski/ethereum-provider","version":"2.17.2","keywords":["wallet","walletconnect"],"author":{"name":"WalletConnect, Inc.","email":"walletconnect.com"},"license":"Apache-2.0","_id":"@bangjelkoski/ethereum-provider@2.17.2","maintainers":[{"name":"bangjelkoski","email":"bangjelkoskii@gmail.com"}],"homepage":"https://github.com/walletconnect/walletconnect-monorepo/","bugs":{"url":"https://github.com/walletconnect/walletconnect-monorepo/issues"},"dist":{"shasum":"9c51ec35f86afc06b703756b75e19b1e52451b6c","tarball":"https://registry.npmjs.org/@bangjelkoski/ethereum-provider/-/ethereum-provider-2.17.2.tgz","fileCount":22,"integrity":"sha512-5ZxX1CjqoTT5/L30PElefyPBF2CmnjIM946t6kU+N52XEHlKhDnNt05GnXAhhL6qCDskq52WVD+fJ/6j2zHxVg==","signatures":[{"sig":"MEUCIFNzm7dUaHab+1CLxfwIeIGdz5PxqKQuKDof7ROlessXAiEA6zTSMnH2AmKCcgU+jwNrz+dfbyOkhnTkJOdRrfSYPuo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5184826},"main":"dist/index.cjs.js","types":"dist/types/index.d.ts","unpkg":"dist/index.umd.js","module":"dist/index.es.js","exports":{".":{"types":"./dist/types/index.d.ts","module":"./dist/index.es.js","default":"./dist/index.cjs.js"}},"gitHead":"2a2fbabb6d3499cd3eebf5f43f0ce98f0694959f","scripts":{"lint":"eslint -c '../../.eslintrc' --fix './src/**/*.ts'","test":"npm run test:pre; npm run test:run","build":"npm run build:pre; npm run build:source; npm run build:types","clean":"rm -rf dist","prettier":"prettier --check '{src,test}/**/*.{js,ts,jsx,tsx}'","test:pre":"rm -rf ./test/test.db","test:run":"vitest run --dir test","build:pre":"npm run clean","build:types":"tsc","build:source":"rollup --config rollup.config.js","test:ignoreUnhandled":"npm run test:pre; npm run test:run -- --dangerouslyIgnoreUnhandledErrors"},"_npmUser":{"name":"bangjelkoski","email":"bangjelkoskii@gmail.com"},"repository":{"url":"git+https://github.com/walletconnect/walletconnect-monorepo.git","type":"git","directory":"packages/ethereum-provider"},"_npmVersion":"10.2.4","description":"Ethereum Provider for WalletConnect Protocol","directories":{},"sideEffects":false,"_nodeVersion":"18.19.1","dependencies":{"events":"3.3.0","@walletconnect/modal":"2.7.0","@walletconnect/types":"2.17.2","@walletconnect/utils":"2.17.2","@walletconnect/sign-client":"2.17.2","@walletconnect/jsonrpc-types":"1.0.4","@walletconnect/jsonrpc-utils":"1.0.8","@walletconnect/keyvaluestorage":"1.1.1","@walletconnect/jsonrpc-provider":"1.0.14","@walletconnect/universal-provider":"2.17.2","@walletconnect/jsonrpc-http-connection":"1.0.8"},"_hasShrinkwrap":false,"devDependencies":{"web3":"1.7.5","ethers":"5.6.9","uint8arrays":"3.1.0","ethereum-test-network":"0.1.6"},"_npmOperationalInternal":{"tmp":"tmp/ethereum-provider_2.17.2_1733519889273_0.6637112710824855","host":"s3://npm-registry-packages"}},"2.18.1":{"name":"@bangjelkoski/ethereum-provider","description":"Ethereum Provider for WalletConnect Protocol","version":"2.18.1","author":{"name":"WalletConnect, Inc.","email":"walletconnect.com"},"homepage":"https://github.com/walletconnect/walletconnect-monorepo/","repository":{"type":"git","url":"git+https://github.com/walletconnect/walletconnect-monorepo.git","directory":"packages/ethereum-provider"},"license":"Apache-2.0","main":"dist/index.cjs.js","module":"dist/index.es.js","unpkg":"dist/index.umd.js","types":"dist/types/index.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/types/index.d.ts","module":"./dist/index.es.js","default":"./dist/index.cjs.js"}},"keywords":["wallet","walletconnect"],"scripts":{"clean":"rm -rf dist","build:pre":"npm run clean","build:types":"tsc","build:source":"rollup --config rollup.config.js","build":"npm run build:pre; npm run build:source; npm run build:types","test:pre":"rm -rf ./test/test.db","test:run":"vitest run --dir test","test":"npm run test:pre; npm run test:run","test:ignoreUnhandled":"npm run test:pre; npm run test:run -- --dangerouslyIgnoreUnhandledErrors","lint":"eslint -c '../../.eslintrc' --fix './src/**/*.ts'","prettier":"prettier --check '{src,test}/**/*.{js,ts,jsx,tsx}'"},"dependencies":{"@walletconnect/jsonrpc-http-connection":"1.0.8","@walletconnect/jsonrpc-provider":"1.0.14","@walletconnect/jsonrpc-types":"1.0.4","@walletconnect/jsonrpc-utils":"1.0.8","@walletconnect/keyvaluestorage":"1.1.1","@walletconnect/modal":"2.7.0","@walletconnect/sign-client":"2.18.1","@walletconnect/types":"2.18.1","@walletconnect/universal-provider":"2.18.1","@walletconnect/utils":"2.18.1","events":"3.3.0"},"devDependencies":{"ethereum-test-network":"0.1.6","ethers":"5.6.9","uint8arrays":"3.1.0","web3":"1.7.5"},"_id":"@bangjelkoski/ethereum-provider@2.18.1","gitHead":"23cd671a06b76c6bc20dc87d44d471272525115e","bugs":{"url":"https://github.com/walletconnect/walletconnect-monorepo/issues"},"_nodeVersion":"20.18.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-/K9FKfCOFhyeyeJi41K7Td+bNvWtobAbAsCaCT9DDMkfvQ+RfuzcXiYVVxHn3Pr4DPhfifQG3P5NmRRVhBXLnA==","shasum":"2cd312870bd772ffda8e8ad47acf48d3b267272a","tarball":"https://registry.npmjs.org/@bangjelkoski/ethereum-provider/-/ethereum-provider-2.18.1.tgz","fileCount":22,"unpackedSize":3941185,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQC6Ipt3byLRBfL4M3GQh6T0i5UtBnE31AFBrhxfoHIXYgIhAJG5WTbMjVR6HEOU/OZjaxzSVWBUiUoxJnJkuUVMxk6k"}]},"_npmUser":{"name":"bangjelkoski","email":"bangjelkoskii@gmail.com"},"directories":{},"maintainers":[{"name":"bangjelkoski","email":"bangjelkoskii@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ethereum-provider_2.18.1_1740046393285_0.3596261581727258"},"_hasShrinkwrap":false}},"time":{"created":"2024-12-06T21:18:09.162Z","modified":"2025-02-20T10:13:13.835Z","2.17.2":"2024-12-06T21:18:09.543Z","2.18.1":"2025-02-20T10:13:13.674Z"},"bugs":{"url":"https://github.com/walletconnect/walletconnect-monorepo/issues"},"author":{"name":"WalletConnect, Inc.","email":"walletconnect.com"},"license":"Apache-2.0","homepage":"https://github.com/walletconnect/walletconnect-monorepo/","keywords":["wallet","walletconnect"],"repository":{"type":"git","url":"git+https://github.com/walletconnect/walletconnect-monorepo.git","directory":"packages/ethereum-provider"},"description":"Ethereum Provider for WalletConnect Protocol","maintainers":[{"name":"bangjelkoski","email":"bangjelkoskii@gmail.com"}],"readme":"# @walletconnect/ethereum-provider\n\nEthereum Provider for WalletConnect Protocol.\n\n## Installation\n\n```\nnpm i @walletconnect/ethereum-provider\n```\n\n## Initialization\n\n```typescript\nimport { EthereumProvider } from \"@walletconnect/ethereum-provider\";\n\nconst provider = await EthereumProvider.init({\n  projectId, // REQUIRED your projectId\n  chains, // REQUIRED chain ids\n  showQrModal, // REQUIRED set to \"true\" to use @walletconnect/modal,\n  methods, // OPTIONAL ethereum methods\n  events, // OPTIONAL ethereum events\n  rpcMap, // OPTIONAL rpc urls for each chain\n  metadata, // OPTIONAL metadata of your app\n  storage, // OPTIONAL custom storage implementation\n  storageOptions, // OPTIONAL storage config options\n  qrModalOptions, // OPTIONAL - `undefined` by default\n});\n```\n\n## Display WalletConnectModal with QR code / Handle connection URI\n\n```typescript\n// WalletConnectModal is disabled by default, enable it during init() to display a QR code modal\nawait provider.connect({\n  chains, // OPTIONAL chain ids\n  rpcMap, // OPTIONAL rpc urls\n  pairingTopic, // OPTIONAL pairing topic\n});\n// or\nawait provider.enable();\n```\n\n```typescript\n// If you are not using WalletConnectModal,\n// you can subscribe to the `display_uri` event and handle the URI yourself.\nprovider.on(\"display_uri\", (uri: string) => {\n  // ... custom logic\n});\n\nawait provider.connect();\n// or\nawait provider.enable();\n```\n\n## Sending Requests\n\n```typescript\nconst result = await provider.request({ method: \"eth_requestAccounts\" });\n\n// OR\n\nprovider.sendAsync({ method: \"eth_requestAccounts\" }, CallBackFunction);\n```\n\n## Events\n\n```typescript\n// chain changed\nprovider.on(\"chainChanged\", handler);\n// accounts changed\nprovider.on(\"accountsChanged\", handler);\n// session established\nprovider.on(\"connect\", handler);\n// session event - chainChanged/accountsChanged/custom events\nprovider.on(\"session_event\", handler);\n// connection uri\nprovider.on(\"display_uri\", handler);\n// session disconnect\nprovider.on(\"disconnect\", handler);\n```\n\n## Supported WalletConnectModal options (qrModalOptions)\n\nPlease reference [up to date documentation](https://docs.walletconnect.com/2.0/web/web3modal/html/ethereum-provider/options) for `WalletConnectModal`\n","readmeFilename":"README.md"}