Skip to content

Commit 0b1c279

Browse files
committed
Squashed commit of the following:
commit 7c5dbb5 Author: altafan <[email protected]> Date: Tue Apr 29 14:15:17 2025 +0200 Update indexer grpc and rest clients commit 31e1dab Author: altafan <[email protected]> Date: Tue Apr 29 14:12:24 2025 +0200 Make GetVtxos accept multiple addresses commit e37e8f8 Author: altafan <[email protected]> Date: Tue Apr 29 12:57:30 2025 +0200 GetForfeitTxs and GetConnectors with commitmentTxid commit af5257d Author: altafan <[email protected]> Date: Mon Apr 28 19:00:42 2025 +0200 Move indexer to its own folder commit 290b089 Author: altafan <[email protected]> Date: Mon Apr 28 18:59:17 2025 +0200 Proto fields renaming commit b2cc958 Author: altafan <[email protected]> Date: Fri Apr 25 15:16:12 2025 +0200 Update app and interface layers commit 2387c06 Author: altafan <[email protected]> Date: Fri Apr 25 15:12:58 2025 +0200 Add custom queries to repo interfaces and related impls commit b3fdf7f Author: altafan <[email protected]> Date: Fri Apr 25 15:11:51 2025 +0200 Update indexer proto: * Add endpoints to get tree leaves * Rename endpoint to GetVtxos * Move forfeit info at commitment tx level * Add depth and root comm txid to GetVtxoChainResponse * Polish commit f6ff2dd Author: altafan <[email protected]> Date: Tue Apr 22 19:55:07 2025 +0200 Fix spendable vtxos endpoint commit 1463fbe Author: altafan <[email protected]> Date: Tue Apr 22 19:49:48 2025 +0200 Fix returning redeem txs with matching txid in sqlite db commit 49b51d5 Author: altafan <[email protected]> Date: Tue Apr 22 18:01:14 2025 +0200 Fix return txid in history endpoint commit 20aa611 Author: altafan <[email protected]> Date: Tue Apr 22 13:33:46 2025 +0200 Fix test commit d893ee7 Merge: cb3a337 5007f8c Author: altafan <[email protected]> Date: Tue Apr 22 12:51:32 2025 +0200 Merge branch 'master' into indexer commit cb3a337 Author: altafan <[email protected]> Date: Tue Apr 22 12:47:16 2025 +0200 Doxkerize sqlc command commit 144a46b Author: altafan <[email protected]> Date: Tue Apr 22 12:45:16 2025 +0200 Update client sdk commit 6024b68 Author: altafan <[email protected]> Date: Tue Apr 22 12:44:11 2025 +0200 Updates and fixes to indexer svc commit 0e8640c Author: altafan <[email protected]> Date: Tue Apr 22 12:33:37 2025 +0200 Fixes commit 85b3098 Author: altafan <[email protected]> Date: Tue Apr 22 12:33:15 2025 +0200 Add info to chained tx & Fix rest endpoint conflict commit ae9e3d3 Author: altafan <[email protected]> Date: Tue Apr 22 12:27:38 2025 +0200 Add api to vtxo repo to get all vtxos with pubkey & Fixes commit b1978dc Author: altafan <[email protected]> Date: Fri Apr 18 14:59:50 2025 +0200 Fix commit aea61bc Author: altafan <[email protected]> Date: Fri Apr 18 14:59:42 2025 +0200 Update sdk commit d119966 Author: altafan <[email protected]> Date: Fri Apr 18 14:59:01 2025 +0200 Update protos commit ef64ae4 Author: altafan <[email protected]> Date: Fri Apr 18 14:58:47 2025 +0200 Fix interface layer commit f7974f4 Author: altafan <[email protected]> Date: Fri Apr 18 14:58:29 2025 +0200 Fix app layer commit ccbaaa1 Author: altafan <[email protected]> Date: Fri Apr 18 14:57:14 2025 +0200 Fix queries commit 36effad Author: altafan <[email protected]> Date: Fri Apr 18 14:56:09 2025 +0200 Add indexer to grpc-gateway commit 845fd8f Author: Dusan Sekulic <[email protected]> Date: Fri Apr 11 11:54:05 2025 +0200 pr review commit 3010197 Merge: 4576949 5ab17a7 Author: Dusan Sekulic <[email protected]> Date: Fri Apr 11 07:20:23 2025 +0200 Merge branch 'master' into indexer commit 4576949 Author: Dusan Sekulic <[email protected]> Date: Tue Apr 8 13:55:58 2025 +0200 fix commit fe47190 Merge: c28bb48 eaa302a Author: Dusan Sekulic <[email protected]> Date: Tue Apr 8 13:48:52 2025 +0200 merge commit eaa302a Author: Dusan Sekulic <[email protected]> Date: Tue Apr 8 13:46:23 2025 +0200 sdk indexer impl commit c28bb48 Author: Dusan Sekulic <[email protected]> Date: Tue Apr 8 12:10:44 2025 +0200 init commit d8b6809 Author: Dusan Sekulic <[email protected]> Date: Mon Apr 7 13:16:09 2025 +0200 fix commit cd50656 Author: Dusan Sekulic <[email protected]> Date: Mon Apr 7 12:54:55 2025 +0200 fix commit 91d7e3f Author: Dusan Sekulic <[email protected]> Date: Mon Apr 7 10:17:23 2025 +0200 fix lint commit 97f6f3b Merge: 57e2978 2b38045 Author: Dusan Sekulic <[email protected]> Date: Fri Apr 4 12:32:48 2025 +0200 merge with master commit 57e2978 Author: Dusan Sekulic <[email protected]> Date: Fri Apr 4 12:08:37 2025 +0200 tmp commit b512da3 Merge: ee11775 a2e2614 Author: Dusan Sekulic <[email protected]> Date: Thu Apr 3 09:51:10 2025 +0200 Merge branch 'master' into explorer-api-impl commit ee11775 Author: Dusan Sekulic <[email protected]> Date: Thu Apr 3 09:48:50 2025 +0200 indexer.proto commit 4b44911 Author: Dusan Sekulic <[email protected]> Date: Wed Apr 2 17:51:37 2025 +0200 pr review commit 5a47ad3 Author: Dusan Sekulic <[email protected]> Date: Wed Apr 2 09:58:21 2025 +0200 pr review commit d00b843 Author: Dusan Sekulic <[email protected]> Date: Mon Mar 31 14:54:41 2025 +0200 explorer get tx history commit 3c8b802 Author: Dusan Sekulic <[email protected]> Date: Fri Mar 28 18:04:22 2025 +0100 wip explorer commit 1311785 Merge: e80f819 6fc9c80 Author: Dusan Sekulic <[email protected]> Date: Fri Mar 28 12:56:29 2025 +0100 Merge remote-tracking branch 'origin/new-api-spec' into explorer-api-impl commit e80f819 Author: Dusan Sekulic <[email protected]> Date: Fri Mar 28 12:56:22 2025 +0100 init commit 6fc9c80 Author: altafan <[email protected]> Date: Fri Mar 28 12:47:49 2025 +0100 Add endpoint to explorer to subscribe for addresses commit 2540395 Author: altafan <[email protected]> Date: Fri Mar 28 12:42:47 2025 +0100 Fix virtual tx apis commit 988f96e Author: altafan <[email protected]> Date: Wed Mar 26 17:55:02 2025 +0100 Fixes commit 216cd39 Author: altafan <[email protected]> Date: Wed Mar 26 14:40:13 2025 +0100 New iteration commit 5b8f528 Author: altafan <[email protected]> Date: Fri Mar 21 17:13:51 2025 +0100 Fixes after review commit f067afe Author: altafan <[email protected]> Date: Fri Mar 21 17:02:54 2025 +0100 Add endpoint to get chain of txs for a vtxo commit 01b15ae Author: altafan <[email protected]> Date: Thu Mar 20 18:35:29 2025 +0100 Draft APIs for v0.6
1 parent 3d0bbb0 commit 0b1c279

