react-native-candle 0.1.19 → 0.1.21

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.
Files changed (54) hide show
  1. package/ReactNativeCandle.podspec +1 -1
  2. package/ios/Sources/CandleActionViewModel.swift +13 -0
  3. package/ios/Sources/CandleTradeExecutionSheetWrapper.swift +31 -0
  4. package/ios/Sources/HostingViewController.swift +7 -0
  5. package/ios/Sources/RNCandle.swift +300 -84
  6. package/lib/commonjs/index.js +140 -15
  7. package/lib/commonjs/index.js.map +1 -1
  8. package/lib/module/index.js +140 -15
  9. package/lib/module/index.js.map +1 -1
  10. package/lib/typescript/commonjs/src/index.d.ts +46 -13
  11. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  12. package/lib/typescript/commonjs/src/specs/RNCandle.nitro.d.ts +50 -2
  13. package/lib/typescript/commonjs/src/specs/RNCandle.nitro.d.ts.map +1 -1
  14. package/lib/typescript/module/src/index.d.ts +46 -13
  15. package/lib/typescript/module/src/index.d.ts.map +1 -1
  16. package/lib/typescript/module/src/specs/RNCandle.nitro.d.ts +50 -2
  17. package/lib/typescript/module/src/specs/RNCandle.nitro.d.ts.map +1 -1
  18. package/nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Bridge.cpp +24 -8
  19. package/nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Bridge.hpp +271 -113
  20. package/nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Umbrella.hpp +30 -3
  21. package/nitrogen/generated/ios/c++/HybridRNCandleSpecSwift.hpp +106 -57
  22. package/nitrogen/generated/ios/swift/AssetAccountRef.swift +55 -0
  23. package/nitrogen/generated/ios/swift/FiatAssetRef.swift +75 -0
  24. package/nitrogen/generated/ios/swift/Func_void_AssetAccount.swift +44 -0
  25. package/nitrogen/generated/ios/swift/Func_void_LinkedAccount.swift +5 -5
  26. package/nitrogen/generated/ios/swift/Func_void_TradeExecutionResult.swift +46 -0
  27. package/nitrogen/generated/ios/swift/HybridRNCandleSpec.swift +7 -2
  28. package/nitrogen/generated/ios/swift/HybridRNCandleSpec_cxx.swift +86 -24
  29. package/nitrogen/generated/ios/swift/LinkedAccountRef.swift +33 -0
  30. package/nitrogen/generated/ios/swift/MarketTradeAssetRef.swift +55 -0
  31. package/nitrogen/generated/ios/swift/NothingAssetRef.swift +33 -0
  32. package/nitrogen/generated/ios/swift/OtherAssetRef.swift +33 -0
  33. package/nitrogen/generated/ios/swift/TradeAssetRef.swift +176 -0
  34. package/nitrogen/generated/ios/swift/TradeExecutionResult.swift +82 -0
  35. package/nitrogen/generated/ios/swift/TradeQuote.swift +13 -2
  36. package/nitrogen/generated/ios/swift/TradeRef.swift +44 -0
  37. package/nitrogen/generated/ios/swift/TransportAssetRef.swift +55 -0
  38. package/nitrogen/generated/shared/c++/AssetAccountRef.hpp +77 -0
  39. package/nitrogen/generated/shared/c++/FiatAssetRef.hpp +78 -0
  40. package/nitrogen/generated/shared/c++/HybridRNCandleSpec.cpp +4 -1
  41. package/nitrogen/generated/shared/c++/HybridRNCandleSpec.hpp +20 -8
  42. package/nitrogen/generated/shared/c++/{ExecuteTradeRequest.hpp → LinkedAccountRef.hpp} +11 -15
  43. package/nitrogen/generated/shared/c++/MarketTradeAssetRef.hpp +77 -0
  44. package/nitrogen/generated/shared/c++/NothingAssetRef.hpp +69 -0
  45. package/nitrogen/generated/shared/c++/OtherAssetRef.hpp +69 -0
  46. package/nitrogen/generated/shared/c++/TradeAssetRef.hpp +99 -0
  47. package/nitrogen/generated/shared/c++/TradeExecutionResult.hpp +76 -0
  48. package/nitrogen/generated/shared/c++/TradeQuote.hpp +7 -2
  49. package/nitrogen/generated/shared/c++/TradeRef.hpp +74 -0
  50. package/nitrogen/generated/shared/c++/TransportAssetRef.hpp +77 -0
  51. package/package.json +1 -1
  52. package/src/index.ts +199 -33
  53. package/src/specs/RNCandle.nitro.ts +64 -2
  54. package/nitrogen/generated/ios/swift/ExecuteTradeRequest.swift +0 -44
@@ -32,6 +32,8 @@ namespace margelo::nitro::rncandle { struct Counterparty; }
32
32
  namespace margelo::nitro::rncandle { struct FiatAccountDetails; }
33
33
  // Forward declaration of `FiatAssetQuoteRequest` to properly resolve imports.
34
34
  namespace margelo::nitro::rncandle { struct FiatAssetQuoteRequest; }
35
+ // Forward declaration of `FiatAssetRef` to properly resolve imports.
36
+ namespace margelo::nitro::rncandle { struct FiatAssetRef; }
35
37
  // Forward declaration of `FiatAsset` to properly resolve imports.
36
38
  namespace margelo::nitro::rncandle { struct FiatAsset; }
37
39
  // Forward declaration of `HybridRNCandleSpec` to properly resolve imports.
@@ -48,6 +50,8 @@ namespace margelo::nitro::rncandle { struct LinkedAccount; }
48
50
  namespace margelo::nitro::rncandle { struct MarketAccountDetails; }
49
51
  // Forward declaration of `MarketAssetQuoteRequest` to properly resolve imports.
50
52
  namespace margelo::nitro::rncandle { struct MarketAssetQuoteRequest; }
53
+ // Forward declaration of `MarketTradeAssetRef` to properly resolve imports.
54
+ namespace margelo::nitro::rncandle { struct MarketTradeAssetRef; }
51
55
  // Forward declaration of `MarketTradeAsset` to properly resolve imports.
