{"_id":"@cennznet/extension-inject","_rev":"3-a451510d4012f979cf50c8d48f89f135","name":"@cennznet/extension-inject","dist-tags":{"latest":"0.38.3"},"versions":{"0.38.2":{"name":"@cennznet/extension-inject","description":"A generic injector (usable to any extension), that populates the base exposed interfaces to be used by dapps.","version":"0.38.2","type":"module","author":{"name":"Jaco Greeff","email":"jacogr@gmail.com"},"license":"Apache-2","main":"index.js","sideEffects":false,"dependencies":{"@babel/runtime":"^7.13.10"},"devDependencies":{"@types/chrome":"^0.0.134","@types/firefox-webext-browser":"^82.0.0"},"peerDependencies":{"@polkadot/api":"*"},"_id":"@cennznet/extension-inject@0.38.2","_nodeVersion":"15.3.0","_npmVersion":"7.0.14","dist":{"integrity":"sha512-XhV7R2+PiHSQ9Dtz+lXbC9bww0rDKs3UV0lWRllcgG+f0nh9ukNs9IXJxf2gmbAS6Tby10/WVmuxbD7tStYJsw==","shasum":"f7a103f1f3c3747aa0169468d46bb076b941fdae","tarball":"https://registry.npmjs.org/@cennznet/extension-inject/-/extension-inject-0.38.2.tgz","fileCount":15,"unpackedSize":18079,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEJjl8Z8AhSrO6r4U0UlNUp9/ste6BeiXGQG/CyQj2VAIgK1ubH2P3DXz73xEQyZWUKgxcJ7Ffvewok/lxMKR/Y00="}]},"_npmUser":{"name":"admincentrality","email":"admin@centrality.ai"},"directories":{},"maintainers":[{"name":"admincentrality","email":"admin@centrality.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/extension-inject_0.38.2_1634848183047_0.07659220454054139"},"_hasShrinkwrap":false},"0.38.3":{"name":"@cennznet/extension-inject","description":"A generic injector (usable to any extension), that populates the base exposed interfaces to be used by dapps.","version":"0.38.3","type":"module","author":{"name":"Jaco Greeff","email":"jacogr@gmail.com"},"license":"Apache-2","main":"index.js","sideEffects":false,"dependencies":{"@babel/runtime":"^7.13.10"},"devDependencies":{"@types/chrome":"^0.0.134","@types/firefox-webext-browser":"^82.0.0"},"peerDependencies":{"@polkadot/api":"*"},"_id":"@cennznet/extension-inject@0.38.3","_nodeVersion":"15.3.0","_npmVersion":"7.0.14","dist":{"integrity":"sha512-JVXcNWLh8rwTcfp7ekYgUW22TZTG161brslVlFUldIEYAcL59yG7EPjFSpn7N7rmj+Bgn04DjPLnYAsXIUvfPA==","shasum":"67206737671264c6e4b5bfa3e4b83e2b933ec283","tarball":"https://registry.npmjs.org/@cennznet/extension-inject/-/extension-inject-0.38.3.tgz","fileCount":15,"unpackedSize":18079,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzcNQCRA9TVsSAnZWagAAHagP/RNFF5h8M/g0dCqWjlIB\nVffzSTjICgh4w9BV74kR7Lt+F/CxX6RaqLCsHpP9khS44N6b8gPI5HME+oW/\njYoSqtOpZNrgLiChL9dOlzc6Wi27IbYfPMwMK8uBW5nU1X5JVlgn7U7wx7z1\n7GnuPEW66wIkno9eWTrs0B0Frl+QMw/Rc5aIedC/KHtM96oEipj+qCTbiWy2\nPF6m89pxt8V+hCDPfFd02A+Eca5ahnIB94YKeKPQt9dDUiqr4DPCAfrRcfe2\negRTp6SVSrzUMsjZzAZ2rRj3zmdVKHFC3SshR4DWMY8ziQ+qaRUnqOZFIzXP\nzjQXXqG/lSbJsaXXh0mnKoIMdBCCb2KUviR4ZfCiuG/tHk4W+uzxKWGpYagj\n1dNaHvKS0d/wmLh3L54xD8pWK+67K68hvyX35N2kzLG7nKQkYqzsHxzJvLVj\n3YfTn7+AaXazegJAFOlSKwM++ZtxwiGABGsYhK6YP4kTQgmq9MqpBuEFFmgk\ni6kYsvhVhAGqNAxdMZKDwU9M4DqfkqwWgGFvQyitH9J3xgQn1+wsV8L0SsxF\nQC+cdF3mUOTgykPcEsQv9cYrjYxFFbHSquudD6mtbrltaG8arAxmXkjbMXij\nwDR2LXos+hsK7ws2UcUnRAFyVoul7cwuEWxgctgaw1/XAOAn7nhvX0GF9oBK\n70nA\r\n=60mh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDaXo0VDRxw8nceX7C02cn8HeSCYmQbs7MtTpqXz5lzigIgcZbhFtfCeE65ZpoLbORLUgEEpHM3EPwt0i8ab5s9Gco="}]},"_npmUser":{"name":"admincentrality","email":"admin@centrality.ai"},"directories":{},"maintainers":[{"name":"admincentrality","email":"admin@centrality.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/extension-inject_0.38.3_1634891560072_0.06739790133682066"},"_hasShrinkwrap":false}},"time":{"created":"2021-10-21T20:29:42.995Z","0.38.2":"2021-10-21T20:29:43.191Z","modified":"2022-04-04T22:19:09.715Z","0.38.3":"2021-10-22T08:32:40.188Z"},"maintainers":[{"name":"admincentrality","email":"admin@centrality.ai"}],"description":"A generic injector (usable to any extension), that populates the base exposed interfaces to be used by dapps.","author":{"name":"Jaco Greeff","email":"jacogr@gmail.com"},"license":"Apache-2","readme":"# @cennznet/extension-inject\n\nThis is a basic extension injector that manages access to the global objects available. As an extension developer, you don't need to manage access to the window object manually, by just calling  enable here, the global object is setup and managed properly. From here any dapp can access it with the `@polkadot/extension-dapp` package;\n\n## Usage\n\n```js\nimport { injectExtension } from '@cennznet/extension-inject';\n\n// this a the function that will be exposed to be callable by the dapp. It resolves a promise\n// with the injected interface, (see `Injected`) when the dapp at `originName` (url) is allowed\n// to access functionality\nfunction enableFn (originName: string): Promise<Injected> {\n  ...\n}\n\n// injects the extension into the page\ninjectExtension(enableFn, { name: 'myExtension', version: '1.0.1' });\n```\n","readmeFilename":"README.md"}