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

ecash-quicksend

v2.1.0

Published

A unified transaction manager for eCash (XEC), SLP, and ALP token transactions

Readme

ecash-quicksend

Unified transaction manager for eCash (XEC), SLP, and ALP.

Installation

npm install ecash-quicksend

Setup

Environment Variables

This library does not load .env files automatically. If you use one, manage it with dotenv in your entry point:

import 'dotenv/config'; // or dotenv.config()
import { sendXec } from 'ecash-quicksend';

// Library will now pick up process.env.MNEMONIC

Manual Options

You can also pass mnemonic and chronik directly in the options object of any method.


Quick Start

All amounts in ecash-quicksend are specified in atoms (satoshis) using BigInt (e.g., 1000n).

Send XEC

import { sendXec } from 'ecash-quicksend';

const result = await sendXec(
  [{ address: 'ecash:q...', amount: 1000n }],
  { mnemonic: '...' } // Optional if MNEMONIC env var is set
);
console.log(result.txid);

Send Tokens (Unified SLP/ALP)

Protocol is automatically detected from UTXO data. No need to specify if it's SLP or ALP.

import { sendToken } from 'ecash-quicksend';

await sendToken(
  [{ address: 'ecash:q...', amount: 500n }],
  { 
    tokenId: '...', 
    mnemonic: '...' // Optional
  }
);

Agora DEX

Listing

List your tokens for sale on the decentralized exchange.

import { createAgoraOffer } from 'ecash-quicksend';

const result = await createAgoraOffer({
  tokenId: '...',
  tokenAmount: 1000n,
  pricePerToken: 5.5,
  mnemonic: '...' // Optional
});

Buying

Option 1: Market Buy (Auto-fill)

import { buyAgoraTokens } from 'ecash-quicksend';

const result = await buyAgoraTokens({
  tokenId: '...',
  amount: 5000n,
  maxPrice: 2.8,
  mnemonic: '...' // Optional
});

Option 2: Manual Buy (Query & Accept)

import { fetchAgoraOffers, acceptAgoraOffer } from 'ecash-quicksend';

// 1. Query offers for a token
const offers = await fetchAgoraOffers({
  tokenId: 'your-token-id',
  maxPrice: 2.5
});

/*
  offers returns Array<AgoraOffer> sorted by price:
  {
    offer: Object,
    pricePerToken: number,
    totalTokenAmount: bigint,
    totalXEC: number,
    offerType: string
  }
*/

// 2. Accept the best offer
const result = await acceptAgoraOffer(offers[0], {
  amount: 1000n,
  mnemonic: '...' // Optional
});

Management & Cancellation

import { fetchMyAgoraOffers, cancelAgoraOffer } from 'ecash-quicksend';

// 1. Fetch your active listings
const myOffers = await fetchMyAgoraOffers({
  mnemonic: '...' // Optional
});

// 2. Cancel a specific listing
const cancelResult = await cancelAgoraOffer(myOffers[0], {
  mnemonic: '...' // Optional
});

Options & Defaults

Common Options

| Parameter | Type | Description | Default | | :--- | :--- | :--- | :--- | | mnemonic | string | Wallet mnemonic | process.env.MNEMONIC | | chronik | ChronikClient | Custom Chronik instance | Default library instance | | addressIndex| number | HD wallet address index | 0 | | utxoStrategy | UtxoStrategy | XEC selection: all, minimal, largest_first | all | | feeStrategy | FeeStrategy | Fee selection: all, minimal, largest_first | all | | tokenStrategy | TokenStrategy | Token selection: all (merge), largest, minimal | all |


API Summary

  • sendXec(recipients, options): Send XEC to one or more addresses.
  • sendToken(recipients, options): Send tokens (auto-detects SLP/ALP).
  • createAgoraOffer(options): List tokens (SLP or ALP) for sale on Agora.
  • buyAgoraTokens(options): Market buy tokens up to a max price.
  • acceptAgoraOffer(offer, options): Buy from a specific Agora offer.
  • fetchAgoraOffers(options): List available offers for a token.
  • fetchMyAgoraOffers(options): List offers created by your mnemonic.
  • cancelAgoraOffer(offer, options): Cancel an active offer.

Changelog

  • v2.0.2: Dynamically calculate minAcceptedAtoms to prevent dust errors.
  • v2.0.0: Unified SLP/ALP handling via auto-detection. Added support for SLP listings on Agora.
  • v1.7.1: Removed tokenDecimals, amounts are now BigInt atoms.
  • v1.6.1: Added Agora DEX management (fetch/cancel).
  • v1.5.1: Added Agora DEX listing.
  • v1.4.0: Added Agora DEX buying.
  • v1.3.3: Clarified amount units.
  • v1.1.0: Internal refactoring and performance improvements.

Requirements

  • Node.js >= 18.0.0

License

MIT