-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcashu.proto
90 lines (84 loc) · 2.45 KB
/
cashu.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
syntax = "proto3";
package cashu.v1;
option go_package = "gen/go/cashurpc";
import "keys.proto";
import "swap.proto";
import "mint.proto";
import "melt.proto";
import "state.proto";
import "info.proto";
import "google/api/annotations.proto";
service Mint {
// Starting https://github.com/cashubtc/nuts/blob/main/01.md
rpc Keys(KeysRequest) returns (KeysResponse){
option (google.api.http) = {
get: "/v1/keys"
};
};
rpc KeysById(KeysRequest) returns (KeysResponse){
option (google.api.http) = {
get: "/v1/keys/{id}"
};
};
// Starting https://github.com/cashubtc/nuts/blob/main/02.md
rpc KeySets(KeysRequest) returns (KeysResponse){
option (google.api.http) = {
get: "/v1/keysets"
};
};
// Starting https://github.com/cashubtc/nuts/blob/main/03.md
rpc Swap(SwapRequest) returns (SwapResponse){
option (google.api.http) = {
post: "/v1/swap"
body: "*"
};
};
// Starting https://github.com/cashubtc/nuts/blob/main/05.md
rpc MintQuote(PostMintQuoteBolt11Request) returns (PostMintQuoteBolt11Response){
option (google.api.http) = {
post: "/v1/mint/quote/bolt11"
body: "*"
};
};
rpc MintQuoteState(GetQuoteBolt11StateRequest) returns (PostMintQuoteBolt11Response){
option (google.api.http) = {
get: "/v1/mint/quote/bolt11/{quote_id}"
};
};
rpc Mint(PostMintBolt11Request) returns (PostMintBolt11Response){
option (google.api.http) = {
post: "/v1/mint/bolt11"
body: "*"
};
};
// Starting https://github.com/cashubtc/nuts/blob/main/05.md
rpc MeltQuote(PostMeltQuoteBolt11Request) returns (PostMeltQuoteBolt11Response){
option (google.api.http) = {
post: "/v1/melt/quote/bolt11"
body: "*"
};
};
rpc MeltQuoteState(GetQuoteBolt11StateRequest) returns (PostMeltQuoteBolt11Response){
option (google.api.http) = {
get: "/v1/melt/quote/bolt11/{quote_id}"
};
};
rpc Melt(PostMeltBolt11Request) returns (PostMeltBolt11Response){
option (google.api.http) = {
post: "/v1/melt/bolt11"
body: "*"
};
};
// Starting https://github.com/cashubtc/nuts/blob/main/06.md
rpc Info(InfoRequest) returns (InfoResponse){
option (google.api.http) = {
get: "/v1/info"
};
};
// Starting https://github.com/cashubtc/nuts/blob/main/07.md
rpc CheckState(PostCheckStateRequest) returns (PostCheckStateResponse){
option (google.api.http) = {
post: "/v1/checkstate"
};
};
}