ark-rest 0.9.0

REST client for Ark server communication
Documentation
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
# \ArkServiceApi

All URIs are relative to _http://localhost_

| Method                                                                                              | HTTP request                             | Description |
| --------------------------------------------------------------------------------------------------- | ---------------------------------------- | ----------- |
| [**ark_service_confirm_registration**](ArkServiceApi.md#ark_service_confirm_registration)           | **POST** /v1/batch/ack                   |             |
| [**ark_service_delete_intent**](ArkServiceApi.md#ark_service_delete_intent)                         | **POST** /v1/batch/deleteIntent          |             |
| [**ark_service_estimate_intent_fee**](ArkServiceApi.md#ark_service_estimate_intent_fee)             | **POST** /v1/batch/estimateFee           |             |
| [**ark_service_finalize_tx**](ArkServiceApi.md#ark_service_finalize_tx)                             | **POST** /v1/tx/finalize                 |             |
| [**ark_service_get_event_stream**](ArkServiceApi.md#ark_service_get_event_stream)                   | **GET** /v1/batch/events                 |             |
| [**ark_service_get_info**](ArkServiceApi.md#ark_service_get_info)                                   | **GET** /v1/info                         |             |
| [**ark_service_get_intent**](ArkServiceApi.md#ark_service_get_intent)                               | **GET** /v1/intent                       |             |
| [**ark_service_get_intent2**](ArkServiceApi.md#ark_service_get_intent2)                             | **POST** /v1/intent                      |             |
| [**ark_service_get_pending_tx**](ArkServiceApi.md#ark_service_get_pending_tx)                       | **POST** /v1/tx/pending                  |             |
| [**ark_service_get_transactions_stream**](ArkServiceApi.md#ark_service_get_transactions_stream)     | **GET** /v1/txs                          |             |
| [**ark_service_register_intent**](ArkServiceApi.md#ark_service_register_intent)                     | **POST** /v1/batch/registerIntent        |             |
| [**ark_service_submit_signed_forfeit_txs**](ArkServiceApi.md#ark_service_submit_signed_forfeit_txs) | **POST** /v1/batch/submitForfeitTxs      |             |
| [**ark_service_submit_tree_nonces**](ArkServiceApi.md#ark_service_submit_tree_nonces)               | **POST** /v1/batch/tree/submitNonces     |             |
| [**ark_service_submit_tree_signatures**](ArkServiceApi.md#ark_service_submit_tree_signatures)       | **POST** /v1/batch/tree/submitSignatures |             |
| [**ark_service_submit_tx**](ArkServiceApi.md#ark_service_submit_tx)                                 | **POST** /v1/tx/submit                   |             |
| [**ark_service_update_stream_topics**](ArkServiceApi.md#ark_service_update_stream_topics)           | **POST** /v1/batch/updateTopics          |             |

## ark_service_confirm_registration

> serde_json::Value ark_service_confirm_registration(confirm_registration_request)

ConfirmRegistration allows a client that has been selected for the next batch to confirm its participation by revealing the intent id.

### Parameters

| Name                             | Type                                                            | Description | Required   | Notes |
| -------------------------------- | --------------------------------------------------------------- | ----------- | ---------- | ----- |
| **confirm_registration_request** | [**ConfirmRegistrationRequest**](ConfirmRegistrationRequest.md) |             | [required] |       |

### Return type

[**serde_json::Value**](serde_json::Value.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

## ark_service_delete_intent

> serde_json::Value ark_service_delete_intent(delete_intent_request)

DeleteIntent removes a previously registered intent from the server. The client should provide the BIP-322 signature and message including any of the vtxos used in the registered intent to prove its ownership. The server should delete the intent and return success.

### Parameters

| Name                      | Type                                              | Description | Required   | Notes |
| ------------------------- | ------------------------------------------------- | ----------- | ---------- | ----- |
| **delete_intent_request** | [**DeleteIntentRequest**](DeleteIntentRequest.md) |             | [required] |       |

### Return type

[**serde_json::Value**](serde_json::Value.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

## ark_service_estimate_intent_fee

> models::EstimateIntentFeeResponse ark_service_estimate_intent_fee(estimate_intent_fee_request)

EstimateIntentFee allows to estimate the fees for a given intent. The client should provide a BIP-322 message with the same data as the register intent message, and the server should respond with the estimated fees in satoshis.

### Parameters

| Name                            | Type                                                        | Description | Required   | Notes |
| ------------------------------- | ----------------------------------------------------------- | ----------- | ---------- | ----- |
| **estimate_intent_fee_request** | [**EstimateIntentFeeRequest**](EstimateIntentFeeRequest.md) |             | [required] |       |

### Return type

[**models::EstimateIntentFeeResponse**](EstimateIntentFeeResponse.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

## ark_service_finalize_tx

> serde_json::Value ark_service_finalize_tx(finalize_tx_request)

FinalizeTx is the last lef of the process of spending vtxos offchain and allows a client to submit the fully signed checkpoint txs for the provided Ark txid . The server verifies the signed checkpoint transactions and returns success if everything is valid.

### Parameters

| Name                    | Type                                          | Description | Required   | Notes |
| ----------------------- | --------------------------------------------- | ----------- | ---------- | ----- |
| **finalize_tx_request** | [**FinalizeTxRequest**](FinalizeTxRequest.md) |             | [required] |       |

### Return type

[**serde_json::Value**](serde_json::Value.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

## ark_service_get_event_stream

> models::GetEventStreamResponse ark_service_get_event_stream(topics)

GetEventStream is a server-side streaming RPC that allows clients to receive a stream of events related to batch processing. Clients should use this stream as soon as they are ready to join a batch and can listen for various events such as batch start, batch finalization, and other related activities. The server pushes these events to the client in real-time as soon as its ready to move to the next phase of the batch processing. Upon creation of the stream, the event StreamStartedEvent is immediately sent, which passes along the stream id, to be used by the client for future calls to UpdateStreamTopics.

### Parameters

| Name       | Type                                 | Description | Required | Notes |
| ---------- | ------------------------------------ | ----------- | -------- | ----- |
| **topics** | Option<[**Vec<String>**](String.md)> |             |          |       |

### Return type

[**models::GetEventStreamResponse**](GetEventStreamResponse.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: text/event-stream, application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

## ark_service_get_info

> models::GetInfoResponse ark_service_get_info()

GetInfo returns information and parameters of the server.

### Parameters

This endpoint does not need any parameter.

### Return type

[**models::GetInfoResponse**](GetInfoResponse.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

## ark_service_get_intent

> models::GetIntentResponse ark_service_get_intent(txid, intent_period_proof, intent_period_message)

### Parameters

| Name                      | Type               | Description | Required | Notes |
| ------------------------- | ------------------ | ----------- | -------- | ----- |
| **txid**                  | Option<**String**> |             |          |       |
| **intent_period_proof**   | Option<**String**> |             |          |       |
| **intent_period_message** | Option<**String**> |             |          |       |

### Return type

[**models::GetIntentResponse**](GetIntentResponse.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

## ark_service_get_intent2

> models::GetIntentResponse ark_service_get_intent2(get_intent_request)

### Parameters

| Name                   | Type                                        | Description | Required   | Notes |
| ---------------------- | ------------------------------------------- | ----------- | ---------- | ----- |
| **get_intent_request** | [**GetIntentRequest**](GetIntentRequest.md) |             | [required] |       |

### Return type

[**models::GetIntentResponse**](GetIntentResponse.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

## ark_service_get_pending_tx

> models::GetPendingTxResponse ark_service_get_pending_tx(get_pending_tx_request)

GetPendingTx returns not finalized transaction(s) for a given set of inputs. the client should provide a BIP322 proof of ownership of the inputs

### Parameters

| Name                       | Type                                              | Description | Required   | Notes |
| -------------------------- | ------------------------------------------------- | ----------- | ---------- | ----- |
| **get_pending_tx_request** | [**GetPendingTxRequest**](GetPendingTxRequest.md) |             | [required] |       |

### Return type

[**models::GetPendingTxResponse**](GetPendingTxResponse.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

## ark_service_get_transactions_stream

> models::GetTransactionsStreamResponse ark_service_get_transactions_stream()

GetTransactionsStream is a server-side streaming RPC that allows clients to receive notifications in real-time about any commitment tx or ark tx processed and finalized by the server. NOTE: the stream doesn't have history support, therefore returns only txs from the moment it's opened until it's closed.

### Parameters

This endpoint does not need any parameter.

### Return type

[**models::GetTransactionsStreamResponse**](GetTransactionsStreamResponse.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: text/event-stream, application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

## ark_service_register_intent

> models::RegisterIntentResponse ark_service_register_intent(register_intent_request)

RegisterIntent allows to register a new intent that will be eventually selected by the server for a particular batch. The client should provide a BIP-322 message with the intent information, and the server should respond with an intent id.

### Parameters

| Name                        | Type                                                  | Description | Required   | Notes |
| --------------------------- | ----------------------------------------------------- | ----------- | ---------- | ----- |
| **register_intent_request** | [**RegisterIntentRequest**](RegisterIntentRequest.md) |             | [required] |       |

### Return type

[**models::RegisterIntentResponse**](RegisterIntentResponse.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

## ark_service_submit_signed_forfeit_txs

> serde_json::Value ark_service_submit_signed_forfeit_txs(submit_signed_forfeit_txs_request)

SubmitSignedForfeitTxs allows a client to submit signed forfeit transactions and/or signed commitment transaction (in case of onboarding). The server should verify the signed txs and return success.

### Parameters

| Name                                  | Type                                                                  | Description | Required   | Notes |
| ------------------------------------- | --------------------------------------------------------------------- | ----------- | ---------- | ----- |
| **submit_signed_forfeit_txs_request** | [**SubmitSignedForfeitTxsRequest**](SubmitSignedForfeitTxsRequest.md) |             | [required] |       |

### Return type

[**serde_json::Value**](serde_json::Value.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

## ark_service_submit_tree_nonces

> serde_json::Value ark_service_submit_tree_nonces(submit_tree_nonces_request)

SubmitTreeNonces allows a cosigner to submit the tree nonces for the musig2 session of a given batch. The client should provide the batch id, the cosigner public key, and the tree nonces. The server should verify the cosigner public key and the nonces, and store them for later aggregation once nonces from all clients are collected.

### Parameters

| Name                           | Type                                                      | Description | Required   | Notes |
| ------------------------------ | --------------------------------------------------------- | ----------- | ---------- | ----- |
| **submit_tree_nonces_request** | [**SubmitTreeNoncesRequest**](SubmitTreeNoncesRequest.md) |             | [required] |       |

### Return type

[**serde_json::Value**](serde_json::Value.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

## ark_service_submit_tree_signatures

> serde_json::Value ark_service_submit_tree_signatures(submit_tree_signatures_request)

SubmitTreeSignatures allows a cosigner to submit the tree signatures for the musig2 session of a given batch. The client should provide the batch id, the cosigner public key, and the tree signatures. The server should verify the cosigner public key and the signatures, and store them for later aggregation once signatures from all clients are collected.

### Parameters

| Name                               | Type                                                              | Description | Required   | Notes |
| ---------------------------------- | ----------------------------------------------------------------- | ----------- | ---------- | ----- |
| **submit_tree_signatures_request** | [**SubmitTreeSignaturesRequest**](SubmitTreeSignaturesRequest.md) |             | [required] |       |

### Return type

[**serde_json::Value**](serde_json::Value.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

## ark_service_submit_tx

> models::SubmitTxResponse ark_service_submit_tx(submit_tx_request)

SubmitTx is the first leg of the process of spending vtxos offchain and allows a client to submit a signed Ark transaction and the unsigned checkpoint transactions. The server should verify the signed transactions and return the fully signed Ark tx and the signed checkpoint txs.

### Parameters

| Name                  | Type                                      | Description | Required   | Notes |
| --------------------- | ----------------------------------------- | ----------- | ---------- | ----- |
| **submit_tx_request** | [**SubmitTxRequest**](SubmitTxRequest.md) |             | [required] |       |

### Return type

[**models::SubmitTxResponse**](SubmitTxResponse.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

## ark_service_update_stream_topics

> models::UpdateStreamTopicsResponse ark_service_update_stream_topics(update_stream_topics_request)

UpdateStreamTopics allows a client to modify the topics of their event stream. They can add, remove, or specify a list of topics, providing them control over the events received on the event stream.

### Parameters

| Name                             | Type                                                          | Description | Required   | Notes |
| -------------------------------- | ------------------------------------------------------------- | ----------- | ---------- | ----- |
| **update_stream_topics_request** | [**UpdateStreamTopicsRequest**](UpdateStreamTopicsRequest.md) |             | [required] |       |

### Return type

[**models::UpdateStreamTopicsResponse**](UpdateStreamTopicsResponse.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)