1.1.8 • Published 2 years ago

sns-namechecker v1.1.8

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

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

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.20

2 years ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago