Commit Graph

5 Commits (b574e344ea3bafe94314d586131d2e1296d7c67d)

Author SHA1 Message Date
Oliver Gugger 69f2af9fdc
loop+cmd: extract types into swap module 5 years ago
Bjorn Olav Jalborg 8d7a272fdd loop+loopout: validate hash of swap invoice
This commit fixes a possible exploit by the loop server, where
- in a loop out - the server could claim money off-chain, without
publishing an on-chain swap htlc.

The server could do this by responding with a regular invoice, whose hash
is different than the hash in the NewLoopOutSwap request. To prevent
the exploit, we validate that the hash of the swap invoice is equal to the
hash the client generated.
5 years ago
Joost Jager 753429547d
swap: fix htlc address generation
This commit fixes the generation of the htlc address. This bug didn't
affect the swap execution, because the htlc address is only used for
display to the user/caller.
5 years ago
Joost Jager 30c7d71c57
use np2wsh for loop in htlc 5 years ago
Olaoluwa Osuntokun f552bc06b1
utils: remove utils package in favor of new swap package 5 years ago