52
56
  namespace margelo::nitro::rncandle { struct MarketTradeAsset; }
53
57
  // Forward declaration of `MerchantCounterparty` to properly resolve imports.
@@ -56,8 +60,12 @@ namespace margelo::nitro::rncandle { struct MerchantCounterparty; }
56
60
  namespace margelo::nitro::rncandle { struct MerchantLocation; }
57
61
  // Forward declaration of `NothingAssetQuoteRequest` to properly resolve imports.
58
62
  namespace margelo::nitro::rncandle { struct NothingAssetQuoteRequest; }
63
+ // Forward declaration of `NothingAssetRef` to properly resolve imports.
64
+ namespace margelo::nitro::rncandle { struct NothingAssetRef; }
59
65
  // Forward declaration of `NothingAsset` to properly resolve imports.
60
66
  namespace margelo::nitro::rncandle { struct NothingAsset; }
67
+ // Forward declaration of `OtherAssetRef` to properly resolve imports.
68
+ namespace margelo::nitro::rncandle { struct OtherAssetRef; }
61
69
  // Forward declaration of `OtherAsset` to properly resolve imports.
62
70
  namespace margelo::nitro::rncandle { struct OtherAsset; }
63
71
  // Forward declaration of `ServiceCounterparty` to properly resolve imports.
@@ -66,6 +74,8 @@ namespace margelo::nitro::rncandle { struct ServiceCounterparty; }
66
74
  namespace margelo::nitro::rncandle { enum class Service; }
67
75
  // Forward declaration of `TradeAsset` to properly resolve imports.
68
76
  namespace margelo::nitro::rncandle { struct TradeAsset; }
77
+ // Forward declaration of `TradeExecutionResult` to properly resolve imports.
78
+ namespace margelo::nitro::rncandle { struct TradeExecutionResult; }
69
79
  // Forward declaration of `TradeQuote` to properly resolve imports.
70
80
  namespace margelo::nitro::rncandle { struct TradeQuote; }
71
81
  // Forward declaration of `TradeState` to properly resolve imports.
@@ -74,6 +84,8 @@ namespace margelo::nitro::rncandle { enum class TradeState; }
74
84
  namespace margelo::nitro::rncandle { struct Trade; }
75
85
  // Forward declaration of `TransportAssetQuoteRequest` to properly resolve imports.
76
86
  namespace margelo::nitro::rncandle { struct TransportAssetQuoteRequest; }
87
+ // Forward declaration of `TransportAssetRef` to properly resolve imports.
88
+ namespace margelo::nitro::rncandle { struct TransportAssetRef; }
77
89
  // Forward declaration of `TransportAsset` to properly resolve imports.
78
90
  namespace margelo::nitro::rncandle { struct TransportAsset; }
79
91
  // Forward declaration of `UserCounterparty` to properly resolve imports.
@@ -98,6 +110,7 @@ namespace ReactNativeCandle { class HybridRNCandleSpec_cxx; }
98
110
  #include "FiatAccountDetails.hpp"
99
111
  #include "FiatAsset.hpp"
100
112
  #include "FiatAssetQuoteRequest.hpp"
113
+ #include "FiatAssetRef.hpp"
101
114
  #include "HybridRNCandleSpec.hpp"
102
115
  #include "InactiveLinkedAccountDetails.hpp"
103
116
  #include "LegalAccountKind.hpp"
@@ -106,19 +119,24 @@ namespace ReactNativeCandle { class HybridRNCandleSpec_cxx; }
106
119
  #include "MarketAccountDetails.hpp"
107
120
  #include "MarketAssetQuoteRequest.hpp"
108
121
  #include "MarketTradeAsset.hpp"
122
+ #include "MarketTradeAssetRef.hpp"
109
123
  #include "MerchantCounterparty.hpp"
110
124
  #include "MerchantLocation.hpp"
111
125
  #include "NothingAsset.hpp"
112
126
  #include "NothingAssetQuoteRequest.hpp"
127
+ #include "NothingAssetRef.hpp"
113
128
  #include "OtherAsset.hpp"
129
+ #include "OtherAssetRef.hpp"
114
130
  #include "Service.hpp"
115
131
  #include "ServiceCounterparty.hpp"
116
132
  #include "Trade.hpp"
117
133
  #include "TradeAsset.hpp"
134
+ #include "TradeExecutionResult.hpp"
118
135
  #include "TradeQuote.hpp"
119
136
  #include "TradeState.hpp"
120
137
  #include "TransportAsset.hpp"
121
138
  #include "TransportAssetQuoteRequest.hpp"
139
+ #include "TransportAssetRef.hpp"
122
140
  #include "UserCounterparty.hpp"
123
141
  #include "WireDetails.hpp"
124
142
  #include <NitroModules/AnyMap.hpp>
@@ -207,6 +225,118 @@ namespace margelo::nitro::rncandle::bridge::swift {
207
225
  return Func_void_LinkedAccount_Wrapper(std::move(value));
208
226
  }
209
227
 
