0.5.2 • Published 8 months ago

@infinityswapofficial/token-lists v0.5.2

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

TOKEN LIST

This package includes a JSON schema for Infinityswap's token lists, and TypeScript utilities for working with these token lists.

The JSON schema represents the technical specification for a token list that are supported on the Infinityswap platform. Current token standard supported are IS20, ICP.... Any addition of a token to this list gets validated against the JSON schema in the CI.

JSON Schema $id The JSON schema ID is https://infinityswap.one/tokenlist.schema.json

USAGE

import { TokenList } from '@infinityswap/token-list'

function usage() {

  // get currently listed tokens
  // takes an optional parameter env  ie ("testnet" | "prod")
  const list = await TokenList.create("testnet")

  // select TNK1 from the list
  const tkn1 = list.find(token => token.symbol === 'TKN1');

  // access TKN1 metadata
  tkn1.id;
  tkn1.name;
  tkn1.symbol;
  // ...etc


  // Load TKN1 canister specific info
  await tkn1.getCanisterInfo();

  // access info such as wasm hash, canister controllers
  tnk1.wasmHash;
  tkn1.controllers;

}
0.5.0

8 months ago

0.5.2

8 months ago

0.3.9

1 year ago

0.3.11

1 year ago

0.3.7

2 years ago

0.3.5

2 years ago

0.3.4

2 years ago

0.3.2

2 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.1.6

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.5

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago