react-native-candle 0.1.16 → 0.1.18

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 (105) hide show
  1. package/ReactNativeCandle.podspec +1 -1
  2. package/ios/Sources/CandleLinkSheetWrapperView.swift +2 -167
  3. package/ios/Sources/RNCandle.swift +558 -47
  4. package/lib/commonjs/index.js +157 -1
  5. package/lib/commonjs/index.js.map +1 -1
  6. package/lib/module/index.js +157 -1
  7. package/lib/module/index.js.map +1 -1
  8. package/lib/typescript/commonjs/src/index.d.ts +79 -3
  9. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  10. package/lib/typescript/commonjs/src/specs/RNCandle.nitro.d.ts +197 -9
  11. package/lib/typescript/commonjs/src/specs/RNCandle.nitro.d.ts.map +1 -1
  12. package/lib/typescript/module/src/index.d.ts +79 -3
  13. package/lib/typescript/module/src/index.d.ts.map +1 -1
  14. package/lib/typescript/module/src/specs/RNCandle.nitro.d.ts +197 -9
  15. package/lib/typescript/module/src/specs/RNCandle.nitro.d.ts.map +1 -1
  16. package/nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Bridge.cpp +36 -4
  17. package/nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Bridge.hpp +528 -35
  18. package/nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Umbrella.hpp +108 -6
  19. package/nitrogen/generated/ios/c++/HybridRNCandleSpecSwift.hpp +122 -12
  20. package/nitrogen/generated/ios/swift/ACHAccountKind.swift +38 -0
  21. package/nitrogen/generated/ios/swift/ACHDetails.swift +55 -0
  22. package/nitrogen/generated/ios/swift/{Details.swift → ActiveLinkedAccountDetails.swift} +55 -22
  23. package/nitrogen/generated/ios/swift/Address.swift +33 -0
  24. package/nitrogen/generated/ios/swift/AssetAccount.swift +55 -0
  25. package/nitrogen/generated/ios/swift/AssetAccountDetails.swift +83 -0
  26. package/nitrogen/generated/ios/swift/AssetAccountKind.swift +42 -0
  27. package/nitrogen/generated/ios/swift/AssetAccountQuery.swift +76 -0
  28. package/nitrogen/generated/ios/swift/Coordinates.swift +44 -0
  29. package/nitrogen/generated/ios/swift/Counterparty.swift +115 -0
  30. package/nitrogen/generated/ios/swift/FiatAccountDetails.swift +165 -0
  31. package/nitrogen/generated/ios/swift/FiatAsset.swift +123 -0
  32. package/nitrogen/generated/ios/swift/FiatAssetQuoteRequest.swift +119 -0
  33. package/nitrogen/generated/ios/swift/Func_void_Trade.swift +44 -0
  34. package/nitrogen/generated/ios/swift/Func_void_std__vector_AssetAccount_.swift +46 -0
  35. package/nitrogen/generated/ios/swift/Func_void_std__vector_TradeQuote_.swift +46 -0
  36. package/nitrogen/generated/ios/swift/Func_void_std__vector_Trade_.swift +45 -0
  37. package/nitrogen/generated/ios/swift/HybridRNCandleSpec.swift +4 -3
  38. package/nitrogen/generated/ios/swift/HybridRNCandleSpec_cxx.swift +79 -40
  39. package/nitrogen/generated/ios/swift/InactiveLinkedAccountDetails.swift +33 -0
  40. package/nitrogen/generated/ios/swift/LegalAccountKind.swift +46 -0
  41. package/nitrogen/generated/ios/swift/LinkedAccount.swift +16 -34
  42. package/nitrogen/generated/ios/swift/LinkedAccountDetails.swift +87 -0
  43. package/nitrogen/generated/ios/swift/MarketAccountDetails.swift +69 -0
  44. package/nitrogen/generated/ios/swift/MarketAssetQuoteRequest.swift +151 -0
  45. package/nitrogen/generated/ios/swift/MarketTradeAsset.swift +150 -0
  46. package/nitrogen/generated/ios/swift/MerchantCounterparty.swift +86 -0
  47. package/nitrogen/generated/ios/swift/MerchantLocation.swift +55 -0
  48. package/nitrogen/generated/ios/swift/NothingAsset.swift +33 -0
  49. package/nitrogen/generated/ios/swift/NothingAssetQuoteRequest.swift +33 -0
  50. package/nitrogen/generated/ios/swift/OtherAsset.swift +33 -0
  51. package/nitrogen/generated/ios/swift/ServiceCounterparty.swift +44 -0
  52. package/nitrogen/generated/ios/swift/Trade.swift +80 -0
  53. package/nitrogen/generated/ios/swift/TradeAsset.swift +175 -0
  54. package/nitrogen/generated/ios/swift/TradeAssetQuoteRequest.swift +148 -0
  55. package/nitrogen/generated/ios/swift/TradeQuery.swift +175 -0
  56. package/nitrogen/generated/ios/swift/TradeQuote.swift +44 -0
  57. package/nitrogen/generated/ios/swift/TradeQuoteRequest.swift +63 -0
  58. package/nitrogen/generated/ios/swift/TradeState.swift +42 -0
  59. package/nitrogen/generated/ios/swift/TransportAsset.swift +174 -0
  60. package/nitrogen/generated/ios/swift/TransportAssetQuoteRequest.swift +212 -0
  61. package/nitrogen/generated/ios/swift/UserCounterparty.swift +66 -0
  62. package/nitrogen/generated/ios/swift/WireDetails.swift +44 -0
  63. package/nitrogen/generated/shared/c++/{State.hpp → ACHAccountKind.hpp} +17 -17
  64. package/nitrogen/generated/shared/c++/ACHDetails.hpp +79 -0
  65. package/nitrogen/generated/shared/c++/{Details.hpp → ActiveLinkedAccountDetails.hpp} +25 -23
  66. package/nitrogen/generated/shared/c++/Address.hpp +69 -0
  67. package/nitrogen/generated/shared/c++/AssetAccount.hpp +82 -0
  68. package/nitrogen/generated/shared/c++/AssetAccountDetails.hpp +78 -0
  69. package/nitrogen/generated/shared/c++/AssetAccountKind.hpp +82 -0
  70. package/nitrogen/generated/shared/c++/AssetAccountQuery.hpp +76 -0
  71. package/nitrogen/generated/shared/c++/Coordinates.hpp +73 -0
  72. package/nitrogen/generated/shared/c++/Counterparty.hpp +85 -0
  73. package/nitrogen/generated/shared/c++/FiatAccountDetails.hpp +106 -0
  74. package/nitrogen/generated/shared/c++/FiatAsset.hpp +96 -0
  75. package/nitrogen/generated/shared/c++/FiatAssetQuoteRequest.hpp +82 -0
  76. package/nitrogen/generated/shared/c++/HybridRNCandleSpec.cpp +1 -0
  77. package/nitrogen/generated/shared/c++/HybridRNCandleSpec.hpp +22 -3
  78. package/nitrogen/generated/shared/c++/InactiveLinkedAccountDetails.hpp +69 -0
  79. package/nitrogen/generated/shared/c++/LegalAccountKind.hpp +86 -0
  80. package/nitrogen/generated/shared/c++/LinkedAccount.hpp +13 -14
  81. package/nitrogen/generated/shared/c++/LinkedAccountDetails.hpp +78 -0
  82. package/nitrogen/generated/shared/c++/MarketAccountDetails.hpp +83 -0
  83. package/nitrogen/generated/shared/c++/MarketAssetQuoteRequest.hpp +86 -0
  84. package/nitrogen/generated/shared/c++/MarketTradeAsset.hpp +111 -0
  85. package/nitrogen/generated/shared/c++/MerchantCounterparty.hpp +84 -0
  86. package/nitrogen/generated/shared/c++/MerchantLocation.hpp +77 -0
  87. package/nitrogen/generated/shared/c++/NothingAsset.hpp +69 -0
  88. package/nitrogen/generated/shared/c++/NothingAssetQuoteRequest.hpp +69 -0
  89. package/nitrogen/generated/shared/c++/OtherAsset.hpp +69 -0
  90. package/nitrogen/generated/shared/c++/ServiceCounterparty.hpp +75 -0
  91. package/nitrogen/generated/shared/c++/Trade.hpp +93 -0
  92. package/nitrogen/generated/shared/c++/TradeAsset.hpp +99 -0
  93. package/nitrogen/generated/shared/c++/TradeAssetQuoteRequest.hpp +92 -0
  94. package/nitrogen/generated/shared/c++/TradeQuery.hpp +86 -0
  95. package/nitrogen/generated/shared/c++/TradeQuote.hpp +74 -0
  96. package/nitrogen/generated/shared/c++/TradeQuoteRequest.hpp +76 -0
  97. package/nitrogen/generated/shared/c++/TradeState.hpp +82 -0
  98. package/nitrogen/generated/shared/c++/TransportAsset.hpp +125 -0
  99. package/nitrogen/generated/shared/c++/TransportAssetQuoteRequest.hpp +99 -0
  100. package/nitrogen/generated/shared/c++/UserCounterparty.hpp +81 -0
  101. package/nitrogen/generated/shared/c++/WireDetails.hpp +73 -0
  102. package/package.json +1 -1
  103. package/src/index.ts +259 -3
  104. package/src/specs/RNCandle.nitro.ts +237 -10
  105. package/nitrogen/generated/ios/swift/State.swift +0 -38
