-
Notifications
You must be signed in to change notification settings - Fork 117
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
xPub support for loop out / autoloop out #605
Conversation
cd8c3f5
to
b83fdba
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.
Looking very good, great work @hieblmi 💯
Only nits and a question from my end.
liquidity/parameters.go
Outdated
if err != nil { | ||
return nil, err | ||
} | ||
} | ||
} | ||
|
||
addrType := walletrpc.AddressType_UNKNOWN | ||
switch req.AccountAddrType { |
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.
nit: can be simplified to an if
or a two-case switch
.
cmd/loop/liquidity.go
Outdated
flagSet = true | ||
} | ||
|
||
if ctx.IsSet("account") != ctx.IsSet("account_addr_type") { |
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.
nit: validation could be before the params switch.
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.
I think I could also make it part of the switch itself.
5924c35
to
155ac89
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, really nice work @hieblmi 🎉
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.
tACK
LGTM 🌋
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, great job!
Could you add a line to the release notes?
@@ -1,20 +1,19 @@ | |||
# Loop Client Release Notes | |||
This file tracks release notes for the loop client. |
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.
unneccessary line removals here and below
This PR addresses https://github.com/lightninglabs/nautilus/issues/1000
This PR enables loop out and autoloop out operations to sweep htlcs to addresses generated from an extended public key.
A precondition for using the loop client in this fashion is onboarding a xpub account in the backing lnd instance, e.g.
lncli wallet accounts import xpub... my_loop_account --address_type p2tr --master_key_fingerprint 0df50
.Loop outs can then be instructed to sweep to a new derived address from the specified account, e.g:
loop out --amt 10000000 --account my_loop_account --address_type p2tr
.To use this functionality with autoloop out one has to set the backing lnd account and address type via liquidity parameters for autoloop, e.g.
loop --network regtest setparams --autoloop=true --account=my_loop_account --account_addr_type=p2tr ...