diviproject / atomic-swaps Goto Github PK
View Code? Open in Web Editor NEW♻️ Decentralized, peer-to-peer, cross-chain swaps simplified into 1 API request.
Home Page: https://atomic-swaps.diviproject.org
♻️ Decentralized, peer-to-peer, cross-chain swaps simplified into 1 API request.
Home Page: https://atomic-swaps.diviproject.org
Currently, the project relies on divid
and diviutil
to parse public and private keys. What I would like to see in the next release is a way to parse keys without having to have the entire chain parameters saved.
If you look at address.go
in diviutil
: https://github.com/DiviProject/diviutil/blob/master/address.go
There is a way to decode addresses.
This decoding is dependent on params.go
in divid/chaincfg
.
I would like to modify it so that you can just specify the type of encoding the key is. So that you can decode the address.
This would mean that:
func DecodeAddress(addr string, defaultNet *chaincfg.Params) (Address, error) {
}
Would be simplified into something like this:
func DecodeAddress(addr string, addressConfig addrConfig) (Address, error) {
}
At https://atomic-swaps.diviproject.org/api
"[string]secretHash
The secret hash (in hex bytes) to give a participant to redeem atomic swap funds."
Should say "to give the counterparty (or intended person) to participate in an atomic swap"
The 'participate' method should say [secretHash] instead of [secret]
$ atomicswap participate [address] [amount] [secret]
$ Do you want to publish this transaction? [y/N]
$ yes
Inside the 'redeem' function description there's a typo '[secret]hash' as opposed to '[string] secretHash'
[secret]hash
The secret hash that was created during an initiate or participate atomic swap HTTP call.
Other minor typos as well that will get caught in the next pass.
There's seems to be no ability to set an expiry date by which the refund should be triggered at the earliest. You should not be able to trigger a refund immediately, but you should also be able to specify such a minimum-time-till-refundable. Nobody will participate in an atomic swap if the counterparty can immediately exit their commitment.
Also, if you're locally running one full node of each, it seems hard to specify the direction of the trade. Perhaps some syntax like 'DIV > BTC' vs 'BTC > DIV' would help make it clear which transaction-direction you're participating in.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.