admin swaps
This commit is contained in:
parent
e9a8865192
commit
0a385188ae
17 changed files with 560 additions and 188 deletions
|
|
@ -175,6 +175,20 @@ service LightningPub {
|
|||
option (nostr) = true;
|
||||
}
|
||||
|
||||
rpc GetAdminTransactionSwapQuote(structs.TransactionSwapRequest) returns (structs.TransactionSwapQuote) {
|
||||
option (auth_type) = "Admin";
|
||||
option (http_method) = "post";
|
||||
option (http_route) = "/api/admin/swap/transaction/quote";
|
||||
option (nostr) = true;
|
||||
}
|
||||
|
||||
rpc PayAdminTransactionSwap(structs.TransactionSwapQuoteRequest) returns (structs.AdminSwapResponse) {
|
||||
option (auth_type) = "Admin";
|
||||
option (http_method) = "post";
|
||||
option (http_route) = "/api/admin/swap/transaction/pay";
|
||||
option (nostr) = true;
|
||||
}
|
||||
|
||||
rpc GetUsageMetrics(structs.LatestUsageMetricReq) returns (structs.UsageMetrics) {
|
||||
option (auth_type) = "Metrics";
|
||||
option (http_method) = "post";
|
||||
|
|
@ -480,7 +494,7 @@ service LightningPub {
|
|||
option (http_method) = "post";
|
||||
option (http_route) = "/api/user/operations";
|
||||
option (nostr) = true;
|
||||
}
|
||||
}
|
||||
|
||||
rpc NewAddress(structs.NewAddressRequest) returns (structs.NewAddressResponse) {
|
||||
option (auth_type) = "User";
|
||||
|
|
|
|||
|
|
@ -834,6 +834,11 @@ message TransactionSwapRequest {
|
|||
int64 transaction_amount_sats = 2;
|
||||
}
|
||||
|
||||
message TransactionSwapQuoteRequest {
|
||||
string address = 1;
|
||||
string swap_operation_id = 2;
|
||||
}
|
||||
|
||||
message TransactionSwapQuote {
|
||||
string swap_operation_id = 1;
|
||||
int64 invoice_amount_sats = 2;
|
||||
|
|
@ -844,6 +849,11 @@ message TransactionSwapQuote {
|
|||
int64 service_fee_sats = 7;
|
||||
}
|
||||
|
||||
message AdminSwapResponse {
|
||||
string tx_id = 1;
|
||||
int64 network_fee = 2;
|
||||
}
|
||||
|
||||
message SwapOperation {
|
||||
string swap_operation_id = 1;
|
||||
optional UserOperation operation_payment = 2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue