npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@xchainjs/xchain-dash

v2.2.10

Published

Custom Dash client and utilities used by XChainJS clients

Readme

@xchainjs/xchain-dash

Modules

  • client - Custom client for communicating with Dash using BIP39, bitcoinjs-lib, and @dashevo/dashcore-lib
  • clientKeystore - Keystore-based client (Client default export alias)
  • clientLedger - Ledger hardware wallet client

Installation

yarn add @xchainjs/xchain-dash

Following peer dependencies have to be installed into your project. These are not included in @xchainjs/xchain-dash.

yarn add @xchainjs/xchain-client @xchainjs/xchain-crypto @xchainjs/xchain-util @xchainjs/xchain-utxo @xchainjs/xchain-utxo-providers axios bitcoinjs-lib

Usage

import { Client, defaultDashParams, AssetDASH } from '@xchainjs/xchain-dash'
import { Network } from '@xchainjs/xchain-client'
import { assetToBase, assetAmount } from '@xchainjs/xchain-util'

const client = new Client({
  ...defaultDashParams,
  network: Network.Mainnet,
  phrase: 'your mnemonic phrase',
})

const address = await client.getAddressAsync()
const balances = await client.getBalance(address)

const txHash = await client.transfer({
  asset: AssetDASH,
  recipient: 'X...',
  amount: assetToBase(assetAmount('1', 8)),
})

Service Providers

This package uses the following service providers:

| Function | Service | Notes | | --------------------------- | ----------- | -------------------------------------------------- | | Balances / UTXOs | BlockCypher | https://api.blockcypher.com/v1 | | Transaction fees | BitGo | https://app.bitgo.com | | Transaction broadcast | Insight API | https://insight.dash.org/insight-api | | Explorer | Blockchair | https://blockchair.com/dash |

Default providers

Creating a no-arg DASH Client will default to the following settings:

const defaultDashParams: UtxoClientParams = {
  network: Network.Mainnet,
  phrase: '',
  explorerProviders: explorerProviders,
  dataProviders: [BlockcypherDataProviders, BitgoProviders],
  rootDerivationPaths: {
    [Network.Mainnet]: `m/44'/5'/0'/0/`,
    [Network.Stagenet]: `m/44'/5'/0'/0/`,
    [Network.Testnet]: `m/44'/1'/0'/0/`,
  },
  feeBounds: {
    lower: LOWER_FEE_BOUND,
    upper: UPPER_FEE_BOUND,
  },
  nodeUrls: {
    [Network.Mainnet]: 'https://insight.dash.org/insight-api',
    [Network.Stagenet]: 'https://insight.dash.org/insight-api',
    [Network.Testnet]: 'http://insight.testnet.networks.dash.org:3001/insight-api',
  },
}

Note: BlockCypher is the default online data provider (to fetch realtime UTXOs, balances, etc), with BitGo as a secondary provider.

Overriding providers

You can specify your own array of providers, which will be executed in array order, to provide automated failover to subsequent providers if calls to the first providers fail.

import { Client, defaultDashParams, BlockcypherDataProviders, BitgoProviders } from '@xchainjs/xchain-dash'
import { Network, UtxoClientParams } from '@xchainjs/xchain-client'

// or set in env variables so default config can access.
// `BLOCKCYPHER_API_KEY={YOUR_BLOCKCYPHER_API_KEY}`
// process.env.BLOCKCYPHER_API_KEY

const initParams: UtxoClientParams = {
  ...defaultDashParams,
  dataProviders: [BlockcypherDataProviders, BitgoProviders],
  phrase: process.env.PHRASE,
}
const dashClient = new Client(initParams)

Documentation

More information about XChainJS clients can be found on documentation