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
-
Find all Bonfida SNS name registration accounts for a given user
final List<PublicKey> accounts = await findOwnedNameAccountsForUser( environment: SolanaEnvironment, // mainnet | devnet | localnet publicKey: PublicKey // user account to query );
-
Return a given user’s SNS domain name
final String name = await fetchSolanaNameServiceName( environment: SolanaEnvironment, // mainnet | devnet | localnet publicKey: String // user account to query as a string );
-
Return a given user’s favorite SNS domain name
final String name = await findFavoriteDomainName( environment: SolanaEnvironment, // mainnet | devnet | localnet publicKey: PublicKey // user account to query );
-
Return the SNS domain name associated with a given SNS name registration account
final String name = await performReverseLookup( environment: SolanaEnvironment, // mainnet | devnet | localnet account: PublicKey // SNS name registration account to query );
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.