Skip to content

Latest commit

 

History

History
40 lines (33 loc) · 912 Bytes

README.md

File metadata and controls

40 lines (33 loc) · 912 Bytes

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/