react-native-nitro-ark 0.0.39 → 0.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/jniLibs/arm64-v8a/libcxxbridge1.a +0 -0
- package/android/src/main/jniLibs/x86_64/libcxxbridge1.a +0 -0
- package/cpp/NitroArk.hpp +594 -588
- package/cpp/generated/ark_cxx.h +14 -0
- package/lib/module/index.js +8 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/NitroArk.nitro.d.ts +6 -0
- package/lib/typescript/src/NitroArk.nitro.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +7 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/nitrogen/generated/shared/c++/HybridNitroArkSpec.cpp +1 -0
- package/nitrogen/generated/shared/c++/HybridNitroArkSpec.hpp +4 -0
- package/nitrogen/generated/shared/c++/NewAddressResult.hpp +77 -0
- package/package.json +1 -1
- package/src/NitroArk.nitro.ts +16 -9
- package/src/index.tsx +14 -6
package/cpp/NitroArk.hpp
CHANGED
|
@@ -8,593 +8,599 @@
|
|
|
8
8
|
#include <string>
|
|
9
9
|
#include <vector>
|
|
10
10
|
|
|
11
|
-
namespace margelo::nitro::nitroark
|
|
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
|
-
std::
|
|
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
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
std::
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
};
|
|
11
|
+
namespace margelo::nitro::nitroark {
|
|
12
|
+
|
|
13
|
+
using namespace margelo::nitro;
|
|
14
|
+
// Helper function to convert rust cxx payment type to nitrogen payment type
|
|
15
|
+
inline PaymentTypes convertPaymentType(bark_cxx::PaymentTypes type) {
|
|
16
|
+
switch (type) {
|
|
17
|
+
case bark_cxx::PaymentTypes::Bolt11:
|
|
18
|
+
return PaymentTypes::BOLT11;
|
|
19
|
+
case bark_cxx::PaymentTypes::Lnurl:
|
|
20
|
+
return PaymentTypes::LNURL;
|
|
21
|
+
case bark_cxx::PaymentTypes::Arkoor:
|
|
22
|
+
return PaymentTypes::ARKOOR;
|
|
23
|
+
case bark_cxx::PaymentTypes::Onchain:
|
|
24
|
+
return PaymentTypes::ONCHAIN;
|
|
25
|
+
default:
|
|
26
|
+
throw std::runtime_error("Invalid payment type");
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
class NitroArk : public HybridNitroArkSpec {
|
|
31
|
+
public:
|
|
32
|
+
NitroArk() : HybridObject(TAG) {
|
|
33
|
+
// Initialize the Rust logger once when a NitroArk object is created.
|
|
34
|
+
bark_cxx::init_logger();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// --- Management ---
|
|
38
|
+
|
|
39
|
+
std::shared_ptr<Promise<std::string>> createMnemonic() override {
|
|
40
|
+
return Promise<std::string>::async([]() {
|
|
41
|
+
try {
|
|
42
|
+
rust::String mnemonic_rs = bark_cxx::create_mnemonic();
|
|
43
|
+
return std::string(mnemonic_rs.data(), mnemonic_rs.length());
|
|
44
|
+
} catch (const rust::Error &e) {
|
|
45
|
+
throw std::runtime_error(e.what());
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
std::shared_ptr<Promise<void>>
|
|
51
|
+
loadWallet(const std::string &datadir, const BarkCreateOpts &opts) override {
|
|
52
|
+
return Promise<void>::async([datadir, opts]() {
|
|
53
|
+
try {
|
|
54
|
+
bark_cxx::ConfigOpts config_opts;
|
|
55
|
+
if (opts.config.has_value()) {
|
|
56
|
+
config_opts.asp = opts.config->asp.value_or("");
|
|
57
|
+
config_opts.esplora = opts.config->esplora.value_or("");
|
|
58
|
+
config_opts.bitcoind = opts.config->bitcoind.value_or("");
|
|
59
|
+
config_opts.bitcoind_cookie =
|
|
60
|
+
opts.config->bitcoind_cookie.value_or("");
|
|
61
|
+
config_opts.bitcoind_user = opts.config->bitcoind_user.value_or("");
|
|
62
|
+
config_opts.bitcoind_pass = opts.config->bitcoind_pass.value_or("");
|
|
63
|
+
config_opts.vtxo_refresh_expiry_threshold = static_cast<uint32_t>(
|
|
64
|
+
opts.config->vtxo_refresh_expiry_threshold.value_or(0));
|
|
65
|
+
config_opts.fallback_fee_rate =
|
|
66
|
+
static_cast<uint64_t>(opts.config->fallback_fee_rate.value_or(0));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
bark_cxx::CreateOpts create_opts;
|
|
70
|
+
create_opts.regtest = opts.regtest.value_or(false);
|
|
71
|
+
create_opts.signet = opts.signet.value_or(false);
|
|
72
|
+
create_opts.bitcoin = opts.bitcoin.value_or(true);
|
|
73
|
+
create_opts.mnemonic = opts.mnemonic;
|
|
74
|
+
uint32_t birthday_height_val;
|
|
75
|
+
if (opts.birthday_height.has_value()) {
|
|
76
|
+
birthday_height_val =
|
|
77
|
+
static_cast<uint32_t>(opts.birthday_height.value());
|
|
78
|
+
create_opts.birthday_height = &birthday_height_val;
|
|
79
|
+
} else {
|
|
80
|
+
create_opts.birthday_height = nullptr;
|
|
81
|
+
}
|
|
82
|
+
create_opts.config = config_opts;
|
|
83
|
+
|
|
84
|
+
bark_cxx::load_wallet(datadir, create_opts);
|
|
85
|
+
} catch (const rust::Error &e) {
|
|
86
|
+
throw std::runtime_error(e.what());
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
std::shared_ptr<Promise<void>> closeWallet() override {
|
|
92
|
+
return Promise<void>::async([]() {
|
|
93
|
+
try {
|
|
94
|
+
bark_cxx::close_wallet();
|
|
95
|
+
} catch (const rust::Error &e) {
|
|
96
|
+
throw std::runtime_error(e.what());
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
std::shared_ptr<Promise<bool>> isWalletLoaded() override {
|
|
102
|
+
return Promise<bool>::async([]() { return bark_cxx::is_wallet_loaded(); });
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
std::shared_ptr<Promise<void>>
|
|
106
|
+
persistConfig(const BarkConfigOpts &opts) override {
|
|
107
|
+
return Promise<void>::async([opts]() {
|
|
108
|
+
try {
|
|
109
|
+
bark_cxx::ConfigOpts config_opts;
|
|
110
|
+
config_opts.asp = opts.asp.value_or("");
|
|
111
|
+
config_opts.esplora = opts.esplora.value_or("");
|
|
112
|
+
config_opts.bitcoind = opts.bitcoind.value_or("");
|
|
113
|
+
config_opts.bitcoind_cookie = opts.bitcoind_cookie.value_or("");
|
|
114
|
+
config_opts.bitcoind_user = opts.bitcoind_user.value_or("");
|
|
115
|
+
config_opts.bitcoind_pass = opts.bitcoind_pass.value_or("");
|
|
116
|
+
config_opts.vtxo_refresh_expiry_threshold = static_cast<uint32_t>(
|
|
117
|
+
opts.vtxo_refresh_expiry_threshold.value_or(0));
|
|
118
|
+
config_opts.fallback_fee_rate =
|
|
119
|
+
static_cast<uint64_t>(opts.fallback_fee_rate.value_or(0));
|
|
120
|
+
bark_cxx::persist_config(config_opts);
|
|
121
|
+
} catch (const rust::Error &e) {
|
|
122
|
+
throw std::runtime_error(e.what());
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
std::shared_ptr<Promise<void>> maintenance() override {
|
|
128
|
+
return Promise<void>::async([]() {
|
|
129
|
+
try {
|
|
130
|
+
bark_cxx::maintenance();
|
|
131
|
+
} catch (const rust::Error &e) {
|
|
132
|
+
throw std::runtime_error(e.what());
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
std::shared_ptr<Promise<void>> sync() override {
|
|
138
|
+
return Promise<void>::async([]() {
|
|
139
|
+
try {
|
|
140
|
+
bark_cxx::sync();
|
|
141
|
+
} catch (const rust::Error &e) {
|
|
142
|
+
throw std::runtime_error(e.what());
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
std::shared_ptr<Promise<void>> syncExits() override {
|
|
148
|
+
return Promise<void>::async([]() {
|
|
149
|
+
try {
|
|
150
|
+
bark_cxx::sync_exits();
|
|
151
|
+
} catch (const rust::Error &e) {
|
|
152
|
+
throw std::runtime_error(e.what());
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
std::shared_ptr<Promise<void>> syncRounds() override {
|
|
158
|
+
return Promise<void>::async([]() {
|
|
159
|
+
try {
|
|
160
|
+
bark_cxx::sync_rounds();
|
|
161
|
+
} catch (const rust::Error &e) {
|
|
162
|
+
throw std::runtime_error(e.what());
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// --- Wallet Info ---
|
|
168
|
+
|
|
169
|
+
std::shared_ptr<Promise<BarkArkInfo>> getArkInfo() override {
|
|
170
|
+
return Promise<BarkArkInfo>::async([]() {
|
|
171
|
+
try {
|
|
172
|
+
bark_cxx::CxxArkInfo rust_info = bark_cxx::get_ark_info();
|
|
173
|
+
BarkArkInfo info;
|
|
174
|
+
info.network =
|
|
175
|
+
std::string(rust_info.network.data(), rust_info.network.length());
|
|
176
|
+
info.asp_pubkey = std::string(rust_info.asp_pubkey.data(),
|
|
177
|
+
rust_info.asp_pubkey.length());
|
|
178
|
+
info.round_interval_secs =
|
|
179
|
+
static_cast<double>(rust_info.round_interval_secs);
|
|
180
|
+
info.vtxo_exit_delta = static_cast<double>(rust_info.vtxo_exit_delta);
|
|
181
|
+
info.vtxo_expiry_delta =
|
|
182
|
+
static_cast<double>(rust_info.vtxo_expiry_delta);
|
|
183
|
+
info.htlc_expiry_delta =
|
|
184
|
+
static_cast<double>(rust_info.htlc_expiry_delta);
|
|
185
|
+
info.max_vtxo_amount_sat =
|
|
186
|
+
static_cast<double>(rust_info.max_vtxo_amount_sat);
|
|
187
|
+
return info;
|
|
188
|
+
} catch (const rust::Error &e) {
|
|
189
|
+
throw std::runtime_error(e.what());
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
std::shared_ptr<Promise<OffchainBalanceResult>> offchainBalance() override {
|
|
195
|
+
return Promise<OffchainBalanceResult>::async([]() {
|
|
196
|
+
try {
|
|
197
|
+
bark_cxx::OffchainBalance rust_balance = bark_cxx::offchain_balance();
|
|
198
|
+
OffchainBalanceResult balance;
|
|
199
|
+
balance.spendable = static_cast<double>(rust_balance.spendable);
|
|
200
|
+
balance.pending_lightning_send =
|
|
201
|
+
static_cast<double>(rust_balance.pending_lightning_send);
|
|
202
|
+
balance.pending_exit = static_cast<double>(rust_balance.pending_exit);
|
|
203
|
+
return balance;
|
|
204
|
+
} catch (const rust::Error &e) {
|
|
205
|
+
throw std::runtime_error(e.what());
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
std::shared_ptr<Promise<std::string>> deriveStoreNextKeypair() override {
|
|
211
|
+
return Promise<std::string>::async([]() {
|
|
212
|
+
try {
|
|
213
|
+
rust::String keypair_rs = bark_cxx::derive_store_next_keypair();
|
|
214
|
+
return std::string(keypair_rs.data(), keypair_rs.length());
|
|
215
|
+
} catch (const rust::Error &e) {
|
|
216
|
+
throw std::runtime_error(e.what());
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
std::shared_ptr<Promise<std::string>> peakKeyPair(double index) override {
|
|
222
|
+
return Promise<std::string>::async([index]() {
|
|
223
|
+
try {
|
|
224
|
+
uint32_t index_val = static_cast<uint32_t>(index);
|
|
225
|
+
rust::String keypair_rs = bark_cxx::peak_keypair(index_val);
|
|
226
|
+
return std::string(keypair_rs.data(), keypair_rs.length());
|
|
227
|
+
} catch (const rust::Error &e) {
|
|
228
|
+
throw std::runtime_error(e.what());
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
std::shared_ptr<Promise<NewAddressResult>> newAddress() override {
|
|
234
|
+
return Promise<NewAddressResult>::async([]() {
|
|
235
|
+
try {
|
|
236
|
+
bark_cxx::NewAddressResult address_rs = bark_cxx::new_address();
|
|
237
|
+
NewAddressResult address;
|
|
238
|
+
address.user_pubkey = std::string(address_rs.user_pubkey.data(),
|
|
239
|
+
address_rs.user_pubkey.length());
|
|
240
|
+
address.ark_id =
|
|
241
|
+
std::string(address_rs.ark_id.data(), address_rs.ark_id.length());
|
|
242
|
+
address.address =
|
|
243
|
+
std::string(address_rs.address.data(), address_rs.address.length());
|
|
244
|
+
return address;
|
|
245
|
+
|
|
246
|
+
} catch (const rust::Error &e) {
|
|
247
|
+
throw std::runtime_error(e.what());
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
std::shared_ptr<Promise<std::vector<BarkVtxo>>> getVtxos() override {
|
|
253
|
+
return Promise<std::vector<BarkVtxo>>::async([]() {
|
|
254
|
+
try {
|
|
255
|
+
rust::Vec<bark_cxx::BarkVtxo> rust_vtxos = bark_cxx::get_vtxos();
|
|
256
|
+
std::vector<BarkVtxo> vtxos;
|
|
257
|
+
for (const auto &rust_vtxo : rust_vtxos) {
|
|
258
|
+
BarkVtxo vtxo;
|
|
259
|
+
vtxo.amount = static_cast<double>(rust_vtxo.amount);
|
|
260
|
+
vtxo.expiry_height = static_cast<double>(rust_vtxo.expiry_height);
|
|
261
|
+
vtxo.exit_delta = static_cast<double>(rust_vtxo.exit_delta);
|
|
262
|
+
vtxo.anchor_point = std::string(rust_vtxo.anchor_point.data(),
|
|
263
|
+
rust_vtxo.anchor_point.length());
|
|
264
|
+
vtxos.push_back(vtxo);
|
|
265
|
+
}
|
|
266
|
+
return vtxos;
|
|
267
|
+
} catch (const rust::Error &e) {
|
|
268
|
+
throw std::runtime_error(e.what());
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
// --- Onchain Operations ---
|
|
274
|
+
|
|
275
|
+
std::shared_ptr<Promise<OnchainBalanceResult>> onchainBalance() override {
|
|
276
|
+
return Promise<OnchainBalanceResult>::async([]() {
|
|
277
|
+
try {
|
|
278
|
+
bark_cxx::OnChainBalance rust_balance = bark_cxx::onchain_balance();
|
|
279
|
+
OnchainBalanceResult balance;
|
|
280
|
+
balance.immature = static_cast<double>(rust_balance.immature);
|
|
281
|
+
balance.trusted_pending =
|
|
282
|
+
static_cast<double>(rust_balance.trusted_pending);
|
|
283
|
+
balance.untrusted_pending =
|
|
284
|
+
static_cast<double>(rust_balance.untrusted_pending);
|
|
285
|
+
balance.confirmed = static_cast<double>(rust_balance.confirmed);
|
|
286
|
+
return balance;
|
|
287
|
+
} catch (const rust::Error &e) {
|
|
288
|
+
throw std::runtime_error(e.what());
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
std::shared_ptr<Promise<void>> onchainSync() override {
|
|
294
|
+
return Promise<void>::async([]() {
|
|
295
|
+
try {
|
|
296
|
+
bark_cxx::onchain_sync();
|
|
297
|
+
} catch (const rust::Error &e) {
|
|
298
|
+
throw std::runtime_error(e.what());
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
std::shared_ptr<Promise<std::string>> onchainListUnspent() override {
|
|
304
|
+
return Promise<std::string>::async([]() {
|
|
305
|
+
try {
|
|
306
|
+
rust::String json_rs = bark_cxx::onchain_list_unspent();
|
|
307
|
+
return std::string(json_rs.data(), json_rs.length());
|
|
308
|
+
} catch (const rust::Error &e) {
|
|
309
|
+
throw std::runtime_error(e.what());
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
std::shared_ptr<Promise<std::string>> onchainUtxos() override {
|
|
315
|
+
return Promise<std::string>::async([]() {
|
|
316
|
+
try {
|
|
317
|
+
rust::String json_rs = bark_cxx::onchain_utxos();
|
|
318
|
+
return std::string(json_rs.data(), json_rs.length());
|
|
319
|
+
} catch (const rust::Error &e) {
|
|
320
|
+
throw std::runtime_error(e.what());
|
|
321
|
+
}
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
std::shared_ptr<Promise<std::string>> onchainAddress() override {
|
|
326
|
+
return Promise<std::string>::async([]() {
|
|
327
|
+
try {
|
|
328
|
+
rust::String address_rs = bark_cxx::onchain_address();
|
|
329
|
+
return std::string(address_rs.data(), address_rs.length());
|
|
330
|
+
} catch (const rust::Error &e) {
|
|
331
|
+
throw std::runtime_error(e.what());
|
|
332
|
+
}
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
std::shared_ptr<Promise<OnchainPaymentResult>>
|
|
337
|
+
onchainSend(const std::string &destination, double amountSat,
|
|
338
|
+
std::optional<double> feeRate) override {
|
|
339
|
+
return Promise<OnchainPaymentResult>::async(
|
|
340
|
+
[destination, amountSat, feeRate]() {
|
|
341
|
+
try {
|
|
342
|
+
uint64_t feeRate_val;
|
|
343
|
+
bark_cxx::OnchainPaymentResult rust_result;
|
|
344
|
+
if (feeRate.has_value()) {
|
|
345
|
+
feeRate_val = static_cast<uint64_t>(feeRate.value());
|
|
346
|
+
rust_result = bark_cxx::onchain_send(
|
|
347
|
+
destination, static_cast<uint64_t>(amountSat), &feeRate_val);
|
|
348
|
+
} else {
|
|
349
|
+
rust_result = bark_cxx::onchain_send(
|
|
350
|
+
destination, static_cast<uint64_t>(amountSat), nullptr);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
OnchainPaymentResult result;
|
|
354
|
+
result.txid =
|
|
355
|
+
std::string(rust_result.txid.data(), rust_result.txid.length());
|
|
356
|
+
result.amount_sat = static_cast<double>(rust_result.amount_sat);
|
|
357
|
+
result.destination_address =
|
|
358
|
+
std::string(rust_result.destination_address.data(),
|
|
359
|
+
rust_result.destination_address.length());
|
|
360
|
+
result.payment_type = convertPaymentType(rust_result.payment_type);
|
|
361
|
+
|
|
362
|
+
return result;
|
|
363
|
+
} catch (const rust::Error &e) {
|
|
364
|
+
throw std::runtime_error(e.what());
|
|
365
|
+
}
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
std::shared_ptr<Promise<std::string>>
|
|
370
|
+
onchainDrain(const std::string &destination,
|
|
371
|
+
std::optional<double> feeRate) override {
|
|
372
|
+
return Promise<std::string>::async([destination, feeRate]() {
|
|
373
|
+
try {
|
|
374
|
+
uint64_t feeRate_val;
|
|
375
|
+
rust::String txid_rs;
|
|
376
|
+
if (feeRate.has_value()) {
|
|
377
|
+
feeRate_val = static_cast<uint64_t>(feeRate.value());
|
|
378
|
+
txid_rs = bark_cxx::onchain_drain(destination, &feeRate_val);
|
|
379
|
+
} else {
|
|
380
|
+
txid_rs = bark_cxx::onchain_drain(destination, nullptr);
|
|
381
|
+
}
|
|
382
|
+
return std::string(txid_rs.data(), txid_rs.length());
|
|
383
|
+
} catch (const rust::Error &e) {
|
|
384
|
+
throw std::runtime_error(e.what());
|
|
385
|
+
}
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
std::shared_ptr<Promise<std::string>>
|
|
390
|
+
onchainSendMany(const std::vector<BarkSendManyOutput> &outputs,
|
|
391
|
+
std::optional<double> feeRate) override {
|
|
392
|
+
return Promise<std::string>::async([outputs, feeRate]() {
|
|
393
|
+
try {
|
|
394
|
+
rust::Vec<bark_cxx::SendManyOutput> cxx_outputs;
|
|
395
|
+
for (const auto &output : outputs) {
|
|
396
|
+
cxx_outputs.push_back({rust::String(output.destination),
|
|
397
|
+
static_cast<uint64_t>(output.amountSat)});
|
|
398
|
+
}
|
|
399
|
+
uint64_t feeRate_val;
|
|
400
|
+
rust::String txid_rs;
|
|
401
|
+
if (feeRate.has_value()) {
|
|
402
|
+
feeRate_val = static_cast<uint64_t>(feeRate.value());
|
|
403
|
+
txid_rs =
|
|
404
|
+
bark_cxx::onchain_send_many(std::move(cxx_outputs), &feeRate_val);
|
|
405
|
+
} else {
|
|
406
|
+
txid_rs =
|
|
407
|
+
bark_cxx::onchain_send_many(std::move(cxx_outputs), nullptr);
|
|
408
|
+
}
|
|
409
|
+
return std::string(txid_rs.data(), txid_rs.length());
|
|
410
|
+
} catch (const rust::Error &e) {
|
|
411
|
+
throw std::runtime_error(e.what());
|
|
412
|
+
}
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
// --- Lightning Operations ---
|
|
417
|
+
|
|
418
|
+
std::shared_ptr<Promise<LightningPaymentResult>>
|
|
419
|
+
sendLightningPayment(const std::string &destination,
|
|
420
|
+
std::optional<double> amountSat) override {
|
|
421
|
+
return Promise<LightningPaymentResult>::async([destination, amountSat]() {
|
|
422
|
+
try {
|
|
423
|
+
bark_cxx::Bolt11PaymentResult rust_result;
|
|
424
|
+
if (amountSat.has_value()) {
|
|
425
|
+
uint64_t amountSat_val = static_cast<uint64_t>(amountSat.value());
|
|
426
|
+
rust_result =
|
|
427
|
+
bark_cxx::send_lightning_payment(destination, &amountSat_val);
|
|
428
|
+
} else {
|
|
429
|
+
rust_result = bark_cxx::send_lightning_payment(destination, nullptr);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
LightningPaymentResult result;
|
|
433
|
+
result.bolt11_invoice =
|
|
434
|
+
std::string(rust_result.bolt11_invoice.data(),
|
|
435
|
+
rust_result.bolt11_invoice.length());
|
|
436
|
+
result.preimage = std::string(rust_result.preimage.data(),
|
|
437
|
+
rust_result.preimage.length());
|
|
438
|
+
result.payment_type = convertPaymentType(rust_result.payment_type);
|
|
439
|
+
|
|
440
|
+
return result;
|
|
441
|
+
} catch (const rust::Error &e) {
|
|
442
|
+
throw std::runtime_error(e.what());
|
|
443
|
+
}
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
std::shared_ptr<Promise<LnurlPaymentResult>>
|
|
448
|
+
sendLnaddr(const std::string &addr, double amountSat,
|
|
449
|
+
const std::string &comment) override {
|
|
450
|
+
return Promise<LnurlPaymentResult>::async([addr, amountSat, comment]() {
|
|
451
|
+
try {
|
|
452
|
+
bark_cxx::LnurlPaymentResult rust_result = bark_cxx::send_lnaddr(
|
|
453
|
+
addr, static_cast<uint64_t>(amountSat), comment);
|
|
454
|
+
|
|
455
|
+
LnurlPaymentResult result;
|
|
456
|
+
result.lnurl =
|
|
457
|
+
std::string(rust_result.lnurl.data(), rust_result.lnurl.length());
|
|
458
|
+
result.bolt11_invoice =
|
|
459
|
+
std::string(rust_result.bolt11_invoice.data(),
|
|
460
|
+
rust_result.bolt11_invoice.length());
|
|
461
|
+
result.preimage = std::string(rust_result.preimage.data(),
|
|
462
|
+
rust_result.preimage.length());
|
|
463
|
+
result.payment_type = convertPaymentType(rust_result.payment_type);
|
|
464
|
+
|
|
465
|
+
return result;
|
|
466
|
+
} catch (const rust::Error &e) {
|
|
467
|
+
throw std::runtime_error(e.what());
|
|
468
|
+
}
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
std::shared_ptr<Promise<std::string>>
|
|
473
|
+
bolt11Invoice(double amountMsat) override {
|
|
474
|
+
return Promise<std::string>::async([amountMsat]() {
|
|
475
|
+
try {
|
|
476
|
+
rust::String invoice_rs =
|
|
477
|
+
bark_cxx::bolt11_invoice(static_cast<uint64_t>(amountMsat));
|
|
478
|
+
return std::string(invoice_rs.data(), invoice_rs.length());
|
|
479
|
+
} catch (const rust::Error &e) {
|
|
480
|
+
throw std::runtime_error(e.what());
|
|
481
|
+
}
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
std::shared_ptr<Promise<void>>
|
|
486
|
+
finishLightningReceive(const std::string &bolt11) override {
|
|
487
|
+
return Promise<void>::async([bolt11]() {
|
|
488
|
+
try {
|
|
489
|
+
bark_cxx::finish_lightning_receive(bolt11);
|
|
490
|
+
} catch (const rust::Error &e) {
|
|
491
|
+
throw std::runtime_error(e.what());
|
|
492
|
+
}
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
// --- Ark Operations ---
|
|
497
|
+
|
|
498
|
+
std::shared_ptr<Promise<std::string>> boardAmount(double amountSat) override {
|
|
499
|
+
return Promise<std::string>::async([amountSat]() {
|
|
500
|
+
try {
|
|
501
|
+
rust::String status_rs =
|
|
502
|
+
bark_cxx::board_amount(static_cast<uint64_t>(amountSat));
|
|
503
|
+
return std::string(status_rs.data(), status_rs.length());
|
|
504
|
+
} catch (const rust::Error &e) {
|
|
505
|
+
throw std::runtime_error(e.what());
|
|
506
|
+
}
|
|
507
|
+
});
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
std::shared_ptr<Promise<std::string>> boardAll() override {
|
|
511
|
+
return Promise<std::string>::async([]() {
|
|
512
|
+
try {
|
|
513
|
+
rust::String status_rs = bark_cxx::board_all();
|
|
514
|
+
return std::string(status_rs.data(), status_rs.length());
|
|
515
|
+
} catch (const rust::Error &e) {
|
|
516
|
+
throw std::runtime_error(e.what());
|
|
517
|
+
}
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
std::shared_ptr<Promise<ArkoorPaymentResult>>
|
|
522
|
+
sendArkoorPayment(const std::string &destination, double amountSat) override {
|
|
523
|
+
return Promise<ArkoorPaymentResult>::async([destination, amountSat]() {
|
|
524
|
+
try {
|
|
525
|
+
bark_cxx::ArkoorPaymentResult rust_result =
|
|
526
|
+
bark_cxx::send_arkoor_payment(destination,
|
|
527
|
+
static_cast<uint64_t>(amountSat));
|
|
528
|
+
|
|
529
|
+
ArkoorPaymentResult result;
|
|
530
|
+
result.amount_sat = static_cast<double>(rust_result.amount_sat);
|
|
531
|
+
result.destination_pubkey =
|
|
532
|
+
std::string(rust_result.destination_pubkey.data(),
|
|
533
|
+
rust_result.destination_pubkey.length());
|
|
534
|
+
result.payment_type = convertPaymentType(rust_result.payment_type);
|
|
535
|
+
|
|
536
|
+
std::vector<BarkVtxo> vtxos;
|
|
537
|
+
for (const auto &rust_vtxo : rust_result.vtxos) {
|
|
538
|
+
BarkVtxo vtxo;
|
|
539
|
+
vtxo.amount = static_cast<double>(rust_vtxo.amount);
|
|
540
|
+
vtxo.expiry_height = static_cast<double>(rust_vtxo.expiry_height);
|
|
541
|
+
vtxo.exit_delta = static_cast<double>(rust_vtxo.exit_delta);
|
|
542
|
+
vtxo.anchor_point = std::string(rust_vtxo.anchor_point.data(),
|
|
543
|
+
rust_vtxo.anchor_point.length());
|
|
544
|
+
vtxos.push_back(vtxo);
|
|
545
|
+
}
|
|
546
|
+
result.vtxos = vtxos;
|
|
547
|
+
|
|
548
|
+
return result;
|
|
549
|
+
} catch (const rust::Error &e) {
|
|
550
|
+
throw std::runtime_error(e.what());
|
|
551
|
+
}
|
|
552
|
+
});
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
std::shared_ptr<Promise<std::string>>
|
|
556
|
+
sendRoundOnchainPayment(const std::string &destination,
|
|
557
|
+
double amountSat) override {
|
|
558
|
+
return Promise<std::string>::async([destination, amountSat]() {
|
|
559
|
+
try {
|
|
560
|
+
rust::String status_rs = bark_cxx::send_round_onchain_payment(
|
|
561
|
+
destination, static_cast<uint64_t>(amountSat));
|
|
562
|
+
return std::string(status_rs.data(), status_rs.length());
|
|
563
|
+
} catch (const rust::Error &e) {
|
|
564
|
+
throw std::runtime_error(e.what());
|
|
565
|
+
}
|
|
566
|
+
});
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
// --- Offboarding / Exiting ---
|
|
570
|
+
|
|
571
|
+
std::shared_ptr<Promise<std::string>>
|
|
572
|
+
offboardSpecific(const std::vector<std::string> &vtxoIds,
|
|
573
|
+
const std::string &destinationAddress) override {
|
|
574
|
+
return Promise<std::string>::async([vtxoIds, destinationAddress]() {
|
|
575
|
+
try {
|
|
576
|
+
rust::Vec<rust::String> rust_vtxo_ids;
|
|
577
|
+
for (const auto &id : vtxoIds) {
|
|
578
|
+
rust_vtxo_ids.push_back(rust::String(id));
|
|
579
|
+
}
|
|
580
|
+
rust::String status_rs = bark_cxx::offboard_specific(
|
|
581
|
+
std::move(rust_vtxo_ids), destinationAddress);
|
|
582
|
+
return std::string(status_rs.data(), status_rs.length());
|
|
583
|
+
} catch (const rust::Error &e) {
|
|
584
|
+
throw std::runtime_error(e.what());
|
|
585
|
+
}
|
|
586
|
+
});
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
std::shared_ptr<Promise<std::string>>
|
|
590
|
+
offboardAll(const std::string &destinationAddress) override {
|
|
591
|
+
return Promise<std::string>::async([destinationAddress]() {
|
|
592
|
+
try {
|
|
593
|
+
rust::String status_rs = bark_cxx::offboard_all(destinationAddress);
|
|
594
|
+
return std::string(status_rs.data(), status_rs.length());
|
|
595
|
+
} catch (const rust::Error &e) {
|
|
596
|
+
throw std::runtime_error(e.what());
|
|
597
|
+
}
|
|
598
|
+
});
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
private:
|
|
602
|
+
// Tag for logging/debugging within Nitro
|
|
603
|
+
static constexpr auto TAG = "NitroArk";
|
|
604
|
+
};
|
|
599
605
|
|
|
600
606
|
} // namespace margelo::nitro::nitroark
|