Skip to content

Latest commit

 

History

History
67 lines (43 loc) · 2.2 KB

README.md

File metadata and controls

67 lines (43 loc) · 2.2 KB

Dash SDK

Package Version Build Status

Dash library for JavaScript/TypeScript ecosystem (Wallet, DAPI, Primitives, BLS, ...)

Dash library allows you to transact on L1 or fetch/register documents on L2 within a single library, including management and signing of your documents.

Find more information in the Documentation.

Install

ES5/ES6 via NPM

In order to use this library, you will need to add it to your project as a dependency.

Having NodeJS installed, just type : npm install dash in your terminal.

npm install dash

CDN Standalone

For browser usage, you can also directly rely on unpkg :

<script src="https://unpkg.com/dash"></script>

Usage

const Dash = require("dash");

const client = new Dash.Client({
  network: "testnet",
  wallet: {
    mnemonic: "arena light cheap control apple buffalo indicate rare motor valid accident isolate",
  },
});

client.isReady().then(async () => {
  const {account, platform} = client;
  console.log("Funding address", account.getUnusedAddress().address);
  console.log("Confirmed Balance", account.getConfirmedBalance());
  console.log(await platform.names.get('alice'));
});

Dependencies

Dash SDK works using multiple dependencies that might interest you :

  • Wallet-Lib - Wallet management for handling, signing and broadcasting transactions (HD44).
  • Dashcore-Lib - Providing the main primitives (Block, Transaction,...).
  • DAPI-Client - Client library for accessing DAPI endpoints.
  • DPP - Implementation (JS) of Dash Platform Protocol.

Some features might be more extensive in those libs, as Dash SDK only wraps around them to provide a single interface that is easy to use (and thus has less features).

Licence

MIT © Dash Core Group, Inc.