solana_name_service 0.2.1 copy "solana_name_service: ^0.2.1" to clipboard
solana_name_service: ^0.2.1 copied to clipboard

A dart implementation of Bonfida's decentralized naming service built on Solana.

Twitter Follow Discord

Dart library for Bonfida SNS #

This library is a partial dart implementation of Bonfida's SNS (Solana Name Service) protocol, specifically enabling the use of .sol domains in Flutter applications.

Implementation #

  1. Find all Bonfida SNS name registration accounts for a given user

    final List<PublicKey> accounts = await findOwnedNameAccountsForUser(
        publicKey: PublicKey, // user account to query
        { environment: SolanaEnvironment } // defaults to mainnnet
    );
    
  2. Return a given user's SNS domain name

    final String name = await fetchSolanaNameServiceName(
        publicKey: String, // user account to query as a string
        { environment: SolanaEnvironment } // defaults to mainnnet
    );
    
  3. Return a given user's favorite SNS domain name

    final String name = await findFavoriteDomainName(
        publicKey: PublicKey, // user account to query
        { environment: SolanaEnvironment } // defaults to mainnnet
    );
    
  4. Return an SNS domain name owner's public key

    final PublicKey publicKey = await findAccountByName(
        name: String, // SNS domain name
        { environment: SolanaEnvironment } // defaults to mainnnet
    );
    
  5. Return the SNS domain name associated with a given SNS name registration account

    final String name = await performReverseLookup(
        account: PublicKey, // SNS name registration account to query
        { environment: SolanaEnvironment } // defaults to mainnnet
    );
    

Further Help & Documentation #

We will continue to update documentation as often as possible. But if you need help, feel free to reach out in our Dialect Discord server.

1
likes
110
points
4
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A dart implementation of Bonfida's decentralized naming service built on Solana.

Repository (GitHub)

License

Apache-2.0 (license)

Dependencies

borsh, borsh_annotation, build_runner, crypto, flutter, solana

More

Packages that depend on solana_name_service