Generates a namespace name import transaction. An optional step in namespace registration.
Resolves to the generated StacksTransaction
Generates a name preorder transaction. First step in registering a name. This transaction does not reveal the name that is about to be registered. And it sets the amount of STX to be burned for the registration.
Resolves to the generated StacksTransaction
Generates a namespace preorder transaction. First step in registering a namespace. This transaction does not reveal the namespace that is about to be registered. And it sets the amount of STX to be burned for the registration.
Resolves to the generated StacksTransaction
Generates a ready namespace transaction. Final step in namespace registration. This completes the namespace registration and makes the namespace available for name registrations.
Resolves to the generated StacksTransaction
Generates a name registration transaction. Second and final step in registering a name.
Resolves to the generated StacksTransaction
Generates a name renew transaction. This renews a name registration.
Resolves to the generated StacksTransaction
Generates a namespace reveal transaction. Second step in registering a namespace.
Resolves to the generated StacksTransaction
Generates a name revoke transaction. This revokes a name registration.
Resolves to the generated StacksTransaction
Generates a name transfer transaction. This changes the owner of the registered name.
Since the underlying NFT will be transferred, you will be required to add a post-condition to this transaction before broadcasting it.
Resolves to the generated StacksTransaction
Generates a name update transaction. This changes the zonefile for the registered name.
Resolves to the generated StacksTransaction
Check if name can be registered
that resolves to true if the operation succeeds
Get price of name registration in microstacks
that resolves to a BN object number of microstacks if the operation succeeds
Get price of namespace registration in microstacks
that resolves to a BN object number of microstacks if the operation succeeds
Generated using TypeDoc
@stacks/bns
A package for interacting with the BNS contract on the Stacks blockchain.
What is BNS?
The Blockchain Naming System (BNS) is a network system that binds Stacks usernames to off-chain state without relying on any central points of control.
Installation
Example Usages
Check availability
Check if name can be registered
Get name price
Get price of name registration in microstacks
Steps to register name
Send two transaction to secure a name, preorder and then register.
Preorder
Register
Transfer name
Transfer the ownership to other address
Update name
Generates a name update transaction. This changes the zonefile for the registered name.
Renew name
Generates a name renew transaction. This renews a name registration.
Revoke name
Generates a name revoke transaction. This revokes a name registration.