{"dist":{"shasum":"cb689de45f6a9842e515255ffad80e2b89787bbe","tarball":"https://registry.npmjs.org/walletlink/-/walletlink-2.0.0-alpha.1.tgz","fileCount":83,"integrity":"sha512-g0KxZaKOVUuXWLhs9bsb4G1iHdG8m/F6wdfooxt6R1KHAdgBg3AeI5DG7qkXddWbH+q1B2PQFY0iH1QLhENFbQ==","signatures":[{"sig":"MEQCIFWY1yowK9TMGq3+cH8on3NWZdHrdUcrUcdufIq74EagAiAyn21zOjsF6Th2puTOMHlwum0JZvyUlvAPzFMpxT/xng==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":154205,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTGUWCRA9TVsSAnZWagAAPBsP/02XHjWgg3v3L0FJldAY\nweIA9hvjqB++g9nD70bTSs6TBGRyNodVtnwXWYfMbG9MV2igR2YNa/YYw0Bd\nc2Ci05myIUXODs3TvdmFlqNktiO2IsDc03ABl1HHSmwc4LskprFDRd7CrAcU\ni9YA5mGT2NxZftBH5NUOveauCmc+EXVxWXX+lvTTx4N1+t49s4iqsJMa+OYy\nepFlS9WPocFGtmqF/qWnFlD/FEFaVcz1OY/+VZjwxYUSJaiyiuQx62pgTr5G\nEy9mJHPhJfADTfaqUgK8mQDXYT/oeM1TvoSsbujxW98p7E9uCVvuk4S50irZ\n2UaOSg+r5yQxBgcvZxEywWM2btRMEvcCQWdSTyQA7wzHQb5k8EB4/1hhc9HE\nN/sohiF5mUWVGAQMFvLaH+nJlJDyVkiTj3IsI6OcfqY+y0IBald/+1T3rws3\nouM0jpDRCi+GWvdAbfiOQKj/XqRYpMv+L5KchTRysngw/k+2jkuT5kotDY3R\n96Oj5JsPETajkC90/xt0VmcQgtrtoF7qL85Fr88gkgTRzspZymDeVTx9vHgD\nWyGsJATVxwlexd0VeV2HSk8P7pmtbby6fq1ilkGBobrdJ0hD3plJonoslxoV\niDOZceuq4ZrtYyoC9at9QpRKMvjjdMqk4hnJThhErhxVwYCBGZzGNjx7btth\ngxYG\r\n=PWM8\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testRegex":"(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$","transform":{"^.+\\.tsx?$":"ts-jest"},"testEnvironment":"node","moduleFileExtensions":["ts","js","json"],"testPathIgnorePatterns":["<rootDir>/dist/","<rootDir>/node_modules/"]},"main":"dist/index.js","name":"walletlink","types":"dist/index.d.ts","author":{"name":"Coinbase, Inc."},"readme":"# WalletLink\n\nWalletLink is an open protocol that lets users connect their mobile wallets to\nyour DApp.\n\nWith WalletLink, users can use your DApp in any desktop browser without\ninstalling an extension, and end-to-end encryption using client-side generated\nkeys keeps all user activity private.\n\nFor DApp developers to integrate with WalletLink, all you need to do is drop a\nfew lines of code into your application, and WalletLink will take care of the\nrest. WalletLink is open-source and uses minimal dependencies for maximum\nsecurity and no code bloat.\n\n## Getting Started\n\n### Installation\n\n```shell\n# With Yarn\nyarn add walletlink\n\n# With NPM\nnpm install walletlink\n```\n\nThe following instructions are in [TypeScript](https://www.typescriptlang.org/),\nbut the usage is the same in JavaScript, except for the occasional type\nannotations, for example `: string[]` or `as any`.\n\n### Initializing WalletLink and a WalletLink-powered Web3 object\n\n```typescript\n// TypeScript\nimport WalletLink from 'walletlink'\nimport Web3 from 'web3'\n\nconst APP_NAME = 'My Awesome App'\nconst APP_LOGO_URL = 'https://example.com/logo.png'\nconst ETH_JSONRPC_URL = 'https://mainnet.infura.io/v3/<YOUR_INFURA_API_KEY>'\nconst CHAIN_ID = 1\n\n// Initialize WalletLink\nexport const walletLink = new WalletLink({\n  appName: APP_NAME,\n  appLogoUrl: APP_LOGO_URL\n})\n\n// Initialize a Web3 Provider object\nexport const ethereum = walletLink.makeWeb3Provider(ETH_JSONRPC_URL, CHAIN_ID)\n\n// Initialize a Web3 object\nexport const web3 = new Web3(ethereum as any)\n\n// Optionally, have the default account be set automatically when available\nethereum.on('accountsChanged', (accounts: string[]) => {\n  web3.eth.defaultAccount = accounts[0]\n})\nweb3.eth.defaultAccount = web3.eth.accounts[0]\n```\n\n### Use EIP-1102 to obtain authorization and get Ethereum accounts\n\nInvoking EIP-1102 will show a QR code dialog if the user's mobile wallet is not\nalready connected to their browser. The following code should run in response to\na user-initiated action such as clicking a button to ensure the pop up is not\nblocked by the browser.\n\n```typescript\n// Use eth_RequestAccounts\nethereum.send('eth_requestAccounts').then((accounts: string[]) => {\n  console.log(`User's address is ${accounts[0]}`)\n})\n\n// Alternatively, you can use ethereum.enable()\nethereum.enable().then((accounts: string[]) => {\n  console.log(`User's address is ${accounts[0]}`)\n})\n```\n\nThat's it! Once the authorization is obtained from the user, the Web3 object\n(`web3`) and the Web3 Provider (`ethereum`) are ready to be used as per usual.\n\n---\n\n```\nCopyright © 2018-2020 WalletLink.org <https://www.walletlink.org/>\nCopyright © 2018-2020 Coinbase, Inc. <https://www.coinbase.com/>\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","engines":{"node":">= 10.0.0"},"license":"Apache-2.0","scripts":{"tsc":"tsc --noEmit --pretty","lint":"tslint -p . 'src/**/*.ts{,x}'","test":"jest","build":"node compile-assets.js && webpack --config webpack.config.js","build-npm":"tsc -p ./tsconfig.build.json","build:dev":"export WALLETLINK_URL='http://localhost:3000'; yarn build && yarn build-chrome","build:prod":"yarn build && yarn build-chrome && yarn build-npm && cp ./package.json ../README.md ../LICENSE build/npm && sed -i '' 's|  \"private\": true,||g' build/npm/package.json","lint:watch":"nodemon -e ts,tsx,js,json,css,scss,svg --watch src/ --exec 'yarn tsc && yarn lint'","test:watch":"jest --watch","build-chrome":"webpack --config webpack.config.chrome.js","build:dev:watch":"nodemon -e 'ts,tsx,js,json,css,scss,svg' --ignore 'src/**/*-css.ts' --ignore 'src/**/*-svg.ts' --watch src/ --watch chrome/ --exec 'yarn build:dev'"},"_npmUser":{"name":"petejkim","email":"raingrove@gmail.com"},"keywords":["cipher","cipherbrowser","coinbase","coinbasewallet","eth","ether","ethereum","etherium","injection","toshi","wallet","walletlink","web3"],"deprecated":"WARNING: This project has been renamed to @coinbase/wallet-sdk. Install using @coinbase/wallet-sdk instead.","repository":{"url":"https://github.com/walletlink/walletlink.git","type":"git"},"description":"WalletLink JavaScript SDK","directories":{},"licenseText":"Copyright (c) 2018-2020 WalletLink.org <https://www.walletlink.org/>\nCopyright (c) 2018-2020 Coinbase, Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","maintainers":[{"name":"petejkim","email":"raingrove@gmail.com"}],"dependencies":{"clsx":"^1.0.4","rxjs":"^6.5.4","bn.js":"^5.1.1","keccak":"^3.0.0","preact":"^10.2.1","qrcode-svg":"^1.1.0","bind-decorator":"^1.0.11","eth-eip712-util":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"glob":"^7.1.6","jest":"^25.1.0","sass":"^1.25.0","svgo":"^1.3.2","tslib":"^1.10.0","tslint":"^6.0.0","core-js":"^3.6.4","nodemon":"^2.0.2","ts-jest":"^24.3.0","webpack":"^4.41.5","ts-loader":"^6.2.1","raw-loader":"^4.0.0","typescript":"^3.7.5","@types/jest":"^24.9.0","@types/node":"^13.1.8","rxjs-tslint":"^0.1.7","webpack-cli":"^3.3.10","@types/bn.js":"^4.11.6","whatwg-fetch":"^3.0.0","@types/qrcode-svg":"^1.1.0","classlist-polyfill":"^1.2.0","copy-webpack-plugin":"^5.1.1","regenerator-runtime":"^0.13.3","tslint-config-prettier":"^1.18.0","tslint-config-security":"^1.16.0","tslint-microsoft-contrib":"^6.2.0"},"_npmOperationalInternal":{"tmp":"tmp/walletlink_2.0.0-alpha.1_1582064917898_0.5658885566775169","host":"s3://npm-registry-packages"},"_id":"walletlink@2.0.0-alpha.1","version":"2.0.0-alpha.1"}