{"bugs":{"url":"https://github.com/walletconnect/walletconnect-monorepo/issues"},"dist":{"shasum":"2fcd75e6d827841fe9fe5f98e0de6216535ae339","tarball":"https://registry.npmjs.org/@walletconnect/web3-provider/-/web3-provider-1.3.6-rc.0.tgz","fileCount":8,"integrity":"sha512-/omb9nTiKzf7mYNwGGN/pnuuqCsvdZdxrCmQAqU1AAWR3cK6ZEUU1E6OyqqlWjb86lDsb83DUh7oK7F0rA0k+w==","signatures":[{"sig":"MEUCIBi0r2tM0p0xQDpUWYgQJ3UfPjjCA3IwObQ9592Ts2WGAiEA2w4XjwOGfpy/Udw2r49jOXKHQVTL1NDU08Xr0rMadNw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1629951,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIXTBCRA9TVsSAnZWagAA7mgP/iRYBMaLrT8M8QyeMlRN\nKN12l19xWk8pvlcHFw58ekf32QKu2+BHkjBzlgzQuyn6neQnGLspQMQmjioH\n2Z++HnCYBkvsBmovfPviYCoSqqiNuwSZlW813V3/Mvmcr8nB3SLMOKWNUblC\nF9m2kgYHeGTvlJAd8QDnyftCXu4/9OaAg1bsZ1KSnxBAwuoTiX9xZ3Ro4sSw\nX/AQjvY0PNkOA1O0gvtHsqOxrPG778h/USfKk5teccTVZ6qvPaMCq9wVU84u\nWhuKcznIe8KPsWBdpngvxAZEcz2LVThK6C4/0uRp7dZTMsK5TKNZWS/YSfnK\nYfoBkEAbIr3rg49uRo7OBaGonqK1hV6kbCk+C74amVNkZ53t2OjvuXEm9eTr\ny68KPjzM8v5ITbUa+Fa8+AzuaRdwVPxgfYX3XOkUCktCInn9NEcjFB7v932B\n0OAzTfNT+SOI5j/b2yd1cjTyAxvfZRWv7l9krdFIcVbulxx7feBXxk1hAVq8\ndphIP8msmqZqFp8esS0+YBOTvIRvakvYmuTCEpsvRvvD/+CrPH/37krhfkDx\n8IFFFd2LY0+Ph/Q5MeDDAsB5MATE/8bSLhy2WElUcRjG7BD4x4gm3vu9pelf\nJdj+nzAig4CR4EBWeKzNZxrxcmdIWrvfK4ZFdjZkzNqYc8lDLEobRF64Xclv\nlA4Q\r\n=CRxh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","name":"@walletconnect/web3-provider","types":"dist/cjs/index.d.ts","unpkg":"dist/umd/index.min.js","author":{"name":"WalletConnect","email":"walletconnect.org"},"readme":"# WalletConnect Web3 Provider\n\nWeb3 Provider for WalletConnect\n\nFor more details, read the [documentation](https://docs.walletconnect.org)\n\n## Setup\n\n```typescript\nimport Web3 from \"web3\";\nimport WalletConnectProvider from \"@walletconnect/web3-provider\";\n\n//  Create WalletConnect Provider\nconst provider = new WalletConnectProvider({\n  infuraId: \"27e484dcd9e3efcfd25a83a78777cdf1\", // Required\n});\n\n//  Enable session (triggers QR Code modal)\nawait provider.enable();\n\n//  Create Web3\nconst web3 = new Web3(provider);\n```\n\n## Events (EIP-1193)\n\n```typescript\n// Subscribe to accounts change\nprovider.on(\"accountsChanged\", (accounts: string[]) => {\n  console.log(accounts);\n});\n\n// Subscribe to chainId change\nprovider.on(\"chainChanged\", (chainId: number) => {\n  console.log(chainId);\n});\n\n// Subscribe to session connection\nprovider.on(\"connect\", () => {\n  console.log(\"connect\");\n});\n\n// Subscribe to session disconnection\nprovider.on(\"disconnect\", (code: number, reason: string) => {\n  console.log(code, reason);\n});\n```\n\n## Provider Methods\n\n```typescript\ninterface RequestArguments {\n  method: string;\n  params?: unknown[] | object;\n}\n\n// Send JSON RPC requests\nconst result = await provider.request(payload: RequestArguments);\n\n// Close provider session\nawait provider.disconnect()\n```\n\n## Web3 Methods\n\n```typescript\n//  Get Accounts\nconst accounts = await web3.eth.getAccounts();\n\n//  Get Chain Id\nconst chainId = await web3.eth.chainId();\n\n//  Get Network Id\nconst networkId = await web3.eth.net.getId();\n\n// Send Transaction\nconst txHash = await web3.eth.sendTransaction(tx);\n\n// Sign Transaction\nconst signedTx = await web3.eth.signTransaction(tx);\n\n// Sign Message\nconst signedMessage = await web3.eth.sign(msg);\n\n// Sign Typed Data\nconst signedTypedData = await web3.eth.signTypedData(msg);\n```\n\n## Provider Options\n\n### Required\n\nIn order to resolve non-signing requests you need to provide one of the following:\n\n#### Infura ID\n\nThe infuraId will support the following chainId's: Mainnet (1), Ropsten (3), Rinkeby(4), Goerli (5) and Kovan (42)\n\n```typescript\nconst provider = new WalletConnectProvider({\n  infuraId: \"27e484dcd9e3efcfd25a83a78777cdf1\",\n});\n```\n\n#### RPC URL Mapping\n\nThe RPC URL mapping should indexed by chainId and it requires at least one value.\n\n```typescript\nconst provider = new WalletConnectProvider({\n  rpc: {\n    1: \"https://mainnet.mycustomnode.com\",\n    3: \"https://ropsten.mycustomnode.com\",\n    100: \"https://dai.poa.network\",\n    // ...\n  },\n});\n```\n\n### Optional\n\nYou can also customize the connector through the provider using the following options\n\n#### Bridge URL\n\nUse your own hosted bridge by providing the url\n\n```typescript\nconst provider = new WalletConnectProvider({\n  infuraId: \"27e484dcd9e3efcfd25a83a78777cdf1\",\n  bridge: \"https://bridge.myhostedserver.com\",\n});\n```\n\n#### Disable QR Code Modal\n\nUse your own custom qrcode modal and disable the built-in one\n\n```typescript\nconst provider = new WalletConnectProvider({\n  infuraId: \"27e484dcd9e3efcfd25a83a78777cdf1\",\n  qrcode: false,\n});\n\nprovider.connector.on(\"display_uri\", (err, payload) => {\n  const uri = payload.params[0];\n  CustomQRCodeModal.display(uri);\n});\n```\n\n#### Filter Mobile Linking Options\n\nIf you would like to reduce the number of mobile linking options or customize its order, you can provide an array of wallet names\n\n```typescript\nconst provider = new WalletConnectProvider({\n  infuraId: \"27e484dcd9e3efcfd25a83a78777cdf1\",\n  qrcodeModalOptions: {\n    mobileLinks: [\n      \"rainbow\",\n      \"metamask\",\n      \"argent\",\n      \"trust\",\n      \"imtoken\",\n      \"pillar\n    ]\n  }\n});\n```\n","gitHead":"165f7993c2acc907c653c02847fb02721052c6e7","license":"LGPL-3.0","scripts":{"test":"tsdx test ./test","build":"run-s build:pre build:cjs build:umd","clean":"rm -rf dist","build:cjs":"npx tsc -p tsconfig.cjs.json","build:pre":"run-s clean","build:umd":"webpack"},"_npmUser":{"name":"pedrouid","email":"pedrogomes94@gmail.com"},"homepage":"https://github.com/WalletConnect/walletconnect-monorepo/","keywords":["wallet","walletconnect","ethereum","jsonrpc","mobile","qrcode","web3","crypto","cryptocurrency","dapp"],"deprecated":"WalletConnect's v1 SDKs are now deprecated. Please upgrade to a v2 SDK. For details see: https://docs.walletconnect.com/","repository":{"url":"git+https://github.com/walletconnect/walletconnect-monorepo.git","type":"git"},"_npmVersion":"6.14.10","description":"Web3 Provider for WalletConnect","directories":{},"maintainers":[{"name":"pedrouid","email":"pedrogomes94@gmail.com"}],"_nodeVersion":"14.15.4","dependencies":{"@walletconnect/types":"^1.3.6-rc.0","@walletconnect/utils":"^1.3.6-rc.0","web3-provider-engine":"16.0.1","@walletconnect/client":"^1.3.6-rc.0","@walletconnect/qrcode-modal":"^1.3.6-rc.0","@walletconnect/http-connection":"^1.3.6-rc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"tsdx":"0.12.3","web3":"1.2.8","webpack":"4.41.5","@babel/cli":"7.8.3","typescript":"3.7.5","@babel/core":"7.8.3","@babel/node":"7.8.3","@types/jest":"22.2.3","@types/node":"12.12.14","npm-run-all":"4.1.5","webpack-cli":"3.3.10","@babel/polyfill":"7.8.3","@babel/register":"7.8.3","@babel/preset-env":"7.8.3","@babel/preset-typescript":"7.8.3"},"_npmOperationalInternal":{"tmp":"tmp/web3-provider_1.3.6-rc.0_1612805313533_0.3722390827249775","host":"s3://npm-registry-packages"},"_id":"@walletconnect/web3-provider@1.3.6-rc.0","version":"1.3.6-rc.0"}