wallet-core icon indicating copy to clipboard operation
wallet-core copied to clipboard

Feature Request: One-Click BIP-322 Signing API

Open reservebtc opened this issue 3 months ago • 0 comments


Feature Request: One-Click BIP-322 Signing API

Problem Statement

Current BIP-322 implementation requires users to:

  1. Install wallet extension
  2. Navigate to signing feature
  3. Manually construct message
  4. Copy signature
  5. Paste signature back to dApp

This is 5+ steps. Modern Web3 users expect MetaMask-like UX (1-2 clicks).

Proposed Solution

Add a simple JavaScript API for one-click BIP-322 signing:

// Proposed API (matches MetaMask pattern)
await window.trustwallet.signBIP322({
  address: 'bc1q...',
  message: 'Sign this message'
})

Benefits

Better UX - Matches Web3 expectations (MetaMask-like)
More users - Easier onboarding for Bitcoin DeFi
Industry standard - BIP-322 is the standard
Easy to implement - ~20 lines of code

Reference Implementation

We've created an open-source library that demonstrates this:

  • GitHub: https://github.com/reservebtc/bip322-connector
  • Live Demo (Concept): https://app.reservebtc.io/bip322-demo
  • Working Example: https://app.reservebtc.io/verify (current implementation)
  • NPM Package: https://www.npmjs.com/package/@reservebtc/bip322-connector

Example Integration

// In your wallet extension (example code)
window.trustwallet = {
  async signBIP322(params) {
    const { address, message } = params
    
    // Your existing signing logic
    const signature = await this.signMessage(message, 'bip322-simple')
    
    return {
      address,
      message,
      signature,
      timestamp: Date.now()
    }
  }
}

Real-World Use Case

ReserveBTC Protocol (https://app.reservebtc.io) uses this for Bitcoin DeFi:

  • 10,000+ potential users
  • Production-ready on MegaETH
  • Real demand for better BIP-322 UX

Community Impact

Making BIP-322 signing easier will:

  • Increase Bitcoin DeFi adoption
  • Improve your wallet's competitiveness
  • Set industry standard for Bitcoin wallets

Offer to Help

I'm happy to:

  • Contribute a PR with implementation
  • Provide technical guidance
  • Test the integration

Would you consider adding this feature? I believe it would significantly improve the user experience for your wallet.


Built by: ReserveBTC Team
Contact: [email protected]


reservebtc avatar Oct 06 '25 07:10 reservebtc