Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@burstjs/util

Package Overview
Dependencies
Maintainers
2
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@burstjs/util

Useful utilities and tools for building Burstcoin applications

  • 0.0.12
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
18
decreased by-28%
Maintainers
2
Weekly downloads
 
Created
Source

@burstjs/util

Useful utilities and tools for building Burstcoin applications

Installation

Install using npm:

npm install @burstjs/util

or using yarn:

yarn add @burstjs/util

API Reference

Constants

burstAddressPattern

A useful regex for matching burst addresses

Functions

constructBurstAddress(parts)

Construct a Burst address from a string array

convertNumberToString(n)

Helper method to Number to String(8 decimals) representation

convertStringToNumber(amount)

Helper method to convert a String to number

decode(address)

Decode BURST-XXXX-XXXX-XXXX-XXXXX into numeric Id

encode(numericId)

Encode a numeric id into BURST-XXXX-XXXX-XXXX-XXXXX

isBurstAddress(address)

Validation Check. Quick validation of Burst addresses included

isValid(address)

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

splitBurstAddress(address)

Split the Burst address string into an array of 4 parts

burstAddressPattern

A useful regex for matching burst addresses

Kind: global constant

constructBurstAddress(parts)

Construct a Burst address from a string array

Kind: global function

ParamDescription
parts

4 parts string array

convertNumberToString(n) ⇒

Helper method to Number to String(8 decimals) representation

Kind: global function
Returns:

a NQT number string

ParamDescription
n

the number

convertStringToNumber(amount) ⇒

Helper method to convert a String to number

Kind: global function
Returns:

A number expressed in Burst (not NQT)

ParamDescription
amount

The amount in NQT

decode(address)

Decode BURST-XXXX-XXXX-XXXX-XXXXX into numeric Id

Kind: global function

ParamDescription
address

The BURST address

encode(numericId)

Encode a numeric id into BURST-XXXX-XXXX-XXXX-XXXXX

Kind: global function

ParamDescription
numericId

The numeric Id

isBurstAddress(address)

Validation Check. Quick validation of Burst addresses included

Kind: global function

ParamDescription
address

Burst Address

isValid(address)

Check for valid Burst address (format: BURST-XXXX-XXXX-XXXX-XXXXX, XXXX-XXXX-XXXX-XXXXX)

Kind: global function

ParamDescription
address

The address

splitBurstAddress(address)

Split the Burst address string into an array of 4 parts

Kind: global function

ParamDescription
address

A valid Burst address

Keywords

FAQs

Package last updated on 04 Feb 2019

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