Getting Started with NFT's
Quick Set Up
npm i @tokenscript/token-negotiator<div class="overlay-tn"></div>import { Client } from "@tokenscript/token-negotiator";
import "@tokenscript/token-negotiator/dist/theme/style.css";
// configuration
const negotiator = new Client({
type: "active",
issuers: [
{
blockchain: "evm",
onChain: true,
collectionID: "expansion-punks",
contract: "0x0d0167a823c6619d430b1a96ad85b888bcf97c37",
chain: "eth",
}
],
uiOptions: {
openingHeading: "Connect your NFT to access custom content and more.",
issuerHeading: "Get discount with token",
repeatAction: "try again",
theme: "light",
position: "bottom-right",
},
});
// invoke
negotiator.negotiate();
// event hooks
negotiator.on("tokens-selected", ({ selectedTokens, selectedIssuerKeys }) => {
console.log('owner tokens', selectedTokens);
});
Join the Community
Last updated