Connect with bWalletX
One script gives your site a standard BRC-100 wallet. No API keys, no sign-up, and nothing passes through our servers: your page talks straight to the user's wallet.
Get bWalletX to test with
Install the wallet you'll connect to (version 5.1.81 beta). Checksums are on each download page.
- Chrome / Brave extension (zip) · install steps
- Android APK · install steps
- Web app · iPhone
- bWalletX CLI and MCP server for scripts and AI agents
1. Add the script
<script src="https://bwalletx.com/connect.js"></script>
2. Add a button
<button id="connect">Connect with bWalletX</button>
<script>
bWalletX.button('#connect', async ({ wallet, identityKey }) => {
// wallet is a BRC-100 WalletInterface, the same API as window.CWI
console.log('Connected', identityKey);
});
</script>
If bWalletX isn't installed, the button opens bwalletx.com/extension.
3. Use the wallet
const { wallet } = await bWalletX.connect();
// Pay someone
await wallet.createAction({
description: 'Buy a pixel',
outputs: [{ lockingScript, satoshis: 1000, outputDescription: 'pixel' }],
});
// Sign in: prove who the user is
const { signature } = await wallet.createSignature({
data: [...new TextEncoder().encode(challenge)],
protocolID: [0, 'my site login'],
keyID: '1',
});
Sign users in
To let people sign in to your app with bWalletX (extension, phone or web wallet), follow the Sign in with bWalletX guide: one script tag (connect.js), server code, and steps for AI agents.
Already using window.CWI?
bWalletX also sets window.CWI, so sites that call it directly work as they are. But if the user also has another wallet installed (such as Yours), you can't tell which one answers. bWalletX.connect() picks bWalletX by name (rdns com.bwalletx.extension) through BRC-100 wallet discovery, so it always gets the right wallet.
To list every wallet the user has and let them choose:
const wallets = await bWalletX.discover();
// [{ info: { name, icon, rdns, kind }, wallet }, …]
What your site can do
bWalletX implements the BRC-100 wallet interface. Sites can request any BRC-100 action, including signatures and keys from any protocol (BRC-29 payment-key derivation included). The user approves each request; we don't keep a hidden blocklist. If we ever have to restrict something, we'll say so here and in the release notes first.
Which address will I see?
BRC-100 wallets don't hand sites the user's main receive address. identityKey is the user's stable identity for your site, and payments made through createAction come from the user's wallet balance. So an address you derive from the identity key won't match the address shown on the wallet's Receive screen. That's expected.
Try it
Questions: support@bwalletx.com · Source: connect.js