react-native-candle 0.1.32 → 0.1.35
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/RNCandle.swift +131 -60
- package/lib/commonjs/index.js +58 -43
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/index.js +58 -43
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +45 -37
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/specs/RNCandle.nitro.d.ts +20 -10
- package/lib/typescript/commonjs/src/specs/RNCandle.nitro.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +45 -37
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/specs/RNCandle.nitro.d.ts +20 -10
- package/lib/typescript/module/src/specs/RNCandle.nitro.d.ts.map +1 -1
- package/nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Bridge.hpp +34 -22
- package/nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Umbrella.hpp +15 -12
- package/nitrogen/generated/ios/c++/HybridRNCandleSpecSwift.hpp +15 -12
- package/nitrogen/generated/ios/swift/AssetAccount.swift +70 -11
- package/nitrogen/generated/ios/swift/AssetAccountKind.swift +4 -0
- package/nitrogen/generated/ios/swift/{FiatAccountDetails.swift → FiatAccount.swift} +32 -8
- package/nitrogen/generated/ios/swift/{LegalAccountKind.swift → FiatMarketAccountKind.swift} +14 -10
- package/nitrogen/generated/ios/swift/{MarketAccountDetails.swift → MarketAccount.swift} +31 -7
- package/nitrogen/generated/ios/swift/TransportAccount.swift +93 -0
- package/nitrogen/generated/ios/swift/TransportAccountKind.swift +42 -0
- package/nitrogen/generated/ios/swift/TransportAsset.swift +18 -6
- package/nitrogen/generated/shared/c++/AssetAccount.hpp +23 -20
- package/nitrogen/generated/shared/c++/AssetAccountKind.hpp +4 -0
- package/nitrogen/generated/shared/c++/{FiatAccountDetails.hpp → FiatAccount.hpp} +21 -10
- package/nitrogen/generated/shared/c++/FiatMarketAccountKind.hpp +90 -0
- package/nitrogen/generated/shared/c++/{MarketAccountDetails.hpp → MarketAccount.hpp} +21 -10
- package/nitrogen/generated/shared/c++/TransportAccount.hpp +94 -0
- package/nitrogen/generated/shared/c++/{LegalAccountKind.hpp → TransportAccountKind.hpp} +17 -21
- package/nitrogen/generated/shared/c++/TransportAsset.hpp +5 -1
- package/package.json +4 -4
- package/src/index.ts +105 -82
- package/src/specs/RNCandle.nitro.ts +27 -15
- package/nitrogen/generated/ios/swift/AssetAccountDetails.swift +0 -83
- package/nitrogen/generated/shared/c++/AssetAccountDetails.hpp +0 -78
|
@@ -1,78 +0,0 @@
|
|
|
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
|