{"bugs":{"url":"https://github.com/walletconnect/walletconnect-monorepo/issues"},"dist":{"shasum":"1b76ef601cd69fa86b63c86c0732f0ebcd9a87b3","tarball":"https://registry.npmjs.org/@walletconnect/web3-provider/-/web3-provider-1.3.4-rc.1.tgz","fileCount":8,"integrity":"sha512-op5WVQBAlEqLDUOAF/JCWsOKhfpzgZc7axBSiwfAZ7jwxZzF/iftk+jbZV3MnUZCzWSPEJECPcveRcXpC7aNBg==","signatures":[{"sig":"MEYCIQDQRdVsDkVucbmLb4xx9Nq8fsddsMZlmNn6f1UXJGJq5wIhAJER83U8R6tTmvBf7+OK7I6PLFgsu1WG9Dj3bLLqgMwE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1573599,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/t/wCRA9TVsSAnZWagAAftAP/A81xOjNCms5pKi4YQwD\nDMdfuqzIxIGGq+Am3hFDYOSbiUB7wJr6qaXXfcuZMhAZ/UdXKBJaKok1lD/q\nPljodcr55RQcbWfjIOZqFm8NxJUUXSfUFy/JgcceIosT9Vhnmmwz2lUPzkHa\n4isEj8CpAQ34FakFi7sZGPA88Kl2qKQvtVG4Xj9MK4FQeEQRBpW+yJHet2/C\nKjnwoHXwiyX3IKbFdFyJZn+lgAJlq4EOLrwx3eC4Ypbamdu2rYX/jIammv/u\nMTLe6GZO/u1bmmLX3sBnPTXVhhZjV4yjiuxs7q9uHx8y9Mx5WXfyRn/MjAr1\nYea2Ihl/QCzCQyRUoSLui9+cq7exrxX10T8DPj51of7wpWXp6c2awav86Xw+\nv2MJ87qv21v2Ksi1mTqsK1MhbOzyk7rPmfwK9F424VFdlJfQGPCSxIWLHaZO\n7Sladucg4wbh1Q2uEt4tT8gZnYmrEMt/TQcwJSbRKbwuqYkCDSn3OG4tBSKH\nv/3KoVOhSHSIa+P5c69bGcRdj3zRJmz9mL+eU7W8bUM2/uIyJ/3A5a+R3AdL\nPHBMhGYKiQ7MRWWQcurHT9qLSNBBqTHth43A1j5WUQWDrxVnRUEQU8nCw19k\nvL920gAba2uzrEjxsDKaz2Tf7MzEijc9mUu9PMiJXaiSBcTLM2K3D8V7NtpC\ncoTq\r\n=Ytwp\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.4-rc.1","@walletconnect/utils":"^1.3.4-rc.1","web3-provider-engine":"16.0.1","@walletconnect/client":"^1.3.4-rc.1","@walletconnect/qrcode-modal":"^1.3.4-rc.1","@walletconnect/http-connection":"^1.3.4-rc.1"},"_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.4-rc.1_1610538992111_0.4699392995989029","host":"s3://npm-registry-packages"},"_id":"@walletconnect/web3-provider@1.3.4-rc.1","version":"1.3.4-rc.1"}