react-native-candle 0.1.43 → 0.1.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ReactNativeCandle.podspec +1 -1
- package/ios/Sources/CandleActionViewModel.swift +4 -7
- package/ios/Sources/CandleLinkSheetWrapperView.swift +40 -59
- package/ios/Sources/CandleLinkViewModel.swift +21 -31
- package/ios/Sources/CandleTradeExecutionSheetWrapper.swift +14 -23
- package/ios/Sources/HostingViewController.swift +26 -26
- package/ios/Sources/RNCandle.swift +159 -1307
- package/ios/Sources/Types.swift +847 -0
- package/ios/Sources/UIApplication++.swift +5 -9
- package/lib/commonjs/context.js +17 -0
- package/lib/commonjs/context.js.map +1 -0
- package/lib/commonjs/index.js +17 -407
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/provider.js +117 -0
- package/lib/commonjs/provider.js.map +1 -0
- package/lib/commonjs/types.js +271 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/module/context.js +12 -0
- package/lib/module/context.js.map +1 -0
- package/lib/module/index.js +2 -408
- package/lib/module/index.js.map +1 -1
- package/lib/module/package.json +1 -0
- package/lib/module/provider.js +111 -0
- package/lib/module/provider.js.map +1 -0
- package/lib/module/types.js +256 -0
- package/lib/module/types.js.map +1 -0
- package/lib/typescript/commonjs/src/context.d.ts +47 -0
- package/lib/typescript/commonjs/src/context.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +4 -166
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/provider.d.ts +8 -0
- package/lib/typescript/commonjs/src/provider.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/specs/RNCandle.nitro.d.ts +22 -24
- package/lib/typescript/commonjs/src/specs/RNCandle.nitro.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types.d.ts +125 -0
- package/lib/typescript/commonjs/src/types.d.ts.map +1 -0
- package/lib/typescript/module/src/context.d.ts +47 -0
- package/lib/typescript/module/src/context.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +4 -166
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/provider.d.ts +8 -0
- package/lib/typescript/module/src/provider.d.ts.map +1 -0
- package/lib/typescript/module/src/specs/RNCandle.nitro.d.ts +22 -24
- package/lib/typescript/module/src/specs/RNCandle.nitro.d.ts.map +1 -1
- package/lib/typescript/module/src/types.d.ts +125 -0
- package/lib/typescript/module/src/types.d.ts.map +1 -0
- package/nitrogen/generated/.gitattributes +1 -1
- package/nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Bridge.cpp +15 -31
- package/nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Bridge.hpp +379 -242
- package/nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Umbrella.hpp +23 -22
- package/nitrogen/generated/ios/ReactNativeCandleAutolinking.mm +1 -1
- package/nitrogen/generated/ios/ReactNativeCandleAutolinking.swift +2 -4
- package/nitrogen/generated/ios/c++/HybridRNCandleSpecSwift.hpp +36 -42
- package/nitrogen/generated/ios/swift/ActiveLinkedAccountDetails.swift +6 -3
- package/nitrogen/generated/ios/swift/AssetAccount.swift +6 -3
- package/nitrogen/generated/ios/swift/AssetAccountKind.swift +4 -4
- package/nitrogen/generated/ios/swift/AssetAccountRef.swift +5 -5
- package/nitrogen/generated/ios/swift/{AssetAccountQuery.swift → AssetAccountsQuery.swift} +7 -6
- package/nitrogen/generated/ios/swift/Counterparty.swift +8 -3
- package/nitrogen/generated/ios/swift/CounterpartyKind.swift +42 -0
- package/nitrogen/generated/ios/swift/FiatAccount.swift +4 -2
- package/nitrogen/generated/ios/swift/FiatAsset.swift +2 -1
- package/nitrogen/generated/ios/swift/FiatAssetQuoteRequest.swift +4 -2
- package/nitrogen/generated/ios/swift/FiatAssetRef.swift +2 -1
- package/nitrogen/generated/ios/swift/Func_void_LinkedAccount.swift +5 -5
- package/nitrogen/generated/ios/swift/HybridRNCandleSpec.swift +7 -7
- package/nitrogen/generated/ios/swift/HybridRNCandleSpec_cxx.swift +40 -65
- package/nitrogen/generated/ios/swift/LinkedAccountDetails.swift +15 -3
- package/nitrogen/generated/ios/swift/{StatePayload.swift → LinkedAccountState.swift} +6 -6
- package/nitrogen/generated/ios/swift/LinkedAccountStatusRef.swift +4 -3
- package/nitrogen/generated/ios/swift/MarketAccount.swift +5 -5
- package/nitrogen/generated/ios/swift/MarketAssetKind.swift +38 -0
- package/nitrogen/generated/ios/swift/MarketAssetQuoteRequest.swift +11 -8
- package/nitrogen/generated/ios/swift/MarketTradeAsset.swift +7 -7
- package/nitrogen/generated/ios/swift/MarketTradeAssetRef.swift +5 -5
- package/nitrogen/generated/ios/swift/MerchantCounterparty.swift +2 -1
- package/nitrogen/generated/ios/swift/TradeAsset.swift +10 -5
- package/nitrogen/generated/ios/swift/TradeAssetKind.swift +54 -0
- package/nitrogen/generated/ios/swift/TradeAssetQuoteRequest.swift +15 -4
- package/nitrogen/generated/ios/swift/TradeAssetRef.swift +11 -5
- package/nitrogen/generated/ios/swift/TradeExecutionResult.swift +4 -2
- package/nitrogen/generated/ios/swift/{TradeQuoteRequest.swift → TradeQuotesRequest.swift} +7 -6
- package/nitrogen/generated/ios/swift/{TradeQuery.swift → TradesQuery.swift} +29 -45
- package/nitrogen/generated/ios/swift/TransportAssetQuoteRequest.swift +12 -6
- package/nitrogen/generated/shared/c++/ACHAccountKind.hpp +7 -9
- package/nitrogen/generated/shared/c++/ACHDetails.hpp +7 -9
- package/nitrogen/generated/shared/c++/ActiveLinkedAccountDetails.hpp +4 -6
- package/nitrogen/generated/shared/c++/Address.hpp +4 -6
- package/nitrogen/generated/shared/c++/AssetAccount.hpp +14 -16
- package/nitrogen/generated/shared/c++/AssetAccountKind.hpp +15 -17
- package/nitrogen/generated/shared/c++/AssetAccountRef.hpp +12 -12
- package/nitrogen/generated/shared/c++/{AssetAccountQuery.hpp → AssetAccountsQuery.hpp} +14 -16
- package/nitrogen/generated/shared/c++/AssetAccountsResponse.hpp +11 -13
- package/nitrogen/generated/shared/c++/Coordinates.hpp +4 -6
- package/nitrogen/generated/shared/c++/Counterparty.hpp +14 -16
- package/nitrogen/generated/shared/c++/CounterpartyKind.hpp +80 -0
- package/nitrogen/generated/shared/c++/FiatAccount.hpp +16 -18
- package/nitrogen/generated/shared/c++/FiatAsset.hpp +7 -9
- package/nitrogen/generated/shared/c++/FiatAssetQuoteRequest.hpp +4 -6
- package/nitrogen/generated/shared/c++/FiatAssetRef.hpp +4 -6
- package/nitrogen/generated/shared/c++/FiatMarketAccountKind.hpp +13 -15
- package/nitrogen/generated/shared/c++/HybridRNCandleSpec.cpp +1 -2
- package/nitrogen/generated/shared/c++/HybridRNCandleSpec.hpp +17 -27
- package/nitrogen/generated/shared/c++/InactiveLinkedAccountDetails.hpp +4 -6
- package/nitrogen/generated/shared/c++/LinkedAccount.hpp +10 -12
- package/nitrogen/generated/shared/c++/LinkedAccountDetails.hpp +14 -16
- package/nitrogen/generated/shared/c++/LinkedAccountRef.hpp +4 -6
- package/nitrogen/generated/shared/c++/{StatePayload.hpp → LinkedAccountState.hpp} +15 -17
- package/nitrogen/generated/shared/c++/LinkedAccountStatusRef.hpp +15 -17
- package/nitrogen/generated/shared/c++/MarketAccount.hpp +18 -17
- package/nitrogen/generated/shared/c++/MarketAssetKind.hpp +76 -0
- package/nitrogen/generated/shared/c++/MarketAssetQuoteRequest.hpp +12 -12
- package/nitrogen/generated/shared/c++/MarketTradeAsset.hpp +15 -14
- package/nitrogen/generated/shared/c++/MarketTradeAssetRef.hpp +12 -12
- package/nitrogen/generated/shared/c++/MerchantCounterparty.hpp +8 -10
- package/nitrogen/generated/shared/c++/MerchantLocation.hpp +4 -6
- package/nitrogen/generated/shared/c++/NothingAsset.hpp +4 -6
- package/nitrogen/generated/shared/c++/NothingAssetQuoteRequest.hpp +4 -6
- package/nitrogen/generated/shared/c++/NothingAssetRef.hpp +4 -6
- package/nitrogen/generated/shared/c++/OtherAsset.hpp +4 -6
- package/nitrogen/generated/shared/c++/OtherAssetRef.hpp +4 -6
- package/nitrogen/generated/shared/c++/PresentationBackground.hpp +7 -9
- package/nitrogen/generated/shared/c++/PresentationStyle.hpp +7 -9
- package/nitrogen/generated/shared/c++/Service.hpp +163 -165
- package/nitrogen/generated/shared/c++/ServiceCounterparty.hpp +7 -9
- package/nitrogen/generated/shared/c++/Trade.hpp +16 -18
- package/nitrogen/generated/shared/c++/TradeAsset.hpp +20 -22
- package/nitrogen/generated/shared/c++/TradeAssetKind.hpp +92 -0
- package/nitrogen/generated/shared/c++/TradeAssetQuoteRequest.hpp +17 -19
- package/nitrogen/generated/shared/c++/TradeAssetRef.hpp +20 -22
- package/nitrogen/generated/shared/c++/TradeExecutionResult.hpp +8 -10
- package/nitrogen/generated/shared/c++/TradeQuote.hpp +10 -12
- package/nitrogen/generated/shared/c++/{TradeQuoteRequest.hpp → TradeQuotesRequest.hpp} +17 -19
- package/nitrogen/generated/shared/c++/TradeQuotesResponse.hpp +11 -13
- package/nitrogen/generated/shared/c++/TradeRef.hpp +10 -12
- package/nitrogen/generated/shared/c++/TradeState.hpp +9 -11
- package/nitrogen/generated/shared/c++/TradesQuery.hpp +89 -0
- package/nitrogen/generated/shared/c++/TradesResponse.hpp +11 -13
- package/nitrogen/generated/shared/c++/TransportAccount.hpp +10 -12
- package/nitrogen/generated/shared/c++/TransportAccountKind.hpp +9 -11
- package/nitrogen/generated/shared/c++/TransportAsset.hpp +19 -21
- package/nitrogen/generated/shared/c++/TransportAssetQuoteRequest.hpp +16 -18
- package/nitrogen/generated/shared/c++/TransportAssetRef.hpp +4 -6
- package/nitrogen/generated/shared/c++/UnavailableLinkedAccountDetails.hpp +4 -6
- package/nitrogen/generated/shared/c++/UserCounterparty.hpp +4 -6
- package/nitrogen/generated/shared/c++/WireDetails.hpp +4 -6
- package/package.json +9 -11
- package/src/context.ts +86 -0
- package/src/index.ts +4 -634
- package/src/provider.tsx +152 -0
- package/src/specs/RNCandle.nitro.ts +38 -29
- package/src/types.ts +462 -0
- package/nitrogen/generated/ios/swift/AppUser.swift +0 -75
- package/nitrogen/generated/ios/swift/Func_void_std__string.swift +0 -44
- package/nitrogen/generated/ios/swift/Func_void_std__vector_std__shared_ptr_AnyMap__.swift +0 -47
- package/nitrogen/generated/ios/swift/ToolCall.swift +0 -44
- package/nitrogen/generated/shared/c++/AppUser.hpp +0 -78
- package/nitrogen/generated/shared/c++/ToolCall.hpp +0 -73
- package/nitrogen/generated/shared/c++/TradeQuery.hpp +0 -86
|
@@ -16,22 +16,20 @@ namespace margelo::nitro::rncandle { struct ACHDetails; }
|
|
|
16
16
|
namespace margelo::nitro::rncandle { struct ActiveLinkedAccountDetails; }
|
|
17
17
|
// Forward declaration of `Address` to properly resolve imports.
|
|
18
18
|
namespace margelo::nitro::rncandle { struct Address; }
|
|
19
|
-
// Forward declaration of `AnyMap` to properly resolve imports.
|
|
20
|
-
namespace NitroModules { class AnyMap; }
|
|
21
|
-
// Forward declaration of `AppUser` to properly resolve imports.
|
|
22
|
-
namespace margelo::nitro::rncandle { struct AppUser; }
|
|
23
19
|
// Forward declaration of `AssetAccountKind` to properly resolve imports.
|
|
24
20
|
namespace margelo::nitro::rncandle { enum class AssetAccountKind; }
|
|
25
|
-
// Forward declaration of `AssetAccountQuery` to properly resolve imports.
|
|
26
|
-
namespace margelo::nitro::rncandle { struct AssetAccountQuery; }
|
|
27
21
|
// Forward declaration of `AssetAccountRef` to properly resolve imports.
|
|
28
22
|
namespace margelo::nitro::rncandle { struct AssetAccountRef; }
|
|
29
23
|
// Forward declaration of `AssetAccount` to properly resolve imports.
|
|
30
24
|
namespace margelo::nitro::rncandle { struct AssetAccount; }
|
|
25
|
+
// Forward declaration of `AssetAccountsQuery` to properly resolve imports.
|
|
26
|
+
namespace margelo::nitro::rncandle { struct AssetAccountsQuery; }
|
|
31
27
|
// Forward declaration of `AssetAccountsResponse` to properly resolve imports.
|
|
32
28
|
namespace margelo::nitro::rncandle { struct AssetAccountsResponse; }
|
|
33
29
|
// Forward declaration of `Coordinates` to properly resolve imports.
|
|
34
30
|
namespace margelo::nitro::rncandle { struct Coordinates; }
|
|
31
|
+
// Forward declaration of `CounterpartyKind` to properly resolve imports.
|
|
32
|
+
namespace margelo::nitro::rncandle { enum class CounterpartyKind; }
|
|
35
33
|
// Forward declaration of `Counterparty` to properly resolve imports.
|
|
36
34
|
namespace margelo::nitro::rncandle { struct Counterparty; }
|
|
37
35
|
// Forward declaration of `FiatAccount` to properly resolve imports.
|
|
@@ -52,12 +50,16 @@ namespace margelo::nitro::rncandle { struct InactiveLinkedAccountDetails; }
|
|
|
52
50
|
namespace margelo::nitro::rncandle { struct LinkedAccountDetails; }
|
|
53
51
|
// Forward declaration of `LinkedAccountRef` to properly resolve imports.
|
|
54
52
|
namespace margelo::nitro::rncandle { struct LinkedAccountRef; }
|
|
53
|
+
// Forward declaration of `LinkedAccountState` to properly resolve imports.
|
|
54
|
+
namespace margelo::nitro::rncandle { enum class LinkedAccountState; }
|
|
55
55
|
// Forward declaration of `LinkedAccountStatusRef` to properly resolve imports.
|
|
56
56
|
namespace margelo::nitro::rncandle { struct LinkedAccountStatusRef; }
|
|
57
57
|
// Forward declaration of `LinkedAccount` to properly resolve imports.
|
|
58
58
|
namespace margelo::nitro::rncandle { struct LinkedAccount; }
|
|
59
59
|
// Forward declaration of `MarketAccount` to properly resolve imports.
|
|
60
60
|
namespace margelo::nitro::rncandle { struct MarketAccount; }
|
|
61
|
+
// Forward declaration of `MarketAssetKind` to properly resolve imports.
|
|
62
|
+
namespace margelo::nitro::rncandle { enum class MarketAssetKind; }
|
|
61
63
|
// Forward declaration of `MarketAssetQuoteRequest` to properly resolve imports.
|
|
62
64
|
namespace margelo::nitro::rncandle { struct MarketAssetQuoteRequest; }
|
|
63
65
|
// Forward declaration of `MarketTradeAssetRef` to properly resolve imports.
|
|
@@ -86,10 +88,8 @@ namespace margelo::nitro::rncandle { enum class PresentationStyle; }
|
|
|
86
88
|
namespace margelo::nitro::rncandle { struct ServiceCounterparty; }
|
|
87
89
|
// Forward declaration of `Service` to properly resolve imports.
|
|
88
90
|
namespace margelo::nitro::rncandle { enum class Service; }
|
|
89
|
-
// Forward declaration of `
|
|
90
|
-
namespace margelo::nitro::rncandle { enum class
|
|
91
|
-
// Forward declaration of `ToolCall` to properly resolve imports.
|
|
92
|
-
namespace margelo::nitro::rncandle { struct ToolCall; }
|
|
91
|
+
// Forward declaration of `TradeAssetKind` to properly resolve imports.
|
|
92
|
+
namespace margelo::nitro::rncandle { enum class TradeAssetKind; }
|
|
93
93
|
// Forward declaration of `TradeAssetQuoteRequest` to properly resolve imports.
|
|
94
94
|
namespace margelo::nitro::rncandle { struct TradeAssetQuoteRequest; }
|
|
95
95
|
// Forward declaration of `TradeAssetRef` to properly resolve imports.
|
|
@@ -98,12 +98,10 @@ namespace margelo::nitro::rncandle { struct TradeAssetRef; }
|
|
|
98
98
|
namespace margelo::nitro::rncandle { struct TradeAsset; }
|
|
99
99
|
// Forward declaration of `TradeExecutionResult` to properly resolve imports.
|
|
100
100
|
namespace margelo::nitro::rncandle { struct TradeExecutionResult; }
|
|
101
|
-
// Forward declaration of `TradeQuery` to properly resolve imports.
|
|
102
|
-
namespace margelo::nitro::rncandle { struct TradeQuery; }
|
|
103
|
-
// Forward declaration of `TradeQuoteRequest` to properly resolve imports.
|
|
104
|
-
namespace margelo::nitro::rncandle { struct TradeQuoteRequest; }
|
|
105
101
|
// Forward declaration of `TradeQuote` to properly resolve imports.
|
|
106
102
|
namespace margelo::nitro::rncandle { struct TradeQuote; }
|
|
103
|
+
// Forward declaration of `TradeQuotesRequest` to properly resolve imports.
|
|
104
|
+
namespace margelo::nitro::rncandle { struct TradeQuotesRequest; }
|
|
107
105
|
// Forward declaration of `TradeQuotesResponse` to properly resolve imports.
|
|
108
106
|
namespace margelo::nitro::rncandle { struct TradeQuotesResponse; }
|
|
109
107
|
// Forward declaration of `TradeRef` to properly resolve imports.
|
|
@@ -112,6 +110,8 @@ namespace margelo::nitro::rncandle { struct TradeRef; }
|
|
|
112
110
|
namespace margelo::nitro::rncandle { enum class TradeState; }
|
|
113
111
|
// Forward declaration of `Trade` to properly resolve imports.
|
|
114
112
|
namespace margelo::nitro::rncandle { struct Trade; }
|
|
113
|
+
// Forward declaration of `TradesQuery` to properly resolve imports.
|
|
114
|
+
namespace margelo::nitro::rncandle { struct TradesQuery; }
|
|
115
115
|
// Forward declaration of `TradesResponse` to properly resolve imports.
|
|
116
116
|
namespace margelo::nitro::rncandle { struct TradesResponse; }
|
|
117
117
|
// Forward declaration of `TransportAccountKind` to properly resolve imports.
|
|
@@ -136,14 +136,14 @@ namespace margelo::nitro::rncandle { struct WireDetails; }
|
|
|
136
136
|
#include "ACHDetails.hpp"
|
|
137
137
|
#include "ActiveLinkedAccountDetails.hpp"
|
|
138
138
|
#include "Address.hpp"
|
|
139
|
-
#include "AppUser.hpp"
|
|
140
139
|
#include "AssetAccount.hpp"
|
|
141
140
|
#include "AssetAccountKind.hpp"
|
|
142
|
-
#include "AssetAccountQuery.hpp"
|
|
143
141
|
#include "AssetAccountRef.hpp"
|
|
142
|
+
#include "AssetAccountsQuery.hpp"
|
|
144
143
|
#include "AssetAccountsResponse.hpp"
|
|
145
144
|
#include "Coordinates.hpp"
|
|
146
145
|
#include "Counterparty.hpp"
|
|
146
|
+
#include "CounterpartyKind.hpp"
|
|
147
147
|
#include "FiatAccount.hpp"
|
|
148
148
|
#include "FiatAsset.hpp"
|
|
149
149
|
#include "FiatAssetQuoteRequest.hpp"
|
|
@@ -154,8 +154,10 @@ namespace margelo::nitro::rncandle { struct WireDetails; }
|
|
|
154
154
|
#include "LinkedAccount.hpp"
|
|
155
155
|
#include "LinkedAccountDetails.hpp"
|
|
156
156
|
#include "LinkedAccountRef.hpp"
|
|
157
|
+
#include "LinkedAccountState.hpp"
|
|
157
158
|
#include "LinkedAccountStatusRef.hpp"
|
|
158
159
|
#include "MarketAccount.hpp"
|
|
160
|
+
#include "MarketAssetKind.hpp"
|
|
159
161
|
#include "MarketAssetQuoteRequest.hpp"
|
|
160
162
|
#include "MarketTradeAsset.hpp"
|
|
161
163
|
#include "MarketTradeAssetRef.hpp"
|
|
@@ -170,19 +172,18 @@ namespace margelo::nitro::rncandle { struct WireDetails; }
|
|
|
170
172
|
#include "PresentationStyle.hpp"
|
|
171
173
|
#include "Service.hpp"
|
|
172
174
|
#include "ServiceCounterparty.hpp"
|
|
173
|
-
#include "StatePayload.hpp"
|
|
174
|
-
#include "ToolCall.hpp"
|
|
175
175
|
#include "Trade.hpp"
|
|
176
176
|
#include "TradeAsset.hpp"
|
|
177
|
+
#include "TradeAssetKind.hpp"
|
|
177
178
|
#include "TradeAssetQuoteRequest.hpp"
|
|
178
179
|
#include "TradeAssetRef.hpp"
|
|
179
180
|
#include "TradeExecutionResult.hpp"
|
|
180
|
-
#include "TradeQuery.hpp"
|
|
181
181
|
#include "TradeQuote.hpp"
|
|
182
|
-
#include "
|
|
182
|
+
#include "TradeQuotesRequest.hpp"
|
|
183
183
|
#include "TradeQuotesResponse.hpp"
|
|
184
184
|
#include "TradeRef.hpp"
|
|
185
185
|
#include "TradeState.hpp"
|
|
186
|
+
#include "TradesQuery.hpp"
|
|
186
187
|
#include "TradesResponse.hpp"
|
|
187
188
|
#include "TransportAccount.hpp"
|
|
188
189
|
#include "TransportAccountKind.hpp"
|
|
@@ -192,7 +193,6 @@ namespace margelo::nitro::rncandle { struct WireDetails; }
|
|
|
192
193
|
#include "UnavailableLinkedAccountDetails.hpp"
|
|
193
194
|
#include "UserCounterparty.hpp"
|
|
194
195
|
#include "WireDetails.hpp"
|
|
195
|
-
#include <NitroModules/AnyMap.hpp>
|
|
196
196
|
#include <NitroModules/Promise.hpp>
|
|
197
197
|
#include <NitroModules/Result.hpp>
|
|
198
198
|
#include <exception>
|
|
@@ -207,8 +207,9 @@ namespace margelo::nitro::rncandle { struct WireDetails; }
|
|
|
207
207
|
|
|
208
208
|
// Common C++ types used in Swift
|
|
209
209
|
#include <NitroModules/ArrayBufferHolder.hpp>
|
|
210
|
-
#include <NitroModules/
|
|
210
|
+
#include <NitroModules/AnyMapUtils.hpp>
|
|
211
211
|
#include <NitroModules/RuntimeError.hpp>
|
|
212
|
+
#include <NitroModules/DateToChronoDate.hpp>
|
|
212
213
|
|
|
213
214
|
// Forward declarations of Swift defined types
|
|
214
215
|
// Forward declaration of `HybridRNCandleSpec_cxx` to properly resolve imports.
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
25
25
|
"RNCandle",
|
|
26
26
|
[]() -> std::shared_ptr<HybridObject> {
|
|
27
|
-
std::shared_ptr<
|
|
27
|
+
std::shared_ptr<HybridRNCandleSpec> hybridObject = ReactNativeCandle::ReactNativeCandleAutolinking::createRNCandle();
|
|
28
28
|
return hybridObject;
|
|
29
29
|
}
|
|
30
30
|
);
|
|
@@ -15,11 +15,9 @@ public final class ReactNativeCandleAutolinking {
|
|
|
15
15
|
* This is generated by Nitrogen and will initialize the class specified
|
|
16
16
|
* in the `"autolinking"` property of `nitro.json` (in this case, `HybridRNCandle`).
|
|
17
17
|
*/
|
|
18
|
-
public static func createRNCandle()
|
|
19
|
-
-> bridge.std__shared_ptr_margelo__nitro__rncandle__HybridRNCandleSpec_
|
|
20
|
-
{
|
|
18
|
+
public static func createRNCandle() -> bridge.std__shared_ptr_HybridRNCandleSpec_ {
|
|
21
19
|
let hybridObject = HybridRNCandle()
|
|
22
|
-
return { () -> bridge.
|
|
20
|
+
return { () -> bridge.std__shared_ptr_HybridRNCandleSpec_ in
|
|
23
21
|
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
24
22
|
return __cxxWrapped.getCxxPart()
|
|
25
23
|
}()
|
|
@@ -36,6 +36,8 @@ namespace margelo::nitro::rncandle { struct TradeAsset; }
|
|
|
36
36
|
namespace margelo::nitro::rncandle { struct FiatAsset; }
|
|
37
37
|
// Forward declaration of `MarketTradeAsset` to properly resolve imports.
|
|
38
38
|
namespace margelo::nitro::rncandle { struct MarketTradeAsset; }
|
|
39
|
+
// Forward declaration of `MarketAssetKind` to properly resolve imports.
|
|
40
|
+
namespace margelo::nitro::rncandle { enum class MarketAssetKind; }
|
|
39
41
|
// Forward declaration of `TransportAsset` to properly resolve imports.
|
|
40
42
|
namespace margelo::nitro::rncandle { struct TransportAsset; }
|
|
41
43
|
// Forward declaration of `Coordinates` to properly resolve imports.
|
|
@@ -62,16 +64,14 @@ namespace margelo::nitro::rncandle { struct MerchantLocation; }
|
|
|
62
64
|
namespace margelo::nitro::rncandle { struct UserCounterparty; }
|
|
63
65
|
// Forward declaration of `ServiceCounterparty` to properly resolve imports.
|
|
64
66
|
namespace margelo::nitro::rncandle { struct ServiceCounterparty; }
|
|
65
|
-
// Forward declaration of `AppUser` to properly resolve imports.
|
|
66
|
-
namespace margelo::nitro::rncandle { struct AppUser; }
|
|
67
67
|
// Forward declaration of `LinkedAccountRef` to properly resolve imports.
|
|
68
68
|
namespace margelo::nitro::rncandle { struct LinkedAccountRef; }
|
|
69
69
|
// Forward declaration of `AssetAccountsResponse` to properly resolve imports.
|
|
70
70
|
namespace margelo::nitro::rncandle { struct AssetAccountsResponse; }
|
|
71
71
|
// Forward declaration of `LinkedAccountStatusRef` to properly resolve imports.
|
|
72
72
|
namespace margelo::nitro::rncandle { struct LinkedAccountStatusRef; }
|
|
73
|
-
// Forward declaration of `
|
|
74
|
-
namespace margelo::nitro::rncandle { enum class
|
|
73
|
+
// Forward declaration of `LinkedAccountState` to properly resolve imports.
|
|
74
|
+
namespace margelo::nitro::rncandle { enum class LinkedAccountState; }
|
|
75
75
|
// Forward declaration of `AssetAccount` to properly resolve imports.
|
|
76
76
|
namespace margelo::nitro::rncandle { struct AssetAccount; }
|
|
77
77
|
// Forward declaration of `FiatAccount` to properly resolve imports.
|
|
@@ -90,16 +90,20 @@ namespace margelo::nitro::rncandle { struct MarketAccount; }
|
|
|
90
90
|
namespace margelo::nitro::rncandle { struct TransportAccount; }
|
|
91
91
|
// Forward declaration of `TransportAccountKind` to properly resolve imports.
|
|
92
92
|
namespace margelo::nitro::rncandle { enum class TransportAccountKind; }
|
|
93
|
-
// Forward declaration of `
|
|
94
|
-
namespace margelo::nitro::rncandle { struct
|
|
93
|
+
// Forward declaration of `AssetAccountsQuery` to properly resolve imports.
|
|
94
|
+
namespace margelo::nitro::rncandle { struct AssetAccountsQuery; }
|
|
95
95
|
// Forward declaration of `AssetAccountKind` to properly resolve imports.
|
|
96
96
|
namespace margelo::nitro::rncandle { enum class AssetAccountKind; }
|
|
97
97
|
// Forward declaration of `AssetAccountRef` to properly resolve imports.
|
|
98
98
|
namespace margelo::nitro::rncandle { struct AssetAccountRef; }
|
|
99
99
|
// Forward declaration of `TradesResponse` to properly resolve imports.
|
|
100
100
|
namespace margelo::nitro::rncandle { struct TradesResponse; }
|
|
101
|
-
// Forward declaration of `
|
|
102
|
-
namespace margelo::nitro::rncandle { struct
|
|
101
|
+
// Forward declaration of `TradesQuery` to properly resolve imports.
|
|
102
|
+
namespace margelo::nitro::rncandle { struct TradesQuery; }
|
|
103
|
+
// Forward declaration of `TradeAssetKind` to properly resolve imports.
|
|
104
|
+
namespace margelo::nitro::rncandle { enum class TradeAssetKind; }
|
|
105
|
+
// Forward declaration of `CounterpartyKind` to properly resolve imports.
|
|
106
|
+
namespace margelo::nitro::rncandle { enum class CounterpartyKind; }
|
|
103
107
|
// Forward declaration of `TradeRef` to properly resolve imports.
|
|
104
108
|
namespace margelo::nitro::rncandle { struct TradeRef; }
|
|
105
109
|
// Forward declaration of `TradeAssetRef` to properly resolve imports.
|
|
@@ -116,8 +120,8 @@ namespace margelo::nitro::rncandle { struct OtherAssetRef; }
|
|
|
116
120
|
namespace margelo::nitro::rncandle { struct NothingAssetRef; }
|
|
117
121
|
// Forward declaration of `TradeQuotesResponse` to properly resolve imports.
|
|
118
122
|
namespace margelo::nitro::rncandle { struct TradeQuotesResponse; }
|
|
119
|
-
// Forward declaration of `
|
|
120
|
-
namespace margelo::nitro::rncandle { struct
|
|
123
|
+
// Forward declaration of `TradeQuotesRequest` to properly resolve imports.
|
|
124
|
+
namespace margelo::nitro::rncandle { struct TradeQuotesRequest; }
|
|
121
125
|
// Forward declaration of `TradeAssetQuoteRequest` to properly resolve imports.
|
|
122
126
|
namespace margelo::nitro::rncandle { struct TradeAssetQuoteRequest; }
|
|
123
127
|
// Forward declaration of `FiatAssetQuoteRequest` to properly resolve imports.
|
|
@@ -128,19 +132,15 @@ namespace margelo::nitro::rncandle { struct MarketAssetQuoteRequest; }
|
|
|
128
132
|
namespace margelo::nitro::rncandle { struct TransportAssetQuoteRequest; }
|
|
129
133
|
// Forward declaration of `NothingAssetQuoteRequest` to properly resolve imports.
|
|
130
134
|
namespace margelo::nitro::rncandle { struct NothingAssetQuoteRequest; }
|
|
131
|
-
// Forward declaration of `AnyMap` to properly resolve imports.
|
|
132
|
-
namespace NitroModules { class AnyMap; }
|
|
133
|
-
// Forward declaration of `ToolCall` to properly resolve imports.
|
|
134
|
-
namespace margelo::nitro::rncandle { struct ToolCall; }
|
|
135
135
|
|
|
136
|
-
#include <optional>
|
|
137
|
-
#include <vector>
|
|
138
136
|
#include "Service.hpp"
|
|
137
|
+
#include <vector>
|
|
138
|
+
#include <optional>
|
|
139
139
|
#include <string>
|
|
140
140
|
#include "PresentationBackground.hpp"
|
|
141
141
|
#include "PresentationStyle.hpp"
|
|
142
|
-
#include <functional>
|
|
143
142
|
#include "LinkedAccount.hpp"
|
|
143
|
+
#include <functional>
|
|
144
144
|
#include "LinkedAccountDetails.hpp"
|
|
145
145
|
#include "ActiveLinkedAccountDetails.hpp"
|
|
146
146
|
#include "InactiveLinkedAccountDetails.hpp"
|
|
@@ -149,6 +149,7 @@ namespace margelo::nitro::rncandle { struct ToolCall; }
|
|
|
149
149
|
#include "TradeAsset.hpp"
|
|
150
150
|
#include "FiatAsset.hpp"
|
|
151
151
|
#include "MarketTradeAsset.hpp"
|
|
152
|
+
#include "MarketAssetKind.hpp"
|
|
152
153
|
#include "TransportAsset.hpp"
|
|
153
154
|
#include "Coordinates.hpp"
|
|
154
155
|
#include "Address.hpp"
|
|
@@ -162,12 +163,11 @@ namespace margelo::nitro::rncandle { struct ToolCall; }
|
|
|
162
163
|
#include "MerchantLocation.hpp"
|
|
163
164
|
#include "UserCounterparty.hpp"
|
|
164
165
|
#include "ServiceCounterparty.hpp"
|
|
165
|
-
#include "AppUser.hpp"
|
|
166
166
|
#include <NitroModules/Promise.hpp>
|
|
167
167
|
#include "LinkedAccountRef.hpp"
|
|
168
168
|
#include "AssetAccountsResponse.hpp"
|
|
169
169
|
#include "LinkedAccountStatusRef.hpp"
|
|
170
|
-
#include "
|
|
170
|
+
#include "LinkedAccountState.hpp"
|
|
171
171
|
#include "AssetAccount.hpp"
|
|
172
172
|
#include "FiatAccount.hpp"
|
|
173
173
|
#include "FiatMarketAccountKind.hpp"
|
|
@@ -177,11 +177,13 @@ namespace margelo::nitro::rncandle { struct ToolCall; }
|
|
|
177
177
|
#include "MarketAccount.hpp"
|
|
178
178
|
#include "TransportAccount.hpp"
|
|
179
179
|
#include "TransportAccountKind.hpp"
|
|
180
|
-
#include "
|
|
180
|
+
#include "AssetAccountsQuery.hpp"
|
|
181
181
|
#include "AssetAccountKind.hpp"
|
|
182
182
|
#include "AssetAccountRef.hpp"
|
|
183
183
|
#include "TradesResponse.hpp"
|
|
184
|
-
#include "
|
|
184
|
+
#include "TradesQuery.hpp"
|
|
185
|
+
#include "TradeAssetKind.hpp"
|
|
186
|
+
#include "CounterpartyKind.hpp"
|
|
185
187
|
#include "TradeRef.hpp"
|
|
186
188
|
#include "TradeAssetRef.hpp"
|
|
187
189
|
#include "FiatAssetRef.hpp"
|
|
@@ -190,14 +192,12 @@ namespace margelo::nitro::rncandle { struct ToolCall; }
|
|
|
190
192
|
#include "OtherAssetRef.hpp"
|
|
191
193
|
#include "NothingAssetRef.hpp"
|
|
192
194
|
#include "TradeQuotesResponse.hpp"
|
|
193
|
-
#include "
|
|
195
|
+
#include "TradeQuotesRequest.hpp"
|
|
194
196
|
#include "TradeAssetQuoteRequest.hpp"
|
|
195
197
|
#include "FiatAssetQuoteRequest.hpp"
|
|
196
198
|
#include "MarketAssetQuoteRequest.hpp"
|
|
197
199
|
#include "TransportAssetQuoteRequest.hpp"
|
|
198
200
|
#include "NothingAssetQuoteRequest.hpp"
|
|
199
|
-
#include <NitroModules/AnyMap.hpp>
|
|
200
|
-
#include "ToolCall.hpp"
|
|
201
201
|
|
|
202
202
|
#include "ReactNativeCandle-Swift-Cxx-Umbrella.hpp"
|
|
203
203
|
|
|
@@ -227,10 +227,12 @@ namespace margelo::nitro::rncandle {
|
|
|
227
227
|
}
|
|
228
228
|
|
|
229
229
|
public:
|
|
230
|
-
// Get memory pressure
|
|
231
230
|
inline size_t getExternalMemorySize() noexcept override {
|
|
232
231
|
return _swiftPart.getMemorySize();
|
|
233
232
|
}
|
|
233
|
+
void dispose() noexcept override {
|
|
234
|
+
_swiftPart.dispose();
|
|
235
|
+
}
|
|
234
236
|
|
|
235
237
|
public:
|
|
236
238
|
// Properties
|
|
@@ -250,8 +252,8 @@ namespace margelo::nitro::rncandle {
|
|
|
250
252
|
std::rethrow_exception(__result.error());
|
|
251
253
|
}
|
|
252
254
|
}
|
|
253
|
-
inline void initialize(const
|
|
254
|
-
auto __result = _swiftPart.initialize(
|
|
255
|
+
inline void initialize(const std::string& appKey, const std::string& appSecret, const std::optional<std::string>& accessGroup) override {
|
|
256
|
+
auto __result = _swiftPart.initialize(appKey, appSecret, accessGroup);
|
|
255
257
|
if (__result.hasError()) [[unlikely]] {
|
|
256
258
|
std::rethrow_exception(__result.error());
|
|
257
259
|
}
|
|
@@ -280,7 +282,7 @@ namespace margelo::nitro::rncandle {
|
|
|
280
282
|
auto __value = std::move(__result.value());
|
|
281
283
|
return __value;
|
|
282
284
|
}
|
|
283
|
-
inline std::shared_ptr<Promise<AssetAccountsResponse>> getAssetAccounts(const
|
|
285
|
+
inline std::shared_ptr<Promise<AssetAccountsResponse>> getAssetAccounts(const AssetAccountsQuery& query) override {
|
|
284
286
|
auto __result = _swiftPart.getAssetAccounts(query);
|
|
285
287
|
if (__result.hasError()) [[unlikely]] {
|
|
286
288
|
std::rethrow_exception(__result.error());
|
|
@@ -296,7 +298,7 @@ namespace margelo::nitro::rncandle {
|
|
|
296
298
|
auto __value = std::move(__result.value());
|
|
297
299
|
return __value;
|
|
298
300
|
}
|
|
299
|
-
inline std::shared_ptr<Promise<TradesResponse>> getTrades(const
|
|
301
|
+
inline std::shared_ptr<Promise<TradesResponse>> getTrades(const TradesQuery& query) override {
|
|
300
302
|
auto __result = _swiftPart.getTrades(query);
|
|
301
303
|
if (__result.hasError()) [[unlikely]] {
|
|
302
304
|
std::rethrow_exception(__result.error());
|
|
@@ -312,7 +314,7 @@ namespace margelo::nitro::rncandle {
|
|
|
312
314
|
auto __value = std::move(__result.value());
|
|
313
315
|
return __value;
|
|
314
316
|
}
|
|
315
|
-
inline std::shared_ptr<Promise<TradeQuotesResponse>> getTradeQuotes(const
|
|
317
|
+
inline std::shared_ptr<Promise<TradeQuotesResponse>> getTradeQuotes(const TradeQuotesRequest& request) override {
|
|
316
318
|
auto __result = _swiftPart.getTradeQuotes(request);
|
|
317
319
|
if (__result.hasError()) [[unlikely]] {
|
|
318
320
|
std::rethrow_exception(__result.error());
|
|
@@ -320,24 +322,16 @@ namespace margelo::nitro::rncandle {
|
|
|
320
322
|
auto __value = std::move(__result.value());
|
|
321
323
|
return __value;
|
|
322
324
|
}
|
|
323
|
-
inline std::shared_ptr<Promise<void>>
|
|
324
|
-
auto __result = _swiftPart.
|
|
325
|
+
inline std::shared_ptr<Promise<void>> createUser(const std::string& appUserID) override {
|
|
326
|
+
auto __result = _swiftPart.createUser(appUserID);
|
|
325
327
|
if (__result.hasError()) [[unlikely]] {
|
|
326
328
|
std::rethrow_exception(__result.error());
|
|
327
329
|
}
|
|
328
330
|
auto __value = std::move(__result.value());
|
|
329
331
|
return __value;
|
|
330
332
|
}
|
|
331
|
-
inline std::shared_ptr<Promise<
|
|
332
|
-
auto __result = _swiftPart.
|
|
333
|
-
if (__result.hasError()) [[unlikely]] {
|
|
334
|
-
std::rethrow_exception(__result.error());
|
|
335
|
-
}
|
|
336
|
-
auto __value = std::move(__result.value());
|
|
337
|
-
return __value;
|
|
338
|
-
}
|
|
339
|
-
inline std::shared_ptr<Promise<std::string>> executeTool(const ToolCall& tool) override {
|
|
340
|
-
auto __result = _swiftPart.executeTool(tool);
|
|
333
|
+
inline std::shared_ptr<Promise<void>> deleteUser() override {
|
|
334
|
+
auto __result = _swiftPart.deleteUser();
|
|
341
335
|
if (__result.hasError()) [[unlikely]] {
|
|
342
336
|
std::rethrow_exception(__result.error());
|
|
343
337
|
}
|
|
@@ -60,7 +60,8 @@ extension ActiveLinkedAccountDetails {
|
|
|
60
60
|
@inline(__always)
|
|
61
61
|
get {
|
|
62
62
|
return { () -> String? in
|
|
63
|
-
if
|
|
63
|
+
if bridge.has_value_std__optional_std__string_(self.__accountOpened) {
|
|
64
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__accountOpened)
|
|
64
65
|
return String(__unwrapped)
|
|
65
66
|
} else {
|
|
66
67
|
return nil
|
|
@@ -83,7 +84,8 @@ extension ActiveLinkedAccountDetails {
|
|
|
83
84
|
@inline(__always)
|
|
84
85
|
get {
|
|
85
86
|
return { () -> String? in
|
|
86
|
-
if
|
|
87
|
+
if bridge.has_value_std__optional_std__string_(self.__username) {
|
|
88
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__username)
|
|
87
89
|
return String(__unwrapped)
|
|
88
90
|
} else {
|
|
89
91
|
return nil
|
|
@@ -106,7 +108,8 @@ extension ActiveLinkedAccountDetails {
|
|
|
106
108
|
@inline(__always)
|
|
107
109
|
get {
|
|
108
110
|
return { () -> String? in
|
|
109
|
-
if
|
|
111
|
+
if bridge.has_value_std__optional_std__string_(self.__emailAddress) {
|
|
112
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__emailAddress)
|
|
110
113
|
return String(__unwrapped)
|
|
111
114
|
} else {
|
|
112
115
|
return nil
|
|
@@ -47,7 +47,8 @@ extension AssetAccount {
|
|
|
47
47
|
@inline(__always)
|
|
48
48
|
get {
|
|
49
49
|
return { () -> FiatAccount? in
|
|
50
|
-
if
|
|
50
|
+
if bridge.has_value_std__optional_FiatAccount_(self.__fiatAccount) {
|
|
51
|
+
let __unwrapped = bridge.get_std__optional_FiatAccount_(self.__fiatAccount)
|
|
51
52
|
return __unwrapped
|
|
52
53
|
} else {
|
|
53
54
|
return nil
|
|
@@ -70,7 +71,8 @@ extension AssetAccount {
|
|
|
70
71
|
@inline(__always)
|
|
71
72
|
get {
|
|
72
73
|
return { () -> MarketAccount? in
|
|
73
|
-
if
|
|
74
|
+
if bridge.has_value_std__optional_MarketAccount_(self.__marketAccount) {
|
|
75
|
+
let __unwrapped = bridge.get_std__optional_MarketAccount_(self.__marketAccount)
|
|
74
76
|
return __unwrapped
|
|
75
77
|
} else {
|
|
76
78
|
return nil
|
|
@@ -93,7 +95,8 @@ extension AssetAccount {
|
|
|
93
95
|
@inline(__always)
|
|
94
96
|
get {
|
|
95
97
|
return { () -> TransportAccount? in
|
|
96
|
-
if
|
|
98
|
+
if bridge.has_value_std__optional_TransportAccount_(self.__transportAccount) {
|
|
99
|
+
let __unwrapped = bridge.get_std__optional_TransportAccount_(self.__transportAccount)
|
|
97
100
|
return __unwrapped
|
|
98
101
|
} else {
|
|
99
102
|
return nil
|
|
@@ -15,12 +15,12 @@ extension AssetAccountKind {
|
|
|
15
15
|
*/
|
|
16
16
|
public init?(fromString string: String) {
|
|
17
17
|
switch string {
|
|
18
|
-
case "fiat":
|
|
19
|
-
self = .fiat
|
|
20
18
|
case "stock":
|
|
21
19
|
self = .stock
|
|
22
20
|
case "crypto":
|
|
23
21
|
self = .crypto
|
|
22
|
+
case "fiat":
|
|
23
|
+
self = .fiat
|
|
24
24
|
case "transport":
|
|
25
25
|
self = .transport
|
|
26
26
|
default:
|
|
@@ -33,12 +33,12 @@ extension AssetAccountKind {
|
|
|
33
33
|
*/
|
|
34
34
|
public var stringValue: String {
|
|
35
35
|
switch self {
|
|
36
|
-
case .fiat:
|
|
37
|
-
return "fiat"
|
|
38
36
|
case .stock:
|
|
39
37
|
return "stock"
|
|
40
38
|
case .crypto:
|
|
41
39
|
return "crypto"
|
|
40
|
+
case .fiat:
|
|
41
|
+
return "fiat"
|
|
42
42
|
case .transport:
|
|
43
43
|
return "transport"
|
|
44
44
|
}
|
|
@@ -16,8 +16,8 @@ extension AssetAccountRef {
|
|
|
16
16
|
/**
|
|
17
17
|
* Create a new instance of `AssetAccountRef`.
|
|
18
18
|
*/
|
|
19
|
-
public init(linkedAccountID: String, assetKind:
|
|
20
|
-
self.init(std.string(linkedAccountID),
|
|
19
|
+
public init(linkedAccountID: String, assetKind: AssetAccountKind, serviceAccountID: String) {
|
|
20
|
+
self.init(std.string(linkedAccountID), assetKind, std.string(serviceAccountID))
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
public var linkedAccountID: String {
|
|
@@ -31,14 +31,14 @@ extension AssetAccountRef {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
public var assetKind:
|
|
34
|
+
public var assetKind: AssetAccountKind {
|
|
35
35
|
@inline(__always)
|
|
36
36
|
get {
|
|
37
|
-
return
|
|
37
|
+
return self.__assetKind
|
|
38
38
|
}
|
|
39
39
|
@inline(__always)
|
|
40
40
|
set {
|
|
41
|
-
self.__assetKind =
|
|
41
|
+
self.__assetKind = newValue
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///
|
|
2
|
-
///
|
|
2
|
+
/// AssetAccountsQuery.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
5
|
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
|
|
8
8
|
import NitroModules
|
|
9
9
|
|
|
10
|
-
/// Represents an instance of `
|
|
11
|
-
public typealias
|
|
10
|
+
/// Represents an instance of `AssetAccountsQuery`, backed by a C++ struct.
|
|
11
|
+
public typealias AssetAccountsQuery = margelo.nitro.rncandle.AssetAccountsQuery
|
|
12
12
|
|
|
13
|
-
extension
|
|
13
|
+
extension AssetAccountsQuery {
|
|
14
14
|
private typealias bridge = margelo.nitro.rncandle.bridge.swift
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
* Create a new instance of `
|
|
17
|
+
* Create a new instance of `AssetAccountsQuery`.
|
|
18
18
|
*/
|
|
19
19
|
public init(linkedAccountIDs: String?, assetKind: AssetAccountKind?) {
|
|
20
20
|
self.init(
|
|
@@ -38,7 +38,8 @@ extension AssetAccountQuery {
|
|
|
38
38
|
@inline(__always)
|
|
39
39
|
get {
|
|
40
40
|
return { () -> String? in
|
|
41
|
-
if
|
|
41
|
+
if bridge.has_value_std__optional_std__string_(self.__linkedAccountIDs) {
|
|
42
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__linkedAccountIDs)
|
|
42
43
|
return String(__unwrapped)
|
|
43
44
|
} else {
|
|
44
45
|
return nil
|
|
@@ -48,7 +48,9 @@ extension Counterparty {
|
|
|
48
48
|
@inline(__always)
|
|
49
49
|
get {
|
|
50
50
|
return { () -> MerchantCounterparty? in
|
|
51
|
-
if
|
|
51
|
+
if bridge.has_value_std__optional_MerchantCounterparty_(self.__merchantCounterparty) {
|
|
52
|
+
let __unwrapped = bridge.get_std__optional_MerchantCounterparty_(
|
|
53
|
+
self.__merchantCounterparty)
|
|
52
54
|
return __unwrapped
|
|
53
55
|
} else {
|
|
54
56
|
return nil
|
|
@@ -71,7 +73,8 @@ extension Counterparty {
|
|
|
71
73
|
@inline(__always)
|
|
72
74
|
get {
|
|
73
75
|
return { () -> UserCounterparty? in
|
|
74
|
-
if
|
|
76
|
+
if bridge.has_value_std__optional_UserCounterparty_(self.__userCounterparty) {
|
|
77
|
+
let __unwrapped = bridge.get_std__optional_UserCounterparty_(self.__userCounterparty)
|
|
75
78
|
return __unwrapped
|
|
76
79
|
} else {
|
|
77
80
|
return nil
|
|
@@ -94,7 +97,9 @@ extension Counterparty {
|
|
|
94
97
|
@inline(__always)
|
|
95
98
|
get {
|
|
96
99
|
return { () -> ServiceCounterparty? in
|
|
97
|
-
if
|
|
100
|
+
if bridge.has_value_std__optional_ServiceCounterparty_(self.__serviceCounterparty) {
|
|
101
|
+
let __unwrapped = bridge.get_std__optional_ServiceCounterparty_(
|
|
102
|
+
self.__serviceCounterparty)
|
|
98
103
|
return __unwrapped
|
|
99
104
|
} else {
|
|
100
105
|
return nil
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// CounterpartyKind.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
|
+
/// Represents the JS union `CounterpartyKind`, backed by a C++ enum.
|
|
9
|
+
public typealias CounterpartyKind = margelo.nitro.rncandle.CounterpartyKind
|
|
10
|
+
|
|
11
|
+
extension CounterpartyKind {
|
|
12
|
+
/**
|
|
13
|
+
* Get a CounterpartyKind for the given String value, or
|
|
14
|
+
* return `nil` if the given value was invalid/unknown.
|
|
15
|
+
*/
|
|
16
|
+
public init?(fromString string: String) {
|
|
17
|
+
switch string {
|
|
18
|
+
case "merchant":
|
|
19
|
+
self = .merchant
|
|
20
|
+
case "user":
|
|
21
|
+
self = .user
|
|
22
|
+
case "service":
|
|
23
|
+
self = .service
|
|
24
|
+
default:
|
|
25
|
+
return nil
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Get the String value this CounterpartyKind represents.
|
|
31
|
+
*/
|
|
32
|
+
public var stringValue: String {
|
|
33
|
+
switch self {
|
|
34
|
+
case .merchant:
|
|
35
|
+
return "merchant"
|
|
36
|
+
case .user:
|
|
37
|
+
return "user"
|
|
38
|
+
case .service:
|
|
39
|
+
return "service"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -123,7 +123,8 @@ extension FiatAccount {
|
|
|
123
123
|
@inline(__always)
|
|
124
124
|
get {
|
|
125
125
|
return { () -> ACHDetails? in
|
|
126
|
-
if
|
|
126
|
+
if bridge.has_value_std__optional_ACHDetails_(self.__ach) {
|
|
127
|
+
let __unwrapped = bridge.get_std__optional_ACHDetails_(self.__ach)
|
|
127
128
|
return __unwrapped
|
|
128
129
|
} else {
|
|
129
130
|
return nil
|
|
@@ -146,7 +147,8 @@ extension FiatAccount {
|
|
|
146
147
|
@inline(__always)
|
|
147
148
|
get {
|
|
148
149
|
return { () -> WireDetails? in
|
|
149
|
-
if
|
|
150
|
+
if bridge.has_value_std__optional_WireDetails_(self.__wire) {
|
|
151
|
+
let __unwrapped = bridge.get_std__optional_WireDetails_(self.__wire)
|
|
150
152
|
return __unwrapped
|
|
151
153
|
} else {
|
|
152
154
|
return nil
|
|
@@ -47,7 +47,8 @@ extension FiatAsset {
|
|
|
47
47
|
@inline(__always)
|
|
48
48
|
get {
|
|
49
49
|
return { () -> String? in
|
|
50
|
-
if
|
|
50
|
+
if bridge.has_value_std__optional_std__string_(self.__serviceTradeID) {
|
|
51
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__serviceTradeID)
|
|
51
52
|
return String(__unwrapped)
|
|
52
53
|
} else {
|
|
53
54
|
return nil
|