
Product
Introducing Webhook Events for Pull Request Scans
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.
@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.getBalance()
// Subscribe to Balance Updates
const unsubscribe = wallet.subscribeBalance((balance: number) => {
console.log('updated balance', balance)
})
// Make sure to call `unsubscribe()` when you're done
// Receive Ecash Payments
await wallet.reissueNotes('A11qgqpw9thwvaz7t...')
// Pay Lightning Invoice
await wallet.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 164 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
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.
Research
The Socket Threat Research Team uncovered malicious NuGet packages typosquatting the popular Nethereum project to steal wallet keys.
Product
A single platform for static analysis, secrets detection, container scanning, and CVE checks—built on trusted open source tools, ready to run out of the box.