
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
okj-fedimint-ts
Advanced tools
This is a TypeScript client that consumes the Fedimint Http Client, communicating with it via HTTP and a password. It's a hacky prototype, but it works until we can get a proper TS client for Fedimint. All of the federation handling code happens in the fedimint-http-client, this just exposes a simple API for interacting with the client from TypeScript (will be mirrored in Python and Go).
import dotenv from "dotenv";
import { FedimintClientBuilder } from "fedimint-ts";
dotenv.config();
const baseUrl = process.env.BASE_URL || "http://localhost:3000";
const password = process.env.PASSWORD || "password";
const builder = new FedimintClientBuilder();
builder.setBaseUrl(baseUrl).setPassword(password);
// If you pass in an invite code, it will be set as the default federation
if (process.env.INVITE_CODE) {
builder.setInviteCode(process.env.INVITE_CODE);
}
// The FedimintClient has a default federationId set that it'll call any module methods on
const fedimintClient = await builder.build();
// You can update the federationId to call methods on a different federation
const { federation_ids } = await fedimintClient.federationIds();
await fedimintClient.setDefaultFederationId(federation_ids[0]);
// Any methods that call on a specific federation can optionally take a federationId as the last argument
// If no federationId is passed, the default federationId is used
const _ = await fedimintClient.listOperations({ limit: 10 }, federation_ids[1]);
// Admin methods give summaries by federation
fedimintClient.info().then((response) => {
console.log("Current Total Msats Ecash: ", response.total_amount_msat);
});
// All module methods are called on the default federationId if you don't pass in a federationId
const { operation_id, invoice } = await fedimintClient.ln.createInvoice({
amount_msat: 10000,
description: "test",
});
console.log("Created 10 sat Invoice: ", invoice);
console.log("Waiting for payment...");
fedimintClient.ln.awaitInvoice({ operation_id }).then((response) => {
console.log("Payment Received!");
console.log("New Total Msats Ecash: ", response.total_amount_msat);
});
Install dependencies with bun install or npm install.
Follow these steps to setup a fedimint-clientd server and then you're ready to run the typescript client.
fedimint-ts will use the same base url and password as the fedimint-clientd:
BASE_URL = 'http://localhost:5000'
PASSWORD = 'password'
Then run your code that follows the pattern of tests/info-example.ts.
bun run tests/info-example.ts
FAQs
A TypeScript Wrapper for the Fedimint HTTP Client
We found that okj-fedimint-ts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.