Skip to main content

JavaScript SDK API Reference / Utilities

Utilities

Low-level name-account, reverse-lookup, and TLD utilities.

Type Aliases

Type AliasDescription
SupportedTldA top-level-domain suffix supported by SNS utilities.

Variables

VariableDescription
SNS_TLDThe SNS top-level-domain suffix.
SOL_TLDThe Solana Name Service top-level-domain suffix.
SUPPORTED_TLDSTLD suffixes accepted by the current SDK configuration.

Functions

FunctionDescription
checkThrows error unless bool is true, preserving its concrete SNS error type.
deserializeReverseDecodes an SNS reverse-lookup account payload into a domain name.
getArtistPubkeyReturns the public key associated with a custom background.
getCustomBgKeysDerives the name account keys for a custom background.
getHashedNameSyncHashes a name using the SNS name-service seed derivation.
getNameAccountKeySyncDerives a synchronous SPL Name Service account PDA from hashed name inputs.
getPythFeedAccountKeyDerives a Pyth push-oracle price-feed account address from its shard and feed ID.
getReverseKeyFromDomainKeyDerives the reverse lookup account for a domain account.
getReverseKeySyncDerives the reverse lookup account for a domain name.
getTldReturns the matching TLD from supportedTlds if domain ends with one, or undefined otherwise.
parseSnsTldValidates that domain ends with .sns, strips that suffix, and returns a [trimmedDomain, SNS_TLD] tuple.
parseSupportedTldValidates that domain ends with one of the supportedTlds, strips that suffix, and returns a [trimmedDomain, tld] tuple.

References

reverseLookup

Re-exports reverseLookup


reverseLookupBatch

Re-exports reverseLookupBatch