Token Negotiator
  • Introduction
  • Quick Start
    • Getting Started with NFT's
    • Getting Started with Fungible Tokens
    • Getting Started with Off Chain Tokens
  • Learn
    • Installation
    • Supported Chains
    • Supported Wallets
    • Supported Attestations
    • Event Hooks
    • Issuer Configurations
      • Issuer Configuration EVM
      • Issuer Configuration Solana
      • Issuer Configuration Flow
      • Issuer Configuration Ultra
      • Issuer Configuration Socios
      • Issuer Configuration Off Chain
    • Active Negotiation (UI)
      • Custom Views
      • View Navigation
      • Theme
      • Configuration Options
    • Passive Negotiation (no UI)
      • Wallet Connection
    • Token Authentication
      • Off Chain Authentication
      • On Chain Token Authentication (evm)
    • Smart Contract and wallet Interaction
      • Sign message
    • Off Chain Token Issuers
  • Reference
  • Articles
  • Videos
  • Showcase
  • Contribution
  • Support
  • Migrating from version 2x to 3x
  • Github Examples
Powered by GitBook
On this page
  1. Learn

Installation

Installing Token Negotiator

PreviousLearnNextSupported Chains

Last updated 1 year ago

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

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.

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 or via sayhi@smarttokenlabs.com

https://www.npmjs.com/package/@tokenscript/token-negotiator
https://tokenscript.github.io/token-negotiator/v3.1.1/theme/style.css
https://tokenscript.github.io/token-negotiator/v3.1.1/negotiator.js
discord