decode invoice + docs

This commit is contained in:
hatim boufnichel 2022-11-22 23:11:56 +01:00
parent 4fd8c0d71d
commit 1cf1631ccc
12 changed files with 1451 additions and 906 deletions

View file

@ -120,6 +120,12 @@ service LightningPub {
option (http_route) = "/api/user/invoice/new";
option (nostr) = true;
}
rpc DecodeInvoice(structs.DecodeInvoiceRequest) returns (structs.DecodeInvoiceResponse){
option (auth_type) = "User";
option (http_method) = "post";
option (http_route) = "/api/user/invoice/decode";
option (nostr) = true;
}
rpc PayInvoice(structs.PayInvoiceRequest) returns (structs.PayInvoiceResponse){
option (auth_type) = "User";
option (http_method) = "post";

View file

@ -48,7 +48,12 @@ message NewInvoiceRequest{
message NewInvoiceResponse{
string invoice = 1;
}
message DecodeInvoiceRequest{
string invoice=1;
}
message DecodeInvoiceResponse{
int64 amount=1;
}
message PayInvoiceRequest{
string invoice = 1;
int64 amount = 2;