Expand description
BIP70: Payment Protocol (P2P Variant)
Specification: https://github.com/bitcoin/bips/blob/master/bip-0070.mediawiki
This is a P2P-based variant of BIP70 that addresses security concerns:
- Uses Bitcoin P2P network instead of HTTP/HTTPS (privacy-preserving)
- Uses Bitcoin public key signatures instead of X.509 certificates (decentralized)
- Supports signed refund addresses (prevents refund attacks)
- Works with TCP, Iroh, and QUIC transports
Core messages:
- PaymentRequest: Merchant payment details signed with Bitcoin key
- Payment: Customer payment transaction(s)
- PaymentACK: Merchant confirmation of payment
Security enhancements:
- Merchant authentication via Bitcoin public keys (on-chain verifiable)
- Signed refund addresses prevent refund attacks
- P2P routing preserves customer privacy (no direct merchant connection)
Structs§
- Covenant
Proof - CTV covenant proof for payment commitment
- Payment
- Payment - Customer payment transaction(s)
- PaymentACK
- Payment ACK - Merchant confirmation
- Payment
Details - Payment Details - Core payment information
- Payment
Output - Payment Output - Address and amount
- Payment
Protocol Client - BIP70 Payment Protocol client (for making payments via P2P)
- Payment
Protocol Server - BIP70 Payment Protocol server (for receiving payments via P2P)
- Payment
Request - Payment Request - Main payment protocol message
- Signed
Refund Address - Signed refund address - Pre-authorized refund address with merchant signature
- Template
Input - Template input (CTV format: no scriptSig)
- Template
Output - Template output
- Transaction
Template - Transaction template for CTV (without scriptSig)
Enums§
- Bip70
Error - BIP70 Error types
- Settlement
Status - Settlement status for payment
Constants§
- PAYMENT_
PROTOCOL_ VERSION - BIP70 Payment Protocol version