react-native-candle 0.1.16 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ReactNativeCandle.podspec +1 -1
- package/ios/Sources/CandleLinkSheetWrapperView.swift +2 -167
- package/ios/Sources/RNCandle.swift +558 -47
- package/lib/commonjs/index.js +157 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/index.js +157 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +79 -3
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/specs/RNCandle.nitro.d.ts +197 -9
- package/lib/typescript/commonjs/src/specs/RNCandle.nitro.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +79 -3
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/specs/RNCandle.nitro.d.ts +197 -9
- package/lib/typescript/module/src/specs/RNCandle.nitro.d.ts.map +1 -1
- package/nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Bridge.cpp +36 -4
- package/nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Bridge.hpp +528 -35
- package/nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Umbrella.hpp +108 -6
- package/nitrogen/generated/ios/c++/HybridRNCandleSpecSwift.hpp +122 -12
- package/nitrogen/generated/ios/swift/ACHAccountKind.swift +38 -0
- package/nitrogen/generated/ios/swift/ACHDetails.swift +55 -0
- package/nitrogen/generated/ios/swift/{Details.swift → ActiveLinkedAccountDetails.swift} +55 -22
- package/nitrogen/generated/ios/swift/Address.swift +33 -0
- package/nitrogen/generated/ios/swift/AssetAccount.swift +55 -0
- package/nitrogen/generated/ios/swift/AssetAccountDetails.swift +83 -0
- package/nitrogen/generated/ios/swift/AssetAccountKind.swift +42 -0
- package/nitrogen/generated/ios/swift/AssetAccountQuery.swift +76 -0
- package/nitrogen/generated/ios/swift/Coordinates.swift +44 -0
- package/nitrogen/generated/ios/swift/Counterparty.swift +115 -0
- package/nitrogen/generated/ios/swift/FiatAccountDetails.swift +165 -0
- package/nitrogen/generated/ios/swift/FiatAsset.swift +123 -0
- package/nitrogen/generated/ios/swift/FiatAssetQuoteRequest.swift +119 -0
- package/nitrogen/generated/ios/swift/Func_void_Trade.swift +44 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_AssetAccount_.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_TradeQuote_.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_Trade_.swift +45 -0
- package/nitrogen/generated/ios/swift/HybridRNCandleSpec.swift +4 -3
- package/nitrogen/generated/ios/swift/HybridRNCandleSpec_cxx.swift +79 -40
- package/nitrogen/generated/ios/swift/InactiveLinkedAccountDetails.swift +33 -0
- package/nitrogen/generated/ios/swift/LegalAccountKind.swift +46 -0
- package/nitrogen/generated/ios/swift/LinkedAccount.swift +16 -34
- package/nitrogen/generated/ios/swift/LinkedAccountDetails.swift +87 -0
- package/nitrogen/generated/ios/swift/MarketAccountDetails.swift +69 -0
- package/nitrogen/generated/ios/swift/MarketAssetQuoteRequest.swift +151 -0
- package/nitrogen/generated/ios/swift/MarketTradeAsset.swift +150 -0
- package/nitrogen/generated/ios/swift/MerchantCounterparty.swift +86 -0
- package/nitrogen/generated/ios/swift/MerchantLocation.swift +55 -0
- package/nitrogen/generated/ios/swift/NothingAsset.swift +33 -0
- package/nitrogen/generated/ios/swift/NothingAssetQuoteRequest.swift +33 -0
- package/nitrogen/generated/ios/swift/OtherAsset.swift +33 -0
- package/nitrogen/generated/ios/swift/ServiceCounterparty.swift +44 -0
- package/nitrogen/generated/ios/swift/Trade.swift +80 -0
- package/nitrogen/generated/ios/swift/TradeAsset.swift +175 -0
- package/nitrogen/generated/ios/swift/TradeAssetQuoteRequest.swift +148 -0
- package/nitrogen/generated/ios/swift/TradeQuery.swift +175 -0
- package/nitrogen/generated/ios/swift/TradeQuote.swift +44 -0
- package/nitrogen/generated/ios/swift/TradeQuoteRequest.swift +63 -0
- package/nitrogen/generated/ios/swift/TradeState.swift +42 -0
- package/nitrogen/generated/ios/swift/TransportAsset.swift +174 -0
- package/nitrogen/generated/ios/swift/TransportAssetQuoteRequest.swift +212 -0
- package/nitrogen/generated/ios/swift/UserCounterparty.swift +66 -0
- package/nitrogen/generated/ios/swift/WireDetails.swift +44 -0
- package/nitrogen/generated/shared/c++/{State.hpp → ACHAccountKind.hpp} +17 -17
- package/nitrogen/generated/shared/c++/ACHDetails.hpp +79 -0
- package/nitrogen/generated/shared/c++/{Details.hpp → ActiveLinkedAccountDetails.hpp} +25 -23
- package/nitrogen/generated/shared/c++/Address.hpp +69 -0
- package/nitrogen/generated/shared/c++/AssetAccount.hpp +82 -0
- package/nitrogen/generated/shared/c++/AssetAccountDetails.hpp +78 -0
- package/nitrogen/generated/shared/c++/AssetAccountKind.hpp +82 -0
- package/nitrogen/generated/shared/c++/AssetAccountQuery.hpp +76 -0
- package/nitrogen/generated/shared/c++/Coordinates.hpp +73 -0
- package/nitrogen/generated/shared/c++/Counterparty.hpp +85 -0
- package/nitrogen/generated/shared/c++/FiatAccountDetails.hpp +106 -0
- package/nitrogen/generated/shared/c++/FiatAsset.hpp +96 -0
- package/nitrogen/generated/shared/c++/FiatAssetQuoteRequest.hpp +82 -0
- package/nitrogen/generated/shared/c++/HybridRNCandleSpec.cpp +1 -0
- package/nitrogen/generated/shared/c++/HybridRNCandleSpec.hpp +22 -3
- package/nitrogen/generated/shared/c++/InactiveLinkedAccountDetails.hpp +69 -0
- package/nitrogen/generated/shared/c++/LegalAccountKind.hpp +86 -0
- package/nitrogen/generated/shared/c++/LinkedAccount.hpp +13 -14
- package/nitrogen/generated/shared/c++/LinkedAccountDetails.hpp +78 -0
- package/nitrogen/generated/shared/c++/MarketAccountDetails.hpp +83 -0
- package/nitrogen/generated/shared/c++/MarketAssetQuoteRequest.hpp +86 -0
- package/nitrogen/generated/shared/c++/MarketTradeAsset.hpp +111 -0
- package/nitrogen/generated/shared/c++/MerchantCounterparty.hpp +84 -0
- package/nitrogen/generated/shared/c++/MerchantLocation.hpp +77 -0
- package/nitrogen/generated/shared/c++/NothingAsset.hpp +69 -0
- package/nitrogen/generated/shared/c++/NothingAssetQuoteRequest.hpp +69 -0
- package/nitrogen/generated/shared/c++/OtherAsset.hpp +69 -0
- package/nitrogen/generated/shared/c++/ServiceCounterparty.hpp +75 -0
- package/nitrogen/generated/shared/c++/Trade.hpp +93 -0
- package/nitrogen/generated/shared/c++/TradeAsset.hpp +99 -0
- package/nitrogen/generated/shared/c++/TradeAssetQuoteRequest.hpp +92 -0
- package/nitrogen/generated/shared/c++/TradeQuery.hpp +86 -0
- package/nitrogen/generated/shared/c++/TradeQuote.hpp +74 -0
- package/nitrogen/generated/shared/c++/TradeQuoteRequest.hpp +76 -0
- package/nitrogen/generated/shared/c++/TradeState.hpp +82 -0
- package/nitrogen/generated/shared/c++/TransportAsset.hpp +125 -0
- package/nitrogen/generated/shared/c++/TransportAssetQuoteRequest.hpp +99 -0
- package/nitrogen/generated/shared/c++/UserCounterparty.hpp +81 -0
- package/nitrogen/generated/shared/c++/WireDetails.hpp +73 -0
- package/package.json +1 -1
- package/src/index.ts +259 -3
- package/src/specs/RNCandle.nitro.ts +237 -10
- package/nitrogen/generated/ios/swift/State.swift +0 -38
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// ACHDetails.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 `ACHAccountKind` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::rncandle { enum class ACHAccountKind; }
|
|
23
|
+
|
|
24
|
+
#include <string>
|
|
25
|
+
#include "ACHAccountKind.hpp"
|
|
26
|
+
|
|
27
|
+
namespace margelo::nitro::rncandle {
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* A struct which can be represented as a JavaScript object (ACHDetails).
|
|
31
|
+
*/
|
|
32
|
+
struct ACHDetails {
|
|
33
|
+
public:
|
|
34
|
+
std::string accountNumber SWIFT_PRIVATE;
|
|
35
|
+
std::string routingNumber SWIFT_PRIVATE;
|
|
36
|
+
ACHAccountKind accountKind SWIFT_PRIVATE;
|
|
37
|
+
|
|
38
|
+
public:
|
|
39
|
+
ACHDetails() = default;
|
|
40
|
+
explicit ACHDetails(std::string accountNumber, std::string routingNumber, ACHAccountKind accountKind): accountNumber(accountNumber), routingNumber(routingNumber), accountKind(accountKind) {}
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
} // namespace margelo::nitro::rncandle
|
|
44
|
+
|
|
45
|
+
namespace margelo::nitro {
|
|
46
|
+
|
|
47
|
+
using namespace margelo::nitro::rncandle;
|
|
48
|
+
|
|
49
|
+
// C++ ACHDetails <> JS ACHDetails (object)
|
|
50
|
+
template <>
|
|
51
|
+
struct JSIConverter<ACHDetails> final {
|
|
52
|
+
static inline ACHDetails fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
53
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
54
|
+
return ACHDetails(
|
|
55
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "accountNumber")),
|
|
56
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "routingNumber")),
|
|
57
|
+
JSIConverter<ACHAccountKind>::fromJSI(runtime, obj.getProperty(runtime, "accountKind"))
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const ACHDetails& arg) {
|
|
61
|
+
jsi::Object obj(runtime);
|
|
62
|
+
obj.setProperty(runtime, "accountNumber", JSIConverter<std::string>::toJSI(runtime, arg.accountNumber));
|
|
63
|
+
obj.setProperty(runtime, "routingNumber", JSIConverter<std::string>::toJSI(runtime, arg.routingNumber));
|
|
64
|
+
obj.setProperty(runtime, "accountKind", JSIConverter<ACHAccountKind>::toJSI(runtime, arg.accountKind));
|
|
65
|
+
return obj;
|
|
66
|
+
}
|
|
67
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
68
|
+
if (!value.isObject()) {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
jsi::Object obj = value.getObject(runtime);
|
|
72
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "accountNumber"))) return false;
|
|
73
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "routingNumber"))) return false;
|
|
74
|
+
if (!JSIConverter<ACHAccountKind>::canConvert(runtime, obj.getProperty(runtime, "accountKind"))) return false;
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
} // namespace margelo::nitro
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///
|
|
2
|
-
///
|
|
2
|
+
/// ActiveLinkedAccountDetails.hpp
|
|
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
|
|
@@ -18,28 +18,27 @@
|
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
19
|
#endif
|
|
20
20
|
|
|
21
|
-
// Forward declaration of `State` to properly resolve imports.
|
|
22
|
-
namespace margelo::nitro::rncandle { enum class State; }
|
|
23
21
|
|
|
24
|
-
|
|
25
|
-
#include <optional>
|
|
22
|
+
|
|
26
23
|
#include <string>
|
|
24
|
+
#include <optional>
|
|
27
25
|
|
|
28
26
|
namespace margelo::nitro::rncandle {
|
|
29
27
|
|
|
30
28
|
/**
|
|
31
|
-
* A struct which can be represented as a JavaScript object (
|
|
29
|
+
* A struct which can be represented as a JavaScript object (ActiveLinkedAccountDetails).
|
|
32
30
|
*/
|
|
33
|
-
struct
|
|
31
|
+
struct ActiveLinkedAccountDetails {
|
|
34
32
|
public:
|
|
35
|
-
|
|
33
|
+
std::string state SWIFT_PRIVATE;
|
|
34
|
+
std::optional<std::string> accountOpened SWIFT_PRIVATE;
|
|
36
35
|
std::optional<std::string> username SWIFT_PRIVATE;
|
|
36
|
+
std::optional<std::string> emailAddress SWIFT_PRIVATE;
|
|
37
37
|
std::string legalName SWIFT_PRIVATE;
|
|
38
|
-
std::optional<std::string> accountOpened SWIFT_PRIVATE;
|
|
39
38
|
|
|
40
39
|
public:
|
|
41
|
-
|
|
42
|
-
explicit
|
|
40
|
+
ActiveLinkedAccountDetails() = default;
|
|
41
|
+
explicit ActiveLinkedAccountDetails(std::string state, std::optional<std::string> accountOpened, std::optional<std::string> username, std::optional<std::string> emailAddress, std::string legalName): state(state), accountOpened(accountOpened), username(username), emailAddress(emailAddress), legalName(legalName) {}
|
|
43
42
|
};
|
|
44
43
|
|
|
45
44
|
} // namespace margelo::nitro::rncandle
|
|
@@ -48,24 +47,26 @@ namespace margelo::nitro {
|
|
|
48
47
|
|
|
49
48
|
using namespace margelo::nitro::rncandle;
|
|
50
49
|
|
|
51
|
-
// C++
|
|
50
|
+
// C++ ActiveLinkedAccountDetails <> JS ActiveLinkedAccountDetails (object)
|
|
52
51
|
template <>
|
|
53
|
-
struct JSIConverter<
|
|
54
|
-
static inline
|
|
52
|
+
struct JSIConverter<ActiveLinkedAccountDetails> final {
|
|
53
|
+
static inline ActiveLinkedAccountDetails fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
55
54
|
jsi::Object obj = arg.asObject(runtime);
|
|
56
|
-
return
|
|
57
|
-
JSIConverter<
|
|
55
|
+
return ActiveLinkedAccountDetails(
|
|
56
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "state")),
|
|
57
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "accountOpened")),
|
|
58
58
|
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "username")),
|
|
59
|
-
JSIConverter<std::string
|
|
60
|
-
JSIConverter<std::
|
|
59
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "emailAddress")),
|
|
60
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "legalName"))
|
|
61
61
|
);
|
|
62
62
|
}
|
|
63
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const
|
|
63
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const ActiveLinkedAccountDetails& arg) {
|
|
64
64
|
jsi::Object obj(runtime);
|
|
65
|
-
obj.setProperty(runtime, "state", JSIConverter<
|
|
65
|
+
obj.setProperty(runtime, "state", JSIConverter<std::string>::toJSI(runtime, arg.state));
|
|
66
|
+
obj.setProperty(runtime, "accountOpened", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.accountOpened));
|
|
66
67
|
obj.setProperty(runtime, "username", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.username));
|
|
68
|
+
obj.setProperty(runtime, "emailAddress", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.emailAddress));
|
|
67
69
|
obj.setProperty(runtime, "legalName", JSIConverter<std::string>::toJSI(runtime, arg.legalName));
|
|
68
|
-
obj.setProperty(runtime, "accountOpened", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.accountOpened));
|
|
69
70
|
return obj;
|
|
70
71
|
}
|
|
71
72
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -73,10 +74,11 @@ namespace margelo::nitro {
|
|
|
73
74
|
return false;
|
|
74
75
|
}
|
|
75
76
|
jsi::Object obj = value.getObject(runtime);
|
|
76
|
-
if (!JSIConverter<
|
|
77
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "state"))) return false;
|
|
78
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "accountOpened"))) return false;
|
|
77
79
|
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "username"))) return false;
|
|
80
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "emailAddress"))) return false;
|
|
78
81
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "legalName"))) return false;
|
|
79
|
-
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "accountOpened"))) return false;
|
|
80
82
|
return true;
|
|
81
83
|
}
|
|
82
84
|
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Address.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 (Address).
|
|
29
|
+
*/
|
|
30
|
+
struct Address {
|
|
31
|
+
public:
|
|
32
|
+
std::string value SWIFT_PRIVATE;
|
|
33
|
+
|
|
34
|
+
public:
|
|
35
|
+
Address() = default;
|
|
36
|
+
explicit Address(std::string value): value(value) {}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
} // namespace margelo::nitro::rncandle
|
|
40
|
+
|
|
41
|
+
namespace margelo::nitro {
|
|
42
|
+
|
|
43
|
+
using namespace margelo::nitro::rncandle;
|
|
44
|
+
|
|
45
|
+
// C++ Address <> JS Address (object)
|
|
46
|
+
template <>
|
|
47
|
+
struct JSIConverter<Address> final {
|
|
48
|
+
static inline Address fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
49
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
50
|
+
return Address(
|
|
51
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "value"))
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const Address& arg) {
|
|
55
|
+
jsi::Object obj(runtime);
|
|
56
|
+
obj.setProperty(runtime, "value", JSIConverter<std::string>::toJSI(runtime, arg.value));
|
|
57
|
+
return obj;
|
|
58
|
+
}
|
|
59
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
60
|
+
if (!value.isObject()) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
jsi::Object obj = value.getObject(runtime);
|
|
64
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "value"))) return false;
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// AssetAccount.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 `LegalAccountKind` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::rncandle { enum class LegalAccountKind; }
|
|
23
|
+
// Forward declaration of `AssetAccountDetails` to properly resolve imports.
|
|
24
|
+
namespace margelo::nitro::rncandle { struct AssetAccountDetails; }
|
|
25
|
+
|
|
26
|
+
#include "LegalAccountKind.hpp"
|
|
27
|
+
#include <string>
|
|
28
|
+
#include "AssetAccountDetails.hpp"
|
|
29
|
+
|
|
30
|
+
namespace margelo::nitro::rncandle {
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* A struct which can be represented as a JavaScript object (AssetAccount).
|
|
34
|
+
*/
|
|
35
|
+
struct AssetAccount {
|
|
36
|
+
public:
|
|
37
|
+
LegalAccountKind legalAccountKind SWIFT_PRIVATE;
|
|
38
|
+
std::string nickname SWIFT_PRIVATE;
|
|
39
|
+
AssetAccountDetails details SWIFT_PRIVATE;
|
|
40
|
+
|
|
41
|
+
public:
|
|
42
|
+
AssetAccount() = default;
|
|
43
|
+
explicit AssetAccount(LegalAccountKind legalAccountKind, std::string nickname, AssetAccountDetails details): legalAccountKind(legalAccountKind), nickname(nickname), details(details) {}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
} // namespace margelo::nitro::rncandle
|
|
47
|
+
|
|
48
|
+
namespace margelo::nitro {
|
|
49
|
+
|
|
50
|
+
using namespace margelo::nitro::rncandle;
|
|
51
|
+
|
|
52
|
+
// C++ AssetAccount <> JS AssetAccount (object)
|
|
53
|
+
template <>
|
|
54
|
+
struct JSIConverter<AssetAccount> final {
|
|
55
|
+
static inline AssetAccount fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
56
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
57
|
+
return AssetAccount(
|
|
58
|
+
JSIConverter<LegalAccountKind>::fromJSI(runtime, obj.getProperty(runtime, "legalAccountKind")),
|
|
59
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "nickname")),
|
|
60
|
+
JSIConverter<AssetAccountDetails>::fromJSI(runtime, obj.getProperty(runtime, "details"))
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const AssetAccount& arg) {
|
|
64
|
+
jsi::Object obj(runtime);
|
|
65
|
+
obj.setProperty(runtime, "legalAccountKind", JSIConverter<LegalAccountKind>::toJSI(runtime, arg.legalAccountKind));
|
|
66
|
+
obj.setProperty(runtime, "nickname", JSIConverter<std::string>::toJSI(runtime, arg.nickname));
|
|
67
|
+
obj.setProperty(runtime, "details", JSIConverter<AssetAccountDetails>::toJSI(runtime, arg.details));
|
|
68
|
+
return obj;
|
|
69
|
+
}
|
|
70
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
71
|
+
if (!value.isObject()) {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
jsi::Object obj = value.getObject(runtime);
|
|
75
|
+
if (!JSIConverter<LegalAccountKind>::canConvert(runtime, obj.getProperty(runtime, "legalAccountKind"))) return false;
|
|
76
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "nickname"))) return false;
|
|
77
|
+
if (!JSIConverter<AssetAccountDetails>::canConvert(runtime, obj.getProperty(runtime, "details"))) return false;
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// AssetAccountDetails.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 `FiatAccountDetails` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::rncandle { struct FiatAccountDetails; }
|
|
23
|
+
// Forward declaration of `MarketAccountDetails` to properly resolve imports.
|
|
24
|
+
namespace margelo::nitro::rncandle { struct MarketAccountDetails; }
|
|
25
|
+
|
|
26
|
+
#include <optional>
|
|
27
|
+
#include "FiatAccountDetails.hpp"
|
|
28
|
+
#include "MarketAccountDetails.hpp"
|
|
29
|
+
|
|
30
|
+
namespace margelo::nitro::rncandle {
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* A struct which can be represented as a JavaScript object (AssetAccountDetails).
|
|
34
|
+
*/
|
|
35
|
+
struct AssetAccountDetails {
|
|
36
|
+
public:
|
|
37
|
+
std::optional<FiatAccountDetails> fiatAccountDetails SWIFT_PRIVATE;
|
|
38
|
+
std::optional<MarketAccountDetails> marketAccountDetails SWIFT_PRIVATE;
|
|
39
|
+
|
|
40
|
+
public:
|
|
41
|
+
AssetAccountDetails() = default;
|
|
42
|
+
explicit AssetAccountDetails(std::optional<FiatAccountDetails> fiatAccountDetails, std::optional<MarketAccountDetails> marketAccountDetails): fiatAccountDetails(fiatAccountDetails), marketAccountDetails(marketAccountDetails) {}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
} // namespace margelo::nitro::rncandle
|
|
46
|
+
|
|
47
|
+
namespace margelo::nitro {
|
|
48
|
+
|
|
49
|
+
using namespace margelo::nitro::rncandle;
|
|
50
|
+
|
|
51
|
+
// C++ AssetAccountDetails <> JS AssetAccountDetails (object)
|
|
52
|
+
template <>
|
|
53
|
+
struct JSIConverter<AssetAccountDetails> final {
|
|
54
|
+
static inline AssetAccountDetails fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
55
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
56
|
+
return AssetAccountDetails(
|
|
57
|
+
JSIConverter<std::optional<FiatAccountDetails>>::fromJSI(runtime, obj.getProperty(runtime, "fiatAccountDetails")),
|
|
58
|
+
JSIConverter<std::optional<MarketAccountDetails>>::fromJSI(runtime, obj.getProperty(runtime, "marketAccountDetails"))
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const AssetAccountDetails& arg) {
|
|
62
|
+
jsi::Object obj(runtime);
|
|
63
|
+
obj.setProperty(runtime, "fiatAccountDetails", JSIConverter<std::optional<FiatAccountDetails>>::toJSI(runtime, arg.fiatAccountDetails));
|
|
64
|
+
obj.setProperty(runtime, "marketAccountDetails", JSIConverter<std::optional<MarketAccountDetails>>::toJSI(runtime, arg.marketAccountDetails));
|
|
65
|
+
return obj;
|
|
66
|
+
}
|
|
67
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
68
|
+
if (!value.isObject()) {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
jsi::Object obj = value.getObject(runtime);
|
|
72
|
+
if (!JSIConverter<std::optional<FiatAccountDetails>>::canConvert(runtime, obj.getProperty(runtime, "fiatAccountDetails"))) return false;
|
|
73
|
+
if (!JSIConverter<std::optional<MarketAccountDetails>>::canConvert(runtime, obj.getProperty(runtime, "marketAccountDetails"))) return false;
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// AssetAccountKind.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/NitroHash.hpp>)
|
|
11
|
+
#include <NitroModules/NitroHash.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
16
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
21
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
namespace margelo::nitro::rncandle {
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* An enum which can be represented as a JavaScript union (AssetAccountKind).
|
|
30
|
+
*/
|
|
31
|
+
enum class AssetAccountKind {
|
|
32
|
+
FIAT SWIFT_NAME(fiat) = 0,
|
|
33
|
+
STOCK SWIFT_NAME(stock) = 1,
|
|
34
|
+
CRYPTO SWIFT_NAME(crypto) = 2,
|
|
35
|
+
} CLOSED_ENUM;
|
|
36
|
+
|
|
37
|
+
} // namespace margelo::nitro::rncandle
|
|
38
|
+
|
|
39
|
+
namespace margelo::nitro {
|
|
40
|
+
|
|
41
|
+
using namespace margelo::nitro::rncandle;
|
|
42
|
+
|
|
43
|
+
// C++ AssetAccountKind <> JS AssetAccountKind (union)
|
|
44
|
+
template <>
|
|
45
|
+
struct JSIConverter<AssetAccountKind> final {
|
|
46
|
+
static inline AssetAccountKind fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
47
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
48
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
49
|
+
case hashString("fiat"): return AssetAccountKind::FIAT;
|
|
50
|
+
case hashString("stock"): return AssetAccountKind::STOCK;
|
|
51
|
+
case hashString("crypto"): return AssetAccountKind::CRYPTO;
|
|
52
|
+
default: [[unlikely]]
|
|
53
|
+
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum AssetAccountKind - invalid value!");
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, AssetAccountKind arg) {
|
|
57
|
+
switch (arg) {
|
|
58
|
+
case AssetAccountKind::FIAT: return JSIConverter<std::string>::toJSI(runtime, "fiat");
|
|
59
|
+
case AssetAccountKind::STOCK: return JSIConverter<std::string>::toJSI(runtime, "stock");
|
|
60
|
+
case AssetAccountKind::CRYPTO: return JSIConverter<std::string>::toJSI(runtime, "crypto");
|
|
61
|
+
default: [[unlikely]]
|
|
62
|
+
throw std::invalid_argument("Cannot convert AssetAccountKind to JS - invalid value: "
|
|
63
|
+
+ std::to_string(static_cast<int>(arg)) + "!");
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
67
|
+
if (!value.isString()) {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, value);
|
|
71
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
72
|
+
case hashString("fiat"):
|
|
73
|
+
case hashString("stock"):
|
|
74
|
+
case hashString("crypto"):
|
|
75
|
+
return true;
|
|
76
|
+
default:
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// AssetAccountQuery.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 `AssetAccountKind` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::rncandle { enum class AssetAccountKind; }
|
|
23
|
+
|
|
24
|
+
#include <optional>
|
|
25
|
+
#include <string>
|
|
26
|
+
#include "AssetAccountKind.hpp"
|
|
27
|
+
|
|
28
|
+
namespace margelo::nitro::rncandle {
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* A struct which can be represented as a JavaScript object (AssetAccountQuery).
|
|
32
|
+
*/
|
|
33
|
+
struct AssetAccountQuery {
|
|
34
|
+
public:
|
|
35
|
+
std::optional<std::string> linkedAccountIDs SWIFT_PRIVATE;
|
|
36
|
+
std::optional<AssetAccountKind> assetKind SWIFT_PRIVATE;
|
|
37
|
+
|
|
38
|
+
public:
|
|
39
|
+
AssetAccountQuery() = default;
|
|
40
|
+
explicit AssetAccountQuery(std::optional<std::string> linkedAccountIDs, std::optional<AssetAccountKind> assetKind): linkedAccountIDs(linkedAccountIDs), assetKind(assetKind) {}
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
} // namespace margelo::nitro::rncandle
|
|
44
|
+
|
|
45
|
+
namespace margelo::nitro {
|
|
46
|
+
|
|
47
|
+
using namespace margelo::nitro::rncandle;
|
|
48
|
+
|
|
49
|
+
// C++ AssetAccountQuery <> JS AssetAccountQuery (object)
|
|
50
|
+
template <>
|
|
51
|
+
struct JSIConverter<AssetAccountQuery> final {
|
|
52
|
+
static inline AssetAccountQuery fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
53
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
54
|
+
return AssetAccountQuery(
|
|
55
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "linkedAccountIDs")),
|
|
56
|
+
JSIConverter<std::optional<AssetAccountKind>>::fromJSI(runtime, obj.getProperty(runtime, "assetKind"))
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const AssetAccountQuery& arg) {
|
|
60
|
+
jsi::Object obj(runtime);
|
|
61
|
+
obj.setProperty(runtime, "linkedAccountIDs", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.linkedAccountIDs));
|
|
62
|
+
obj.setProperty(runtime, "assetKind", JSIConverter<std::optional<AssetAccountKind>>::toJSI(runtime, arg.assetKind));
|
|
63
|
+
return obj;
|
|
64
|
+
}
|
|
65
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
66
|
+
if (!value.isObject()) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
jsi::Object obj = value.getObject(runtime);
|
|
70
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "linkedAccountIDs"))) return false;
|
|
71
|
+
if (!JSIConverter<std::optional<AssetAccountKind>>::canConvert(runtime, obj.getProperty(runtime, "assetKind"))) return false;
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Coordinates.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
|
+
|
|
24
|
+
|
|
25
|
+
namespace margelo::nitro::rncandle {
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* A struct which can be represented as a JavaScript object (Coordinates).
|
|
29
|
+
*/
|
|
30
|
+
struct Coordinates {
|
|
31
|
+
public:
|
|
32
|
+
double latitude SWIFT_PRIVATE;
|
|
33
|
+
double longitude SWIFT_PRIVATE;
|
|
34
|
+
|
|
35
|
+
public:
|
|
36
|
+
Coordinates() = default;
|
|
37
|
+
explicit Coordinates(double latitude, double longitude): latitude(latitude), longitude(longitude) {}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
} // namespace margelo::nitro::rncandle
|
|
41
|
+
|
|
42
|
+
namespace margelo::nitro {
|
|
43
|
+
|
|
44
|
+
using namespace margelo::nitro::rncandle;
|
|
45
|
+
|
|
46
|
+
// C++ Coordinates <> JS Coordinates (object)
|
|
47
|
+
template <>
|
|
48
|
+
struct JSIConverter<Coordinates> final {
|
|
49
|
+
static inline Coordinates fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
50
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
51
|
+
return Coordinates(
|
|
52
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "latitude")),
|
|
53
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "longitude"))
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const Coordinates& arg) {
|
|
57
|
+
jsi::Object obj(runtime);
|
|
58
|
+
obj.setProperty(runtime, "latitude", JSIConverter<double>::toJSI(runtime, arg.latitude));
|
|
59
|
+
obj.setProperty(runtime, "longitude", JSIConverter<double>::toJSI(runtime, arg.longitude));
|
|
60
|
+
return obj;
|
|
61
|
+
}
|
|
62
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
63
|
+
if (!value.isObject()) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
jsi::Object obj = value.getObject(runtime);
|
|
67
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "latitude"))) return false;
|
|
68
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "longitude"))) return false;
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
} // namespace margelo::nitro
|