228
+ // pragma MARK: std::optional<FiatAsset>
229
+ /**
230
+ * Specialized version of `std::optional<FiatAsset>`.
231
+ */
232
+ using std__optional_FiatAsset_ = std::optional<FiatAsset>;
233
+ inline std::optional<FiatAsset> create_std__optional_FiatAsset_(const FiatAsset& value) {
234
+ return std::optional<FiatAsset>(value);
235
+ }
236
+
237
+ // pragma MARK: std::optional<MarketTradeAsset>
238
+ /**
239
+ * Specialized version of `std::optional<MarketTradeAsset>`.
240
+ */
241
+ using std__optional_MarketTradeAsset_ = std::optional<MarketTradeAsset>;
242
+ inline std::optional<MarketTradeAsset> create_std__optional_MarketTradeAsset_(const MarketTradeAsset& value) {
243
+ return std::optional<MarketTradeAsset>(value);
244
+ }
245
+
246
+ // pragma MARK: std::optional<TransportAsset>
247
+ /**
248
+ * Specialized version of `std::optional<TransportAsset>`.
249
+ */
250
+ using std__optional_TransportAsset_ = std::optional<TransportAsset>;
251
+ inline std::optional<TransportAsset> create_std__optional_TransportAsset_(const TransportAsset& value) {
252
+ return std::optional<TransportAsset>(value);
253
+ }
254
+
255
+ // pragma MARK: std::optional<OtherAsset>
256
+ /**
257
+ * Specialized version of `std::optional<OtherAsset>`.
258
+ */
259
+ using std__optional_OtherAsset_ = std::optional<OtherAsset>;
260
+ inline std::optional<OtherAsset> create_std__optional_OtherAsset_(const OtherAsset& value) {
261
+ return std::optional<OtherAsset>(value);
262
+ }
263
+
264
+ // pragma MARK: std::optional<NothingAsset>
265
+ /**
266
+ * Specialized version of `std::optional<NothingAsset>`.
267
+ */
268
+ using std__optional_NothingAsset_ = std::optional<NothingAsset>;
269
+ inline std::optional<NothingAsset> create_std__optional_NothingAsset_(const NothingAsset& value) {
270
+ return std::optional<NothingAsset>(value);
271
+ }
272
+
273
+ // pragma MARK: std::optional<MerchantLocation>
274
+ /**
275
+ * Specialized version of `std::optional<MerchantLocation>`.
276
+ */
277
+ using std__optional_MerchantLocation_ = std::optional<MerchantLocation>;
278
+ inline std::optional<MerchantLocation> create_std__optional_MerchantLocation_(const MerchantLocation& value) {
279
+ return std::optional<MerchantLocation>(value);
280
+ }
281
+
282
+ // pragma MARK: std::optional<MerchantCounterparty>
283
+ /**
284
+ * Specialized version of `std::optional<MerchantCounterparty>`.
285
+ */
286
+ using std__optional_MerchantCounterparty_ = std::optional<MerchantCounterparty>;
287
+ inline std::optional<MerchantCounterparty> create_std__optional_MerchantCounterparty_(const MerchantCounterparty& value) {
288
+ return std::optional<MerchantCounterparty>(value);
289
+ }
290
+
291
+ // pragma MARK: std::optional<UserCounterparty>
292
+ /**
293
+ * Specialized version of `std::optional<UserCounterparty>`.
294
+ */
295
+ using std__optional_UserCounterparty_ = std::optional<UserCounterparty>;
296
+ inline std::optional<UserCounterparty> create_std__optional_UserCounterparty_(const UserCounterparty& value) {
297
+ return std::optional<UserCounterparty>(value);
298
+ }
299
+
300
+ // pragma MARK: std::optional<ServiceCounterparty>
301
+ /**
302
+ * Specialized version of `std::optional<ServiceCounterparty>`.
303
+ */
304
+ using std__optional_ServiceCounterparty_ = std::optional<ServiceCounterparty>;
305
+ inline std::optional<ServiceCounterparty> create_std__optional_ServiceCounterparty_(const ServiceCounterparty& value) {
306
+ return std::optional<ServiceCounterparty>(value);
307
+ }
308
+
309
+ // pragma MARK: std::optional<Trade>
310
+ /**
311
+ * Specialized version of `std::optional<Trade>`.
312
+ */
313
+ using std__optional_Trade_ = std::optional<Trade>;
314
+ inline std::optional<Trade> create_std__optional_Trade_(const Trade& value) {
315
+ return std::optional<Trade>(value);
316
+ }
317
+
318
+ // pragma MARK: std::function<void(const TradeExecutionResult& /* result */)>
319
+ /**
320
+ * Specialized version of `std::function<void(const TradeExecutionResult&)>`.
321
+ */
322
+ using Func_void_TradeExecutionResult = std::function<void(const TradeExecutionResult& /* result */)>;
323
+ /**
324
+ * Wrapper class for a `std::function<void(const TradeExecutionResult& / * result * /)>`, this can be used from Swift.
325
+ */
326
+ class Func_void_TradeExecutionResult_Wrapper final {
327
+ public:
328
+ explicit Func_void_TradeExecutionResult_Wrapper(std::function<void(const TradeExecutionResult& /* result */)>&& func): _function(std::make_shared<std::function<void(const TradeExecutionResult& /* result */)>>(std::move(func))) {}
329
+ inline void call(TradeExecutionResult result) const {
330
+ _function->operator()(result);
331
+ }
332
+ private:
333
+ std::shared_ptr<std::function<void(const TradeExecutionResult& /* result */)>> _function;
334
+ };
335
+ Func_void_TradeExecutionResult create_Func_void_TradeExecutionResult(void* _Nonnull swiftClosureWrapper);
336
+ inline Func_void_TradeExecutionResult_Wrapper wrap_Func_void_TradeExecutionResult(Func_void_TradeExecutionResult value) {
337
+ return Func_void_TradeExecutionResult_Wrapper(std::move(value));
338
+ }
339
+
210
340
  // pragma MARK: std::vector<LinkedAccount>
211
341
  /**
212
342
  * Specialized version of `std::vector<LinkedAccount>`.
@@ -274,6 +404,18 @@ namespace margelo::nitro::rncandle::bridge::swift {
274
404
  return Func_void_std__exception_ptr_Wrapper(std::move(value));
275
405
  }
276
406
 
407
+ // pragma MARK: std::shared_ptr<Promise<LinkedAccount>>
408
+ /**
409
+ * Specialized version of `std::shared_ptr<Promise<LinkedAccount>>`.
410
+ */
411
+ using std__shared_ptr_Promise_LinkedAccount__ = std::shared_ptr<Promise<LinkedAccount>>;
412
+ inline std::shared_ptr<Promise<LinkedAccount>> create_std__shared_ptr_Promise_LinkedAccount__() {
413
+ return Promise<LinkedAccount>::create();
414
+ }
415
+ inline PromiseHolder<LinkedAccount> wrap_std__shared_ptr_Promise_LinkedAccount__(std::shared_ptr<Promise<LinkedAccount>> promise) {
416
+ return PromiseHolder<LinkedAccount>(std::move(promise));
417
+ }
418
+
277
419
  // pragma MARK: std::shared_ptr<Promise<void>>
278
420
  /**
279
421
  * Specialized version of `std::shared_ptr<Promise<void>>`.
@@ -407,85 +549,38 @@ namespace margelo::nitro::rncandle::bridge::swift {
407
549
  return std::optional<AssetAccountKind>(value);
408
550
  }
409
551
 
410
- // pragma MARK: std::optional<MerchantLocation>
411
- /**
412
- * Specialized version of `std::optional<MerchantLocation>`.
413
- */
414
- using std__optional_MerchantLocation_ = std::optional<MerchantLocation>;
415
- inline std::optional<MerchantLocation> create_std__optional_MerchantLocation_(const MerchantLocation& value) {
416
- return std::optional<MerchantLocation>(value);
417
- }
418
-
419
- // pragma MARK: std::optional<MerchantCounterparty>
420
- /**
421
- * Specialized version of `std::optional<MerchantCounterparty>`.
422
- */
423
- using std__optional_MerchantCounterparty_ = std::optional<MerchantCounterparty>;
424
- inline std::optional<MerchantCounterparty> create_std__optional_MerchantCounterparty_(const MerchantCounterparty& value) {
425
- return std::optional<MerchantCounterparty>(value);
426
- }
427
-
428
- // pragma MARK: std::optional<UserCounterparty>
429
- /**
430
- * Specialized version of `std::optional<UserCounterparty>`.
431
- */
432
- using std__optional_UserCounterparty_ = std::optional<UserCounterparty>;
433
- inline std::optional<UserCounterparty> create_std__optional_UserCounterparty_(const UserCounterparty& value) {
434
- return std::optional<UserCounterparty>(value);
435
- }
436
-
437
- // pragma MARK: std::optional<ServiceCounterparty>
438
- /**
439
- * Specialized version of `std::optional<ServiceCounterparty>`.
440
- */
441
- using std__optional_ServiceCounterparty_ = std::optional<ServiceCounterparty>;
442
- inline std::optional<ServiceCounterparty> create_std__optional_ServiceCounterparty_(const ServiceCounterparty& value) {
443
- return std::optional<ServiceCounterparty>(value);
444
- }
445
-
446
- // pragma MARK: std::optional<FiatAsset>
447
- /**
448
- * Specialized version of `std::optional<FiatAsset>`.
449
- */
450
- using std__optional_FiatAsset_ = std::optional<FiatAsset>;
451
- inline std::optional<FiatAsset> create_std__optional_FiatAsset_(const FiatAsset& value) {
452
- return std::optional<FiatAsset>(value);
453
- }
454
-
455
- // pragma MARK: std::optional<MarketTradeAsset>
552
+ // pragma MARK: std::shared_ptr<Promise<AssetAccount>>
456
553
  /**
457
- * Specialized version of `std::optional<MarketTradeAsset>`.
554
+ * Specialized version of `std::shared_ptr<Promise<AssetAccount>>`.
458
555
  */
