# @tokenscript/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 person

Latest version **3.2.0** (published 2023-10-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @tokenscript/token-negotiator
pnpm add @tokenscript/token-negotiator
yarn add @tokenscript/token-negotiator
bun add @tokenscript/token-negotiator
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.2.0 |
| Published | 2023-10-24 |
| First published | 2021-10-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 15 |
| Unpacked size | 800.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 19 |
| Author | Smart Token Labs |
| Maintainers | stj89, jf-stl, futantan, jot2re, micwallace, victor928, nicholastaras |
| Keywords | tokenScript, token-negotiator |

## Links

- npm: https://www.npmjs.com/package/@tokenscript/token-negotiator
- Repository: https://github.com/TokenScript/token-negotiator
- Homepage: https://github.com/TokenScript/token-negotiator#readme
- Issues: https://github.com/TokenScript/token-negotiator/issues
- npm.io page: https://npm.io/package/@tokenscript/token-negotiator

## Dependencies (15)

- [eosjs](https://npm.io/package/eosjs.md) ^22.1.0
- [ethers](https://npm.io/package/ethers.md) ^5.4.0
- [pvutils](https://npm.io/package/pvutils.md) ^1.0.17
- [eosjs-ecc](https://npm.io/package/eosjs-ecc.md) ^4.0.7
- [tweetnacl](https://npm.io/package/tweetnacl.md) ^1.0.3
- [@onflow/fcl](https://npm.io/package/@onflow/fcl.md) ^1.3.2
- [@onflow/types](https://npm.io/package/@onflow/types.md) ^1.0.5
- [text-encoding](https://npm.io/package/text-encoding.md) ^0.7.0
- [web3-eth-accounts](https://npm.io/package/web3-eth-accounts.md) ^1.7.4
- [@walletconnect/types](https://npm.io/package/@walletconnect/types.md) ^2.1.5
- [@peculiar/asn1-schema](https://npm.io/package/@peculiar/asn1-schema.md) ^2.2.0
- [@toruslabs/torus-embed](https://npm.io/package/@toruslabs/torus-embed.md) ^2.2.5
- [@tokenscript/attestation](https://npm.io/package/@tokenscript/attestation.md) 0.7.0-rc.2
- [@walletconnect/qrcode-modal](https://npm.io/package/@walletconnect/qrcode-modal.md) ^1.8.0
- [@walletconnect/universal-provider](https://npm.io/package/@walletconnect/universal-provider.md) ^2.4.5

## Recent versions

- 3.2.0 (latest) — 2023-10-24
- 2.4.4-rc (next) — 2023-03-28
- 2.2.0-cc.1 (cc) — 2022-11-07
- 2.2.0-dc.13 (dc) — 2022-10-08
- 3.1.1 — 2023-09-22
- 3.1.0 — 2023-09-21
- 3.0.2 — 2023-09-08
- 3.0.1 — 2023-08-29
- 3.0.0 — 2023-08-18
- 2.7.1 — 2023-06-09
- 2.7.0 — 2023-05-25
- 2.6.0 — 2023-05-18
- 2.5.0 — 2023-04-14
- 2.4.3 — 2023-03-23
- 2.4.2 — 2023-03-20
- … 77 more at https://npm.io/package/@tokenscript/token-negotiator/versions

## README

# `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

```js

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/

---
_Source: https://npm.io/package/@tokenscript/token-negotiator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