@@ -0,0 +1,82 @@
1
+ ///
2
+ /// TradeState.hpp
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
+ #pragma once
9
+
10
+ #if __has_include(<NitroModules/NitroHash.hpp>)
11
+ #include <NitroModules/NitroHash.hpp>
12
+ #else
13
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
+ #endif
15
+ #if __has_include(<NitroModules/JSIConverter.hpp>)
16
+ #include <NitroModules/JSIConverter.hpp>
17
+ #else
18
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
+ #endif
20
+ #if __has_include(<NitroModules/NitroDefines.hpp>)
21
+ #include <NitroModules/NitroDefines.hpp>
22
+ #else
23
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
+ #endif
25
+
26
+ namespace margelo::nitro::rncandle {
27
+
28
+ /**
29
+ * An enum which can be represented as a JavaScript union (TradeState).
30
+ */
31
+ enum class TradeState {
32
+ SUCCESS SWIFT_NAME(success) = 0,
33
+ INPROGRESS SWIFT_NAME(inprogress) = 1,
34
+ FAILURE SWIFT_NAME(failure) = 2,
35
+ } CLOSED_ENUM;
36
+
37
+ } // namespace margelo::nitro::rncandle
38
+
39
+ namespace margelo::nitro {
40
+
41
+ using namespace margelo::nitro::rncandle;
42
+
43
+ // C++ TradeState <> JS TradeState (union)
44
+ template <>
45
+ struct JSIConverter<TradeState> final {
46
+ static inline TradeState fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
47
+ std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
48
+ switch (hashString(unionValue.c_str(), unionValue.size())) {
49
+ case hashString("success"): return TradeState::SUCCESS;
50
+ case hashString("inProgress"): return TradeState::INPROGRESS;
51
+ case hashString("failure"): return TradeState::FAILURE;
52
+ default: [[unlikely]]
53
+ throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum TradeState - invalid value!");
54
+ }
55
+ }
56
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, TradeState arg) {
57
+ switch (arg) {
58
+ case TradeState::SUCCESS: return JSIConverter<std::string>::toJSI(runtime, "success");
59
+ case TradeState::INPROGRESS: return JSIConverter<std::string>::toJSI(runtime, "inProgress");
60
+ case TradeState::FAILURE: return JSIConverter<std::string>::toJSI(runtime, "failure");
61
+ default: [[unlikely]]
62
+ throw std::invalid_argument("Cannot convert TradeState to JS - invalid value: "
63
+ + std::to_string(static_cast<int>(arg)) + "!");
64
+ }
65
+ }
66
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
67
+ if (!value.isString()) {
68
+ return false;
69
+ }
70
+ std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, value);
71
+ switch (hashString(unionValue.c_str(), unionValue.size())) {
72
+ case hashString("success"):
73
+ case hashString("inProgress"):
74
+ case hashString("failure"):
75
+ return true;
76
+ default:
77
+ return false;
78
+ }
79
+ }
80
+ };
81
+
82
+ } // namespace margelo::nitro
@@ -0,0 +1,125 @@
1
+ ///
2
+ /// TransportAsset.hpp
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
+ #pragma once
9
+
10
+ #if __has_include(<NitroModules/JSIConverter.hpp>)
11
+ #include <NitroModules/JSIConverter.hpp>
12
+ #else
13
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
+ #endif
15
+ #if __has_include(<NitroModules/NitroDefines.hpp>)
16
+ #include <NitroModules/NitroDefines.hpp>
17
+ #else
18
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
+ #endif
20
+
21
+ // Forward declaration of `Coordinates` to properly resolve imports.
22
+ namespace margelo::nitro::rncandle { struct Coordinates; }
23
+ // Forward declaration of `Address` to properly resolve imports.
24
+ namespace margelo::nitro::rncandle { struct Address; }
25
+ // Forward declaration of `Service` to properly resolve imports.
26
+ namespace margelo::nitro::rncandle { enum class Service; }
27
+
28
+ #include <string>
29
+ #include "Coordinates.hpp"
30
+ #include "Address.hpp"
31
+ #include "Service.hpp"
32
+
33
+ namespace margelo::nitro::rncandle {
34
+
35
+ /**
36
+ * A struct which can be represented as a JavaScript object (TransportAsset).
37
+ */
38
+ struct TransportAsset {
39
+ public:
40
+ std::string assetKind SWIFT_PRIVATE;
41
+ std::string serviceTradeID SWIFT_PRIVATE;
42
+ std::string serviceAssetID SWIFT_PRIVATE;
43
+ std::string name SWIFT_PRIVATE;
44
+ std::string description SWIFT_PRIVATE;
45
+ std::string imageURL SWIFT_PRIVATE;
46
+ Coordinates originCoordinates SWIFT_PRIVATE;
47
+ Address originAddress SWIFT_PRIVATE;
48
+ Coordinates destinationCoordinates SWIFT_PRIVATE;
49
+ Address destinationAddress SWIFT_PRIVATE;
50
+ double seats SWIFT_PRIVATE;
51
+ std::string linkedAccountID SWIFT_PRIVATE;
52
+ Service service SWIFT_PRIVATE;
53
+
54
+ public:
55
+ TransportAsset() = default;
56
+ explicit TransportAsset(std::string assetKind, std::string serviceTradeID, std::string serviceAssetID, std::string name, std::string description, std::string imageURL, Coordinates originCoordinates, Address originAddress, Coordinates destinationCoordinates, Address destinationAddress, double seats, std::string linkedAccountID, Service service): assetKind(assetKind), serviceTradeID(serviceTradeID), serviceAssetID(serviceAssetID), name(name), description(description), imageURL(imageURL), originCoordinates(originCoordinates), originAddress(originAddress), destinationCoordinates(destinationCoordinates), destinationAddress(destinationAddress), seats(seats), linkedAccountID(linkedAccountID), service(service) {}
57
+ };
58
+
59
+ } // namespace margelo::nitro::rncandle
60
+
61
+ namespace margelo::nitro {
62
+
63
+ using namespace margelo::nitro::rncandle;
64
+
65
+ // C++ TransportAsset <> JS TransportAsset (object)
66
+ template <>
67
+ struct JSIConverter<TransportAsset> final {
68
+ static inline TransportAsset fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
69
+ jsi::Object obj = arg.asObject(runtime);
70
+ return TransportAsset(
71
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "assetKind")),
72
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "serviceTradeID")),
73
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "serviceAssetID")),
74
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "name")),
75
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "description")),
76
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "imageURL")),
77
+ JSIConverter<Coordinates>::fromJSI(runtime, obj.getProperty(runtime, "originCoordinates")),
78
+ JSIConverter<Address>::fromJSI(runtime, obj.getProperty(runtime, "originAddress")),
79
+ JSIConverter<Coordinates>::fromJSI(runtime, obj.getProperty(runtime, "destinationCoordinates")),
80
+ JSIConverter<Address>::fromJSI(runtime, obj.getProperty(runtime, "destinationAddress")),
81
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "seats")),
82
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "linkedAccountID")),
83
+ JSIConverter<Service>::fromJSI(runtime, obj.getProperty(runtime, "service"))
84
+ );
85
+ }
86
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const TransportAsset& arg) {
87
+ jsi::Object obj(runtime);
88
+ obj.setProperty(runtime, "assetKind", JSIConverter<std::string>::toJSI(runtime, arg.assetKind));
89
+ obj.setProperty(runtime, "serviceTradeID", JSIConverter<std::string>::toJSI(runtime, arg.serviceTradeID));
90
+ obj.setProperty(runtime, "serviceAssetID", JSIConverter<std::string>::toJSI(runtime, arg.serviceAssetID));
91
+ obj.setProperty(runtime, "name", JSIConverter<std::string>::toJSI(runtime, arg.name));
92
+ obj.setProperty(runtime, "description", JSIConverter<std::string>::toJSI(runtime, arg.description));
93
+ obj.setProperty(runtime, "imageURL", JSIConverter<std::string>::toJSI(runtime, arg.imageURL));
94
+ obj.setProperty(runtime, "originCoordinates", JSIConverter<Coordinates>::toJSI(runtime, arg.originCoordinates));
95
+ obj.setProperty(runtime, "originAddress", JSIConverter<Address>::toJSI(runtime, arg.originAddress));
96
+ obj.setProperty(runtime, "destinationCoordinates", JSIConverter<Coordinates>::toJSI(runtime, arg.destinationCoordinates));
97
+ obj.setProperty(runtime, "destinationAddress", JSIConverter<Address>::toJSI(runtime, arg.destinationAddress));
98
+ obj.setProperty(runtime, "seats", JSIConverter<double>::toJSI(runtime, arg.seats));
99
+ obj.setProperty(runtime, "linkedAccountID", JSIConverter<std::string>::toJSI(runtime, arg.linkedAccountID));
100
+ obj.setProperty(runtime, "service", JSIConverter<Service>::toJSI(runtime, arg.service));
101
+ return obj;
102
+ }
103
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
104
+ if (!value.isObject()) {
105
+ return false;
106
+ }
107
+ jsi::Object obj = value.getObject(runtime);
108
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "assetKind"))) return false;
109
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "serviceTradeID"))) return false;
110
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "serviceAssetID"))) return false;
111
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "name"))) return false;
112
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "description"))) return false;
113
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "imageURL"))) return false;
114
+ if (!JSIConverter<Coordinates>::canConvert(runtime, obj.getProperty(runtime, "originCoordinates"))) return false;
115
+ if (!JSIConverter<Address>::canConvert(runtime, obj.getProperty(runtime, "originAddress"))) return false;
116
+ if (!JSIConverter<Coordinates>::canConvert(runtime, obj.getProperty(runtime, "destinationCoordinates"))) return false;
117
+ if (!JSIConverter<Address>::canConvert(runtime, obj.getProperty(runtime, "destinationAddress"))) return false;
118
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "seats"))) return false;
119
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "linkedAccountID"))) return false;
120
+ if (!JSIConverter<Service>::canConvert(runtime, obj.getProperty(runtime, "service"))) return false;
121
+ return true;
122
+ }
123
+ };
124
+
125
+ } // namespace margelo::nitro
@@ -0,0 +1,99 @@
1
+ ///
2
+ /// TransportAssetQuoteRequest.hpp
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
+ #pragma once
9
+
10
+ #if __has_include(<NitroModules/JSIConverter.hpp>)
11
+ #include <NitroModules/JSIConverter.hpp>
12
+ #else
13
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
+ #endif
15
+ #if __has_include(<NitroModules/NitroDefines.hpp>)
16
+ #include <NitroModules/NitroDefines.hpp>
17
+ #else
18
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
+ #endif
20
+
21
+ // Forward declaration of `Coordinates` to properly resolve imports.
22
+ namespace margelo::nitro::rncandle { struct Coordinates; }
23
+ // Forward declaration of `Address` to properly resolve imports.
24
+ namespace margelo::nitro::rncandle { struct Address; }
25
+
26
+ #include <string>
27
+ #include <optional>
28
+ #include "Coordinates.hpp"
29
+ #include "Address.hpp"
30
+
31
+ namespace margelo::nitro::rncandle {
32
+
33
+ /**
34
+ * A struct which can be represented as a JavaScript object (TransportAssetQuoteRequest).
35
+ */
36
+ struct TransportAssetQuoteRequest {
37
+ public:
38
+ std::string assetKind SWIFT_PRIVATE;
39
+ std::optional<std::string> serviceAssetID SWIFT_PRIVATE;
40
+ std::optional<Coordinates> originCoordinates SWIFT_PRIVATE;
41
+ std::optional<Address> originAddress SWIFT_PRIVATE;
42
+ std::optional<Coordinates> destinationCoordinates SWIFT_PRIVATE;
43
+ std::optional<Address> destinationAddress SWIFT_PRIVATE;
44
+ std::optional<double> seats SWIFT_PRIVATE;
45
+
46
+ public:
47
+ TransportAssetQuoteRequest() = default;
48
+ explicit TransportAssetQuoteRequest(std::string assetKind, std::optional<std::string> serviceAssetID, std::optional<Coordinates> originCoordinates, std::optional<Address> originAddress, std::optional<Coordinates> destinationCoordinates, std::optional<Address> destinationAddress, std::optional<double> seats): assetKind(assetKind), serviceAssetID(serviceAssetID), originCoordinates(originCoordinates), originAddress(originAddress), destinationCoordinates(destinationCoordinates), destinationAddress(destinationAddress), seats(seats) {}
49
+ };
50
+
51
+ } // namespace margelo::nitro::rncandle
52
+
53
+ namespace margelo::nitro {
54
+
55
+ using namespace margelo::nitro::rncandle;
56
+
57
+ // C++ TransportAssetQuoteRequest <> JS TransportAssetQuoteRequest (object)
58
+ template <>
59
+ struct JSIConverter<TransportAssetQuoteRequest> final {
60
+ static inline TransportAssetQuoteRequest fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
61
+ jsi::Object obj = arg.asObject(runtime);
62
+ return TransportAssetQuoteRequest(
63
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "assetKind")),
64
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "serviceAssetID")),
65
+ JSIConverter<std::optional<Coordinates>>::fromJSI(runtime, obj.getProperty(runtime, "originCoordinates")),
66
+ JSIConverter<std::optional<Address>>::fromJSI(runtime, obj.getProperty(runtime, "originAddress")),
67
+ JSIConverter<std::optional<Coordinates>>::fromJSI(runtime, obj.getProperty(runtime, "destinationCoordinates")),
68
+ JSIConverter<std::optional<Address>>::fromJSI(runtime, obj.getProperty(runtime, "destinationAddress")),
69
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "seats"))
70
+ );
71
+ }
72
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const TransportAssetQuoteRequest& arg) {
73
+ jsi::Object obj(runtime);
74
+ obj.setProperty(runtime, "assetKind", JSIConverter<std::string>::toJSI(runtime, arg.assetKind));
75
+ obj.setProperty(runtime, "serviceAssetID", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.serviceAssetID));
76
+ obj.setProperty(runtime, "originCoordinates", JSIConverter<std::optional<Coordinates>>::toJSI(runtime, arg.originCoordinates));
77
+ obj.setProperty(runtime, "originAddress", JSIConverter<std::optional<Address>>::toJSI(runtime, arg.originAddress));
78
+ obj.setProperty(runtime, "destinationCoordinates", JSIConverter<std::optional<Coordinates>>::toJSI(runtime, arg.destinationCoordinates));
79
+ obj.setProperty(runtime, "destinationAddress", JSIConverter<std::optional<Address>>::toJSI(runtime, arg.destinationAddress));
80
+ obj.setProperty(runtime, "seats", JSIConverter<std::optional<double>>::toJSI(runtime, arg.seats));
81
+ return obj;
82
+ }
83
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
84
+ if (!value.isObject()) {
85
+ return false;
86
+ }
87
+ jsi::Object obj = value.getObject(runtime);
88
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "assetKind"))) return false;
89
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "serviceAssetID"))) return false;
90
+ if (!JSIConverter<std::optional<Coordinates>>::canConvert(runtime, obj.getProperty(runtime, "originCoordinates"))) return false;
91
+ if (!JSIConverter<std::optional<Address>>::canConvert(runtime, obj.getProperty(runtime, "originAddress"))) return false;
92
+ if (!JSIConverter<std::optional<Coordinates>>::canConvert(runtime, obj.getProperty(runtime, "destinationCoordinates"))) return false;
93
+ if (!JSIConverter<std::optional<Address>>::canConvert(runtime, obj.getProperty(runtime, "destinationAddress"))) return false;
94
+ if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "seats"))) return false;
95
+ return true;
96
+ }
97
+ };
98
+
99
+ } // namespace margelo::nitro
@@ -0,0 +1,81 @@
1
+ ///
2
+ /// UserCounterparty.hpp
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
+ #pragma once
9
+
10
+ #if __has_include(<NitroModules/JSIConverter.hpp>)
11
+ #include <NitroModules/JSIConverter.hpp>
12
+ #else
13
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
+ #endif
15
+ #if __has_include(<NitroModules/NitroDefines.hpp>)
16
+ #include <NitroModules/NitroDefines.hpp>
17
+ #else
18
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
+ #endif
20
+
21
+
22
+
23
+ #include <string>
24
+
25
+ namespace margelo::nitro::rncandle {
26
+
27
+ /**
28
+ * A struct which can be represented as a JavaScript object (UserCounterparty).
29
+ */
30
+ struct UserCounterparty {
31
+ public:
32
+ std::string kind SWIFT_PRIVATE;
33
+ std::string legalName SWIFT_PRIVATE;
34
+ std::string avatarURL SWIFT_PRIVATE;
35
+ std::string username SWIFT_PRIVATE;
36
+
37
+ public:
38
+ UserCounterparty() = default;
39
+ explicit UserCounterparty(std::string kind, std::string legalName, std::string avatarURL, std::string username): kind(kind), legalName(legalName), avatarURL(avatarURL), username(username) {}
40
+ };
41
+
42
+ } // namespace margelo::nitro::rncandle
43
+
44
+ namespace margelo::nitro {
45
+
46
+ using namespace margelo::nitro::rncandle;
47
+
48
+ // C++ UserCounterparty <> JS UserCounterparty (object)
49
+ template <>
50
+ struct JSIConverter<UserCounterparty> final {
51
+ static inline UserCounterparty fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
52
+ jsi::Object obj = arg.asObject(runtime);
53
+ return UserCounterparty(
54
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "kind")),
55
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "legalName")),
56
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "avatarURL")),
57
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "username"))
58
+ );
59
+ }
60
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const UserCounterparty& arg) {
61
+ jsi::Object obj(runtime);
62
+ obj.setProperty(runtime, "kind", JSIConverter<std::string>::toJSI(runtime, arg.kind));
63
+ obj.setProperty(runtime, "legalName", JSIConverter<std::string>::toJSI(runtime, arg.legalName));
64
+ obj.setProperty(runtime, "avatarURL", JSIConverter<std::string>::toJSI(runtime, arg.avatarURL));
65
+ obj.setProperty(runtime, "username", JSIConverter<std::string>::toJSI(runtime, arg.username));
66
+ return obj;
67
+ }
68
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
69
+ if (!value.isObject()) {
70
+ return false;
71
+ }
72
+ jsi::Object obj = value.getObject(runtime);
73
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "kind"))) return false;
74
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "legalName"))) return false;
75
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "avatarURL"))) return false;
76
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "username"))) return false;
77
+ return true;
78
+ }
79
+ };
80
+
81
+ } // namespace margelo::nitro
@@ -0,0 +1,73 @@
1
+ ///
2
+ /// WireDetails.hpp
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
+ #pragma once
9
+
10
+ #if __has_include(<NitroModules/JSIConverter.hpp>)
11
+ #include <NitroModules/JSIConverter.hpp>
12
+ #else
13
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
+ #endif
15
+ #if __has_include(<NitroModules/NitroDefines.hpp>)
16
+ #include <NitroModules/NitroDefines.hpp>
17
+ #else
18
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
+ #endif
20
+
21
+
22
+
23
+ #include <string>
24
+
25
+ namespace margelo::nitro::rncandle {
26
+
27
+ /**
28
+ * A struct which can be represented as a JavaScript object (WireDetails).
29
+ */
30
+ struct WireDetails {
31
+ public:
32
+ std::string accountNumber SWIFT_PRIVATE;
33
+ std::string routingNumber SWIFT_PRIVATE;
34
+
35
+ public:
36
+ WireDetails() = default;
37
+ explicit WireDetails(std::string accountNumber, std::string routingNumber): accountNumber(accountNumber), routingNumber(routingNumber) {}
38
+ };
39
+
40
+ } // namespace margelo::nitro::rncandle
41
+
42
+ namespace margelo::nitro {
43
+
44
+ using namespace margelo::nitro::rncandle;
45
+
46
+ // C++ WireDetails <> JS WireDetails (object)
47
+ template <>
48
+ struct JSIConverter<WireDetails> final {
49
+ static inline WireDetails fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
50
+ jsi::Object obj = arg.asObject(runtime);
51
+ return WireDetails(
52
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "accountNumber")),
53
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "routingNumber"))
54
+ );
55
+ }
56
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const WireDetails& arg) {
57
+ jsi::Object obj(runtime);
58
+ obj.setProperty(runtime, "accountNumber", JSIConverter<std::string>::toJSI(runtime, arg.accountNumber));
59
+ obj.setProperty(runtime, "routingNumber", JSIConverter<std::string>::toJSI(runtime, arg.routingNumber));
60
+ return obj;
61
+ }
62
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
63
+ if (!value.isObject()) {
64
+ return false;
65
+ }
66
+ jsi::Object obj = value.getObject(runtime);
67
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "accountNumber"))) return false;
68
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "routingNumber"))) return false;
69
+ return true;
70
+ }
71
+ };
72
+
73
+ } // namespace margelo::nitro
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-candle",
3
- "version": "0.1.16",
3
+ "version": "0.1.18",
4
4
  "description": "Candle SDK for React Native",
5
5
  "main": "./lib/commonjs/index.js",
6
6
  "module": "./lib/module/index.js",