Installation

Installing Token Negotiator

Token Negotiator has been designed to be used within a Node JS / NPM development workflow or with a UMD version of the library (supports any development pipeline).

NPM

npm i @tokenscript/token-negotiator

https://www.npmjs.com/package/@tokenscript/token-negotiator

UMD

For use when working outside Node JS development environments. Adjust the version in the URL /3.1.1 accordingly to target the version required.

https://tokenscript.github.io/token-negotiator/v3.1.1/theme/style.css

https://tokenscript.github.io/token-negotiator/v3.1.1/negotiator.js

Example usage

<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>My Tokenised Web Application</title>
  <script type="text/javascript" src="
https://tokenscript.github.io/token-negotiator/v3.1.1/negotiator.js
"></script>
  <link rel="stylesheet" href="
https://tokenscript.github.io/token-negotiator/v3.1.1/theme/style.css
" />
</head>
<body onload="init()">
  <div class="overlay-tn"></div>
  <script>
    function init() {
      window.negotiator = new negotiator.Client({
        type: "active",
        issuers: [
          {
            collectionID: "NBA",
            onChain: true,
            contract: "A.0b2a3299cc857e29.TopShot",
            chain: "mainnet",
            blockchain: "flow"
          }
        ],
        uiOptions: {
          openingHeading: "Open a new world of perks with your NBA collectibles.",
          issuerHeading: "Your NBA Tokens",
          position: "top-right"
        },
      });
    }
</body>

For support and any questions please reach out to us on discord or via sayhi@smarttokenlabs.com

Last updated