Skip to content
Dash client-side library for wallet payment/signing and application development. (Wallet, DAPI, Primitives, BLS, ...)
TypeScript JavaScript Shell
Branch: master
Clone or download
Alex-Werner and thephez fix(DPNS): error handling & type locator (#23)
* impr(contracts/.get): add try/catch on contract fetching

* impr(documents/.get): error handling

* fix(names/register): proper document type locator for dpns

* tests: give more time to init

* fix(DPNS): use local document.create method

* fix(documents/create): function as async for proper datacontract fetch

* style: improve file style (spaces)

Co-Authored-By: thephez <thephez@users.noreply.github.com>

Co-authored-by: thephez <thephez@users.noreply.github.com>
Latest commit 89118bd Jan 17, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
docs doc: Update _sidebar.md (#20) Jan 16, 2020
examples doc: adjust documentation to changes and add additional information (#17 Jan 7, 2020
scripts chore: Enable tag based deploy pipeline (#18) Jan 7, 2020
src fix(DPNS): error handling & type locator (#23) Jan 17, 2020
tests fix(DPNS): error handling & type locator (#23) Jan 17, 2020
typings impr: typings of dashcore-lib as module Oct 25, 2019
.gitignore feat: implement contracts, documents, names fetch/reg. (#10) Jan 2, 2020
.npmignore chore: added travis deployment script (#7) Dec 30, 2019
.travis.yml chore: Use latest Travis dist bionic (#19) Jan 7, 2020
CODE_OF_CONDUCT.md A few more wording fixes Dec 12, 2019
CONTRIBUTING.md docs: clarifications to Contributing doc Dec 12, 2019
LICENSE
README.md doc: adjust documentation to changes and add additional information (#17 Jan 7, 2020
nodemon.json feat: basic interface Sep 24, 2019
package-lock.json doc: adjust documentation to changes and add additional information (#17 Jan 7, 2020
package.json chore: Enable tag based deploy pipeline (#18) Jan 7, 2020
tsconfig.json feat: Evonet - Identity registration + fetching (#6) Dec 30, 2019
webpack.config.js

README.md

DashJS

Package Version Build Status

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

DashJS 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 in the :

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 DashJS = require("dash");

const sdk = new DashJS.SDK({
  network: "testnet",
  mnemonic: "arena light cheap control apple buffalo indicate rare motor valid accident isolate",
});

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

Dependencies

DashJS 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 DashJS 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.

You can’t perform that action at this time.