{"_id":"@tru_id/tru-sdk-web","_rev":"29-8f3b8b477549904cc72a8e33cbc5e372","name":"@tru_id/tru-sdk-web","dist-tags":{"canary":"0.0.4","latest":"0.0.11"},"versions":{"0.0.1-canary.0":{"name":"@tru_id/tru-sdk-web","version":"0.0.1-canary.0","keywords":["2FA","MFA","Number Verify"],"author":{"url":"https://tru.id","name":"tru.ID","email":"community@tru.id"},"license":"MIT","_id":"@tru_id/tru-sdk-web@0.0.1-canary.0","maintainers":[{"name":"ciao_mario","email":"eric@4auth.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"lpedrosa","email":"lpedrosa88@gmail.com"}],"dist":{"shasum":"9d849981d10850afd6412b64ea734898c1e79912","tarball":"https://registry.npmjs.org/@tru_id/tru-sdk-web/-/tru-sdk-web-0.0.1-canary.0.tgz","fileCount":6,"integrity":"sha512-VYqQxuGjYJlnarMjzJCesfCyRfbn3INKM/MPrj0BXSKMmd8+26wBT6ayP15UgKEkcWYBhJmtNQXZ+GtH2WtPzQ==","signatures":[{"sig":"MEUCIECwshKgoMDZAYv5kDS6om8cBAcSOaWL6xFUxuYQrR7ZAiEAiJcIHEXPEkIvW7Sh+QqhB6+p0V5CcGT30h5uQhE5UXQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10599,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGFC/CRA9TVsSAnZWagAASacQAIsXrKzi2E0op501H1Am\ngCBBvB95h+5xRhowlMB4w2+LlUh/aWrwhTdcIC7cOErXA9V09+YsHofEgi/p\njNosn3ZCEBWwOHdOVGn6UYy1vluvXFU/TJOFiaZNa13E94xSILNnsw369gOV\noRhsK6f6hKKkQPlINU94e6LROzUHCDgubLTqjtUt8eGOzijbL3BNnnu1SORU\nkvka90SFq+PJnbYvjirOI2q3ACU+L68v11H0PV0qulQ117iHhvP4vrYhxBWH\n7PG634jsMjIWgwryHRyOOYFKieNdQlSyBLxGC7manKm8d5Fe8dCS0GWT9CEq\n6qSg1wS2S+c+WKARnJEamFmjOEWjG8RULg/Oui7PmKCosqtpRiVxJRX/R9lW\n7XwzctEPeB6mUKdgN1lklJsaH4DfXDuVIQ/Qoeyk0yQLl+u3p5lJuwDADE/y\nC/1EkrgDzya0m2EnxK5V1J4zX8heBkqyEZ7MkG0uAewyC+x6uBPta7BCLxWg\nbdDz4vWbQzRnaCOhiGFfBnrjL1fZL8T7S9mF0d8pF9NBA7Szaso9ZzpryjyP\n0OsAjMOPypCB4VX1SIA1CH1YoPmw+peDW4sRum+LLbiKkTPdxGLKI7HXY6j2\ni8I6Ypd5RFZsa3NoRpFOkBZJJcpN7YczSVjijRscn4ErErerYX6MH2Q/hT6J\nAYVL\r\n=tPf9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/tru-id-sdk.cjs.js","type":"module","module":"dist/tru-id-sdk.esm.js","browser":"dist/tru-id-sdk.umd.js","gitHead":"d57098007a49f554be6402d64f5b2a16c0aabef3","scripts":{"dev":"rollup -c -w","test":"node --experimental-vm-modules node_modules/.bin/jest","build":"rollup -c","pretest":"npm run build","publish-canary":"npm publish --access public --tag canary"},"_npmUser":{"name":"leggetter","email":"phil@leggetter.co.uk"},"_npmVersion":"7.0.10","description":"SDK for tru.ID that provides a helper method for requesting the `check_url` for PhoneCheck and SubscriberCheck","directories":{},"_nodeVersion":"15.2.0","dependencies":{"ms":"^2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","rollup":"^1.29.0","@rollup/plugin-commonjs":"^11.0.1","@rollup/plugin-node-resolve":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/tru-sdk-web_0.0.1-canary.0_1612206270842_0.5862560906649064","host":"s3://npm-registry-packages"}},"0.0.1-canary.1":{"name":"@tru_id/tru-sdk-web","version":"0.0.1-canary.1","keywords":["2FA","MFA","Number Verify"],"author":{"url":"https://tru.id","name":"tru.ID","email":"community@tru.id"},"license":"MIT","_id":"@tru_id/tru-sdk-web@0.0.1-canary.1","maintainers":[{"name":"ciao_mario","email":"eric@4auth.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"lpedrosa","email":"lpedrosa88@gmail.com"}],"dist":{"shasum":"538efb17dee31844c55df4015c0fb8adc9324a58","tarball":"https://registry.npmjs.org/@tru_id/tru-sdk-web/-/tru-sdk-web-0.0.1-canary.1.tgz","fileCount":9,"integrity":"sha512-g/tFpSV25soK5NHphWII8DeaoFIzSFl23J99N2lABegy7rkA8iDYXa35bjri0JYeXF1co+WwlGJDF8rfqyfmKQ==","signatures":[{"sig":"MEUCIHMQRqPsSDnVnp+98JFsNEc8WECzQS++bPj3iybNWTDLAiEA4BX/uZ63vidw6uBg4/BdLUB7HQCU+wxOXUAr+hb/bZc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14798,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGUDKCRA9TVsSAnZWagAAHo8P/3GcNgHtAUcuyN++RafX\n3ae/SZawvJFn71CYbM+eFT7H8EcW1K8xRmk6zEHH/U/7QcT0nDyUGGrG7P13\nx5sR7V3GYhsS3QvG0hP7ulf1VehWIITarztTc/Eoy786VZC8ykj2PZVVNTyh\nEMMxvMzondtfHHKDFrW1BxSdFKs7c8SPUpFc4v44t34yUKS807wd2/IZERXq\ndgNnmS2pgBwYjSPHdwwCZH3zFaORGY8NwyrSSH9vt1Y7GAN/i6IBx7EAbISZ\napEMn11OBm10jsjJNvly4HSHCTf98nnk/g8IPcMDI5x+eqb8uI0vVycg5snw\ncooSf2muz2tiyfhZABtvkmtYLML9+mAM+t43Y3xiSL4uh7ghWVH0m/ZE89JP\noDs+O1NwHBok0/qZSd3rE+WSn8eX9BRUwEFRY92YJ3kzL7wFejqKJC05ZMy+\nVtkJqvWGizJy+sulfNAVPdkUyfwgRhLlV+zxxzK5auW+aSH6KOFq1uAj8Z5V\nL7gNKQ/6agwDbohW7jvCdXhcvRyRYfhNV16xdI/jrSpVqMdXGRm/EH/fAGYL\n2SB1/9eeyBpcuvtmiCpzuHgfswnhMqRxq/pEuHYPNH/rrxtJWR4QqQb1JOdV\n4c9K8WhC6pKXxcR9TfpIT1WjaV/zUWgM7I2Zz5B7StS8AJH8L8lwM3v/b2g8\neScm\r\n=Sq/D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/tru-id-sdk.cjs.js","type":"module","module":"dist/tru-id-sdk.esm.js","browser":"dist/tru-id-sdk.umd.js","scripts":{"dev":"rollup -c -w","test":"node --experimental-vm-modules node_modules/.bin/jest","build":"rollup -c","pretest":"npm run build","release":"npm publish","changelog":"standard-version","publish-canary":"npm publish --access public --tag canary"},"_npmUser":{"name":"leggetter","email":"phil@leggetter.co.uk"},"description":"SDK for tru.ID that provides a helper method for requesting the `check_url` for PhoneCheck and SubscriberCheck","directories":{},"licenseText":"Copyright (c) 2017 [these people](https://github.com/rollup/rollup-starter-lib/graphs/contributors)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","dependencies":{"ms":"^2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","rollup":"^1.29.0","standard-version":"^9.1.0","@rollup/plugin-commonjs":"^11.0.1","@rollup/plugin-node-resolve":"^7.0.0"},"standard-version":{"skip":{"tag":true,"bump":true,"commit":true}},"_npmOperationalInternal":{"tmp":"tmp/tru-sdk-web_0.0.1-canary.1_1612267721597_0.6508216589634659","host":"s3://npm-registry-packages"}},"0.0.1-canary.2":{"name":"@tru_id/tru-sdk-web","version":"0.0.1-canary.2","keywords":["2FA","MFA","Number Verify"],"author":{"url":"https://tru.id","name":"tru.ID","email":"community@tru.id"},"license":"MIT","_id":"@tru_id/tru-sdk-web@0.0.1-canary.2","maintainers":[{"name":"ciao_mario","email":"eric@4auth.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"lpedrosa","email":"lpedrosa88@gmail.com"}],"dist":{"shasum":"b868a44421a70d69afe627183872525ca5956780","tarball":"https://registry.npmjs.org/@tru_id/tru-sdk-web/-/tru-sdk-web-0.0.1-canary.2.tgz","fileCount":7,"integrity":"sha512-/A0LoHOlPHijxiJUcqH6nZwVyS4Bqe274ryFxZ4TjzGvCd8uwVugpeAHC9iTrO+woWGz0fjIBc+GnhlhyJKHLg==","signatures":[{"sig":"MEYCIQCoyvQHhlqBFuJb32VgpZCqAtkVy39SaRfzN2srHdQODQIhAOpRTxRnOTqKmKwbZ+8l1Ct1iQ8ZHQObPPvPO3uVh1s/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15039,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLF+6CRA9TVsSAnZWagAAMFUQAIsstFwrkaO3jTzBTUig\n33hOdbPb91U4qdYO7fSC+EjL7iifVwCM8gjetSR4cHip9TXC1ojnLH++WwYL\newykZnFluDoxvzqi0qz4jWf/wDepLJQgrLH1vhcjNCQ0Z6FeydnjT0w38TaE\n4a+6TTJ1F6nl+1DBxY/VWacUroVVf1RSeCvmrLS0ZjdjuiksKkWevpXGvyV7\nw4oNJ/moD+x0DqANSeSNKLmaF34G480mWjupluAB4KS1KrHQxyZ0TputXLD5\n27w/gaKqUwQQvSsg7guDLSclNybgxgknU29YPDJ5ldRSPsw3E6wLdOionPjB\n9KlDwrGWckm7U9SzwYpPiylY5TQ/ksiDBWWCQXuQzcku5YRW9hmjn+lHUFHD\nmc+nrbZ1ZMDzfIjZkyQ235pOq5QzjlPyqaVk55BDwfJxAbHaUi+90XdczPKy\n9yPcbF0u752qxUldSc9APvByp/hdOuEJADfTsBpfOGWF2LuB4OzqGS78xD5u\n++tlC/LdwNa4xRmSpXs5vtbF6EJJcunywRF+mU/g/HZRqvitwnSLeSsYH93n\nJvrvTlD19iUUCSUbz6O82242czlYiAsT19vxHtw1TPC3FWZXFh2+YqvY0Vcb\ntl0odRp604fiw89tIqBLCvPU8v0tylQQS7pENmIJDW0VHMIXsrANvYJWBBkd\nCzet\r\n=U4mU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/tru-id-sdk.cjs","type":"module","module":"dist/tru-id-sdk.mjs","browser":"dist/tru-id-sdk.umd.js","gitHead":"ff0bc8feba1cb69e99df7d4805e24c9c46cd89b6","scripts":{"dev":"rollup -c -w","test":"node --experimental-vm-modules node_modules/.bin/jest","build":"rollup -c","pretest":"npm run build","changelog":"standard-version","publish-canary":"npm publish --access public --tag canary"},"_npmUser":{"name":"leggetter","email":"phil@leggetter.co.uk"},"_npmVersion":"7.0.10","description":"SDK for tru.ID that provides a helper method for requesting the `check_url` for PhoneCheck and SubscriberCheck","directories":{},"_nodeVersion":"15.2.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","rollup":"^1.29.0","standard-version":"^9.1.0"},"standard-version":{"skip":{"tag":true,"bump":true,"commit":true}},"_npmOperationalInternal":{"tmp":"tmp/tru-sdk-web_0.0.1-canary.2_1613520826144_0.9831328560367796","host":"s3://npm-registry-packages"}},"0.0.2-canary.0":{"name":"@tru_id/tru-sdk-web","version":"0.0.2-canary.0","keywords":["2FA","MFA","Number Verify"],"author":{"url":"https://tru.id","name":"tru.ID","email":"community@tru.id"},"license":"MIT","_id":"@tru_id/tru-sdk-web@0.0.2-canary.0","maintainers":[{"name":"mtt","email":"mattia.asti@gmail.com"},{"name":"ciao_mario","email":"eric@4auth.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"lpedrosa","email":"lpedrosa88@gmail.com"}],"homepage":"https://github.com/tru-ID/tru-sdk-web#readme","bugs":{"url":"https://github.com/tru-ID/tru-sdk-web/issues"},"dist":{"shasum":"8953145d9563722afff89a5843ce85ae0c3b877d","tarball":"https://registry.npmjs.org/@tru_id/tru-sdk-web/-/tru-sdk-web-0.0.2-canary.0.tgz","fileCount":6,"integrity":"sha512-gt7fkIGflvdFSZGy71pCLEDSwie1WHvyBrWGSWuRhWAbGwSd8ramHFg3hR3uIvq5fZvcG/1DE1orYtXnhTw+Nw==","signatures":[{"sig":"MEUCIDiD9VIALEWbgz/rmEAUFc3inYWTXdr6CVYiYTUDJPEYAiEAn3/gwncUvHIG2GeKJbgjhAwUbBseDrSLMbBS8y0ufsk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20818,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtjoRCRA9TVsSAnZWagAAxhwP/1jPQ5+9yotfO9rBrRMv\ne8d30belP0hHXOjbNUw8to6zWuqdCjVYZukLn8MSMFLNWRMjTg1UdYxQLr4I\n6wUwURjpd1uw7A0LAcRECaODEATOjKtM1XWsj2QrfULPSm7i2NJjunxPH+Ck\nsRPJHSqYz78yOEjR+mT49Y5yfUp+cuu5FfDhZ0xJIAF4oLJf5IO2qVJpdHJw\nBi0TQgKiphOaBOb3ttS00BwiCQw9MEliYcJ6IZB/97xfsZFAzBHkJgo8O4hI\n8AMiNeDlVb9pDnFR1lD9ftqfDuIPLyAwXf9KXVzV/e192QsD1UDOKoLJ8w3Z\ngEvcmKzMumwNsgBKq/gcWUNmW+aCoPl8mIGPd8nJu6Zs+8EYaAfKI7HLbPLN\nj2F2q25jMQt9i22RcbYSs4239JO7A8aRLyTKZwrJEfPtgr54VG1AKvbQzcwN\np31RpWwQe7V64ORJZ+oRiIRz1Yz+loUXp1pL19RVg0b9981NorvA73qCDZo+\n4b0YFrqgWHYNRXnmBzuf0uTtAFovbWjFNqWlVbqMqpRl8w/RuhEAZMW3hLfP\np6bjj5XstomyEjFgGdknfkC1wjbOkzJntvq01bcWZmfdiHgIkwBFcji/0yHI\n4udIS0f02jMXrVc9l5/OnH0hh5MSQcignnwJdMEWhRjNwJu5pqTXFo+FoPXB\nH9Go\r\n=LeC2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/tru-id-sdk.js","type":"module","module":"dist/tru-id-sdk.mjs","readme":"# tru.ID SDK for Web Applications\r\n\r\nSDK for tru.ID that provides a helper function for requesting the `check_url` for [PhoneCheck](https://tru.id/docs/phone-check) and [SubscriberCheck](https://tru.id/docs/subscriber-check).\r\n\r\nWith the default `config` the SDK will call our public device coverage API and try to determine if the device is using a mobile IP.\r\n\r\nIn case the device IP belongs to a MNO we don't support it will throw an error with the message `tru.ID:sdk-web MNO not supported`\r\n\r\nIn case the device IP is not from a mobile network it will throw an error with the message `tru.ID:sdk-web Not a mobile IP`, in this case the user might be using the wifi with a broadband connection.\r\n\r\nIf you want to ignore this check you can pass `{ checkDeviceCoverage: false }` in the `config` and proceed regardless.\r\n\r\n## Installation\r\n\r\n### Via jsDelivr CDN\r\n\r\n```html\r\n<script src=\"https://cdn.jsdelivr.net/npm/@tru_id/tru-sdk-web@canary/dist/tru-id-sdk.umd.js\"></script>\r\n```\r\n\r\n### Via NPM\r\n\r\n```sh\r\n$ npm install @tru_id/tru-sdk-web@canary\r\n```\r\n\r\n## Usage\r\n\r\n### Via jsDelivr CDN\r\n\r\nWhen installed via a CDN a `tru.ID` global is installed.\r\n\r\n```html\r\n<script src=\"https://cdn.jsdelivr.net/npm/@tru_id/tru-sdk-web@canary/dist/tru-id-sdk.umd.js\"></script>\r\n<script>\r\n  tru.ID.openCheckUrl(url, config)\r\n</script>\r\n```\r\n\r\n### Via NPM\r\n\r\nWhen installed via NPM the imported object exposes the `openCheckUrl` function.\r\n\r\n```js\r\nimport truID from '@tru_id/tru-sdk-web'\r\n\r\nawait truID.openCheckUrl(checkUrl, config)\r\n```\r\n\r\n### Config\r\n\r\nThe `openCheckUrl` function takes an optional `config` Object argument:\r\n\r\n```js\r\ntruID.openCheckUrl(url, config)\r\n```\r\n\r\nThe configuration options are:\r\n\r\n```js\r\n{\r\n  // whether debug information will be logged to the console.\r\n  // Defaults to `false`\r\n  debug: boolean,\r\n\r\n  // \"image\" - a zero pixel image is dynamically added to the DOM for the check_url request\r\n  // \"window\" - `window.open` is called to open the check_url in a new window\r\n  // Defaults to \"image\".\r\n  checkMethod: \"image\" | \"window\",\r\n\r\n  // If `checkMethod` was set to `window` identifies the number of\r\n  // milliseconds after which the opened window will be closed.\r\n  // Defaults to 3000.\r\n  windowCloseTimeout: Number,\r\n\r\n  // It will run the device coverage check to determine\r\n  // if the device is on a mobile IP\r\n  // Defaults to true\r\n  checkDeviceCoverage: boolean\r\n}\r\n```\r\n\r\n## Examples\r\n\r\n### Via jsDelivr CDN\r\n\r\n`https://cdn.jsdelivr.net/npm/@tru_id/tru-sdk-web@canary/dist/tru-id-sdk.umd.js`\r\n\r\n```html\r\n<body>\r\n  <form id=\"phone_check_form\">\r\n    <!-- Element to get the user's phone number -->\r\n    <input type=\"tel\" id=\"phone_number\" required />\r\n    <input type=\"submit\" value=\"Check\" />\r\n  </form>\r\n\r\n  <script src=\"https://cdn.jsdelivr.net/npm/@tru_id/tru-sdk-web@canary/dist/tru-id-sdk.umd.js\"></script>\r\n  <script>\r\n    async phoneCheck(ev) {\r\n        ev.preventDefault()\r\n\r\n        // POST to your own server\r\n        // to create the PhoneCheck resource for the phone number\r\n        const phoneCheckResource = await fetch('/your-server/phone-check', {\r\n            method: 'POST'\r\n            headers: {\r\n                'Content-Type': 'application/json'\r\n            },\r\n            body: JSON.stringify({\r\n                phone_number: document.getElementById('phone_number')\r\n            })\r\n        })\r\n\r\n        // use the tru.ID web SDK to navigate to the check_url\r\n        try {\r\n          await tru.ID.openCheckUrl(phoneCheckResource.check_url)\r\n        } catch (e) {\r\n          if (e.code === tru.ID.DeviceCoverageErrors.NotMobileIP) {\r\n            // tell the user they should turn off the wifi\r\n            // and use the mobile connection before proceeding\r\n          }\r\n        }\r\n    }\r\n\r\n    document.getElementById('phone_check_form')\r\n        .addEventListener('submit', phoneCheck)\r\n  </script>\r\n</body>\r\n```\r\n\r\n### Via NPM\r\n\r\n```sh\r\n$ npm install @tru_id/tru-sdk-web@canary\r\n```\r\n\r\n```js\r\nimport truID from '@tru_id/tru-sdk-web'\r\n\r\nasync function handlePhoneCheckCreation(result) {\r\n  const checkUrl = result.check_url\r\n  await truID.openCheckUrl(checkUrl)\r\n}\r\n```\r\n\r\n## Local development\r\n\r\nYou can run `yarn dev` that will open rollup with watch mode that will re-compile the SDK after every change.\r\n\r\nIn another terminal you can run `yarn serve` to open a test web page where you can test real phone checks if you have the node server running or you can simply check a PhoneCheck `check_url`.\r\n\r\n## Releasing\r\n\r\n1. Bump the version if required\r\n2. Run `yarn changelog` to auto-update the `CHANGELOG.md` and manually edit to finesse\r\n3. Commit the changes read for release: `git commit -m 'chore(release): v{version}`\r\n4. Tag the release `git tag v{version}`\r\n5. Push the tags `git push --follow-tags origin main`\r\n6. Publish to NPM `yarn run publish-canary`\r\n\r\n## License\r\n\r\n[MIT](LICENSE)\r\n","browser":"dist/tru-id-sdk.umd.js","gitHead":"87aff91e48e4bfb331b23b0845364dd670973027","scripts":{"dev":"rollup -c -w","lint":"eslint src","test":"jest","build":"rollup -c","serve":"serve","prettier":"prettier src --write","changelog":"standard-version","publish-canary":"npm publish --access public --tag canary"},"_npmUser":{"name":"lpedrosa","email":"lpedrosa88@gmail.com"},"repository":{"url":"git+https://github.com/tru-ID/tru-sdk-web.git","type":"git"},"_npmVersion":"7.13.0","description":"SDK for tru.ID that provides a helper method for requesting the `check_url` for PhoneCheck and SubscriberCheck","directories":{},"_nodeVersion":"16.2.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","nock":"^13.1.0","serve":"^11.3.2","canvas":"^2.8.0","eslint":"^7.27.0","rollup":"^2.50.5","prettier":"^2.3.0","@types/jest":"^26.0.23","jest-fetch-mock":"^3.0.3","standard-version":"^9.3.0","eslint-plugin-import":"^2.23.4","eslint-config-prettier":"^8.3.0","eslint-config-airbnb-base":"14.2.1"},"standard-version":{"skip":{"tag":true,"bump":true,"commit":true}},"_npmOperationalInternal":{"tmp":"tmp/tru-sdk-web_0.0.2-canary.0_1622555153411_0.44036230488554384","host":"s3://npm-registry-packages"}},"0.0.2-canary.1":{"name":"@tru_id/tru-sdk-web","version":"0.0.2-canary.1","keywords":["2FA","MFA","Number Verify"],"author":{"url":"https://tru.id","name":"tru.ID","email":"community@tru.id"},"license":"MIT","_id":"@tru_id/tru-sdk-web@0.0.2-canary.1","maintainers":[{"name":"mtt","email":"mattia.asti@gmail.com"},{"name":"ciao_mario","email":"eric@4auth.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"lpedrosa","email":"lpedrosa88@gmail.com"}],"homepage":"https://github.com/tru-ID/tru-sdk-web#readme","bugs":{"url":"https://github.com/tru-ID/tru-sdk-web/issues"},"dist":{"shasum":"fcd443132f69e022aca6675b23c21b549ea2d9d3","tarball":"https://registry.npmjs.org/@tru_id/tru-sdk-web/-/tru-sdk-web-0.0.2-canary.1.tgz","fileCount":6,"integrity":"sha512-4cRPF6Tb4pHVEbFBqStC1XkjXqJ6mOQYiqzg4KH4wHKauwVSmCnYlUaJQvWgBb5G38OUiijv3d+JsulA78UTMw==","signatures":[{"sig":"MEYCIQCyE13gRRcxGOTRj56YcBe1/wTjz6Ydm28MUf6ZfdLr2gIhAPVP3eiV6IbkmPZ5sgbDPjN0nO0uJZLxRArVVopV0zR0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20238,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtjs6CRA9TVsSAnZWagAARKUP/i3amja6TRUyRkicRJbL\nKBx1q9X/5h5SwYHJvAwEouosW7xRB4qtVGeMT9IlPOHpM6ei6fv+5DF/Wa0w\nl0CrBgmhhADmcAnFHBDqKYufIr4suf3jN0Foa8HCP5Vj4a/iggC6Ou22j9Su\nnMT8qbhwp/WUz2gRZQi791gYl/VRsIKIkjaK1AXWcJJrSEwIFHmCQtWBREy3\nnNStRCcASUuy+5kiP4/KsRAdFVMQNuYP0kOD4ym0xtz5Zpl8fkg639+XOQ1S\nE0KXYS2lwxzAyd0KAA3MZ8vg0jEojI0dVbjHgAZtHCAQn170uYuzaKzSAjy7\nz4w3AgUnhcyO7eex5jrZ5IrkMioS7dP7oTofIDjQy2im6+8URobes/8Vrk8y\n4m/RaYn9785pnV8ISoZCKGatZp8IujiTu1HbclFJmN0Fpf8hOGiT29IzSCA0\nDJMVxqqDewfmjEbiGthWckLfYs9UUh8f9LW7wcrLYy9k57JRCspsaXVWl9lu\nHPKg3Re6u88Bdjp6y2bflTuKsN6N7bX0pJq/+rLprQXONcgAAKPXLwnTa6yT\nTYOU8YzXWSYEtlBCWSCBldSyIbE9wyB65pVxoeriETj4ARw+7bCXwKbqlcsC\nlf0obFumQ88o3BWXR1sl1ur8Qj8vS0eflAuPghKlqQQ4Iz4bHXBOCzNPZdJv\ns7fR\r\n=IDLe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/tru-id-sdk.js","type":"module","module":"dist/tru-id-sdk.mjs","readme":"# tru.ID SDK for Web Applications\n\nSDK for tru.ID that provides a helper function for requesting the `check_url` for [PhoneCheck](https://tru.id/docs/phone-check) and [SubscriberCheck](https://tru.id/docs/subscriber-check).\n\nWith the default `config` the SDK will call our public device coverage API and try to determine if the device is using a mobile IP.\n\nIn case the device IP belongs to a MNO we don't support it will throw an error with the message `tru.ID:sdk-web MNO not supported`\n\nIn case the device IP is not from a mobile network it will throw an error with the message `tru.ID:sdk-web Not a mobile IP`, in this case the user might be using the wifi with a broadband connection.\n\nIf you want to ignore this check you can pass `{ checkDeviceCoverage: false }` in the `config` and proceed regardless.\n\n## Installation\n\n### Via jsDelivr CDN\n\n```html\n<script src=\"https://cdn.jsdelivr.net/npm/@tru_id/tru-sdk-web@canary/dist/tru-id-sdk.umd.js\"></script>\n```\n\n### Via NPM\n\n```sh\n$ npm install @tru_id/tru-sdk-web@canary\n```\n\n## Usage\n\n### Via jsDelivr CDN\n\nWhen installed via a CDN a `tru.ID` global is installed.\n\n```html\n<script src=\"https://cdn.jsdelivr.net/npm/@tru_id/tru-sdk-web@canary/dist/tru-id-sdk.umd.js\"></script>\n<script>\n  tru.ID.openCheckUrl(url, config)\n</script>\n```\n\n### Via NPM\n\nWhen installed via NPM the imported object exposes the `openCheckUrl` function.\n\n```js\nimport truID from '@tru_id/tru-sdk-web'\n\nawait truID.openCheckUrl(checkUrl, config)\n```\n\n### Config\n\nThe `openCheckUrl` function takes an optional `config` Object argument:\n\n```js\ntruID.openCheckUrl(url, config)\n```\n\nThe configuration options are:\n\n```js\n{\n  // whether debug information will be logged to the console.\n  // Defaults to `false`\n  debug: boolean,\n\n  // \"image\" - a zero pixel image is dynamically added to the DOM for the check_url request\n  // \"window\" - `window.open` is called to open the check_url in a new window\n  // Defaults to \"image\".\n  checkMethod: \"image\" | \"window\",\n\n  // If `checkMethod` was set to `window` identifies the number of\n  // milliseconds after which the opened window will be closed.\n  // Defaults to 3000.\n  windowCloseTimeout: Number,\n\n  // It will run the device coverage check to determine\n  // if the device is on a mobile IP\n  // Defaults to true\n  checkDeviceCoverage: boolean\n}\n```\n\n## Examples\n\n### Via jsDelivr CDN\n\n`https://cdn.jsdelivr.net/npm/@tru_id/tru-sdk-web@canary/dist/tru-id-sdk.umd.js`\n\n```html\n<body>\n  <form id=\"phone_check_form\">\n    <!-- Element to get the user's phone number -->\n    <input type=\"tel\" id=\"phone_number\" required />\n    <input type=\"submit\" value=\"Check\" />\n  </form>\n\n  <script src=\"https://cdn.jsdelivr.net/npm/@tru_id/tru-sdk-web@canary/dist/tru-id-sdk.umd.js\"></script>\n  <script>\n    async phoneCheck(ev) {\n        ev.preventDefault()\n\n        // POST to your own server\n        // to create the PhoneCheck resource for the phone number\n        const phoneCheckResource = await fetch('/your-server/phone-check', {\n            method: 'POST'\n            headers: {\n                'Content-Type': 'application/json'\n            },\n            body: JSON.stringify({\n                phone_number: document.getElementById('phone_number')\n            })\n        })\n\n        // use the tru.ID web SDK to navigate to the check_url\n        try {\n          await tru.ID.openCheckUrl(phoneCheckResource.check_url)\n        } catch (e) {\n          if (e.code === tru.ID.DeviceCoverageErrors.NotMobileIP) {\n            // tell the user they should turn off the wifi\n            // and use the mobile connection before proceeding\n          }\n        }\n    }\n\n    document.getElementById('phone_check_form')\n        .addEventListener('submit', phoneCheck)\n  </script>\n</body>\n```\n\n### Via NPM\n\n```sh\n$ npm install @tru_id/tru-sdk-web@canary\n```\n\n```js\nimport truID from '@tru_id/tru-sdk-web'\n\nasync function handlePhoneCheckCreation(result) {\n  const checkUrl = result.check_url\n  await truID.openCheckUrl(checkUrl)\n}\n```\n\n## Local development\n\nYou can run `yarn dev` that will open rollup with watch mode that will re-compile the SDK after every change.\n\nIn another terminal you can run `yarn serve` to open a test web page where you can test real phone checks if you have the node server running or you can simply check a PhoneCheck `check_url`.\n\n## Releasing\n\n1. Bump the version if required\n2. Run `yarn changelog` to auto-update the `CHANGELOG.md` and manually edit to finesse\n3. Commit the changes read for release: `git commit -m 'chore(release): v{version}`\n4. Tag the release `git tag v{version}`\n5. Push the tags `git push --follow-tags origin main`\n6. Publish to NPM `yarn run publish-canary`\n\n## License\n\n[MIT](LICENSE)\n","browser":"dist/tru-id-sdk.umd.js","gitHead":"aea0aede163b19bd5612c1f881e762705b49d4a9","scripts":{"dev":"rollup -c -w","lint":"eslint src","test":"jest","build":"rollup -c","serve":"serve","prettier":"prettier src --write","changelog":"standard-version","publish-canary":"npm publish --access public --tag canary"},"_npmUser":{"name":"mtt","email":"mattia.asti@gmail.com"},"repository":{"url":"git+https://github.com/tru-ID/tru-sdk-web.git","type":"git"},"_npmVersion":"7.15.1","description":"SDK for tru.ID that provides a helper method for requesting the `check_url` for PhoneCheck and SubscriberCheck","directories":{},"_nodeVersion":"14.17.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","nock":"^13.1.0","serve":"^11.3.2","canvas":"^2.8.0","eslint":"^7.27.0","rollup":"^2.50.5","prettier":"^2.3.0","@types/jest":"^26.0.23","jest-fetch-mock":"^3.0.3","standard-version":"^9.3.0","eslint-plugin-import":"^2.23.4","eslint-config-prettier":"^8.3.0","eslint-config-airbnb-base":"14.2.1"},"standard-version":{"skip":{"tag":true,"bump":true,"commit":true}},"_npmOperationalInternal":{"tmp":"tmp/tru-sdk-web_0.0.2-canary.1_1622555450266_0.7706441586401429","host":"s3://npm-registry-packages"}},"0.0.3":{"name":"@tru_id/tru-sdk-web","version":"0.0.3","keywords":["2FA","MFA","Number Verify"],"author":{"url":"https://tru.id","name":"tru.ID","email":"community@tru.id"},"license":"MIT","_id":"@tru_id/tru-sdk-web@0.0.3","maintainers":[{"name":"mtt","email":"mattia.asti@gmail.com"},{"name":"ciao_mario","email":"eric@4auth.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"lpedrosa","email":"lpedrosa88@gmail.com"}],"homepage":"https://github.com/tru-ID/tru-sdk-web#readme","bugs":{"url":"https://github.com/tru-ID/tru-sdk-web/issues"},"dist":{"shasum":"202e419e27658ebadf8c26a2c5f8bb9336ae51e4","tarball":"https://registry.npmjs.org/@tru_id/tru-sdk-web/-/tru-sdk-web-0.0.3.tgz","fileCount":6,"integrity":"sha512-jMpmll4u0zuzfBP7YojEbXG45rfvJvsxfDItvSx1jiFwR8GLSwlGrSPxc9NW30t83bJEKYyeLH3Oxal1XtYSKw==","signatures":[{"sig":"MEYCIQCsFg0MhJssWB+XN4xCdVo3nsjRup4BxVqY8mJvPpOlBQIhANrX6TbCtnDv5g8Hywov6ydwJRCu5eQ2ATVbcH5jpduL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20485,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvhgoCRA9TVsSAnZWagAAvIEP/2z1Q02i9z7RcTFZSAUk\nN3sCw0OjvMUkuL8ZuZc3u4P0z4BnPoeJHeTnS8hIArznA95MaXBRfCWWUCr6\n2yDLa+IftdMYBQc0pvKc0YdkQmoqM3ObOMsjzTI6m0FdMNVxhXirFaZ+QdpL\n5opshZlg+tU3fbdlbAcNPiYmCfMFKJILBeZWCX2ScWiE0QyAFz5H4yb9j04T\nVpMERaSv5c7BWv0y6NejsUp3xA2bjIA5YkP0gQ22BHKP2bLom5tAv2IVBO4f\nPhN78Hw0V+KQph6pzAlhcvyxrMkzyFUGZq3xRlY5pcsihgWDO19xSNrRGcQu\nGw7ZfhJLEaP0ZI2ImGifOb1s7lXwe5m2zpITa8R9/0NylHHN3HuQ1d0NLm6k\n1ytNWDg4qLQiEb4cAIDk+tUhMj2Kd8/HETrxp5lcALU39ABeuHA6bwrfNvM6\nK+58y6h2BbrdT9G80dVa2E6zUwAB+qXuf8jvtjQJEvkdwf0+n5hRAKDJaVtF\nmtGquGWhYUsB504UOepzXItXBUUmQSDsgswATxj2vuLdJ45wtqW6Qznq+AvJ\n45lfgxqtbk/5mgwymGox+tudJExsaQEudGRCgsIGtcYOjlPeLluC3JqW0FEn\nUgaT4jiez5jM+AFHODOZySn5upPUoXUFqX9CBNfPVeDD+9Tzco3KlPTsNet5\noJPL\r\n=zPlc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/tru-id-sdk.js","type":"module","module":"dist/tru-id-sdk.mjs","browser":"dist/tru-id-sdk.umd.js","gitHead":"aea0aede163b19bd5612c1f881e762705b49d4a9","scripts":{"dev":"rollup -c -w","lint":"eslint src","test":"jest","build":"rollup -c","serve":"serve","prettier":"prettier src --write","changelog":"standard-version","publish-canary":"npm publish --access public --tag canary"},"_npmUser":{"name":"mtt","email":"mattia.asti@gmail.com"},"repository":{"url":"git+https://github.com/tru-ID/tru-sdk-web.git","type":"git"},"_npmVersion":"7.15.1","description":"SDK for tru.ID that provides a helper method for requesting the `check_url` for PhoneCheck and SubscriberCheck","directories":{},"_nodeVersion":"14.17.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.3","nock":"^13.1.0","serve":"^11.3.2","canvas":"^2.8.0","eslint":"^7.27.0","rollup":"^2.50.5","prettier":"^2.3.0","@types/jest":"^26.0.23","jest-fetch-mock":"^3.0.3","standard-version":"^9.3.0","eslint-plugin-import":"^2.23.4","eslint-config-prettier":"^8.3.0","eslint-config-airbnb-base":"14.2.1"},"standard-version":{"skip":{"tag":true,"bump":true,"commit":true}},"_npmOperationalInternal":{"tmp":"tmp/tru-sdk-web_0.0.3_1623070760842_0.6371285754450813","host":"s3://npm-registry-packages"}},"0.0.4":{"name":"@tru_id/tru-sdk-web","version":"0.0.4","keywords":["2FA","MFA","Number Verify"],"author":{"url":"https://tru.id","name":"tru.ID","email":"community@tru.id"},"license":"MIT","_id":"@tru_id/tru-sdk-web@0.0.4","maintainers":[{"name":"mtt","email":"mattia.asti@gmail.com"},{"name":"ciao_mario","email":"eric@4auth.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"lpedrosa","email":"lpedrosa88@gmail.com"}],"homepage":"https://github.com/tru-ID/tru-sdk-web#readme","bugs":{"url":"https://github.com/tru-ID/tru-sdk-web/issues"},"dist":{"shasum":"81b3a7216b60c53260c1c8c86e58999856c2050d","tarball":"https://registry.npmjs.org/@tru_id/tru-sdk-web/-/tru-sdk-web-0.0.4.tgz","fileCount":6,"integrity":"sha512-QzIqcFlaY68Sk0kGS5hZT2LvcqTp6/qMqqz1+dSaHRLTCFWxOg0640cLEAZ/vZC5Ie+Z1mRgZ6qW0mkK80R1fw==","signatures":[{"sig":"MEUCIQDxkSe7FdZqdtgYCVcnZhDlZjdacbjLloHnBRy5dvU4KAIgTXWdAXvKaK9pnMNdksORZrRvxbD6EeWl6cmgsvEK62o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20809,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwdQ3CRA9TVsSAnZWagAAKEkP/jUeD9YcCixzPiYwJKYA\nte7VGHkJLUJ7lWta8Lh8KtZfnL1EbsUbd01PIOJYakscN/1Y0hgC6SRqw9Ik\njiBVtbWRPogstKMv7SUjhVoArCTq/j0J36UqAPqabe4AMHKJGfSNxeIsB+c+\nRAYHU0aOYpC4RfhpiXL2dCHqtNROk71UDfkeZylDzLmkvCB342SMY7HTmbiF\n7nwbCsNkO9tO12zkITBsUypFpuldRg5mfNyV3lxV8svkkPRdmIQT4rz04PaQ\nwV93L7ARlsoZz4PvvkMjGIEBNr2QxSniTCiWil+mpZFMbsWTainTrp6Cp3fV\nLzRyl2VaBczMYX4Xc9AbL7RJimOSoXyL1KGbwci75G2wyPBC/5KY/+JKscud\nxkG8mkVCooGagFAkIAz1ke/cOFYcn0RdidmjV2XkvAqLISXt3y28Ubatc+Ii\n4AUBm36vKBp7L3UytRrxgDbVRfL7K7BS7kVwc/GbQfCfxuYrP5I3IvQc5cHd\n/LZkOd6ojXOcxQyc5OCV7O8wS2dGxtQFoSOVz4pwT5to789gylMKRyGLxuq6\nRBLdGf54db2sPHIUPCki7cv+3GhYcR8u4OyRW5Ttyp8lQN6mk9ExsamfErRA\nkpE5pg1FC1YXIDhskoUKtlZtEmIWHZ6QPbex1aiv03+rn+pEctxYkpZWA2JW\nTDAD\r\n=klK8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/tru-id-sdk.js","type":"module","module":"dist/tru-id-sdk.mjs","readme":"# tru.ID SDK for Web Applications\r\n\r\nSDK for tru.ID that provides a helper function for requesting the `check_url` for [PhoneCheck](https://tru.id/docs/phone-check) and [SubscriberCheck](https://tru.id/docs/subscriber-check).\r\n\r\nWith the default `config` the SDK will call our public device coverage API and try to determine if the device is using a mobile IP.\r\n\r\nIn case the device IP belongs to a MNO we don't support it will throw an error with the message `tru.ID:sdk-web MNO not supported`\r\n\r\nIn case the device IP is not from a mobile network it will throw an error with the message `tru.ID:sdk-web Not a mobile IP`, in this case the user might be using the wifi with a broadband connection.\r\n\r\nIf you want to ignore this check you can pass `{ checkDeviceCoverage: false }` in the `config` and proceed regardless.\r\n\r\n## Installation\r\n\r\n### Via jsDelivr CDN\r\n\r\n```html\r\n<script src=\"https://cdn.jsdelivr.net/npm/@tru_id/tru-sdk-web@canary/dist/tru-id-sdk.umd.js\"></script>\r\n```\r\n\r\n### Via NPM\r\n\r\n```sh\r\n$ npm install @tru_id/tru-sdk-web@canary\r\n```\r\n\r\n## Usage\r\n\r\n### Via jsDelivr CDN\r\n\r\nWhen installed via a CDN a `tru.ID` global is installed.\r\n\r\n```html\r\n<script src=\"https://cdn.jsdelivr.net/npm/@tru_id/tru-sdk-web@canary/dist/tru-id-sdk.umd.js\"></script>\r\n<script>\r\n  tru.ID.openCheckUrl(url, config)\r\n</script>\r\n```\r\n\r\n### Via NPM\r\n\r\nWhen installed via NPM the imported object exposes the `openCheckUrl` function.\r\n\r\n```js\r\nimport truID from '@tru_id/tru-sdk-web'\r\n\r\nawait truID.openCheckUrl(checkUrl, config)\r\n```\r\n\r\n### Config\r\n\r\nThe `openCheckUrl` function takes an optional `config` Object argument:\r\n\r\n```js\r\ntruID.openCheckUrl(url, config)\r\n```\r\n\r\nThe configuration options are:\r\n\r\n```js\r\n{\r\n  // whether debug information will be logged to the console.\r\n  // Defaults to `false`\r\n  debug: boolean,\r\n\r\n  // \"image\" - a zero pixel image is dynamically added to the DOM for the check_url request\r\n  // \"window\" - `window.open` is called to open the check_url in a new window\r\n  // Defaults to \"image\".\r\n  checkMethod: \"image\" | \"window\",\r\n\r\n  // If `checkMethod` was set to `window` identifies the number of\r\n  // milliseconds after which the opened window will be closed.\r\n  // Defaults to 3000.\r\n  windowCloseTimeout: Number,\r\n\r\n  // It will run the device coverage check to determine\r\n  // if the device is on a mobile IP\r\n  // Defaults to true\r\n  checkDeviceCoverage: boolean\r\n}\r\n```\r\n\r\n## Examples\r\n\r\n### Via jsDelivr CDN\r\n\r\n`https://cdn.jsdelivr.net/npm/@tru_id/tru-sdk-web@canary/dist/tru-id-sdk.umd.js`\r\n\r\n```html\r\n<body>\r\n  <form id=\"phone_check_form\">\r\n    <!-- Element to get the user's phone number -->\r\n    <input type=\"tel\" id=\"phone_number\" required />\r\n    <input type=\"submit\" value=\"Check\" />\r\n  </form>\r\n\r\n  <script src=\"https://cdn.jsdelivr.net/npm/@tru_id/tru-sdk-web@canary/dist/tru-id-sdk.umd.js\"></script>\r\n  <script>\r\n    async phoneCheck(ev) {\r\n        ev.preventDefault()\r\n\r\n        // POST to your own server\r\n        // to create the PhoneCheck resource for the phone number\r\n        const phoneCheckResource = await fetch('/your-server/phone-check', {\r\n            method: 'POST'\r\n            headers: {\r\n                'Content-Type': 'application/json'\r\n            },\r\n            body: JSON.stringify({\r\n                phone_number: document.getElementById('phone_number')\r\n            })\r\n        })\r\n\r\n        // use the tru.ID web SDK to navigate to the check_url\r\n        try {\r\n          await tru.ID.openCheckUrl(phoneCheckResource.check_url)\r\n        } catch (e) {\r\n          if (e.code === tru.ID.DeviceCoverageErrors.NotMobileIP) {\r\n            // tell the user they should turn off the wifi\r\n            // and use the mobile connection before proceeding\r\n          }\r\n        }\r\n    }\r\n\r\n    document.getElementById('phone_check_form')\r\n        .addEventListener('submit', phoneCheck)\r\n  </script>\r\n</body>\r\n```\r\n\r\n### Via NPM\r\n\r\n```sh\r\n$ npm install @tru_id/tru-sdk-web@canary\r\n```\r\n\r\n```js\r\nimport truID from '@tru_id/tru-sdk-web'\r\n\r\nasync function handlePhoneCheckCreation(result) {\r\n  const checkUrl = result.check_url\r\n  await truID.openCheckUrl(checkUrl)\r\n}\r\n```\r\n\r\n## Local development\r\n\r\nYou can run `yarn dev` that will open rollup with watch mode that will re-compile the SDK after every change.\r\n\r\nIn another terminal you can run `yarn serve` to open a test web page where you can test real phone checks if you have the node server running or you can simply check a PhoneCheck `check_url`.\r\n\r\n## Releasing\r\n\r\n1. Bump the version if required\r\n2. Run `yarn changelog` to auto-update the `CHANGELOG.md` and manually edit to finesse\r\n3. Commit the changes read for release: `git commit -m 'chore(release): v{version}`\r\n4. Tag the release `git tag v{version}`\r\n5. Push the tags `git push --follow-tags origin main`\r\n6. Publish to NPM `yarn run publish-canary`\r\n\r\n## License\r\n\r\n[MIT](LICENSE)\r\n","browser":"dist/tru-id-sdk.umd.js","gitHead":"531e0cccf37bd9f210d433134a00f936f6b21950","scripts":{"dev":"rollup -c -w","lint":"eslint src","test":"jest","build":"rollup -c","serve":"serve","prettier":"prettier src --write","changelog":"standard-version","publish-canary":"npm publish --access public --tag canary"},"_npmUser":{"name":"lpedrosa","email":"lpedrosa88@gmail.com"},"repository":{"url":"git+https://github.com/tru-ID/tru-sdk-web.git","type":"git"},"_npmVersion":"7.13.0","description":"SDK for tru.ID that provides a helper method for requesting the `check_url` for PhoneCheck and SubscriberCheck","directories":{},"_nodeVersion":"16.2.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","nock":"^13.1.0","serve":"^11.3.2","canvas":"^2.8.0","eslint":"^7.27.0","rollup":"^2.50.5","prettier":"^2.3.0","@types/jest":"^26.0.23","jest-fetch-mock":"^3.0.3","standard-version":"^9.3.0","eslint-plugin-import":"^2.23.4","eslint-config-prettier":"^8.3.0","eslint-config-airbnb-base":"14.2.1"},"standard-version":{"skip":{"tag":true,"bump":true,"commit":true}},"_npmOperationalInternal":{"tmp":"tmp/tru-sdk-web_0.0.4_1623315511080_0.06285295668023827","host":"s3://npm-registry-packages"}},"0.0.5":{"name":"@tru_id/tru-sdk-web","version":"0.0.5","keywords":["2FA","MFA","Number Verify"],"author":{"url":"https://tru.id","name":"tru.ID","email":"community@tru.id"},"license":"MIT","_id":"@tru_id/tru-sdk-web@0.0.5","maintainers":[{"name":"mtt","email":"mattia.asti@gmail.com"},{"name":"ciao_mario","email":"eric@4auth.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"lpedrosa","email":"lpedrosa88@gmail.com"}],"homepage":"https://github.com/tru-ID/tru-sdk-web#readme","bugs":{"url":"https://github.com/tru-ID/tru-sdk-web/issues"},"dist":{"shasum":"1b201364d9eadb87746418e8ad37634802a28d0e","tarball":"https://registry.npmjs.org/@tru_id/tru-sdk-web/-/tru-sdk-web-0.0.5.tgz","fileCount":6,"integrity":"sha512-Pf1XRopAqp9AY/q8PQYbyrTsyvk39jZ8yR0axZ5vrsSxniZngcxJIxZarnhbTqw02GSJ3HbGBuGd51Krl6vg7g==","signatures":[{"sig":"MEMCIFEtWkXdQQquNyjioVfPBFv2/QQXTGb5uNODyiF9+LeeAh9SoGaqPCUm5pgq2q3fnKLdrzTXngsrP5I1R5380fZR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwd6PCRA9TVsSAnZWagAAwXgQAIFaZl7Jr3U2EqjnoYgG\nExc6E95kqUAGnGmMSMHDFOQeKulDzdhUiIUHZxSvk4PYLngqkWmZAjNZjBKt\nYC9bfMSKt5EHPEpyogzZIPhIH7c/VjyseOBPmWyh2/enwTX0u5i6Rp7oKtvC\nYrd9HmLY9qG0nT+6OqXzIlEUdDT1Mc/GUiPH+/gOTyeSiLctubnHdDdriXH4\nlCx+OKaKOCQIaDnePeSb0jO3/mPRBESo7g4Joi+URxTHnleI04IwxIcu5qA5\nHXPEx4WkvJeeNksZMSOdU5sd5gSJ22K5LMCua6Up+Q+9nUNwVw4q5TGvN7aj\nP7UuZRvVy5gyMFqMIM33e5GzKFhpKtuMhpbH9NLOCgWZv9KjeF8oGZGqq2qj\nQGhYqj79WYB3UyAmdC4uPpHWNY82XEU8Xk90ElxE8kVP1CW7xtPM7PWS4iXQ\niH0uM58sfxiYlcpvzmWNcd/hI6Q99mBODQra3EMT5gOPRcfx35ghJw6568Lh\n8fJJVWeWjsGdV4eidOqsg8gYtZFd9kHi+2SuCAr9nrUxN7Umba9HYePFNZQH\nppg8WGAhSP+xWOPNU37AYvGhDOMUnsF3fBKZ+9fKoX7tTxLdXDaSIqL2XNSh\nFDDBsUqiHFJVayQktUU37+5liwttAn0FuPN2utYZu/eofc6oITIug3eosKaQ\nTFlB\r\n=jyfw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/tru-id-sdk.js","type":"module","module":"dist/tru-id-sdk.mjs","browser":"dist/tru-id-sdk.umd.js","gitHead":"3d38e2b01958e5d08afeef724103f62b95508b99","scripts":{"dev":"rollup -c -w","lint":"eslint src","test":"jest","build":"rollup -c","serve":"serve","prettier":"prettier src --write","changelog":"standard-version","publish-canary":"npm publish --access public --tag canary"},"_npmUser":{"name":"lpedrosa","email":"lpedrosa88@gmail.com"},"repository":{"url":"git+https://github.com/tru-ID/tru-sdk-web.git","type":"git"},"_npmVersion":"7.13.0","description":"SDK for tru.ID that provides a helper method for requesting the `check_url` for PhoneCheck and SubscriberCheck","directories":{},"_nodeVersion":"16.2.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.3","nock":"^13.1.0","serve":"^11.3.2","canvas":"^2.8.0","eslint":"^7.27.0","rollup":"^2.50.5","prettier":"^2.3.0","@types/jest":"^26.0.23","jest-fetch-mock":"^3.0.3","standard-version":"^9.3.0","eslint-plugin-import":"^2.23.4","eslint-config-prettier":"^8.3.0","eslint-config-airbnb-base":"14.2.1"},"standard-version":{"skip":{"tag":true,"bump":true,"commit":true}},"_npmOperationalInternal":{"tmp":"tmp/tru-sdk-web_0.0.5_1623318159374_0.10333871681712004","host":"s3://npm-registry-packages"}},"0.0.6":{"name":"@tru_id/tru-sdk-web","version":"0.0.6","keywords":["2FA","MFA","Number Verify"],"author":{"url":"https://tru.id","name":"tru.ID","email":"community@tru.id"},"license":"MIT","_id":"@tru_id/tru-sdk-web@0.0.6","maintainers":[{"name":"gregholmes","email":"iam@gregholmes.co.uk"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"lpedrosa","email":"lpedrosa88@gmail.com"},{"name":"ciao_mario","email":"eric@4auth.io"},{"name":"mtt","email":"mattia.asti@gmail.com"},{"name":"myakici","email":"murat.yakici@gmail.com"}],"homepage":"https://github.com/tru-ID/tru-sdk-web#readme","bugs":{"url":"https://github.com/tru-ID/tru-sdk-web/issues"},"dist":{"shasum":"66ec9f0a4ae6787a5d0c46b977b99fcf93c3bbd6","tarball":"https://registry.npmjs.org/@tru_id/tru-sdk-web/-/tru-sdk-web-0.0.6.tgz","fileCount":3,"integrity":"sha512-DSexjsdkw7O4eVbaHH0Trmx8oxKHVL5QhPbiZqQNaQSDO5auR43GQ4Q7jbDt60AyosrdHFP11vZt9odoadqfqA==","signatures":[{"sig":"MEYCIQDX8RUXgPeUfBqL+DGEY8ZZiwpHY+NUe2Pi5ZM8/XfDJwIhAPXrZ569kCSEUEixgTpdKip0N8r5yishJFCrlKPKkf13","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7493,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1u4ICRA9TVsSAnZWagAAP4QP/3+8mo1VfprBKZbrtsAm\nouGN66vsTMSd5jtly5hnub4r2txvx+yA+7o2hpHwZpsvd+AKBP71X3mQEpJr\nMoCEAFydCaoY4bYijCHxhBfGoB34XzCUXGvpwcOa7nDM9Rj+bnefDi5atnNA\n72kKsQuY6/0ZGGWvj9BKwez6s0aLOhnTaIQLrmE9xILjbYUSYCcuEwaMPebD\nL12LRHF0NVGLyJbF8AOnIvVQ1umvq4lhTadbVb6293gT6cT1yV3XC4Qt62aX\n0qv+UYqGa2kqraPGvKlq0RuNN38L1U6z6/VvqTr2Xzx3Y/PXdOd/WcjEGVIF\n+5IEprCZETl73DyEt6u90gkODgIID2CNK2Fxy8Oocn47vykF6wYECF5qYR2P\n+cQPAlLbMtmcIfcrN0UqPEqOYUpcclZxnelDOST8AmYGf3K1NBGTorOZ5Kln\nPGRyx7a0DnRJOYE269wFEsm+PeC6Q9wNvtetkOOtctqn1q+A8aB/oCEJvDhN\npyLVl+18Bh/aFp9IKm34jgGLSIhnz41LTQJp2JZPyOiPNGe9zf2v0EiIzi5j\nu/UERCSspAldG9FuPWyx4f2oGRm9zgZqLx0waRYgzRFLbYF3hwmrgYw8XltM\nlmBA5esCF3m0HssOWKPnXZZaEI0W9LbKbK4QAKqjTxBTWJe1TuQyMiGO8qnR\n6fEA\r\n=NFpx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/tru-id-sdk.js","type":"module","module":"dist/tru-id-sdk.mjs","browser":"dist/tru-id-sdk.umd.js","gitHead":"a2e07320d87349cd3088b01ee81eef07b3c8cf4c","scripts":{"dev":"rollup -c -w","lint":"eslint src","test":"jest","build":"rollup -c","serve":"serve","prettier":"prettier src --write","changelog":"standard-version","publish-canary":"npm publish --access public"},"_npmUser":{"name":"gregholmes","email":"iam@gregholmes.co.uk"},"repository":{"url":"git+https://github.com/tru-ID/tru-sdk-web.git","type":"git"},"_npmVersion":"8.1.0","description":"SDK for tru.ID that provides a helper method for requesting the `check_url` for PhoneCheck and SubscriberCheck","directories":{},"_nodeVersion":"16.13.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.3","nock":"^13.1.0","serve":"^11.3.2","canvas":"^2.8.0","eslint":"^7.27.0","rollup":"^2.50.5","prettier":"^2.3.0","@types/jest":"^26.0.23","jest-fetch-mock":"^3.0.3","standard-version":"^9.3.0","eslint-plugin-import":"^2.23.4","eslint-config-prettier":"^8.3.0","eslint-config-airbnb-base":"14.2.1"},"standard-version":{"skip":{"tag":true,"bump":true,"commit":true}},"_npmOperationalInternal":{"tmp":"tmp/tru-sdk-web_0.0.6_1641475591805_0.2832965968212602","host":"s3://npm-registry-packages"}},"0.0.7":{"name":"@tru_id/tru-sdk-web","version":"0.0.7","keywords":["2FA","MFA","Number Verify"],"author":{"url":"https://tru.id","name":"tru.ID","email":"community@tru.id"},"license":"MIT","_id":"@tru_id/tru-sdk-web@0.0.7","maintainers":[{"name":"dyakici","email":"didematilla@gmail.com"},{"name":"gregholmes","email":"iam@gregholmes.co.uk"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"lpedrosa","email":"lpedrosa88@gmail.com"},{"name":"ciao_mario","email":"eric@4auth.io"},{"name":"mtt","email":"mattia.asti@gmail.com"},{"name":"myakici","email":"murat.yakici@gmail.com"}],"homepage":"https://github.com/tru-ID/tru-sdk-web#readme","bugs":{"url":"https://github.com/tru-ID/tru-sdk-web/issues"},"dist":{"shasum":"b73065971d6eaaaee3034179c9e9c5f7f5cf7cee","tarball":"https://registry.npmjs.org/@tru_id/tru-sdk-web/-/tru-sdk-web-0.0.7.tgz","fileCount":6,"integrity":"sha512-YjU7pg5DpeR2Og0pKZ6Los87N+brTyk0oqvptlEPqNnDVe/M4FFkyjE8kVvcaGEclYANQLvvrvxG4XhhlwCzzg==","signatures":[{"sig":"MEUCIQDTE5rUWA+VNyvp2CYSwnSy2bN14HC6dUJ3qDTNdOPxwgIgYs9VLVRIO0oTIiDGogDoD1QuTAiVrtytRUf8OFWj+rg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20803,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiDMLxCRA9TVsSAnZWagAAOncP/jdBI/RY265TX5P5N2ab\n1ADZG1HAbsBiEqKm+7W2HwFph+kHB6r1Cv4FwSVrKahT57SfLmMhR0zTQhy4\nPmNlPKdMxbSuvYbtfk/kMXIMr3TD4MP+wTOZ8RHWQ88xXUEfOrPAKYA1Vg+y\nNEg6kgzvN39zRdjxoeLtkYSEHgtJ3vRH/HeCybWOQspW8cMQ1inSiGtfHukj\nZ/RtGHK4pBwUIChHDDDQ9J+nx2LUKMie0u3pW4iYXIpwwjyGTTU+ii4M3nm8\nk2fkfa/N1P3DXqMirzdHBXlDHtNtRxATSz2FlIV6RyLPB1p2FCh5/izvNEyE\nNSpV3I2IaUbJoGzfYdNO3H6WTZ2/K9nOnseQOu2j5Te6dFudBeqtV0zsZPDs\nDBnRi3PbMtmaTe755jrFi0tG3uZcGItiZfHeqSyFA5bTmXQ6++XbSVXTRatQ\nAg1l8//DdfQnTCyUAWPFJVkUdaBE2rVxppQMI5WFxfAXVT0Krfp0VppU1jY3\ngSQfrt1GeZ0cQBHPrSw97vuLaTALf5+5pMb4HrqqAqsi+lZY8oWfT8WGbP+/\nWjOSqyANVilXUdoSY6R5ZCfCHO2WEj+yLgR3yEuZvf1aB3Z83eLNaTxTBItm\nZ0+4sVoMKWHVZr9eEuvlS7I0TqloR11dUoJ3PwpON/J5LPXmC7mbVhsoOQw/\niFd6\r\n=/6G6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/tru-id-sdk.js","type":"module","module":"dist/tru-id-sdk.mjs","browser":"dist/tru-id-sdk.umd.js","gitHead":"59200b20f397d2f28a4780acdc5f28ed0b3c9e52","scripts":{"dev":"rollup -c -w","lint":"eslint src","test":"jest","build":"rollup -c","serve":"serve","prettier":"prettier src --write","changelog":"standard-version","publish-canary":"npm publish --access public"},"_npmUser":{"name":"mtt","email":"mattia.asti@gmail.com"},"repository":{"url":"git+https://github.com/tru-ID/tru-sdk-web.git","type":"git"},"_npmVersion":"8.3.1","description":"SDK for tru.ID that provides a helper method for requesting the `check_url` for PhoneCheck and SubscriberCheck","directories":{},"_nodeVersion":"16.14.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.3","nock":"^13.1.0","serve":"^11.3.2","canvas":"^2.8.0","eslint":"^7.27.0","rollup":"^2.50.5","prettier":"^2.3.0","@types/jest":"^26.0.23","jest-fetch-mock":"^3.0.3","standard-version":"^9.3.0","eslint-plugin-import":"^2.23.4","eslint-config-prettier":"^8.3.0","eslint-config-airbnb-base":"14.2.1"},"standard-version":{"skip":{"tag":true,"bump":true,"commit":true}},"_npmOperationalInternal":{"tmp":"tmp/tru-sdk-web_0.0.7_1645003505186_0.043357801892981884","host":"s3://npm-registry-packages"}},"0.0.8":{"name":"@tru_id/tru-sdk-web","version":"0.0.8","keywords":["2FA","MFA","Number Verify"],"author":{"url":"https://tru.id","name":"tru.ID","email":"community@tru.id"},"license":"MIT","_id":"@tru_id/tru-sdk-web@0.0.8","maintainers":[{"name":"dyakici","email":"didematilla@gmail.com"},{"name":"gregholmes","email":"iam@gregholmes.co.uk"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"lpedrosa","email":"lpedrosa88@gmail.com"},{"name":"ciao_mario","email":"eric@4auth.io"},{"name":"mtt","email":"mattia.asti@gmail.com"},{"name":"myakici","email":"murat.yakici@gmail.com"}],"homepage":"https://github.com/tru-ID/tru-sdk-web#readme","bugs":{"url":"https://github.com/tru-ID/tru-sdk-web/issues"},"dist":{"shasum":"f4e4fd41f02f7f66d8e54747b4c5278ea03d9ca3","tarball":"https://registry.npmjs.org/@tru_id/tru-sdk-web/-/tru-sdk-web-0.0.8.tgz","fileCount":6,"integrity":"sha512-9WLqF7JEL5JBx6/ug1Fykm3EN5nxKD4IWseJkauM/lcjKMl6qq0xbcnzAhkqcyRCtBEgjOefcs+QmlfpmVTY/w==","signatures":[{"sig":"MEYCIQDsMWXS+oHgknOta1HbpBZpNPK1fM+HFCbVlff8PYh58gIhAOsIUh0RoKHXGLXhfC27ubVdKZAgJuPb/Nq0fMNq+pAO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiNEv1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrvBA//Yf8QsQInLnijxLq4OueyAVMGBpD4pSkzaOagVA/hjHL+TfKD\r\nLjorDBVr6Vmt/epYTtezgIm3cvbathJr2abpcpylpmhW9FLNw+DCCsJOlff8\r\n5osCYidtw5dYp+mJrkFXmwUD3H3YOMIOC1+udgWhYfQSB193yF1PA7DvZM5Y\r\nXN69YqOIX9rKIC5aAbtG7sWd4akxanIiAGQ/kS8y9XeaDEiYnA1OV4MLa2/6\r\nycTQHOxTrOvrOFTbgc/xggsNPFuw8t3yMf6qb6PkRqnH/yf3U/byLIDw84Ml\r\nAn6t3lq58UAGrr5JEmsvus/RCDax+VOstQ/1JpI+yk+sK3KvMWR4VjF2ee83\r\n2NDVkeW6+Busv4TzIDdvcWd/RKf5fR6aaP22fHjAJ/+t5J5RslfkCHgls9ta\r\n0IKD3Rwj/iquBs8C2rlKwvEj2TLmf5SGx1peJHBIlK37I6Q/KrQZYU7QJ4Rv\r\nRoB3PQpUYF7tYlR3nOzTie4qvs8kR/HEmXjbjhugpUfRHkAVQKs/fgtB2JMX\r\naKUsoSXF42QwN259ycnLEEOyE+5pOZ/Rq9RAlWlHwgsjGI+6yKmXhytCY8li\r\nJdzMeF6CBVZsR2ywDDfafJnLyeR8doiMK9eK16KWAfJjLTnkSjww7NzkBGZU\r\nHdPUop6fXIcjw4KePLF58olo+zUczIX/X7g=\r\n=Xz6z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/tru-id-sdk.js","type":"module","module":"dist/tru-id-sdk.mjs","browser":"dist/tru-id-sdk.umd.js","gitHead":"123e8d8b16c2bcd86056507f3e6577754d2008e2","scripts":{"dev":"rollup -c -w","lint":"eslint src","test":"jest","build":"rollup -c","serve":"serve","prettier":"prettier src --write","changelog":"standard-version","publish-canary":"npm publish --access public"},"_npmUser":{"name":"gregholmes","email":"iam@gregholmes.co.uk"},"repository":{"url":"git+https://github.com/tru-ID/tru-sdk-web.git","type":"git"},"_npmVersion":"8.1.0","description":"SDK for tru.ID that provides a helper method for requesting the `check_url` for PhoneCheck and SubscriberCheck","directories":{},"_nodeVersion":"16.13.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.3","nock":"^13.1.0","serve":"^11.3.2","canvas":"^2.8.0","eslint":"^7.27.0","rollup":"^2.50.5","prettier":"^2.3.0","@types/jest":"^26.0.23","jest-fetch-mock":"^3.0.3","standard-version":"^9.3.0","eslint-plugin-import":"^2.23.4","eslint-config-prettier":"^8.3.0","eslint-config-airbnb-base":"14.2.1"},"standard-version":{"skip":{"tag":true,"bump":true,"commit":true}},"_npmOperationalInternal":{"tmp":"tmp/tru-sdk-web_0.0.8_1647594485069_0.8148376727429318","host":"s3://npm-registry-packages"}},"0.0.9":{"name":"@tru_id/tru-sdk-web","version":"0.0.9","keywords":["2FA","MFA","Number Verify"],"author":{"url":"https://tru.id","name":"tru.ID","email":"community@tru.id"},"license":"MIT","_id":"@tru_id/tru-sdk-web@0.0.9","maintainers":[{"name":"dyakici","email":"didematilla@gmail.com"},{"name":"gregholmes","email":"iam@gregholmes.co.uk"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"lpedrosa","email":"lpedrosa88@gmail.com"},{"name":"ciao_mario","email":"eric@4auth.io"},{"name":"mtt","email":"mattia.asti@gmail.com"},{"name":"myakici","email":"murat.yakici@gmail.com"}],"homepage":"https://github.com/tru-ID/tru-sdk-web#readme","bugs":{"url":"https://github.com/tru-ID/tru-sdk-web/issues"},"dist":{"shasum":"70a55f2fee300b8c44edb886162181c91c165687","tarball":"https://registry.npmjs.org/@tru_id/tru-sdk-web/-/tru-sdk-web-0.0.9.tgz","fileCount":6,"integrity":"sha512-6ECgBff6EMJsItWbu5WRr5vjB0L94ox6Mhb87SWPMMJ8DI85ILNBm9uMHM3Y5sNMTHPN3MQD2bcVsutmroci/w==","signatures":[{"sig":"MEUCIQDovkwgvZKSpTwvhJEWuVDL/un5sNieL5WRs43e/18spQIgOasGZS/dt3UfBqluVLLHxLT9M1KVC68U6+YC5fzYGYg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21321,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPDG9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoB7xAAhlz8e9zxePy2NfZ7wpshmrty8XtQRttg8cWv8RTpKCokA3lJ\r\n08Oygxj34yVHQ/iq81WYaor/hVOErgKQ2XqEpOATBXBspU+JmkVeUjJ9a7PA\r\nvpuYhrl2lYIzhh/3HRDbOsL+w2JxWKhOxsRlUtJ2UZCYCCbALIQ67Z+/AEXJ\r\nokhWKsr/qsVdJfMRI2cSd0N2ILxwvZVSM/9Iazx/hrJTRUQxdD5Vl+OePA7p\r\n0gqcrFLtKoFsGlvSG70YvfpdRCPbWU+6wmm8KOjhYswzrOzqG0fQIK1dCV3j\r\n1vP7xbmlBJxs/rK9w4KjvgxVejnkq1whJbpWm1yZ3zRAbFjh3OK1veWhj67k\r\nuu2wTlSC8iYN8xW4DaZsWxWiw5LYx9o/yWRuqq4NA8/0F96knyvh5U6zTmOU\r\nOLKxPZxUCDXMbuPN47LEigv750IJnKMAXRFYYMXf/7Z0MH/IwkNRISXRtJ00\r\nzwuDOSX8MHO/3HEWiAxwGNNSjFciiwSbCX4SmI4atGboEV3IvOqGAVfwiyaW\r\noF03KgsBkqxfAFfnGR8OUQ/FmYNOc6cgo5Y8ioAriWd0OxHRPxeK/qPoTdlr\r\n/Bwcj1ICb516QbTkF4rmgZc+qwsvtMlEJJYDYAHIbmUvN8UfPHXQgJWFjlh1\r\nHMfkCitoV8jn3KbpRIMoV08pRHV1fDCelhM=\r\n=DtdC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/tru-id-sdk.js","type":"module","module":"dist/tru-id-sdk.mjs","browser":"dist/tru-id-sdk.umd.js","gitHead":"83c70b0c3af34e583f3435b94ed3566a4db5e3d7","scripts":{"dev":"rollup -c -w","lint":"eslint src","test":"jest","build":"rollup -c","serve":"serve","prettier":"prettier src --write","changelog":"standard-version","publish-canary":"npm publish --access public"},"_npmUser":{"name":"gregholmes","email":"iam@gregholmes.co.uk"},"repository":{"url":"git+https://github.com/tru-ID/tru-sdk-web.git","type":"git"},"_npmVersion":"8.1.0","description":"SDK for tru.ID that provides a helper method for requesting the `check_url` for PhoneCheck and SubscriberCheck","directories":{},"_nodeVersion":"16.13.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.3","nock":"^13.1.0","serve":"^11.3.2","canvas":"^2.8.0","eslint":"^7.27.0","rollup":"^2.50.5","prettier":"^2.3.0","@types/jest":"^26.0.23","jest-fetch-mock":"^3.0.3","standard-version":"^9.3.0","eslint-plugin-import":"^2.23.4","eslint-config-prettier":"^8.3.0","eslint-config-airbnb-base":"14.2.1"},"standard-version":{"skip":{"tag":true,"bump":true,"commit":true}},"_npmOperationalInternal":{"tmp":"tmp/tru-sdk-web_0.0.9_1648112061770_0.3797922931071116","host":"s3://npm-registry-packages"}},"0.0.10":{"name":"@tru_id/tru-sdk-web","version":"0.0.10","keywords":["2FA","MFA","Number Verify"],"author":{"url":"https://tru.id","name":"tru.ID","email":"community@tru.id"},"license":"MIT","_id":"@tru_id/tru-sdk-web@0.0.10","maintainers":[{"name":"dyakici","email":"didematilla@gmail.com"},{"name":"gregholmes","email":"iam@gregholmes.co.uk"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"lpedrosa","email":"lpedrosa88@gmail.com"},{"name":"ciao_mario","email":"eric@4auth.io"},{"name":"mtt","email":"mattia.asti@gmail.com"},{"name":"myakici","email":"murat.yakici@gmail.com"}],"homepage":"https://github.com/tru-ID/tru-sdk-web#readme","bugs":{"url":"https://github.com/tru-ID/tru-sdk-web/issues"},"dist":{"shasum":"bc29a5f203bba3b9915e6e9d3d6d5601517b7cb1","tarball":"https://registry.npmjs.org/@tru_id/tru-sdk-web/-/tru-sdk-web-0.0.10.tgz","fileCount":6,"integrity":"sha512-WfiOMrCb22A99wvjXkKv7LNxk2s7yFhpsIxwrZtOEnrIZ4tuu2Snz2XZ1n+b4lmx4Y/lw3at7NmlpkpjTbq0Eg==","signatures":[{"sig":"MEYCIQDaGv7fHNMgYkU0whCAUQsWCMaM6dqYT3XNsyK6HzAqrgIhAM/jMnH+rCmBVnpsZEwQ16S1ESSGbPcZ1rcCtFvvohfw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21317,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPDT4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpuQhAAmQVsoRUcLVjMvAoa0EaVqmh19p8I6kHx/CoilDQIRAL9B489\r\nMw+6IlJZz8kFly10ykWFZsFQgGVWg5Uu0nqxzXp44W7ppY+PM2Kjuwr/Vsf9\r\n0TZh7bXerFBzSMsmrvvkWGEcGdbETjFKGURg3Dgnu/T6FkJckdLgE7hLIuR2\r\niw4v3l0mPbWcyqbnRNeYMvy1ejgldeNi7mFPICXvgRM5laMJucpEDJZjeOSp\r\nrjmSrSrBiVC5QhktES2RMItp/T6ie+SmguTIolaDSdKXTsMQ57pO64JxzZuT\r\nNAqJMvYUIkmh2fwWPdkY/JqG6+JcFo7ZoHmweK5JUXBxAAl0XsmOUcfomVpu\r\nEMRdpdsPy9MKXPA6wz7KejnlBSwz3aMUN4GLM848AlWJbbMzPa+XV9aP4vtX\r\ngXu0vwfNBCAQbwPabN+pKgulYd/HZ3PIRUZ/ifsbp/n1j9L/TBFhWzwxUsYU\r\nj+wH1mhswUu/XHOLuu6JBcHXHdP0qNa9E9iV48LraDM3mjPWysxHifTDtQRg\r\na3RU0u9HCk53xIzWbeAgIeCJFFfISyy1X+Ox8oxTmP7YXZXA0otk0CmaC9op\r\nkgAkAhw5sLUaNdLvNcEaa0ax3vUlvUto9GcCaE7KDjmljJuMjlce3s8imc+g\r\nRgk/f+GSsLf3jb45kjbRxzA0UxIAIxGoXG8=\r\n=dxTV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/tru-id-sdk.js","type":"module","module":"dist/tru-id-sdk.mjs","browser":"dist/tru-id-sdk.umd.js","gitHead":"ac9e4d2ff3111e25bba9d411a62e142d1ce5b24b","scripts":{"dev":"rollup -c -w","lint":"eslint src","test":"jest","build":"rollup -c","serve":"serve","prettier":"prettier src --write","changelog":"standard-version","publish-canary":"npm publish --access public"},"_npmUser":{"name":"gregholmes","email":"iam@gregholmes.co.uk"},"repository":{"url":"git+https://github.com/tru-ID/tru-sdk-web.git","type":"git"},"_npmVersion":"8.1.0","description":"SDK for tru.ID that provides a helper method for requesting the `check_url` for PhoneCheck and SubscriberCheck","directories":{},"_nodeVersion":"16.13.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.3","nock":"^13.1.0","serve":"^11.3.2","canvas":"^2.8.0","eslint":"^7.27.0","rollup":"^2.50.5","prettier":"^2.3.0","@types/jest":"^26.0.23","jest-fetch-mock":"^3.0.3","standard-version":"^9.3.0","eslint-plugin-import":"^2.23.4","eslint-config-prettier":"^8.3.0","eslint-config-airbnb-base":"14.2.1"},"standard-version":{"skip":{"tag":true,"bump":true,"commit":true}},"_npmOperationalInternal":{"tmp":"tmp/tru-sdk-web_0.0.10_1648112888594_0.9882729429913926","host":"s3://npm-registry-packages"}},"0.0.11":{"name":"@tru_id/tru-sdk-web","version":"0.0.11","keywords":["2FA","MFA","Number Verify"],"author":{"url":"https://tru.id","name":"tru.ID","email":"community@tru.id"},"license":"MIT","_id":"@tru_id/tru-sdk-web@0.0.11","maintainers":[{"name":"dyakici","email":"didematilla@gmail.com"},{"name":"gregholmes","email":"iam@gregholmes.co.uk"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"lpedrosa","email":"lpedrosa88@gmail.com"},{"name":"ciao_mario","email":"eric@4auth.io"},{"name":"mtt","email":"mattia.asti@gmail.com"},{"name":"myakici","email":"murat.yakici@gmail.com"}],"homepage":"https://github.com/tru-ID/tru-sdk-web#readme","bugs":{"url":"https://github.com/tru-ID/tru-sdk-web/issues"},"dist":{"shasum":"9d0e4e385bd8a4902e8322e4ca4d900c9a743cd5","tarball":"https://registry.npmjs.org/@tru_id/tru-sdk-web/-/tru-sdk-web-0.0.11.tgz","fileCount":6,"integrity":"sha512-bUKczzlbN/DNJuYUsU99+yvpDwiBJjG0iHj1e83ZLfWR1wDsyaHqC5n3UrTGOCmhuCYG5o7+2YsDMK34lb0kGQ==","signatures":[{"sig":"MEUCIAzS/DFAmTIAQgV3vvYiqidqz39+pk4SS9XwIjvp7hnTAiEAwd0Rv3tbfZ6e/Zv0V16JaqV9eENDkNf9Prpr/LhNBsw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22125,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi2n4VACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmotew//WfrDNts+Q0+/n6xOXQIP88hcg6Se+fdDlg10V7WxstWBGLu5\r\nsEHz6tolqNKACyuImQX9gxv87pO41gcKrDZgJdDNU6FqNh9RYd5XtPJ1BrbJ\r\nvkkffoGr8I+RxpIi3lNBn5bh05eEFai89XOQ50pFXKZatZKZkEEpJ7iSKZEP\r\nbBRBAx/aWSZVSQiUkDoy925f8kAd6fmSc3i88DcOD0eWTxgZvdDe8RMr3wgv\r\n8P6K49iiBiAgb7atmsUsdcfdaSE9qOzf2qkO8qRaJPyXBmMu5Ec9cWthBiWN\r\noSGOzYy94RkLDsXSJ3m/mFv8yVG4UrzY7jG8UAcYYbIjp7jJk82yMtTAqz+E\r\nunjLc/OLSjUHXZqWZJfa19qibAxCnOv2WtO2FxPQK+XDl3Y67M+5Pz5Uuo8u\r\niLR1bPCQxLfW01s1a+dppKU/6BJmY8GxZVukg7gK5OL1a6de7H7m88dWLHNc\r\nXl/rEFDue4pQmnHm01r3bk9vKpqkCGRzu/rZrNodbDuOx0FxrmFnV/UXwLKh\r\ndltYzEeDsI52LT7Tcq58tZJya0/atuJTXnSkOLvmH8FUafrqemOqtrrwMay/\r\ne2Qp/SlZZBaZeq++8gqNYI3S3yRuKIzaUYUH4lZGh8nQjy+NWNPx5nemSIAy\r\nAHRoOuageGOGxOpG0gqOeW1fgkQ6jWsV570=\r\n=TPg9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/tru-id-sdk.js","type":"module","module":"dist/tru-id-sdk.mjs","browser":"dist/tru-id-sdk.umd.js","gitHead":"09ced8e3bee8cf01dd8936108fcceff301ff0357","scripts":{"dev":"rollup -c -w","lint":"eslint src","test":"jest","build":"rollup -c","serve":"serve","prettier":"prettier src --write","changelog":"standard-version","publish-canary":"npm publish --access public"},"_npmUser":{"name":"gregholmes","email":"iam@gregholmes.co.uk"},"repository":{"url":"git+https://github.com/tru-ID/tru-sdk-web.git","type":"git"},"_npmVersion":"8.1.0","description":"SDK for tru.ID that provides a helper method for requesting the `check_url` for PhoneCheck and SubscriberCheck","directories":{},"_nodeVersion":"16.13.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.3","nock":"^13.1.0","serve":"^11.3.2","canvas":"^2.8.0","eslint":"^7.27.0","rollup":"^2.50.5","prettier":"^2.3.0","@types/jest":"^26.0.23","jest-fetch-mock":"^3.0.3","standard-version":"^9.3.0","eslint-plugin-import":"^2.23.4","eslint-config-prettier":"^8.3.0","eslint-config-airbnb-base":"14.2.1"},"standard-version":{"skip":{"tag":true,"bump":true,"commit":true}},"_npmOperationalInternal":{"tmp":"tmp/tru-sdk-web_0.0.11_1658486293735_0.5259281773648865","host":"s3://npm-registry-packages"}}},"time":{"created":"2021-02-01T19:04:30.630Z","modified":"2026-02-19T12:04:52.117Z","0.0.1-canary.0":"2021-02-01T19:04:31.053Z","0.0.1-canary.1":"2021-02-02T12:08:41.742Z","0.0.1-canary.2":"2021-02-17T00:13:46.305Z","0.0.2-canary.0":"2021-06-01T13:45:53.562Z","0.0.2-canary.1":"2021-06-01T13:50:50.416Z","0.0.3":"2021-06-07T12:59:20.992Z","0.0.4":"2021-06-10T08:58:31.239Z","0.0.5":"2021-06-10T09:42:39.559Z","0.0.6":"2022-01-06T13:26:32.023Z","0.0.7":"2022-02-16T09:25:05.424Z","0.0.8":"2022-03-18T09:08:05.259Z","0.0.9":"2022-03-24T08:54:21.919Z","0.0.10":"2022-03-24T09:08:08.756Z","0.0.11":"2022-07-22T10:38:13.930Z"},"bugs":{"url":"https://github.com/tru-ID/tru-sdk-web/issues"},"author":{"url":"https://tru.id","name":"tru.ID","email":"community@tru.id"},"license":"MIT","homepage":"https://github.com/tru-ID/tru-sdk-web#readme","keywords":["2FA","MFA","Number Verify"],"repository":{"url":"git+https://github.com/tru-ID/tru-sdk-web.git","type":"git"},"description":"SDK for tru.ID that provides a helper method for requesting the `check_url` for PhoneCheck and SubscriberCheck","maintainers":[{"email":"didematilla@gmail.com","name":"dyakici"},{"email":"alex.candfield@gmail.com","name":"ajcandfield"},{"email":"m@tru.id","name":"marco_idlayr"}],"readme":"# tru.ID SDK for Mobile Web Applications\n\n[![License][license-image]][license-url]\n\nThe Web SDK for tru.ID providing a helper function for requesting the `check_url` for [PhoneCheck](https://tru.id/docs/phone-check) and [SubscriberCheck](https://tru.id/docs/subscriber-check).\n\n## Installation\n\n### Via jsDelivr CDN\n\n```html\n<script src=\"https://cdn.jsdelivr.net/npm/@tru_id/tru-sdk-web/dist/tru-id-sdk.umd.js\"></script>\n```\n\n### Via NPM\n\n```sh\n$ npm install @tru_id/tru-sdk-web\n```\n\n## Usage\n\n### Via jsDelivr CDN\n\n#### Reachability Check\n\n```html\n<script src=\"https://cdn.jsdelivr.net/npm/@tru_id/tru-sdk-web/dist/tru-id-sdk.umd.js\"></script>\n<script>\n  tru.ID.getReachability(url)\n</script>\n```\n\n#### PhoneCheck\n\nWhen installed via a CDN a `tru.ID` global is installed.\n\n```html\n<script src=\"https://cdn.jsdelivr.net/npm/@tru_id/tru-sdk-web/dist/tru-id-sdk.umd.js\"></script>\n<script>\n  tru.ID.openCheckUrl(url, config)\n</script>\n```\n\n### Via NPM\n\n#### Reachability Check\n\n```js\nimport truID from '@tru_id/tru-sdk-web'\n\ntruID.getReachability(url)\n```\n\n#### PhoneCheck\n\nWhen installed via NPM the imported object exposes the `openCheckUrl` function.\n\n```js\nimport truID from '@tru_id/tru-sdk-web'\n\ntruID.openCheckUrl(checkUrl, config)\n```\n\n### `openCheckUrl` Config\n\nThe `openCheckUrl` function takes an optional `config` Object argument:\n\n```js\ntruID.openCheckUrl(url, config)\n```\n\nThe configuration options are:\n\n```js\n{\n  // whether debug information will be logged to the console.\n  // Defaults to `false`\n  debug: boolean,\n\n  // \"image\" - a zero pixel image is dynamically added to the DOM for the check_url request\n  // \"window\" - `window.open` is called to open the check_url in a new window\n  // Defaults to \"image\".\n  checkMethod: \"image\" | \"window\",\n\n  // If `checkMethod` was set to `window` identifies the number of\n  // milliseconds after which the opened window will be closed.\n  // Defaults to 3000.\n  windowCloseTimeout: Number,\n\n  // It will run the device coverage check to determine\n  // if the device is on a mobile IP\n  // Defaults to true\n  checkDeviceCoverage: boolean,\n\n  // Depending on what PhoneCheck API version the check is created with.\n  // Defaults to \"v0.2\"\n  version: \"v0.1\" | \"v0.2\",\n}\n```\n\n## Local development\n\nYou can run `npm run dev` that will open rollup with watch mode that will re-compile the SDK after every change.\n\nIn another terminal you can run `npm run serve` to open a test web page where you can test real phone checks if you have the node server running or you can simply check a PhoneCheck `check_url`.\n\n## Releasing\n\n1. Bump the version if required\n2. Run `npm run changelog` to auto-update the `CHANGELOG.md` and manually edit to finesse\n3. Commit the changes read for release: `git commit -m 'chore(release): v{version}`\n4. Tag the release `git tag v{version}`\n5. Push the tags `git push --follow-tags origin main`\n6. Build the project with `npm run build`\n6. Publish to NPM `npm publish --access public`\n\n## License\n\n[MIT](LICENSE)\n\n## Meta\n\nDistributed under the MIT license. See ``LICENSE`` for more information.\n\n[https://github.com/tru-ID](https://github.com/tru-ID)\n\n[license-image]: https://img.shields.io/badge/License-MIT-blue.svg\n[license-url]: LICENSE\n","readmeFilename":"README.md"}