
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@fedimint/core-web
Advanced tools
This package provides a typescript interface for a fedimint client in the browser.
It contains the wasm-pack output of the rust-based fedimint client.
// npm or yarn or pnpm
pnpm add @fedimint/core-web
This package relies on the wasm binary to be bundled with your application. You will likely need to update your bundler's or framework's configuration to load the wasm file. Setup guides for popular frameworks are coming soon.
See the vite.config.ts file in the vite-core example for an example of configuring wasm within a web-worker using Vite.
import { FedimintWallet } from '@fedimint/core-web'
// Create the Wallet client
const wallet = new FedimintWallet()
// This should be called only once in the application
// lifecycle. It will automatically load your saved
// wallet state from previous sessions.
await wallet.open()
// Joining a Federation
// You can't join a federation
// if your wallet is already open
if (!wallet.isOpen()) {
// Check out [bitcoin mints](https://bitcoinmints.com/?tab=mints&showFedimint=true) for
// a list of federations with public invite codes.
const inviteCode = 'fed11qgqpw9thwvaz7t...'
await wallet.joinFederation(inviteCode)
// After you've joined a federation, your federation state
// will be stored in the browser. Future calls to `open()`
// will automatically load your saved federation.
}
// Get Wallet Balance (sync)
const balance = await wallet.balance.getBalance()
// Subscribe to Balance Updates
const unsubscribe = wallet.balance.subscribeBalance((balance: number) => {
console.log('updated balance', balance)
})
// Make sure to call `unsubscribe()` when you're done
// Receive Ecash Payments
await wallet.mint.reissueNotes('A11qgqpw9thwvaz7t...')
// Pay Lightning Invoice
await wallet.lightning.payBolt11Invoice('lnbc...')
examples/vite-core (demo)FAQs
Shim package that re-exports @fedimint/core. Use that instead.
The npm package @fedimint/core-web receives a total of 155 weekly downloads. As such, @fedimint/core-web popularity was classified as not popular.
We found that @fedimint/core-web demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers 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.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.