{"_id":"@departurelabs/quark-checkout","_rev":"4-9af874928d3d14180b6ddbfce4cf0220","name":"@departurelabs/quark-checkout","dist-tags":{"latest":"0.0.4"},"versions":{"0.0.1":{"name":"@departurelabs/quark-checkout","version":"0.0.1","description":"Quark Checkout script","main":"./dist/quark-checkout.esm.js","browser":"./dist/quark-checkout.umd.js","module":"./dist/quark-checkout.esm.js","types":"./dist/types.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/DepartureLabsIC/quark-checkout.git"},"keywords":["quark","checkout","departurelabs"],"author":{"name":"Departure Labs"},"license":"MIT","bugs":{"url":"https://github.com/DepartureLabsIC/quark-checkout/issues"},"homepage":"https://github.com/DepartureLabsIC/quark-checkout#readme","gitHead":"ed784066dbd5d1ee193f015590badd063975d24d","_id":"@departurelabs/quark-checkout@0.0.1","_nodeVersion":"19.2.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-yHCJaqtmtTsgbAhSXmxN+GKlz3X37VOoXp+LHLZTn/VSZOgCyuaaGn7r6ObUgu41mZCnU6oExKyguuaV9CPL8Q==","shasum":"61ee83c1345d932dbc3541edca1957778f73deab","tarball":"https://registry.npmjs.org/@departurelabs/quark-checkout/-/quark-checkout-0.0.1.tgz","fileCount":6,"unpackedSize":28464,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDQS4vXWs6VorHcgck8G8ZjjAEUWt/JQxhY0BdmtPuikwIhAKuP2OLPg/RtPNKIpst0paAor+O3fWVzZfw8LYdupdyQ"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmmu7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrr4w/+LPRX9I0+Taoc3Dt5oaD6+Mhimle+xu2V0t9qgCuzKsn6YW2Y\r\n8TZf25SaWjvSsf2PrKMpXlMcxFGI2v180hBNX9rG+lXepuACmE7ljts0ufKx\r\nKUSMSTyUogqDDNmUme+SEQvz4BTo9DevE1JpWccOAvwfKBf2ritLQK4LkOf/\r\nHuDpQWPIJ1ZLm0Bw469QlxYC7EK5BXlaT0XxXSm1kBYmbP5TkSKiTtiMnJLh\r\no08tl82U+TUZ8gZYcETd0bGBEhN7fGFWNq0Dc5vWPphMgcznyLdKNJZ++fbw\r\npKF/zolZcRSq9RNlitF2Zc1E0lQE0a0ZaSG3D5VADfZ1CudDhODHSTykVnA2\r\nN25DaGaeNfhIqaMwDyrkEwJ3mj5l5Zfp/dB3cn+iTZBWJ/C2bN7QTWnaS2Gp\r\nLtK9UXzVx5Njkpshcug+R3Z9CRgg2e7GJHYcN9aOLkW/V+BR8lEFqmVEyBQM\r\nyJbA6kB9jIjCgJrTEx5PrRHCOWwJ8JVjoDWapqudp+2Ehmkd5hyO9u6CE3mH\r\nmGw10xCxs7gJr+w/sE1qy6IfaT3gzkL8qILydbvc0jmGT2te5vipoJwWgojN\r\n8z57eXjr1PPdPpxgOpa8amAwFj7FSeGi/S9ZlQyhvrzXKmfkFWXLIitBQQln\r\nqEqFEXbS2KuvhbZu34hRgaEZViGmVRoTmJs=\r\n=vgU4\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"departuredani","email":"dani@departure.dev"},"directories":{},"maintainers":[{"name":"departuredani","email":"dani@departure.dev"},{"name":"departure_labs","email":"hazel@departure.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quark-checkout_0.0.1_1671064507642_0.03219509768809803"},"_hasShrinkwrap":false},"0.0.2":{"name":"@departurelabs/quark-checkout","version":"0.0.2","private":false,"description":"Quark Checkout script","main":"./dist/quark-checkout.esm.js","browser":"./dist/quark-checkout.umd.js","module":"./dist/quark-checkout.esm.js","types":"./dist/types.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/DepartureLabsIC/quark-checkout.git"},"keywords":["quark","checkout","departurelabs"],"author":{"name":"Departure Labs"},"license":"MIT","bugs":{"url":"https://github.com/DepartureLabsIC/quark-checkout/issues"},"homepage":"https://github.com/DepartureLabsIC/quark-checkout#readme","gitHead":"f17b15c1b9ee9f56927d1f156aa49e244fc6082a","_id":"@departurelabs/quark-checkout@0.0.2","_nodeVersion":"19.3.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-whUAWdOrHg6wZPcnL+4abK5rtoULl2aht5eo5/8DbObaMbw3nqaTQJiXV1Fvhlq9ZBdfzdu8K/XL2ktzI1j3cg==","shasum":"888bd2b1a999b22602d3d7a7c6ef64eb6b9d4a90","tarball":"https://registry.npmjs.org/@departurelabs/quark-checkout/-/quark-checkout-0.0.2.tgz","fileCount":7,"unpackedSize":37085,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDljm9XVYu+j5XpQi6Fzy31Lvip88CiIcrc800BCKvhvQIhAJZTcLirogEWIRzp0qsVZmOD6Lw/kO2ohuwERWfeVAAE"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjnJMsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoaDA/+K6lrQCCpBKEAOhNqOGSyF4x6wP5QrXQxhSGS99ZlBQqescGt\r\nAum7Ju38ANB4VapHYuST9Yyn3UQBewNoZqb7zbD9kdZVwyiorYpD51xOQKnd\r\n4JrDpFMuFRv+ohBAQyZwhZ+uhs9HW+O9WU+MSwGxP/iJkCS1lsj3y+gtjsf/\r\nJj1wCZPkGgfBdu9gRqHr77vXCZyooq9ATVpX+x52X0ruVt6h1Rkewe06n1Yk\r\n3q3QIpuKjo90tyPA5UJ6Km9g6aLKtf0HBJi102Rp5xOCrhFvbM+2vbKhYOKB\r\ntQo/UosyvXY4ivoltohEbbd6UMKVD0lJ4UIgXkJK3ELVhLe9NTdVvD6ZP3fx\r\n0rtz24wY3BGO6W9GrOhK1vfBUT0hubB0gqaKy0eEylAJlXOFSM932jVNylJL\r\nh7mb64hQuttGfP6t00Uw7E/NGt82uod7LBVvgQojxiY+2HUIANmNVv9Ld0aF\r\nfHSpT0K4fk1D/kvByGMH2lapaUt76yGsRC16jVrEPnBRo7JFsRbp796Rz8bz\r\nOig8GjjsajBu+GmC/oArcs9dgpUSS+TC1+BFyLfqXUr+N/MSBQGg4OX2V9Hx\r\ney1xbB6L0JiKey3xIpqd2+/rD/5cAcYbzIilhxVxj5dpan1gMouokemA/wuN\r\nkmpWVAgqueVZ602i12a5RlCW3F0Sup1w8c4=\r\n=pyTi\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"departuredani","email":"dani@departure.dev"},"directories":{},"maintainers":[{"name":"departuredani","email":"dani@departure.dev"},{"name":"departure_labs","email":"hazel@departure.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quark-checkout_0.0.2_1671205675905_0.7657844077979807"},"_hasShrinkwrap":false},"0.0.3":{"name":"@departurelabs/quark-checkout","version":"0.0.3","private":false,"description":"Quark Checkout script","main":"./dist/quark-checkout.esm.js","browser":"./dist/quark-checkout.umd.js","module":"./dist/quark-checkout.esm.js","types":"./dist/types.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/DepartureLabsIC/quark-checkout.git"},"keywords":["quark","checkout","departurelabs"],"author":{"name":"Departure Labs"},"license":"MIT","bugs":{"url":"https://github.com/DepartureLabsIC/quark-checkout/issues"},"homepage":"https://github.com/DepartureLabsIC/quark-checkout#readme","gitHead":"56a129b2da31d3e4dfd7f9a711faac6f333de8a5","_id":"@departurelabs/quark-checkout@0.0.3","_nodeVersion":"19.3.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-uTybJgKwmg9q7my+6bjEzcRa6QKyVwdPr6mSddfROnyvPMFTGD2oXqtc+dnrM4NAmW7+/DhPNkQFKQgPLRsz2g==","shasum":"62b0adae38f96827cd2b51d9d380a2b0c427224d","tarball":"https://registry.npmjs.org/@departurelabs/quark-checkout/-/quark-checkout-0.0.3.tgz","fileCount":7,"unpackedSize":36475,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLwYFUTTfwbuFtDiKLbz5VoB9leB68d7zc8bBl2XuaNgIgasv1f5izwX8m2W1ZEXYco2OoOm2CxSoc6+BkFqfFLgU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjoIaSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmolshAAhuTvnnnj146Lpghqlo5UyUkJyoUCcF9yfxfTVojcUkAHKPKd\r\nrKy1RnvUCT8/JwVXtek5y6Oxoi8wpFx5eCIfh++s1UnDe8Uf+RpMhZV0+l5G\r\n2INcer9MAvQtHPZEilgSZ6UJV4Uwq8rKCH7rg8bgpswG2f0FOLy/K4d+f3QY\r\nkFLTYpyuJ6iDmKj7QXqQ6CcYI4vkDX3AmSCYo3hdhrfb4ch+UNit8JpVmoj8\r\nQOtRHc7DNy6333d4Ub1TXXJg8lgg6RsDPTaigV9lA6av/Q8m5N9CuZCul8eQ\r\nDuMJFwkkmpJvHL0IkG3GEdenxP3iipa+HnQNAZS7zbtOqCk6oNTvCsZpYMp4\r\nL7aq5JqFtBM19P2rdlKPdg2bP3BXF7nOFk3hpBHXl9mco/MkTF0HFXe++Y8G\r\nI4ffT5AJDpk92wzDgL0ZlrM0x1zH//UVvpGiP6xHtQUte2eK/xbp9RItkN8J\r\nQCwyV+yyVgRzYj9x5uqQwDzziOyAMdfo1exJgp42mYZ4bs+Eo0AD3KtRuA1w\r\n8cXpcwnd6il5n0v2QD+oLa4ywwJ6ktFOMBUa8R/6ndICJaYEvcCg66OZUrWm\r\nTi6tUHztHZx64NDjZAGHY409ucY16vyyeFbDDjXQZm/PZd9yTWdUaGpdEUey\r\nL31PoyGFpY46RlcfBHrn3bHq9jj3WqD/CDc=\r\n=lKLk\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"departuredani","email":"dani@departure.dev"},"directories":{},"maintainers":[{"name":"departuredani","email":"dani@departure.dev"},{"name":"departure_labs","email":"hazel@departure.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quark-checkout_0.0.3_1671464594243_0.8330667257535458"},"_hasShrinkwrap":false},"0.0.4":{"name":"@departurelabs/quark-checkout","version":"0.0.4","private":false,"description":"Quark Checkout script","main":"./dist/quark-checkout.esm.js","browser":"./dist/quark-checkout.umd.js","module":"./dist/quark-checkout.esm.js","types":"./dist/types.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/DepartureLabsIC/quark-checkout.git"},"keywords":["quark","checkout","departurelabs"],"author":{"name":"Departure Labs"},"license":"MIT","bugs":{"url":"https://github.com/DepartureLabsIC/quark-checkout/issues"},"homepage":"https://github.com/DepartureLabsIC/quark-checkout#readme","gitHead":"02854f5ff86e076685e1ea1e20fb973bd6331f14","_id":"@departurelabs/quark-checkout@0.0.4","_nodeVersion":"19.3.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-R06xZ0NcJ4XEVmr1L8m3ura2DnPGZlgL5xyQtozpiFS/ODxsnxsRewZGaYgjEL9YlX2SNsdxHkkFZxFnqiZUwQ==","shasum":"df8fae7d19d4d8baa98f225e54dada60b82946af","tarball":"https://registry.npmjs.org/@departurelabs/quark-checkout/-/quark-checkout-0.0.4.tgz","fileCount":7,"unpackedSize":37901,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC7BQTDZH6XLmYC1Acp5Onh3doRmyN/BqHHjM70cqI/MgIgHiLnuNLkKS7/9daPJSa79LsTke44Cq9WWmiVf6RBTew="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjoKqRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpt5Q/7BE6l2YVBSTjUxm7Z1c9Y60bCPJsJrrI7Q1fu7VSJzCBaHpTi\r\ntlltbmUndXA+T/e4NeDrmP9RshuJW3uxwqXOD2q4bbQRprMfHCkuFArp4+1Y\r\nyM6T5J6Q1JVblX21JJzWMp2UPlL3k9WG8nR8uI7/EVxKttKMdC562wUWDEIc\r\nFzlXkw4GO3aBB5ppz4lyUvMgyDFVBUKabMooydpHvWA4nHqwWkL0RBEO/VPO\r\n+ys5scCvPvm3IhFzjlnLX3sZwGTjnBh8aEBPMRMjjh6M0ZcB0rL8ryNvtC+9\r\nvo+SumdfGKXTirqz8vrG2YaYAJ/2mf/paj92PyKXltGam5slNijhfI79XJ11\r\n7kZ0VZ62DkpNLUnzyzJEgWGIE+GWY6F56hKLCLGae9/bT37sL6ZEzhc1sdl5\r\nslJXq+bltIL2fQMn2uPl2YuTLREVHZ6X27rtQHQGRhyXaSC7azsCn3lZFJ6m\r\nSo5ZVW5m4sIPkhsuvkIPZhUyelQtZzOgXEqDA/B8N/vFKtcY9yQbDCTBn5+R\r\nRWC1o0KmgY9YYilLy8GrPyDsUl70+62pnRTxiu9td/hUxDUNvxHLMNzX3s//\r\nNNpvzp1nv67gXGG4pEDWZKHQgKgO7TaNGDf9S2oq61g2rgTxljxMch9TKVAu\r\n6PEDW1Xlasjs/mKL+c+zIV+l88ANiNe6ijY=\r\n=SuaL\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"departuredani","email":"dani@departure.dev"},"directories":{},"maintainers":[{"name":"departuredani","email":"dani@departure.dev"},{"name":"departure_labs","email":"hazel@departure.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quark-checkout_0.0.4_1671473809223_0.520410373733192"},"_hasShrinkwrap":false}},"time":{"created":"2022-12-15T00:35:07.641Z","0.0.1":"2022-12-15T00:35:07.806Z","modified":"2022-12-19T18:16:49.498Z","0.0.2":"2022-12-16T15:47:56.050Z","0.0.3":"2022-12-19T15:43:14.416Z","0.0.4":"2022-12-19T18:16:49.399Z"},"maintainers":[{"name":"departuredani","email":"dani@departure.dev"},{"name":"departure_labs","email":"hazel@departure.dev"}],"description":"Quark Checkout script","homepage":"https://github.com/DepartureLabsIC/quark-checkout#readme","keywords":["quark","checkout","departurelabs"],"repository":{"type":"git","url":"git+https://github.com/DepartureLabsIC/quark-checkout.git"},"author":{"name":"Departure Labs"},"bugs":{"url":"https://github.com/DepartureLabsIC/quark-checkout/issues"},"license":"MIT","readme":"# @departurelabs/quark-checkout\n\n- [@departurelabs/quark-checkout](#departurelabsquark-checkout)\n  - [Testnet](#testnet)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [Configuration validation](#configuration-validation)\n    - [Configuration properties](#configuration-properties)\n  - [Basket structure](#basket-structure)\n  - [Cross-tab communication](#cross-tab-communication)\n  - [Token support](#token-support)\n  - [Authentication providers](#authentication-providers)\n  - [Websites](#websites)\n\n## Testnet\n\nCurrently Quark is only available as a testnet. No real tokens are being used\nexcept for Quark's own TEST token.\n\n## Installation\n\n```sh\nnpm i -S @departurelabs/quark-checkout\n```\n\n## Usage\n\nExample integration:\n\n```js\nimport { initialize, TOKENS, PROVIDERS } from \"@departurelabs/quark-checkout\"\n\nconst { checkout } = initialize(\n  provider: PROVIDERS.II,\n  domain: \"https://34dvu-aqaaa-aaaah-qc6ua-cai.ic0.app\",\n  notify: {\n    principalId: \"dlftw-sqaaa-aaaaa-danil-cai\",\n    methodName: \"canisterMethod\",\n  },\n  integrator: \"company@testnet.quark\",\n  callback: event => {\n    if (event.data.result === \"Accepted\") {\n      checkoutComplete()\n    } else {\n      checkoutFailed()\n    }\n  },\n)\n\nconst basket = [\n  {\n    name: \"Spoon\",\n    description: \"Use this for your soup\",\n    value: 10000000,\n    token: TOKENS.TEST,\n  },\n]\n\ncheckout(basket)\n```\n\nYou can also see our\n[example project tori](https://github.com/DepartureLabsIC/rs_tori) which we use\nfor testing and development.\n\n### Configuration validation\n\nTo help you integrate Quark we have another package to validate your\nconfiguration and basket values in runtime. This package is not ment for\nproduction, but to help you ensure you're using the correct configuration and\nbasket values\n\nSee:\n[@departurelabs/quark-checkout.validate](https://www.npmjs.com/package/@departurelabs/quark-checkout.validate)\n\n### Configuration properties\n\n- `provider`: The provider used to authenticate the user. This value is used to\n  redirect the user quickly to the correct authentication page when they are\n  checking out but not yet authenticated. See\n  [Authentication providers](#authentication-providers) for a list of the\n  providers we currently support.\n- `domain`: The domain quark-checkout will send a user to upon checkout. In the\n  future, we expect larger services might want to self-host their own checkout\n  pages.\n- `notify`: An object containing the Principal ID as a string and the name of\n  the canister method as a string.\n- `notify.principalId`: The Principal ID of the canister that will receive the\n  callback from the Quark canister. Learn more about the\n  [canister implementation](https://www.notion.so/departurelabs/Backend-Hosted-Checkout-docs-draft-7f92887c65c84be9be568624909474f0)\n- `notify.methodName`: We call this canister method when a user completes a\n  transaction. The Canister will be required to accept or deny each incoming\n  transaction. Learn more about the\n  [canister implementation](https://www.notion.so/departurelabs/Backend-Hosted-Checkout-docs-draft-7f92887c65c84be9be568624909474f0)\n- `integrator`: The Quark Account ID of the recipient of the payment.\n  **Warning!** This principal must be able to invoke calls against Quark in\n  order to withdraw funds. Please use only use a canister, a dfx principal\n  identity, or a Quark user principal unless you are absolutely sure about what\n  you are doing.\n- `callback`: A javascript method implemented by the integrator to be invoked by\n  the MessageEvent handler upon receiving an Event with type ``.\n\nExample events:\n\n```json\n{ \"type\": \"checkoutComplete\", \"data\": { \"result\": \"Accepted\" } }\n```\n\n```json\n{ \"type\": \"checkoutComplete\", \"data\": { \"result\": \"Rejected\" } }\n```\n\n\"Trust, but verify!\" is your best course of action when handling the callback\ndata.\n\nOnce you have instantiated the `checkout` Function we can begin creating a\nbasket with a couple of transaction items.\n\n## Basket structure\n\n- `basket` The basket is a list of transaction items, defined by the merchant,\n  that contains the data necessary for the checkout:\n  - `name` - the name of the checked out product. e.g. “Spoon”\n  - `value` - the value of the checkout out product. Specified as fractional\n    units of an TEST token—called e8s—as a whole number, where one e8 is the\n    smallest unit of a TEST token. For example, 1.05000000 is 1 TEST and 5000000\n    e8s.\n  - `token` - the token used for the transaction of this basket item. Note: at\n    this moment we only support TEST\n  - `description` - optional description of the checked out product. e.g. “Used\n    to eat soup”\n\n## Cross-tab communication\n\nWhen calling `initialize`, the configuration passed as a parameter is first\nvalidated. When validated, we will attach an eventListener to the window scope.\nThe eventListener will execute a handler upon receiving an incoming message.\nWhen this message comes from the Quark website it will execute code to ensure\ncommunication between quark-checkout and the Quark website.\n\nThere are two types of incoming messages on the quark-checkout-side:\n\n- `checkoutLoaded`: this message will be dispatched once the Quark checkout page\n  was opened in another tab. Upon receiving this message we will send all the\n  necessary data to the opened tab, such as `basket`, `integrator`, etc. using a\n  [window.postMessage](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage)\n  [MessageEvent](https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent)\n  with the type \"basketUpdate\".\n- `checkoutComplete`: this is sent to our listener when the user has confirmed\n  the checkout on the Quark website. Upon receiving a message with this type, we\n  will call the `callback` Function that the user passed inside the init()\n  config and it's up to the integrator to take it from there.\n\nAlso, there is one type of outgoing message going from the quark-checkout-side\nto the Quark-side:\n\n- `basketUpdate`: When opened in the end-user's browser, the Checkout page on\n  the Quark website will listen for this particular message to update the\n  contents of the checkout and calculate the total sum of the transaction to\n  display this to the user to confirm.\n\n**PLEASE NOTE**: BigInts cannot be serialized client-side and thus we do not\nsupport them in the checkout. You will need to cast them to Numbers instead.\n\n## Token support\n\nWe currently only support TEST-tokens on our testnet. More tokens (such as ICP\nand cycles) will follow soon!\n\nOur target token TEST requires its values be set in e8s. One e8 is the smallest\npartition of an TEST token (1/10^8 or 10^-8). For example, 123.15000001 TEST is\n12_315_000_001 e8s. To convert whole value TEST to e8s simply multiply the TEST\nvalue by 1e8\n\n```js\nconst tokens = 123.3341 // make sure there are more than 8 digits of precision!!\nconst e8s = tokens * 1e8\n```\n\nQuick tip: As you are handling other people's capital and its common to run into\nfloating point errors when performing basic arithmetic. To avoid this, we\nrecommend using libraries such as:\n\n- [currency.js](https://currency.js.org/)\n- [dinero.js](https://dinerojs.com/)\n- [numeral.js](http://numeraljs.com/)\n\nWe export the `TOKENS` object to make it easier to use these values.\n\n## Authentication providers\n\nCurrently we support the following authentication providers by passing the\nfollowing values to the `provider` property when calling `initialize`:\n\n| Provider                                       | Value  | Status |\n| ---------------------------------------------- | ------ | ------ |\n| [Internet Identity](https://identity.ic0.app/) | `ii`   | ✅     |\n| [NFID](https://nfid.one/)                      | `nfid` | 🏗️     |\n| [Plug](https://plugwallet.ooo/)                | `plug` | 🏗️     |\n\nWe export the `PROVIDERS` object to make it easier to use these values.\n\n## Websites\n\n- [@departurelabs/quark-checkout](https://www.npmjs.com/package/@departurelabs/quark-checkout)\n  Quark Integration Script\n- [GitHub Quark source](https://github.com/DepartureLabsIC/rs_quark)\n- [GitHub Quark npm package source](https://github.com/DepartureLabsIC/quark-checkout)\n- [GitHub Tori QA example](https://5peht-hiaaa-aaaam-aayqq-cai.ic0.app/login)\n","readmeFilename":"README.md"}