solana_token_list 0.0.3+2 copy "solana_token_list: ^0.0.3+2" to clipboard
solana_token_list: ^0.0.3+2 copied to clipboard

Solana Token Registry is a package that allows application to query for list of tokens.

Solana Token Registry is a package that allows application to query for list of tokens. The JSON schema for the tokens includes: chainId, address, name, decimals, symbol, logoURI (optional), tags (optional), and custom extensions metadata.

pub package

Using #

Token list is filterable by a tag

import 'package:solana_token_list/solana_token_list.dart';

void main() async {
    final list = (await TokenListStrategy().fetchTokenList(Strategy.static))
        .filterByChainEnv(ChainEnv.mainNetBeta)
        .filterByTag('nft');}

Token list can exclude by a tag

   final list = (await TokenListStrategy().fetchTokenList(Strategy.static))
     .filterByChainEnv(ChainEnv.mainNetBeta)
     .excludeByTag('nft');

Token list can exclude by a chain

    final list = (await TokenListStrategy().fetchTokenList(Strategy.static))
        .excludeByChainEnv(ChainEnv.mainNetBeta);

Token list returns object upon filter

    final list = await TokenListStrategy().fetchTokenList(Strategy.static);
    final filtered = list.filterByChainEnv(ChainEnv.mainNetBeta);

Token list is empty when calling filterByClusterSlug with slug that does not exist

    final list = await TokenListStrategy().fetchTokenList(Strategy.static);
    final filtered = list.filterByClusterSlug('whoop');
3
likes
130
points
37
downloads

Publisher

unverified uploader

Weekly Downloads

Solana Token Registry is a package that allows application to query for list of tokens.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

http, json_annotation, json_serializable

More

Packages that depend on solana_token_list