Bitcoin Integration
PSBT (Partially Signed Bitcoin Transaction) signer with support for P2PKH, P2WPKH, and P2TR (Taproot).
📖 Related Documentation
Basic Usage
TY
basic-usage.tsLoading...
Address Types
P2PKH (Legacy)
Starts with 1
Higher fees, wider compatibility
P2WPKH (SegWit)
Starts with bc1q
Lower fees, widely supported
P2TR (Taproot)
Starts with bc1p
Lowest fees, enhanced privacy
Sign PSBT
TY
sign-psbt.tsLoading...
Advanced: Per-Input Signing
For complex PSBTs with multiple inputs, you can specify signing instructions for each input:
TY
advanced-psbt.tsLoading...
Batch Signing
TY
batch-sign.tsLoading...
Signer Interface
publicKey: string
addresses: { p2pkh, p2wpkh, p2tr }
signPsbt(psbt, options): Promise<BitcoinSignResult>
signAllPsbts(psbts): Promise<BitcoinSignResult[]>
getVaultId(): string
getPublicKey(): string
ownsAddress(address): boolean
Utility Functions
The auth-sdk exports helpful Bitcoin utilities:
TY
utilities.tsLoading...
Benefits
- • No private key exposure - Bitcoin keys stay secure in Emblem Vault
- • All address types - P2PKH, P2WPKH, and P2TR (Taproot) support
- • PSBT standard - Compatible with UniSat and other Bitcoin wallets
- • Batch signing - Sign multiple PSBTs efficiently
- • Taproot ready - Full Schnorr signature support
PSBT Workflow
Bitcoin signing with Emblem follows the PSBT (BIP 174) standard:
- Create a PSBT using bitcoinjs-lib or similar library
- Encode the PSBT to base64
- Sign with
signer.signPsbt() - Broadcast the
signedTxHexto the Bitcoin network