react-native-candle 0.1.19 → 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 (45) hide show
  1. package/ReactNativeCandle.podspec +1 -1
  2. package/ios/Sources/RNCandle.swift +143 -54
  3. package/lib/commonjs/index.js +63 -2
  4. package/lib/commonjs/index.js.map +1 -1
  5. package/lib/module/index.js +63 -2
  6. package/lib/module/index.js.map +1 -1
  7. package/lib/typescript/commonjs/src/index.d.ts +27 -8
  8. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  9. package/lib/typescript/commonjs/src/specs/RNCandle.nitro.d.ts +44 -1
  10. package/lib/typescript/commonjs/src/specs/RNCandle.nitro.d.ts.map +1 -1
  11. package/lib/typescript/module/src/index.d.ts +27 -8
  12. package/lib/typescript/module/src/index.d.ts.map +1 -1
  13. package/lib/typescript/module/src/specs/RNCandle.nitro.d.ts +44 -1
  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 +27 -0
  18. package/nitrogen/generated/ios/c++/HybridRNCandleSpecSwift.hpp +53 -2
  19. package/nitrogen/generated/ios/swift/AssetAccountRef.swift +55 -0
  20. package/nitrogen/generated/ios/swift/FiatAssetRef.swift +75 -0
  21. package/nitrogen/generated/ios/swift/Func_void_AssetAccount.swift +44 -0
  22. package/nitrogen/generated/ios/swift/Func_void_LinkedAccount.swift +5 -5
  23. package/nitrogen/generated/ios/swift/HybridRNCandleSpec.swift +4 -1
  24. package/nitrogen/generated/ios/swift/HybridRNCandleSpec_cxx.swift +63 -3
  25. package/nitrogen/generated/ios/swift/LinkedAccountRef.swift +33 -0
  26. package/nitrogen/generated/ios/swift/MarketTradeAssetRef.swift +55 -0
  27. package/nitrogen/generated/ios/swift/NothingAssetRef.swift +33 -0
  28. package/nitrogen/generated/ios/swift/OtherAssetRef.swift +33 -0
  29. package/nitrogen/generated/ios/swift/TradeAssetRef.swift +176 -0
  30. package/nitrogen/generated/ios/swift/TradeRef.swift +44 -0
  31. package/nitrogen/generated/ios/swift/TransportAssetRef.swift +55 -0
  32. package/nitrogen/generated/shared/c++/AssetAccountRef.hpp +77 -0
  33. package/nitrogen/generated/shared/c++/FiatAssetRef.hpp +78 -0
  34. package/nitrogen/generated/shared/c++/HybridRNCandleSpec.cpp +3 -0
  35. package/nitrogen/generated/shared/c++/HybridRNCandleSpec.hpp +13 -1
  36. package/nitrogen/generated/shared/c++/LinkedAccountRef.hpp +69 -0
  37. package/nitrogen/generated/shared/c++/MarketTradeAssetRef.hpp +77 -0
  38. package/nitrogen/generated/shared/c++/NothingAssetRef.hpp +69 -0
  39. package/nitrogen/generated/shared/c++/OtherAssetRef.hpp +69 -0
  40. package/nitrogen/generated/shared/c++/TradeAssetRef.hpp +99 -0
  41. package/nitrogen/generated/shared/c++/TradeRef.hpp +74 -0
  42. package/nitrogen/generated/shared/c++/TransportAssetRef.hpp +77 -0
  43. package/package.json +1 -1
  44. package/src/index.ts +111 -13
  45. package/src/specs/RNCandle.nitro.ts +53 -1
@@ -0,0 +1,75 @@
1
+ ///
2
+ /// FiatAssetRef.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 `FiatAssetRef`, backed by a C++ struct.
11
+ public typealias FiatAssetRef = margelo.nitro.rncandle.FiatAssetRef
12
+
13
+ extension FiatAssetRef {
14
+ private typealias bridge = margelo.nitro.rncandle.bridge.swift
15
+
16
+ /**
17
+ * Create a new instance of `FiatAssetRef`.
18
+ */
19
+ public init(assetKind: String, serviceTradeID: String?, linkedAccountID: String) {
20
+ self.init(
21
+ std.string(assetKind),
22
+ { () -> bridge.std__optional_std__string_ in
23
+ if let __unwrappedValue = serviceTradeID {
24
+ return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
25
+ } else {
26
+ return .init()
27
+ }
28
+ }(), std.string(linkedAccountID))
29
+ }
30
+
31
+ public var assetKind: String {
32
+ @inline(__always)
33
+ get {
34
+ return String(self.__assetKind)
35
+ }
36
+ @inline(__always)
37
+ set {
38
+ self.__assetKind = std.string(newValue)
39
+ }
40
+ }
41
+
42
+ public var serviceTradeID: String? {
43
+ @inline(__always)
44
+ get {
45
+ return { () -> String? in
46
+ if let __unwrapped = self.__serviceTradeID.value {
47
+ return String(__unwrapped)
48
+ } else {
49
+ return nil
50
+ }
51
+ }()
52
+ }
53
+ @inline(__always)
54
+ set {
55
+ self.__serviceTradeID = { () -> bridge.std__optional_std__string_ in
56
+ if let __unwrappedValue = newValue {
57
+ return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
58
+ } else {
59
+ return .init()
60
+ }
61
+ }()
62
+ }
63
+ }
64
+
65
+ public var linkedAccountID: String {
66
+ @inline(__always)
67
+ get {
68
+ return String(self.__linkedAccountID)
69
+ }
70
+ @inline(__always)
71
+ set {
72
+ self.__linkedAccountID = std.string(newValue)
73
+ }
74
+ }
75
+ }
@@ -0,0 +1,44 @@
1
+ ///
2
+ /// Func_void_AssetAccount.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
+ /// Wraps a Swift `(_ value: AssetAccount) -> Void` as a class.
11
+ /// This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
12
+ public final class Func_void_AssetAccount {
13
+ public typealias bridge = margelo.nitro.rncandle.bridge.swift
14
+
15
+ private let closure: (_ value: AssetAccount) -> Void
16
+
17
+ public init(_ closure: @escaping (_ value: AssetAccount) -> Void) {
18
+ self.closure = closure
19
+ }
20
+
21
+ @inline(__always)
22
+ public func call(value: AssetAccount) {
23
+ self.closure(value)
24
+ }
25
+
26
+ /**
27
+ * Casts this instance to a retained unsafe raw pointer.
28
+ * This acquires one additional strong reference on the object!
29
+ */
30
+ @inline(__always)
31
+ public func toUnsafe() -> UnsafeMutableRawPointer {
32
+ return Unmanaged.passRetained(self).toOpaque()
33
+ }
34
+
35
+ /**
36
+ * Casts an unsafe pointer to a `Func_void_AssetAccount`.
37
+ * The pointer has to be a retained opaque `Unmanaged<Func_void_AssetAccount>`.
38
+ * This removes one strong reference from the object!
39
+ */
40
+ @inline(__always)
41
+ public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_AssetAccount {
42
+ return Unmanaged<Func_void_AssetAccount>.fromOpaque(pointer).takeRetainedValue()
43
+ }
44
+ }
@@ -7,20 +7,20 @@
7
7
 
8
8
  import NitroModules
9
9
 
10
- /// Wraps a Swift `(_ account: LinkedAccount) -> Void` as a class.
10
+ /// Wraps a Swift `(_ value: LinkedAccount) -> Void` as a class.
11
11
  /// This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
12
12
  public final class Func_void_LinkedAccount {
13
13
  public typealias bridge = margelo.nitro.rncandle.bridge.swift
14
14
 
15
- private let closure: (_ account: LinkedAccount) -> Void
15
+ private let closure: (_ value: LinkedAccount) -> Void
16
16
 
17
- public init(_ closure: @escaping (_ account: LinkedAccount) -> Void) {
17
+ public init(_ closure: @escaping (_ value: LinkedAccount) -> Void) {
18
18
  self.closure = closure
19
19
  }
20
20
 
21
21
  @inline(__always)
22
- public func call(account: LinkedAccount) {
23
- self.closure(account)
22
+ public func call(value: LinkedAccount) {
23
+ self.closure(value)
24
24
  }
25
25
 
26
26
  /**
@@ -20,9 +20,12 @@ public protocol HybridRNCandleSpec_protocol: HybridObject {
20
20
  throws
21
21
  func initialize(appUser: AppUser) throws
22
22
  func getLinkedAccounts() throws -> Promise<[LinkedAccount]>
23
- func unlinkAccount(linkedAccountID: String) throws -> Promise<Void>
23
+ func getLinkedAccount(ref: LinkedAccountRef) throws -> Promise<LinkedAccount>
24
+ func unlinkAccount(ref: LinkedAccountRef) throws -> Promise<Void>
24
25
  func getAssetAccounts(query: AssetAccountQuery) throws -> Promise<[AssetAccount]>
26
+ func getAssetAccount(ref: AssetAccountRef) throws -> Promise<AssetAccount>
25
27
  func getTrades(query: TradeQuery) throws -> Promise<[Trade]>
28
+ func getTrade(ref: TradeRef) throws -> Promise<Trade>
26
29
  func getTradeQuotes(request: TradeQuoteRequest) throws -> Promise<[TradeQuote]>
27
30
  func executeTrade(request: ExecuteTradeRequest) throws -> Promise<Trade>
28
31
  func deleteUser() throws -> Promise<Void>
@@ -181,12 +181,32 @@ public class HybridRNCandleSpec_cxx {
181
181
  }
182
182
 
183
183
  @inline(__always)
184
- public final func unlinkAccount(linkedAccountID: std.string)
184
+ public final func getLinkedAccount(ref: LinkedAccountRef)
185
+ -> bridge.Result_std__shared_ptr_Promise_LinkedAccount___
186
+ {
187
+ do {
188
+ let __result = try self.__implementation.getLinkedAccount(ref: ref)
189
+ let __resultCpp = { () -> bridge.std__shared_ptr_Promise_LinkedAccount__ in
190
+ let __promise = bridge.create_std__shared_ptr_Promise_LinkedAccount__()
191
+ let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_LinkedAccount__(__promise)
192
+ __result
193
+ .then({ __result in __promiseHolder.resolve(__result) })
194
+ .catch({ __error in __promiseHolder.reject(__error.toCpp()) })
195
+ return __promise
196
+ }()
197
+ return bridge.create_Result_std__shared_ptr_Promise_LinkedAccount___(__resultCpp)
198
+ } catch (let __error) {
199
+ let __exceptionPtr = __error.toCpp()
200
+ return bridge.create_Result_std__shared_ptr_Promise_LinkedAccount___(__exceptionPtr)
201
+ }
202
+ }
203
+
204
+ @inline(__always)
205
+ public final func unlinkAccount(ref: LinkedAccountRef)
185
206
  -> bridge.Result_std__shared_ptr_Promise_void___
186
207
  {
187
208
  do {
188
- let __result = try self.__implementation.unlinkAccount(
189
- linkedAccountID: String(linkedAccountID))
209
+ let __result = try self.__implementation.unlinkAccount(ref: ref)
190
210
  let __resultCpp = { () -> bridge.std__shared_ptr_Promise_void__ in
191
211
  let __promise = bridge.create_std__shared_ptr_Promise_void__()
192
212
  let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_void__(__promise)
@@ -234,6 +254,27 @@ public class HybridRNCandleSpec_cxx {
234
254
  }
235
255
  }
236
256
 
257
+ @inline(__always)
258
+ public final func getAssetAccount(ref: AssetAccountRef)
259
+ -> bridge.Result_std__shared_ptr_Promise_AssetAccount___
260
+ {
261
+ do {
262
+ let __result = try self.__implementation.getAssetAccount(ref: ref)
263
+ let __resultCpp = { () -> bridge.std__shared_ptr_Promise_AssetAccount__ in
264
+ let __promise = bridge.create_std__shared_ptr_Promise_AssetAccount__()
265
+ let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_AssetAccount__(__promise)
266
+ __result
267
+ .then({ __result in __promiseHolder.resolve(__result) })
268
+ .catch({ __error in __promiseHolder.reject(__error.toCpp()) })
269
+ return __promise
270
+ }()
271
+ return bridge.create_Result_std__shared_ptr_Promise_AssetAccount___(__resultCpp)
272
+ } catch (let __error) {
273
+ let __exceptionPtr = __error.toCpp()
274
+ return bridge.create_Result_std__shared_ptr_Promise_AssetAccount___(__exceptionPtr)
275
+ }
276
+ }
277
+
237
278
  @inline(__always)
238
279
  public final func getTrades(query: TradeQuery)
239
280
  -> bridge.Result_std__shared_ptr_Promise_std__vector_Trade____
@@ -264,6 +305,25 @@ public class HybridRNCandleSpec_cxx {
264
305
  }
265
306
  }
266
307
 
308
+ @inline(__always)
309
+ public final func getTrade(ref: TradeRef) -> bridge.Result_std__shared_ptr_Promise_Trade___ {
310
+ do {
311
+ let __result = try self.__implementation.getTrade(ref: ref)
312
+ let __resultCpp = { () -> bridge.std__shared_ptr_Promise_Trade__ in
313
+ let __promise = bridge.create_std__shared_ptr_Promise_Trade__()
314
+ let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_Trade__(__promise)
315
+ __result
316
+ .then({ __result in __promiseHolder.resolve(__result) })
317
+ .catch({ __error in __promiseHolder.reject(__error.toCpp()) })
318
+ return __promise
319
+ }()
320
+ return bridge.create_Result_std__shared_ptr_Promise_Trade___(__resultCpp)
321
+ } catch (let __error) {
322
+ let __exceptionPtr = __error.toCpp()
323
+ return bridge.create_Result_std__shared_ptr_Promise_Trade___(__exceptionPtr)
324
+ }
325
+ }
326
+
267
327
  @inline(__always)
268
328
  public final func getTradeQuotes(request: TradeQuoteRequest)
269
329
  -> bridge.Result_std__shared_ptr_Promise_std__vector_TradeQuote____
@@ -0,0 +1,33 @@
1
+ ///
2
+ /// LinkedAccountRef.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 `LinkedAccountRef`, backed by a C++ struct.
11
+ public typealias LinkedAccountRef = margelo.nitro.rncandle.LinkedAccountRef
12
+
13
+ extension LinkedAccountRef {
14
+ private typealias bridge = margelo.nitro.rncandle.bridge.swift
15
+
16
+ /**
17
+ * Create a new instance of `LinkedAccountRef`.
18
+ */
19
+ public init(linkedAccountID: String) {
20
+ self.init(std.string(linkedAccountID))
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
+ }
@@ -0,0 +1,55 @@
1
+ ///
2
+ /// MarketTradeAssetRef.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 `MarketTradeAssetRef`, backed by a C++ struct.
11
+ public typealias MarketTradeAssetRef = margelo.nitro.rncandle.MarketTradeAssetRef
12
+
13
+ extension MarketTradeAssetRef {
14
+ private typealias bridge = margelo.nitro.rncandle.bridge.swift
15
+
16
+ /**
17
+ * Create a new instance of `MarketTradeAssetRef`.
18
+ */
19
+ public init(assetKind: String, serviceTradeID: String, linkedAccountID: String) {
20
+ self.init(std.string(assetKind), std.string(serviceTradeID), std.string(linkedAccountID))
21
+ }
22
+
23
+ public var assetKind: String {
24
+ @inline(__always)
25
+ get {
26
+ return String(self.__assetKind)
27
+ }
28
+ @inline(__always)
29
+ set {
30
+ self.__assetKind = std.string(newValue)
31
+ }
32
+ }
33
+
34
+ public var serviceTradeID: String {
35
+ @inline(__always)
36
+ get {
37
+ return String(self.__serviceTradeID)
38
+ }
39
+ @inline(__always)
40
+ set {
41
+ self.__serviceTradeID = std.string(newValue)
42
+ }
43
+ }
44
+
45
+ public var linkedAccountID: String {
46
+ @inline(__always)
47
+ get {
48
+ return String(self.__linkedAccountID)
49
+ }
50
+ @inline(__always)
51
+ set {
52
+ self.__linkedAccountID = std.string(newValue)
53
+ }
54
+ }
55
+ }
@@ -0,0 +1,33 @@
1
+ ///
2
+ /// NothingAssetRef.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 `NothingAssetRef`, backed by a C++ struct.
11
+ public typealias NothingAssetRef = margelo.nitro.rncandle.NothingAssetRef
12
+
13
+ extension NothingAssetRef {
14
+ private typealias bridge = margelo.nitro.rncandle.bridge.swift
15
+
16
+ /**
17
+ * Create a new instance of `NothingAssetRef`.
18
+ */
19
+ public init(assetKind: String) {
20
+ self.init(std.string(assetKind))
21
+ }
22
+
23
+ public var assetKind: String {
24
+ @inline(__always)
25
+ get {
26
+ return String(self.__assetKind)
27
+ }
28
+ @inline(__always)
29
+ set {
30
+ self.__assetKind = std.string(newValue)
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,33 @@
1
+ ///
2
+ /// OtherAssetRef.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 `OtherAssetRef`, backed by a C++ struct.
11
+ public typealias OtherAssetRef = margelo.nitro.rncandle.OtherAssetRef
12
+
13
+ extension OtherAssetRef {
14
+ private typealias bridge = margelo.nitro.rncandle.bridge.swift
15
+
16
+ /**
17
+ * Create a new instance of `OtherAssetRef`.
18
+ */
19
+ public init(assetKind: String) {
20
+ self.init(std.string(assetKind))
21
+ }
22
+
23
+ public var assetKind: String {
24
+ @inline(__always)
25
+ get {
26
+ return String(self.__assetKind)
27
+ }
28
+ @inline(__always)
29
+ set {
30
+ self.__assetKind = std.string(newValue)
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,176 @@
1
+ ///
2
+ /// TradeAssetRef.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 `TradeAssetRef`, backed by a C++ struct.
11
+ public typealias TradeAssetRef = margelo.nitro.rncandle.TradeAssetRef
12
+
13
+ extension TradeAssetRef {
14
+ private typealias bridge = margelo.nitro.rncandle.bridge.swift
15
+
16
+ /**
17
+ * Create a new instance of `TradeAssetRef`.
18
+ */
19
+ public init(
20
+ fiatAssetRef: FiatAssetRef?, marketTradeAssetRef: MarketTradeAssetRef?,
21
+ transportAssetRef: TransportAssetRef?, otherAssetRef: OtherAssetRef?,
22
+ nothingAssetRef: NothingAssetRef?
23
+ ) {
24
+ self.init(
25
+ { () -> bridge.std__optional_FiatAssetRef_ in
26
+ if let __unwrappedValue = fiatAssetRef {
27
+ return bridge.create_std__optional_FiatAssetRef_(__unwrappedValue)
28
+ } else {
29
+ return .init()
30
+ }
31
+ }(),
32
+ { () -> bridge.std__optional_MarketTradeAssetRef_ in
33
+ if let __unwrappedValue = marketTradeAssetRef {
34
+ return bridge.create_std__optional_MarketTradeAssetRef_(__unwrappedValue)
35
+ } else {
36
+ return .init()
37
+ }
38
+ }(),
39
+ { () -> bridge.std__optional_TransportAssetRef_ in
40
+ if let __unwrappedValue = transportAssetRef {
41
+ return bridge.create_std__optional_TransportAssetRef_(__unwrappedValue)
42
+ } else {
43
+ return .init()
44
+ }
45
+ }(),
46
+ { () -> bridge.std__optional_OtherAssetRef_ in
47
+ if let __unwrappedValue = otherAssetRef {
48
+ return bridge.create_std__optional_OtherAssetRef_(__unwrappedValue)
49
+ } else {
50
+ return .init()
51
+ }
52
+ }(),
53
+ { () -> bridge.std__optional_NothingAssetRef_ in
54
+ if let __unwrappedValue = nothingAssetRef {
55
+ return bridge.create_std__optional_NothingAssetRef_(__unwrappedValue)
56
+ } else {
57
+ return .init()
58
+ }
59
+ }())
60
+ }
61
+
62
+ public var fiatAssetRef: FiatAssetRef? {
63
+ @inline(__always)
64
+ get {
65
+ return { () -> FiatAssetRef? in
66
+ if let __unwrapped = self.__fiatAssetRef.value {
67
+ return __unwrapped
68
+ } else {
69
+ return nil
70
+ }
71
+ }()
72
+ }
73
+ @inline(__always)
74
+ set {
75
+ self.__fiatAssetRef = { () -> bridge.std__optional_FiatAssetRef_ in
76
+ if let __unwrappedValue = newValue {
77
+ return bridge.create_std__optional_FiatAssetRef_(__unwrappedValue)
78
+ } else {
79
+ return .init()
80
+ }
81
+ }()
82
+ }
83
+ }
84
+
85
+ public var marketTradeAssetRef: MarketTradeAssetRef? {
86
+ @inline(__always)
87
+ get {
88
+ return { () -> MarketTradeAssetRef? in
89
+ if let __unwrapped = self.__marketTradeAssetRef.value {
90
+ return __unwrapped
91
+ } else {
92
+ return nil
93
+ }
94
+ }()
95
+ }
96
+ @inline(__always)
97
+ set {
98
+ self.__marketTradeAssetRef = { () -> bridge.std__optional_MarketTradeAssetRef_ in
99
+ if let __unwrappedValue = newValue {
100
+ return bridge.create_std__optional_MarketTradeAssetRef_(__unwrappedValue)
101
+ } else {
102
+ return .init()
103
+ }
104
+ }()
105
+ }
106
+ }
107
+
108
+ public var transportAssetRef: TransportAssetRef? {
109
+ @inline(__always)
110
+ get {
111
+ return { () -> TransportAssetRef? in
112
+ if let __unwrapped = self.__transportAssetRef.value {
113
+ return __unwrapped
114
+ } else {
115
+ return nil
116
+ }
117
+ }()
118
+ }
119
+ @inline(__always)
120
+ set {
121
+ self.__transportAssetRef = { () -> bridge.std__optional_TransportAssetRef_ in
122
+ if let __unwrappedValue = newValue {
123
+ return bridge.create_std__optional_TransportAssetRef_(__unwrappedValue)
124
+ } else {
125
+ return .init()
126
+ }
127
+ }()
128
+ }
129
+ }
130
+
131
+ public var otherAssetRef: OtherAssetRef? {
132
+ @inline(__always)
133
+ get {
134
+ return { () -> OtherAssetRef? in
135
+ if let __unwrapped = self.__otherAssetRef.value {
136
+ return __unwrapped
137
+ } else {
138
+ return nil
139
+ }
140
+ }()
141
+ }
142
+ @inline(__always)
143
+ set {
144
+ self.__otherAssetRef = { () -> bridge.std__optional_OtherAssetRef_ in
145
+ if let __unwrappedValue = newValue {
146
+ return bridge.create_std__optional_OtherAssetRef_(__unwrappedValue)
147
+ } else {
148
+ return .init()
149
+ }
150
+ }()
151
+ }
152
+ }
153
+
154
+ public var nothingAssetRef: NothingAssetRef? {
155
+ @inline(__always)
156
+ get {
157
+ return { () -> NothingAssetRef? in
158
+ if let __unwrapped = self.__nothingAssetRef.value {
159
+ return __unwrapped
160
+ } else {
161
+ return nil
162
+ }
163
+ }()
164
+ }
165
+ @inline(__always)
166
+ set {
167
+ self.__nothingAssetRef = { () -> bridge.std__optional_NothingAssetRef_ in
168
+ if let __unwrappedValue = newValue {
169
+ return bridge.create_std__optional_NothingAssetRef_(__unwrappedValue)
170
+ } else {
171
+ return .init()
172
+ }
173
+ }()
174
+ }
175
+ }
176
+ }
@@ -0,0 +1,44 @@
1
+ ///
2
+ /// TradeRef.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 `TradeRef`, backed by a C++ struct.
11
+ public typealias TradeRef = margelo.nitro.rncandle.TradeRef
12
+
13
+ extension TradeRef {
14
+ private typealias bridge = margelo.nitro.rncandle.bridge.swift
15
+
16
+ /**
17
+ * Create a new instance of `TradeRef`.
18
+ */
19
+ public init(lost: TradeAssetRef, gained: TradeAssetRef) {
20
+ self.init(lost, gained)
21
+ }
22
+
23
+ public var lost: TradeAssetRef {
24
+ @inline(__always)
25
+ get {
26
+ return self.__lost
27
+ }
28
+ @inline(__always)
29
+ set {
30
+ self.__lost = newValue
31
+ }
32
+ }
33
+
34
+ public var gained: TradeAssetRef {
35
+ @inline(__always)
36
+ get {
37
+ return self.__gained
38
+ }
39
+ @inline(__always)
40
+ set {
41
+ self.__gained = newValue
42
+ }
43
+ }
44
+ }
@@ -0,0 +1,55 @@
1
+ ///
2
+ /// TransportAssetRef.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 `TransportAssetRef`, backed by a C++ struct.
11
+ public typealias TransportAssetRef = margelo.nitro.rncandle.TransportAssetRef
12
+
13
+ extension TransportAssetRef {
14
+ private typealias bridge = margelo.nitro.rncandle.bridge.swift
15
+
16
+ /**
17
+ * Create a new instance of `TransportAssetRef`.
18
+ */
19
+ public init(assetKind: String, serviceTradeID: String, linkedAccountID: String) {
20
+ self.init(std.string(assetKind), std.string(serviceTradeID), std.string(linkedAccountID))
21
+ }
22
+
23
+ public var assetKind: String {
24
+ @inline(__always)
25
+ get {
26
+ return String(self.__assetKind)
27
+ }
28
+ @inline(__always)
29
+ set {
30
+ self.__assetKind = std.string(newValue)
31
+ }
32
+ }
33
+
34
+ public var serviceTradeID: String {
35
+ @inline(__always)
36
+ get {
37
+ return String(self.__serviceTradeID)
38
+ }
39
+ @inline(__always)
40
+ set {
41
+ self.__serviceTradeID = std.string(newValue)
42
+ }
43
+ }
44
+
45
+ public var linkedAccountID: String {
46
+ @inline(__always)
47
+ get {
48
+ return String(self.__linkedAccountID)
49
+ }
50
+ @inline(__always)
51
+ set {
52
+ self.__linkedAccountID = std.string(newValue)
53
+ }
54
+ }
55
+ }