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');

Libraries

solana_token_list