New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@stacks/bns

Package Overview
Dependencies
Maintainers
8
Versions
629
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stacks/bns

Library for working with the Stacks Blockchain Naming System BNS.

  • 2.0.1-beta.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
71
decreased by-77.32%
Maintainers
8
Weekly downloads
 
Created
Source

@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

npm install --save @stacks/bns

Example Usage

import { canRegisterName } from '@stacks/bns';
import { StacksTestnet } from '@stacks/network';

const network = new StacksMainnet();

const fullyQualifiedName = 'name.id';
const result = await canRegisterName({ fullyQualifiedName, network });
import { buildRegisterNameTX } from '@stacks/bns';
import { StacksTestnet } from '@stacks/network';

const network = new StacksMainnet();

const name = 'name.id';
const salt =  'example-salt'
const zonefile =  'example-zonefile'
const publicKey = 'SPF0324DSC4K505TP6A8C7GAK4R95E38TGNZP7RE'

// construct an unsigned bns register-name transaction
// note: builder functions build transactions with AnchorMode set to Any
const unsignedTX = await buildRegisterNameTX({ name, salt, zonefile, publicKey, network });

Keywords

FAQs

Package last updated on 06 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc