react-native-candle 0.1.50 → 1.0.1
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/Types.swift +104 -42
- package/lib/commonjs/types.js +46 -5
- package/lib/commonjs/types.js.map +1 -1
- package/lib/module/types.js +42 -3
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/commonjs/src/specs/RNCandle.nitro.d.ts +23 -0
- package/lib/typescript/commonjs/src/specs/RNCandle.nitro.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types.d.ts +16 -3
- package/lib/typescript/commonjs/src/types.d.ts.map +1 -1
- package/lib/typescript/module/src/specs/RNCandle.nitro.d.ts +23 -0
- package/lib/typescript/module/src/specs/RNCandle.nitro.d.ts.map +1 -1
- package/lib/typescript/module/src/types.d.ts +16 -3
- package/lib/typescript/module/src/types.d.ts.map +1 -1
- package/nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Bridge.hpp +90 -0
- package/nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Umbrella.hpp +15 -0
- package/nitrogen/generated/ios/c++/HybridRNCandleSpecSwift.hpp +24 -9
- package/nitrogen/generated/ios/swift/CounterpartyQuoteRequest.swift +131 -0
- package/nitrogen/generated/ios/swift/MerchantCounterpartyQuoteRequest.swift +66 -0
- package/nitrogen/generated/ios/swift/OtherAssetQuoteRequest.swift +33 -0
- package/nitrogen/generated/ios/swift/ServiceCounterpartyQuoteRequest.swift +34 -0
- package/nitrogen/generated/ios/swift/TradeAssetQuoteRequest.swift +34 -1
- package/nitrogen/generated/ios/swift/TradeQuote.swift +16 -2
- package/nitrogen/generated/ios/swift/TradeQuotesRequest.swift +34 -2
- package/nitrogen/generated/ios/swift/UserCounterpartyQuoteRequest.swift +96 -0
- package/nitrogen/generated/shared/c++/CounterpartyQuoteRequest.hpp +83 -0
- package/nitrogen/generated/shared/c++/MerchantCounterpartyQuoteRequest.hpp +72 -0
- package/nitrogen/generated/shared/c++/OtherAssetQuoteRequest.hpp +67 -0
- package/nitrogen/generated/shared/c++/ServiceCounterpartyQuoteRequest.hpp +67 -0
- package/nitrogen/generated/shared/c++/TradeAssetQuoteRequest.hpp +9 -2
- package/nitrogen/generated/shared/c++/TradeQuote.hpp +8 -1
- package/nitrogen/generated/shared/c++/TradeQuotesRequest.hpp +9 -2
- package/nitrogen/generated/shared/c++/UserCounterpartyQuoteRequest.hpp +76 -0
- package/package.json +1 -1
- package/src/specs/RNCandle.nitro.ts +28 -0
- package/src/types.ts +54 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// MerchantCounterpartyQuoteRequest.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 `MerchantCounterpartyQuoteRequest`, backed by a C++ struct.
|
|
11
|
+
public typealias MerchantCounterpartyQuoteRequest = margelo.nitro.rncandle
|
|
12
|
+
.MerchantCounterpartyQuoteRequest
|
|
13
|
+
|
|
14
|
+
extension MerchantCounterpartyQuoteRequest {
|
|
15
|
+
private typealias bridge = margelo.nitro.rncandle.bridge.swift
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Create a new instance of `MerchantCounterpartyQuoteRequest`.
|
|
19
|
+
*/
|
|
20
|
+
public init(kind: String, name: String?) {
|
|
21
|
+
self.init(
|
|
22
|
+
std.string(kind),
|
|
23
|
+
{ () -> bridge.std__optional_std__string_ in
|
|
24
|
+
if let __unwrappedValue = name {
|
|
25
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
26
|
+
} else {
|
|
27
|
+
return .init()
|
|
28
|
+
}
|
|
29
|
+
}())
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
public var kind: String {
|
|
33
|
+
@inline(__always)
|
|
34
|
+
get {
|
|
35
|
+
return String(self.__kind)
|
|
36
|
+
}
|
|
37
|
+
@inline(__always)
|
|
38
|
+
set {
|
|
39
|
+
self.__kind = std.string(newValue)
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
public var name: String? {
|
|
44
|
+
@inline(__always)
|
|
45
|
+
get {
|
|
46
|
+
return { () -> String? in
|
|
47
|
+
if bridge.has_value_std__optional_std__string_(self.__name) {
|
|
48
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__name)
|
|
49
|
+
return String(__unwrapped)
|
|
50
|
+
} else {
|
|
51
|
+
return nil
|
|
52
|
+
}
|
|
53
|
+
}()
|
|
54
|
+
}
|
|
55
|
+
@inline(__always)
|
|
56
|
+
set {
|
|
57
|
+
self.__name = { () -> bridge.std__optional_std__string_ in
|
|
58
|
+
if let __unwrappedValue = newValue {
|
|
59
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
60
|
+
} else {
|
|
61
|
+
return .init()
|
|
62
|
+
}
|
|
63
|
+
}()
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// OtherAssetQuoteRequest.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 `OtherAssetQuoteRequest`, backed by a C++ struct.
|
|
11
|
+
public typealias OtherAssetQuoteRequest = margelo.nitro.rncandle.OtherAssetQuoteRequest
|
|
12
|
+
|
|
13
|
+
extension OtherAssetQuoteRequest {
|
|
14
|
+
private typealias bridge = margelo.nitro.rncandle.bridge.swift
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Create a new instance of `OtherAssetQuoteRequest`.
|
|
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,34 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// ServiceCounterpartyQuoteRequest.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 `ServiceCounterpartyQuoteRequest`, backed by a C++ struct.
|
|
11
|
+
public typealias ServiceCounterpartyQuoteRequest = margelo.nitro.rncandle
|
|
12
|
+
.ServiceCounterpartyQuoteRequest
|
|
13
|
+
|
|
14
|
+
extension ServiceCounterpartyQuoteRequest {
|
|
15
|
+
private typealias bridge = margelo.nitro.rncandle.bridge.swift
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Create a new instance of `ServiceCounterpartyQuoteRequest`.
|
|
19
|
+
*/
|
|
20
|
+
public init(kind: String) {
|
|
21
|
+
self.init(std.string(kind))
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
public var kind: String {
|
|
25
|
+
@inline(__always)
|
|
26
|
+
get {
|
|
27
|
+
return String(self.__kind)
|
|
28
|
+
}
|
|
29
|
+
@inline(__always)
|
|
30
|
+
set {
|
|
31
|
+
self.__kind = std.string(newValue)
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -20,7 +20,8 @@ extension TradeAssetQuoteRequest {
|
|
|
20
20
|
fiatAssetQuoteRequest: FiatAssetQuoteRequest?,
|
|
21
21
|
marketAssetQuoteRequest: MarketAssetQuoteRequest?,
|
|
22
22
|
transportAssetQuoteRequest: TransportAssetQuoteRequest?,
|
|
23
|
-
nothingAssetQuoteRequest: NothingAssetQuoteRequest
|
|
23
|
+
nothingAssetQuoteRequest: NothingAssetQuoteRequest?,
|
|
24
|
+
otherAssetQuoteRequest: OtherAssetQuoteRequest?
|
|
24
25
|
) {
|
|
25
26
|
self.init(
|
|
26
27
|
{ () -> bridge.std__optional_FiatAssetQuoteRequest_ in
|
|
@@ -50,6 +51,13 @@ extension TradeAssetQuoteRequest {
|
|
|
50
51
|
} else {
|
|
51
52
|
return .init()
|
|
52
53
|
}
|
|
54
|
+
}(),
|
|
55
|
+
{ () -> bridge.std__optional_OtherAssetQuoteRequest_ in
|
|
56
|
+
if let __unwrappedValue = otherAssetQuoteRequest {
|
|
57
|
+
return bridge.create_std__optional_OtherAssetQuoteRequest_(__unwrappedValue)
|
|
58
|
+
} else {
|
|
59
|
+
return .init()
|
|
60
|
+
}
|
|
53
61
|
}())
|
|
54
62
|
}
|
|
55
63
|
|
|
@@ -156,4 +164,29 @@ extension TradeAssetQuoteRequest {
|
|
|
156
164
|
}()
|
|
157
165
|
}
|
|
158
166
|
}
|
|
167
|
+
|
|
168
|
+
public var otherAssetQuoteRequest: OtherAssetQuoteRequest? {
|
|
169
|
+
@inline(__always)
|
|
170
|
+
get {
|
|
171
|
+
return { () -> OtherAssetQuoteRequest? in
|
|
172
|
+
if bridge.has_value_std__optional_OtherAssetQuoteRequest_(self.__otherAssetQuoteRequest) {
|
|
173
|
+
let __unwrapped = bridge.get_std__optional_OtherAssetQuoteRequest_(
|
|
174
|
+
self.__otherAssetQuoteRequest)
|
|
175
|
+
return __unwrapped
|
|
176
|
+
} else {
|
|
177
|
+
return nil
|
|
178
|
+
}
|
|
179
|
+
}()
|
|
180
|
+
}
|
|
181
|
+
@inline(__always)
|
|
182
|
+
set {
|
|
183
|
+
self.__otherAssetQuoteRequest = { () -> bridge.std__optional_OtherAssetQuoteRequest_ in
|
|
184
|
+
if let __unwrappedValue = newValue {
|
|
185
|
+
return bridge.create_std__optional_OtherAssetQuoteRequest_(__unwrappedValue)
|
|
186
|
+
} else {
|
|
187
|
+
return .init()
|
|
188
|
+
}
|
|
189
|
+
}()
|
|
190
|
+
}
|
|
191
|
+
}
|
|
159
192
|
}
|
|
@@ -16,8 +16,11 @@ extension TradeQuote {
|
|
|
16
16
|
/**
|
|
17
17
|
* Create a new instance of `TradeQuote`.
|
|
18
18
|
*/
|
|
19
|
-
public init(
|
|
20
|
-
|
|
19
|
+
public init(
|
|
20
|
+
lost: TradeAsset, gained: TradeAsset, counterparty: Counterparty, context: String,
|
|
21
|
+
expirationDateTime: String
|
|
22
|
+
) {
|
|
23
|
+
self.init(lost, gained, counterparty, std.string(context), std.string(expirationDateTime))
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
public var lost: TradeAsset {
|
|
@@ -42,6 +45,17 @@ extension TradeQuote {
|
|
|
42
45
|
}
|
|
43
46
|
}
|
|
44
47
|
|
|
48
|
+
public var counterparty: Counterparty {
|
|
49
|
+
@inline(__always)
|
|
50
|
+
get {
|
|
51
|
+
return self.__counterparty
|
|
52
|
+
}
|
|
53
|
+
@inline(__always)
|
|
54
|
+
set {
|
|
55
|
+
self.__counterparty = newValue
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
45
59
|
public var context: String {
|
|
46
60
|
@inline(__always)
|
|
47
61
|
get {
|
|
@@ -17,7 +17,8 @@ extension TradeQuotesRequest {
|
|
|
17
17
|
* Create a new instance of `TradeQuotesRequest`.
|
|
18
18
|
*/
|
|
19
19
|
public init(
|
|
20
|
-
linkedAccountIDs: String?, gained: TradeAssetQuoteRequest, lost: TradeAssetQuoteRequest
|
|
20
|
+
linkedAccountIDs: String?, gained: TradeAssetQuoteRequest, lost: TradeAssetQuoteRequest,
|
|
21
|
+
counterparty: CounterpartyQuoteRequest?
|
|
21
22
|
) {
|
|
22
23
|
self.init(
|
|
23
24
|
{ () -> bridge.std__optional_std__string_ in
|
|
@@ -26,7 +27,14 @@ extension TradeQuotesRequest {
|
|
|
26
27
|
} else {
|
|
27
28
|
return .init()
|
|
28
29
|
}
|
|
29
|
-
}(), gained, lost
|
|
30
|
+
}(), gained, lost,
|
|
31
|
+
{ () -> bridge.std__optional_CounterpartyQuoteRequest_ in
|
|
32
|
+
if let __unwrappedValue = counterparty {
|
|
33
|
+
return bridge.create_std__optional_CounterpartyQuoteRequest_(__unwrappedValue)
|
|
34
|
+
} else {
|
|
35
|
+
return .init()
|
|
36
|
+
}
|
|
37
|
+
}())
|
|
30
38
|
}
|
|
31
39
|
|
|
32
40
|
public var linkedAccountIDs: String? {
|
|
@@ -74,4 +82,28 @@ extension TradeQuotesRequest {
|
|
|
74
82
|
self.__lost = newValue
|
|
75
83
|
}
|
|
76
84
|
}
|
|
85
|
+
|
|
86
|
+
public var counterparty: CounterpartyQuoteRequest? {
|
|
87
|
+
@inline(__always)
|
|
88
|
+
get {
|
|
89
|
+
return { () -> CounterpartyQuoteRequest? in
|
|
90
|
+
if bridge.has_value_std__optional_CounterpartyQuoteRequest_(self.__counterparty) {
|
|
91
|
+
let __unwrapped = bridge.get_std__optional_CounterpartyQuoteRequest_(self.__counterparty)
|
|
92
|
+
return __unwrapped
|
|
93
|
+
} else {
|
|
94
|
+
return nil
|
|
95
|
+
}
|
|
96
|
+
}()
|
|
97
|
+
}
|
|
98
|
+
@inline(__always)
|
|
99
|
+
set {
|
|
100
|
+
self.__counterparty = { () -> bridge.std__optional_CounterpartyQuoteRequest_ in
|
|
101
|
+
if let __unwrappedValue = newValue {
|
|
102
|
+
return bridge.create_std__optional_CounterpartyQuoteRequest_(__unwrappedValue)
|
|
103
|
+
} else {
|
|
104
|
+
return .init()
|
|
105
|
+
}
|
|
106
|
+
}()
|
|
107
|
+
}
|
|
108
|
+
}
|
|
77
109
|
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// UserCounterpartyQuoteRequest.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 `UserCounterpartyQuoteRequest`, backed by a C++ struct.
|
|
11
|
+
public typealias UserCounterpartyQuoteRequest = margelo.nitro.rncandle.UserCounterpartyQuoteRequest
|
|
12
|
+
|
|
13
|
+
extension UserCounterpartyQuoteRequest {
|
|
14
|
+
private typealias bridge = margelo.nitro.rncandle.bridge.swift
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Create a new instance of `UserCounterpartyQuoteRequest`.
|
|
18
|
+
*/
|
|
19
|
+
public init(kind: String, legalName: String?, username: String?) {
|
|
20
|
+
self.init(
|
|
21
|
+
std.string(kind),
|
|
22
|
+
{ () -> bridge.std__optional_std__string_ in
|
|
23
|
+
if let __unwrappedValue = legalName {
|
|
24
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
25
|
+
} else {
|
|
26
|
+
return .init()
|
|
27
|
+
}
|
|
28
|
+
}(),
|
|
29
|
+
{ () -> bridge.std__optional_std__string_ in
|
|
30
|
+
if let __unwrappedValue = username {
|
|
31
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
32
|
+
} else {
|
|
33
|
+
return .init()
|
|
34
|
+
}
|
|
35
|
+
}())
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
public var kind: String {
|
|
39
|
+
@inline(__always)
|
|
40
|
+
get {
|
|
41
|
+
return String(self.__kind)
|
|
42
|
+
}
|
|
43
|
+
@inline(__always)
|
|
44
|
+
set {
|
|
45
|
+
self.__kind = std.string(newValue)
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
public var legalName: String? {
|
|
50
|
+
@inline(__always)
|
|
51
|
+
get {
|
|
52
|
+
return { () -> String? in
|
|
53
|
+
if bridge.has_value_std__optional_std__string_(self.__legalName) {
|
|
54
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__legalName)
|
|
55
|
+
return String(__unwrapped)
|
|
56
|
+
} else {
|
|
57
|
+
return nil
|
|
58
|
+
}
|
|
59
|
+
}()
|
|
60
|
+
}
|
|
61
|
+
@inline(__always)
|
|
62
|
+
set {
|
|
63
|
+
self.__legalName = { () -> bridge.std__optional_std__string_ in
|
|
64
|
+
if let __unwrappedValue = newValue {
|
|
65
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
66
|
+
} else {
|
|
67
|
+
return .init()
|
|
68
|
+
}
|
|
69
|
+
}()
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
public var username: String? {
|
|
74
|
+
@inline(__always)
|
|
75
|
+
get {
|
|
76
|
+
return { () -> String? in
|
|
77
|
+
if bridge.has_value_std__optional_std__string_(self.__username) {
|
|
78
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__username)
|
|
79
|
+
return String(__unwrapped)
|
|
80
|
+
} else {
|
|
81
|
+
return nil
|
|
82
|
+
}
|
|
83
|
+
}()
|
|
84
|
+
}
|
|
85
|
+
@inline(__always)
|
|
86
|
+
set {
|
|
87
|
+
self.__username = { () -> bridge.std__optional_std__string_ in
|
|
88
|
+
if let __unwrappedValue = newValue {
|
|
89
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
90
|
+
} else {
|
|
91
|
+
return .init()
|
|
92
|
+
}
|
|
93
|
+
}()
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// CounterpartyQuoteRequest.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 `UserCounterpartyQuoteRequest` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::rncandle { struct UserCounterpartyQuoteRequest; }
|
|
23
|
+
// Forward declaration of `MerchantCounterpartyQuoteRequest` to properly resolve imports.
|
|
24
|
+
namespace margelo::nitro::rncandle { struct MerchantCounterpartyQuoteRequest; }
|
|
25
|
+
// Forward declaration of `ServiceCounterpartyQuoteRequest` to properly resolve imports.
|
|
26
|
+
namespace margelo::nitro::rncandle { struct ServiceCounterpartyQuoteRequest; }
|
|
27
|
+
|
|
28
|
+
#include "UserCounterpartyQuoteRequest.hpp"
|
|
29
|
+
#include <optional>
|
|
30
|
+
#include "MerchantCounterpartyQuoteRequest.hpp"
|
|
31
|
+
#include "ServiceCounterpartyQuoteRequest.hpp"
|
|
32
|
+
|
|
33
|
+
namespace margelo::nitro::rncandle {
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* A struct which can be represented as a JavaScript object (CounterpartyQuoteRequest).
|
|
37
|
+
*/
|
|
38
|
+
struct CounterpartyQuoteRequest {
|
|
39
|
+
public:
|
|
40
|
+
std::optional<UserCounterpartyQuoteRequest> userCounterpartyQuoteRequest SWIFT_PRIVATE;
|
|
41
|
+
std::optional<MerchantCounterpartyQuoteRequest> merchantCounterpartyQuoteRequest SWIFT_PRIVATE;
|
|
42
|
+
std::optional<ServiceCounterpartyQuoteRequest> serviceCounterpartyQuoteRequest SWIFT_PRIVATE;
|
|
43
|
+
|
|
44
|
+
public:
|
|
45
|
+
CounterpartyQuoteRequest() = default;
|
|
46
|
+
explicit CounterpartyQuoteRequest(std::optional<UserCounterpartyQuoteRequest> userCounterpartyQuoteRequest, std::optional<MerchantCounterpartyQuoteRequest> merchantCounterpartyQuoteRequest, std::optional<ServiceCounterpartyQuoteRequest> serviceCounterpartyQuoteRequest): userCounterpartyQuoteRequest(userCounterpartyQuoteRequest), merchantCounterpartyQuoteRequest(merchantCounterpartyQuoteRequest), serviceCounterpartyQuoteRequest(serviceCounterpartyQuoteRequest) {}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
} // namespace margelo::nitro::rncandle
|
|
50
|
+
|
|
51
|
+
namespace margelo::nitro {
|
|
52
|
+
|
|
53
|
+
// C++ CounterpartyQuoteRequest <> JS CounterpartyQuoteRequest (object)
|
|
54
|
+
template <>
|
|
55
|
+
struct JSIConverter<margelo::nitro::rncandle::CounterpartyQuoteRequest> final {
|
|
56
|
+
static inline margelo::nitro::rncandle::CounterpartyQuoteRequest fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
57
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
58
|
+
return margelo::nitro::rncandle::CounterpartyQuoteRequest(
|
|
59
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::UserCounterpartyQuoteRequest>>::fromJSI(runtime, obj.getProperty(runtime, "userCounterpartyQuoteRequest")),
|
|
60
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::MerchantCounterpartyQuoteRequest>>::fromJSI(runtime, obj.getProperty(runtime, "merchantCounterpartyQuoteRequest")),
|
|
61
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::ServiceCounterpartyQuoteRequest>>::fromJSI(runtime, obj.getProperty(runtime, "serviceCounterpartyQuoteRequest"))
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rncandle::CounterpartyQuoteRequest& arg) {
|
|
65
|
+
jsi::Object obj(runtime);
|
|
66
|
+
obj.setProperty(runtime, "userCounterpartyQuoteRequest", JSIConverter<std::optional<margelo::nitro::rncandle::UserCounterpartyQuoteRequest>>::toJSI(runtime, arg.userCounterpartyQuoteRequest));
|
|
67
|
+
obj.setProperty(runtime, "merchantCounterpartyQuoteRequest", JSIConverter<std::optional<margelo::nitro::rncandle::MerchantCounterpartyQuoteRequest>>::toJSI(runtime, arg.merchantCounterpartyQuoteRequest));
|
|
68
|
+
obj.setProperty(runtime, "serviceCounterpartyQuoteRequest", JSIConverter<std::optional<margelo::nitro::rncandle::ServiceCounterpartyQuoteRequest>>::toJSI(runtime, arg.serviceCounterpartyQuoteRequest));
|
|
69
|
+
return obj;
|
|
70
|
+
}
|
|
71
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
72
|
+
if (!value.isObject()) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
jsi::Object obj = value.getObject(runtime);
|
|
76
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::UserCounterpartyQuoteRequest>>::canConvert(runtime, obj.getProperty(runtime, "userCounterpartyQuoteRequest"))) return false;
|
|
77
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::MerchantCounterpartyQuoteRequest>>::canConvert(runtime, obj.getProperty(runtime, "merchantCounterpartyQuoteRequest"))) return false;
|
|
78
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::ServiceCounterpartyQuoteRequest>>::canConvert(runtime, obj.getProperty(runtime, "serviceCounterpartyQuoteRequest"))) return false;
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// MerchantCounterpartyQuoteRequest.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
|
+
#include <optional>
|
|
25
|
+
|
|
26
|
+
namespace margelo::nitro::rncandle {
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* A struct which can be represented as a JavaScript object (MerchantCounterpartyQuoteRequest).
|
|
30
|
+
*/
|
|
31
|
+
struct MerchantCounterpartyQuoteRequest {
|
|
32
|
+
public:
|
|
33
|
+
std::string kind SWIFT_PRIVATE;
|
|
34
|
+
std::optional<std::string> name SWIFT_PRIVATE;
|
|
35
|
+
|
|
36
|
+
public:
|
|
37
|
+
MerchantCounterpartyQuoteRequest() = default;
|
|
38
|
+
explicit MerchantCounterpartyQuoteRequest(std::string kind, std::optional<std::string> name): kind(kind), name(name) {}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
} // namespace margelo::nitro::rncandle
|
|
42
|
+
|
|
43
|
+
namespace margelo::nitro {
|
|
44
|
+
|
|
45
|
+
// C++ MerchantCounterpartyQuoteRequest <> JS MerchantCounterpartyQuoteRequest (object)
|
|
46
|
+
template <>
|
|
47
|
+
struct JSIConverter<margelo::nitro::rncandle::MerchantCounterpartyQuoteRequest> final {
|
|
48
|
+
static inline margelo::nitro::rncandle::MerchantCounterpartyQuoteRequest fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
49
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
50
|
+
return margelo::nitro::rncandle::MerchantCounterpartyQuoteRequest(
|
|
51
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "kind")),
|
|
52
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "name"))
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rncandle::MerchantCounterpartyQuoteRequest& arg) {
|
|
56
|
+
jsi::Object obj(runtime);
|
|
57
|
+
obj.setProperty(runtime, "kind", JSIConverter<std::string>::toJSI(runtime, arg.kind));
|
|
58
|
+
obj.setProperty(runtime, "name", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.name));
|
|
59
|
+
return obj;
|
|
60
|
+
}
|
|
61
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
62
|
+
if (!value.isObject()) {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
jsi::Object obj = value.getObject(runtime);
|
|
66
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "kind"))) return false;
|
|
67
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "name"))) return false;
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// OtherAssetQuoteRequest.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 (OtherAssetQuoteRequest).
|
|
29
|
+
*/
|
|
30
|
+
struct OtherAssetQuoteRequest {
|
|
31
|
+
public:
|
|
32
|
+
std::string assetKind SWIFT_PRIVATE;
|
|
33
|
+
|
|
34
|
+
public:
|
|
35
|
+
OtherAssetQuoteRequest() = default;
|
|
36
|
+
explicit OtherAssetQuoteRequest(std::string assetKind): assetKind(assetKind) {}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
} // namespace margelo::nitro::rncandle
|
|
40
|
+
|
|
41
|
+
namespace margelo::nitro {
|
|
42
|
+
|
|
43
|
+
// C++ OtherAssetQuoteRequest <> JS OtherAssetQuoteRequest (object)
|
|
44
|
+
template <>
|
|
45
|
+
struct JSIConverter<margelo::nitro::rncandle::OtherAssetQuoteRequest> final {
|
|
46
|
+
static inline margelo::nitro::rncandle::OtherAssetQuoteRequest fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
47
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
48
|
+
return margelo::nitro::rncandle::OtherAssetQuoteRequest(
|
|
49
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "assetKind"))
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rncandle::OtherAssetQuoteRequest& arg) {
|
|
53
|
+
jsi::Object obj(runtime);
|
|
54
|
+
obj.setProperty(runtime, "assetKind", JSIConverter<std::string>::toJSI(runtime, arg.assetKind));
|
|
55
|
+
return obj;
|
|
56
|
+
}
|
|
57
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
58
|
+
if (!value.isObject()) {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
jsi::Object obj = value.getObject(runtime);
|
|
62
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "assetKind"))) return false;
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// ServiceCounterpartyQuoteRequest.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 (ServiceCounterpartyQuoteRequest).
|
|
29
|
+
*/
|
|
30
|
+
struct ServiceCounterpartyQuoteRequest {
|
|
31
|
+
public:
|
|
32
|
+
std::string kind SWIFT_PRIVATE;
|
|
33
|
+
|
|
34
|
+
public:
|
|
35
|
+
ServiceCounterpartyQuoteRequest() = default;
|
|
36
|
+
explicit ServiceCounterpartyQuoteRequest(std::string kind): kind(kind) {}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
} // namespace margelo::nitro::rncandle
|
|
40
|
+
|
|
41
|
+
namespace margelo::nitro {
|
|
42
|
+
|
|
43
|
+
// C++ ServiceCounterpartyQuoteRequest <> JS ServiceCounterpartyQuoteRequest (object)
|
|
44
|
+
template <>
|
|
45
|
+
struct JSIConverter<margelo::nitro::rncandle::ServiceCounterpartyQuoteRequest> final {
|
|
46
|
+
static inline margelo::nitro::rncandle::ServiceCounterpartyQuoteRequest fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
47
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
48
|
+
return margelo::nitro::rncandle::ServiceCounterpartyQuoteRequest(
|
|
49
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "kind"))
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rncandle::ServiceCounterpartyQuoteRequest& arg) {
|
|
53
|
+
jsi::Object obj(runtime);
|
|
54
|
+
obj.setProperty(runtime, "kind", JSIConverter<std::string>::toJSI(runtime, arg.kind));
|
|
55
|
+
return obj;
|
|
56
|
+
}
|
|
57
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
58
|
+
if (!value.isObject()) {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
jsi::Object obj = value.getObject(runtime);
|
|
62
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "kind"))) return false;
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
} // namespace margelo::nitro
|