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

@totemsdk/omnia-splice

v0.1.5

Published

Channel splicing for @totemsdk/omnia — resize Minima eltoo channels without a close+reopen cycle

Readme

@totemsdk/omnia-splice

Resize channels without closing them.

Channel splicing lets you add or remove funds from an active Omnia channel without the disruptive close → reopen cycle. A splice produces a new on-chain UTXO with the adjusted balance while keeping the channel's off-chain state intact.

Install

npm install @totemsdk/omnia-splice

What's inside

| Export | What it does | |--------|-------------| | proposeSpliceIn(channel, amount) | Propose adding funds to a channel | | proposeSpliceOut(channel, amount) | Propose withdrawing funds from a channel | | acceptSplice(proposal, signer) | Co-sign a splice proposal | | quiesceChannel(channel) | Drain all in-flight HTLCs before splicing (required safety step) | | buildSpliceTx(proposal) | Construct the on-chain splice transaction | | finalizeSplice(proposal, signatures) | Finalize and return the broadcast-ready hex |

Error taxonomy

| Error | Cause | |-------|-------| | SpliceBalanceConservationError | Output amounts don't sum correctly — prevents funds from disappearing | | PendingHTLCError | Splice attempted while HTLCs are still in-flight (quiesce first) | | SpliceChannelStatusError | Channel is not in a state that permits splicing | | SpliceSignatureMismatchError | Co-signature does not match the proposal |

Usage

Splice in (add funds)

import { quiesceChannel, proposeSpliceIn, acceptSplice, buildSpliceTx, finalizeSplice } from '@totemsdk/omnia-splice';

// 1. Drain HTLCs (both sides must stop sending)
await quiesceChannel(channel);

// 2. Local side proposes adding 50 MIN
const proposal = await proposeSpliceIn(channel, { amount: '50', tokenid: '0x00' });

// 3. Remote side accepts
const remoteSig = await remoteAccept(proposal);          // out-of-band exchange

// 4. Build and finalize the on-chain transaction
const spliceTx  = buildSpliceTx(proposal);
const finalHex  = finalizeSplice(proposal, [localSig, remoteSig]);

// 5. Broadcast
await provider.broadcastTxPoW(finalHex);

Splice out (withdraw funds)

import { proposeSpliceOut } from '@totemsdk/omnia-splice';

await quiesceChannel(channel);
const proposal = await proposeSpliceOut(channel, {
  amount: '20',
  withdrawTo: 'MxDEF...',  // on-chain destination for the withdrawn funds
});

Error handling

import { PendingHTLCError, SpliceBalanceConservationError } from '@totemsdk/omnia-splice';

try {
  await proposeSpliceIn(channel, { amount: '50', tokenid: '0x00' });
} catch (err) {
  if (err instanceof PendingHTLCError) {
    console.error('Must quiesce channel first — there are in-flight HTLCs');
  }
  if (err instanceof SpliceBalanceConservationError) {
    console.error('Balance mismatch in splice proposal');
  }
}

See also