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

@lumenwipe/sdk

v0.2.0

Published

Typed fetch client for the LumenWipe API - non-custodial Stellar account closing.

Readme

@lumenwipe/sdk

Typed fetch client for the LumenWipe API. LumenWipe closes Stellar accounts non-custodially: it unwinds everything holding an account open, converts leftovers to XLM, and merges the account into a destination wallet or exchange.

This package only talks to the LumenWipe API over HTTP - it builds no transactions itself and has no @stellar/stellar-sdk dependency. Reading on-chain state and constructing every unsigned transaction happens server-side; this client just relays typed JSON and XDR strings.

Install

npm install @lumenwipe/sdk

Quick start

import { LumenWipeClient } from "@lumenwipe/sdk";

const client = new LumenWipeClient({
  baseUrl: "https://api.lumenwipe.com",
  apiKey: process.env.LUMENWIPE_API_KEY!,
  network: "mainnet", // or "testnet"
});

const account = await client.getAccount(address);

const plan = await client.closePlan({
  address,
  destination,
  // ...see @lumenwipe/types for the full request shape
});

const { transactions, remaining } = await client.closeTransactions({
  address,
  destination,
});

// Sign and submit each transaction, then repeat while remaining.requiresAnotherCall is true.
const result = await client.submit(signedXdr);

For a fully driven close loop (fetch -> verify -> sign -> submit -> repeat), use runClose instead of calling closeTransactions/submit by hand:

import { runClose } from "@lumenwipe/sdk";

await runClose({
  getTransactions: () => client.closeTransactions({ address, destination }),
  verify: (tx) => myVerify(tx), // see "Verification" below - this is your responsibility
  requiredWeight: (tx) => myRequiredWeight(tx),
  sign: (tx, xdr) => mySigner(tx, xdr),
  submit: (tx, xdr) => client.submit(xdr).then((r) => r.hash),
});

Verification is the caller's responsibility

This SDK does not verify or sign anything. Every transaction it returns is unsigned XDR built by the API from data you provided - before signing, your own code must independently confirm the transaction does exactly what the user asked (correct destination, no unexpected operations, no added signers, matching amounts) using values from your own inputs, never from the API response alone. LumenWipe's own web client's verification logic (assertCloseIntent in apps/web/lib/stellar/verify.ts) is the reference implementation - read it before wiring up signing in a production integration. Never sign a transaction from this SDK without an equivalent check.

API surface

  • health() - service health check.
  • getAccount(address, network?) - current on-chain state for an account.
  • getPaths(params, network?) - conversion path quotes for a source asset.
  • closePlan(body, network?) - a preview of the full close plan, with blockers if any step cannot be closed safely.
  • closeTransactions(body, network?) - builds the next round of unsigned transactions.
  • submit(signedXdr, network?) - submits a signed transaction.
  • mediatorCheck(address, network?) / mediatorSign(transaction, network?) - the exchange mediator flow (see the architecture doc).
  • runClose(deps) - drives the full fetch/verify/sign/submit loop to completion.

Request and response types come from @lumenwipe/types and are re-exported from this package, so no separate install is needed.

Errors

  • LumenWipeApiError - thrown on any non-2xx API response; carries status and the parsed error body.
  • LumenWipeTimeoutError - thrown when a request exceeds the configured timeout (default 30s).

Links

License

Apache-2.0