0.0.26 • Published 15 days ago

blastname-js v0.0.26

Weekly downloads
-
License
MIT
Repository
github
Last release
15 days ago

About The Blastname

Product Name Screen Shot

Welcome to BlastName, the first Domain Name System that generates native yield on Blast L2, optimizing capital efficiency for the Blast NFT ecosystem.

BlastName leverages ENS's standard for its domain processing system based on ENS's well-established track record, having passed stringent security audits and earning widespread adoption by major players in the blockchain space, with some adjustments to fit our model and project's goals.

We know it can be confusing for newcomers, so we've included a simple table below to explain the basics. Think of ENS like a phonebook for crypto wallets. Instead of using long, complex addresses "0x88eFda...566", you can use human-readable names like 'alice.eth'. This name points to your actual wallet address behind the scenes, making it easier to remember, share, and use your wallet address. You can also link your website, social media profiles, or even many other crypto addresses to your purchased domain name, making it a powerful tool for managing your online identity in the crypto world.

RegistryRegistrarsResolver
Core contractMerchant EntitiesTranslator program
Maintain central record of all domain namesSell and manage domains Act as intermediaries between users and the RegistryFacilitate the registration and renewal procesIssue domain NFTsTranslate human-readable names into machine-readable addressesStore additional data associated with the name, such as content hashes or links to websites
Controlled by DAO votingFollow a guidelineUnrestricted
Anyone can interactModification requires DAO's permissionAnyone can signup to become oneWill be revoked if violate guidelineUnrestricted

As the community grows, the DAO will gradually gain more influence over specific project decisions, starting with some limited adjustments during the upcoming quarterly vote. We believe this gradual transfer of control will empower the community, incentivize participation, and ensure the project's long-term success. We encourage all fans and community members to join our discussions and contribute to the DAO's formation.

Built With

BlastnameJs integrates ENS and supports all the ENSjs APIs, you will only need one unified SDK to integrate all domains on Blast L2.

Getting Started

Prerequisites

We recommend switching to Node.js Version 18 to make sure common crypto dependencies works.

  • npm
    npm install npm@latest -g

Setup

import ENS, { getEnsAddress } from 'blastname-js/ensjs'


const ens = new ENS({ provider, ensAddress: getEnsAddress('1') })

ens.name('0x.blast').getAddress() // 0x123

provider: https://web3js.readthedocs.io/

BlastnameJS interface

name(name: String) => Name

Returns a Name Object, that allows you to make record queries.

resolver(address: BlastAddress) => Resolver

Returns a Resolver Object, allowing you to query names from this specific resolver. Most useful when querying a different resolver that is different than is currently recorded on the registry. E.g. migrating to a new resolver

async getName(address: BlastAddress) => Promise<Name>

Returns the reverse record for a particular Blast address.

async setReverseRecord(name: Name) => Promise<EthersTxObject>

Sets the reverse record for the current Blast address

Name Interface

async getOwner() => Promise<BlastAddress>

Returns the owner/controller for the current Blastname.

async setOwner(address: BlastAddress) => Promise<Ethers>

Sets the owner/controller for the current Blastname.

async getResolver() => Promise<BlastAddress>

Returns the resolver for the current Blastname.

async setResolver(address: BlastAddress) => Promise<BlastAddress>

Sets the resolver for the current Blastname.

async getTTL() => Promise<Number>

Returns the TTL for the current Blastname.

async getAddress(coinId: String) => Promise<BlastAddress>

Returns the address for the current Blastname for the coinId provided.

async setAddress(coinId: String, address: BlastAddress) => Promise<EthersTxObject>

Sets the address for the current Blastname for the coinId provided.

async getContent() => Promise<ContentHash>

Returns the contentHash for the current Blastname.

async setContenthash(content: ContentHash) => Promise<EthersTxObject>

Sets the contentHash for the current Blastname.

async getText(key: String) => Promise<String>

Returns the text record for a given key for the current Blastname.

async setText(key: String, recordValue: String) => Promise<EthersTxObject>

Sets the text record for a given key for the current Blastname.

async setSubnodeOwner(label: String, newOwner: BlastAddress) => Promise<EthersTxObject>

Sets the subnode owner for a subdomain of the current Blastname.

async setSubnodeRecord(label: String, newOwner: BlastAddress, resolver: BlastAddress, ttl: ?Number) => Promise<EthersTxObject>

Sets the subnode owner, resolver, ttl for a subdomain of the current Blastname in one transaction.

 async createSubdomain(label: String) => Promise<EthersTxObject>

Creates a subdomain for the current Blastname. Automatically sets the owner to the signing account.

async deleteSubdomain(label: String) => Promise<EthersTxObject>

Deletes a subdomain for the current Blastname. Automatically sets the owner to "0x0..."

Resolver Interface

address

Static property that returns current resolver address

name(name) => Name

Returns a Name Object that hardcodes the resolver

Contact

Discord

Twitter

Reddit

Email

Project Link: https://github.com/blastnamedev/blastname-js