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
|
/// AssetAccountRef.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 `AssetAccountKind` to properly resolve imports.
|
|
22
32
|
namespace margelo::nitro::rncandle { enum class AssetAccountKind; }
|
|
@@ -29,7 +39,7 @@ namespace margelo::nitro::rncandle {
|
|
|
29
39
|
/**
|
|
30
40
|
* A struct which can be represented as a JavaScript object (AssetAccountRef).
|
|
31
41
|
*/
|
|
32
|
-
struct AssetAccountRef {
|
|
42
|
+
struct AssetAccountRef final {
|
|
33
43
|
public:
|
|
34
44
|
std::string linkedAccountID SWIFT_PRIVATE;
|
|
35
45
|
AssetAccountKind assetKind SWIFT_PRIVATE;
|
|
@@ -38,6 +48,9 @@ namespace margelo::nitro::rncandle {
|
|
|
38
48
|
public:
|
|
39
49
|
AssetAccountRef() = default;
|
|
40
50
|
explicit AssetAccountRef(std::string linkedAccountID, AssetAccountKind assetKind, std::string serviceAccountID): linkedAccountID(linkedAccountID), assetKind(assetKind), serviceAccountID(serviceAccountID) {}
|
|
51
|
+
|
|
52
|
+
public:
|
|
53
|
+
friend bool operator==(const AssetAccountRef& lhs, const AssetAccountRef& rhs) = default;
|
|
41
54
|
};
|
|
42
55
|
|
|
43
56
|
} // namespace margelo::nitro::rncandle
|
|
@@ -50,16 +63,16 @@ namespace margelo::nitro {
|
|
|
50
63
|
static inline margelo::nitro::rncandle::AssetAccountRef fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
51
64
|
jsi::Object obj = arg.asObject(runtime);
|
|
52
65
|
return margelo::nitro::rncandle::AssetAccountRef(
|
|
53
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "linkedAccountID")),
|
|
54
|
-
JSIConverter<margelo::nitro::rncandle::AssetAccountKind>::fromJSI(runtime, obj.getProperty(runtime, "assetKind")),
|
|
55
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "serviceAccountID"))
|
|
66
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "linkedAccountID"))),
|
|
67
|
+
JSIConverter<margelo::nitro::rncandle::AssetAccountKind>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "assetKind"))),
|
|
68
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "serviceAccountID")))
|
|
56
69
|
);
|
|
57
70
|
}
|
|
58
71
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rncandle::AssetAccountRef& arg) {
|
|
59
72
|
jsi::Object obj(runtime);
|
|
60
|
-
obj.setProperty(runtime, "linkedAccountID", JSIConverter<std::string>::toJSI(runtime, arg.linkedAccountID));
|
|
61
|
-
obj.setProperty(runtime, "assetKind", JSIConverter<margelo::nitro::rncandle::AssetAccountKind>::toJSI(runtime, arg.assetKind));
|
|
62
|
-
obj.setProperty(runtime, "serviceAccountID", JSIConverter<std::string>::toJSI(runtime, arg.serviceAccountID));
|
|
73
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "linkedAccountID"), JSIConverter<std::string>::toJSI(runtime, arg.linkedAccountID));
|
|
74
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "assetKind"), JSIConverter<margelo::nitro::rncandle::AssetAccountKind>::toJSI(runtime, arg.assetKind));
|
|
75
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "serviceAccountID"), JSIConverter<std::string>::toJSI(runtime, arg.serviceAccountID));
|
|
63
76
|
return obj;
|
|
64
77
|
}
|
|
65
78
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -67,9 +80,12 @@ namespace margelo::nitro {
|
|
|
67
80
|
return false;
|
|
68
81
|
}
|
|
69
82
|
jsi::Object obj = value.getObject(runtime);
|
|
70
|
-
if (!
|
|
71
|
-
|
|
72
|
-
|
|
83
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "linkedAccountID")))) return false;
|
|
87
|
+
if (!JSIConverter<margelo::nitro::rncandle::AssetAccountKind>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "assetKind")))) return false;
|
|
88
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "serviceAccountID")))) return false;
|
|
73
89
|
return true;
|
|
74
90
|
}
|
|
75
91
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// AssetAccountsQuery.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 `AssetAccountKind` to properly resolve imports.
|
|
22
32
|
namespace margelo::nitro::rncandle { enum class AssetAccountKind; }
|
|
@@ -30,7 +40,7 @@ namespace margelo::nitro::rncandle {
|
|
|
30
40
|
/**
|
|
31
41
|
* A struct which can be represented as a JavaScript object (AssetAccountsQuery).
|
|
32
42
|
*/
|
|
33
|
-
struct AssetAccountsQuery {
|
|
43
|
+
struct AssetAccountsQuery final {
|
|
34
44
|
public:
|
|
35
45
|
std::optional<std::string> linkedAccountIDs SWIFT_PRIVATE;
|
|
36
46
|
std::optional<AssetAccountKind> assetKind SWIFT_PRIVATE;
|
|
@@ -38,6 +48,9 @@ namespace margelo::nitro::rncandle {
|
|
|
38
48
|
public:
|
|
39
49
|
AssetAccountsQuery() = default;
|
|
40
50
|
explicit AssetAccountsQuery(std::optional<std::string> linkedAccountIDs, std::optional<AssetAccountKind> assetKind): linkedAccountIDs(linkedAccountIDs), assetKind(assetKind) {}
|
|
51
|
+
|
|
52
|
+
public:
|
|
53
|
+
friend bool operator==(const AssetAccountsQuery& lhs, const AssetAccountsQuery& 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::AssetAccountsQuery fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
51
64
|
jsi::Object obj = arg.asObject(runtime);
|
|
52
65
|
return margelo::nitro::rncandle::AssetAccountsQuery(
|
|
53
|
-
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "linkedAccountIDs")),
|
|
54
|
-
JSIConverter<std::optional<margelo::nitro::rncandle::AssetAccountKind>>::fromJSI(runtime, obj.getProperty(runtime, "assetKind"))
|
|
66
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "linkedAccountIDs"))),
|
|
67
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::AssetAccountKind>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "assetKind")))
|
|
55
68
|
);
|
|
56
69
|
}
|
|
57
70
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rncandle::AssetAccountsQuery& arg) {
|
|
58
71
|
jsi::Object obj(runtime);
|
|
59
|
-
obj.setProperty(runtime, "linkedAccountIDs", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.linkedAccountIDs));
|
|
60
|
-
obj.setProperty(runtime, "assetKind", JSIConverter<std::optional<margelo::nitro::rncandle::AssetAccountKind>>::toJSI(runtime, arg.assetKind));
|
|
72
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "linkedAccountIDs"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.linkedAccountIDs));
|
|
73
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "assetKind"), JSIConverter<std::optional<margelo::nitro::rncandle::AssetAccountKind>>::toJSI(runtime, arg.assetKind));
|
|
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<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "linkedAccountIDs")))) return false;
|
|
85
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::AssetAccountKind>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "assetKind")))) return false;
|
|
70
86
|
return true;
|
|
71
87
|
}
|
|
72
88
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// AssetAccountsResponse.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 (AssetAccountsResponse).
|
|
34
44
|
*/
|
|
35
|
-
struct AssetAccountsResponse {
|
|
45
|
+
struct AssetAccountsResponse final {
|
|
36
46
|
public:
|
|
37
47
|
std::vector<LinkedAccountStatusRef> linkedAccounts SWIFT_PRIVATE;
|
|
38
48
|
std::vector<AssetAccount> assetAccounts SWIFT_PRIVATE;
|
|
@@ -40,6 +50,9 @@ namespace margelo::nitro::rncandle {
|
|
|
40
50
|
public:
|
|
41
51
|
AssetAccountsResponse() = default;
|
|
42
52
|
explicit AssetAccountsResponse(std::vector<LinkedAccountStatusRef> linkedAccounts, std::vector<AssetAccount> assetAccounts): linkedAccounts(linkedAccounts), assetAccounts(assetAccounts) {}
|
|
53
|
+
|
|
54
|
+
public:
|
|
55
|
+
friend bool operator==(const AssetAccountsResponse& lhs, const AssetAccountsResponse& 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::AssetAccountsResponse fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
53
66
|
jsi::Object obj = arg.asObject(runtime);
|
|
54
67
|
return margelo::nitro::rncandle::AssetAccountsResponse(
|
|
55
|
-
JSIConverter<std::vector<margelo::nitro::rncandle::LinkedAccountStatusRef>>::fromJSI(runtime, obj.getProperty(runtime, "linkedAccounts")),
|
|
56
|
-
JSIConverter<std::vector<margelo::nitro::rncandle::AssetAccount>>::fromJSI(runtime, obj.getProperty(runtime, "assetAccounts"))
|
|
68
|
+
JSIConverter<std::vector<margelo::nitro::rncandle::LinkedAccountStatusRef>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "linkedAccounts"))),
|
|
69
|
+
JSIConverter<std::vector<margelo::nitro::rncandle::AssetAccount>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "assetAccounts")))
|
|
57
70
|
);
|
|
58
71
|
}
|
|
59
72
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rncandle::AssetAccountsResponse& 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, "assetAccounts", JSIConverter<std::vector<margelo::nitro::rncandle::AssetAccount>>::toJSI(runtime, arg.assetAccounts));
|
|
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, "assetAccounts"), JSIConverter<std::vector<margelo::nitro::rncandle::AssetAccount>>::toJSI(runtime, arg.assetAccounts));
|
|
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::AssetAccount>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "assetAccounts")))) return false;
|
|
72
88
|
return true;
|
|
73
89
|
}
|
|
74
90
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// Coordinates.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
|
|
|
22
32
|
|
|
@@ -27,7 +37,7 @@ namespace margelo::nitro::rncandle {
|
|
|
27
37
|
/**
|
|
28
38
|
* A struct which can be represented as a JavaScript object (Coordinates).
|
|
29
39
|
*/
|
|
30
|
-
struct Coordinates {
|
|
40
|
+
struct Coordinates final {
|
|
31
41
|
public:
|
|
32
42
|
double latitude SWIFT_PRIVATE;
|
|
33
43
|
double longitude SWIFT_PRIVATE;
|
|
@@ -35,6 +45,9 @@ namespace margelo::nitro::rncandle {
|
|
|
35
45
|
public:
|
|
36
46
|
Coordinates() = default;
|
|
37
47
|
explicit Coordinates(double latitude, double longitude): latitude(latitude), longitude(longitude) {}
|
|
48
|
+
|
|
49
|
+
public:
|
|
50
|
+
friend bool operator==(const Coordinates& lhs, const Coordinates& rhs) = default;
|
|
38
51
|
};
|
|
39
52
|
|
|
40
53
|
} // namespace margelo::nitro::rncandle
|
|
@@ -47,14 +60,14 @@ namespace margelo::nitro {
|
|
|
47
60
|
static inline margelo::nitro::rncandle::Coordinates fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
48
61
|
jsi::Object obj = arg.asObject(runtime);
|
|
49
62
|
return margelo::nitro::rncandle::Coordinates(
|
|
50
|
-
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "latitude")),
|
|
51
|
-
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "longitude"))
|
|
63
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "latitude"))),
|
|
64
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "longitude")))
|
|
52
65
|
);
|
|
53
66
|
}
|
|
54
67
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rncandle::Coordinates& arg) {
|
|
55
68
|
jsi::Object obj(runtime);
|
|
56
|
-
obj.setProperty(runtime, "latitude", JSIConverter<double>::toJSI(runtime, arg.latitude));
|
|
57
|
-
obj.setProperty(runtime, "longitude", JSIConverter<double>::toJSI(runtime, arg.longitude));
|
|
69
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "latitude"), JSIConverter<double>::toJSI(runtime, arg.latitude));
|
|
70
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "longitude"), JSIConverter<double>::toJSI(runtime, arg.longitude));
|
|
58
71
|
return obj;
|
|
59
72
|
}
|
|
60
73
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -62,8 +75,11 @@ namespace margelo::nitro {
|
|
|
62
75
|
return false;
|
|
63
76
|
}
|
|
64
77
|
jsi::Object obj = value.getObject(runtime);
|
|
65
|
-
if (!
|
|
66
|
-
|
|
78
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "latitude")))) return false;
|
|
82
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "longitude")))) return false;
|
|
67
83
|
return true;
|
|
68
84
|
}
|
|
69
85
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// Counterparty.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 `MerchantCounterparty` to properly resolve imports.
|
|
22
32
|
namespace margelo::nitro::rncandle { struct MerchantCounterparty; }
|
|
@@ -35,7 +45,7 @@ namespace margelo::nitro::rncandle {
|
|
|
35
45
|
/**
|
|
36
46
|
* A struct which can be represented as a JavaScript object (Counterparty).
|
|
37
47
|
*/
|
|
38
|
-
struct Counterparty {
|
|
48
|
+
struct Counterparty final {
|
|
39
49
|
public:
|
|
40
50
|
std::optional<MerchantCounterparty> merchantCounterparty SWIFT_PRIVATE;
|
|
41
51
|
std::optional<UserCounterparty> userCounterparty SWIFT_PRIVATE;
|
|
@@ -44,6 +54,9 @@ namespace margelo::nitro::rncandle {
|
|
|
44
54
|
public:
|
|
45
55
|
Counterparty() = default;
|
|
46
56
|
explicit Counterparty(std::optional<MerchantCounterparty> merchantCounterparty, std::optional<UserCounterparty> userCounterparty, std::optional<ServiceCounterparty> serviceCounterparty): merchantCounterparty(merchantCounterparty), userCounterparty(userCounterparty), serviceCounterparty(serviceCounterparty) {}
|
|
57
|
+
|
|
58
|
+
public:
|
|
59
|
+
friend bool operator==(const Counterparty& lhs, const Counterparty& rhs) = default;
|
|
47
60
|
};
|
|
48
61
|
|
|
49
62
|
} // namespace margelo::nitro::rncandle
|
|
@@ -56,16 +69,16 @@ namespace margelo::nitro {
|
|
|
56
69
|
static inline margelo::nitro::rncandle::Counterparty fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
57
70
|
jsi::Object obj = arg.asObject(runtime);
|
|
58
71
|
return margelo::nitro::rncandle::Counterparty(
|
|
59
|
-
JSIConverter<std::optional<margelo::nitro::rncandle::MerchantCounterparty>>::fromJSI(runtime, obj.getProperty(runtime, "merchantCounterparty")),
|
|
60
|
-
JSIConverter<std::optional<margelo::nitro::rncandle::UserCounterparty>>::fromJSI(runtime, obj.getProperty(runtime, "userCounterparty")),
|
|
61
|
-
JSIConverter<std::optional<margelo::nitro::rncandle::ServiceCounterparty>>::fromJSI(runtime, obj.getProperty(runtime, "serviceCounterparty"))
|
|
72
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::MerchantCounterparty>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "merchantCounterparty"))),
|
|
73
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::UserCounterparty>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "userCounterparty"))),
|
|
74
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::ServiceCounterparty>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "serviceCounterparty")))
|
|
62
75
|
);
|
|
63
76
|
}
|
|
64
77
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rncandle::Counterparty& arg) {
|
|
65
78
|
jsi::Object obj(runtime);
|
|
66
|
-
obj.setProperty(runtime, "merchantCounterparty", JSIConverter<std::optional<margelo::nitro::rncandle::MerchantCounterparty>>::toJSI(runtime, arg.merchantCounterparty));
|
|
67
|
-
obj.setProperty(runtime, "userCounterparty", JSIConverter<std::optional<margelo::nitro::rncandle::UserCounterparty>>::toJSI(runtime, arg.userCounterparty));
|
|
68
|
-
obj.setProperty(runtime, "serviceCounterparty", JSIConverter<std::optional<margelo::nitro::rncandle::ServiceCounterparty>>::toJSI(runtime, arg.serviceCounterparty));
|
|
79
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "merchantCounterparty"), JSIConverter<std::optional<margelo::nitro::rncandle::MerchantCounterparty>>::toJSI(runtime, arg.merchantCounterparty));
|
|
80
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "userCounterparty"), JSIConverter<std::optional<margelo::nitro::rncandle::UserCounterparty>>::toJSI(runtime, arg.userCounterparty));
|
|
81
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "serviceCounterparty"), JSIConverter<std::optional<margelo::nitro::rncandle::ServiceCounterparty>>::toJSI(runtime, arg.serviceCounterparty));
|
|
69
82
|
return obj;
|
|
70
83
|
}
|
|
71
84
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -73,9 +86,12 @@ namespace margelo::nitro {
|
|
|
73
86
|
return false;
|
|
74
87
|
}
|
|
75
88
|
jsi::Object obj = value.getObject(runtime);
|
|
76
|
-
if (!
|
|
77
|
-
|
|
78
|
-
|
|
89
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::MerchantCounterparty>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "merchantCounterparty")))) return false;
|
|
93
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::UserCounterparty>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "userCounterparty")))) return false;
|
|
94
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::ServiceCounterparty>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "serviceCounterparty")))) return false;
|
|
79
95
|
return true;
|
|
80
96
|
}
|
|
81
97
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// CounterpartyQuoteRequest.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 `UserCounterpartyQuoteRequest` to properly resolve imports.
|
|
22
32
|
namespace margelo::nitro::rncandle { struct UserCounterpartyQuoteRequest; }
|
|
@@ -35,7 +45,7 @@ namespace margelo::nitro::rncandle {
|
|
|
35
45
|
/**
|
|
36
46
|
* A struct which can be represented as a JavaScript object (CounterpartyQuoteRequest).
|
|
37
47
|
*/
|
|
38
|
-
struct CounterpartyQuoteRequest {
|
|
48
|
+
struct CounterpartyQuoteRequest final {
|
|
39
49
|
public:
|
|
40
50
|
std::optional<UserCounterpartyQuoteRequest> userCounterpartyQuoteRequest SWIFT_PRIVATE;
|
|
41
51
|
std::optional<MerchantCounterpartyQuoteRequest> merchantCounterpartyQuoteRequest SWIFT_PRIVATE;
|
|
@@ -44,6 +54,9 @@ namespace margelo::nitro::rncandle {
|
|
|
44
54
|
public:
|
|
45
55
|
CounterpartyQuoteRequest() = default;
|
|
46
56
|
explicit CounterpartyQuoteRequest(std::optional<UserCounterpartyQuoteRequest> userCounterpartyQuoteRequest, std::optional<MerchantCounterpartyQuoteRequest> merchantCounterpartyQuoteRequest, std::optional<ServiceCounterpartyQuoteRequest> serviceCounterpartyQuoteRequest): userCounterpartyQuoteRequest(userCounterpartyQuoteRequest), merchantCounterpartyQuoteRequest(merchantCounterpartyQuoteRequest), serviceCounterpartyQuoteRequest(serviceCounterpartyQuoteRequest) {}
|
|
57
|
+
|
|
58
|
+
public:
|
|
59
|
+
friend bool operator==(const CounterpartyQuoteRequest& lhs, const CounterpartyQuoteRequest& rhs) = default;
|
|
47
60
|
};
|
|
48
61
|
|
|
49
62
|
} // namespace margelo::nitro::rncandle
|
|
@@ -56,16 +69,16 @@ namespace margelo::nitro {
|
|
|
56
69
|
static inline margelo::nitro::rncandle::CounterpartyQuoteRequest fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
57
70
|
jsi::Object obj = arg.asObject(runtime);
|
|
58
71
|
return margelo::nitro::rncandle::CounterpartyQuoteRequest(
|
|
59
|
-
JSIConverter<std::optional<margelo::nitro::rncandle::UserCounterpartyQuoteRequest>>::fromJSI(runtime, obj.getProperty(runtime, "userCounterpartyQuoteRequest")),
|
|
60
|
-
JSIConverter<std::optional<margelo::nitro::rncandle::MerchantCounterpartyQuoteRequest>>::fromJSI(runtime, obj.getProperty(runtime, "merchantCounterpartyQuoteRequest")),
|
|
61
|
-
JSIConverter<std::optional<margelo::nitro::rncandle::ServiceCounterpartyQuoteRequest>>::fromJSI(runtime, obj.getProperty(runtime, "serviceCounterpartyQuoteRequest"))
|
|
72
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::UserCounterpartyQuoteRequest>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "userCounterpartyQuoteRequest"))),
|
|
73
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::MerchantCounterpartyQuoteRequest>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "merchantCounterpartyQuoteRequest"))),
|
|
74
|
+
JSIConverter<std::optional<margelo::nitro::rncandle::ServiceCounterpartyQuoteRequest>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "serviceCounterpartyQuoteRequest")))
|
|
62
75
|
);
|
|
63
76
|
}
|
|
64
77
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rncandle::CounterpartyQuoteRequest& arg) {
|
|
65
78
|
jsi::Object obj(runtime);
|
|
66
|
-
obj.setProperty(runtime, "userCounterpartyQuoteRequest", JSIConverter<std::optional<margelo::nitro::rncandle::UserCounterpartyQuoteRequest>>::toJSI(runtime, arg.userCounterpartyQuoteRequest));
|
|
67
|
-
obj.setProperty(runtime, "merchantCounterpartyQuoteRequest", JSIConverter<std::optional<margelo::nitro::rncandle::MerchantCounterpartyQuoteRequest>>::toJSI(runtime, arg.merchantCounterpartyQuoteRequest));
|
|
68
|
-
obj.setProperty(runtime, "serviceCounterpartyQuoteRequest", JSIConverter<std::optional<margelo::nitro::rncandle::ServiceCounterpartyQuoteRequest>>::toJSI(runtime, arg.serviceCounterpartyQuoteRequest));
|
|
79
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "userCounterpartyQuoteRequest"), JSIConverter<std::optional<margelo::nitro::rncandle::UserCounterpartyQuoteRequest>>::toJSI(runtime, arg.userCounterpartyQuoteRequest));
|
|
80
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "merchantCounterpartyQuoteRequest"), JSIConverter<std::optional<margelo::nitro::rncandle::MerchantCounterpartyQuoteRequest>>::toJSI(runtime, arg.merchantCounterpartyQuoteRequest));
|
|
81
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "serviceCounterpartyQuoteRequest"), JSIConverter<std::optional<margelo::nitro::rncandle::ServiceCounterpartyQuoteRequest>>::toJSI(runtime, arg.serviceCounterpartyQuoteRequest));
|
|
69
82
|
return obj;
|
|
70
83
|
}
|
|
71
84
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -73,9 +86,12 @@ namespace margelo::nitro {
|
|
|
73
86
|
return false;
|
|
74
87
|
}
|
|
75
88
|
jsi::Object obj = value.getObject(runtime);
|
|
76
|
-
if (!
|
|
77
|
-
|
|
78
|
-
|
|
89
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::UserCounterpartyQuoteRequest>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "userCounterpartyQuoteRequest")))) return false;
|
|
93
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::MerchantCounterpartyQuoteRequest>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "merchantCounterpartyQuoteRequest")))) return false;
|
|
94
|
+
if (!JSIConverter<std::optional<margelo::nitro::rncandle::ServiceCounterpartyQuoteRequest>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "serviceCounterpartyQuoteRequest")))) return false;
|
|
79
95
|
return true;
|
|
80
96
|
}
|
|
81
97
|
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// CryptoAccount.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#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
|
|
30
|
+
|
|
31
|
+
// Forward declaration of `FinancialAccountKind` to properly resolve imports.
|
|
32
|
+
namespace margelo::nitro::rncandle { enum class FinancialAccountKind; }
|
|
33
|
+
// Forward declaration of `Service` to properly resolve imports.
|
|
34
|
+
namespace margelo::nitro::rncandle { enum class Service; }
|
|
35
|
+
|
|
36
|
+
#include <string>
|
|
37
|
+
#include "FinancialAccountKind.hpp"
|
|
38
|
+
#include "Service.hpp"
|
|
39
|
+
|
|
40
|
+
namespace margelo::nitro::rncandle {
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* A struct which can be represented as a JavaScript object (CryptoAccount).
|
|
44
|
+
*/
|
|
45
|
+
struct CryptoAccount final {
|
|
46
|
+
public:
|
|
47
|
+
std::string assetKind SWIFT_PRIVATE;
|
|
48
|
+
std::string serviceAccountID SWIFT_PRIVATE;
|
|
49
|
+
FinancialAccountKind accountKind SWIFT_PRIVATE;
|
|
50
|
+
std::string nickname SWIFT_PRIVATE;
|
|
51
|
+
std::string linkedAccountID SWIFT_PRIVATE;
|
|
52
|
+
Service service SWIFT_PRIVATE;
|
|
53
|
+
|
|
54
|
+
public:
|
|
55
|
+
CryptoAccount() = default;
|
|
56
|
+
explicit CryptoAccount(std::string assetKind, std::string serviceAccountID, FinancialAccountKind 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 CryptoAccount& lhs, const CryptoAccount& rhs) = default;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
} // namespace margelo::nitro::rncandle
|
|
63
|
+
|
|
64
|
+
namespace margelo::nitro {
|
|
65
|
+
|
|
66
|
+
// C++ CryptoAccount <> JS CryptoAccount (object)
|
|
67
|
+
template <>
|
|
68
|
+
struct JSIConverter<margelo::nitro::rncandle::CryptoAccount> final {
|
|
69
|
+
static inline margelo::nitro::rncandle::CryptoAccount fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
70
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
71
|
+
return margelo::nitro::rncandle::CryptoAccount(
|
|
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::FinancialAccountKind>::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")))
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rncandle::CryptoAccount& arg) {
|
|
81
|
+
jsi::Object obj(runtime);
|
|
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::FinancialAccountKind>::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));
|
|
88
|
+
return obj;
|
|
89
|
+
}
|
|
90
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
91
|
+
if (!value.isObject()) {
|
|
92
|
+
return false;
|
|
93
|
+
}
|
|
94
|
+
jsi::Object obj = value.getObject(runtime);
|
|
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::FinancialAccountKind>::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;
|
|
104
|
+
return true;
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
} // namespace margelo::nitro
|