{"_id":"@bangjelkoski/wallet-connect-ethereum-provider","name":"@bangjelkoski/wallet-connect-ethereum-provider","dist-tags":{"latest":"2.17.2"},"versions":{"2.17.2":{"name":"@bangjelkoski/wallet-connect-ethereum-provider","description":"Ethereum Provider for WalletConnect Protocol","version":"2.17.2","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.17.2","@walletconnect/types":"2.17.2","@walletconnect/universal-provider":"2.17.2","@walletconnect/utils":"2.17.2","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/wallet-connect-ethereum-provider@2.17.2","gitHead":"2a2fbabb6d3499cd3eebf5f43f0ce98f0694959f","bugs":{"url":"https://github.com/walletconnect/walletconnect-monorepo/issues"},"_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-mot/LCgPMcWVeUH3pGCBMjubqSO9B3QEoo4RVP8Q5WLP7cspd+vK2lphpuytyV47Et3bCF15s9usZGM3l84ZnQ==","shasum":"3c1f584d246e9a997a181a5a78ce080dbd2dc68c","tarball":"https://registry.npmjs.org/@bangjelkoski/wallet-connect-ethereum-provider/-/wallet-connect-ethereum-provider-2.17.2.tgz","fileCount":22,"unpackedSize":5184841,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXEh/A/WmBJbFHF9AnftVQncKUWRJeIvqnKZiSvO5nQwIhALfxWlX0HCM+m85sul63ozTGI3agskMF3+fbtQnTlaXp"}]},"_npmUser":{"name":"bangjelkoski","email":"bangjelkoskii@gmail.com"},"directories":{},"maintainers":[{"name":"bangjelkoski","email":"bangjelkoskii@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/wallet-connect-ethereum-provider_2.17.2_1733519962165_0.7796017957772776"},"_hasShrinkwrap":false}},"time":{"created":"2024-12-06T21:19:22.043Z","2.17.2":"2024-12-06T21:19:22.516Z","modified":"2024-12-06T21:19:22.875Z"},"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 @walletconnect/modal\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  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"}