react-native-candle 0.1.18 → 0.1.20

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 (47) hide show
  1. package/ReactNativeCandle.podspec +1 -1
  2. package/ios/Sources/RNCandle.swift +271 -89
  3. package/lib/commonjs/index.js +73 -2
  4. package/lib/commonjs/index.js.map +1 -1
  5. package/lib/module/index.js +73 -2
  6. package/lib/module/index.js.map +1 -1
  7. package/lib/typescript/commonjs/src/index.d.ts +35 -14
  8. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  9. package/lib/typescript/commonjs/src/specs/RNCandle.nitro.d.ts +49 -2
  10. package/lib/typescript/commonjs/src/specs/RNCandle.nitro.d.ts.map +1 -1
  11. package/lib/typescript/module/src/index.d.ts +35 -14
  12. package/lib/typescript/module/src/index.d.ts.map +1 -1
  13. package/lib/typescript/module/src/specs/RNCandle.nitro.d.ts +49 -2
  14. package/lib/typescript/module/src/specs/RNCandle.nitro.d.ts.map +1 -1
  15. package/nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Bridge.cpp +16 -8
  16. package/nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Bridge.hpp +167 -43
  17. package/nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Umbrella.hpp +30 -0
  18. package/nitrogen/generated/ios/c++/HybridRNCandleSpecSwift.hpp +58 -4
  19. package/nitrogen/generated/ios/swift/AssetAccountRef.swift +55 -0
  20. package/nitrogen/generated/ios/swift/ExecuteTradeRequest.swift +44 -0
  21. package/nitrogen/generated/ios/swift/FiatAssetRef.swift +75 -0
  22. package/nitrogen/generated/ios/swift/Func_void_AssetAccount.swift +44 -0
  23. package/nitrogen/generated/ios/swift/Func_void_LinkedAccount.swift +5 -5
  24. package/nitrogen/generated/ios/swift/HybridRNCandleSpec.swift +5 -2
  25. package/nitrogen/generated/ios/swift/HybridRNCandleSpec_cxx.swift +65 -5
  26. package/nitrogen/generated/ios/swift/LinkedAccountRef.swift +33 -0
  27. package/nitrogen/generated/ios/swift/MarketTradeAssetRef.swift +55 -0
  28. package/nitrogen/generated/ios/swift/NothingAssetRef.swift +33 -0
  29. package/nitrogen/generated/ios/swift/OtherAssetRef.swift +33 -0
  30. package/nitrogen/generated/ios/swift/TradeAssetRef.swift +176 -0
  31. package/nitrogen/generated/ios/swift/TradeRef.swift +44 -0
  32. package/nitrogen/generated/ios/swift/TransportAssetRef.swift +55 -0
  33. package/nitrogen/generated/shared/c++/AssetAccountRef.hpp +77 -0
  34. package/nitrogen/generated/shared/c++/ExecuteTradeRequest.hpp +73 -0
  35. package/nitrogen/generated/shared/c++/FiatAssetRef.hpp +78 -0
  36. package/nitrogen/generated/shared/c++/HybridRNCandleSpec.cpp +4 -1
  37. package/nitrogen/generated/shared/c++/HybridRNCandleSpec.hpp +17 -2
  38. package/nitrogen/generated/shared/c++/LinkedAccountRef.hpp +69 -0
  39. package/nitrogen/generated/shared/c++/MarketTradeAssetRef.hpp +77 -0
  40. package/nitrogen/generated/shared/c++/NothingAssetRef.hpp +69 -0
  41. package/nitrogen/generated/shared/c++/OtherAssetRef.hpp +69 -0
  42. package/nitrogen/generated/shared/c++/TradeAssetRef.hpp +99 -0
  43. package/nitrogen/generated/shared/c++/TradeRef.hpp +74 -0
  44. package/nitrogen/generated/shared/c++/TransportAssetRef.hpp +77 -0
  45. package/package.json +1 -1
  46. package/src/index.ts +131 -21
  47. package/src/specs/RNCandle.nitro.ts +59 -2
@@ -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.
@@ -74,6 +82,8 @@ namespace margelo::nitro::rncandle { enum class TradeState; }
74
82
  namespace margelo::nitro::rncandle { struct Trade; }
75
83
  // Forward declaration of `TransportAssetQuoteRequest` to properly resolve imports.
76
84
  namespace margelo::nitro::rncandle { struct TransportAssetQuoteRequest; }
85
+ // Forward declaration of `TransportAssetRef` to properly resolve imports.
86
+ namespace margelo::nitro::rncandle { struct TransportAssetRef; }
77
87
  // Forward declaration of `TransportAsset` to properly resolve imports.
78
88
  namespace margelo::nitro::rncandle { struct TransportAsset; }
79
89
  // Forward declaration of `UserCounterparty` to properly resolve imports.
@@ -98,6 +108,7 @@ namespace ReactNativeCandle { class HybridRNCandleSpec_cxx; }
98
108
  #include "FiatAccountDetails.hpp"
99
109
  #include "FiatAsset.hpp"
100
110
  #include "FiatAssetQuoteRequest.hpp"
111
+ #include "FiatAssetRef.hpp"
101
112
  #include "HybridRNCandleSpec.hpp"
102
113
  #include "InactiveLinkedAccountDetails.hpp"
103
114
  #include "LegalAccountKind.hpp"
@@ -106,11 +117,14 @@ namespace ReactNativeCandle { class HybridRNCandleSpec_cxx; }
106
117
  #include "MarketAccountDetails.hpp"
107
118
  #include "MarketAssetQuoteRequest.hpp"
108
119
  #include "MarketTradeAsset.hpp"
120
+ #include "MarketTradeAssetRef.hpp"
109
121
  #include "MerchantCounterparty.hpp"
110
122
  #include "MerchantLocation.hpp"
111
123
  #include "NothingAsset.hpp"
112
124
  #include "NothingAssetQuoteRequest.hpp"
125
+ #include "NothingAssetRef.hpp"
113
126
  #include "OtherAsset.hpp"
127
+ #include "OtherAssetRef.hpp"
114
128
  #include "Service.hpp"
115
129
  #include "ServiceCounterparty.hpp"
116
130
  #include "Trade.hpp"
@@ -119,6 +133,7 @@ namespace ReactNativeCandle { class HybridRNCandleSpec_cxx; }
119
133
  #include "TradeState.hpp"
120
134
  #include "TransportAsset.hpp"
121
135
  #include "TransportAssetQuoteRequest.hpp"
136
+ #include "TransportAssetRef.hpp"
122
137
  #include "UserCounterparty.hpp"
123
138
  #include "WireDetails.hpp"
124
139
  #include <NitroModules/AnyMap.hpp>
@@ -274,6 +289,18 @@ namespace margelo::nitro::rncandle::bridge::swift {
274
289
  return Func_void_std__exception_ptr_Wrapper(std::move(value));
275
290
  }
276
291
 
292
+ // pragma MARK: std::shared_ptr<Promise<LinkedAccount>>
293
+ /**
294
+ * Specialized version of `std::shared_ptr<Promise<LinkedAccount>>`.
295
+ */
296
+ using std__shared_ptr_Promise_LinkedAccount__ = std::shared_ptr<Promise<LinkedAccount>>;
297
+ inline std::shared_ptr<Promise<LinkedAccount>> create_std__shared_ptr_Promise_LinkedAccount__() {
298
+ return Promise<LinkedAccount>::create();
299
+ }
300
+ inline PromiseHolder<LinkedAccount> wrap_std__shared_ptr_Promise_LinkedAccount__(std::shared_ptr<Promise<LinkedAccount>> promise) {
301
+ return PromiseHolder<LinkedAccount>(std::move(promise));
302
+ }
303
+
277
304
  // pragma MARK: std::shared_ptr<Promise<void>>
278
305
  /**
279
306
  * Specialized version of `std::shared_ptr<Promise<void>>`.
@@ -407,6 +434,40 @@ namespace margelo::nitro::rncandle::bridge::swift {
407
434
  return std::optional<AssetAccountKind>(value);
408
435
  }
409
436
 
437
+ // pragma MARK: std::shared_ptr<Promise<AssetAccount>>
438
+ /**
439
+ * Specialized version of `std::shared_ptr<Promise<AssetAccount>>`.
440
+ */
441
+ using std__shared_ptr_Promise_AssetAccount__ = std::shared_ptr<Promise<AssetAccount>>;
442
+ inline std::shared_ptr<Promise<AssetAccount>> create_std__shared_ptr_Promise_AssetAccount__() {
443
+ return Promise<AssetAccount>::create();
444
+ }
445
+ inline PromiseHolder<AssetAccount> wrap_std__shared_ptr_Promise_AssetAccount__(std::shared_ptr<Promise<AssetAccount>> promise) {
446
+ return PromiseHolder<AssetAccount>(std::move(promise));
447
+ }
448
+
449
+ // pragma MARK: std::function<void(const AssetAccount& /* result */)>
450
+ /**
451
+ * Specialized version of `std::function<void(const AssetAccount&)>`.
452
+ */
453
+ using Func_void_AssetAccount = std::function<void(const AssetAccount& /* result */)>;
454
+ /**
455
+ * Wrapper class for a `std::function<void(const AssetAccount& / * result * /)>`, this can be used from Swift.
456
+ */
457
+ class Func_void_AssetAccount_Wrapper final {
458
+ public:
459
+ 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))) {}
460
+ inline void call(AssetAccount result) const {
461
+ _function->operator()(result);
462
+ }
463
+ private:
464
+ std::shared_ptr<std::function<void(const AssetAccount& /* result */)>> _function;
465
+ };
466
+ Func_void_AssetAccount create_Func_void_AssetAccount(void* _Nonnull swiftClosureWrapper);
467
+ inline Func_void_AssetAccount_Wrapper wrap_Func_void_AssetAccount(Func_void_AssetAccount value) {
468
+ return Func_void_AssetAccount_Wrapper(std::move(value));
469
+ }
470
+
410
471
  // pragma MARK: std::optional<MerchantLocation>
