mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-10 21:05:11 +02:00
rpc: remove NewWitnessAddress RPC
In this commit, we remove the unnecessary NewWitnessAddress RPC. We do this as, at the moment, we only expose the wallet to generate witness addresses. Now that the RPC has been removed, its REST endpoint has been assigned to the NewAddress RPC, which should be the de facto way of having the wallet generate any type of supported address. Fixes #1986.
This commit is contained in:
20
rpcserver.go
20
rpcserver.go
@@ -160,10 +160,6 @@ var (
|
||||
Entity: "address",
|
||||
Action: "write",
|
||||
}},
|
||||
"/lnrpc.Lightning/NewWitnessAddress": {{
|
||||
Entity: "address",
|
||||
Action: "write",
|
||||
}},
|
||||
"/lnrpc.Lightning/SignMessage": {{
|
||||
Entity: "message",
|
||||
Action: "write",
|
||||
@@ -538,22 +534,6 @@ func (r *rpcServer) NewAddress(ctx context.Context,
|
||||
return &lnrpc.NewAddressResponse{Address: addr.String()}, nil
|
||||
}
|
||||
|
||||
// NewWitnessAddress returns a new native witness address under the control of
|
||||
// the local wallet.
|
||||
func (r *rpcServer) NewWitnessAddress(ctx context.Context,
|
||||
in *lnrpc.NewWitnessAddressRequest) (*lnrpc.NewAddressResponse, error) {
|
||||
|
||||
addr, err := r.server.cc.wallet.NewAddress(
|
||||
lnwallet.NestedWitnessPubKey, false,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
rpcsLog.Infof("[newaddress] addr=%v", addr.String())
|
||||
return &lnrpc.NewAddressResponse{Address: addr.String()}, nil
|
||||
}
|
||||
|
||||
var (
|
||||
// signedMsgPrefix is a special prefix that we'll prepend to any
|
||||
// messages we sign/verify. We do this to ensure that we don't
|
||||
|
Reference in New Issue
Block a user