Skip to content

SmartTokenLabs/token-negotiator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9838e45 Β· May 6, 2024
Oct 30, 2023
Feb 13, 2023
May 23, 2023
Dec 2, 2021
Feb 15, 2023
Mar 2, 2023
Oct 22, 2023
May 18, 2023
Jan 10, 2023
Mar 21, 2023
Jul 24, 2022
Sep 11, 2023
Sep 19, 2022
Jan 19, 2023
Jul 31, 2023
Oct 24, 2023
May 12, 2022
Nov 1, 2022
May 6, 2024
May 25, 2022
May 6, 2024
May 6, 2024
May 23, 2023
Oct 30, 2023
Oct 20, 2023
Jul 26, 2023
Jan 10, 2023
Mar 29, 2023
Sep 24, 2021
May 31, 2023

Repository files navigation

token-negotiator

Token Negotiator is an open source technology that enables you build web experiences for users around the tokens, collectibles, coins and attestations they hold. Enabled across EVM, Solana, Flow, Chiliz and EOS (Ultra). Create logic flows to enable personalized 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", ({ selectedTokens, selectedIssuerKeys }) => {
	console.log('user selected tokens: ', selectedTokens);
});
​

Documentation

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