Socket
Socket
Sign inDemoInstall

@theqrl/explorer-helpers

Package Overview
Dependencies
24
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @theqrl/explorer-helpers

Helper utilities to reuse QRL blockchain explorer elements


Version published
Maintainers
1
Install size
12.0 MB
Created

Readme

Source

explorer-helpers

Build Status Coverage Status npm version

A helper library for front end interfaces to the QRL

v2 API functions are documented below. Legacy API calls to this module remain functional.

Installation

npm install @theqrl/explorer-helpers

Usage

var explorerHelpers = require("@theqrl/explorer-helpers")

(or import equivalent in Meteor)

qrlPrice() => price number

Queries Bittrex market price of $QRL.

Description
Function typeasync
Parametersnone
Returnsnumber price: price per $QRL in USD
var x = await explorerHelpers.qrlPrice()
console.log(`1 QRL = $${x}`)

RunKit example

tx(response json) => formatted json

Takes a grpc query response and formats it for browser display.

Description
Function typesync
Parametersresponse object
a response to a grpc query
Returnsformatted json
reformatted json object for browser display or element queries
var x = explorerHelpers.tx(response)
console.log(x)

block(response json) => formatted json

Takes a grpc query response from GetObject and formats it for browser display where the requested data was a block.

Description
Function typesync
Parametersresponse object
a response to a grpc query
Returnsformatted json
reformatted json object for browser display or element queries
var x = explorerHelpers.block(response)
console.log(x)

a(response json) => formatted json

Takes a grpc query response from GetObject and formats it for browser display where the requested data was an address.

Description
Function typesync
Parametersresponse object
a response to a grpc query
Returnsformatted json
reformatted json object for browser display or element queries
var x = explorerHelpers.a(response)
console.log(x)

tokens(response json) => formatted json

Takes a grpc query response from GetTokensByAddress and formats it for browser display.

Description
Function typesync
Parametersresponse object
a response to a grpc query
Returnsformatted json
reformatted json object for browser display or element queries
var x = explorerHelpers.tokens(response)
console.log(x)

multisig(response json) => formatted json

Takes a grpc query response from GetMultiSigAddressesByAddress and formats it for browser display.

Description
Function typesync
Parametersresponse object
a response to a grpc query
Returnsformatted json
reformatted json object for browser display or element queries
var x = explorerHelpers.multisig(response)
console.log(x)

Tests

npm test

FAQs

Last updated on 24 Jun 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc