BIVVY DOCS
Start small.
Go anywhere.
A working integration in a few lines.
1. Add Bivvy to your page
HTML
<script src="https://bivvy.me/bivvy.js"></script>
<button id="connect">Connect with Bivvy</button>
<script>
document.querySelector("#connect").onclick = async () => {
try {
const { pubkey } = await bivvy.connect();
// Show the connected identity in your app.
} catch (error) {
// A user declining is an ordinary outcome.
showError(error.message);
}
};
</script>2. Use the wallet and identity
JavaScript
// Shared Bitcoin wallet
const { balance } = await bivvy.bitcoin.getBalance(); // sats, decimal string
// Portable Nostr identity
const pubkey = await window.nostr.getPublicKey();Private keys stay inside Bivvy. Your app receives only the approved operation result.
3. Ship on HTTPS
Passkeys require a secure context. Localhost is supported for development, but its passkeys and wallets are separate from bivvy.me. Keep production integrations pointed at https://bivvy.me.
Content Security Policy
Allow the SDK in your script policy and Bivvy in your frame policy. Your site must allow the secure Bivvy popup; Bivvy’s own approvals do not run inside a third-party frame.
HTTP
Content-Security-Policy: script-src 'self' https://bivvy.me; frame-src https://bivvy.meES modules
JavaScript
import { createBivvy } from "https://bivvy.me/bivvy.mjs";
const client = createBivvy();
await client.connect();Await one operation at a time. Bivvy rejects overlapping requests with BUSY so each approval corresponds to exactly one action.
Made to be understood. Built to be yours.View the source