WBIPs

Improvement Proposals

ℹ️

While this document and some proposals are a work-in-progress, it can be used in production in agreement with wallets implementing the standard. The thinking behind this is to use, test, and iterate on proposals in a real-world environment. There should not be a burden of waiting for some ratification criteria or 100% consensus.

Motivation for WBIPs

tl;dr Make it easier for developers to build BTC enabled experiences!

  • Single interface for BTC and L2s, without the need for new interfaces in the future
    • window.btc as the location for the global interface
    • Use namespaces in method strings to denote L2s (e.g. "lbtc*" for Liquid wrapped Bitcoin, "ln*" for lightning, "stx*" for Stacks)
    • .request API which is future proof, without needing new specs or updates on the provider implementation
    • Standardized JSON API for alternatives communication channels (e.g. WalletConnect)
    • Simple and dynamic interface (i.e. not static methods, but rather dynamic strings and JSON objects)
  • Removal of bloat observed in other systems
    • e.g. Ethereum's web3.js (with its reliance on many dependencies to initialize)
    • e.g. Stacks Connect (with its outdated success/error callbacks, unnecessary JWT wrapping and parameters)
  • The user (via the wallet interface) should have more control over the actions than the web-app
    • e.g. the user should also be able to choose the network/chain/nonce, not the web-app alone

Goals

  • Get the community to come together as a working group on single JS API standard
    • Alby
    • Unisat
    • WebBTC
    • Leather
    • Xverse
    • Marketplaces (OpenOrdex, etc.)
  • Reduce extisting methods to essentials (for new API styles)
  • Add WBIPs solving existing issues users/wallets/applications face