Issuer Configuration Ultra

Token Negotiator issuer configuration Ultra

Parameters to create a configuration for Ultra token collections.

ParameterTypeDetailsOptions

onChain

boolean

defines if the collection is on or off chain. Set this value to true.

true | false

collectionID

string

a unique string identifier for your usage (this will be the name space your tokens are kept)

string

contract

string

smart contract address of the collection

string

chain

string

the network of the blockchain (refer to supported Chains page)

string

factoryId

number

collection identifier

string

blockchain

string

set to 'ultra'

string

Non Fungible Token example issuer configuration:

const onChainIssuer = {
	blockchain: "ultra",
	onChain: true,
	collectionID: "ultranft",
	contract: "eosio.nft.ft", // static
	chain: "testnet", // testnet or mainnet
        factoryId: 2669 // NFT collection
};

Example use

import { Client } from "@tokenscript/token-negotiator";
import "@tokenscript/token-negotiator/dist/theme/style.css";

// configuration

const negotiator = new Client({
	type: "active",
	issuers: [
		{
			blockchain: "ultra",
			onChain: true,
			collectionID: "ultranft",
			contract: "eosio.nft.ft", // static
			chain: "testnet", // testnet or mainnet
		        factoryId: 2669 // NFT collection
		}
	],
	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", (tokens) => {
	console.log('owner tokens', tokens);
});

Resource Links 🔗

Please note: To utilise Token Negotiators implementation for Ultra please install Ultra's Wallet Chrome extension.

Last updated