react-native-candle 1.0.1 → 19.0.7-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
|
/// TradeQuote.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 `TradeAsset` to properly resolve imports.
|
|
22
32
|
namespace margelo::nitro::rncandle { struct TradeAsset; }
|
|
@@ -32,7 +42,7 @@ namespace margelo::nitro::rncandle {
|
|
|
32
42
|
/**
|
|
33
43
|
* A struct which can be represented as a JavaScript object (TradeQuote).
|
|
34
44
|
*/
|
|
35
|
-
struct TradeQuote {
|
|
45
|
+
struct TradeQuote final {
|
|
36
46
|
public:
|
|
37
47
|
TradeAsset lost SWIFT_PRIVATE;
|
|
38
48
|
TradeAsset gained SWIFT_PRIVATE;
|
|
@@ -43,6 +53,9 @@ namespace margelo::nitro::rncandle {
|
|
|
43
53
|
public:
|
|
44
54
|
TradeQuote() = default;
|
|
45
55
|
explicit TradeQuote(TradeAsset lost, TradeAsset gained, Counterparty counterparty, std::string context, std::string expirationDateTime): lost(lost), gained(gained), counterparty(counterparty), context(context), expirationDateTime(expirationDateTime) {}
|
|
56
|
+
|
|
57
|
+
public:
|
|
58
|
+
friend bool operator==(const TradeQuote& lhs, const TradeQuote& rhs) = default;
|
|
46
59
|
};
|
|
47
60
|
|
|
48
61
|
} // namespace margelo::nitro::rncandle
|
|
@@ -55,20 +68,20 @@ namespace margelo::nitro {
|
|
|
55
68
|
static inline margelo::nitro::rncandle::TradeQuote fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
56
69
|
jsi::Object obj = arg.asObject(runtime);
|
|
57
70
|
return margelo::nitro::rncandle::TradeQuote(
|
|
58
|
-
JSIConverter<margelo::nitro::rncandle::TradeAsset>::fromJSI(runtime, obj.getProperty(runtime, "lost")),
|
|
59
|
-
JSIConverter<margelo::nitro::rncandle::TradeAsset>::fromJSI(runtime, obj.getProperty(runtime, "gained")),
|
|
60
|
-
JSIConverter<margelo::nitro::rncandle::Counterparty>::fromJSI(runtime, obj.getProperty(runtime, "counterparty")),
|
|
61
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "context")),
|
|
62
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "expirationDateTime"))
|
|
71
|
+
JSIConverter<margelo::nitro::rncandle::TradeAsset>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "lost"))),
|
|
72
|
+
JSIConverter<margelo::nitro::rncandle::TradeAsset>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "gained"))),
|
|
73
|
+
JSIConverter<margelo::nitro::rncandle::Counterparty>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "counterparty"))),
|
|
74
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "context"))),
|
|
75
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "expirationDateTime")))
|
|
63
76
|
);
|
|
64
77
|
}
|
|
65
78
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rncandle::TradeQuote& arg) {
|
|
66
79
|
jsi::Object obj(runtime);
|
|
67
|
-
obj.setProperty(runtime, "lost", JSIConverter<margelo::nitro::rncandle::TradeAsset>::toJSI(runtime, arg.lost));
|
|
68
|
-
obj.setProperty(runtime, "gained", JSIConverter<margelo::nitro::rncandle::TradeAsset>::toJSI(runtime, arg.gained));
|
|
69
|
-
obj.setProperty(runtime, "counterparty", JSIConverter<margelo::nitro::rncandle::Counterparty>::toJSI(runtime, arg.counterparty));
|
|
70
|
-
obj.setProperty(runtime, "context", JSIConverter<std::string>::toJSI(runtime, arg.context));
|
|
71
|
-
obj.setProperty(runtime, "expirationDateTime", JSIConverter<std::string>::toJSI(runtime, arg.expirationDateTime));
|
|
80
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "lost"), JSIConverter<margelo::nitro::rncandle::TradeAsset>::toJSI(runtime, arg.lost));
|
|
81
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "gained"), JSIConverter<margelo::nitro::rncandle::TradeAsset>::toJSI(runtime, arg.gained));
|
|
82
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "counterparty"), JSIConverter<margelo::nitro::rncandle::Counterparty>::toJSI(runtime, arg.counterparty));
|
|
83
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "context"), JSIConverter<std::string>::toJSI(runtime, arg.context));
|
|
84
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "expirationDateTime"), JSIConverter<std::string>::toJSI(runtime, arg.expirationDateTime));
|
|
72
85
|
return obj;
|
|
73
86
|
}
|
|
74
87
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -76,11 +89,14 @@ namespace margelo::nitro {
|
|
|
76
89
|
return false;
|
|
77
90
|
}
|
|
78
91
|
jsi::Object obj = value.getObject(runtime);
|
|
79
|
-
if (!
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
if (!JSIConverter<
|
|
83
|
-
if (!JSIConverter<
|
|
92
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
if (!JSIConverter<margelo::nitro::rncandle::TradeAsset>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "lost")))) return false;
|
|
96
|
+
if (!JSIConverter<margelo::nitro::rncandle::TradeAsset>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "gained")))) return false;
|
|
97
|
+
if (!JSIConverter<margelo::nitro::rncandle::Counterparty>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "counterparty")))) return false;
|
|
98
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "context")))) return false;
|
|
99
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "expirationDateTime")))) return false;
|
|
84
100
|
return true;
|
|
85
101
|
}
|
|
86
102
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// TradeQuotesRequest.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 `TradeAssetQuoteRequest` to properly resolve imports.
|
|
22
32
|
namespace margelo::nitro::rncandle { struct TradeAssetQuoteRequest; }
|
|
@@ -33,7 +43,7 @@ namespace margelo::nitro::rncandle {
|
|
|
33
43
|
/**
|
|
34
44
|
* A struct which can be represented as a JavaScript object (TradeQuotesRequest).
|
|
35
45
|
*/
|
|
36
|
-
struct TradeQuotesRequest {
|
|
46
|
+
struct TradeQuotesRequest final {
|
|
37
47
|
public:
|
|
38
48
|
std::optional<std::string> linkedAccountIDs SWIFT_PRIVATE;
|
|
39
49
|
TradeAssetQuoteRequest gained SWIFT_PRIVATE;
|
|
@@ -43,6 +53,9 @@ namespace margelo::nitro::rncandle {
|
|
|
43
53
|
public:
|
|
44
54
|
TradeQuotesRequest() = default;
|
|
45
55
|
explicit TradeQuotesRequest(std::optional<std::string> linkedAccountIDs, TradeAssetQuoteRequest gained, TradeAssetQuoteRequest lost, std::optional<CounterpartyQuoteRequest> counterparty): linkedAccountIDs(linkedAccountIDs), gained(gained), lost(lost), counterparty(counterparty) {}
|
|
56
|
+
|
|
57
|
+
public:
|
|
58
|
+
friend bool operator==(const TradeQuotesRequest& lhs, const TradeQuotesRequest& rhs) = default;
|
|
46
59
|
};
|
|
47
60
|
|
|
48
61
|
} // namespace margelo::nitro::rncandle
|
|
@@ -55,18 +68,18 @@ namespace margelo::nitro {
|
|
|
55
68
|
static inline margelo::nitro::rncandle::TradeQuotesRequest fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
56
69
|
jsi::Object obj = arg.asObject(runtime);
|
|
57
70
|
return margelo::nitro::rncandle::TradeQuotesRequest(
|
|
58
|
-
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "linkedAccountIDs")),
|
|
59
|
-
JSIConverter<margelo::nitro::rncandle::TradeAssetQuoteRequest>::fromJSI(runtime, obj.getProperty(runtime, "gained")),
|
|
60
|
-
JSIConverter<margelo::nitro::rncandle::TradeAssetQuoteRequest>::fromJSI(runtime, obj.getProperty(runtime, "lost")),
|
|
61
|
-
JSIConverter<std::optional<margelo::nitro::rncandle::CounterpartyQuoteRequest>>::fromJSI(runtime, obj.getProperty(runtime, "counterparty"))
|
|
71
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "linkedAccountIDs"))),
|
|
72
|
+
JSIConverter<margelo::nitro::rncandle::TradeAssetQuoteRequest>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "gained"))),
|
|
73
|
+
JSIConverter<margelo::nitro::rncandle::TradeAssetQuoteRequest>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "lost"))),
|
|
74
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::CounterpartyQuoteRequest>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "counterparty")))
|
|
62
75
|
);
|
|
63
76
|
}
|
|
64
77
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rncandle::TradeQuotesRequest& arg) {
|
|
65
78
|
jsi::Object obj(runtime);
|
|
66
|
-
obj.setProperty(runtime, "linkedAccountIDs", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.linkedAccountIDs));
|
|
67
|
-
obj.setProperty(runtime, "gained", JSIConverter<margelo::nitro::rncandle::TradeAssetQuoteRequest>::toJSI(runtime, arg.gained));
|
|
68
|
-
obj.setProperty(runtime, "lost", JSIConverter<margelo::nitro::rncandle::TradeAssetQuoteRequest>::toJSI(runtime, arg.lost));
|
|
69
|
-
obj.setProperty(runtime, "counterparty", JSIConverter<std::optional<margelo::nitro::rncandle::CounterpartyQuoteRequest>>::toJSI(runtime, arg.counterparty));
|
|
79
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "linkedAccountIDs"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.linkedAccountIDs));
|
|
80
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "gained"), JSIConverter<margelo::nitro::rncandle::TradeAssetQuoteRequest>::toJSI(runtime, arg.gained));
|
|
81
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "lost"), JSIConverter<margelo::nitro::rncandle::TradeAssetQuoteRequest>::toJSI(runtime, arg.lost));
|
|
82
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "counterparty"), JSIConverter<std::optional<margelo::nitro::rncandle::CounterpartyQuoteRequest>>::toJSI(runtime, arg.counterparty));
|
|
70
83
|
return obj;
|
|
71
84
|
}
|
|
72
85
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -74,10 +87,13 @@ namespace margelo::nitro {
|
|
|
74
87
|
return false;
|
|
75
88
|
}
|
|
76
89
|
jsi::Object obj = value.getObject(runtime);
|
|
77
|
-
if (!
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
if (!JSIConverter<std::optional<
|
|
90
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "linkedAccountIDs")))) return false;
|
|
94
|
+
if (!JSIConverter<margelo::nitro::rncandle::TradeAssetQuoteRequest>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "gained")))) return false;
|
|
95
|
+
if (!JSIConverter<margelo::nitro::rncandle::TradeAssetQuoteRequest>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "lost")))) return false;
|
|
96
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::CounterpartyQuoteRequest>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "counterparty")))) return false;
|
|
81
97
|
return true;
|
|
82
98
|
}
|
|
83
99
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// TradeQuotesResponse.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 `LinkedAccountStatusRef` to properly resolve imports.
|
|
22
32
|
namespace margelo::nitro::rncandle { struct LinkedAccountStatusRef; }
|
|
@@ -32,7 +42,7 @@ namespace margelo::nitro::rncandle {
|
|
|
32
42
|
/**
|
|
33
43
|
* A struct which can be represented as a JavaScript object (TradeQuotesResponse).
|
|
34
44
|
*/
|
|
35
|
-
struct TradeQuotesResponse {
|
|
45
|
+
struct TradeQuotesResponse final {
|
|
36
46
|
public:
|
|
37
47
|
std::vector<LinkedAccountStatusRef> linkedAccounts SWIFT_PRIVATE;
|
|
38
48
|
std::vector<TradeQuote> tradeQuotes SWIFT_PRIVATE;
|
|
@@ -40,6 +50,9 @@ namespace margelo::nitro::rncandle {
|
|
|
40
50
|
public:
|
|
41
51
|
TradeQuotesResponse() = default;
|
|
42
52
|
explicit TradeQuotesResponse(std::vector<LinkedAccountStatusRef> linkedAccounts, std::vector<TradeQuote> tradeQuotes): linkedAccounts(linkedAccounts), tradeQuotes(tradeQuotes) {}
|
|
53
|
+
|
|
54
|
+
public:
|
|
55
|
+
friend bool operator==(const TradeQuotesResponse& lhs, const TradeQuotesResponse& rhs) = default;
|
|
43
56
|
};
|
|
44
57
|
|
|
45
58
|
} // namespace margelo::nitro::rncandle
|
|
@@ -52,14 +65,14 @@ namespace margelo::nitro {
|
|
|
52
65
|
static inline margelo::nitro::rncandle::TradeQuotesResponse fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
53
66
|
jsi::Object obj = arg.asObject(runtime);
|
|
54
67
|
return margelo::nitro::rncandle::TradeQuotesResponse(
|
|
55
|
-
JSIConverter<std::vector<margelo::nitro::rncandle::LinkedAccountStatusRef>>::fromJSI(runtime, obj.getProperty(runtime, "linkedAccounts")),
|
|
56
|
-
JSIConverter<std::vector<margelo::nitro::rncandle::TradeQuote>>::fromJSI(runtime, obj.getProperty(runtime, "tradeQuotes"))
|
|
68
|
+
JSIConverter<std::vector<margelo::nitro::rncandle::LinkedAccountStatusRef>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "linkedAccounts"))),
|
|
69
|
+
JSIConverter<std::vector<margelo::nitro::rncandle::TradeQuote>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "tradeQuotes")))
|
|
57
70
|
);
|
|
58
71
|
}
|
|
59
72
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rncandle::TradeQuotesResponse& arg) {
|
|
60
73
|
jsi::Object obj(runtime);
|
|
61
|
-
obj.setProperty(runtime, "linkedAccounts", JSIConverter<std::vector<margelo::nitro::rncandle::LinkedAccountStatusRef>>::toJSI(runtime, arg.linkedAccounts));
|
|
62
|
-
obj.setProperty(runtime, "tradeQuotes", JSIConverter<std::vector<margelo::nitro::rncandle::TradeQuote>>::toJSI(runtime, arg.tradeQuotes));
|
|
74
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "linkedAccounts"), JSIConverter<std::vector<margelo::nitro::rncandle::LinkedAccountStatusRef>>::toJSI(runtime, arg.linkedAccounts));
|
|
75
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "tradeQuotes"), JSIConverter<std::vector<margelo::nitro::rncandle::TradeQuote>>::toJSI(runtime, arg.tradeQuotes));
|
|
63
76
|
return obj;
|
|
64
77
|
}
|
|
65
78
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -67,8 +80,11 @@ namespace margelo::nitro {
|
|
|
67
80
|
return false;
|
|
68
81
|
}
|
|
69
82
|
jsi::Object obj = value.getObject(runtime);
|
|
70
|
-
if (!
|
|
71
|
-
|
|
83
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
if (!JSIConverter<std::vector<margelo::nitro::rncandle::LinkedAccountStatusRef>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "linkedAccounts")))) return false;
|
|
87
|
+
if (!JSIConverter<std::vector<margelo::nitro::rncandle::TradeQuote>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "tradeQuotes")))) return false;
|
|
72
88
|
return true;
|
|
73
89
|
}
|
|
74
90
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// TradeRef.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 `TradeAssetRef` to properly resolve imports.
|
|
22
32
|
namespace margelo::nitro::rncandle { struct TradeAssetRef; }
|
|
@@ -28,7 +38,7 @@ namespace margelo::nitro::rncandle {
|
|
|
28
38
|
/**
|
|
29
39
|
* A struct which can be represented as a JavaScript object (TradeRef).
|
|
30
40
|
*/
|
|
31
|
-
struct TradeRef {
|
|
41
|
+
struct TradeRef final {
|
|
32
42
|
public:
|
|
33
43
|
TradeAssetRef lost SWIFT_PRIVATE;
|
|
34
44
|
TradeAssetRef gained SWIFT_PRIVATE;
|
|
@@ -36,6 +46,9 @@ namespace margelo::nitro::rncandle {
|
|
|
36
46
|
public:
|
|
37
47
|
TradeRef() = default;
|
|
38
48
|
explicit TradeRef(TradeAssetRef lost, TradeAssetRef gained): lost(lost), gained(gained) {}
|
|
49
|
+
|
|
50
|
+
public:
|
|
51
|
+
friend bool operator==(const TradeRef& lhs, const TradeRef& rhs) = default;
|
|
39
52
|
};
|
|
40
53
|
|
|
41
54
|
} // namespace margelo::nitro::rncandle
|
|
@@ -48,14 +61,14 @@ namespace margelo::nitro {
|
|
|
48
61
|
static inline margelo::nitro::rncandle::TradeRef fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
49
62
|
jsi::Object obj = arg.asObject(runtime);
|
|
50
63
|
return margelo::nitro::rncandle::TradeRef(
|
|
51
|
-
JSIConverter<margelo::nitro::rncandle::TradeAssetRef>::fromJSI(runtime, obj.getProperty(runtime, "lost")),
|
|
52
|
-
JSIConverter<margelo::nitro::rncandle::TradeAssetRef>::fromJSI(runtime, obj.getProperty(runtime, "gained"))
|
|
64
|
+
JSIConverter<margelo::nitro::rncandle::TradeAssetRef>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "lost"))),
|
|
65
|
+
JSIConverter<margelo::nitro::rncandle::TradeAssetRef>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "gained")))
|
|
53
66
|
);
|
|
54
67
|
}
|
|
55
68
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rncandle::TradeRef& arg) {
|
|
56
69
|
jsi::Object obj(runtime);
|
|
57
|
-
obj.setProperty(runtime, "lost", JSIConverter<margelo::nitro::rncandle::TradeAssetRef>::toJSI(runtime, arg.lost));
|
|
58
|
-
obj.setProperty(runtime, "gained", JSIConverter<margelo::nitro::rncandle::TradeAssetRef>::toJSI(runtime, arg.gained));
|
|
70
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "lost"), JSIConverter<margelo::nitro::rncandle::TradeAssetRef>::toJSI(runtime, arg.lost));
|
|
71
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "gained"), JSIConverter<margelo::nitro::rncandle::TradeAssetRef>::toJSI(runtime, arg.gained));
|
|
59
72
|
return obj;
|
|
60
73
|
}
|
|
61
74
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -63,8 +76,11 @@ namespace margelo::nitro {
|
|
|
63
76
|
return false;
|
|
64
77
|
}
|
|
65
78
|
jsi::Object obj = value.getObject(runtime);
|
|
66
|
-
if (!
|
|
67
|
-
|
|
79
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
if (!JSIConverter<margelo::nitro::rncandle::TradeAssetRef>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "lost")))) return false;
|
|
83
|
+
if (!JSIConverter<margelo::nitro::rncandle::TradeAssetRef>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "gained")))) return false;
|
|
68
84
|
return true;
|
|
69
85
|
}
|
|
70
86
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// TradesQuery.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 `TradeAssetKind` to properly resolve imports.
|
|
22
32
|
namespace margelo::nitro::rncandle { enum class TradeAssetKind; }
|
|
@@ -33,7 +43,7 @@ namespace margelo::nitro::rncandle {
|
|
|
33
43
|
/**
|
|
34
44
|
* A struct which can be represented as a JavaScript object (TradesQuery).
|
|
35
45
|
*/
|
|
36
|
-
struct TradesQuery {
|
|
46
|
+
struct TradesQuery final {
|
|
37
47
|
public:
|
|
38
48
|
std::optional<std::string> linkedAccountIDs SWIFT_PRIVATE;
|
|
39
49
|
std::optional<std::string> dateTimeSpan SWIFT_PRIVATE;
|
|
@@ -44,6 +54,9 @@ namespace margelo::nitro::rncandle {
|
|
|
44
54
|
public:
|
|
45
55
|
TradesQuery() = default;
|
|
46
56
|
explicit TradesQuery(std::optional<std::string> linkedAccountIDs, std::optional<std::string> dateTimeSpan, std::optional<TradeAssetKind> gainedAssetKind, std::optional<TradeAssetKind> lostAssetKind, std::optional<CounterpartyKind> counterpartyKind): linkedAccountIDs(linkedAccountIDs), dateTimeSpan(dateTimeSpan), gainedAssetKind(gainedAssetKind), lostAssetKind(lostAssetKind), counterpartyKind(counterpartyKind) {}
|
|
57
|
+
|
|
58
|
+
public:
|
|
59
|
+
friend bool operator==(const TradesQuery& lhs, const TradesQuery& rhs) = default;
|
|
47
60
|
};
|
|
48
61
|
|
|
49
62
|
} // namespace margelo::nitro::rncandle
|
|
@@ -56,20 +69,20 @@ namespace margelo::nitro {
|
|
|
56
69
|
static inline margelo::nitro::rncandle::TradesQuery fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
57
70
|
jsi::Object obj = arg.asObject(runtime);
|
|
58
71
|
return margelo::nitro::rncandle::TradesQuery(
|
|
59
|
-
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "linkedAccountIDs")),
|
|
60
|
-
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "dateTimeSpan")),
|
|
61
|
-
JSIConverter<std::optional<margelo::nitro::rncandle::TradeAssetKind>>::fromJSI(runtime, obj.getProperty(runtime, "gainedAssetKind")),
|
|
62
|
-
JSIConverter<std::optional<margelo::nitro::rncandle::TradeAssetKind>>::fromJSI(runtime, obj.getProperty(runtime, "lostAssetKind")),
|
|
63
|
-
JSIConverter<std::optional<margelo::nitro::rncandle::CounterpartyKind>>::fromJSI(runtime, obj.getProperty(runtime, "counterpartyKind"))
|
|
72
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "linkedAccountIDs"))),
|
|
73
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "dateTimeSpan"))),
|
|
74
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::TradeAssetKind>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "gainedAssetKind"))),
|
|
75
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::TradeAssetKind>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "lostAssetKind"))),
|
|
76
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::CounterpartyKind>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "counterpartyKind")))
|
|
64
77
|
);
|
|
65
78
|
}
|
|
66
79
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rncandle::TradesQuery& arg) {
|
|
67
80
|
jsi::Object obj(runtime);
|
|
68
|
-
obj.setProperty(runtime, "linkedAccountIDs", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.linkedAccountIDs));
|
|
69
|
-
obj.setProperty(runtime, "dateTimeSpan", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.dateTimeSpan));
|
|
70
|
-
obj.setProperty(runtime, "gainedAssetKind", JSIConverter<std::optional<margelo::nitro::rncandle::TradeAssetKind>>::toJSI(runtime, arg.gainedAssetKind));
|
|
71
|
-
obj.setProperty(runtime, "lostAssetKind", JSIConverter<std::optional<margelo::nitro::rncandle::TradeAssetKind>>::toJSI(runtime, arg.lostAssetKind));
|
|
72
|
-
obj.setProperty(runtime, "counterpartyKind", JSIConverter<std::optional<margelo::nitro::rncandle::CounterpartyKind>>::toJSI(runtime, arg.counterpartyKind));
|
|
81
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "linkedAccountIDs"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.linkedAccountIDs));
|
|
82
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "dateTimeSpan"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.dateTimeSpan));
|
|
83
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "gainedAssetKind"), JSIConverter<std::optional<margelo::nitro::rncandle::TradeAssetKind>>::toJSI(runtime, arg.gainedAssetKind));
|
|
84
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "lostAssetKind"), JSIConverter<std::optional<margelo::nitro::rncandle::TradeAssetKind>>::toJSI(runtime, arg.lostAssetKind));
|
|
85
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "counterpartyKind"), JSIConverter<std::optional<margelo::nitro::rncandle::CounterpartyKind>>::toJSI(runtime, arg.counterpartyKind));
|
|
73
86
|
return obj;
|
|
74
87
|
}
|
|
75
88
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -77,11 +90,14 @@ namespace margelo::nitro {
|
|
|
77
90
|
return false;
|
|
78
91
|
}
|
|
79
92
|
jsi::Object obj = value.getObject(runtime);
|
|
80
|
-
if (!
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
if (!JSIConverter<std::optional<
|
|
84
|
-
if (!JSIConverter<std::optional<
|
|
93
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
96
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "linkedAccountIDs")))) return false;
|
|
97
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "dateTimeSpan")))) return false;
|
|
98
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::TradeAssetKind>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "gainedAssetKind")))) return false;
|
|
99
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::TradeAssetKind>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "lostAssetKind")))) return false;
|
|
100
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::CounterpartyKind>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "counterpartyKind")))) return false;
|
|
85
101
|
return true;
|
|
86
102
|
}
|
|
87
103
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// TradesResponse.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 `LinkedAccountStatusRef` to properly resolve imports.
|
|
22
32
|
namespace margelo::nitro::rncandle { struct LinkedAccountStatusRef; }
|
|
@@ -32,7 +42,7 @@ namespace margelo::nitro::rncandle {
|
|
|
32
42
|
/**
|
|
33
43
|
* A struct which can be represented as a JavaScript object (TradesResponse).
|
|
34
44
|
*/
|
|
35
|
-
struct TradesResponse {
|
|
45
|
+
struct TradesResponse final {
|
|
36
46
|
public:
|
|
37
47
|
std::vector<LinkedAccountStatusRef> linkedAccounts SWIFT_PRIVATE;
|
|
38
48
|
std::vector<Trade> trades SWIFT_PRIVATE;
|
|
@@ -40,6 +50,9 @@ namespace margelo::nitro::rncandle {
|
|
|
40
50
|
public:
|
|
41
51
|
TradesResponse() = default;
|
|
42
52
|
explicit TradesResponse(std::vector<LinkedAccountStatusRef> linkedAccounts, std::vector<Trade> trades): linkedAccounts(linkedAccounts), trades(trades) {}
|
|
53
|
+
|
|
54
|
+
public:
|
|
55
|
+
friend bool operator==(const TradesResponse& lhs, const TradesResponse& rhs) = default;
|
|
43
56
|
};
|
|
44
57
|
|
|
45
58
|
} // namespace margelo::nitro::rncandle
|
|
@@ -52,14 +65,14 @@ namespace margelo::nitro {
|
|
|
52
65
|
static inline margelo::nitro::rncandle::TradesResponse fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
53
66
|
jsi::Object obj = arg.asObject(runtime);
|
|
54
67
|
return margelo::nitro::rncandle::TradesResponse(
|
|
55
|
-
JSIConverter<std::vector<margelo::nitro::rncandle::LinkedAccountStatusRef>>::fromJSI(runtime, obj.getProperty(runtime, "linkedAccounts")),
|
|
56
|
-
JSIConverter<std::vector<margelo::nitro::rncandle::Trade>>::fromJSI(runtime, obj.getProperty(runtime, "trades"))
|
|
68
|
+
JSIConverter<std::vector<margelo::nitro::rncandle::LinkedAccountStatusRef>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "linkedAccounts"))),
|
|
69
|
+
JSIConverter<std::vector<margelo::nitro::rncandle::Trade>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "trades")))
|
|
57
70
|
);
|
|
58
71
|
}
|
|
59
72
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rncandle::TradesResponse& arg) {
|
|
60
73
|
jsi::Object obj(runtime);
|
|
61
|
-
obj.setProperty(runtime, "linkedAccounts", JSIConverter<std::vector<margelo::nitro::rncandle::LinkedAccountStatusRef>>::toJSI(runtime, arg.linkedAccounts));
|
|
62
|
-
obj.setProperty(runtime, "trades", JSIConverter<std::vector<margelo::nitro::rncandle::Trade>>::toJSI(runtime, arg.trades));
|
|
74
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "linkedAccounts"), JSIConverter<std::vector<margelo::nitro::rncandle::LinkedAccountStatusRef>>::toJSI(runtime, arg.linkedAccounts));
|
|
75
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "trades"), JSIConverter<std::vector<margelo::nitro::rncandle::Trade>>::toJSI(runtime, arg.trades));
|
|
63
76
|
return obj;
|
|
64
77
|
}
|
|
65
78
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -67,8 +80,11 @@ namespace margelo::nitro {
|
|
|
67
80
|
return false;
|
|
68
81
|
}
|
|
69
82
|
jsi::Object obj = value.getObject(runtime);
|
|
70
|
-
if (!
|
|
71
|
-
|
|
83
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
if (!JSIConverter<std::vector<margelo::nitro::rncandle::LinkedAccountStatusRef>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "linkedAccounts")))) return false;
|
|
87
|
+
if (!JSIConverter<std::vector<margelo::nitro::rncandle::Trade>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "trades")))) return false;
|
|
72
88
|
return true;
|
|
73
89
|
}
|
|
74
90
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// TransportAccount.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 `TransportAccountKind` to properly resolve imports.
|
|
22
32
|
namespace margelo::nitro::rncandle { enum class TransportAccountKind; }
|
|
@@ -32,7 +42,7 @@ namespace margelo::nitro::rncandle {
|
|
|
32
42
|
/**
|
|
33
43
|
* A struct which can be represented as a JavaScript object (TransportAccount).
|
|
34
44
|
*/
|
|
35
|
-
struct TransportAccount {
|
|
45
|
+
struct TransportAccount final {
|
|
36
46
|
public:
|
|
37
47
|
std::string assetKind SWIFT_PRIVATE;
|
|
38
48
|
std::string serviceAccountID SWIFT_PRIVATE;
|
|
@@ -44,6 +54,9 @@ namespace margelo::nitro::rncandle {
|
|
|
44
54
|
public:
|
|
45
55
|
TransportAccount() = default;
|
|
46
56
|
explicit TransportAccount(std::string assetKind, std::string serviceAccountID, TransportAccountKind accountKind, std::string nickname, std::string linkedAccountID, Service service): assetKind(assetKind), serviceAccountID(serviceAccountID), accountKind(accountKind), nickname(nickname), linkedAccountID(linkedAccountID), service(service) {}
|
|
57
|
+
|
|
58
|
+
public:
|
|
59
|
+
friend bool operator==(const TransportAccount& lhs, const TransportAccount& rhs) = default;
|
|
47
60
|
};
|
|
48
61
|
|
|
49
62
|
} // namespace margelo::nitro::rncandle
|
|
@@ -56,22 +69,22 @@ namespace margelo::nitro {
|
|
|
56
69
|
static inline margelo::nitro::rncandle::TransportAccount fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
57
70
|
jsi::Object obj = arg.asObject(runtime);
|
|
58
71
|
return margelo::nitro::rncandle::TransportAccount(
|
|
59
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "assetKind")),
|
|
60
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "serviceAccountID")),
|
|
61
|
-
JSIConverter<margelo::nitro::rncandle::TransportAccountKind>::fromJSI(runtime, obj.getProperty(runtime, "accountKind")),
|
|
62
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "nickname")),
|
|
63
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "linkedAccountID")),
|
|
64
|
-
JSIConverter<margelo::nitro::rncandle::Service>::fromJSI(runtime, obj.getProperty(runtime, "service"))
|
|
72
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "assetKind"))),
|
|
73
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "serviceAccountID"))),
|
|
74
|
+
JSIConverter<margelo::nitro::rncandle::TransportAccountKind>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "accountKind"))),
|
|
75
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "nickname"))),
|
|
76
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "linkedAccountID"))),
|
|
77
|
+
JSIConverter<margelo::nitro::rncandle::Service>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "service")))
|
|
65
78
|
);
|
|
66
79
|
}
|
|
67
80
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rncandle::TransportAccount& arg) {
|
|
68
81
|
jsi::Object obj(runtime);
|
|
69
|
-
obj.setProperty(runtime, "assetKind", JSIConverter<std::string>::toJSI(runtime, arg.assetKind));
|
|
70
|
-
obj.setProperty(runtime, "serviceAccountID", JSIConverter<std::string>::toJSI(runtime, arg.serviceAccountID));
|
|
71
|
-
obj.setProperty(runtime, "accountKind", JSIConverter<margelo::nitro::rncandle::TransportAccountKind>::toJSI(runtime, arg.accountKind));
|
|
72
|
-
obj.setProperty(runtime, "nickname", JSIConverter<std::string>::toJSI(runtime, arg.nickname));
|
|
73
|
-
obj.setProperty(runtime, "linkedAccountID", JSIConverter<std::string>::toJSI(runtime, arg.linkedAccountID));
|
|
74
|
-
obj.setProperty(runtime, "service", JSIConverter<margelo::nitro::rncandle::Service>::toJSI(runtime, arg.service));
|
|
82
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "assetKind"), JSIConverter<std::string>::toJSI(runtime, arg.assetKind));
|
|
83
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "serviceAccountID"), JSIConverter<std::string>::toJSI(runtime, arg.serviceAccountID));
|
|
84
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "accountKind"), JSIConverter<margelo::nitro::rncandle::TransportAccountKind>::toJSI(runtime, arg.accountKind));
|
|
85
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "nickname"), JSIConverter<std::string>::toJSI(runtime, arg.nickname));
|
|
86
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "linkedAccountID"), JSIConverter<std::string>::toJSI(runtime, arg.linkedAccountID));
|
|
87
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "service"), JSIConverter<margelo::nitro::rncandle::Service>::toJSI(runtime, arg.service));
|
|
75
88
|
return obj;
|
|
76
89
|
}
|
|
77
90
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -79,12 +92,15 @@ namespace margelo::nitro {
|
|
|
79
92
|
return false;
|
|
80
93
|
}
|
|
81
94
|
jsi::Object obj = value.getObject(runtime);
|
|
82
|
-
if (!
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "
|
|
86
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "
|
|
87
|
-
if (!JSIConverter<margelo::nitro::rncandle::
|
|
95
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "assetKind")))) return false;
|
|
99
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "serviceAccountID")))) return false;
|
|
100
|
+
if (!JSIConverter<margelo::nitro::rncandle::TransportAccountKind>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "accountKind")))) return false;
|
|
101
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "nickname")))) return false;
|
|
102
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "linkedAccountID")))) return false;
|
|
103
|
+
if (!JSIConverter<margelo::nitro::rncandle::Service>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "service")))) return false;
|
|
88
104
|
return true;
|
|
89
105
|
}
|
|
90
106
|
};
|