-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
In the current state, there's a bit of a gap when initializing a wallet for the first time remotely. The set of RPC's (GenSeed
and InitWallet
) allow users to programmatically instantiate a wallet for the first time. However, once the seed is created and returned to the user, in order to issue any further commands, they'll need to set of macaroons. Atm, the only way to obtain these macaroons is to either use sftp/rsync, etc to grab the macaroon on disk. Instead, we can extend the InnitWallet
RPC call to return the serialized binary macaroon over the RPC, and not write it to disk. This bridges the gap and allows the client to provision a new node in a purely remote fashion only using our set of RPC's. In the future, once we add rich macaroon baking capabilities to the RPC interface, the user that created the node (the alleged admin) will be able to instruct lnd
to bake macaroons on the fly.
Steps To Completion
- Extend the
InitWalletResponse
to also optionally return the binary serializedadmin.macaroon
within the response. - Add a new command line flag (something like
--stateless-init
) which instructslnd
to not write the macaroons to disk, and instead will only return them to the user over RPC. - Implement the new logic in the
walletunlocker
package and update tests to exercise both operating modes