Skip to content
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

feat(rpc): InitSwapClient #1961

Closed
wants to merge 2 commits into from
Closed

feat(rpc): InitSwapClient #1961

wants to merge 2 commits into from

Conversation

sangaman
Copy link
Collaborator

@sangaman sangaman commented Oct 27, 2020

This allows for xud to initialize a swap client after xud itself has already been initialized using a new rpc command InitSwapClient. The swap client must be configured properly and running before it can be initialized. The procedure for initializing is as follows.

  1. A swap client type and (optionally) a currency is specified by the InitSwapClient request.
  2. Xud extracts the deciphered seed from its decrypted node key, this contains the entropy used to generate the master seed/mnemonic.
  3. Xud uses the seedutil to convert the deciphered seed back to a mnemonic. For Lnd, it uses this mnemonic to initialize the wallet.

Closes #1929.

Cli usage example: xucli initclient Lnd LTC

This allows for xud to initialize a swap client after xud itself has
already been initialized using a new rpc command `InitSwapClient`. The
swap client must be configured properly and running before it can be
initialized. The procedure for initializing is as follows.

1. A swap client type and (optionally) a currency is specified by the
`InitSwapClient` request.
2. Xud extracts the deciphered seed from its decrypted node key, this
contains the entropy used to generate the master seed/mnemonic.
3. Xud uses the seedutil to convert the deciphered seed back to a
mnemonic. For Lnd, it uses this mnemonic to initialize the wallet.

Closes #1929.
@sangaman sangaman added grpc gRPC API lightning Lightning network & lnd integration labels Oct 27, 2020
@sangaman sangaman requested review from a user and rsercano October 27, 2020 11:47
@sangaman sangaman self-assigned this Oct 27, 2020
@kilrau kilrau requested review from raladev and removed request for rsercano October 27, 2020 12:46
@ghost
Copy link

ghost commented Oct 27, 2020

Looks good code wise - needs manual testing by @raladev

@sangaman
Copy link
Collaborator Author

sangaman commented Nov 1, 2020

I'm closing this in favor of an alternate approach we discussed to automatically initialize any wallets that aren't initialized upon unlocking xud, aligning with how we currently handle the connext wallet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
grpc gRPC API lightning Lightning network & lnd integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle swap client initialization after initial xud create
1 participant