1.1.8 • Published 1 year ago
sns-namechecker v1.1.8
SNS-NameChecker
A library created to allow new dapp developers on Shibarium to integrate SNS. The functions allow to retrieve:
- The primary domain from an address
- The address that a domain belongs to
- The records (if set) of a domain
Installation
npm install sns-namechecker
Importing the library
import {
resolveName,
resolveAddress,
getRecord,
getNFTs,
} from "sns-namechecker";
Example Usage
const domain = await resolveAddress("elon"); // This returns an address from the domain name
const address = await resolveName("0x123456789101112131415"); // Returns a name from an address
const records = await getRecord("ryoshi"); // Returns the records of a domain
const nfts = await getNFTsByAddress(walletAddress); // Fetches all nfts the address owns
When rendering the image on the front end you will need to add the following as a prefix
"data:image/svg+xml;base64,":
since it returns raw svg data.
Example:
<img src={`data:image/svg+xml;base64,${image}`} />
To fetch all the nfts, recent nfts, total amount of nfts
const nftInfo = await fetchAllNFTs();
1.1.8
1 year ago
1.1.7
1 year ago
1.1.6
1 year ago
1.1.5
1 year ago
1.1.4
1 year ago
1.1.3
1 year ago
1.1.2
1 year ago
1.1.1
1 year ago
1.1.0
1 year ago
1.0.20
1 year ago
1.0.19
1 year ago
1.0.18
1 year ago
1.0.17
1 year ago
1.0.16
1 year ago
1.0.15
1 year ago
1.0.14
1 year ago
1.0.13
1 year ago
1.0.12
1 year ago
1.0.11
1 year ago
1.0.10
1 year ago
1.0.9
1 year ago
1.0.8
1 year ago
1.0.7
1 year ago
1.0.6
1 year ago
1.0.5
1 year ago
1.0.4
1 year ago
1.0.3
1 year ago
1.0.2
1 year ago
1.0.1
1 year ago
1.0.0
1 year ago