411
472
  /**
412
473
  * Specialized version of `std::optional<MerchantLocation>`.
@@ -533,6 +594,85 @@ namespace margelo::nitro::rncandle::bridge::swift {
533
594
  return Func_void_std__vector_Trade__Wrapper(std::move(value));
534
595
  }
535
596
 
597
+ // pragma MARK: std::shared_ptr<Promise<Trade>>
598
+ /**
599
+ * Specialized version of `std::shared_ptr<Promise<Trade>>`.
600
+ */
601
+ using std__shared_ptr_Promise_Trade__ = std::shared_ptr<Promise<Trade>>;
602
+ inline std::shared_ptr<Promise<Trade>> create_std__shared_ptr_Promise_Trade__() {
603
+ return Promise<Trade>::create();
604
+ }
605
+ inline PromiseHolder<Trade> wrap_std__shared_ptr_Promise_Trade__(std::shared_ptr<Promise<Trade>> promise) {
606
+ return PromiseHolder<Trade>(std::move(promise));
607
+ }
608
+
609
+ // pragma MARK: std::function<void(const Trade& /* result */)>
610
+ /**
611
+ * Specialized version of `std::function<void(const Trade&)>`.
612
+ */
613
+ using Func_void_Trade = std::function<void(const Trade& /* result */)>;
614
+ /**
615
+ * Wrapper class for a `std::function<void(const Trade& / * result * /)>`, this can be used from Swift.
616
+ */
617
+ class Func_void_Trade_Wrapper final {
618
+ public:
619
+ 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))) {}
620
+ inline void call(Trade result) const {
621
+ _function->operator()(result);
622
+ }
623
+ private:
624
+ std::shared_ptr<std::function<void(const Trade& /* result */)>> _function;
625
+ };
626
+ Func_void_Trade create_Func_void_Trade(void* _Nonnull swiftClosureWrapper);
627
+ inline Func_void_Trade_Wrapper wrap_Func_void_Trade(Func_void_Trade value) {
628
+ return Func_void_Trade_Wrapper(std::move(value));
629
+ }
630
+
631
+ // pragma MARK: std::optional<FiatAssetRef>
632
+ /**
633
+ * Specialized version of `std::optional<FiatAssetRef>`.
634
+ */
635
+ using std__optional_FiatAssetRef_ = std::optional<FiatAssetRef>;
636
+ inline std::optional<FiatAssetRef> create_std__optional_FiatAssetRef_(const FiatAssetRef& value) {
637
+ return std::optional<FiatAssetRef>(value);
638
+ }
639
+
640
+ // pragma MARK: std::optional<MarketTradeAssetRef>
641
+ /**
642
+ * Specialized version of `std::optional<MarketTradeAssetRef>`.
643
+ */
644
+ using std__optional_MarketTradeAssetRef_ = std::optional<MarketTradeAssetRef>;
645
+ inline std::optional<MarketTradeAssetRef> create_std__optional_MarketTradeAssetRef_(const MarketTradeAssetRef& value) {
646
+ return std::optional<MarketTradeAssetRef>(value);
647
+ }
648
+
649
+ // pragma MARK: std::optional<TransportAssetRef>
650
+ /**
651
+ * Specialized version of `std::optional<TransportAssetRef>`.
652
+ */
653
+ using std__optional_TransportAssetRef_ = std::optional<TransportAssetRef>;
654
+ inline std::optional<TransportAssetRef> create_std__optional_TransportAssetRef_(const TransportAssetRef& value) {
655
+ return std::optional<TransportAssetRef>(value);
656
+ }
657
+
658
+ // pragma MARK: std::optional<OtherAssetRef>
659
+ /**
660
+ * Specialized version of `std::optional<OtherAssetRef>`.
661
+ */
662
+ using std__optional_OtherAssetRef_ = std::optional<OtherAssetRef>;
663
+ inline std::optional<OtherAssetRef> create_std__optional_OtherAssetRef_(const OtherAssetRef& value) {
664
+ return std::optional<OtherAssetRef>(value);
665
+ }
666
+
667
+ // pragma MARK: std::optional<NothingAssetRef>
668
+ /**
669
+ * Specialized version of `std::optional<NothingAssetRef>`.
670
+ */
671
+ using std__optional_NothingAssetRef_ = std::optional<NothingAssetRef>;
672
+ inline std::optional<NothingAssetRef> create_std__optional_NothingAssetRef_(const NothingAssetRef& value) {
673
+ return std::optional<NothingAssetRef>(value);
674
+ }
675
+
536
676
  // pragma MARK: std::vector<TradeQuote>
