Code Monkey home page Code Monkey logo

explorer-helpers's Introduction

explorer-helpers

Build 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 type async
Parameters none
Returns number 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 type sync
Parameters response object
a response to a grpc query
Returns formatted 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 type sync
Parameters response object
a response to a grpc query
Returns formatted 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 type sync
Parameters response object
a response to a grpc query
Returns formatted 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 type sync
Parameters response object
a response to a grpc query
Returns formatted 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 type sync
Parameters response object
a response to a grpc query
Returns formatted json
reformatted json object for browser display or element queries
var x = explorerHelpers.multisig(response)
console.log(x)

Tests

npm test

explorer-helpers's People

Contributors

dependabot[bot] avatar jplomas avatar randomshinichi avatar scottdonaldau avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.