-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
client: add a BTC exchange wallet #72
Conversation
client/asset/interface.go
Outdated
// looking for the maker's redemption beginning at swapconf confirmations | ||
// (at the latest) regardless of whether the server sends the 'redemption' | ||
// message or not. | ||
FindRedemption(ctx context.Context, txid string, vout uint32) (dex.Bytes, error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In all wallet implementations, this method will need extra scrutiny. It should be impossible for someone to spend the swap output in such a way as to make this function fail.
a763daf
to
86344cf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First half reviewed.
e384bdd
to
110886b
Compare
There was some matrix discussion about using simnet instead of regnet. I failed to remember at the time, but bitcoind has no simnet. |
Sounds like regnet will be the only option for rapid simulations with BTC then. Using this in market pairs with DCR simnet should then be permitted (i.e. only require a mainnet asset be paired with another mainnet asset). |
A wallet interface is developed along with the wallet functionality needed for BTC, and likely a few clones. To avoid the need to run a btcd node or to rewrite an RPC client from scratch, a compromise is made to use btcd's rcpclient.Client for all RPC calls, but with wallet-related calls routed through the RawRequest method and parsed independently. The wallet interface offered here is intended to be somewhat abstract, with language such as "utxos", "txid", and "vout" traded for more generalized terms such as "coins", "id", and "index". I believe this makes the interface more flexible and keeps the client implementation independent of the underlying blockchain specifics.
A DEX wallet interface and BTC implementation. To avoid the need to run a btcd node or to rewrite an RPC client from scratch, a compromise
is made to use btcd's
rcpclient.Client
for all RPC calls, but with wallet-related calls routed through theRawRequest
method and parsed independently.The wallet interface offered here is intended to be somewhat abstract, with language such as "utxos", "txid", and "vout" traded for more generalized terms such as "coins", "id", and "index". I
believe this makes the interface more flexible and keeps the client implementation independent of the underlying blockchain specifics.