react-native-candle 1.0.1 → 19.0.6-beta
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/README.md +23 -178
- package/ReactNativeCandle.podspec +2 -2
- package/android/CMakeLists.txt +11 -0
- package/android/build.gradle +136 -0
- package/android/gradle.properties +2 -0
- package/android/src/main/AndroidManifest.xml +1 -0
- package/android/src/main/cpp/cpp-adapter.cpp +9 -0
- package/android/src/main/java/com/margelo/nitro/rncandle/BridgeTypes.kt +814 -0
- package/android/src/main/java/com/margelo/nitro/rncandle/HybridRNCandle.kt +251 -0
- package/android/src/main/java/com/margelo/nitro/rncandle/ReactNativeCandlePackage.kt +22 -0
- package/ios/Sources/RNCandle.swift +18 -4
- package/ios/Sources/Types.swift +280 -175
- package/lib/typescript/commonjs/src/context.d.ts +4 -7
- package/lib/typescript/commonjs/src/index.d.ts +4 -4
- package/lib/typescript/commonjs/src/provider.d.ts +1 -1
- package/lib/typescript/commonjs/src/specs/RNCandle.nitro.d.ts +134 -72
- package/lib/typescript/commonjs/src/types.d.ts +70 -68
- package/lib/typescript/module/src/context.d.ts +4 -7
- package/lib/typescript/module/src/index.d.ts +4 -4
- package/lib/typescript/module/src/provider.d.ts +1 -1
- package/lib/typescript/module/src/specs/RNCandle.nitro.d.ts +134 -72
- package/lib/typescript/module/src/types.d.ts +70 -68
- package/nitrogen/generated/android/ReactNativeCandle+autolinking.cmake +81 -0
- package/nitrogen/generated/android/ReactNativeCandle+autolinking.gradle +27 -0
- package/nitrogen/generated/android/ReactNativeCandleOnLoad.cpp +58 -0
- package/nitrogen/generated/android/ReactNativeCandleOnLoad.hpp +34 -0
- package/nitrogen/generated/android/c++/JACHAccountKind.hpp +58 -0
- package/nitrogen/generated/android/c++/JACHDetails.hpp +67 -0
- package/nitrogen/generated/android/c++/JActiveLinkedAccountDetails.hpp +74 -0
- package/nitrogen/generated/android/c++/JAddress.hpp +57 -0
- package/nitrogen/generated/android/c++/JAssetAccount.hpp +90 -0
- package/nitrogen/generated/android/c++/JAssetAccountKind.hpp +64 -0
- package/nitrogen/generated/android/c++/JAssetAccountRef.hpp +67 -0
- package/nitrogen/generated/android/c++/JAssetAccountsQuery.hpp +64 -0
- package/nitrogen/generated/android/c++/JAssetAccountsResponse.hpp +125 -0
- package/nitrogen/generated/android/c++/JCoordinates.hpp +61 -0
- package/nitrogen/generated/android/c++/JCounterparty.hpp +76 -0
- package/nitrogen/generated/android/c++/JCounterpartyKind.hpp +61 -0
- package/nitrogen/generated/android/c++/JCounterpartyQuoteRequest.hpp +74 -0
- package/nitrogen/generated/android/c++/JCryptoAccount.hpp +81 -0
- package/nitrogen/generated/android/c++/JCryptoAsset.hpp +99 -0
- package/nitrogen/generated/android/c++/JCryptoAssetQuoteRequest.hpp +74 -0
- package/nitrogen/generated/android/c++/JCryptoAssetRef.hpp +65 -0
- package/nitrogen/generated/android/c++/JEventAsset.hpp +107 -0
- package/nitrogen/generated/android/c++/JEventAssetQuoteRequest.hpp +70 -0
- package/nitrogen/generated/android/c++/JEventAssetRef.hpp +65 -0
- package/nitrogen/generated/android/c++/JFiatAccount.hpp +104 -0
- package/nitrogen/generated/android/c++/JFiatAsset.hpp +84 -0
- package/nitrogen/generated/android/c++/JFiatAssetQuoteRequest.hpp +70 -0
- package/nitrogen/generated/android/c++/JFiatAssetRef.hpp +66 -0
- package/nitrogen/generated/android/c++/JFinancialAccountKind.hpp +67 -0
- package/nitrogen/generated/android/c++/JFunc_void_LinkedAccount.hpp +89 -0
- package/nitrogen/generated/android/c++/JFunc_void_TradeExecutionResult.hpp +115 -0
- package/nitrogen/generated/android/c++/JHybridRNCandleSpec.cpp +559 -0
- package/nitrogen/generated/android/c++/JHybridRNCandleSpec.hpp +77 -0
- package/nitrogen/generated/android/c++/JInactiveLinkedAccountDetails.hpp +57 -0
- package/nitrogen/generated/android/c++/JLinkedAccount.hpp +80 -0
- package/nitrogen/generated/android/c++/JLinkedAccountDetails.hpp +72 -0
- package/nitrogen/generated/android/c++/JLinkedAccountRef.hpp +57 -0
- package/nitrogen/generated/android/c++/JLinkedAccountState.hpp +61 -0
- package/nitrogen/generated/android/c++/JLinkedAccountStatusRef.hpp +73 -0
- package/nitrogen/generated/android/c++/JMerchantCounterparty.hpp +72 -0
- package/nitrogen/generated/android/c++/JMerchantCounterpartyQuoteRequest.hpp +68 -0
- package/nitrogen/generated/android/c++/JMerchantLocation.hpp +65 -0
- package/nitrogen/generated/android/c++/JNothingAsset.hpp +57 -0
- package/nitrogen/generated/android/c++/JNothingAssetQuoteRequest.hpp +57 -0
- package/nitrogen/generated/android/c++/JNothingAssetRef.hpp +57 -0
- package/nitrogen/generated/android/c++/JOtherAsset.hpp +57 -0
- package/nitrogen/generated/android/c++/JOtherAssetQuoteRequest.hpp +57 -0
- package/nitrogen/generated/android/c++/JOtherAssetRef.hpp +57 -0
- package/nitrogen/generated/android/c++/JPresentationBackground.hpp +58 -0
- package/nitrogen/generated/android/c++/JPresentationStyle.hpp +58 -0
- package/nitrogen/generated/android/c++/JService.hpp +292 -0
- package/nitrogen/generated/android/c++/JServiceCounterparty.hpp +63 -0
- package/nitrogen/generated/android/c++/JServiceCounterpartyQuoteRequest.hpp +57 -0
- package/nitrogen/generated/android/c++/JStockAccount.hpp +81 -0
- package/nitrogen/generated/android/c++/JStockAsset.hpp +99 -0
- package/nitrogen/generated/android/c++/JStockAssetQuoteRequest.hpp +74 -0
- package/nitrogen/generated/android/c++/JStockAssetRef.hpp +65 -0
- package/nitrogen/generated/android/c++/JTrade.hpp +108 -0
- package/nitrogen/generated/android/c++/JTradeAsset.hpp +102 -0
- package/nitrogen/generated/android/c++/JTradeAssetKind.hpp +73 -0
- package/nitrogen/generated/android/c++/JTradeAssetQuoteRequest.hpp +100 -0
- package/nitrogen/generated/android/c++/JTradeAssetRef.hpp +96 -0
- package/nitrogen/generated/android/c++/JTradeExecutionResult.hpp +98 -0
- package/nitrogen/generated/android/c++/JTradeQuote.hpp +106 -0
- package/nitrogen/generated/android/c++/JTradeQuotesRequest.hpp +100 -0
- package/nitrogen/generated/android/c++/JTradeQuotesResponse.hpp +137 -0
- package/nitrogen/generated/android/c++/JTradeRef.hpp +78 -0
- package/nitrogen/generated/android/c++/JTradeState.hpp +61 -0
- package/nitrogen/generated/android/c++/JTradesQuery.hpp +78 -0
- package/nitrogen/generated/android/c++/JTradesResponse.hpp +139 -0
- package/nitrogen/generated/android/c++/JTransportAccount.hpp +81 -0
- package/nitrogen/generated/android/c++/JTransportAccountKind.hpp +61 -0
- package/nitrogen/generated/android/c++/JTransportAsset.hpp +123 -0
- package/nitrogen/generated/android/c++/JTransportAssetQuoteRequest.hpp +90 -0
- package/nitrogen/generated/android/c++/JTransportAssetRef.hpp +65 -0
- package/nitrogen/generated/android/c++/JUnavailableLinkedAccountDetails.hpp +57 -0
- package/nitrogen/generated/android/c++/JUserCounterparty.hpp +69 -0
- package/nitrogen/generated/android/c++/JUserCounterpartyQuoteRequest.hpp +66 -0
- package/nitrogen/generated/android/c++/JWireDetails.hpp +61 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/ACHAccountKind.kt +23 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/ACHDetails.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/ActiveLinkedAccountDetails.kt +50 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/Address.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/AssetAccount.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/AssetAccountKind.kt +25 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/AssetAccountRef.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/AssetAccountsQuery.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/AssetAccountsResponse.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/Coordinates.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/Counterparty.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/CounterpartyKind.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/CounterpartyQuoteRequest.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/CryptoAccount.kt +53 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/CryptoAsset.kt +68 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/CryptoAssetQuoteRequest.kt +50 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/CryptoAssetRef.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/EventAsset.kt +71 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/EventAssetQuoteRequest.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/EventAssetRef.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/FiatAccount.kt +65 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/FiatAsset.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/FiatAssetQuoteRequest.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/FiatAssetRef.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/FinancialAccountKind.kt +26 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/Func_void_LinkedAccount.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/Func_void_TradeExecutionResult.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/HybridRNCandleSpec.kt +121 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/InactiveLinkedAccountDetails.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/LinkedAccount.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/LinkedAccountDetails.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/LinkedAccountRef.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/LinkedAccountState.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/LinkedAccountStatusRef.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/MerchantCounterparty.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/MerchantCounterpartyQuoteRequest.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/MerchantLocation.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/NothingAsset.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/NothingAssetQuoteRequest.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/NothingAssetRef.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/OtherAsset.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/OtherAssetQuoteRequest.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/OtherAssetRef.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/PresentationBackground.kt +23 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/PresentationStyle.kt +23 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/ReactNativeCandleOnLoad.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/Service.kt +101 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/ServiceCounterparty.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/ServiceCounterpartyQuoteRequest.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/StockAccount.kt +53 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/StockAsset.kt +68 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/StockAssetQuoteRequest.kt +50 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/StockAssetRef.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/Trade.kt +50 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/TradeAsset.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/TradeAssetKind.kt +28 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/TradeAssetQuoteRequest.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/TradeAssetRef.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/TradeExecutionResult.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/TradeQuote.kt +50 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/TradeQuotesRequest.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/TradeQuotesResponse.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/TradeRef.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/TradeState.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/TradesQuery.kt +50 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/TradesResponse.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/TransportAccount.kt +53 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/TransportAccountKind.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/TransportAsset.kt +83 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/TransportAssetQuoteRequest.kt +59 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/TransportAssetRef.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/UnavailableLinkedAccountDetails.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/UserCounterparty.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/UserCounterpartyQuoteRequest.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rncandle/WireDetails.kt +41 -0
- package/nitrogen/generated/ios/ReactNativeCandle+autolinking.rb +2 -2
- package/nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Bridge.cpp +14 -13
- package/nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Bridge.hpp +222 -99
- package/nitrogen/generated/ios/ReactNativeCandle-Swift-Cxx-Umbrella.hpp +37 -19
- package/nitrogen/generated/ios/ReactNativeCandleAutolinking.mm +1 -1
- package/nitrogen/generated/ios/ReactNativeCandleAutolinking.swift +9 -8
- package/nitrogen/generated/ios/c++/HybridRNCandleSpecSwift.cpp +1 -1
- package/nitrogen/generated/ios/c++/HybridRNCandleSpecSwift.hpp +63 -28
- package/nitrogen/generated/ios/swift/ACHAccountKind.swift +17 -15
- package/nitrogen/generated/ios/swift/ACHDetails.swift +17 -33
- package/nitrogen/generated/ios/swift/ActiveLinkedAccountDetails.swift +65 -118
- package/nitrogen/generated/ios/swift/Address.swift +9 -13
- package/nitrogen/generated/ios/swift/AssetAccount.swift +47 -96
- package/nitrogen/generated/ios/swift/AssetAccountKind.swift +25 -23
- package/nitrogen/generated/ios/swift/AssetAccountRef.swift +17 -33
- package/nitrogen/generated/ios/swift/AssetAccountsQuery.swift +33 -57
- package/nitrogen/generated/ios/swift/AssetAccountsResponse.swift +26 -50
- package/nitrogen/generated/ios/swift/Coordinates.swift +13 -23
- package/nitrogen/generated/ios/swift/Counterparty.swift +36 -99
- package/nitrogen/generated/ios/swift/CounterpartyKind.swift +21 -19
- package/nitrogen/generated/ios/swift/CounterpartyQuoteRequest.swift +36 -110
- package/nitrogen/generated/ios/swift/CryptoAccount.swift +54 -0
- package/nitrogen/generated/ios/swift/CryptoAsset.swift +79 -0
- package/nitrogen/generated/ios/swift/CryptoAssetQuoteRequest.swift +101 -0
- package/nitrogen/generated/ios/swift/CryptoAssetRef.swift +39 -0
- package/nitrogen/generated/ios/swift/EventAsset.swift +84 -0
- package/nitrogen/generated/ios/swift/EventAssetQuoteRequest.swift +83 -0
- package/nitrogen/generated/ios/swift/EventAssetRef.swift +39 -0
- package/nitrogen/generated/ios/swift/FiatAccount.swift +71 -163
- package/nitrogen/generated/ios/swift/FiatAsset.swift +47 -99
- package/nitrogen/generated/ios/swift/FiatAssetQuoteRequest.swift +61 -99
- package/nitrogen/generated/ios/swift/FiatAssetRef.swift +31 -55
- package/nitrogen/generated/ios/swift/FinancialAccountKind.swift +52 -0
- package/nitrogen/generated/ios/swift/Func_void.swift +6 -4
- package/nitrogen/generated/ios/swift/Func_void_AssetAccount.swift +6 -4
- package/nitrogen/generated/ios/swift/Func_void_AssetAccountsResponse.swift +7 -7
- package/nitrogen/generated/ios/swift/Func_void_LinkedAccount.swift +6 -4
- package/nitrogen/generated/ios/swift/Func_void_Trade.swift +6 -4
- package/nitrogen/generated/ios/swift/Func_void_TradeExecutionResult.swift +7 -7
- package/nitrogen/generated/ios/swift/Func_void_TradeQuotesResponse.swift +7 -6
- package/nitrogen/generated/ios/swift/Func_void_TradesResponse.swift +6 -4
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +7 -6
- package/nitrogen/generated/ios/swift/Func_void_std__vector_LinkedAccount_.swift +7 -7
- package/nitrogen/generated/ios/swift/HybridRNCandleSpec.swift +29 -27
- package/nitrogen/generated/ios/swift/HybridRNCandleSpec_cxx.swift +117 -124
- package/nitrogen/generated/ios/swift/InactiveLinkedAccountDetails.swift +9 -13
- package/nitrogen/generated/ios/swift/LinkedAccount.swift +21 -45
- package/nitrogen/generated/ios/swift/LinkedAccountDetails.swift +36 -110
- package/nitrogen/generated/ios/swift/LinkedAccountRef.swift +9 -13
- package/nitrogen/generated/ios/swift/LinkedAccountState.swift +21 -19
- package/nitrogen/generated/ios/swift/LinkedAccountStatusRef.swift +21 -45
- package/nitrogen/generated/ios/swift/MerchantCounterparty.swift +28 -65
- package/nitrogen/generated/ios/swift/MerchantCounterpartyQuoteRequest.swift +39 -47
- package/nitrogen/generated/ios/swift/MerchantLocation.swift +17 -33
- package/nitrogen/generated/ios/swift/NothingAsset.swift +9 -13
- package/nitrogen/generated/ios/swift/NothingAssetQuoteRequest.swift +9 -13
- package/nitrogen/generated/ios/swift/NothingAssetRef.swift +9 -13
- package/nitrogen/generated/ios/swift/OtherAsset.swift +9 -13
- package/nitrogen/generated/ios/swift/OtherAssetQuoteRequest.swift +9 -13
- package/nitrogen/generated/ios/swift/OtherAssetRef.swift +9 -13
- package/nitrogen/generated/ios/swift/PresentationBackground.swift +17 -15
- package/nitrogen/generated/ios/swift/PresentationStyle.swift +17 -15
- package/nitrogen/generated/ios/swift/Service.swift +329 -327
- package/nitrogen/generated/ios/swift/ServiceCounterparty.swift +13 -23
- package/nitrogen/generated/ios/swift/ServiceCounterpartyQuoteRequest.swift +10 -15
- package/nitrogen/generated/ios/swift/StockAccount.swift +54 -0
- package/nitrogen/generated/ios/swift/StockAsset.swift +79 -0
- package/nitrogen/generated/ios/swift/StockAssetQuoteRequest.swift +101 -0
- package/nitrogen/generated/ios/swift/StockAssetRef.swift +39 -0
- package/nitrogen/generated/ios/swift/Trade.swift +25 -56
- package/nitrogen/generated/ios/swift/TradeAsset.swift +78 -157
- package/nitrogen/generated/ios/swift/TradeAssetKind.swift +37 -31
- package/nitrogen/generated/ios/swift/TradeAssetQuoteRequest.swift +78 -169
- package/nitrogen/generated/ios/swift/TradeAssetRef.swift +78 -159
- package/nitrogen/generated/ios/swift/TradeExecutionResult.swift +33 -64
- package/nitrogen/generated/ios/swift/TradeQuote.swift +25 -56
- package/nitrogen/generated/ios/swift/TradeQuotesRequest.swift +41 -87
- package/nitrogen/generated/ios/swift/TradeQuotesResponse.swift +26 -50
- package/nitrogen/generated/ios/swift/TradeRef.swift +13 -23
- package/nitrogen/generated/ios/swift/TradeState.swift +21 -19
- package/nitrogen/generated/ios/swift/TradesQuery.swift +70 -136
- package/nitrogen/generated/ios/swift/TradesResponse.swift +26 -50
- package/nitrogen/generated/ios/swift/TransportAccount.swift +30 -69
- package/nitrogen/generated/ios/swift/TransportAccountKind.swift +21 -19
- package/nitrogen/generated/ios/swift/TransportAsset.swift +87 -192
- package/nitrogen/generated/ios/swift/TransportAssetQuoteRequest.swift +101 -222
- package/nitrogen/generated/ios/swift/TransportAssetRef.swift +17 -33
- package/nitrogen/generated/ios/swift/UnavailableLinkedAccountDetails.swift +10 -15
- package/nitrogen/generated/ios/swift/UserCounterparty.swift +21 -43
- package/nitrogen/generated/ios/swift/UserCounterpartyQuoteRequest.swift +44 -75
- package/nitrogen/generated/ios/swift/WireDetails.swift +13 -23
- package/nitrogen/generated/shared/c++/ACHAccountKind.hpp +1 -1
- package/nitrogen/generated/shared/c++/ACHDetails.hpp +27 -11
- package/nitrogen/generated/shared/c++/ActiveLinkedAccountDetails.hpp +33 -17
- package/nitrogen/generated/shared/c++/Address.hpp +21 -5
- package/nitrogen/generated/shared/c++/AssetAccount.hpp +39 -16
- package/nitrogen/generated/shared/c++/AssetAccountKind.hpp +7 -7
- package/nitrogen/generated/shared/c++/AssetAccountRef.hpp +27 -11
- package/nitrogen/generated/shared/c++/AssetAccountsQuery.hpp +24 -8
- package/nitrogen/generated/shared/c++/AssetAccountsResponse.hpp +24 -8
- package/nitrogen/generated/shared/c++/Coordinates.hpp +24 -8
- package/nitrogen/generated/shared/c++/Counterparty.hpp +27 -11
- package/nitrogen/generated/shared/c++/CounterpartyKind.hpp +1 -1
- package/nitrogen/generated/shared/c++/CounterpartyQuoteRequest.hpp +27 -11
- package/nitrogen/generated/shared/c++/CryptoAccount.hpp +108 -0
- package/nitrogen/generated/shared/c++/CryptoAsset.hpp +125 -0
- package/nitrogen/generated/shared/c++/CryptoAssetQuoteRequest.hpp +100 -0
- package/nitrogen/generated/shared/c++/CryptoAssetRef.hpp +91 -0
- package/nitrogen/generated/shared/c++/EventAsset.hpp +135 -0
- package/nitrogen/generated/shared/c++/EventAssetQuoteRequest.hpp +96 -0
- package/nitrogen/generated/shared/c++/EventAssetRef.hpp +91 -0
- package/nitrogen/generated/shared/c++/FiatAccount.hpp +53 -37
- package/nitrogen/generated/shared/c++/FiatAsset.hpp +39 -23
- package/nitrogen/generated/shared/c++/FiatAssetQuoteRequest.hpp +30 -14
- package/nitrogen/generated/shared/c++/FiatAssetRef.hpp +27 -11
- package/nitrogen/generated/shared/c++/{FiatMarketAccountKind.hpp → FinancialAccountKind.hpp} +20 -20
- package/nitrogen/generated/shared/c++/HybridRNCandleSpec.cpp +2 -1
- package/nitrogen/generated/shared/c++/HybridRNCandleSpec.hpp +2 -1
- package/nitrogen/generated/shared/c++/InactiveLinkedAccountDetails.hpp +21 -5
- package/nitrogen/generated/shared/c++/LinkedAccount.hpp +30 -14
- package/nitrogen/generated/shared/c++/LinkedAccountDetails.hpp +27 -11
- package/nitrogen/generated/shared/c++/LinkedAccountRef.hpp +21 -5
- package/nitrogen/generated/shared/c++/LinkedAccountState.hpp +1 -1
- package/nitrogen/generated/shared/c++/LinkedAccountStatusRef.hpp +30 -14
- package/nitrogen/generated/shared/c++/MerchantCounterparty.hpp +30 -14
- package/nitrogen/generated/shared/c++/MerchantCounterpartyQuoteRequest.hpp +32 -10
- package/nitrogen/generated/shared/c++/MerchantLocation.hpp +27 -11
- package/nitrogen/generated/shared/c++/NothingAsset.hpp +21 -5
- package/nitrogen/generated/shared/c++/NothingAssetQuoteRequest.hpp +21 -5
- package/nitrogen/generated/shared/c++/NothingAssetRef.hpp +21 -5
- package/nitrogen/generated/shared/c++/OtherAsset.hpp +21 -5
- package/nitrogen/generated/shared/c++/OtherAssetQuoteRequest.hpp +21 -5
- package/nitrogen/generated/shared/c++/OtherAssetRef.hpp +21 -5
- package/nitrogen/generated/shared/c++/PresentationBackground.hpp +1 -1
- package/nitrogen/generated/shared/c++/PresentationStyle.hpp +1 -1
- package/nitrogen/generated/shared/c++/Service.hpp +1 -1
- package/nitrogen/generated/shared/c++/ServiceCounterparty.hpp +24 -8
- package/nitrogen/generated/shared/c++/ServiceCounterpartyQuoteRequest.hpp +21 -5
- package/nitrogen/generated/shared/c++/StockAccount.hpp +108 -0
- package/nitrogen/generated/shared/c++/StockAsset.hpp +125 -0
- package/nitrogen/generated/shared/c++/StockAssetQuoteRequest.hpp +100 -0
- package/nitrogen/generated/shared/c++/StockAssetRef.hpp +91 -0
- package/nitrogen/generated/shared/c++/Trade.hpp +33 -17
- package/nitrogen/generated/shared/c++/TradeAsset.hpp +52 -22
- package/nitrogen/generated/shared/c++/TradeAssetKind.hpp +13 -9
- package/nitrogen/generated/shared/c++/TradeAssetQuoteRequest.hpp +52 -22
- package/nitrogen/generated/shared/c++/TradeAssetRef.hpp +52 -22
- package/nitrogen/generated/shared/c++/TradeExecutionResult.hpp +24 -8
- package/nitrogen/generated/shared/c++/TradeQuote.hpp +33 -17
- package/nitrogen/generated/shared/c++/TradeQuotesRequest.hpp +30 -14
- package/nitrogen/generated/shared/c++/TradeQuotesResponse.hpp +24 -8
- package/nitrogen/generated/shared/c++/TradeRef.hpp +24 -8
- package/nitrogen/generated/shared/c++/TradeState.hpp +1 -1
- package/nitrogen/generated/shared/c++/TradesQuery.hpp +33 -17
- package/nitrogen/generated/shared/c++/TradesResponse.hpp +24 -8
- package/nitrogen/generated/shared/c++/TransportAccount.hpp +36 -20
- package/nitrogen/generated/shared/c++/TransportAccountKind.hpp +1 -1
- package/nitrogen/generated/shared/c++/TransportAsset.hpp +66 -50
- package/nitrogen/generated/shared/c++/TransportAssetQuoteRequest.hpp +42 -26
- package/nitrogen/generated/shared/c++/TransportAssetRef.hpp +27 -11
- package/nitrogen/generated/shared/c++/UnavailableLinkedAccountDetails.hpp +21 -5
- package/nitrogen/generated/shared/c++/UserCounterparty.hpp +30 -14
- package/nitrogen/generated/shared/c++/UserCounterpartyQuoteRequest.hpp +27 -11
- package/nitrogen/generated/shared/c++/WireDetails.hpp +24 -8
- package/package.json +26 -70
- package/react-native.config.js +10 -0
- package/src/context.ts +47 -46
- package/src/index.ts +4 -4
- package/src/provider.tsx +68 -79
- package/src/specs/RNCandle.nitro.ts +463 -399
- package/src/types.ts +317 -342
- package/app.plugin.js +0 -1
- package/lib/commonjs/context.js +0 -17
- package/lib/commonjs/context.js.map +0 -1
- package/lib/commonjs/index.js +0 -26
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/package.json +0 -1
- package/lib/commonjs/provider.js +0 -122
- package/lib/commonjs/provider.js.map +0 -1
- package/lib/commonjs/specs/RNCandle.nitro.js +0 -6
- package/lib/commonjs/specs/RNCandle.nitro.js.map +0 -1
- package/lib/commonjs/types.js +0 -312
- package/lib/commonjs/types.js.map +0 -1
- package/lib/module/context.js +0 -12
- package/lib/module/context.js.map +0 -1
- package/lib/module/index.js +0 -5
- package/lib/module/index.js.map +0 -1
- package/lib/module/package.json +0 -1
- package/lib/module/provider.js +0 -116
- package/lib/module/provider.js.map +0 -1
- package/lib/module/specs/RNCandle.nitro.js +0 -4
- package/lib/module/specs/RNCandle.nitro.js.map +0 -1
- package/lib/module/types.js +0 -295
- package/lib/module/types.js.map +0 -1
- package/lib/typescript/commonjs/package.json +0 -1
- package/lib/typescript/commonjs/src/context.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/provider.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/specs/RNCandle.nitro.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types.d.ts.map +0 -1
- package/lib/typescript/module/package.json +0 -1
- package/lib/typescript/module/src/context.d.ts.map +0 -1
- package/lib/typescript/module/src/index.d.ts.map +0 -1
- package/lib/typescript/module/src/provider.d.ts.map +0 -1
- package/lib/typescript/module/src/specs/RNCandle.nitro.d.ts.map +0 -1
- package/lib/typescript/module/src/types.d.ts.map +0 -1
- package/nitrogen/generated/ios/swift/FiatMarketAccountKind.swift +0 -50
- package/nitrogen/generated/ios/swift/MarketAccount.swift +0 -93
- package/nitrogen/generated/ios/swift/MarketAssetKind.swift +0 -38
- package/nitrogen/generated/ios/swift/MarketAssetQuoteRequest.swift +0 -154
- package/nitrogen/generated/ios/swift/MarketTradeAsset.swift +0 -150
- package/nitrogen/generated/ios/swift/MarketTradeAssetRef.swift +0 -55
- package/nitrogen/generated/shared/c++/MarketAccount.hpp +0 -95
- package/nitrogen/generated/shared/c++/MarketAssetKind.hpp +0 -76
- package/nitrogen/generated/shared/c++/MarketAssetQuoteRequest.hpp +0 -86
- package/nitrogen/generated/shared/c++/MarketTradeAsset.hpp +0 -112
- package/nitrogen/generated/shared/c++/MarketTradeAssetRef.hpp +0 -77
- package/plugin/withIosDeploymentTarget.js +0 -71
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// TradeAsset.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -17,13 +17,27 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
19
|
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
20
30
|
|
|
21
31
|
// Forward declaration of `FiatAsset` to properly resolve imports.
|
|
22
32
|
namespace margelo::nitro::rncandle { struct FiatAsset; }
|
|
23
|
-
// Forward declaration of `
|
|
24
|
-
namespace margelo::nitro::rncandle { struct
|
|
33
|
+
// Forward declaration of `CryptoAsset` to properly resolve imports.
|
|
34
|
+
namespace margelo::nitro::rncandle { struct CryptoAsset; }
|
|
35
|
+
// Forward declaration of `StockAsset` to properly resolve imports.
|
|
36
|
+
namespace margelo::nitro::rncandle { struct StockAsset; }
|
|
25
37
|
// Forward declaration of `TransportAsset` to properly resolve imports.
|
|
26
38
|
namespace margelo::nitro::rncandle { struct TransportAsset; }
|
|
39
|
+
// Forward declaration of `EventAsset` to properly resolve imports.
|
|
40
|
+
namespace margelo::nitro::rncandle { struct EventAsset; }
|
|
27
41
|
// Forward declaration of `OtherAsset` to properly resolve imports.
|
|
28
42
|
namespace margelo::nitro::rncandle { struct OtherAsset; }
|
|
29
43
|
// Forward declaration of `NothingAsset` to properly resolve imports.
|
|
@@ -31,8 +45,10 @@ namespace margelo::nitro::rncandle { struct NothingAsset; }
|
|
|
31
45
|
|
|
32
46
|
#include "FiatAsset.hpp"
|
|
33
47
|
#include <optional>
|
|
34
|
-
#include "
|
|
48
|
+
#include "CryptoAsset.hpp"
|
|
49
|
+
#include "StockAsset.hpp"
|
|
35
50
|
#include "TransportAsset.hpp"
|
|
51
|
+
#include "EventAsset.hpp"
|
|
36
52
|
#include "OtherAsset.hpp"
|
|
37
53
|
#include "NothingAsset.hpp"
|
|
38
54
|
|
|
@@ -41,17 +57,22 @@ namespace margelo::nitro::rncandle {
|
|
|
41
57
|
/**
|
|
42
58
|
* A struct which can be represented as a JavaScript object (TradeAsset).
|
|
43
59
|
*/
|
|
44
|
-
struct TradeAsset {
|
|
60
|
+
struct TradeAsset final {
|
|
45
61
|
public:
|
|
46
62
|
std::optional<FiatAsset> fiatAsset SWIFT_PRIVATE;
|
|
47
|
-
std::optional<
|
|
63
|
+
std::optional<CryptoAsset> cryptoAsset SWIFT_PRIVATE;
|
|
64
|
+
std::optional<StockAsset> stockAsset SWIFT_PRIVATE;
|
|
48
65
|
std::optional<TransportAsset> transportAsset SWIFT_PRIVATE;
|
|
66
|
+
std::optional<EventAsset> eventAsset SWIFT_PRIVATE;
|
|
49
67
|
std::optional<OtherAsset> otherAsset SWIFT_PRIVATE;
|
|
50
68
|
std::optional<NothingAsset> nothingAsset SWIFT_PRIVATE;
|
|
51
69
|
|
|
52
70
|
public:
|
|
53
71
|
TradeAsset() = default;
|
|
54
|
-
explicit TradeAsset(std::optional<FiatAsset> fiatAsset, std::optional<
|
|
72
|
+
explicit TradeAsset(std::optional<FiatAsset> fiatAsset, std::optional<CryptoAsset> cryptoAsset, std::optional<StockAsset> stockAsset, std::optional<TransportAsset> transportAsset, std::optional<EventAsset> eventAsset, std::optional<OtherAsset> otherAsset, std::optional<NothingAsset> nothingAsset): fiatAsset(fiatAsset), cryptoAsset(cryptoAsset), stockAsset(stockAsset), transportAsset(transportAsset), eventAsset(eventAsset), otherAsset(otherAsset), nothingAsset(nothingAsset) {}
|
|
73
|
+
|
|
74
|
+
public:
|
|
75
|
+
friend bool operator==(const TradeAsset& lhs, const TradeAsset& rhs) = default;
|
|
55
76
|
};
|
|
56
77
|
|
|
57
78
|
} // namespace margelo::nitro::rncandle
|
|
@@ -64,20 +85,24 @@ namespace margelo::nitro {
|
|
|
64
85
|
static inline margelo::nitro::rncandle::TradeAsset fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
65
86
|
jsi::Object obj = arg.asObject(runtime);
|
|
66
87
|
return margelo::nitro::rncandle::TradeAsset(
|
|
67
|
-
JSIConverter<std::optional<margelo::nitro::rncandle::FiatAsset>>::fromJSI(runtime, obj.getProperty(runtime, "fiatAsset")),
|
|
68
|
-
JSIConverter<std::optional<margelo::nitro::rncandle::
|
|
69
|
-
JSIConverter<std::optional<margelo::nitro::rncandle::
|
|
70
|
-
JSIConverter<std::optional<margelo::nitro::rncandle::
|
|
71
|
-
JSIConverter<std::optional<margelo::nitro::rncandle::
|
|
88
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::FiatAsset>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "fiatAsset"))),
|
|
89
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::CryptoAsset>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "cryptoAsset"))),
|
|
90
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::StockAsset>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "stockAsset"))),
|
|
91
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::TransportAsset>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "transportAsset"))),
|
|
92
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::EventAsset>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "eventAsset"))),
|
|
93
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::OtherAsset>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "otherAsset"))),
|
|
94
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::NothingAsset>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "nothingAsset")))
|
|
72
95
|
);
|
|
73
96
|
}
|
|
74
97
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rncandle::TradeAsset& arg) {
|
|
75
98
|
jsi::Object obj(runtime);
|
|
76
|
-
obj.setProperty(runtime, "fiatAsset", JSIConverter<std::optional<margelo::nitro::rncandle::FiatAsset>>::toJSI(runtime, arg.fiatAsset));
|
|
77
|
-
obj.setProperty(runtime, "
|
|
78
|
-
obj.setProperty(runtime, "
|
|
79
|
-
obj.setProperty(runtime, "
|
|
80
|
-
obj.setProperty(runtime, "
|
|
99
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "fiatAsset"), JSIConverter<std::optional<margelo::nitro::rncandle::FiatAsset>>::toJSI(runtime, arg.fiatAsset));
|
|
100
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "cryptoAsset"), JSIConverter<std::optional<margelo::nitro::rncandle::CryptoAsset>>::toJSI(runtime, arg.cryptoAsset));
|
|
101
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "stockAsset"), JSIConverter<std::optional<margelo::nitro::rncandle::StockAsset>>::toJSI(runtime, arg.stockAsset));
|
|
102
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "transportAsset"), JSIConverter<std::optional<margelo::nitro::rncandle::TransportAsset>>::toJSI(runtime, arg.transportAsset));
|
|
103
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "eventAsset"), JSIConverter<std::optional<margelo::nitro::rncandle::EventAsset>>::toJSI(runtime, arg.eventAsset));
|
|
104
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "otherAsset"), JSIConverter<std::optional<margelo::nitro::rncandle::OtherAsset>>::toJSI(runtime, arg.otherAsset));
|
|
105
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "nothingAsset"), JSIConverter<std::optional<margelo::nitro::rncandle::NothingAsset>>::toJSI(runtime, arg.nothingAsset));
|
|
81
106
|
return obj;
|
|
82
107
|
}
|
|
83
108
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -85,11 +110,16 @@ namespace margelo::nitro {
|
|
|
85
110
|
return false;
|
|
86
111
|
}
|
|
87
112
|
jsi::Object obj = value.getObject(runtime);
|
|
88
|
-
if (!
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
if (!JSIConverter<std::optional<margelo::nitro::rncandle::
|
|
92
|
-
if (!JSIConverter<std::optional<margelo::nitro::rncandle::
|
|
113
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::FiatAsset>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "fiatAsset")))) return false;
|
|
117
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::CryptoAsset>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "cryptoAsset")))) return false;
|
|
118
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::StockAsset>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "stockAsset")))) return false;
|
|
119
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::TransportAsset>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "transportAsset")))) return false;
|
|
120
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::EventAsset>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "eventAsset")))) return false;
|
|
121
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::OtherAsset>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "otherAsset")))) return false;
|
|
122
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::NothingAsset>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "nothingAsset")))) return false;
|
|
93
123
|
return true;
|
|
94
124
|
}
|
|
95
125
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// TradeAssetKind.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -29,12 +29,13 @@ namespace margelo::nitro::rncandle {
|
|
|
29
29
|
* An enum which can be represented as a JavaScript union (TradeAssetKind).
|
|
30
30
|
*/
|
|
31
31
|
enum class TradeAssetKind {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
FIAT SWIFT_NAME(fiat) = 0,
|
|
33
|
+
STOCK SWIFT_NAME(stock) = 1,
|
|
34
|
+
CRYPTO SWIFT_NAME(crypto) = 2,
|
|
35
35
|
TRANSPORT SWIFT_NAME(transport) = 3,
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
EVENT SWIFT_NAME(event) = 4,
|
|
37
|
+
OTHER SWIFT_NAME(other) = 5,
|
|
38
|
+
NOTHING SWIFT_NAME(nothing) = 6,
|
|
38
39
|
} CLOSED_ENUM;
|
|
39
40
|
|
|
40
41
|
} // namespace margelo::nitro::rncandle
|
|
@@ -47,10 +48,11 @@ namespace margelo::nitro {
|
|
|
47
48
|
static inline margelo::nitro::rncandle::TradeAssetKind fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
48
49
|
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
49
50
|
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
51
|
+
case hashString("fiat"): return margelo::nitro::rncandle::TradeAssetKind::FIAT;
|
|
50
52
|
case hashString("stock"): return margelo::nitro::rncandle::TradeAssetKind::STOCK;
|
|
51
53
|
case hashString("crypto"): return margelo::nitro::rncandle::TradeAssetKind::CRYPTO;
|
|
52
|
-
case hashString("fiat"): return margelo::nitro::rncandle::TradeAssetKind::FIAT;
|
|
53
54
|
case hashString("transport"): return margelo::nitro::rncandle::TradeAssetKind::TRANSPORT;
|
|
55
|
+
case hashString("event"): return margelo::nitro::rncandle::TradeAssetKind::EVENT;
|
|
54
56
|
case hashString("other"): return margelo::nitro::rncandle::TradeAssetKind::OTHER;
|
|
55
57
|
case hashString("nothing"): return margelo::nitro::rncandle::TradeAssetKind::NOTHING;
|
|
56
58
|
default: [[unlikely]]
|
|
@@ -59,10 +61,11 @@ namespace margelo::nitro {
|
|
|
59
61
|
}
|
|
60
62
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::rncandle::TradeAssetKind arg) {
|
|
61
63
|
switch (arg) {
|
|
64
|
+
case margelo::nitro::rncandle::TradeAssetKind::FIAT: return JSIConverter<std::string>::toJSI(runtime, "fiat");
|
|
62
65
|
case margelo::nitro::rncandle::TradeAssetKind::STOCK: return JSIConverter<std::string>::toJSI(runtime, "stock");
|
|
63
66
|
case margelo::nitro::rncandle::TradeAssetKind::CRYPTO: return JSIConverter<std::string>::toJSI(runtime, "crypto");
|
|
64
|
-
case margelo::nitro::rncandle::TradeAssetKind::FIAT: return JSIConverter<std::string>::toJSI(runtime, "fiat");
|
|
65
67
|
case margelo::nitro::rncandle::TradeAssetKind::TRANSPORT: return JSIConverter<std::string>::toJSI(runtime, "transport");
|
|
68
|
+
case margelo::nitro::rncandle::TradeAssetKind::EVENT: return JSIConverter<std::string>::toJSI(runtime, "event");
|
|
66
69
|
case margelo::nitro::rncandle::TradeAssetKind::OTHER: return JSIConverter<std::string>::toJSI(runtime, "other");
|
|
67
70
|
case margelo::nitro::rncandle::TradeAssetKind::NOTHING: return JSIConverter<std::string>::toJSI(runtime, "nothing");
|
|
68
71
|
default: [[unlikely]]
|
|
@@ -76,10 +79,11 @@ namespace margelo::nitro {
|
|
|
76
79
|
}
|
|
77
80
|
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, value);
|
|
78
81
|
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
82
|
+
case hashString("fiat"):
|
|
79
83
|
case hashString("stock"):
|
|
80
84
|
case hashString("crypto"):
|
|
81
|
-
case hashString("fiat"):
|
|
82
85
|
case hashString("transport"):
|
|
86
|
+
case hashString("event"):
|
|
83
87
|
case hashString("other"):
|
|
84
88
|
case hashString("nothing"):
|
|
85
89
|
return true;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// TradeAssetQuoteRequest.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -17,13 +17,27 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
19
|
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
20
30
|
|
|
21
31
|
// Forward declaration of `FiatAssetQuoteRequest` to properly resolve imports.
|
|
22
32
|
namespace margelo::nitro::rncandle { struct FiatAssetQuoteRequest; }
|
|
23
|
-
// Forward declaration of `
|
|
24
|
-
namespace margelo::nitro::rncandle { struct
|
|
33
|
+
// Forward declaration of `CryptoAssetQuoteRequest` to properly resolve imports.
|
|
34
|
+
namespace margelo::nitro::rncandle { struct CryptoAssetQuoteRequest; }
|
|
35
|
+
// Forward declaration of `StockAssetQuoteRequest` to properly resolve imports.
|
|
36
|
+
namespace margelo::nitro::rncandle { struct StockAssetQuoteRequest; }
|
|
25
37
|
// Forward declaration of `TransportAssetQuoteRequest` to properly resolve imports.
|
|
26
38
|
namespace margelo::nitro::rncandle { struct TransportAssetQuoteRequest; }
|
|
39
|
+
// Forward declaration of `EventAssetQuoteRequest` to properly resolve imports.
|
|
40
|
+
namespace margelo::nitro::rncandle { struct EventAssetQuoteRequest; }
|
|
27
41
|
// Forward declaration of `NothingAssetQuoteRequest` to properly resolve imports.
|
|
28
42
|
namespace margelo::nitro::rncandle { struct NothingAssetQuoteRequest; }
|
|
29
43
|
// Forward declaration of `OtherAssetQuoteRequest` to properly resolve imports.
|
|
@@ -31,8 +45,10 @@ namespace margelo::nitro::rncandle { struct OtherAssetQuoteRequest; }
|
|
|
31
45
|
|
|
32
46
|
#include "FiatAssetQuoteRequest.hpp"
|
|
33
47
|
#include <optional>
|
|
34
|
-
#include "
|
|
48
|
+
#include "CryptoAssetQuoteRequest.hpp"
|
|
49
|
+
#include "StockAssetQuoteRequest.hpp"
|
|
35
50
|
#include "TransportAssetQuoteRequest.hpp"
|
|
51
|
+
#include "EventAssetQuoteRequest.hpp"
|
|
36
52
|
#include "NothingAssetQuoteRequest.hpp"
|
|
37
53
|
#include "OtherAssetQuoteRequest.hpp"
|
|
38
54
|
|
|
@@ -41,17 +57,22 @@ namespace margelo::nitro::rncandle {
|
|
|
41
57
|
/**
|
|
42
58
|
* A struct which can be represented as a JavaScript object (TradeAssetQuoteRequest).
|
|
43
59
|
*/
|
|
44
|
-
struct TradeAssetQuoteRequest {
|
|
60
|
+
struct TradeAssetQuoteRequest final {
|
|
45
61
|
public:
|
|
46
62
|
std::optional<FiatAssetQuoteRequest> fiatAssetQuoteRequest SWIFT_PRIVATE;
|
|
47
|
-
std::optional<
|
|
63
|
+
std::optional<CryptoAssetQuoteRequest> cryptoAssetQuoteRequest SWIFT_PRIVATE;
|
|
64
|
+
std::optional<StockAssetQuoteRequest> stockAssetQuoteRequest SWIFT_PRIVATE;
|
|
48
65
|
std::optional<TransportAssetQuoteRequest> transportAssetQuoteRequest SWIFT_PRIVATE;
|
|
66
|
+
std::optional<EventAssetQuoteRequest> eventAssetQuoteRequest SWIFT_PRIVATE;
|
|
49
67
|
std::optional<NothingAssetQuoteRequest> nothingAssetQuoteRequest SWIFT_PRIVATE;
|
|
50
68
|
std::optional<OtherAssetQuoteRequest> otherAssetQuoteRequest SWIFT_PRIVATE;
|
|
51
69
|
|
|
52
70
|
public:
|
|
53
71
|
TradeAssetQuoteRequest() = default;
|
|
54
|
-
explicit TradeAssetQuoteRequest(std::optional<FiatAssetQuoteRequest> fiatAssetQuoteRequest, std::optional<
|
|
72
|
+
explicit TradeAssetQuoteRequest(std::optional<FiatAssetQuoteRequest> fiatAssetQuoteRequest, std::optional<CryptoAssetQuoteRequest> cryptoAssetQuoteRequest, std::optional<StockAssetQuoteRequest> stockAssetQuoteRequest, std::optional<TransportAssetQuoteRequest> transportAssetQuoteRequest, std::optional<EventAssetQuoteRequest> eventAssetQuoteRequest, std::optional<NothingAssetQuoteRequest> nothingAssetQuoteRequest, std::optional<OtherAssetQuoteRequest> otherAssetQuoteRequest): fiatAssetQuoteRequest(fiatAssetQuoteRequest), cryptoAssetQuoteRequest(cryptoAssetQuoteRequest), stockAssetQuoteRequest(stockAssetQuoteRequest), transportAssetQuoteRequest(transportAssetQuoteRequest), eventAssetQuoteRequest(eventAssetQuoteRequest), nothingAssetQuoteRequest(nothingAssetQuoteRequest), otherAssetQuoteRequest(otherAssetQuoteRequest) {}
|
|
73
|
+
|
|
74
|
+
public:
|
|
75
|
+
friend bool operator==(const TradeAssetQuoteRequest& lhs, const TradeAssetQuoteRequest& rhs) = default;
|
|
55
76
|
};
|
|
56
77
|
|
|
57
78
|
} // namespace margelo::nitro::rncandle
|
|
@@ -64,20 +85,24 @@ namespace margelo::nitro {
|
|
|
64
85
|
static inline margelo::nitro::rncandle::TradeAssetQuoteRequest fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
65
86
|
jsi::Object obj = arg.asObject(runtime);
|
|
66
87
|
return margelo::nitro::rncandle::TradeAssetQuoteRequest(
|
|
67
|
-
JSIConverter<std::optional<margelo::nitro::rncandle::FiatAssetQuoteRequest>>::fromJSI(runtime, obj.getProperty(runtime, "fiatAssetQuoteRequest")),
|
|
68
|
-
JSIConverter<std::optional<margelo::nitro::rncandle::
|
|
69
|
-
JSIConverter<std::optional<margelo::nitro::rncandle::
|
|
70
|
-
JSIConverter<std::optional<margelo::nitro::rncandle::
|
|
71
|
-
JSIConverter<std::optional<margelo::nitro::rncandle::
|
|
88
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::FiatAssetQuoteRequest>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "fiatAssetQuoteRequest"))),
|
|
89
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::CryptoAssetQuoteRequest>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "cryptoAssetQuoteRequest"))),
|
|
90
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::StockAssetQuoteRequest>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "stockAssetQuoteRequest"))),
|
|
91
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::TransportAssetQuoteRequest>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "transportAssetQuoteRequest"))),
|
|
92
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::EventAssetQuoteRequest>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "eventAssetQuoteRequest"))),
|
|
93
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::NothingAssetQuoteRequest>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "nothingAssetQuoteRequest"))),
|
|
94
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::OtherAssetQuoteRequest>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "otherAssetQuoteRequest")))
|
|
72
95
|
);
|
|
73
96
|
}
|
|
74
97
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rncandle::TradeAssetQuoteRequest& arg) {
|
|
75
98
|
jsi::Object obj(runtime);
|
|
76
|
-
obj.setProperty(runtime, "fiatAssetQuoteRequest", JSIConverter<std::optional<margelo::nitro::rncandle::FiatAssetQuoteRequest>>::toJSI(runtime, arg.fiatAssetQuoteRequest));
|
|
77
|
-
obj.setProperty(runtime, "
|
|
78
|
-
obj.setProperty(runtime, "
|
|
79
|
-
obj.setProperty(runtime, "
|
|
80
|
-
obj.setProperty(runtime, "
|
|
99
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "fiatAssetQuoteRequest"), JSIConverter<std::optional<margelo::nitro::rncandle::FiatAssetQuoteRequest>>::toJSI(runtime, arg.fiatAssetQuoteRequest));
|
|
100
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "cryptoAssetQuoteRequest"), JSIConverter<std::optional<margelo::nitro::rncandle::CryptoAssetQuoteRequest>>::toJSI(runtime, arg.cryptoAssetQuoteRequest));
|
|
101
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "stockAssetQuoteRequest"), JSIConverter<std::optional<margelo::nitro::rncandle::StockAssetQuoteRequest>>::toJSI(runtime, arg.stockAssetQuoteRequest));
|
|
102
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "transportAssetQuoteRequest"), JSIConverter<std::optional<margelo::nitro::rncandle::TransportAssetQuoteRequest>>::toJSI(runtime, arg.transportAssetQuoteRequest));
|
|
103
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "eventAssetQuoteRequest"), JSIConverter<std::optional<margelo::nitro::rncandle::EventAssetQuoteRequest>>::toJSI(runtime, arg.eventAssetQuoteRequest));
|
|
104
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "nothingAssetQuoteRequest"), JSIConverter<std::optional<margelo::nitro::rncandle::NothingAssetQuoteRequest>>::toJSI(runtime, arg.nothingAssetQuoteRequest));
|
|
105
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "otherAssetQuoteRequest"), JSIConverter<std::optional<margelo::nitro::rncandle::OtherAssetQuoteRequest>>::toJSI(runtime, arg.otherAssetQuoteRequest));
|
|
81
106
|
return obj;
|
|
82
107
|
}
|
|
83
108
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -85,11 +110,16 @@ namespace margelo::nitro {
|
|
|
85
110
|
return false;
|
|
86
111
|
}
|
|
87
112
|
jsi::Object obj = value.getObject(runtime);
|
|
88
|
-
if (!
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
if (!JSIConverter<std::optional<margelo::nitro::rncandle::
|
|
92
|
-
if (!JSIConverter<std::optional<margelo::nitro::rncandle::
|
|
113
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::FiatAssetQuoteRequest>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "fiatAssetQuoteRequest")))) return false;
|
|
117
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::CryptoAssetQuoteRequest>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "cryptoAssetQuoteRequest")))) return false;
|
|
118
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::StockAssetQuoteRequest>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "stockAssetQuoteRequest")))) return false;
|
|
119
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::TransportAssetQuoteRequest>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "transportAssetQuoteRequest")))) return false;
|
|
120
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::EventAssetQuoteRequest>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "eventAssetQuoteRequest")))) return false;
|
|
121
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::NothingAssetQuoteRequest>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "nothingAssetQuoteRequest")))) return false;
|
|
122
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::OtherAssetQuoteRequest>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "otherAssetQuoteRequest")))) return false;
|
|
93
123
|
return true;
|
|
94
124
|
}
|
|
95
125
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// TradeAssetRef.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -17,13 +17,27 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
19
|
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
20
30
|
|
|
21
31
|
// Forward declaration of `FiatAssetRef` to properly resolve imports.
|
|
22
32
|
namespace margelo::nitro::rncandle { struct FiatAssetRef; }
|
|
23
|
-
// Forward declaration of `
|
|
24
|
-
namespace margelo::nitro::rncandle { struct
|
|
33
|
+
// Forward declaration of `CryptoAssetRef` to properly resolve imports.
|
|
34
|
+
namespace margelo::nitro::rncandle { struct CryptoAssetRef; }
|
|
35
|
+
// Forward declaration of `StockAssetRef` to properly resolve imports.
|
|
36
|
+
namespace margelo::nitro::rncandle { struct StockAssetRef; }
|
|
25
37
|
// Forward declaration of `TransportAssetRef` to properly resolve imports.
|
|
26
38
|
namespace margelo::nitro::rncandle { struct TransportAssetRef; }
|
|
39
|
+
// Forward declaration of `EventAssetRef` to properly resolve imports.
|
|
40
|
+
namespace margelo::nitro::rncandle { struct EventAssetRef; }
|
|
27
41
|
// Forward declaration of `OtherAssetRef` to properly resolve imports.
|
|
28
42
|
namespace margelo::nitro::rncandle { struct OtherAssetRef; }
|
|
29
43
|
// Forward declaration of `NothingAssetRef` to properly resolve imports.
|
|
@@ -31,8 +45,10 @@ namespace margelo::nitro::rncandle { struct NothingAssetRef; }
|
|
|
31
45
|
|
|
32
46
|
#include "FiatAssetRef.hpp"
|
|
33
47
|
#include <optional>
|
|
34
|
-
#include "
|
|
48
|
+
#include "CryptoAssetRef.hpp"
|
|
49
|
+
#include "StockAssetRef.hpp"
|
|
35
50
|
#include "TransportAssetRef.hpp"
|
|
51
|
+
#include "EventAssetRef.hpp"
|
|
36
52
|
#include "OtherAssetRef.hpp"
|
|
37
53
|
#include "NothingAssetRef.hpp"
|
|
38
54
|
|
|
@@ -41,17 +57,22 @@ namespace margelo::nitro::rncandle {
|
|
|
41
57
|
/**
|
|
42
58
|
* A struct which can be represented as a JavaScript object (TradeAssetRef).
|
|
43
59
|
*/
|
|
44
|
-
struct TradeAssetRef {
|
|
60
|
+
struct TradeAssetRef final {
|
|
45
61
|
public:
|
|
46
62
|
std::optional<FiatAssetRef> fiatAssetRef SWIFT_PRIVATE;
|
|
47
|
-
std::optional<
|
|
63
|
+
std::optional<CryptoAssetRef> cryptoAssetRef SWIFT_PRIVATE;
|
|
64
|
+
std::optional<StockAssetRef> stockAssetRef SWIFT_PRIVATE;
|
|
48
65
|
std::optional<TransportAssetRef> transportAssetRef SWIFT_PRIVATE;
|
|
66
|
+
std::optional<EventAssetRef> eventAssetRef SWIFT_PRIVATE;
|
|
49
67
|
std::optional<OtherAssetRef> otherAssetRef SWIFT_PRIVATE;
|
|
50
68
|
std::optional<NothingAssetRef> nothingAssetRef SWIFT_PRIVATE;
|
|
51
69
|
|
|
52
70
|
public:
|
|
53
71
|
TradeAssetRef() = default;
|
|
54
|
-
explicit TradeAssetRef(std::optional<FiatAssetRef> fiatAssetRef, std::optional<
|
|
72
|
+
explicit TradeAssetRef(std::optional<FiatAssetRef> fiatAssetRef, std::optional<CryptoAssetRef> cryptoAssetRef, std::optional<StockAssetRef> stockAssetRef, std::optional<TransportAssetRef> transportAssetRef, std::optional<EventAssetRef> eventAssetRef, std::optional<OtherAssetRef> otherAssetRef, std::optional<NothingAssetRef> nothingAssetRef): fiatAssetRef(fiatAssetRef), cryptoAssetRef(cryptoAssetRef), stockAssetRef(stockAssetRef), transportAssetRef(transportAssetRef), eventAssetRef(eventAssetRef), otherAssetRef(otherAssetRef), nothingAssetRef(nothingAssetRef) {}
|
|
73
|
+
|
|
74
|
+
public:
|
|
75
|
+
friend bool operator==(const TradeAssetRef& lhs, const TradeAssetRef& rhs) = default;
|
|
55
76
|
};
|
|
56
77
|
|
|
57
78
|
} // namespace margelo::nitro::rncandle
|
|
@@ -64,20 +85,24 @@ namespace margelo::nitro {
|
|
|
64
85
|
static inline margelo::nitro::rncandle::TradeAssetRef fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
65
86
|
jsi::Object obj = arg.asObject(runtime);
|
|
66
87
|
return margelo::nitro::rncandle::TradeAssetRef(
|
|
67
|
-
JSIConverter<std::optional<margelo::nitro::rncandle::FiatAssetRef>>::fromJSI(runtime, obj.getProperty(runtime, "fiatAssetRef")),
|
|
68
|
-
JSIConverter<std::optional<margelo::nitro::rncandle::
|
|
69
|
-
JSIConverter<std::optional<margelo::nitro::rncandle::
|
|
70
|
-
JSIConverter<std::optional<margelo::nitro::rncandle::
|
|
71
|
-
JSIConverter<std::optional<margelo::nitro::rncandle::
|
|
88
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::FiatAssetRef>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "fiatAssetRef"))),
|
|
89
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::CryptoAssetRef>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "cryptoAssetRef"))),
|
|
90
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::StockAssetRef>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "stockAssetRef"))),
|
|
91
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::TransportAssetRef>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "transportAssetRef"))),
|
|
92
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::EventAssetRef>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "eventAssetRef"))),
|
|
93
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::OtherAssetRef>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "otherAssetRef"))),
|
|
94
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::NothingAssetRef>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "nothingAssetRef")))
|
|
72
95
|
);
|
|
73
96
|
}
|
|
74
97
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rncandle::TradeAssetRef& arg) {
|
|
75
98
|
jsi::Object obj(runtime);
|
|
76
|
-
obj.setProperty(runtime, "fiatAssetRef", JSIConverter<std::optional<margelo::nitro::rncandle::FiatAssetRef>>::toJSI(runtime, arg.fiatAssetRef));
|
|
77
|
-
obj.setProperty(runtime, "
|
|
78
|
-
obj.setProperty(runtime, "
|
|
79
|
-
obj.setProperty(runtime, "
|
|
80
|
-
obj.setProperty(runtime, "
|
|
99
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "fiatAssetRef"), JSIConverter<std::optional<margelo::nitro::rncandle::FiatAssetRef>>::toJSI(runtime, arg.fiatAssetRef));
|
|
100
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "cryptoAssetRef"), JSIConverter<std::optional<margelo::nitro::rncandle::CryptoAssetRef>>::toJSI(runtime, arg.cryptoAssetRef));
|
|
101
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "stockAssetRef"), JSIConverter<std::optional<margelo::nitro::rncandle::StockAssetRef>>::toJSI(runtime, arg.stockAssetRef));
|
|
102
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "transportAssetRef"), JSIConverter<std::optional<margelo::nitro::rncandle::TransportAssetRef>>::toJSI(runtime, arg.transportAssetRef));
|
|
103
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "eventAssetRef"), JSIConverter<std::optional<margelo::nitro::rncandle::EventAssetRef>>::toJSI(runtime, arg.eventAssetRef));
|
|
104
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "otherAssetRef"), JSIConverter<std::optional<margelo::nitro::rncandle::OtherAssetRef>>::toJSI(runtime, arg.otherAssetRef));
|
|
105
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "nothingAssetRef"), JSIConverter<std::optional<margelo::nitro::rncandle::NothingAssetRef>>::toJSI(runtime, arg.nothingAssetRef));
|
|
81
106
|
return obj;
|
|
82
107
|
}
|
|
83
108
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -85,11 +110,16 @@ namespace margelo::nitro {
|
|
|
85
110
|
return false;
|
|
86
111
|
}
|
|
87
112
|
jsi::Object obj = value.getObject(runtime);
|
|
88
|
-
if (!
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
if (!JSIConverter<std::optional<margelo::nitro::rncandle::
|
|
92
|
-
if (!JSIConverter<std::optional<margelo::nitro::rncandle::
|
|
113
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::FiatAssetRef>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "fiatAssetRef")))) return false;
|
|
117
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::CryptoAssetRef>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "cryptoAssetRef")))) return false;
|
|
118
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::StockAssetRef>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "stockAssetRef")))) return false;
|
|
119
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::TransportAssetRef>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "transportAssetRef")))) return false;
|
|
120
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::EventAssetRef>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "eventAssetRef")))) return false;
|
|
121
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::OtherAssetRef>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "otherAssetRef")))) return false;
|
|
122
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::NothingAssetRef>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "nothingAssetRef")))) return false;
|
|
93
123
|
return true;
|
|
94
124
|
}
|
|
95
125
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// TradeExecutionResult.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -17,6 +17,16 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
19
|
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
20
30
|
|
|
21
31
|
// Forward declaration of `Trade` to properly resolve imports.
|
|
22
32
|
namespace margelo::nitro::rncandle { struct Trade; }
|
|
@@ -30,7 +40,7 @@ namespace margelo::nitro::rncandle {
|
|
|
30
40
|
/**
|
|
31
41
|
* A struct which can be represented as a JavaScript object (TradeExecutionResult).
|
|
32
42
|
*/
|
|
33
|
-
struct TradeExecutionResult {
|
|
43
|
+
struct TradeExecutionResult final {
|
|
34
44
|
public:
|
|
35
45
|
std::optional<Trade> trade SWIFT_PRIVATE;
|
|
36
46
|
std::optional<std::string> error SWIFT_PRIVATE;
|
|
@@ -38,6 +48,9 @@ namespace margelo::nitro::rncandle {
|
|
|
38
48
|
public:
|
|
39
49
|
TradeExecutionResult() = default;
|
|
40
50
|
explicit TradeExecutionResult(std::optional<Trade> trade, std::optional<std::string> error): trade(trade), error(error) {}
|
|
51
|
+
|
|
52
|
+
public:
|
|
53
|
+
friend bool operator==(const TradeExecutionResult& lhs, const TradeExecutionResult& rhs) = default;
|
|
41
54
|
};
|
|
42
55
|
|
|
43
56
|
} // namespace margelo::nitro::rncandle
|
|
@@ -50,14 +63,14 @@ namespace margelo::nitro {
|
|
|
50
63
|
static inline margelo::nitro::rncandle::TradeExecutionResult fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
51
64
|
jsi::Object obj = arg.asObject(runtime);
|
|
52
65
|
return margelo::nitro::rncandle::TradeExecutionResult(
|
|
53
|
-
JSIConverter<std::optional<margelo::nitro::rncandle::Trade>>::fromJSI(runtime, obj.getProperty(runtime, "trade")),
|
|
54
|
-
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "error"))
|
|
66
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::Trade>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "trade"))),
|
|
67
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "error")))
|
|
55
68
|
);
|
|
56
69
|
}
|
|
57
70
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rncandle::TradeExecutionResult& arg) {
|
|
58
71
|
jsi::Object obj(runtime);
|
|
59
|
-
obj.setProperty(runtime, "trade", JSIConverter<std::optional<margelo::nitro::rncandle::Trade>>::toJSI(runtime, arg.trade));
|
|
60
|
-
obj.setProperty(runtime, "error", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.error));
|
|
72
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "trade"), JSIConverter<std::optional<margelo::nitro::rncandle::Trade>>::toJSI(runtime, arg.trade));
|
|
73
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "error"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.error));
|
|
61
74
|
return obj;
|
|
62
75
|
}
|
|
63
76
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -65,8 +78,11 @@ namespace margelo::nitro {
|
|
|
65
78
|
return false;
|
|
66
79
|
}
|
|
67
80
|
jsi::Object obj = value.getObject(runtime);
|
|
68
|
-
if (!
|
|
69
|
-
|
|
81
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::Trade>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "trade")))) return false;
|
|
85
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "error")))) return false;
|
|
70
86
|
return true;
|
|
71
87
|
}
|
|
72
88
|
};
|