npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@edns/sdk

v1.3.2

Published

[![gitbook](https://img.shields.io/badge/SDK-Document-blueviolet)](https://master-chit-chit.gitbook.io/edns-sdk-on-npm/) [![github](https://img.shields.io/badge/Git-Repo-inactive)](https://github.com/ednsdomains/Edns-sdk)

Downloads

46

Readme

Edns-sdk

gitbook github

All action that uses Write function/access requires the signer to be the domain holder.

Record

NFT Record


Token Address Record

A Getter and Setter function that allows domain owners to add wallet addresses to their domain name records. Users can look up a domain name and find different wallet adresses to send relevant tokens to.

Lookup Address (Getter)

In this example, users can type in the domain "apexlegend.404" to look up the linked ETH wallet.

import {LookupAddress} from "@edns/sdk";
const cryptocurrencies = "ETH"
const domain = "apexlegend.404"
const ethWalletAddress = await LookupAddress(domain,cryptocurrencies)

Write Address (Setter)

In this example, holder of ednsdomains2022.meta adds BTC wallet address (0x5d6fdbffd6dc6e8a0b69a52dbf010efd905fb7ad) record to their domain name.

import {LookupAddress} from "@edns/sdk";
const provider = await GetEdnsProvider();
//Any Provider or ethers.Signer
const walletWithProvider = new ethers.Wallet(process.env.privateKey, provider);
const domain = "ednsdomains2022.meta"
const cryptocurrencies = "BTC"
const address = "0x5d6fdbffd6dc6e8a0b69a52dbf010efd905fb7ad"
const transaction = await WriteAddress(domain,cryptocurrencies,address,walletWithProvider)

Text Record

Text Records for domain. [ EMAIL , URL , AVATAR , DESCRIPTION , NOTICE , KEYWORDS , DISCORD , GITHUB , REDDIT , TWITTER , TELEGRAM , DELEGATE ]

Lookup Text (Getter)

In this example, users can type in the domain "apexlegend.404" to look up the linked description.

import {LookUpText, TextType} from "@edns/sdk";
const domain = "apexlegend.404"
const record_DESCRIPTION = await LookUpText(domain,TextType.DESCRIPTION)

Write Text (Setter)

In this example, holder of ednsdomains2022.meta adds URL record to their domain name.

import {WriteText, TextType} from "@edns/sdk";
const provider = await GetEdnsProvider();
//Any Provider or ethers.Signer
const walletWithProvider = new ethers.Wallet(process.env.privateKey, provider);
const domain = "ednsdomains2022.meta"
const content = "https://github.com/ednsdomains/Edns-sdk"
const transaction = await WriteText(domain,TextType.GITHUB,content,walletWithProvider)

Reverse Domain

Lookup Reverse Domain (Getter)

In this example, users can type in the wallet address (0xCD58F85e6Ec23733143599Fe0f982fC1d3f6C12c) to look up the linked domain.

import {LookupDomainFromAddress} from "@edns/sdk";
const address = "0xCD58F85e6Ec23733143599Fe0f982fC1d3f6C12c"
const domain = await LookupDomainFromAddress(address);

Set Reverse Domain (Setter)

In this example, holder set ednsdomains2022.meta as default domain.

import {GetEdnsProvider, SetReverseDomain} from "@edns/sdk";
const provider = await GetEdnsProvider();
//Any Provider or ethers.Signer, Signer must be the domain owner
const walletWithProvider = new ethers.Wallet(process.env.privateKey, provider);
const domain = "ednsdomains2022.meta"
const transaction = await SetReverseDomain(domain,walletWithProvider)

Reclaim

This section of script syncs up the owner value with access control. It is an essential step after each domain transfer.

import {GetEdnsProvider, Reclaim} from "@edns/sdk";
const provider = await GetEdnsProvider();
//Any Provider or ethers.Signer
const walletWithProvider = new ethers.Wallet(process.env.privateKey, provider);
const domain = "ednsdomains2022.meta"
const tokenID = "87038691297541742301397823287250866758499370580712584317467914794075493188134"
const transaction = await Reclaim(domain,walletWithProvider,tokenID)