Skip to content

sendOnchain

wallet.sendOnchain(amountSats: number, address: string)

Attempts to send bitcoin to an onchain address.

ts
import { 
FedimintWallet
} from '@fedimint/core-web'
const
wallet
= new
FedimintWallet
()
wallet
.
open
()
const
amount
= 20 // amount in Sats
const
address
= 'bc1q...'
const {
operation_id
} = await
wallet
.
wallet
.
sendOnchain
(
amount
,
address
,
)