react-native-nitro-ark 0.0.77-rc.7 → 0.0.78

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.
@@ -1,1241 +0,0 @@
1
- #pragma once
2
- #include <algorithm>
3
- #include <array>
4
- #include <cassert>
5
- #include <cstddef>
6
- #include <cstdint>
7
- #include <initializer_list>
8
- #include <iterator>
9
- #include <new>
10
- #include <stdexcept>
11
- #include <string>
12
- #include <type_traits>
13
- #include <utility>
14
- #if __cplusplus >= 201703L
15
- #include <string_view>
16
- #endif
17
- #if __cplusplus >= 202002L
18
- #include <ranges>
19
- #endif
20
-
21
- #ifdef __clang__
22
- #pragma clang diagnostic push
23
- #pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
24
- #endif // __clang__
25
-
26
- namespace rust {
27
- inline namespace cxxbridge1 {
28
- // #include "rust/cxx.h"
29
-
30
- #ifndef CXXBRIDGE1_PANIC
31
- #define CXXBRIDGE1_PANIC
32
- template <typename Exception>
33
- void panic [[noreturn]] (const char *msg);
34
- #endif // CXXBRIDGE1_PANIC
35
-
36
- struct unsafe_bitcopy_t;
37
-
38
- namespace {
39
- template <typename T>
40
- class impl;
41
- } // namespace
42
-
43
- class Opaque;
44
-
45
- template <typename T>
46
- ::std::size_t size_of();
47
- template <typename T>
48
- ::std::size_t align_of();
49
-
50
- #ifndef CXXBRIDGE1_RUST_STRING
51
- #define CXXBRIDGE1_RUST_STRING
52
- class String final {
53
- public:
54
- String() noexcept;
55
- String(const String &) noexcept;
56
- String(String &&) noexcept;
57
- ~String() noexcept;
58
-
59
- String(const std::string &);
60
- String(const char *);
61
- String(const char *, std::size_t);
62
- String(const char16_t *);
63
- String(const char16_t *, std::size_t);
64
- #ifdef __cpp_char8_t
65
- String(const char8_t *s);
66
- String(const char8_t *s, std::size_t len);
67
- #endif
68
-
69
- static String lossy(const std::string &) noexcept;
70
- static String lossy(const char *) noexcept;
71
- static String lossy(const char *, std::size_t) noexcept;
72
- static String lossy(const char16_t *) noexcept;
73
- static String lossy(const char16_t *, std::size_t) noexcept;
74
-
75
- String &operator=(const String &) & noexcept;
76
- String &operator=(String &&) & noexcept;
77
-
78
- explicit operator std::string() const;
79
-
80
- const char *data() const noexcept;
81
- std::size_t size() const noexcept;
82
- std::size_t length() const noexcept;
83
- bool empty() const noexcept;
84
-
85
- const char *c_str() noexcept;
86
-
87
- std::size_t capacity() const noexcept;
88
- void reserve(size_t new_cap) noexcept;
89
-
90
- using iterator = char *;
91
- iterator begin() noexcept;
92
- iterator end() noexcept;
93
-
94
- using const_iterator = const char *;
95
- const_iterator begin() const noexcept;
96
- const_iterator end() const noexcept;
97
- const_iterator cbegin() const noexcept;
98
- const_iterator cend() const noexcept;
99
-
100
- bool operator==(const String &) const noexcept;
101
- bool operator!=(const String &) const noexcept;
102
- bool operator<(const String &) const noexcept;
103
- bool operator<=(const String &) const noexcept;
104
- bool operator>(const String &) const noexcept;
105
- bool operator>=(const String &) const noexcept;
106
-
107
- void swap(String &) noexcept;
108
-
109
- String(unsafe_bitcopy_t, const String &) noexcept;
110
-
111
- private:
112
- struct lossy_t;
113
- String(lossy_t, const char *, std::size_t) noexcept;
114
- String(lossy_t, const char16_t *, std::size_t) noexcept;
115
- friend void swap(String &lhs, String &rhs) noexcept { lhs.swap(rhs); }
116
-
117
- std::array<std::uintptr_t, 3> repr;
118
- };
119
- #endif // CXXBRIDGE1_RUST_STRING
120
-
121
- #ifndef CXXBRIDGE1_RUST_STR
122
- #define CXXBRIDGE1_RUST_STR
123
- class Str final {
124
- public:
125
- Str() noexcept;
126
- Str(const String &) noexcept;
127
- Str(const std::string &);
128
- Str(const char *);
129
- Str(const char *, std::size_t);
130
-
131
- Str &operator=(const Str &) & noexcept = default;
132
-
133
- explicit operator std::string() const;
134
- #if __cplusplus >= 201703L
135
- explicit operator std::string_view() const;
136
- #endif
137
-
138
- const char *data() const noexcept;
139
- std::size_t size() const noexcept;
140
- std::size_t length() const noexcept;
141
- bool empty() const noexcept;
142
-
143
- Str(const Str &) noexcept = default;
144
- ~Str() noexcept = default;
145
-
146
- using iterator = const char *;
147
- using const_iterator = const char *;
148
- const_iterator begin() const noexcept;
149
- const_iterator end() const noexcept;
150
- const_iterator cbegin() const noexcept;
151
- const_iterator cend() const noexcept;
152
-
153
- bool operator==(const Str &) const noexcept;
154
- bool operator!=(const Str &) const noexcept;
155
- bool operator<(const Str &) const noexcept;
156
- bool operator<=(const Str &) const noexcept;
157
- bool operator>(const Str &) const noexcept;
158
- bool operator>=(const Str &) const noexcept;
159
-
160
- void swap(Str &) noexcept;
161
-
162
- private:
163
- class uninit;
164
- Str(uninit) noexcept;
165
- friend impl<Str>;
166
-
167
- std::array<std::uintptr_t, 2> repr;
168
- };
169
- #endif // CXXBRIDGE1_RUST_STR
170
-
171
- #ifndef CXXBRIDGE1_RUST_SLICE
172
- #define CXXBRIDGE1_RUST_SLICE
173
- namespace detail {
174
- template <bool>
175
- struct copy_assignable_if {};
176
-
177
- template <>
178
- struct copy_assignable_if<false> {
179
- copy_assignable_if() noexcept = default;
180
- copy_assignable_if(const copy_assignable_if &) noexcept = default;
181
- copy_assignable_if &operator=(const copy_assignable_if &) & noexcept = delete;
182
- copy_assignable_if &operator=(copy_assignable_if &&) & noexcept = default;
183
- };
184
- } // namespace detail
185
-
186
- template <typename T>
187
- class Slice final
188
- : private detail::copy_assignable_if<std::is_const<T>::value> {
189
- public:
190
- using value_type = T;
191
-
192
- Slice() noexcept;
193
- Slice(T *, std::size_t count) noexcept;
194
-
195
- template <typename C>
196
- explicit Slice(C &c) : Slice(c.data(), c.size()) {}
197
-
198
- Slice &operator=(const Slice<T> &) & noexcept = default;
199
- Slice &operator=(Slice<T> &&) & noexcept = default;
200
-
201
- T *data() const noexcept;
202
- std::size_t size() const noexcept;
203
- std::size_t length() const noexcept;
204
- bool empty() const noexcept;
205
-
206
- T &operator[](std::size_t n) const noexcept;
207
- T &at(std::size_t n) const;
208
- T &front() const noexcept;
209
- T &back() const noexcept;
210
-
211
- Slice(const Slice<T> &) noexcept = default;
212
- ~Slice() noexcept = default;
213
-
214
- class iterator;
215
- iterator begin() const noexcept;
216
- iterator end() const noexcept;
217
-
218
- void swap(Slice &) noexcept;
219
-
220
- private:
221
- class uninit;
222
- Slice(uninit) noexcept;
223
- friend impl<Slice>;
224
- friend void sliceInit(void *, const void *, std::size_t) noexcept;
225
- friend void *slicePtr(const void *) noexcept;
226
- friend std::size_t sliceLen(const void *) noexcept;
227
-
228
- std::array<std::uintptr_t, 2> repr;
229
- };
230
-
231
- #ifdef __cpp_deduction_guides
232
- template <typename C>
233
- explicit Slice(C &c)
234
- -> Slice<std::remove_reference_t<decltype(*std::declval<C>().data())>>;
235
- #endif // __cpp_deduction_guides
236
-
237
- template <typename T>
238
- class Slice<T>::iterator final {
239
- public:
240
- #if __cplusplus >= 202002L
241
- using iterator_category = std::contiguous_iterator_tag;
242
- #else
243
- using iterator_category = std::random_access_iterator_tag;
244
- #endif
245
- using value_type = T;
246
- using difference_type = std::ptrdiff_t;
247
- using pointer = typename std::add_pointer<T>::type;
248
- using reference = typename std::add_lvalue_reference<T>::type;
249
-
250
- reference operator*() const noexcept;
251
- pointer operator->() const noexcept;
252
- reference operator[](difference_type) const noexcept;
253
-
254
- iterator &operator++() noexcept;
255
- iterator operator++(int) noexcept;
256
- iterator &operator--() noexcept;
257
- iterator operator--(int) noexcept;
258
-
259
- iterator &operator+=(difference_type) noexcept;
260
- iterator &operator-=(difference_type) noexcept;
261
- iterator operator+(difference_type) const noexcept;
262
- friend inline iterator operator+(difference_type lhs, iterator rhs) noexcept {
263
- return rhs + lhs;
264
- }
265
- iterator operator-(difference_type) const noexcept;
266
- difference_type operator-(const iterator &) const noexcept;
267
-
268
- bool operator==(const iterator &) const noexcept;
269
- bool operator!=(const iterator &) const noexcept;
270
- bool operator<(const iterator &) const noexcept;
271
- bool operator<=(const iterator &) const noexcept;
272
- bool operator>(const iterator &) const noexcept;
273
- bool operator>=(const iterator &) const noexcept;
274
-
275
- private:
276
- friend class Slice;
277
- void *pos;
278
- std::size_t stride;
279
- };
280
-
281
- #if __cplusplus >= 202002L
282
- static_assert(std::ranges::contiguous_range<rust::Slice<const uint8_t>>);
283
- static_assert(std::contiguous_iterator<rust::Slice<const uint8_t>::iterator>);
284
- #endif
285
-
286
- template <typename T>
287
- Slice<T>::Slice() noexcept {
288
- sliceInit(this, reinterpret_cast<void *>(align_of<T>()), 0);
289
- }
290
-
291
- template <typename T>
292
- Slice<T>::Slice(T *s, std::size_t count) noexcept {
293
- assert(s != nullptr || count == 0);
294
- sliceInit(this,
295
- s == nullptr && count == 0
296
- ? reinterpret_cast<void *>(align_of<T>())
297
- : const_cast<typename std::remove_const<T>::type *>(s),
298
- count);
299
- }
300
-
301
- template <typename T>
302
- T *Slice<T>::data() const noexcept {
303
- return reinterpret_cast<T *>(slicePtr(this));
304
- }
305
-
306
- template <typename T>
307
- std::size_t Slice<T>::size() const noexcept {
308
- return sliceLen(this);
309
- }
310
-
311
- template <typename T>
312
- std::size_t Slice<T>::length() const noexcept {
313
- return this->size();
314
- }
315
-
316
- template <typename T>
317
- bool Slice<T>::empty() const noexcept {
318
- return this->size() == 0;
319
- }
320
-
321
- template <typename T>
322
- T &Slice<T>::operator[](std::size_t n) const noexcept {
323
- assert(n < this->size());
324
- auto ptr = static_cast<char *>(slicePtr(this)) + size_of<T>() * n;
325
- return *reinterpret_cast<T *>(ptr);
326
- }
327
-
328
- template <typename T>
329
- T &Slice<T>::at(std::size_t n) const {
330
- if (n >= this->size()) {
331
- panic<std::out_of_range>("rust::Slice index out of range");
332
- }
333
- return (*this)[n];
334
- }
335
-
336
- template <typename T>
337
- T &Slice<T>::front() const noexcept {
338
- assert(!this->empty());
339
- return (*this)[0];
340
- }
341
-
342
- template <typename T>
343
- T &Slice<T>::back() const noexcept {
344
- assert(!this->empty());
345
- return (*this)[this->size() - 1];
346
- }
347
-
348
- template <typename T>
349
- typename Slice<T>::iterator::reference
350
- Slice<T>::iterator::operator*() const noexcept {
351
- return *static_cast<T *>(this->pos);
352
- }
353
-
354
- template <typename T>
355
- typename Slice<T>::iterator::pointer
356
- Slice<T>::iterator::operator->() const noexcept {
357
- return static_cast<T *>(this->pos);
358
- }
359
-
360
- template <typename T>
361
- typename Slice<T>::iterator::reference Slice<T>::iterator::operator[](
362
- typename Slice<T>::iterator::difference_type n) const noexcept {
363
- auto ptr = static_cast<char *>(this->pos) + this->stride * n;
364
- return *reinterpret_cast<T *>(ptr);
365
- }
366
-
367
- template <typename T>
368
- typename Slice<T>::iterator &Slice<T>::iterator::operator++() noexcept {
369
- this->pos = static_cast<char *>(this->pos) + this->stride;
370
- return *this;
371
- }
372
-
373
- template <typename T>
374
- typename Slice<T>::iterator Slice<T>::iterator::operator++(int) noexcept {
375
- auto ret = iterator(*this);
376
- this->pos = static_cast<char *>(this->pos) + this->stride;
377
- return ret;
378
- }
379
-
380
- template <typename T>
381
- typename Slice<T>::iterator &Slice<T>::iterator::operator--() noexcept {
382
- this->pos = static_cast<char *>(this->pos) - this->stride;
383
- return *this;
384
- }
385
-
386
- template <typename T>
387
- typename Slice<T>::iterator Slice<T>::iterator::operator--(int) noexcept {
388
- auto ret = iterator(*this);
389
- this->pos = static_cast<char *>(this->pos) - this->stride;
390
- return ret;
391
- }
392
-
393
- template <typename T>
394
- typename Slice<T>::iterator &Slice<T>::iterator::operator+=(
395
- typename Slice<T>::iterator::difference_type n) noexcept {
396
- this->pos = static_cast<char *>(this->pos) + this->stride * n;
397
- return *this;
398
- }
399
-
400
- template <typename T>
401
- typename Slice<T>::iterator &Slice<T>::iterator::operator-=(
402
- typename Slice<T>::iterator::difference_type n) noexcept {
403
- this->pos = static_cast<char *>(this->pos) - this->stride * n;
404
- return *this;
405
- }
406
-
407
- template <typename T>
408
- typename Slice<T>::iterator Slice<T>::iterator::operator+(
409
- typename Slice<T>::iterator::difference_type n) const noexcept {
410
- auto ret = iterator(*this);
411
- ret.pos = static_cast<char *>(this->pos) + this->stride * n;
412
- return ret;
413
- }
414
-
415
- template <typename T>
416
- typename Slice<T>::iterator Slice<T>::iterator::operator-(
417
- typename Slice<T>::iterator::difference_type n) const noexcept {
418
- auto ret = iterator(*this);
419
- ret.pos = static_cast<char *>(this->pos) - this->stride * n;
420
- return ret;
421
- }
422
-
423
- template <typename T>
424
- typename Slice<T>::iterator::difference_type
425
- Slice<T>::iterator::operator-(const iterator &other) const noexcept {
426
- auto diff = std::distance(static_cast<char *>(other.pos),
427
- static_cast<char *>(this->pos));
428
- return diff / static_cast<typename Slice<T>::iterator::difference_type>(
429
- this->stride);
430
- }
431
-
432
- template <typename T>
433
- bool Slice<T>::iterator::operator==(const iterator &other) const noexcept {
434
- return this->pos == other.pos;
435
- }
436
-
437
- template <typename T>
438
- bool Slice<T>::iterator::operator!=(const iterator &other) const noexcept {
439
- return this->pos != other.pos;
440
- }
441
-
442
- template <typename T>
443
- bool Slice<T>::iterator::operator<(const iterator &other) const noexcept {
444
- return this->pos < other.pos;
445
- }
446
-
447
- template <typename T>
448
- bool Slice<T>::iterator::operator<=(const iterator &other) const noexcept {
449
- return this->pos <= other.pos;
450
- }
451
-
452
- template <typename T>
453
- bool Slice<T>::iterator::operator>(const iterator &other) const noexcept {
454
- return this->pos > other.pos;
455
- }
456
-
457
- template <typename T>
458
- bool Slice<T>::iterator::operator>=(const iterator &other) const noexcept {
459
- return this->pos >= other.pos;
460
- }
461
-
462
- template <typename T>
463
- typename Slice<T>::iterator Slice<T>::begin() const noexcept {
464
- iterator it;
465
- it.pos = slicePtr(this);
466
- it.stride = size_of<T>();
467
- return it;
468
- }
469
-
470
- template <typename T>
471
- typename Slice<T>::iterator Slice<T>::end() const noexcept {
472
- iterator it = this->begin();
473
- it.pos = static_cast<char *>(it.pos) + it.stride * this->size();
474
- return it;
475
- }
476
-
477
- template <typename T>
478
- void Slice<T>::swap(Slice &rhs) noexcept {
479
- std::swap(*this, rhs);
480
- }
481
- #endif // CXXBRIDGE1_RUST_SLICE
482
-
483
- #ifndef CXXBRIDGE1_RUST_BITCOPY_T
484
- #define CXXBRIDGE1_RUST_BITCOPY_T
485
- struct unsafe_bitcopy_t final {
486
- explicit unsafe_bitcopy_t() = default;
487
- };
488
- #endif // CXXBRIDGE1_RUST_BITCOPY_T
489
-
490
- #ifndef CXXBRIDGE1_RUST_VEC
491
- #define CXXBRIDGE1_RUST_VEC
492
- template <typename T>
493
- class Vec final {
494
- public:
495
- using value_type = T;
496
-
497
- Vec() noexcept;
498
- Vec(std::initializer_list<T>);
499
- Vec(const Vec &);
500
- Vec(Vec &&) noexcept;
501
- ~Vec() noexcept;
502
-
503
- Vec &operator=(Vec &&) & noexcept;
504
- Vec &operator=(const Vec &) &;
505
-
506
- std::size_t size() const noexcept;
507
- bool empty() const noexcept;
508
- const T *data() const noexcept;
509
- T *data() noexcept;
510
- std::size_t capacity() const noexcept;
511
-
512
- const T &operator[](std::size_t n) const noexcept;
513
- const T &at(std::size_t n) const;
514
- const T &front() const noexcept;
515
- const T &back() const noexcept;
516
-
517
- T &operator[](std::size_t n) noexcept;
518
- T &at(std::size_t n);
519
- T &front() noexcept;
520
- T &back() noexcept;
521
-
522
- void reserve(std::size_t new_cap);
523
- void push_back(const T &value);
524
- void push_back(T &&value);
525
- template <typename... Args>
526
- void emplace_back(Args &&...args);
527
- void truncate(std::size_t len);
528
- void clear();
529
-
530
- using iterator = typename Slice<T>::iterator;
531
- iterator begin() noexcept;
532
- iterator end() noexcept;
533
-
534
- using const_iterator = typename Slice<const T>::iterator;
535
- const_iterator begin() const noexcept;
536
- const_iterator end() const noexcept;
537
- const_iterator cbegin() const noexcept;
538
- const_iterator cend() const noexcept;
539
-
540
- void swap(Vec &) noexcept;
541
-
542
- Vec(unsafe_bitcopy_t, const Vec &) noexcept;
543
-
544
- private:
545
- void reserve_total(std::size_t new_cap) noexcept;
546
- void set_len(std::size_t len) noexcept;
547
- void drop() noexcept;
548
-
549
- friend void swap(Vec &lhs, Vec &rhs) noexcept { lhs.swap(rhs); }
550
-
551
- std::array<std::uintptr_t, 3> repr;
552
- };
553
-
554
- template <typename T>
555
- Vec<T>::Vec(std::initializer_list<T> init) : Vec{} {
556
- this->reserve_total(init.size());
557
- std::move(init.begin(), init.end(), std::back_inserter(*this));
558
- }
559
-
560
- template <typename T>
561
- Vec<T>::Vec(const Vec &other) : Vec() {
562
- this->reserve_total(other.size());
563
- std::copy(other.begin(), other.end(), std::back_inserter(*this));
564
- }
565
-
566
- template <typename T>
567
- Vec<T>::Vec(Vec &&other) noexcept : repr(other.repr) {
568
- new (&other) Vec();
569
- }
570
-
571
- template <typename T>
572
- Vec<T>::~Vec() noexcept {
573
- this->drop();
574
- }
575
-
576
- template <typename T>
577
- Vec<T> &Vec<T>::operator=(Vec &&other) & noexcept {
578
- this->drop();
579
- this->repr = other.repr;
580
- new (&other) Vec();
581
- return *this;
582
- }
583
-
584
- template <typename T>
585
- Vec<T> &Vec<T>::operator=(const Vec &other) & {
586
- if (this != &other) {
587
- this->drop();
588
- new (this) Vec(other);
589
- }
590
- return *this;
591
- }
592
-
593
- template <typename T>
594
- bool Vec<T>::empty() const noexcept {
595
- return this->size() == 0;
596
- }
597
-
598
- template <typename T>
599
- T *Vec<T>::data() noexcept {
600
- return const_cast<T *>(const_cast<const Vec<T> *>(this)->data());
601
- }
602
-
603
- template <typename T>
604
- const T &Vec<T>::operator[](std::size_t n) const noexcept {
605
- assert(n < this->size());
606
- auto data = reinterpret_cast<const char *>(this->data());
607
- return *reinterpret_cast<const T *>(data + n * size_of<T>());
608
- }
609
-
610
- template <typename T>
611
- const T &Vec<T>::at(std::size_t n) const {
612
- if (n >= this->size()) {
613
- panic<std::out_of_range>("rust::Vec index out of range");
614
- }
615
- return (*this)[n];
616
- }
617
-
618
- template <typename T>
619
- const T &Vec<T>::front() const noexcept {
620
- assert(!this->empty());
621
- return (*this)[0];
622
- }
623
-
624
- template <typename T>
625
- const T &Vec<T>::back() const noexcept {
626
- assert(!this->empty());
627
- return (*this)[this->size() - 1];
628
- }
629
-
630
- template <typename T>
631
- T &Vec<T>::operator[](std::size_t n) noexcept {
632
- assert(n < this->size());
633
- auto data = reinterpret_cast<char *>(this->data());
634
- return *reinterpret_cast<T *>(data + n * size_of<T>());
635
- }
636
-
637
- template <typename T>
638
- T &Vec<T>::at(std::size_t n) {
639
- if (n >= this->size()) {
640
- panic<std::out_of_range>("rust::Vec index out of range");
641
- }
642
- return (*this)[n];
643
- }
644
-
645
- template <typename T>
646
- T &Vec<T>::front() noexcept {
647
- assert(!this->empty());
648
- return (*this)[0];
649
- }
650
-
651
- template <typename T>
652
- T &Vec<T>::back() noexcept {
653
- assert(!this->empty());
654
- return (*this)[this->size() - 1];
655
- }
656
-
657
- template <typename T>
658
- void Vec<T>::reserve(std::size_t new_cap) {
659
- this->reserve_total(new_cap);
660
- }
661
-
662
- template <typename T>
663
- void Vec<T>::push_back(const T &value) {
664
- this->emplace_back(value);
665
- }
666
-
667
- template <typename T>
668
- void Vec<T>::push_back(T &&value) {
669
- this->emplace_back(std::move(value));
670
- }
671
-
672
- template <typename T>
673
- template <typename... Args>
674
- void Vec<T>::emplace_back(Args &&...args) {
675
- auto size = this->size();
676
- this->reserve_total(size + 1);
677
- ::new (reinterpret_cast<T *>(reinterpret_cast<char *>(this->data()) +
678
- size * size_of<T>()))
679
- T(std::forward<Args>(args)...);
680
- this->set_len(size + 1);
681
- }
682
-
683
- template <typename T>
684
- void Vec<T>::clear() {
685
- this->truncate(0);
686
- }
687
-
688
- template <typename T>
689
- typename Vec<T>::iterator Vec<T>::begin() noexcept {
690
- return Slice<T>(this->data(), this->size()).begin();
691
- }
692
-
693
- template <typename T>
694
- typename Vec<T>::iterator Vec<T>::end() noexcept {
695
- return Slice<T>(this->data(), this->size()).end();
696
- }
697
-
698
- template <typename T>
699
- typename Vec<T>::const_iterator Vec<T>::begin() const noexcept {
700
- return this->cbegin();
701
- }
702
-
703
- template <typename T>
704
- typename Vec<T>::const_iterator Vec<T>::end() const noexcept {
705
- return this->cend();
706
- }
707
-
708
- template <typename T>
709
- typename Vec<T>::const_iterator Vec<T>::cbegin() const noexcept {
710
- return Slice<const T>(this->data(), this->size()).begin();
711
- }
712
-
713
- template <typename T>
714
- typename Vec<T>::const_iterator Vec<T>::cend() const noexcept {
715
- return Slice<const T>(this->data(), this->size()).end();
716
- }
717
-
718
- template <typename T>
719
- void Vec<T>::swap(Vec &rhs) noexcept {
720
- using std::swap;
721
- swap(this->repr, rhs.repr);
722
- }
723
-
724
- template <typename T>
725
- Vec<T>::Vec(unsafe_bitcopy_t, const Vec &bits) noexcept : repr(bits.repr) {}
726
- #endif // CXXBRIDGE1_RUST_VEC
727
-
728
- #ifndef CXXBRIDGE1_IS_COMPLETE
729
- #define CXXBRIDGE1_IS_COMPLETE
730
- namespace detail {
731
- namespace {
732
- template <typename T, typename = std::size_t>
733
- struct is_complete : std::false_type {};
734
- template <typename T>
735
- struct is_complete<T, decltype(sizeof(T))> : std::true_type {};
736
- } // namespace
737
- } // namespace detail
738
- #endif // CXXBRIDGE1_IS_COMPLETE
739
-
740
- #ifndef CXXBRIDGE1_LAYOUT
741
- #define CXXBRIDGE1_LAYOUT
742
- class layout {
743
- template <typename T>
744
- friend std::size_t size_of();
745
- template <typename T>
746
- friend std::size_t align_of();
747
- template <typename T>
748
- static typename std::enable_if<std::is_base_of<Opaque, T>::value,
749
- std::size_t>::type
750
- do_size_of() {
751
- return T::layout::size();
752
- }
753
- template <typename T>
754
- static typename std::enable_if<!std::is_base_of<Opaque, T>::value,
755
- std::size_t>::type
756
- do_size_of() {
757
- return sizeof(T);
758
- }
759
- template <typename T>
760
- static
761
- typename std::enable_if<detail::is_complete<T>::value, std::size_t>::type
762
- size_of() {
763
- return do_size_of<T>();
764
- }
765
- template <typename T>
766
- static typename std::enable_if<std::is_base_of<Opaque, T>::value,
767
- std::size_t>::type
768
- do_align_of() {
769
- return T::layout::align();
770
- }
771
- template <typename T>
772
- static typename std::enable_if<!std::is_base_of<Opaque, T>::value,
773
- std::size_t>::type
774
- do_align_of() {
775
- return alignof(T);
776
- }
777
- template <typename T>
778
- static
779
- typename std::enable_if<detail::is_complete<T>::value, std::size_t>::type
780
- align_of() {
781
- return do_align_of<T>();
782
- }
783
- };
784
-
785
- template <typename T>
786
- std::size_t size_of() {
787
- return layout::size_of<T>();
788
- }
789
-
790
- template <typename T>
791
- std::size_t align_of() {
792
- return layout::align_of<T>();
793
- }
794
- #endif // CXXBRIDGE1_LAYOUT
795
- } // namespace cxxbridge1
796
- } // namespace rust
797
-
798
- #if __cplusplus >= 201402L
799
- #define CXX_DEFAULT_VALUE(value) = value
800
- #else
801
- #define CXX_DEFAULT_VALUE(value)
802
- #endif
803
-
804
- namespace bark_cxx {
805
- struct BarkVtxo;
806
- enum class PaymentTypes : ::std::uint8_t;
807
- struct BoardResult;
808
- struct NewAddressResult;
809
- struct Bolt11Invoice;
810
- struct Bolt11PaymentResult;
811
- struct Bolt12PaymentResult;
812
- struct LnurlPaymentResult;
813
- struct ArkoorPaymentResult;
814
- struct OnchainPaymentResult;
815
- struct CxxArkInfo;
816
- struct ConfigOpts;
817
- struct CreateOpts;
818
- struct SendManyOutput;
819
- enum class RefreshModeType : ::std::uint8_t;
820
- struct LightningReceive;
821
- struct LightningReceiveBalance;
822
- struct OffchainBalance;
823
- struct OnChainBalance;
824
- struct KeyPairResult;
825
- struct BarkMovementDestination;
826
- struct BarkMovement;
827
- struct RoundStatus;
828
- }
829
-
830
- namespace bark_cxx {
831
- #ifndef CXXBRIDGE1_STRUCT_bark_cxx$BarkVtxo
832
- #define CXXBRIDGE1_STRUCT_bark_cxx$BarkVtxo
833
- struct BarkVtxo final {
834
- ::std::uint64_t amount CXX_DEFAULT_VALUE(0);
835
- ::std::uint32_t expiry_height CXX_DEFAULT_VALUE(0);
836
- ::rust::String server_pubkey;
837
- ::std::uint16_t exit_delta CXX_DEFAULT_VALUE(0);
838
- ::rust::String anchor_point;
839
- ::rust::String point;
840
- ::rust::String state;
841
-
842
- using IsRelocatable = ::std::true_type;
843
- };
844
- #endif // CXXBRIDGE1_STRUCT_bark_cxx$BarkVtxo
845
-
846
- #ifndef CXXBRIDGE1_ENUM_bark_cxx$PaymentTypes
847
- #define CXXBRIDGE1_ENUM_bark_cxx$PaymentTypes
848
- enum class PaymentTypes : ::std::uint8_t {
849
- Bolt11 = 0,
850
- Bolt12 = 1,
851
- Lnurl = 2,
852
- Arkoor = 3,
853
- Onchain = 4,
854
- };
855
- #endif // CXXBRIDGE1_ENUM_bark_cxx$PaymentTypes
856
-
857
- #ifndef CXXBRIDGE1_STRUCT_bark_cxx$BoardResult
858
- #define CXXBRIDGE1_STRUCT_bark_cxx$BoardResult
859
- struct BoardResult final {
860
- ::rust::Vec<::bark_cxx::BarkVtxo> vtxos;
861
- ::rust::String funding_txid;
862
-
863
- using IsRelocatable = ::std::true_type;
864
- };
865
- #endif // CXXBRIDGE1_STRUCT_bark_cxx$BoardResult
866
-
867
- #ifndef CXXBRIDGE1_STRUCT_bark_cxx$NewAddressResult
868
- #define CXXBRIDGE1_STRUCT_bark_cxx$NewAddressResult
869
- struct NewAddressResult final {
870
- ::rust::String user_pubkey;
871
- ::rust::String ark_id;
872
- ::rust::String address;
873
-
874
- using IsRelocatable = ::std::true_type;
875
- };
876
- #endif // CXXBRIDGE1_STRUCT_bark_cxx$NewAddressResult
877
-
878
- #ifndef CXXBRIDGE1_STRUCT_bark_cxx$Bolt11Invoice
879
- #define CXXBRIDGE1_STRUCT_bark_cxx$Bolt11Invoice
880
- struct Bolt11Invoice final {
881
- ::rust::String bolt11_invoice;
882
- ::rust::String payment_secret;
883
- ::rust::String payment_hash;
884
-
885
- using IsRelocatable = ::std::true_type;
886
- };
887
- #endif // CXXBRIDGE1_STRUCT_bark_cxx$Bolt11Invoice
888
-
889
- #ifndef CXXBRIDGE1_STRUCT_bark_cxx$Bolt11PaymentResult
890
- #define CXXBRIDGE1_STRUCT_bark_cxx$Bolt11PaymentResult
891
- struct Bolt11PaymentResult final {
892
- ::rust::String bolt11_invoice;
893
- ::rust::String preimage;
894
- ::bark_cxx::PaymentTypes payment_type;
895
-
896
- using IsRelocatable = ::std::true_type;
897
- };
898
- #endif // CXXBRIDGE1_STRUCT_bark_cxx$Bolt11PaymentResult
899
-
900
- #ifndef CXXBRIDGE1_STRUCT_bark_cxx$Bolt12PaymentResult
901
- #define CXXBRIDGE1_STRUCT_bark_cxx$Bolt12PaymentResult
902
- struct Bolt12PaymentResult final {
903
- ::rust::String bolt12_offer;
904
- ::rust::String preimage;
905
- ::bark_cxx::PaymentTypes payment_type;
906
-
907
- using IsRelocatable = ::std::true_type;
908
- };
909
- #endif // CXXBRIDGE1_STRUCT_bark_cxx$Bolt12PaymentResult
910
-
911
- #ifndef CXXBRIDGE1_STRUCT_bark_cxx$LnurlPaymentResult
912
- #define CXXBRIDGE1_STRUCT_bark_cxx$LnurlPaymentResult
913
- struct LnurlPaymentResult final {
914
- ::rust::String lnurl;
915
- ::rust::String bolt11_invoice;
916
- ::rust::String preimage;
917
- ::bark_cxx::PaymentTypes payment_type;
918
-
919
- using IsRelocatable = ::std::true_type;
920
- };
921
- #endif // CXXBRIDGE1_STRUCT_bark_cxx$LnurlPaymentResult
922
-
923
- #ifndef CXXBRIDGE1_STRUCT_bark_cxx$ArkoorPaymentResult
924
- #define CXXBRIDGE1_STRUCT_bark_cxx$ArkoorPaymentResult
925
- struct ArkoorPaymentResult final {
926
- ::std::uint64_t amount_sat CXX_DEFAULT_VALUE(0);
927
- ::rust::String destination_pubkey;
928
- ::bark_cxx::PaymentTypes payment_type;
929
- ::rust::Vec<::bark_cxx::BarkVtxo> vtxos;
930
-
931
- using IsRelocatable = ::std::true_type;
932
- };
933
- #endif // CXXBRIDGE1_STRUCT_bark_cxx$ArkoorPaymentResult
934
-
935
- #ifndef CXXBRIDGE1_STRUCT_bark_cxx$OnchainPaymentResult
936
- #define CXXBRIDGE1_STRUCT_bark_cxx$OnchainPaymentResult
937
- struct OnchainPaymentResult final {
938
- ::rust::String txid;
939
- ::std::uint64_t amount_sat CXX_DEFAULT_VALUE(0);
940
- ::rust::String destination_address;
941
- ::bark_cxx::PaymentTypes payment_type;
942
-
943
- using IsRelocatable = ::std::true_type;
944
- };
945
- #endif // CXXBRIDGE1_STRUCT_bark_cxx$OnchainPaymentResult
946
-
947
- #ifndef CXXBRIDGE1_STRUCT_bark_cxx$CxxArkInfo
948
- #define CXXBRIDGE1_STRUCT_bark_cxx$CxxArkInfo
949
- struct CxxArkInfo final {
950
- ::rust::String network;
951
- ::rust::String server_pubkey;
952
- ::std::uint64_t round_interval CXX_DEFAULT_VALUE(0);
953
- ::std::uint16_t nb_round_nonces CXX_DEFAULT_VALUE(0);
954
- ::std::uint16_t vtxo_exit_delta CXX_DEFAULT_VALUE(0);
955
- ::std::uint16_t vtxo_expiry_delta CXX_DEFAULT_VALUE(0);
956
- ::std::uint16_t htlc_send_expiry_delta CXX_DEFAULT_VALUE(0);
957
- ::std::uint64_t max_vtxo_amount CXX_DEFAULT_VALUE(0);
958
- ::std::uint16_t max_arkoor_depth CXX_DEFAULT_VALUE(0);
959
- ::std::uint8_t required_board_confirmations CXX_DEFAULT_VALUE(0);
960
-
961
- using IsRelocatable = ::std::true_type;
962
- };
963
- #endif // CXXBRIDGE1_STRUCT_bark_cxx$CxxArkInfo
964
-
965
- #ifndef CXXBRIDGE1_STRUCT_bark_cxx$ConfigOpts
966
- #define CXXBRIDGE1_STRUCT_bark_cxx$ConfigOpts
967
- struct ConfigOpts final {
968
- ::rust::String ark;
969
- ::rust::String esplora;
970
- ::rust::String bitcoind;
971
- ::rust::String bitcoind_cookie;
972
- ::rust::String bitcoind_user;
973
- ::rust::String bitcoind_pass;
974
- ::std::uint32_t vtxo_refresh_expiry_threshold CXX_DEFAULT_VALUE(0);
975
- ::std::uint64_t fallback_fee_rate CXX_DEFAULT_VALUE(0);
976
- ::std::uint16_t htlc_recv_claim_delta CXX_DEFAULT_VALUE(0);
977
- ::std::uint16_t vtxo_exit_margin CXX_DEFAULT_VALUE(0);
978
- ::std::uint32_t round_tx_required_confirmations CXX_DEFAULT_VALUE(0);
979
-
980
- using IsRelocatable = ::std::true_type;
981
- };
982
- #endif // CXXBRIDGE1_STRUCT_bark_cxx$ConfigOpts
983
-
984
- #ifndef CXXBRIDGE1_STRUCT_bark_cxx$CreateOpts
985
- #define CXXBRIDGE1_STRUCT_bark_cxx$CreateOpts
986
- struct CreateOpts final {
987
- bool regtest CXX_DEFAULT_VALUE(false);
988
- bool signet CXX_DEFAULT_VALUE(false);
989
- bool bitcoin CXX_DEFAULT_VALUE(false);
990
- ::rust::String mnemonic;
991
- ::std::uint32_t const *birthday_height CXX_DEFAULT_VALUE(nullptr);
992
- ::bark_cxx::ConfigOpts config;
993
-
994
- using IsRelocatable = ::std::true_type;
995
- };
996
- #endif // CXXBRIDGE1_STRUCT_bark_cxx$CreateOpts
997
-
998
- #ifndef CXXBRIDGE1_STRUCT_bark_cxx$SendManyOutput
999
- #define CXXBRIDGE1_STRUCT_bark_cxx$SendManyOutput
1000
- struct SendManyOutput final {
1001
- ::rust::String destination;
1002
- ::std::uint64_t amount_sat CXX_DEFAULT_VALUE(0);
1003
-
1004
- using IsRelocatable = ::std::true_type;
1005
- };
1006
- #endif // CXXBRIDGE1_STRUCT_bark_cxx$SendManyOutput
1007
-
1008
- #ifndef CXXBRIDGE1_ENUM_bark_cxx$RefreshModeType
1009
- #define CXXBRIDGE1_ENUM_bark_cxx$RefreshModeType
1010
- enum class RefreshModeType : ::std::uint8_t {
1011
- DefaultThreshold = 0,
1012
- ThresholdBlocks = 1,
1013
- ThresholdHours = 2,
1014
- Counterparty = 3,
1015
- All = 4,
1016
- Specific = 5,
1017
- };
1018
- #endif // CXXBRIDGE1_ENUM_bark_cxx$RefreshModeType
1019
-
1020
- #ifndef CXXBRIDGE1_STRUCT_bark_cxx$LightningReceive
1021
- #define CXXBRIDGE1_STRUCT_bark_cxx$LightningReceive
1022
- struct LightningReceive final {
1023
- ::rust::String payment_hash;
1024
- ::rust::String payment_preimage;
1025
- ::rust::String invoice;
1026
- ::std::uint64_t const *preimage_revealed_at CXX_DEFAULT_VALUE(nullptr);
1027
-
1028
- using IsRelocatable = ::std::true_type;
1029
- };
1030
- #endif // CXXBRIDGE1_STRUCT_bark_cxx$LightningReceive
1031
-
1032
- #ifndef CXXBRIDGE1_STRUCT_bark_cxx$LightningReceiveBalance
1033
- #define CXXBRIDGE1_STRUCT_bark_cxx$LightningReceiveBalance
1034
- struct LightningReceiveBalance final {
1035
- // Sum of all pending lightning invoices
1036
- ::std::uint64_t total CXX_DEFAULT_VALUE(0);
1037
- // Sum of all invoices for which we received the HTLC VTXOs
1038
- ::std::uint64_t claimable CXX_DEFAULT_VALUE(0);
1039
-
1040
- using IsRelocatable = ::std::true_type;
1041
- };
1042
- #endif // CXXBRIDGE1_STRUCT_bark_cxx$LightningReceiveBalance
1043
-
1044
- #ifndef CXXBRIDGE1_STRUCT_bark_cxx$OffchainBalance
1045
- #define CXXBRIDGE1_STRUCT_bark_cxx$OffchainBalance
1046
- struct OffchainBalance final {
1047
- // Coins that are spendable in the Ark, either in-round or out-of-round.
1048
- ::std::uint64_t spendable CXX_DEFAULT_VALUE(0);
1049
- // Coins that are in the process of being sent over Lightning.
1050
- ::std::uint64_t pending_lightning_send CXX_DEFAULT_VALUE(0);
1051
- // Coins that are in the process of being received over Lightning.
1052
- ::bark_cxx::LightningReceiveBalance pending_lightning_receive;
1053
- // Coins locked in a round.
1054
- ::std::uint64_t pending_in_round CXX_DEFAULT_VALUE(0);
1055
- // Coins that are in the process of unilaterally exiting the Ark.
1056
- ::std::uint64_t pending_exit CXX_DEFAULT_VALUE(0);
1057
- // Coins that are pending sufficient confirmations from board transactions.
1058
- ::std::uint64_t pending_board CXX_DEFAULT_VALUE(0);
1059
-
1060
- using IsRelocatable = ::std::true_type;
1061
- };
1062
- #endif // CXXBRIDGE1_STRUCT_bark_cxx$OffchainBalance
1063
-
1064
- #ifndef CXXBRIDGE1_STRUCT_bark_cxx$OnChainBalance
1065
- #define CXXBRIDGE1_STRUCT_bark_cxx$OnChainBalance
1066
- struct OnChainBalance final {
1067
- // All coinbase outputs not yet matured
1068
- ::std::uint64_t immature CXX_DEFAULT_VALUE(0);
1069
- // Unconfirmed UTXOs generated by a wallet tx
1070
- ::std::uint64_t trusted_pending CXX_DEFAULT_VALUE(0);
1071
- // Unconfirmed UTXOs received from an external wallet
1072
- ::std::uint64_t untrusted_pending CXX_DEFAULT_VALUE(0);
1073
- // Confirmed and immediately spendable balance
1074
- ::std::uint64_t confirmed CXX_DEFAULT_VALUE(0);
1075
-
1076
- using IsRelocatable = ::std::true_type;
1077
- };
1078
- #endif // CXXBRIDGE1_STRUCT_bark_cxx$OnChainBalance
1079
-
1080
- #ifndef CXXBRIDGE1_STRUCT_bark_cxx$KeyPairResult
1081
- #define CXXBRIDGE1_STRUCT_bark_cxx$KeyPairResult
1082
- struct KeyPairResult final {
1083
- ::rust::String public_key;
1084
- ::rust::String secret_key;
1085
-
1086
- using IsRelocatable = ::std::true_type;
1087
- };
1088
- #endif // CXXBRIDGE1_STRUCT_bark_cxx$KeyPairResult
1089
-
1090
- #ifndef CXXBRIDGE1_STRUCT_bark_cxx$BarkMovementDestination
1091
- #define CXXBRIDGE1_STRUCT_bark_cxx$BarkMovementDestination
1092
- struct BarkMovementDestination final {
1093
- ::rust::String destination;
1094
- ::std::uint64_t amount_sat CXX_DEFAULT_VALUE(0);
1095
-
1096
- using IsRelocatable = ::std::true_type;
1097
- };
1098
- #endif // CXXBRIDGE1_STRUCT_bark_cxx$BarkMovementDestination
1099
-
1100
- #ifndef CXXBRIDGE1_STRUCT_bark_cxx$BarkMovement
1101
- #define CXXBRIDGE1_STRUCT_bark_cxx$BarkMovement
1102
- struct BarkMovement final {
1103
- ::std::uint32_t id CXX_DEFAULT_VALUE(0);
1104
- ::rust::String status;
1105
- ::rust::String subsystem_name;
1106
- ::rust::String subsystem_kind;
1107
- ::rust::String metadata_json;
1108
- ::std::int64_t intended_balance_sat CXX_DEFAULT_VALUE(0);
1109
- ::std::int64_t effective_balance_sat CXX_DEFAULT_VALUE(0);
1110
- ::std::uint64_t offchain_fee_sat CXX_DEFAULT_VALUE(0);
1111
- ::rust::Vec<::bark_cxx::BarkMovementDestination> sent_to;
1112
- ::rust::Vec<::bark_cxx::BarkMovementDestination> received_on;
1113
- ::rust::Vec<::rust::String> input_vtxos;
1114
- ::rust::Vec<::rust::String> output_vtxos;
1115
- ::rust::Vec<::rust::String> exited_vtxos;
1116
- ::rust::String created_at;
1117
- ::rust::String updated_at;
1118
- ::rust::String completed_at;
1119
-
1120
- using IsRelocatable = ::std::true_type;
1121
- };
1122
- #endif // CXXBRIDGE1_STRUCT_bark_cxx$BarkMovement
1123
-
1124
- #ifndef CXXBRIDGE1_STRUCT_bark_cxx$RoundStatus
1125
- #define CXXBRIDGE1_STRUCT_bark_cxx$RoundStatus
1126
- struct RoundStatus final {
1127
- ::rust::String status;
1128
- ::rust::String funding_txid;
1129
- ::rust::Vec<::rust::String> unsigned_funding_txids;
1130
- ::rust::String error;
1131
- bool is_final CXX_DEFAULT_VALUE(false);
1132
- bool is_success CXX_DEFAULT_VALUE(false);
1133
-
1134
- using IsRelocatable = ::std::true_type;
1135
- };
1136
- #endif // CXXBRIDGE1_STRUCT_bark_cxx$RoundStatus
1137
-
1138
- void init_logger() noexcept;
1139
-
1140
- ::rust::String create_mnemonic();
1141
-
1142
- bool is_wallet_loaded() noexcept;
1143
-
1144
- void close_wallet();
1145
-
1146
- ::bark_cxx::CxxArkInfo get_ark_info();
1147
-
1148
- ::bark_cxx::OffchainBalance offchain_balance();
1149
-
1150
- ::bark_cxx::KeyPairResult derive_store_next_keypair();
1151
-
1152
- ::bark_cxx::KeyPairResult peak_keypair(::std::uint32_t index);
1153
-
1154
- ::bark_cxx::NewAddressResult new_address();
1155
-
1156
- ::bark_cxx::NewAddressResult peak_address(::std::uint32_t index);
1157
-
1158
- ::rust::String sign_message(::rust::Str message, ::std::uint32_t index);
1159
-
1160
- ::rust::String sign_messsage_with_mnemonic(::rust::Str message, ::rust::Str mnemonic, ::rust::Str network, ::std::uint32_t index);
1161
-
1162
- ::bark_cxx::KeyPairResult derive_keypair_from_mnemonic(::rust::Str mnemonic, ::rust::Str network, ::std::uint32_t index);
1163
-
1164
- bool verify_message(::rust::Str message, ::rust::Str signature, ::rust::Str public_key);
1165
-
1166
- ::rust::Vec<::bark_cxx::BarkMovement> movements();
1167
-
1168
- ::rust::Vec<::bark_cxx::BarkVtxo> vtxos();
1169
-
1170
- ::rust::Vec<::bark_cxx::BarkVtxo> get_expiring_vtxos(::std::uint32_t threshold);
1171
-
1172
- ::std::uint32_t const *get_first_expiring_vtxo_blockheight();
1173
-
1174
- ::std::uint32_t const *get_next_required_refresh_blockheight();
1175
-
1176
- ::bark_cxx::Bolt11Invoice bolt11_invoice(::std::uint64_t amount_msat);
1177
-
1178
- ::bark_cxx::LightningReceive const *lightning_receive_status(::rust::String payment_hash);
1179
-
1180
- void sync_pending_boards();
1181
-
1182
- void maintenance();
1183
-
1184
- void maintenance_with_onchain();
1185
-
1186
- void maintenance_refresh();
1187
-
1188
- void check_connection();
1189
-
1190
- void sync();
1191
-
1192
- void create_wallet(::rust::Str datadir, ::bark_cxx::CreateOpts opts);
1193
-
1194
- void load_wallet(::rust::Str datadir, ::bark_cxx::CreateOpts config);
1195
-
1196
- ::bark_cxx::BoardResult board_amount(::std::uint64_t amount_sat);
1197
-
1198
- ::bark_cxx::BoardResult board_all();
1199
-
1200
- void validate_arkoor_address(::rust::Str address);
1201
-
1202
- ::bark_cxx::ArkoorPaymentResult send_arkoor_payment(::rust::Str destination, ::std::uint64_t amount_sat);
1203
-
1204
- ::bark_cxx::Bolt11PaymentResult pay_lightning_invoice(::rust::Str destination, ::std::uint64_t const *amount_sat);
1205
-
1206
- ::bark_cxx::Bolt12PaymentResult pay_lightning_offer(::rust::Str offer, ::std::uint64_t const *amount_sat);
1207
-
1208
- ::bark_cxx::LnurlPaymentResult pay_lightning_address(::rust::Str addr, ::std::uint64_t amount_sat, ::rust::Str comment);
1209
-
1210
- ::bark_cxx::RoundStatus send_round_onchain_payment(::rust::Str destination, ::std::uint64_t amount_sat);
1211
-
1212
- ::bark_cxx::RoundStatus offboard_specific(::rust::Vec<::rust::String> vtxo_ids, ::rust::Str destination_address);
1213
-
1214
- ::bark_cxx::RoundStatus offboard_all(::rust::Str destination_address);
1215
-
1216
- void try_claim_lightning_receive(::rust::String payment_hash, bool wait, ::rust::String const *token);
1217
-
1218
- void try_claim_all_lightning_receives(bool wait);
1219
-
1220
- void sync_exits();
1221
-
1222
- ::bark_cxx::OnChainBalance onchain_balance();
1223
-
1224
- void onchain_sync();
1225
-
1226
- ::rust::String onchain_list_unspent();
1227
-
1228
- ::rust::String onchain_utxos();
1229
-
1230
- ::rust::String onchain_address();
1231
-
1232
- ::bark_cxx::OnchainPaymentResult onchain_send(::rust::Str destination, ::std::uint64_t amount_sat, ::std::uint64_t const *fee_rate);
1233
-
1234
- ::rust::String onchain_drain(::rust::Str destination, ::std::uint64_t const *fee_rate);
1235
-
1236
- ::rust::String onchain_send_many(::rust::Vec<::bark_cxx::SendManyOutput> outputs, ::std::uint64_t const *fee_rate);
1237
- } // namespace bark_cxx
1238
-
1239
- #ifdef __clang__
1240
- #pragma clang diagnostic pop
1241
- #endif // __clang__