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

@tx-meta/dcu-kit

v0.4.1

Published

Offchain SDK for DCU Toolkit — ROSCA protocol on Cardano

Downloads

282

Readme

@tx-meta/dcu-kit

npm CI

TypeScript offchain SDK for the DCU Toolkit, a ROSCA protocol on Cardano. Built on Lucid Evolution and Effect.

Installation

npm install @tx-meta/dcu-kit
# or
pnpm add @tx-meta/dcu-kit

Usage

Every endpoint returns a ProgramRunner with three execution methods:

import { createAccount, CreateAccountConfig } from "@tx-meta/dcu-kit";

const config: CreateAccountConfig = {
  selected_out_ref: utxos[0],
  email: "[email protected]",
  phone: "555-0100",
};

// Unsafe: throws on failure
const tx = await createAccount(lucid, config).unsafeRun();

// Safe: returns Either (no throw)
const tx = await createAccount(lucid, config).safeRun();

// Effect: for composition with other Effects
const tx = createAccount(lucid, config).program();

Sign and submit after building:

const signed = await tx.sign.withWallet().complete();
const txHash = await signed.submit();

API Overview

Account Endpoints

| Function | Description | | --------------- | ---------------------------- | | createAccount | Mint CIP-68 membership token | | updateAccount | Update account metadata | | deleteAccount | Burn membership token |

Group Endpoints

| Function | Description | | ---------------- | ------------------------------------- | | createGroup | Create a new ROSCA group | | joinGroup | Join a group, lock treasury deposit | | startGroup | Activate group, set rotation schedule | | exitGroup | Exit before or after maturity | | updateGroup | Update group parameters | | deleteGroup | Delete an unstarted group | | terminateGroup | Admin: terminate with penalty | | nextCycle | Advance to next ROSCA cycle |

Treasury Endpoints

| Function | Description | | ------------------------ | -------------------------------- | | distributePayout | Pay out current round's borrower | | contribute | Top up treasury balance | | updatePayoutCredential | Update payout destination | | extendGraceWindow | Admin: extend grace period |

Admin

| Function | Description | | ------------------ | -------------------------------------- | | deployScripts | Deploy validators as reference scripts | | verifyDeployment | Verify reference script UTxOs |

Development

pnpm install
pnpm format:check   # Prettier check
pnpm format         # Auto-fix formatting
pnpm lint           # ESLint
pnpm tsc --noEmit   # Type check
pnpm run build      # Compile to dist/
NETWORK=Emulator pnpm test  # Full test suite (Lucid emulator, no live network)

Testing

Tests use vitest + @effect/vitest against the Lucid emulator (real UPLC execution, no mocks):

NETWORK=Emulator pnpm test                        # All suites
NETWORK=Emulator pnpm test test/account.test.ts   # Account only
NETWORK=Emulator pnpm test test/group.test.ts     # Group only
NETWORK=Emulator pnpm test test/treasury.test.ts  # Treasury only
NETWORK=Emulator pnpm test -- -t "pattern"        # Filter by name

NETWORK=Emulator is required. Without it the SDK attempts to connect to Preprod.

License

MIT