multi: forward address and import calls over RPC
In order to support the full range of on-chain functionality, including importing watch-only accounts in the watch-only instance, we need to forward some calls like creating new addresses or importing accounts to the remote signing instance.
This commit is contained in:
6 files changed
+703
-441
No files matched your search
@@ -507,9 +507,17 @@ func (w *WalletKit) NextAddr(ctx context.Context,
|
||||
account = req.Account
|
||||
}
|
||||
|
||||
addr, err := w.cfg.Wallet.NewAddress(
|
||||
lnwallet.WitnessPubKey, false, account,
|
||||
)
|
||||
addrType := lnwallet.WitnessPubKey
|
||||
switch req.Type {
|
||||
case AddressType_NESTED_WITNESS_PUBKEY_HASH:
|
||||
addrType = lnwallet.NestedWitnessPubKey
|
||||
|
||||
case AddressType_HYBRID_NESTED_WITNESS_PUBKEY_HASH:
|
||||
return nil, fmt.Errorf("invalid address type for next "+
|
||||
"address: %v", req.Type)
|
||||
}
|
||||
|
||||
addr, err := w.cfg.Wallet.NewAddress(addrType, req.Change, account)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user