C
C
Community Help Center
Search…
English
Community Help Center
Overview
Tokenomics
$FIDA Supply
Buy & Burn Program
Governance
Bonfida DAO
On-Chain Staking
Introduction
How to Stake
Naming Service
An introduction to the Solana Name Service
Solana Name Service — Twitter
How to Become a Certified Seller on the Solana Name Service
Certified Emojis
Domain Name Tokenization
How to change the Avatar on your Solana Name Service Profile
How To Create A Solana Domain Name 👋
⏲ Direct Registration System
Bid on a domain 📈
Cancel My Bid ⛔
My Auctions
Domain Size
Edit Domain Content
Selling domain names
Favorites
Cancel Domain Resales
Subdomains
SNS & IPFS Hosting
Integration
List of integrations
DNS record specification
Sollet Integration
Variation Selector
Audaces Perpetuals
Step by step user guide
Vaults (User Accounts)
Place Order
Edit Position
Liquidation
Fees
White Paper
What is a Virtual AMM?
Creating a Market
Host a UI
Referral Program
How to setup a Cranker
Node
Funding
Jabber - On-Chain Messaging Service
Overview
Set Up Your Messaging App
Customize Your Profile
Send a Message
Serum DEX
General
Token Swap
Token Vesting Contract
Introduction
Unlocking Tokens
Creating a vesting contract
Bonfida Bots
TradingView & Bonfida Bots
Creating a Bot
Find a Strategy to Follow
JS Library
FAQ
Bug Bounty
Overview
Reporting, Rules & Rewards
Powered By
GitBook
Integration
The JS library is available on NPM
https://www.npmjs.com/package/@solana/spl-name-service
Resolve a Twitter handle
Direct look up
To resolve the public key associated to a Twitter handle
1
const pubkey = await getTwitterRegistry(connection, twitterHandle);
Copied!
Reverse look up
To resolve the Twitter handle associated to the public key
1
const [twitterHandle] = await getHandleAndRegistryKey(
2
connection,
3
pubkey
4
);
Copied!
Resolve a .sol domain name
To resolve the public key associated to a
.sol
domain name
1
// Address of the SOL TLD
2
export const SOL_TLD_AUTHORITY = new PublicKey(
3
"58PwtjSDuFHuUkYjH9BYnnQKHfwo9reZhC2zMJv9JPkx"
4
);
5
6
7
export const getInputKey = async (input: string) => {
8
let hashed_input_name = await getHashedName(input);
9
let inputDomainKey = await getNameAccountKey(
10
hashed_input_name,
11
undefined,
12
SOL_TLD_AUTHORITY
13
);
14
return { inputDomainKey: inputDomainKey, hashedInputName: hashed_input_name };
15
};
16
17
18
// ...
19
const { inputDomainKey } = await getInputKey(input);
20
const registry = await NameRegistryState.retrieve(
21
connection,
22
inputDomainKey
23
);
Copied!
Previous
SNS & IPFS Hosting
Next
List of integrations
Last modified
10mo ago
Copy link
Contents
Resolve a Twitter handle
Resolve a .sol domain name