-
Notifications
You must be signed in to change notification settings - Fork 101
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
assets: add a DCR backend #17
Conversation
I implemented P2SH support, as well as allowing vote and revocation outputs to be spent after maturity. I also did multi-sig, though only as P2SH. Enabling multi-sig requires a change to the DEX specification to make the |
b594b3c
to
cd26107
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.
LGTM. Any more commits to push?
A DCR backend for gathering information about UTXOs and signatures. Also DEXAsset, a common interface for asset backends, which the DCR backend implements. Includes both offline and live unit tests.
Adds a DEXTx interface for getting transaction information and using it to verify swap contracts and spend outputs.
Adds P2SH support and multi-sig. Also adds parsing of stake versions of supported script types so that vote and revocation outputs can be used as inputs after maturation.
These changes modify the DCR backend constructor to be the same as the BTC constructor. The choice of network is based on a DEX supplied ID, and other configuration settings are loaded from a specified filepath.
Adds support for Edwards and Schnorr signatures. Modifies the live utxo test to take more complete statistics.
Also changes UTXO.ScriptSize to UTXO.SpendSize, since the size is more than just the sig script.
Should be good now. |
Adds a dcrd RPC client backend and a DEX backend interface. Methods for handling transactions, UTXOs, and swap contracts are implemented.
There are offline tests and live tests. Use the
-tags=drclive
tag to run the live tests. The live tests assume a mainnet node and a pretty default configuration, so may need to tweak things if yours are different.I'm sure the interface will need more methods. For instance it doesn't have a way to monitor the health of the backend itself. It should probably be clear to the DEX when the backend is not connected to the node or such.