Dash CoreDash PlatformDash.orgDash User DocsLog In

Dashcore Lib Primitives


New site!

All content has been migrated to You will be automatically redirected momentarily.

Dashcore Lib primitives

All Dashcore lib primitives are exposed via the Core namespace.

const Dash = require('dash');
const {
  Core: {
    // ...
} = Dash;


The Transaction primitive allows creating and manipulating transactions. It also allows signing transactions with a private key.
Supports fee control and input/output access (which allows passing a specific script).

const { Transaction } = Dash.Core;
const tx = new Transaction(txProps)

Access the Transaction documentation on dashpay/dashcore-lib


Standardized representation of a Dash Address. Address can be instantiated from a String, PrivateKey, PublicKey, HDPrivateKey or HdPublicKey.
Pay-to-script-hash (P2SH) multi-signature addresses from an array of PublicKeys are also supported.

const { Address } = Dash.Core;

Access the Address documentation on dashpay/dashcore-lib


Given a binary representation of the block as input, the Block class allows you to have a deserialized representation of a Block or its header. It also allows validating the transactions in the block against the header merkle root.

The block's transactions can also be explored by iterating over elements in array (block.transactions).

const { Block } = Dash.Core;

Access the Block documentation on dashpay/dashcore-lib


Representation of an UnspentOutput (also called UTXO as in Unspent Transaction Output).
Mostly useful in association with a Transaction and for Scripts.

const { UnspentOutput } = Dash.Core.Transaction;

Access the UnspentOutput documentation on dashpay/dashcore-lib


Hierarchical Deterministic (HD) version of the PublicKey.
Used internally by Wallet-lib and for exchange between peers (DashPay)

const { HDPublicKey } = Dash.Core;`

Access the HDKeys documentation on dashpay/dashcore-lib


Hierarchical Deterministic (HD) version of the PrivateKey.
Used internally by Wallet-lib.

const { HDPrivateKey } = Dash.Core;

Access the HDKeys documentation on dashpay/dashcore-lib


const { PublicKey } = Dash.Core;

Access the PublicKey documentation on dashpay/dashcore-lib


const { PrivateKey } = Dash.Core;

Access the PrivateKey documentation on dashpay/dashcore-lib


Implementation of BIP39 Mnemonic code for generative deterministic keys.
Generates a random mnemonic with the chosen language, validates a mnemonic or returns the associated HDPrivateKey.

const { Mnemonic } = Dash.Core;

Access the Mnemonic documentation on dashpay/dashcore-lib


A representation of the internal parameters relative to the selected network. By default, all primitives works with 'livenet'.

const { Network } = Dash.Core;

Access the Network documentation on dashpay/dashcore-lib


const { Script } = Dash.Core.Transaction;

Access the Script documentation on dashpay/dashcore-lib


const { Input } = Dash.Core.Transaction;

Access the Transaction documentation on dashpay/dashcore-lib


const { Output } = Dash.Core.Transaction;

Access the Transaction documentation on dashpay/dashcore-lib