@@ -3,152 +3,44 @@ syntax = "proto3";
3
3
package ark.v1 ;
4
4
5
5
import "google/api/annotations.proto" ;
6
- import "ark/v1/new_types.proto" ;
7
6
import "ark/v1/types.proto" ;
8
7
9
8
service ExplorerService {
10
- rpc GetCommitmentTx ( GetCommitmentTxRequest ) returns (GetCommitmentTxResponse ) {
9
+ rpc GetRound ( GetRoundRequest ) returns (GetRoundResponse ) {
11
10
option (google.api.http ) = {
12
- get : "/v1/commitmentTx /{txid}"
11
+ get : "/v1/round /{txid}"
13
12
};
14
13
};
15
- rpc GetVtxoTree ( GetVtxoTreeRequest ) returns (GetVtxoTreeResponse ) {
14
+ rpc GetRoundById ( GetRoundByIdRequest ) returns (GetRoundByIdResponse ) {
16
15
option (google.api.http ) = {
17
- get : "/v1/batch/{batch_outpoint.txid}/{batch_outpoint.vout}/tree "
16
+ get : "/v1/round/id/{id} "
18
17
};
19
18
};
20
- rpc GetForfeitTxs (GetForfeitTxsRequest ) returns (GetForfeitTxsResponse ) {
21
- option (google.api.http ) = {
22
- get : "/v1/batch/{batch_outpoint.txid}/{batch_outpoint.vout}/forfeitTxs"
23
- };
24
- };
25
- rpc GetConnectors (GetConnectorsRequest ) returns (GetConnectorsResponse ) {
26
- option (google.api.http ) = {
27
- get : "/v1/batch/{batch_outpoint.txid}/{batch_outpoint.vout}/connectors"
28
- };
29
- };
30
- rpc GetSpendableVtxos (GetSpendableVtxosRequest ) returns (GetSpendableVtxosResponse ) {
19
+ rpc ListVtxos (ListVtxosRequest ) returns (ListVtxosResponse ) {
31
20
option (google.api.http ) = {
32
21
get : "/v1/vtxos/{address}"
33
22
};
34
23
};
35
- rpc GetTransactionHistory (GetTransactionHistoryRequest ) returns (GetTransactionHistoryResponse ) {
36
- option (google.api.http ) = {
37
- get : "/v1/history/{address}"
38
- };
39
- };
40
- rpc GetVtxoChain (GetVtxoChainRequest ) returns (GetVtxoChainResponse ) {
41
- option (google.api.http ) = {
42
- get : "/v1/vtxo/{outpoint.txid}/{outpoint.vout}/chain"
43
- };
44
- }
45
- rpc GetVirtualTxs (GetVirtualTxsRequest ) returns (GetVirtualTxsResponse ) {
46
- option (google.api.http ) = {
47
- get : "/v1/virtualTx/{txids}"
48
- };
49
- }
50
- rpc GetSweptCommitmentTx (GetSweptCommitmentTxRequest ) returns (GetSweptCommitmentTxResponse ) {
51
- option (google.api.http ) = {
52
- get : "/v1/commitmentTx/{txid}/swept"
53
- };
54
- }
55
- rpc SubscribeForAddresses (SubscribeForAddressesRequest ) returns (stream SubscribeForAddressesResponse ) {
56
- option (google.api.http ) = {
57
- get : "/v1/address/subscribe"
58
- };
59
- }
60
24
}
61
25
62
- message GetCommitmentTxRequest {
26
+ message GetRoundRequest {
63
27
string txid = 1 ;
64
28
}
65
- message GetCommitmentTxResponse {
66
- int64 started_at = 1 ;
67
- int64 ended_at = 2 ;
68
- map <uint32 , Batch > batches = 3 ;
29
+ message GetRoundResponse {
30
+ Round round = 1 ;
69
31
}
70
32
71
- message GetVtxoTreeRequest {
72
- Outpoint batch_outpoint = 1 ;
73
- PageRequest page = 2 ;
33
+ message GetRoundByIdRequest {
34
+ string id = 1 ;
74
35
}
75
- message GetVtxoTreeResponse {
76
- repeated NodeNew vtxo_tree = 1 ;
77
- PageResponse page = 2 ;
36
+ message GetRoundByIdResponse {
37
+ Round round = 1 ;
78
38
}
79
39
80
- message GetForfeitTxsRequest {
81
- Outpoint batch_outpoint = 1 ;
82
- PageRequest page = 2 ;
83
- }
84
- message GetForfeitTxsResponse {
85
- repeated string txs = 1 ;
86
- PageResponse page = 2 ;
87
- }
88
-
89
- message GetConnectorsRequest {
90
- Outpoint batch_outpoint = 1 ;
91
- PageRequest page = 2 ;
92
- }
93
- message GetConnectorsResponse {
94
- repeated NodeNew connectors = 1 ;
95
- PageResponse page = 2 ;
96
- }
97
-
98
- message GetSpendableVtxosRequest {
99
- string address = 1 ;
100
- PageRequest page = 2 ;
101
- }
102
- message GetSpendableVtxosResponse {
103
- repeated NewVtxo vtxos = 1 ;
104
- PageResponse page = 2 ;
105
- }
106
-
107
- message GetTransactionHistoryRequest {
40
+ message ListVtxosRequest {
108
41
string address = 1 ;
109
- int64 start_time = 2 ;
110
- int64 end_time = 3 ;
111
- PageRequest page = 4 ;
112
- }
113
- message GetTransactionHistoryResponse {
114
- repeated TxHistoryRecord history = 1 ;
115
- PageResponse page = 2 ;
116
- }
117
-
118
- message GetVtxoChainRequest {
119
- Outpoint outpoint = 1 ;
120
- PageRequest page = 2 ;
121
- }
122
- message GetVtxoChainResponse {
123
- map <string , Transactions > graph = 1 ;
124
- PageResponse page = 2 ;
125
- }
126
-
127
- message GetVirtualTxsRequest {
128
- repeated string txids = 1 ;
129
- PageRequest page = 2 ;
130
42
}
131
- message GetVirtualTxsResponse {
132
- repeated string txs = 1 ;
133
- PageResponse page = 2 ;
134
- }
135
-
136
- message GetSweptCommitmentTxRequest {
137
- string txid = 1 ;
138
- }
139
- message GetSweptCommitmentTxResponse {
140
- repeated string swept_by = 1 ;
141
- }
142
-
143
- message SubscribeForAddressesRequest {
144
- repeated string addresses = 1 ;
145
- }
146
- message SubscribeForAddressesResponse {
147
- string address = 1 ;
148
- repeated NewVtxo new_vtxos = 2 ;
149
- repeated NewVtxo spent_vtxos = 3 ;
150
- }
151
-
152
- message Transactions {
153
- repeated string txs = 1 ;
43
+ message ListVtxosResponse {
44
+ repeated Vtxo spendable_vtxos = 1 ;
45
+ repeated Vtxo spent_vtxos = 2 ;
154
46
}
0 commit comments