decred / atomicswap

On-chain atomic swaps for Decred and other cryptocurrencies.
https://blog.decred.org/2017/09/20/On-Chain-Atomic-Swaps/
ISC License
507 stars 232 forks source link

Building on top of decred/atomic swaps code - Next Steps #94

Closed devwarrior777 closed 5 years ago

devwarrior777 commented 5 years ago

Thoughts about building on top of decred/atomic swaps code:

The tools are great as a PoC but difficult to use from other code

devwarrior777 commented 5 years ago

Some context: https://github.com/xaur/decred-issues/issues/8

devwarrior777 commented 5 years ago

Here is an example of the above suggestion.

https://github.com/devwarrior777/atomicswap/tree/libs

Took one coin (Zcoin, XZC) and refactored decred/atomicswap/

The core of the new libs/xzc code is commands.go which is a Public interface/api into the HTLC and RPC functionality.

This could be taken further by including all coin-specific code in it's respective libs/ directory instead of having that dispersed on the various contributor's github repos. Or not; as seen fit.

Cheers

devwarrior777 commented 5 years ago

Added protocol buffers bindings for example refactor above

https://github.com/devwarrior777/atomicswap/blob/libs/libs/protobind/atomicswap.proto

... for future gRPC / non-golang language support

jrick commented 5 years ago

This is interesting work and would definitely be useful to some applications, but I feel that it is currently out of scope for this project and may require extra work for maintainers who have already ported their tools. Perhaps if/when the DEX development begins, this can be reconsidered.