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

@burstjs/core

Package Overview
Dependencies
Maintainers
2
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@burstjs/core

Burst-related functions and models for building Burstcoin applications.

  • 0.0.14
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
63
increased by1160%
Maintainers
2
Weekly downloads
 
Created
Source

@burstjs/core

Burst-related functions and models for building Burstcoin applications.

Installation

Install using npm:

npm install @burstjs/core

or using yarn:

yarn add @burstjs/core

API Reference

BurstService

Generic BRS Web Service class. Extend and specific services here

Kind: global class

new BurstService(baseUrl, relativePath, httpClient)

Creates Service instance

ParamTypeDescription
baseUrl

The host url of web service

relativePath

The relative path will be prepended before each url created with toBRSEndpoint()

httpClientHttp

If passed an client instance, it will be used instead of default HttpImpl. Good for testing.

burstService.http ⇒

Kind: instance property of BurstService
Returns:

The internal Http client


burstService.toBRSEndpoint(method, data) ⇒

Mounts a BRS conform API endpoint of format <host>?requestType=getBlock&height=123

Kind: instance method of BurstService
Returns:

The mounted url (without host)


See: https://burstwiki.org/wiki/The_Burst_API

ParamDescription
method

The method name for requestType

data

A JSON object which will be mapped to url params

burstService.query(method, args) ⇒

Requests a query to BRS

Kind: instance method of BurstService
Returns:

The response data of success


Throws:

  • HttpError in case of failure

ParamDescription
method

The BRS method according https://burstwiki.org/wiki/The_Burst_API

args

A JSON object which will be mapped to url params

burstService.send(method, args) ⇒

Send data to BRS

Kind: instance method of BurstService
Returns:

The response data of success


Throws:

  • HttpError in case of failure

ParamDescription
method

The BRS method accordinghttps://burstwiki.org/wiki/The_Burst_API#Create_Transaction. Note that there are only a few POST methods

args

A JSON object which will be mapped to url params

FAQs

Package last updated on 05 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