Skip to content

Commit 57e2978

Browse files
committed
tmp
1 parent b512da3 commit 57e2978

File tree

15 files changed

+627
-3978
lines changed

15 files changed

+627
-3978
lines changed

api-spec/openapi/swagger/ark/v1/explorer.swagger.json

Lines changed: 84 additions & 630 deletions
Large diffs are not rendered by default.

api-spec/protobuf/ark/v1/admin.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,4 @@ message WithdrawRequest {
131131

132132
message WithdrawResponse {
133133
string txid = 1;
134-
}
134+
}

api-spec/protobuf/ark/v1/explorer.proto

Lines changed: 16 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -3,152 +3,44 @@ syntax = "proto3";
33
package ark.v1;
44

55
import "google/api/annotations.proto";
6-
import "ark/v1/new_types.proto";
76
import "ark/v1/types.proto";
87

98
service ExplorerService {
10-
rpc GetCommitmentTx(GetCommitmentTxRequest) returns (GetCommitmentTxResponse) {
9+
rpc GetRound(GetRoundRequest) returns (GetRoundResponse) {
1110
option (google.api.http) = {
12-
get: "/v1/commitmentTx/{txid}"
11+
get: "/v1/round/{txid}"
1312
};
1413
};
15-
rpc GetVtxoTree(GetVtxoTreeRequest) returns (GetVtxoTreeResponse) {
14+
rpc GetRoundById(GetRoundByIdRequest) returns (GetRoundByIdResponse) {
1615
option (google.api.http) = {
17-
get: "/v1/batch/{batch_outpoint.txid}/{batch_outpoint.vout}/tree"
16+
get: "/v1/round/id/{id}"
1817
};
1918
};
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) {
3120
option (google.api.http) = {
3221
get: "/v1/vtxos/{address}"
3322
};
3423
};
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-
}
6024
}
6125

62-
message GetCommitmentTxRequest {
26+
message GetRoundRequest {
6327
string txid = 1;
6428
}
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;
6931
}
7032

71-
message GetVtxoTreeRequest {
72-
Outpoint batch_outpoint = 1;
73-
PageRequest page = 2;
33+
message GetRoundByIdRequest {
34+
string id = 1;
7435
}
75-
message GetVtxoTreeResponse {
76-
repeated NodeNew vtxo_tree = 1;
77-
PageResponse page = 2;
36+
message GetRoundByIdResponse {
37+
Round round = 1;
7838
}
7939

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 {
10841
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;
13042
}
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;
15446
}

api-spec/protobuf/ark/v1/new_types.proto

Lines changed: 0 additions & 142 deletions
This file was deleted.

api-spec/protobuf/ark/v1/service.proto

100755100644
File mode changed.

0 commit comments

Comments
 (0)