Author: Shane Jonas 2020-12-25 18:11:23
Published on: 2020-12-25T18:11:23+00:00
The Bitcoin community is currently working on creating a standard API document for the Bitcoin JSON-RPC API through a BIP (Bitcoin Improvement Proposal). The goal of this proposal is to define a simple interface that wallets and applications can agree on, which would cover the vast majority of use cases. The hope is that this will enable the development of more robust Bitcoin applications, such as time lock and multi-sig transactions, that can be easily used with any compatible wallet. To achieve this, the proposed interface would expose a wallet's address derivation and signing functions to external applications in a standardized way. The API would be expressed in JavaScript, with the wallet metadata including the name of the wallet. The standardization of the wallet API would have many benefits, including clear expectations of wallet interface and behavior for applications, increased user choice, and greater confidence in the development of applications due to wallet interoperability.For sensitive functions such as signing, wallet software should always prompt the user for confirmation to ensure security. The proposed API includes several mandatory methods, such as `wallet_getAddresses`, `wallet_signMessage`, and `wallet_signPSBT`, which are designed to expose commonly used wallet operations without burdening wallets with providing every possible usage scenario. Great care should be taken when exposing wallet functionality externally to protect the security and privacy of users.Examples of generic Ethereum APIs and wallet interfaces are provided through links to GitHub repositories, and a live demo with interactive documentation is also available. The hope is that creating a standard API document like this will make it much easier to build dev tools and documentation.
Updated on: 2023-06-14T16:51:41.480843+00:00