JSPM

@dashevo/dapi-client

0.13.0-dev.2
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 724
    • Score
      100M100P100Q104524F
    • License MIT

    Client library used to access Dash DAPI endpoints

    Package Exports

    • @dashevo/dapi-client

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@dashevo/dapi-client) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    DAPI Client

    Build Status GitHub Current Tag npm

    Client library used to access Dash DAPI endpoints

    Documentation

    This library enables HTTP-based interaction with the Dash blockchain and Dash Platform via the decentralized API (DAPI) hosted on Dash masternodes.

    • DAPI-Client provides automatic server (masternode) discovery using either a default seed node or a user-supplied one
    • DAPI-Client maps to DAPI's RPC and gRPC endpoints

    Table of Contents

    Install

    npm install @dashevo/dapi-client

    Usage

    Basic

    const DAPIClient = require('@dashevo/dapi-client');
    var client = new DAPIClient();
    
    client.getBalance('testaddress');

    Custom seed node

    Custom seed nodes are necessary for connecting the client to devnets since the client library is unaware of them otherwise.

    const DAPIClient = require('@dashevo/dapi-client');
    
    var client = new DAPIClient({
      seeds: [{
        service: 'example.com:9999',
        port: 3000
      }],
    });
    
    var blockHeight = client.getBestBlockHeight();

    Note: The seed node shown above (example.com) is an RFC 2606 example domain and does not represent an actual node.

    Contributing

    Feel free to dive in! Open an issue or submit PRs.

    License

    MIT © Dash Core Group, Inc.