File tree

88 files changed

+19414
-81
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+19414
-81
lines changed

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

Lines changed: 944 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"title": "ark/v1/new_types.proto",
5+
"version": "version not set"
6+
},
7+
"consumes": [
8+
"application/json"
9+
],
10+
"produces": [
11+
"application/json"
12+
],
13+
"paths": {},
14+
"definitions": {
15+
"protobufAny": {
16+
"type": "object",
17+
"properties": {
18+
"@type": {
19+
"type": "string"
20+
}
21+
},
22+
"additionalProperties": {}
23+
},
24+
"rpcStatus": {
25+
"type": "object",
26+
"properties": {
27+
"code": {
28+
"type": "integer",
29+
"format": "int32"
30+
},
31+
"message": {
32+
"type": "string"
33+
},
34+
"details": {
35+
"type": "array",
36+
"items": {
37+
"type": "object",
38+
"$ref": "#/definitions/protobufAny"
39+
}
40+
}
41+
}
42+
}
43+
}
44+
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ service AdminService {
2323
post: "/v1/admin/rounds"
2424
body: "*"
2525
};
26-
}
26+
}
2727
rpc CreateNote(CreateNoteRequest) returns (CreateNoteResponse) {
2828
option (google.api.http) = {
2929
post: "/v1/admin/note"
@@ -98,11 +98,11 @@ message CreateNoteResponse {
9898

9999
message GetMarketHourConfigRequest {}
100100
message GetMarketHourConfigResponse {
101-
MarketHourConfig config = 1;
101+
MarketHourConfig config = 1;
102102
}
103103

104104
message UpdateMarketHourConfigRequest {
105-
MarketHourConfig config = 1;
105+
MarketHourConfig config = 1;
106106
}
107107
message UpdateMarketHourConfigResponse {}
108108

@@ -131,4 +131,4 @@ message WithdrawRequest {
131131

132132
message WithdrawResponse {
133133
string txid = 1;
134-
}
134+
}
Lines changed: 257 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,257 @@
1+
syntax = "proto3";
2+
3+
package ark.v1;
4+
5+
import "google/api/annotations.proto";
6+
7+
service IndexerService {
8+
rpc GetCommitmentTx(GetCommitmentTxRequest) returns (GetCommitmentTxResponse) {
9+
option (google.api.http) = {
10+
get: "/v1/commitmentTx/{txid}"
11+
};
12+
};
13+
rpc GetForfeitTxs(GetForfeitTxsRequest) returns (GetForfeitTxsResponse) {
14+
option (google.api.http) = {
15+
get: "/v1/commitmentTx/{txid}/forfeitTxs"
16+
};
17+
};
18+
rpc GetConnectors(GetConnectorsRequest) returns (GetConnectorsResponse) {
19+
option (google.api.http) = {
20+
get: "/v1/commitmentTx/{txid}/connectors"
21+
};
22+
};
23+
rpc GetCommitmentTxLeaves(GetCommitmentTxLeavesRequest) returns (GetCommitmentTxLeavesResponse) {
24+
option (google.api.http) = {
25+
get: "/v1/commitmentTx/{txid}/leaves"
26+
};
27+
};
28+
rpc GetVtxoTree(GetVtxoTreeRequest) returns (GetVtxoTreeResponse) {
29+
option (google.api.http) = {
30+
get: "/v1/batch/{batch_outpoint.txid}/{batch_outpoint.vout}/tree"
31+
};
32+
};
33+
rpc GetVtxoTreeLeaves(GetVtxoTreeLeavesRequest) returns (GetVtxoTreeLeavesResponse) {
34+
option (google.api.http) = {
35+
get: "/v1/batch/{batch_outpoint.txid}/{batch_outpoint.vout}/tree/leaves"
36+
};
37+
};
38+
rpc GetVtxos(GetVtxosRequest) returns (GetVtxosResponse) {
39+
option (google.api.http) = {
40+
get: "/v1/getVtxos/{addresses}"
41+
};
42+
};
43+
rpc GetTransactionHistory(GetTransactionHistoryRequest) returns (GetTransactionHistoryResponse) {
44+
option (google.api.http) = {
45+
get: "/v1/history/{address}"
46+
};
47+
};
48+
rpc GetVtxoChain(GetVtxoChainRequest) returns (GetVtxoChainResponse) {
49+
option (google.api.http) = {
50+
get: "/v1/vtxo/{outpoint.txid}/{outpoint.vout}/chain"
51+
};
52+
}
53+
rpc GetVirtualTxs(GetVirtualTxsRequest) returns (GetVirtualTxsResponse) {
54+
option (google.api.http) = {
55+
get: "/v1/virtualTx/{txids}"
56+
};
57+
}
58+
rpc GetSweptCommitmentTx(GetSweptCommitmentTxRequest) returns (GetSweptCommitmentTxResponse) {
59+
option (google.api.http) = {
60+
get: "/v1/commitmentTx/{txid}/swept"
61+
};
62+
}
63+
}
64+
65+
message GetCommitmentTxRequest {
66+
string txid = 1;
67+
}
68+
message GetCommitmentTxResponse {
69+
int64 started_at = 1;
70+
int64 ended_at = 2;
71+
map<uint32, IndexerBatch> batches = 3;
72+
uint64 total_input_amount = 4;
73+
int32 total_input_vtxos = 5;
74+
uint64 total_output_amount = 6;
75+
int32 total_output_vtxos = 7;
76+
}
77+
78+
message GetForfeitTxsRequest {
79+
string txid = 1;
80+
IndexerPageRequest page = 2;
81+
}
82+
message GetForfeitTxsResponse {
83+
repeated string txids = 1;
84+
IndexerPageResponse page = 2;
85+
}
86+
87+
message GetConnectorsRequest {
88+
string txid = 1;
89+
IndexerPageRequest page = 2;
90+
}
91+
message GetConnectorsResponse {
92+
repeated IndexerNode connectors = 1;
93+
IndexerPageResponse page = 2;
94+
}
95+
96+
message GetCommitmentTxLeavesRequest {
97+
string txid = 1;
98+
IndexerPageRequest page = 2;
99+
}
100+
message GetCommitmentTxLeavesResponse {
101+
repeated IndexerOutpoint leaves = 1;
102+
IndexerPageResponse page = 2;
103+
}
104+
105+
message GetVtxoTreeRequest {
106+
IndexerOutpoint batch_outpoint = 1;
107+
IndexerPageRequest page = 2;
108+
}
109+
message GetVtxoTreeResponse {
110+
repeated IndexerNode vtxo_tree = 1;
111+
IndexerPageResponse page = 2;
112+
}
113+
114+
message GetVtxoTreeLeavesRequest {
115+
IndexerOutpoint batch_outpoint = 1;
116+
IndexerPageRequest page = 2;
117+
}
118+
message GetVtxoTreeLeavesResponse {
119+
repeated IndexerOutpoint leaves = 1;
120+
IndexerPageResponse page = 2;
121+
}
122+
123+
message GetVtxosRequest {
124+
repeated string addresses = 1;
125+
bool spendable_only = 2;
126+
bool spent_only = 3;
127+
IndexerPageRequest page = 4;
128+
}
129+
message GetVtxosResponse {
130+
repeated IndexerVtxo vtxos = 1;
131+
IndexerPageResponse page = 2;
132+
}
133+
134+
message GetTransactionHistoryRequest {
135+
string address = 1;
136+
int64 start_time = 2;
137+
int64 end_time = 3;
138+
IndexerPageRequest page = 4;
139+
}
140+
message GetTransactionHistoryResponse {
141+
repeated IndexerTxHistoryRecord history = 1;
142+
IndexerPageResponse page = 2;
143+
}
144+
145+
message GetVtxoChainRequest {
146+
IndexerOutpoint outpoint = 1;
147+
IndexerPageRequest page = 2;
148+
}
149+
message GetVtxoChainResponse {
150+
repeated IndexerChain chain = 1;
151+
int32 depth = 2;
152+
string root_commitment_txid = 3;
153+
IndexerPageResponse page = 4;
154+
}
155+
156+
message GetVirtualTxsRequest {
157+
repeated string txids = 1;
158+
IndexerPageRequest page = 2;
159+
}
160+
message GetVirtualTxsResponse {
161+
repeated string txs = 1;
162+
IndexerPageResponse page = 2;
163+
}
164+
165+
message GetSweptCommitmentTxRequest {
166+
string txid = 1;
167+
}
168+
message GetSweptCommitmentTxResponse {
169+
repeated string swept_by = 1;
170+
}
171+
172+
message SubscribeForAddressesRequest {
173+
repeated string addresses = 1;
174+
}
175+
message SubscribeForAddressesResponse {
176+
string address = 1;
177+
repeated IndexerVtxo new_vtxos = 2;
178+
repeated IndexerVtxo spent_vtxos = 3;
179+
}
180+
181+
message IndexerBatch {
182+
uint64 total_output_amount = 1;
183+
int32 total_output_vtxos = 2;
184+
int64 expires_at = 3;
185+
bool swept = 4;
186+
}
187+
188+
message IndexerOutpoint {
189+
string txid = 1;
190+
uint32 vout = 2;
191+
}
192+
193+
message IndexerNode {
194+
string txid = 1;
195+
string parent_txid = 3;
196+
int32 level = 4;
197+
int32 level_index = 5;
198+
}
199+
200+
message IndexerVtxo {
201+
IndexerOutpoint outpoint = 1;
202+
int64 created_at = 2;
203+
int64 expires_at = 3;
204+
uint64 amount = 4;
205+
string script = 5;
206+
bool is_leaf = 6;
207+
bool is_swept = 7;
208+
bool is_spent = 8;
209+
string spent_by = 9;
210+
string commitment_txid = 10;
211+
}
212+
213+
message IndexerChain {
214+
string txid = 1;
215+
repeated IndexerChainedTx spends = 2;
216+
int64 expires_at = 3;
217+
}
218+
219+
message IndexerChainedTx {
220+
string txid = 1;
221+
IndexerChainedTxType type = 2;
222+
}
223+
224+
message IndexerTxHistoryRecord {
225+
oneof key {
226+
string commitment_txid = 1;
227+
string virtual_txid = 2;
228+
}
229+
IndexerTxType type = 3;
230+
uint64 amount = 4;
231+
int64 created_at = 5;
232+
bool is_settled = 6;
233+
string settled_by = 7;
234+
}
235+
236+
enum IndexerTxType {
237+
INDEXER_TX_TYPE_UNSPECIFIED = 0;
238+
INDEXER_TX_TYPE_RECEIVED = 1;
239+
INDEXER_TX_TYPE_SENT = 2;
240+
}
241+
242+
enum IndexerChainedTxType {
243+
INDEXER_CHAINED_TX_TYPE_UNSPECIFIED = 0;
244+
INDEXER_CHAINED_TX_TYPE_VIRTUAL = 1;
245+
INDEXER_CHAINED_TX_TYPE_COMMITMENT = 2;
246+
}
247+
248+
message IndexerPageRequest {
249+
int32 size = 1;
250+
int32 index = 2;
251+
}
252+
253+
message IndexerPageResponse {
254+
int32 current = 1;
255+
int32 next = 2;
256+
int32 total = 3;
257+
}

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

100755100644
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ message Musig2 {
138138

139139
message RegisterOutputsForNextRoundRequest {
140140
string request_id = 1;
141-
// List of receivers for to convert to leaves in the next VTXO tree.
141+
// List of receivers for to convert to leaves in the next VTXO tree.
142142
repeated Output outputs = 2;
143143
optional Musig2 musig2 = 3;
144144
}
@@ -159,7 +159,7 @@ message SubmitTreeSignaturesRequest {
159159
message SubmitTreeSignaturesResponse {}
160160

161161
message SubmitSignedForfeitTxsRequest {
162-
// Forfeit txs signed by the user.
162+
// Forfeit txs signed by the user.
163163
repeated string signed_forfeit_txs = 1;
164164
// The user has to sign also the round tx if he registerd a boarding UTXO.
165165
optional string signed_round_tx = 2;
@@ -173,7 +173,7 @@ message GetEventStreamResponse {
173173
RoundFinalizedEvent round_finalized = 2;
174174
RoundFailed round_failed = 3;
175175
RoundSigningEvent round_signing = 4;
176-
RoundSigningNoncesGeneratedEvent round_signing_nonces_generated = 5;
176+
RoundSigningNoncesGeneratedEvent round_signing_nonces_generated = 5;
177177
}
178178
}
179179

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ service WalletInitializerService {
3131
rpc GetStatus(GetStatusRequest) returns (GetStatusResponse) {
3232
option (google.api.http) = {
3333
get: "/v1/admin/wallet/status"
34-
};
34+
};
3535
}
3636
}
3737

0 commit comments

Comments
 (0)