Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dash

Package Overview
Dependencies
Maintainers
3
Versions
364
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dash

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

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.3K
decreased by-7.29%
Maintainers
3
Weekly downloads
 
Created
Source

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 @dashevo/dashjs in your terminal.

npm install @dashevo/dashjs

CDN Standalone

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

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

Usage

import DashJS from "@dashevo/dashjs"; 
import schema from "./schema.json";

const network = "testnet";
const opts = {
    network,
    mnemonic: "arena light cheap control apple buffalo indicate rare motor valid accident isolate",
    schema
};
const sdk = new DashJS.SDK(opts);
const account = sdk.wallet.getAccount();
async function sendPayment(){
    const txOpts = {recipient:{address:'yLptqWxjgTxtwKJuLHoGY222NnoeqYuN8h', amount:0.12}};
    const tx = await account.createTransaction(txOpts)
    console.log(tx)
}

async function readDocument() {
    const profile = await sdk.platform.fetchDocuments('profile',{name:'Bob'})
    console.log(profile);
}

In a nutshell

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.

FAQs

Package last updated on 30 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc