{"_id":"@bangjelkoski/wc-ethereum-provider","name":"@bangjelkoski/wc-ethereum-provider","dist-tags":{"latest":"2.18.1"},"versions":{"2.18.1":{"name":"@bangjelkoski/wc-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/wc-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-/Ij2l/NwHmsU7e0OhGtG7s21iqx8gsPRdHtCTJf1TUctcPdcOpq0GYjsXcrOd/iPY64ioZ2+8QM7b5djxnN2yw==","shasum":"166ef519ed83552265e2912a4ea4313589727c43","tarball":"https://registry.npmjs.org/@bangjelkoski/wc-ethereum-provider/-/wc-ethereum-provider-2.18.1.tgz","fileCount":22,"unpackedSize":3941188,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFhYgUBhhQOt73s+BVvEupNPVn7aWMR7SjqCNM+B3mAHAiADluDeYX5MZoJ5+GqwNK2tiC2rfyvw9sb/jJKz9bm6Hw=="}]},"_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/wc-ethereum-provider_2.18.1_1740046405519_0.6742355043471933"},"_hasShrinkwrap":false}},"time":{"created":"2025-02-20T10:13:25.439Z","2.18.1":"2025-02-20T10:13:25.826Z","modified":"2025-02-20T10:13:26.059Z"},"maintainers":[{"name":"bangjelkoski","email":"bangjelkoskii@gmail.com"}],"description":"Ethereum Provider for WalletConnect Protocol","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"},"author":{"name":"WalletConnect, Inc.","email":"walletconnect.com"},"bugs":{"url":"https://github.com/walletconnect/walletconnect-monorepo/issues"},"license":"Apache-2.0","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"}