Closed D4nte closed 5 years ago
I would propose that we use bitcoind's wallet only for managing the utxo set and signing the transactions in memory in bobtimus (proposed similar for ethereum in comit-network/comit-rs#916)
I would propose that we use bitcoind's wallet only for managing the utxo set and signing the transactions in memory in bobtimus (proposed similar for ethereum in comit-network/comit-rs#916)
Not sure how much we gain doing that. Would need to dig a bit to have clear picture.
The advantage is that we don't depend on the wallet of bitcoind that much and only use it as support for managing the UTXO sets (we might be able to get rid of this in the future, or replace this by an alternative implementation).
Looks like the only JS libraries that would allow to track UTXOs are full blown libraries that re-implement a full node such as bitcore. It looks easier to manage UTXOs manually.
libbitcoin-js actually gives you enough tools to make it easy:
cb-blockr
APIcb-blockr
uses the common blockchain API standard. There are several implementations for different backends of this API. Need to look at one for bitcoind.
tada: https://github.com/blockai-unofficial/rpc-common-blockchain let's code
Look into a JavaScript Wallet to avoid any dependency to bitcoind wallet feature.
If nothing easy available, manage UTXO with bitcoind wallet but build transaction manually. The aim is to easily be able to swap bitcoind for another backend so interfaces should be thought this way.
DoD: