coblox / bobtimus

an autobot that automatically handles swaps as Bob
Apache License 2.0
1 stars 1 forks source link

Integrate bitcoind wallet #3

Closed D4nte closed 5 years ago

D4nte commented 5 years ago

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:

bonomat commented 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)

D4nte commented 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)

Not sure how much we gain doing that. Would need to dig a bit to have clear picture.

bonomat commented 5 years ago

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).

D4nte commented 5 years ago

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.

D4nte commented 5 years ago

libbitcoin-js actually gives you enough tools to make it easy:

cb-blockr uses the common blockchain API standard. There are several implementations for different backends of this API. Need to look at one for bitcoind.

D4nte commented 5 years ago

tada: https://github.com/blockai-unofficial/rpc-common-blockchain let's code