Socket
Book a DemoInstallSign in
Socket

@fedimint/react

Package Overview
Dependencies
Maintainers
5
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fedimint/react

<!-- Removes the border below the header tag --> <summary> @fedimint/react

0.0.4
latest
npmnpm
Version published
Maintainers
5
Created
Source

Fedimint Logo

    @fedimint/react

    Helpful React hooks for building with the Fedimint Web SDK.

@fedimint/react

Install

pnpm install @fedimint/core-web @fedimint/react

Usage

import { FedimintWalletProvider, setupFedimintWallet } from '@fedimint/react'

setupFedimintWallet({
  lazy: false,
  debug: true,
})

// Wrap your app in the FedimintWalletProvider
<FedimintWalletProvider>
  <App />
</FedimintWalletProvider>


// App.tsx


// Balance

import { useBalance } from '@fedimint/react'

const balance = useBalance()

// Wallet

import { useOpenWallet } from '@fedimint/react'

const {
  walletStatus, // 'open' | 'closed' | 'connecting' | 'failed'
  openWallet, // () => Promise<boolean> - Returns true if wallet was opened successfully.
  joinFederation, // () => Promise<boolean> - Returns true if joined federation successfully.
} = useOpenWallet()

// Receive Lightning

import { useReceiveLightning } from '@fedimint/react'

const {
  generateInvoice, // (amount: number) => Promise<void>
  bolt11, // string
  invoiceStatus, // 'pending' | 'confirmed' | 'failed'
  error, // Error | undefined
} = useReceiveLightning()

// Send Lightning

import { useSendLightning } from '@fedimint/react'

const {
  payInvoice, // (bolt11: string) => Promise<void>
  paymentStatus, // 'pending' | 'confirmed' | 'failed'
  paymentError, // Error | undefined
} = useSendLightning()

FAQs

Package last updated on 20 May 2025

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.