Your wallet.
Along for the ride.
The same Bitcoin balance on every Bivvy-enabled app. Pay and receive over Lightning or on-chain.
Connect and read
await bivvy.connect();
const { balance } = await bivvy.bitcoin.getBalance();
// balance is a decimal string of satoshis. Use BigInt(balance).Receive bitcoin
const { invoice } = await bivvy.bitcoin.createLightningInvoice({
amountSats: 1000,
memo: "A little something nice"
});
showInvoice(invoice.encodedInvoice);
const address = await bivvy.bitcoin.getOnchainAddress();Invoices expire after one hour. On-chain deposits use a reusable Bitcoin address and require confirmations.
Share a payment link
Every registered name has a payment page at bivvy.me/user/<username>. It shows the recipient’s avatar and Lightning address. The payer can enter sats or USD and add an invoice note, then scan the QR code with any Lightning wallet.
https://bivvy.me/user/luke
https://bivvy.me/user/luke?amount=69&unit=sats¬e=InvoicePrefill amount, unit (sats or usd), and an optional note of up to 120 characters. Amounts are converted to whole sats; payment pages accept 1–100,000 sats. Prefilled links never generate an invoice automatically. Copy your link from the wallet’s identity or receive screen.
Pay a Lightning invoice
const payment = await bivvy.bitcoin.payLightningInvoice({
invoice: "lnbc…",
maxFeeSats: 25
});
// Confirm only when payment.paymentPreimage is present.
// A pending result is not proof of settlement.Bivvy reads the amount from the invoice and includes the maximum fee in the approval. It accepts Bitcoin mainnet invoices with a fixed, whole-satoshi amount. Zero-amount invoices are rejected.
Use WebLN
await window.webln.enable();
const { preimage } = await window.webln.sendPayment(invoice);
const { paymentRequest } = await window.webln.makeInvoice({
amount: 1000, defaultMemo: "Hello from my app"
});Send on-chain
Send to a Bitcoin address with a fee estimate and an explicit maximum fee. The recipient receives the full amount; fees are paid separately from the wallet balance.
const payment = { address: "bc1…", amountSats: 10000 };
const { feeSats } = await bivvy.bitcoin.estimateOnchainFee(payment);
const result = await bivvy.bitcoin.sendOnchain({
...payment, maxFeeSats: feeSats
});
// result: { id, status, amountSats, feeSats, txid? }Replace the placeholder with a complete Bitcoin mainnet address. Legacy, nested SegWit, native SegWit, and Taproot addresses are supported. A speed of slow, standard (default), or fast selects the fee quote. On-chain confirmation depends on the Bitcoin network; a submitted request is not a confirmed transaction.
Fee estimation requires approval because preparing the quote can reorganize funds inside the wallet. Quotes expire. If a quote expires or exceeds your cap, review a new estimate before sending. maxFeeSats is required for on-chain sends and accepts 0–100,000 sats.
Transaction history
const { transfers, offset } = await bivvy.bitcoin.getTransfers(20, 0);What is exposed?
Bivvy exposes Bitcoin balances, Lightning and on-chain payments, and transaction history. Spark is the underlying wallet implementation. Its addresses, direct transfers, token operations, swaps, and raw wallet internals are not part of the public API.