lnrpc: add the deletecanceledinvoice rpc call

This commit is contained in:
MPins
2025-07-22 23:34:50 -03:00
parent 6f09d9653f
commit 0146e374fd
7 changed files with 1964 additions and 1616 deletions

View File

@@ -973,6 +973,31 @@ func RegisterLightningJSONCallbacks(registry map[string]func(ctx context.Context
}()
}
registry["lnrpc.Lightning.DeleteCanceledInvoice"] = func(ctx context.Context,
conn *grpc.ClientConn, reqJSON string, callback func(string, error)) {
req := &DelCanceledInvoiceReq{}
err := marshaler.Unmarshal([]byte(reqJSON), req)
if err != nil {
callback("", err)
return
}
client := NewLightningClient(conn)
resp, err := client.DeleteCanceledInvoice(ctx, req)
if err != nil {
callback("", err)
return
}
respBytes, err := marshaler.Marshal(resp)
if err != nil {
callback("", err)
return
}
callback(string(respBytes), nil)
}
registry["lnrpc.Lightning.DecodePayReq"] = func(ctx context.Context,
conn *grpc.ClientConn, reqJSON string, callback func(string, error)) {