459
- using std__optional_MarketTradeAsset_ = std::optional<MarketTradeAsset>;
460
- inline std::optional<MarketTradeAsset> create_std__optional_MarketTradeAsset_(const MarketTradeAsset& value) {
461
- return std::optional<MarketTradeAsset>(value);
556
+ using std__shared_ptr_Promise_AssetAccount__ = std::shared_ptr<Promise<AssetAccount>>;
557
+ inline std::shared_ptr<Promise<AssetAccount>> create_std__shared_ptr_Promise_AssetAccount__() {
558
+ return Promise<AssetAccount>::create();
462
559
  }
463
-
464
- // pragma MARK: std::optional<TransportAsset>
465
- /**
466
- * Specialized version of `std::optional<TransportAsset>`.
467
- */
468
- using std__optional_TransportAsset_ = std::optional<TransportAsset>;
469
- inline std::optional<TransportAsset> create_std__optional_TransportAsset_(const TransportAsset& value) {
470
- return std::optional<TransportAsset>(value);
560
+ inline PromiseHolder<AssetAccount> wrap_std__shared_ptr_Promise_AssetAccount__(std::shared_ptr<Promise<AssetAccount>> promise) {
561
+ return PromiseHolder<AssetAccount>(std::move(promise));
471
562
  }
472
563
 
473
- // pragma MARK: std::optional<OtherAsset>
564
+ // pragma MARK: std::function<void(const AssetAccount& /* result */)>
474
565
  /**
475
- * Specialized version of `std::optional<OtherAsset>`.
566
+ * Specialized version of `std::function<void(const AssetAccount&)>`.
476
567
  */
477
- using std__optional_OtherAsset_ = std::optional<OtherAsset>;
478
- inline std::optional<OtherAsset> create_std__optional_OtherAsset_(const OtherAsset& value) {
479
- return std::optional<OtherAsset>(value);
480
- }
481
-
482
- // pragma MARK: std::optional<NothingAsset>
568
+ using Func_void_AssetAccount = std::function<void(const AssetAccount& /* result */)>;
483
569
  /**
484
- * Specialized version of `std::optional<NothingAsset>`.
570
+ * Wrapper class for a `std::function<void(const AssetAccount& / * result * /)>`, this can be used from Swift.
485
571
  */
486
- using std__optional_NothingAsset_ = std::optional<NothingAsset>;
487
- inline std::optional<NothingAsset> create_std__optional_NothingAsset_(const NothingAsset& value) {
488
- return std::optional<NothingAsset>(value);
572
+ class Func_void_AssetAccount_Wrapper final {
573
+ public:
574
+ explicit Func_void_AssetAccount_Wrapper(std::function<void(const AssetAccount& /* result */)>&& func): _function(std::make_shared<std::function<void(const AssetAccount& /* result */)>>(std::move(func))) {}
575
+ inline void call(AssetAccount result) const {
576
+ _function->operator()(result);
577
+ }
578
+ private:
579
+ std::shared_ptr<std::function<void(const AssetAccount& /* result */)>> _function;
580
+ };
581
+ Func_void_AssetAccount create_Func_void_AssetAccount(void* _Nonnull swiftClosureWrapper);
582
+ inline Func_void_AssetAccount_Wrapper wrap_Func_void_AssetAccount(Func_void_AssetAccount value) {
583
+ return Func_void_AssetAccount_Wrapper(std::move(value));
489
584
  }
490
585
 
491
586
  // pragma MARK: std::vector<Trade>
@@ -533,6 +628,85 @@ namespace margelo::nitro::rncandle::bridge::swift {
533
628
  return Func_void_std__vector_Trade__Wrapper(std::move(value));
534
629
  }
535
630
 
631
+ // pragma MARK: std::shared_ptr<Promise<Trade>>
632
+ /**
633
+ * Specialized version of `std::shared_ptr<Promise<Trade>>`.
634
+ */
635
+ using std__shared_ptr_Promise_Trade__ = std::shared_ptr<Promise<Trade>>;
636
+ inline std::shared_ptr<Promise<Trade>> create_std__shared_ptr_Promise_Trade__() {
637
+ return Promise<Trade>::create();
638
+ }
639
+ inline PromiseHolder<Trade> wrap_std__shared_ptr_Promise_Trade__(std::shared_ptr<Promise<Trade>> promise) {
640
+ return PromiseHolder<Trade>(std::move(promise));
641
+ }
642
+
643
+ // pragma MARK: std::function<void(const Trade& /* result */)>
644
+ /**
645
+ * Specialized version of `std::function<void(const Trade&)>`.
646
+ */
647
+ using Func_void_Trade = std::function<void(const Trade& /* result */)>;
648
+ /**
649
+ * Wrapper class for a `std::function<void(const Trade& / * result * /)>`, this can be used from Swift.
650
+ */
651
+ class Func_void_Trade_Wrapper final {
652
+ public:
653
+ explicit Func_void_Trade_Wrapper(std::function<void(const Trade& /* result */)>&& func): _function(std::make_shared<std::function<void(const Trade& /* result */)>>(std::move(func))) {}
654
+ inline void call(Trade result) const {
655
+ _function->operator()(result);
656
+ }
657
+ private:
658
+ std::shared_ptr<std::function<void(const Trade& /* result */)>> _function;
659
+ };
660
+ Func_void_Trade create_Func_void_Trade(void* _Nonnull swiftClosureWrapper);
661
+ inline Func_void_Trade_Wrapper wrap_Func_void_Trade(Func_void_Trade value) {
662
+ return Func_void_Trade_Wrapper(std::move(value));
663
+ }
664
+
665
+ // pragma MARK: std::optional<FiatAssetRef>
666
+ /**
667
+ * Specialized version of `std::optional<FiatAssetRef>`.
668
+ */
669
+ using std__optional_FiatAssetRef_ = std::optional<FiatAssetRef>;
670
+ inline std::optional<FiatAssetRef> create_std__optional_FiatAssetRef_(const FiatAssetRef& value) {
671
+ return std::optional<FiatAssetRef>(value);
672
+ }
673
+
674
+ // pragma MARK: std::optional<MarketTradeAssetRef>
675
+ /**
676
+ * Specialized version of `std::optional<MarketTradeAssetRef>`.
677
+ */
678
+ using std__optional_MarketTradeAssetRef_ = std::optional<MarketTradeAssetRef>;
679
+ inline std::optional<MarketTradeAssetRef> create_std__optional_MarketTradeAssetRef_(const MarketTradeAssetRef& value) {
680
+ return std::optional<MarketTradeAssetRef>(value);
681
+ }
682
+
683
+ // pragma MARK: std::optional<TransportAssetRef>
684
+ /**
685
+ * Specialized version of `std::optional<TransportAssetRef>`.
686
+ */
687
+ using std__optional_TransportAssetRef_ = std::optional<TransportAssetRef>;
688
+ inline std::optional<TransportAssetRef> create_std__optional_TransportAssetRef_(const TransportAssetRef& value) {
689
+ return std::optional<TransportAssetRef>(value);
690
+ }
691
+
692
+ // pragma MARK: std::optional<OtherAssetRef>
693
+ /**
694
+ * Specialized version of `std::optional<OtherAssetRef>`.
695
+ */
696
+ using std__optional_OtherAssetRef_ = std::optional<OtherAssetRef>;
697
+ inline std::optional<OtherAssetRef> create_std__optional_OtherAssetRef_(const OtherAssetRef& value) {
698
+ return std::optional<OtherAssetRef>(value);
699
+ }
700
+
701
+ // pragma MARK: std::optional<NothingAssetRef>
702
+ /**
703
+ * Specialized version of `std::optional<NothingAssetRef>`.
704
+ */
705
+ using std__optional_NothingAssetRef_ = std::optional<NothingAssetRef>;
706
+ inline std::optional<NothingAssetRef> create_std__optional_NothingAssetRef_(const NothingAssetRef& value) {
707
+ return std::optional<NothingAssetRef>(value);
708
+ }
709
+
536
710
  // pragma MARK: std::vector<TradeQuote>
537
711
  /**
538
712
  * Specialized version of `std::vector<TradeQuote>`.
@@ -632,40 +806,6 @@ namespace margelo::nitro::rncandle::bridge::swift {
632
806
  return std::optional<NothingAssetQuoteRequest>(value);
633
807
  }
634
808
 
635
- // pragma MARK: std::shared_ptr<Promise<Trade>>
636
- /**
637
- * Specialized version of `std::shared_ptr<Promise<Trade>>`.
638
- */
639
- using std__shared_ptr_Promise_Trade__ = std::shared_ptr<Promise<Trade>>;
640
- inline std::shared_ptr<Promise<Trade>> create_std__shared_ptr_Promise_Trade__() {
641
- return Promise<Trade>::create();
642
- }
643
- inline PromiseHolder<Trade> wrap_std__shared_ptr_Promise_Trade__(std::shared_ptr<Promise<Trade>> promise) {
644
- return PromiseHolder<Trade>(std::move(promise));
645
- }
646
-
647
- // pragma MARK: std::function<void(const Trade& /* result */)>
648
- /**
649
- * Specialized version of `std::function<void(const Trade&)>`.
650
- */
651
- using Func_void_Trade = std::function<void(const Trade& /* result */)>;
652
- /**
653
- * Wrapper class for a `std::function<void(const Trade& / * result * /)>`, this can be used from Swift.
654
- */
655
- class Func_void_Trade_Wrapper final {
656
- public:
657
- explicit Func_void_Trade_Wrapper(std::function<void(const Trade& /* result */)>&& func): _function(std::make_shared<std::function<void(const Trade& /* result */)>>(std::move(func))) {}
658
- inline void call(Trade result) const {
659
- _function->operator()(result);
660
- }
661
- private:
662
- std::shared_ptr<std::function<void(const Trade& /* result */)>> _function;
663
- };
664
- Func_void_Trade create_Func_void_Trade(void* _Nonnull swiftClosureWrapper);
665
- inline Func_void_Trade_Wrapper wrap_Func_void_Trade(Func_void_Trade value) {
666
- return Func_void_Trade_Wrapper(std::move(value));
667
- }
668
-
669
809
  // pragma MARK: std::vector<std::shared_ptr<AnyMap>>
670
810
  /**
671
811
  * Specialized version of `std::vector<std::shared_ptr<AnyMap>>`.
@@ -775,6 +915,15 @@ namespace margelo::nitro::rncandle::bridge::swift {
775
915
  return Result<std::shared_ptr<Promise<std::vector<LinkedAccount>>>>::withError(error);
776
916
  }
777
917
 
918
+ // pragma MARK: Result<std::shared_ptr<Promise<LinkedAccount>>>
919
+ using Result_std__shared_ptr_Promise_LinkedAccount___ = Result<std::shared_ptr<Promise<LinkedAccount>>>;
920
+ inline Result_std__shared_ptr_Promise_LinkedAccount___ create_Result_std__shared_ptr_Promise_LinkedAccount___(const std::shared_ptr<Promise<LinkedAccount>>& value) {
921
+ return Result<std::shared_ptr<Promise<LinkedAccount>>>::withValue(value);
922
+ }
923
+ inline Result_std__shared_ptr_Promise_LinkedAccount___ create_Result_std__shared_ptr_Promise_LinkedAccount___(const std::exception_ptr& error) {
924
+ return Result<std::shared_ptr<Promise<LinkedAccount>>>::withError(error);
925
+ }
926
+
778
927
  // pragma MARK: Result<std::shared_ptr<Promise<void>>>
779
928
  using Result_std__shared_ptr_Promise_void___ = Result<std::shared_ptr<Promise<void>>>;
780
929
  inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::shared_ptr<Promise<void>>& value) {
@@ -793,6 +942,15 @@ namespace margelo::nitro::rncandle::bridge::swift {
793
942
  return Result<std::shared_ptr<Promise<std::vector<AssetAccount>>>>::withError(error);
794
943
  }
795
944
 
945
+ // pragma MARK: Result<std::shared_ptr<Promise<AssetAccount>>>
946
+ using Result_std__shared_ptr_Promise_AssetAccount___ = Result<std::shared_ptr<Promise<AssetAccount>>>;
947
+ inline Result_std__shared_ptr_Promise_AssetAccount___ create_Result_std__shared_ptr_Promise_AssetAccount___(const std::shared_ptr<Promise<AssetAccount>>& value) {
948
+ return Result<std::shared_ptr<Promise<AssetAccount>>>::withValue(value);
949
+ }
950
+ inline Result_std__shared_ptr_Promise_AssetAccount___ create_Result_std__shared_ptr_Promise_AssetAccount___(const std::exception_ptr& error) {
951
+ return Result<std::shared_ptr<Promise<AssetAccount>>>::withError(error);
952
+ }
953
+
796
954
  // pragma MARK: Result<std::shared_ptr<Promise<std::vector<Trade>>>>
797
955
  using Result_std__shared_ptr_Promise_std__vector_Trade____ = Result<std::shared_ptr<Promise<std::vector<Trade>>>>;
798
956
  inline Result_std__shared_ptr_Promise_std__vector_Trade____ create_Result_std__shared_ptr_Promise_std__vector_Trade____(const std::shared_ptr<Promise<std::vector<Trade>>>& value) {
@@ -802,15 +960,6 @@ namespace margelo::nitro::rncandle::bridge::swift {
802
960
  return Result<std::shared_ptr<Promise<std::vector<Trade>>>>::withError(error);
803
961
  }
804
962
 
805
- // pragma MARK: Result<std::shared_ptr<Promise<std::vector<TradeQuote>>>>
806
- using Result_std__shared_ptr_Promise_std__vector_TradeQuote____ = Result<std::shared_ptr<Promise<std::vector<TradeQuote>>>>;
807
- inline Result_std__shared_ptr_Promise_std__vector_TradeQuote____ create_Result_std__shared_ptr_Promise_std__vector_TradeQuote____(const std::shared_ptr<Promise<std::vector<TradeQuote>>>& value) {
808
- return Result<std::shared_ptr<Promise<std::vector<TradeQuote>>>>::withValue(value);
809
- }
810
- inline Result_std__shared_ptr_Promise_std__vector_TradeQuote____ create_Result_std__shared_ptr_Promise_std__vector_TradeQuote____(const std::exception_ptr& error) {
811
- return Result<std::shared_ptr<Promise<std::vector<TradeQuote>>>>::withError(error);
812
- }
813
-
814
963
  // pragma MARK: Result<std::shared_ptr<Promise<Trade>>>
815
964
  using Result_std__shared_ptr_Promise_Trade___ = Result<std::shared_ptr<Promise<Trade>>>;
816
965
  inline Result_std__shared_ptr_Promise_Trade___ create_Result_std__shared_ptr_Promise_Trade___(const std::shared_ptr<Promise<Trade>>& value) {
@@ -820,6 +969,15 @@ namespace margelo::nitro::rncandle::bridge::swift {
820
969
  return Result<std::shared_ptr<Promise<Trade>>>::withError(error);
821
970
  }
822
971
 
972
+ // pragma MARK: Result<std::shared_ptr<Promise<std::vector<TradeQuote>>>>
973
+ using Result_std__shared_ptr_Promise_std__vector_TradeQuote____ = Result<std::shared_ptr<Promise<std::vector<TradeQuote>>>>;
974
+ inline Result_std__shared_ptr_Promise_std__vector_TradeQuote____ create_Result_std__shared_ptr_Promise_std__vector_TradeQuote____(const std::shared_ptr<Promise<std::vector<TradeQuote>>>& value) {
975
+ return Result<std::shared_ptr<Promise<std::vector<TradeQuote>>>>::withValue(value);
976
+ }
977
+ inline Result_std__shared_ptr_Promise_std__vector_TradeQuote____ create_Result_std__shared_ptr_Promise_std__vector_TradeQuote____(const std::exception_ptr& error) {
978
+ return Result<std::shared_ptr<Promise<std::vector<TradeQuote>>>>::withError(error);
979
+ }
980
+
823
981
  // pragma MARK: Result<std::shared_ptr<Promise<std::vector<std::shared_ptr<AnyMap>>>>>
824
982
  using Result_std__shared_ptr_Promise_std__vector_std__shared_ptr_AnyMap_____ = Result<std::shared_ptr<Promise<std::vector<std::shared_ptr<AnyMap>>>>>;
825
983
  inline Result_std__shared_ptr_Promise_std__vector_std__shared_ptr_AnyMap_____ create_Result_std__shared_ptr_Promise_std__vector_std__shared_ptr_AnyMap_____(const std::shared_ptr<Promise<std::vector<std::shared_ptr<AnyMap>>>>& value) {
@@ -26,18 +26,20 @@ namespace margelo::nitro::rncandle { struct AssetAccountDetails; }
26
26
  namespace margelo::nitro::rncandle { enum class AssetAccountKind; }
27
27
  // Forward declaration of `AssetAccountQuery` to properly resolve imports.
28
28
  namespace margelo::nitro::rncandle { struct AssetAccountQuery; }
29
+ // Forward declaration of `AssetAccountRef` to properly resolve imports.
30
+ namespace margelo::nitro::rncandle { struct AssetAccountRef; }
29
31
  // Forward declaration of `AssetAccount` to properly resolve imports.
30
32
  namespace margelo::nitro::rncandle { struct AssetAccount; }
31
33
  // Forward declaration of `Coordinates` to properly resolve imports.
32
34
  namespace margelo::nitro::rncandle { struct Coordinates; }
33
35
  // Forward declaration of `Counterparty` to properly resolve imports.
34
36
  namespace margelo::nitro::rncandle { struct Counterparty; }
35
- // Forward declaration of `ExecuteTradeRequest` to properly resolve imports.
36
- namespace margelo::nitro::rncandle { struct ExecuteTradeRequest; }
37
37
  // Forward declaration of `FiatAccountDetails` to properly resolve imports.
38
38
  namespace margelo::nitro::rncandle { struct FiatAccountDetails; }
39
39
  // Forward declaration of `FiatAssetQuoteRequest` to properly resolve imports.
40
40
  namespace margelo::nitro::rncandle { struct FiatAssetQuoteRequest; }
41
+ // Forward declaration of `FiatAssetRef` to properly resolve imports.
42
+ namespace margelo::nitro::rncandle { struct FiatAssetRef; }
41
43
  // Forward declaration of `FiatAsset` to properly resolve imports.
42
44
  namespace margelo::nitro::rncandle { struct FiatAsset; }
43
45
  // Forward declaration of `HybridRNCandleSpec` to properly resolve imports.
@@ -48,12 +50,16 @@ namespace margelo::nitro::rncandle { struct InactiveLinkedAccountDetails; }
48
50
  namespace margelo::nitro::rncandle { enum class LegalAccountKind; }
49
51
  // Forward declaration of `LinkedAccountDetails` to properly resolve imports.
50
52
  namespace margelo::nitro::rncandle { struct LinkedAccountDetails; }
53
+ // Forward declaration of `LinkedAccountRef` to properly resolve imports.
54
+ namespace margelo::nitro::rncandle { struct LinkedAccountRef; }
51
55
  // Forward declaration of `LinkedAccount` to properly resolve imports.
52
56
  namespace margelo::nitro::rncandle { struct LinkedAccount; }
53
57
  // Forward declaration of `MarketAccountDetails` to properly resolve imports.
54
58
  namespace margelo::nitro::rncandle { struct MarketAccountDetails; }
55
59
  // Forward declaration of `MarketAssetQuoteRequest` to properly resolve imports.
56
60
  namespace margelo::nitro::rncandle { struct MarketAssetQuoteRequest; }
61
+ // Forward declaration of `MarketTradeAssetRef` to properly resolve imports.
62
+ namespace margelo::nitro::rncandle { struct MarketTradeAssetRef; }
57
63
  // Forward declaration of `MarketTradeAsset` to properly resolve imports.
58
64
  namespace margelo::nitro::rncandle { struct MarketTradeAsset; }
59
65
  // Forward declaration of `MerchantCounterparty` to properly resolve imports.
@@ -62,8 +68,12 @@ namespace margelo::nitro::rncandle { struct MerchantCounterparty; }
62
68
  namespace margelo::nitro::rncandle { struct MerchantLocation; }
63
69
  // Forward declaration of `NothingAssetQuoteRequest` to properly resolve imports.
64
70
  namespace margelo::nitro::rncandle { struct NothingAssetQuoteRequest; }
71
+ // Forward declaration of `NothingAssetRef` to properly resolve imports.
72
+ namespace margelo::nitro::rncandle { struct NothingAssetRef; }
65
73
  // Forward declaration of `NothingAsset` to properly resolve imports.
66
74
  namespace margelo::nitro::rncandle { struct NothingAsset; }
75
+ // Forward declaration of `OtherAssetRef` to properly resolve imports.
76
+ namespace margelo::nitro::rncandle { struct OtherAssetRef; }
67
77
  // Forward declaration of `OtherAsset` to properly resolve imports.
68
78
  namespace margelo::nitro::rncandle { struct OtherAsset; }
69
79
  // Forward declaration of `PresentationBackground` to properly resolve imports.
@@ -78,20 +88,28 @@ namespace margelo::nitro::rncandle { enum class Service; }
78
88
  namespace margelo::nitro::rncandle { struct ToolCall; }
79
89
  // Forward declaration of `TradeAssetQuoteRequest` to properly resolve imports.
80
90
  namespace margelo::nitro::rncandle { struct TradeAssetQuoteRequest; }
91
+ // Forward declaration of `TradeAssetRef` to properly resolve imports.
92
+ namespace margelo::nitro::rncandle { struct TradeAssetRef; }
81
93
  // Forward declaration of `TradeAsset` to properly resolve imports.
82
94
  namespace margelo::nitro::rncandle { struct TradeAsset; }
95
+ // Forward declaration of `TradeExecutionResult` to properly resolve imports.
96
+ namespace margelo::nitro::rncandle { struct TradeExecutionResult; }
83
97
  // Forward declaration of `TradeQuery` to properly resolve imports.
84
98
  namespace margelo::nitro::rncandle { struct TradeQuery; }
85
99
  // Forward declaration of `TradeQuoteRequest` to properly resolve imports.
86
100
  namespace margelo::nitro::rncandle { struct TradeQuoteRequest; }
87
101
  // Forward declaration of `TradeQuote` to properly resolve imports.
88
102
  namespace margelo::nitro::rncandle { struct TradeQuote; }
103
+ // Forward declaration of `TradeRef` to properly resolve imports.
104
+ namespace margelo::nitro::rncandle { struct TradeRef; }
89
105
  // Forward declaration of `TradeState` to properly resolve imports.
90
106
  namespace margelo::nitro::rncandle { enum class TradeState; }
91
107
  // Forward declaration of `Trade` to properly resolve imports.
92
108
  namespace margelo::nitro::rncandle { struct Trade; }
93
109
  // Forward declaration of `TransportAssetQuoteRequest` to properly resolve imports.
94
110
  namespace margelo::nitro::rncandle { struct TransportAssetQuoteRequest; }
111
+ // Forward declaration of `TransportAssetRef` to properly resolve imports.
112
+ namespace margelo::nitro::rncandle { struct TransportAssetRef; }
95
113
  // Forward declaration of `TransportAsset` to properly resolve imports.
96
114
  namespace margelo::nitro::rncandle { struct TransportAsset; }
97
115
  // Forward declaration of `UserCounterparty` to properly resolve imports.
@@ -109,25 +127,30 @@ namespace margelo::nitro::rncandle { struct WireDetails; }
109
127
  #include "AssetAccountDetails.hpp"
110
128
  #include "AssetAccountKind.hpp"
111
129
  #include "AssetAccountQuery.hpp"
130
+ #include "AssetAccountRef.hpp"
112
131
  #include "Coordinates.hpp"
113
132
  #include "Counterparty.hpp"
114
- #include "ExecuteTradeRequest.hpp"
115
133
  #include "FiatAccountDetails.hpp"
116
134
  #include "FiatAsset.hpp"
117
135
  #include "FiatAssetQuoteRequest.hpp"
136
+ #include "FiatAssetRef.hpp"
118
137
  #include "HybridRNCandleSpec.hpp"
119
138
  #include "InactiveLinkedAccountDetails.hpp"
120
139
  #include "LegalAccountKind.hpp"
121
140
  #include "LinkedAccount.hpp"
122
141
  #include "LinkedAccountDetails.hpp"
142
+ #include "LinkedAccountRef.hpp"
123
143
  #include "MarketAccountDetails.hpp"
124
144
  #include "MarketAssetQuoteRequest.hpp"
125
145
  #include "MarketTradeAsset.hpp"
146
+ #include "MarketTradeAssetRef.hpp"
126
147
  #include "MerchantCounterparty.hpp"
127
148
  #include "MerchantLocation.hpp"
128
149
  #include "NothingAsset.hpp"
129
150
  #include "NothingAssetQuoteRequest.hpp"
151
+ #include "NothingAssetRef.hpp"
130
152
  #include "OtherAsset.hpp"
153
+ #include "OtherAssetRef.hpp"
131
154
  #include "PresentationBackground.hpp"
132
155
  #include "PresentationStyle.hpp"
133
156
  #include "Service.hpp"
@@ -136,12 +159,16 @@ namespace margelo::nitro::rncandle { struct WireDetails; }
136
159
  #include "Trade.hpp"
137
160
  #include "TradeAsset.hpp"
138
161
  #include "TradeAssetQuoteRequest.hpp"
162
+ #include "TradeAssetRef.hpp"
163
+ #include "TradeExecutionResult.hpp"
139
164
  #include "TradeQuery.hpp"
140
165
  #include "TradeQuote.hpp"
141
166
  #include "TradeQuoteRequest.hpp"
167
+ #include "TradeRef.hpp"
142
168
  #include "TradeState.hpp"
143
169
  #include "TransportAsset.hpp"
144
170
  #include "TransportAssetQuoteRequest.hpp"
171
+ #include "TransportAssetRef.hpp"
145
172
  #include "UserCounterparty.hpp"
146
173
  #include "WireDetails.hpp"
147
174
  #include <NitroModules/AnyMap.hpp>