@@ -6,22 +6,21 @@ import "google/api/annotations.proto";
6
6
import "ark/v1/types.proto" ;
7
7
8
8
service AdminService {
9
- rpc GetScheduledSweep ( GetScheduledSweepRequest ) returns (GetScheduledSweepResponse ) {
9
+ rpc GetCommitmentTxInfo ( GetCommitmentTxInfoRequest ) returns (GetCommitmentTxInfoResponse ) {
10
10
option (google.api.http ) = {
11
- get : "/v1/admin/sweeps "
11
+ get : "/v1/admin/commitmentTx/{id} "
12
12
};
13
13
}
14
- rpc GetBatch ( GetBatchRequest ) returns (GetBatchResponse ) {
14
+ rpc GetCommitmentTxs ( GetCommitmentTxsRequest ) returns (GetCommitmentTxsResponse ) {
15
15
option (google.api.http ) = {
16
- get : "/v1/admin/batch/{batch_id} "
16
+ get : "/v1/admin/commitmentTxs "
17
17
};
18
18
}
19
- rpc GetBatches ( GetBatchesRequest ) returns (GetBatchesResponse ) {
19
+ rpc GetScheduledSweep ( GetScheduledSweepRequest ) returns (GetScheduledSweepResponse ) {
20
20
option (google.api.http ) = {
21
- post : "/v1/admin/batches"
22
- body : "*"
21
+ get : "/v1/admin/sweeps"
23
22
};
24
- }
23
+ }
25
24
rpc CreateNote (CreateNoteRequest ) returns (CreateNoteResponse ) {
26
25
option (google.api.http ) = {
27
26
post : "/v1/admin/note"
@@ -39,40 +38,43 @@ service AdminService {
39
38
body : "*"
40
39
};
41
40
}
42
- rpc GetTxRequestQueue ( GetTxRequestQueueRequest ) returns (GetTxRequestQueueResponse ) {
41
+ rpc ListIntents ( ListIntentsRequest ) returns (ListIntentsResponse ) {
43
42
option (google.api.http ) = {
44
- get : "/v1/admin/queue "
43
+ get : "/v1/admin/intents "
45
44
};
46
45
}
47
- rpc DeleteTxRequests ( DeleteTxRequestsRequest ) returns (DeleteTxRequestsResponse ) {
46
+ rpc DeleteIntents ( DeleteIntentsRequest ) returns (DeleteIntentsResponse ) {
48
47
option (google.api.http ) = {
49
- post : "/v1/admin/queue /delete"
48
+ post : "/v1/admin/intents /delete"
50
49
body : "*"
51
50
};
52
51
}
53
52
}
54
53
55
- message GetScheduledSweepRequest {}
56
- message GetScheduledSweepResponse {
57
- repeated ScheduledSweep sweeps = 1 ;
54
+ message GetCommitmentTxInfoRequest {
55
+ string id = 1 ;
56
+ }
57
+ message GetCommitmentTxInfoResponse {
58
+ oneof commitment_tx {
59
+ CommitmentTxCompleted success = 1 ;
60
+ CommitmentTxFailed failure = 2 ;
61
+ }
58
62
}
59
63
60
- message GetBatchRequest {
61
- string batch_id = 1 ;
64
+ message GetCommitmentTxsRequest {
65
+ int64 before = 1 ;
66
+ int64 after = 2 ;
62
67
}
63
- message GetBatchResponse {
64
- oneof batch {
65
- BatchCompleted success = 1 ;
66
- BatchFailed failure = 2 ;
67
- }
68
+ message GetCommitmentTxsResponse {
69
+ repeated string ids = 1 ;
68
70
}
69
71
70
- message GetBatchesRequest {
71
- int64 after = 1 ;
72
- int64 before = 2 ;
72
+ message GetScheduledSweepRequest {
73
+ PageRequest page = 1 ;
73
74
}
74
- message GetBatchesResponse {
75
- repeated string batch_ids = 1 ;
75
+ message GetScheduledSweepResponse {
76
+ repeated ScheduledSweep sweeps = 1 ;
77
+ PageResponse page = 2 ;
76
78
}
77
79
78
80
message CreateNoteRequest {
@@ -85,22 +87,101 @@ message CreateNoteResponse {
85
87
86
88
message GetMarketHourRequest {}
87
89
message GetMarketHourResponse {
88
- MarketHourConfig market_hour_config = 1 ;
90
+ MarketHourConfig market_hour = 1 ;
89
91
}
90
92
91
93
message UpdateMarketHourRequest {
92
- MarketHourConfig market_hour_config = 1 ;
94
+ MarketHourConfig market_hour = 1 ;
93
95
}
94
96
message UpdateMarketHourResponse {}
95
97
96
- message GetTxRequestQueueRequest {
97
- repeated string request_ids = 1 ;
98
+ message ListIntentsRequest {
99
+ repeated string intent_ids = 1 ;
100
+ }
101
+ message ListIntentsResponse {
102
+ repeated Intent intents = 1 ;
103
+ }
104
+
105
+ message DeleteIntentsRequest {
106
+ repeated string intent_ids = 1 ;
107
+ }
108
+ message DeleteIntentsResponse {}
109
+
110
+ enum BatchStage {
111
+ BATCH_STAGE_UNSPECIFIED = 0 ;
112
+ BATCH_STAGE_REGISTRATION = 1 ;
113
+ BATCH_STAGE_FINALIZATION = 2 ;
114
+ BATCH_STAGE_FINALIZED = 3 ;
115
+ BATCH_STAGE_FAILED = 4 ;
116
+ }
117
+
118
+ message BatchSuccess {
119
+ uint64 total_forfeit_amount = 1 ;
120
+ uint64 total_boarding_amount = 2 ;
121
+ uint64 total_batch_amount = 3 ;
122
+ uint64 total_exit_amount = 4 ;
123
+ uint64 total_fee_amount = 5 ;
124
+ repeated Outpoint input_vtxos = 6 ;
125
+ repeated Outpoint boarding_utxos = 7 ;
126
+ repeated Outpoint output_vtxos = 8 ;
127
+ repeated Outpoint collaborative_exit_utxos = 9 ;
128
+ bool swept = 10 ;
129
+ int64 swept_at = 11 ;
130
+ repeated string swept_by = 12 ;
131
+ int64 sweep_scheduled_at = 13 ;
132
+ }
133
+
134
+ message BatchFailed {
135
+ BatchStage stage = 1 ;
136
+ string reason = 2 ;
137
+ }
138
+
139
+ message CommitmentTxCompleted {
140
+ string id = 1 ;
141
+ string commitment_txid = 2 ;
142
+ string commitment_tx = 3 ;
143
+ int64 started_at = 4 ;
144
+ int64 ended_at = 5 ;
145
+ map <uint32 , BatchSuccess > batches = 6 ;
146
+ }
147
+
148
+ message CommitmentTxFailed {
149
+ string id = 1 ;
150
+ int64 started_at = 4 ;
151
+ int64 ended_at = 5 ;
152
+ map <uint32 , BatchFailed > batches = 6 ;
153
+ }
154
+
155
+ message MarketHourConfig {
156
+ int64 start_time = 1 ;
157
+ int64 end_time = 2 ;
158
+ int64 period = 3 ;
159
+ int64 round_interval = 4 ;
98
160
}
99
- message GetTxRequestQueueResponse {
100
- repeated TxRequestInfo requests = 1 ;
161
+
162
+ message ScheduledSweep {
163
+ string batch_id = 1 ;
164
+ string commitment_txid = 2 ;
165
+ int32 num_transactions_to_broadcast = 3 ;
166
+ uint64 amount_to_sweep = 4 ;
167
+ int64 scheduled_start_time = 5 ;
168
+ int64 expected_end_time = 6 ;
101
169
}
102
170
103
- message DeleteTxRequestsRequest {
104
- repeated string request_ids = 1 ;
171
+ message IntentInput {
172
+ string txid = 1 ;
173
+ uint32 vout = 2 ;
174
+ uint64 amount = 3 ;
105
175
}
106
- message DeleteTxRequestsResponse {}
176
+
177
+ message Intent {
178
+ string id = 1 ;
179
+ int64 created_at = 2 ;
180
+ repeated Output receivers = 3 ;
181
+ repeated IntentInput inputs = 4 ;
182
+ repeated IntentInput boarding_inputs = 5 ;
183
+ repeated string notes = 6 ;
184
+ string signing_type = 7 ;
185
+ repeated string cosigners_public_keys = 8 ;
186
+ int64 last_ping = 9 ;
187
+ }
0 commit comments