Skip to content

The token-negotiator is an NPM package designed for use with TokenScript.

License

Notifications You must be signed in to change notification settings

SmartLayer/token-negotiator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

token-negotiator

The Token Negotiator provides the client gateway to connect user digital tokens from on or off chain sources, enabling developers to create bespoke tokenised web experiences.

Usage

import { Client } from "@tokenscript/token-negotiator";
import "@tokenscript/token-negotiator/dist/theme/style.css";
​	​
const negotiator = new Client({
	type: "active",
	issuers: [
		{
			blockchain: "evm",
			onChain: true,
			collectionID: "cool-cats",
			contract: "0x1a92f7381b9f03921564a437210bb9396471050c",
			chain: "eth",
		}
	],
	uiOptions: {
		openingHeading: "Connect your Cool Cats NFT for a VIP experience.",
		issuerHeading: "Get discount with token"
	},
});
​​
negotiator.negotiate();
​	​
negotiator.on("tokens-selected", (tokens) => {
	console.log('owner tokens found: ', tokens);
});

Documentation

See https://tokenscript.gitbook.io/token-negotiator/

About

The token-negotiator is an NPM package designed for use with TokenScript.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 85.0%
  • SCSS 7.7%
  • HTML 5.8%
  • JavaScript 1.5%