1.1.8 • Published 3 years 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-namecheckerImporting the library
import {
resolveName,
resolveAddress,
getRecord,
getNFTs,
} from "sns-namechecker";Example Usage
const domain = await resolveAddress("elon"); // This returns an address from the domain nameconst address = await resolveName("0x123456789101112131415"); // Returns a name from an addressconst records = await getRecord("ryoshi"); // Returns the records of a domainconst nfts = await getNFTsByAddress(walletAddress); // Fetches all nfts the address ownsWhen 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
3 years ago
1.1.7
3 years ago
1.1.6
3 years ago
1.1.5
3 years ago
1.1.4
3 years ago
1.1.3
3 years ago
1.1.2
3 years ago
1.1.1
3 years ago
1.1.0
3 years ago
1.0.20
3 years ago
1.0.19
3 years ago
1.0.18
3 years ago
1.0.17
3 years ago
1.0.16
3 years ago
1.0.15
3 years ago
1.0.14
3 years ago
1.0.13
3 years ago
1.0.12
3 years ago
1.0.11
3 years ago
1.0.10
3 years ago
1.0.9
3 years ago
1.0.8
3 years ago
1.0.7
3 years ago
1.0.6
3 years ago
1.0.5
3 years ago
1.0.4
3 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago