Nosey Party Murderer

    @waves/blocks-json-parser

    0.1.2 • Public • Published

    @waves/blocks-json-parser

    A package that parses blocks from Waves Node API into JS objects of the same shape, with the ability to preserve Long values and sanitize asset names.

    API

    parseBlock(blockText, [options]);
    • blockText a raw JSON string from API
    • options
      • long: a factory creating Long values from strings. For example, long.js or bignumber.js can be used.
      • assetId: a transform for fields containing asset IDs. By default, changes null values from API to 'WAVES'.

    Usage

    const parseBlock = require('@waves/blocks-json-parser');
    const Long = require('long');
    
    parseBlock(blocksText, { long: x => Long.fromString(x) });

    Keywords

    none

    Install

    npm i @waves/blocks-json-parser

    DownloadsWeekly Downloads

    4

    Version

    0.1.2

    License

    MIT

    Unpacked Size

    32.1 kB

    Total Files

    22

    Last publish

    Collaborators

    • vsuharnikov
    • gakhramanov
    • tsigel
    • ebceu4
    • vba2000
    • msmolyakov-waves
    • wavesadmin
    • dvshur
    • jlewka
    • kozhevnikov.peter
    • axepuff
    • okanishcheva
    • vladislav.petushkov
    • d.lobanov
    • emera1d