-
Notifications
You must be signed in to change notification settings - Fork 13
quick start
This page is designed to provide a quick start in using the Token Negotiator, with the demo examples.
Before following these steps, please ensure you have Node Js installed on your computer (https://nodejs.org/).
This guide will provide two working versions of how Token Negotiation can be done (served on your local computer).
1. First download this repository which contains various examples and the source code
https://github.com/TokenScript/token-negotiator-examples
example websites:
- hotel-bogota-active-negotiation-website (example website)
- hotel-bogota-passive-negotiation-website (example website)
- ticket-issuer-website (example website)
example localhost token:
key: dcTokens value: [{"token":"MIGWMA0MATYCBWE3ap3-AgEABEEEKJZVxMEXbkSZZBWnNUTX_5ieu8GUqf0bx_a0tBPF6QYskABaMJBYhDOXsmQt3csk_TfMZ2wdmfRkK7ePCOI2kgNCAOOZKRpcE6tLBuPbfE_SmwPk2wNjbj5vpa6kkD7eqQXvBOCa0WNo8dEHKvipeUGZZEWWjJKxooB44dEYdQO70Vgc","secret":"45845870684","id":"mah@mah.com","magic_link":"http://localhost:3002/?ticket=MIGWMA0MATYCBWE3ap3-AgEABEEEKJZVxMEXbkSZZBWnNUTX_5ieu8GUqf0bx_a0tBPF6QYskABaMJBYhDOXsmQt3csk_TfMZ2wdmfRkK7ePCOI2kgNCAOOZKRpcE6tLBuPbfE_SmwPk2wNjbj5vpa6kkD7eqQXvBOCa0WNo8dEHKvipeUGZZEWWjJKxooB44dEYdQO70Vgc&secret=45845870684&id=mah@mah.com"}]
token issuer websites:
- token-outlet-website
- token-overlay-website
The websites show how tokens can be consumed, where the token issuer websites are required by the token issuer to provide communication of the tokens to connected clients. These steps enable token negotiation of tokens as a client side solution (no backend required).
2. Next, within each of the website directories
run npm i
to install all of their dependancies.
run npm run start
to start them up.
3. First, navigate to the ticket issuer example in a browser and select a token
This emulates 'magic link' and stores a token locally in your browser.
4. You should now see the selected token/ticket in view
5. Next, navigate to the hotel bogota examples and interact with the website to see how the token can be applied
See the TokenProvider.js inside the active version and the App.js inside the passive version to examine the integration flows.
Please log any issues directly related to the examples here:
https://github.com/TokenScript/token-negotiator-examples
Please ensure to look at the README's inside each of the examples to help debug any issues faced.
Thanks for your support towards development of this technology.
Alchemynft info@alchemynft.org
We look forward to hearing your feedback.