537
677
  /**
538
678
  * Specialized version of `std::vector<TradeQuote>`.
@@ -632,40 +772,6 @@ namespace margelo::nitro::rncandle::bridge::swift {
632
772
  return std::optional<NothingAssetQuoteRequest>(value);
633
773
  }
634
774
 
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
775
  // pragma MARK: std::vector<std::shared_ptr<AnyMap>>
670
776
  /**
671
777
  * Specialized version of `std::vector<std::shared_ptr<AnyMap>>`.
@@ -775,6 +881,15 @@ namespace margelo::nitro::rncandle::bridge::swift {
775
881
  return Result<std::shared_ptr<Promise<std::vector<LinkedAccount>>>>::withError(error);
776
882
  }
777
883
 
884
+ // pragma MARK: Result<std::shared_ptr<Promise<LinkedAccount>>>
885
+ using Result_std__shared_ptr_Promise_LinkedAccount___ = Result<std::shared_ptr<Promise<LinkedAccount>>>;
886
+ inline Result_std__shared_ptr_Promise_LinkedAccount___ create_Result_std__shared_ptr_Promise_LinkedAccount___(const std::shared_ptr<Promise<LinkedAccount>>& value) {
887
+ return Result<std::shared_ptr<Promise<LinkedAccount>>>::withValue(value);
888
+ }
889
+ inline Result_std__shared_ptr_Promise_LinkedAccount___ create_Result_std__shared_ptr_Promise_LinkedAccount___(const std::exception_ptr& error) {
890
+ return Result<std::shared_ptr<Promise<LinkedAccount>>>::withError(error);
891
+ }
892
+
778
893
  // pragma MARK: Result<std::shared_ptr<Promise<void>>>
779
894
  using Result_std__shared_ptr_Promise_void___ = Result<std::shared_ptr<Promise<void>>>;
780
895
  inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::shared_ptr<Promise<void>>& value) {
@@ -793,6 +908,15 @@ namespace margelo::nitro::rncandle::bridge::swift {
793
908
  return Result<std::shared_ptr<Promise<std::vector<AssetAccount>>>>::withError(error);
794
909
  }
795
910
 
911
+ // pragma MARK: Result<std::shared_ptr<Promise<AssetAccount>>>
912
+ using Result_std__shared_ptr_Promise_AssetAccount___ = Result<std::shared_ptr<Promise<AssetAccount>>>;
913
+ inline Result_std__shared_ptr_Promise_AssetAccount___ create_Result_std__shared_ptr_Promise_AssetAccount___(const std::shared_ptr<Promise<AssetAccount>>& value) {
914
+ return Result<std::shared_ptr<Promise<AssetAccount>>>::withValue(value);
915
+ }
916
+ inline Result_std__shared_ptr_Promise_AssetAccount___ create_Result_std__shared_ptr_Promise_AssetAccount___(const std::exception_ptr& error) {
917
+ return Result<std::shared_ptr<Promise<AssetAccount>>>::withError(error);
918
+ }
919
+
796
920
  // pragma MARK: Result<std::shared_ptr<Promise<std::vector<Trade>>>>
797
921
  using Result_std__shared_ptr_Promise_std__vector_Trade____ = Result<std::shared_ptr<Promise<std::vector<Trade>>>>;
798
922
  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 +926,6 @@ namespace margelo::nitro::rncandle::bridge::swift {
802
926
  return Result<std::shared_ptr<Promise<std::vector<Trade>>>>::withError(error);
803
927
  }
804
928
 
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
929
  // pragma MARK: Result<std::shared_ptr<Promise<Trade>>>
815
930
  using Result_std__shared_ptr_Promise_Trade___ = Result<std::shared_ptr<Promise<Trade>>>;
816
931
  inline Result_std__shared_ptr_Promise_Trade___ create_Result_std__shared_ptr_Promise_Trade___(const std::shared_ptr<Promise<Trade>>& value) {
@@ -820,6 +935,15 @@ namespace margelo::nitro::rncandle::bridge::swift {
820
935
  return Result<std::shared_ptr<Promise<Trade>>>::withError(error);
821
936
  }
822
937
 
938
+ // pragma MARK: Result<std::shared_ptr<Promise<std::vector<TradeQuote>>>>
939
+ using Result_std__shared_ptr_Promise_std__vector_TradeQuote____ = Result<std::shared_ptr<Promise<std::vector<TradeQuote>>>>;
940
+ 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) {
941
+ return Result<std::shared_ptr<Promise<std::vector<TradeQuote>>>>::withValue(value);
942
+ }
943
+ inline Result_std__shared_ptr_Promise_std__vector_TradeQuote____ create_Result_std__shared_ptr_Promise_std__vector_TradeQuote____(const std::exception_ptr& error) {
944
+ return Result<std::shared_ptr<Promise<std::vector<TradeQuote>>>>::withError(error);
945
+ }
946
+
823
947
  // pragma MARK: Result<std::shared_ptr<Promise<std::vector<std::shared_ptr<AnyMap>>>>>
824
948
  using Result_std__shared_ptr_Promise_std__vector_std__shared_ptr_AnyMap_____ = Result<std::shared_ptr<Promise<std::vector<std::shared_ptr<AnyMap>>>>>;
825
949
  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,16 +26,22 @@ 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; }
37
+ // Forward declaration of `ExecuteTradeRequest` to properly resolve imports.
38
+ namespace margelo::nitro::rncandle { struct ExecuteTradeRequest; }
35
39
  // Forward declaration of `FiatAccountDetails` to properly resolve imports.
36
40
  namespace margelo::nitro::rncandle { struct FiatAccountDetails; }
37
41
  // Forward declaration of `FiatAssetQuoteRequest` to properly resolve imports.
38
42
  namespace margelo::nitro::rncandle { struct FiatAssetQuoteRequest; }
43
+ // Forward declaration of `FiatAssetRef` to properly resolve imports.
44
+ namespace margelo::nitro::rncandle { struct FiatAssetRef; }
39
45
  // Forward declaration of `FiatAsset` to properly resolve imports.
40
46
  namespace margelo::nitro::rncandle { struct FiatAsset; }
41
47
  // Forward declaration of `HybridRNCandleSpec` to properly resolve imports.
@@ -46,12 +52,16 @@ namespace margelo::nitro::rncandle { struct InactiveLinkedAccountDetails; }
46
52
  namespace margelo::nitro::rncandle { enum class LegalAccountKind; }
47
53
  // Forward declaration of `LinkedAccountDetails` to properly resolve imports.
48
54
  namespace margelo::nitro::rncandle { struct LinkedAccountDetails; }
55
+ // Forward declaration of `LinkedAccountRef` to properly resolve imports.
56
+ namespace margelo::nitro::rncandle { struct LinkedAccountRef; }
49
57
  // Forward declaration of `LinkedAccount` to properly resolve imports.
50
58
  namespace margelo::nitro::rncandle { struct LinkedAccount; }
51
59
  // Forward declaration of `MarketAccountDetails` to properly resolve imports.
52
60
  namespace margelo::nitro::rncandle { struct MarketAccountDetails; }
53
61
  // Forward declaration of `MarketAssetQuoteRequest` to properly resolve imports.
54
62
  namespace margelo::nitro::rncandle { struct MarketAssetQuoteRequest; }
63
+ // Forward declaration of `MarketTradeAssetRef` to properly resolve imports.
64
+ namespace margelo::nitro::rncandle { struct MarketTradeAssetRef; }
55
65
  // Forward declaration of `MarketTradeAsset` to properly resolve imports.
56
66
  namespace margelo::nitro::rncandle { struct MarketTradeAsset; }
57
67
  // Forward declaration of `MerchantCounterparty` to properly resolve imports.
@@ -60,8 +70,12 @@ namespace margelo::nitro::rncandle { struct MerchantCounterparty; }
60
70
  namespace margelo::nitro::rncandle { struct MerchantLocation; }
61
71
  // Forward declaration of `NothingAssetQuoteRequest` to properly resolve imports.
62
72
  namespace margelo::nitro::rncandle { struct NothingAssetQuoteRequest; }
73
+ // Forward declaration of `NothingAssetRef` to properly resolve imports.
74
+ namespace margelo::nitro::rncandle { struct NothingAssetRef; }
63
75
  // Forward declaration of `NothingAsset` to properly resolve imports.
64
76
  namespace margelo::nitro::rncandle { struct NothingAsset; }
77
+ // Forward declaration of `OtherAssetRef` to properly resolve imports.
78
+ namespace margelo::nitro::rncandle { struct OtherAssetRef; }
65
79
  // Forward declaration of `OtherAsset` to properly resolve imports.
66
80
  namespace margelo::nitro::rncandle { struct OtherAsset; }
67
81
  // Forward declaration of `PresentationBackground` to properly resolve imports.
@@ -76,6 +90,8 @@ namespace margelo::nitro::rncandle { enum class Service; }
76
90
  namespace margelo::nitro::rncandle { struct ToolCall; }
77
91
  // Forward declaration of `TradeAssetQuoteRequest` to properly resolve imports.
78
92
  namespace margelo::nitro::rncandle { struct TradeAssetQuoteRequest; }
93
+ // Forward declaration of `TradeAssetRef` to properly resolve imports.
94
+ namespace margelo::nitro::rncandle { struct TradeAssetRef; }
79
95
  // Forward declaration of `TradeAsset` to properly resolve imports.
80
96
  namespace margelo::nitro::rncandle { struct TradeAsset; }
81
97
  // Forward declaration of `TradeQuery` to properly resolve imports.
@@ -84,12 +100,16 @@ namespace margelo::nitro::rncandle { struct TradeQuery; }
84
100
  namespace margelo::nitro::rncandle { struct TradeQuoteRequest; }
85
101
  // Forward declaration of `TradeQuote` to properly resolve imports.
86
102
  namespace margelo::nitro::rncandle { struct TradeQuote; }
103
+ // Forward declaration of `TradeRef` to properly resolve imports.
104
+ namespace margelo::nitro::rncandle { struct TradeRef; }
87
105
  // Forward declaration of `TradeState` to properly resolve imports.
88
106
  namespace margelo::nitro::rncandle { enum class TradeState; }
89
107
  // Forward declaration of `Trade` to properly resolve imports.
90
108
  namespace margelo::nitro::rncandle { struct Trade; }
91
109
  // Forward declaration of `TransportAssetQuoteRequest` to properly resolve imports.
92
110
  namespace margelo::nitro::rncandle { struct TransportAssetQuoteRequest; }
111
+ // Forward declaration of `TransportAssetRef` to properly resolve imports.
112
+ namespace margelo::nitro::rncandle { struct TransportAssetRef; }
93
113
  // Forward declaration of `TransportAsset` to properly resolve imports.
94
114
  namespace margelo::nitro::rncandle { struct TransportAsset; }
95
115
  // Forward declaration of `UserCounterparty` to properly resolve imports.
@@ -107,24 +127,31 @@ namespace margelo::nitro::rncandle { struct WireDetails; }
107
127
  #include "AssetAccountDetails.hpp"
108
128
  #include "AssetAccountKind.hpp"
109
129
  #include "AssetAccountQuery.hpp"
130
+ #include "AssetAccountRef.hpp"
110
131
  #include "Coordinates.hpp"
111
132
  #include "Counterparty.hpp"
133
+ #include "ExecuteTradeRequest.hpp"
112
134
  #include "FiatAccountDetails.hpp"
113
135
  #include "FiatAsset.hpp"
114
136
  #include "FiatAssetQuoteRequest.hpp"
137
+ #include "FiatAssetRef.hpp"
115
138
  #include "HybridRNCandleSpec.hpp"
116
139
  #include "InactiveLinkedAccountDetails.hpp"
117
140
  #include "LegalAccountKind.hpp"
118
141
  #include "LinkedAccount.hpp"
119
142
  #include "LinkedAccountDetails.hpp"
143
+ #include "LinkedAccountRef.hpp"
120
144
  #include "MarketAccountDetails.hpp"
121
145
  #include "MarketAssetQuoteRequest.hpp"
122
146
  #include "MarketTradeAsset.hpp"
147
+ #include "MarketTradeAssetRef.hpp"
123
148
  #include "MerchantCounterparty.hpp"
124
149
  #include "MerchantLocation.hpp"
125
150
  #include "NothingAsset.hpp"
126
151
  #include "NothingAssetQuoteRequest.hpp"
152
+ #include "NothingAssetRef.hpp"
127
153
  #include "OtherAsset.hpp"
154
+ #include "OtherAssetRef.hpp"
128
155
  #include "PresentationBackground.hpp"
129
156
  #include "PresentationStyle.hpp"
130
157
  #include "Service.hpp"
@@ -133,12 +160,15 @@ namespace margelo::nitro::rncandle { struct WireDetails; }
133
160
  #include "Trade.hpp"
134
161
  #include "TradeAsset.hpp"
135
162
  #include "TradeAssetQuoteRequest.hpp"
163
+ #include "TradeAssetRef.hpp"
136
164
  #include "TradeQuery.hpp"
137
165
  #include "TradeQuote.hpp"
138
166
  #include "TradeQuoteRequest.hpp"
167
+ #include "TradeRef.hpp"
139
168
  #include "TradeState.hpp"
140
169
  #include "TransportAsset.hpp"
141
170
  #include "TransportAssetQuoteRequest.hpp"
171
+ #include "TransportAssetRef.hpp"
142
172
  #include "UserCounterparty.hpp"
143
173
  #include "WireDetails.hpp"
144
174
  #include <NitroModules/AnyMap.hpp>
@@ -28,6 +28,8 @@ namespace margelo::nitro::rncandle { struct ActiveLinkedAccountDetails; }
28
28
  namespace margelo::nitro::rncandle { struct InactiveLinkedAccountDetails; }
29
29
  // Forward declaration of `AppUser` to properly resolve imports.
30
30
  namespace margelo::nitro::rncandle { struct AppUser; }
31
+ // Forward declaration of `LinkedAccountRef` to properly resolve imports.
32
+ namespace margelo::nitro::rncandle { struct LinkedAccountRef; }
31
33
  // Forward declaration of `AssetAccount` to properly resolve imports.
32
34
  namespace margelo::nitro::rncandle { struct AssetAccount; }
33
35
  // Forward declaration of `LegalAccountKind` to properly resolve imports.
@@ -48,6 +50,8 @@ namespace margelo::nitro::rncandle { struct MarketAccountDetails; }
48
50
  namespace margelo::nitro::rncandle { struct AssetAccountQuery; }
49
51
  // Forward declaration of `AssetAccountKind` to properly resolve imports.
50
52
  namespace margelo::nitro::rncandle { enum class AssetAccountKind; }
53
+ // Forward declaration of `AssetAccountRef` to properly resolve imports.
54
+ namespace margelo::nitro::rncandle { struct AssetAccountRef; }
51
55
  // Forward declaration of `Trade` to properly resolve imports.
52
56
  namespace margelo::nitro::rncandle { struct Trade; }
53
57
  // Forward declaration of `TradeState` to properly resolve imports.
@@ -80,6 +84,20 @@ namespace margelo::nitro::rncandle { struct OtherAsset; }
80
84
  namespace margelo::nitro::rncandle { struct NothingAsset; }
81
85
  // Forward declaration of `TradeQuery` to properly resolve imports.
82
86
  namespace margelo::nitro::rncandle { struct TradeQuery; }
87
+ // Forward declaration of `TradeRef` to properly resolve imports.
88
+ namespace margelo::nitro::rncandle { struct TradeRef; }
89
+ // Forward declaration of `TradeAssetRef` to properly resolve imports.
90
+ namespace margelo::nitro::rncandle { struct TradeAssetRef; }
91
+ // Forward declaration of `FiatAssetRef` to properly resolve imports.
92
+ namespace margelo::nitro::rncandle { struct FiatAssetRef; }
93
+ // Forward declaration of `MarketTradeAssetRef` to properly resolve imports.
94
+ namespace margelo::nitro::rncandle { struct MarketTradeAssetRef; }
95
+ // Forward declaration of `TransportAssetRef` to properly resolve imports.
96
+ namespace margelo::nitro::rncandle { struct TransportAssetRef; }
97
+ // Forward declaration of `OtherAssetRef` to properly resolve imports.
98
+ namespace margelo::nitro::rncandle { struct OtherAssetRef; }
99
+ // Forward declaration of `NothingAssetRef` to properly resolve imports.
100
+ namespace margelo::nitro::rncandle { struct NothingAssetRef; }
83
101
  // Forward declaration of `TradeQuote` to properly resolve imports.
84
102
  namespace margelo::nitro::rncandle { struct TradeQuote; }
85
103
  // Forward declaration of `TradeQuoteRequest` to properly resolve imports.
@@ -94,6 +112,8 @@ namespace margelo::nitro::rncandle { struct MarketAssetQuoteRequest; }
94
112
  namespace margelo::nitro::rncandle { struct TransportAssetQuoteRequest; }
95
113
  // Forward declaration of `NothingAssetQuoteRequest` to properly resolve imports.
96
114
  namespace margelo::nitro::rncandle { struct NothingAssetQuoteRequest; }
115
+ // Forward declaration of `ExecuteTradeRequest` to properly resolve imports.
116
+ namespace margelo::nitro::rncandle { struct ExecuteTradeRequest; }
97
117
  // Forward declaration of `AnyMap` to properly resolve imports.
98
118
  namespace NitroModules { class AnyMap; }
99
119
  // Forward declaration of `ToolCall` to properly resolve imports.
@@ -112,6 +132,7 @@ namespace margelo::nitro::rncandle { struct ToolCall; }
112
132
  #include "InactiveLinkedAccountDetails.hpp"
113
133
  #include "AppUser.hpp"
114
134
  #include <NitroModules/Promise.hpp>
135
+ #include "LinkedAccountRef.hpp"
115
136
  #include "AssetAccount.hpp"
116
137
  #include "LegalAccountKind.hpp"
117
138
  #include "AssetAccountDetails.hpp"
@@ -122,6 +143,7 @@ namespace margelo::nitro::rncandle { struct ToolCall; }
122
143
  #include "MarketAccountDetails.hpp"
123
144
  #include "AssetAccountQuery.hpp"
124
145
  #include "AssetAccountKind.hpp"
146
+ #include "AssetAccountRef.hpp"
125
147
  #include "Trade.hpp"
126
148
  #include "TradeState.hpp"
127
149
  #include "Counterparty.hpp"
@@ -138,6 +160,13 @@ namespace margelo::nitro::rncandle { struct ToolCall; }
138
160
  #include "OtherAsset.hpp"
139
161
  #include "NothingAsset.hpp"
140
162
  #include "TradeQuery.hpp"
163
+ #include "TradeRef.hpp"
164
+ #include "TradeAssetRef.hpp"
165
+ #include "FiatAssetRef.hpp"
166
+ #include "MarketTradeAssetRef.hpp"
167
+ #include "TransportAssetRef.hpp"
168
+ #include "OtherAssetRef.hpp"
169
+ #include "NothingAssetRef.hpp"
141
170
  #include "TradeQuote.hpp"
142
171
  #include "TradeQuoteRequest.hpp"
143
172
  #include "TradeAssetQuoteRequest.hpp"
@@ -145,6 +174,7 @@ namespace margelo::nitro::rncandle { struct ToolCall; }
145
174
  #include "MarketAssetQuoteRequest.hpp"
146
175
  #include "TransportAssetQuoteRequest.hpp"
147
176
  #include "NothingAssetQuoteRequest.hpp"
177
+ #include "ExecuteTradeRequest.hpp"
148
178
  #include <NitroModules/AnyMap.hpp>
149
179
  #include "ToolCall.hpp"
150
180
 
@@ -207,8 +237,16 @@ namespace margelo::nitro::rncandle {
207
237
  auto __value = std::move(__result.value());
208
238
  return __value;
209
239
  }
210
- inline std::shared_ptr<Promise<void>> unlinkAccount(const std::string& linkedAccountID) override {
211
- auto __result = _swiftPart.unlinkAccount(linkedAccountID);
240
+ inline std::shared_ptr<Promise<LinkedAccount>> getLinkedAccount(const LinkedAccountRef& ref) override {
241
+ auto __result = _swiftPart.getLinkedAccount(ref);
242
+ if (__result.hasError()) [[unlikely]] {
243
+ std::rethrow_exception(__result.error());
244
+ }
245
+ auto __value = std::move(__result.value());
246
+ return __value;
247
+ }
248
+ inline std::shared_ptr<Promise<void>> unlinkAccount(const LinkedAccountRef& ref) override {
249
+ auto __result = _swiftPart.unlinkAccount(ref);
212
250
  if (__result.hasError()) [[unlikely]] {
213
251
  std::rethrow_exception(__result.error());
214
252
  }
@@ -223,6 +261,14 @@ namespace margelo::nitro::rncandle {
223
261
  auto __value = std::move(__result.value());
224
262
  return __value;
225
263
  }
264
+ inline std::shared_ptr<Promise<AssetAccount>> getAssetAccount(const AssetAccountRef& ref) override {
265
+ auto __result = _swiftPart.getAssetAccount(ref);
266
+ if (__result.hasError()) [[unlikely]] {
267
+ std::rethrow_exception(__result.error());
268
+ }
269
+ auto __value = std::move(__result.value());
270
+ return __value;
271
+ }
226
272
  inline std::shared_ptr<Promise<std::vector<Trade>>> getTrades(const TradeQuery& query) override {
227
273
  auto __result = _swiftPart.getTrades(query);
228
274
  if (__result.hasError()) [[unlikely]] {
@@ -231,6 +277,14 @@ namespace margelo::nitro::rncandle {
231
277
  auto __value = std::move(__result.value());
232
278
  return __value;
233
279
  }
280
+ inline std::shared_ptr<Promise<Trade>> getTrade(const TradeRef& ref) override {
281
+ auto __result = _swiftPart.getTrade(ref);
282
+ if (__result.hasError()) [[unlikely]] {
283
+ std::rethrow_exception(__result.error());
284
+ }
285
+ auto __value = std::move(__result.value());
286
+ return __value;
287
+ }
234
288
  inline std::shared_ptr<Promise<std::vector<TradeQuote>>> getTradeQuotes(const TradeQuoteRequest& request) override {
235
289
  auto __result = _swiftPart.getTradeQuotes(request);
236
290
  if (__result.hasError()) [[unlikely]] {
@@ -239,8 +293,8 @@ namespace margelo::nitro::rncandle {
239
293
  auto __value = std::move(__result.value());
240
294
  return __value;
241
295
  }
242
- inline std::shared_ptr<Promise<Trade>> submitTrade(const std::string& serviceTradeID) override {
243
- auto __result = _swiftPart.submitTrade(serviceTradeID);
296
+ inline std::shared_ptr<Promise<Trade>> executeTrade(const ExecuteTradeRequest& request) override {
297
+ auto __result = _swiftPart.executeTrade(request);
244
298
  if (__result.hasError()) [[unlikely]] {
245
299
  std::rethrow_exception(__result.error());
246
300
  }
@@ -0,0 +1,55 @@
1
+ ///
2
+ /// AssetAccountRef.swift
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ import NitroModules
9
+
10
+ /// Represents an instance of `AssetAccountRef`, backed by a C++ struct.
11
+ public typealias AssetAccountRef = margelo.nitro.rncandle.AssetAccountRef
12
+
13
+ extension AssetAccountRef {
14
+ private typealias bridge = margelo.nitro.rncandle.bridge.swift
15
+
16
+ /**
17
+ * Create a new instance of `AssetAccountRef`.
18
+ */
19
+ public init(linkedAccountID: String, assetKind: String, serviceAccountID: String) {
20
+ self.init(std.string(linkedAccountID), std.string(assetKind), std.string(serviceAccountID))
21
+ }
22
+
23
+ public var linkedAccountID: String {
24
+ @inline(__always)
25
+ get {
26
+ return String(self.__linkedAccountID)
27
+ }
28
+ @inline(__always)
29
+ set {
30
+ self.__linkedAccountID = std.string(newValue)
31
+ }
32
+ }
33
+
34
+ public var assetKind: String {
35
+ @inline(__always)
36
+ get {
37
+ return String(self.__assetKind)
38
+ }
39
+ @inline(__always)
40
+ set {
41
+ self.__assetKind = std.string(newValue)
42
+ }
43
+ }
44
+
45
+ public var serviceAccountID: String {
46
+ @inline(__always)
47
+ get {
48
+ return String(self.__serviceAccountID)
49
+ }
50
+ @inline(__always)
51
+ set {
52
+ self.__serviceAccountID = std.string(newValue)
53
+ }
54
+ }
55
+ }