├── .DS_Store ├── .eslintrc ├── .github └── workflows │ ├── coin-integration.yml │ ├── prebuild.yml │ └── test-prebuild.yml ├── .gitignore ├── .npmignore ├── .prettierrc ├── README.md ├── binding.gyp ├── glob.py ├── include ├── Account.cpp ├── Account.hpp ├── AccountCallback.hpp ├── AccountCreationInfo.hpp ├── AccountCreationInfoCallback.hpp ├── AccountListCallback.hpp ├── Address.hpp ├── AddressListCallback.hpp ├── AlgorandAccount.hpp ├── AlgorandAddress.hpp ├── AlgorandAssetAmount.hpp ├── AlgorandAssetAmountCallback.hpp ├── AlgorandAssetAmountListCallback.hpp ├── AlgorandAssetConfigurationInfo.hpp ├── AlgorandAssetFreezeInfo.hpp ├── AlgorandAssetParams.hpp ├── AlgorandAssetParamsCallback.hpp ├── AlgorandAssetParamsListCallback.hpp ├── AlgorandAssetTransferInfo.hpp ├── AlgorandBlockchainExplorerEngines.cpp ├── AlgorandBlockchainExplorerEngines.hpp ├── AlgorandNetworkParameters.hpp ├── AlgorandOperation.hpp ├── AlgorandOperationType.cpp ├── AlgorandOperationType.hpp ├── AlgorandParticipationInfo.hpp ├── AlgorandPaymentInfo.hpp ├── AlgorandTransaction.hpp ├── AlgorandTransactionCallback.hpp ├── AlgorandWallet.hpp ├── AllocationMetrics.hpp ├── Amount.hpp ├── AmountCallback.hpp ├── AmountListCallback.hpp ├── BigInt.hpp ├── BigIntCallback.hpp ├── BigIntListCallback.hpp ├── BinaryCallback.hpp ├── BitcoinLikeAccount.hpp ├── BitcoinLikeAddress.hpp ├── BitcoinLikeBlock.hpp ├── BitcoinLikeDustPolicy.cpp ├── BitcoinLikeDustPolicy.hpp ├── BitcoinLikeExtendedPublicKey.hpp ├── BitcoinLikeFeePolicy.cpp ├── BitcoinLikeFeePolicy.hpp ├── BitcoinLikeInput.hpp ├── BitcoinLikeNetworkParameters.hpp ├── BitcoinLikeOperation.hpp ├── BitcoinLikeOperator.hpp ├── BitcoinLikeOutput.hpp ├── BitcoinLikeOutputListCallback.hpp ├── BitcoinLikePickingStrategy.cpp ├── BitcoinLikePickingStrategy.hpp ├── BitcoinLikePreparedTransaction.hpp ├── BitcoinLikeScript.hpp ├── BitcoinLikeScriptChunk.hpp ├── BitcoinLikeSignature.hpp ├── BitcoinLikeSignatureState.cpp ├── BitcoinLikeSignatureState.hpp ├── BitcoinLikeTransaction.hpp ├── BitcoinLikeTransactionBuilder.hpp ├── BitcoinLikeTransactionCallback.hpp ├── BitcoinLikeTransactionRequest.hpp ├── BitcoinLikeWallet.hpp ├── BitcoinLikeWalletConfiguration.cpp ├── BitcoinLikeWalletConfiguration.hpp ├── Block.hpp ├── BlockCallback.hpp ├── BlockchainExplorerEngines.cpp ├── BlockchainExplorerEngines.hpp ├── BlockchainObserverEngines.cpp ├── BlockchainObserverEngines.hpp ├── BoolCallback.hpp ├── Configuration.cpp ├── Configuration.hpp ├── ConfigurationDefaults.cpp ├── ConfigurationDefaults.hpp ├── CosmosBech32Type.cpp ├── CosmosBech32Type.hpp ├── CosmosConfigurationDefaults.cpp ├── CosmosConfigurationDefaults.hpp ├── CosmosCurve.cpp ├── CosmosCurve.hpp ├── CosmosGasLimitRequest.hpp ├── CosmosLikeAccount.hpp ├── CosmosLikeAddress.hpp ├── CosmosLikeAmount.hpp ├── CosmosLikeBlock.hpp ├── CosmosLikeCommissionRates.hpp ├── CosmosLikeContent.hpp ├── CosmosLikeDelegation.hpp ├── CosmosLikeDelegationListCallback.hpp ├── CosmosLikeExtendedPublicKey.hpp ├── CosmosLikeMessage.hpp ├── CosmosLikeMsgBeginRedelegate.hpp ├── CosmosLikeMsgCreateValidator.hpp ├── CosmosLikeMsgDelegate.hpp ├── CosmosLikeMsgDeposit.hpp ├── CosmosLikeMsgEditValidator.hpp ├── CosmosLikeMsgMultiSend.hpp ├── CosmosLikeMsgSend.hpp ├── CosmosLikeMsgSetWithdrawAddress.hpp ├── CosmosLikeMsgSubmitProposal.hpp ├── CosmosLikeMsgType.cpp ├── CosmosLikeMsgType.hpp ├── CosmosLikeMsgUndelegate.hpp ├── CosmosLikeMsgUnjail.hpp ├── CosmosLikeMsgVote.hpp ├── CosmosLikeMsgWithdrawDelegationReward.hpp ├── CosmosLikeMsgWithdrawDelegatorReward.hpp ├── CosmosLikeMsgWithdrawValidatorCommission.hpp ├── CosmosLikeMultiSendInput.hpp ├── CosmosLikeMultiSendOutput.hpp ├── CosmosLikeNetworkParameters.hpp ├── CosmosLikeOperation.hpp ├── CosmosLikeRedelegation.hpp ├── CosmosLikeRedelegationEntry.hpp ├── CosmosLikeRedelegationListCallback.hpp ├── CosmosLikeReward.hpp ├── CosmosLikeRewardListCallback.hpp ├── CosmosLikeTransaction.hpp ├── CosmosLikeTransactionBuilder.hpp ├── CosmosLikeTransactionCallback.hpp ├── CosmosLikeUnbonding.hpp ├── CosmosLikeUnbondingEntry.hpp ├── CosmosLikeUnbondingListCallback.hpp ├── CosmosLikeValidator.hpp ├── CosmosLikeValidatorCallback.hpp ├── CosmosLikeValidatorCommission.hpp ├── CosmosLikeValidatorDescription.hpp ├── CosmosLikeValidatorDistributionInformation.hpp ├── CosmosLikeValidatorListCallback.hpp ├── CosmosLikeValidatorSigningInformation.hpp ├── CosmosLikeVoteOption.cpp ├── CosmosLikeVoteOption.hpp ├── CosmosLikeWallet.hpp ├── Currency.hpp ├── CurrencyCallback.hpp ├── CurrencyListCallback.hpp ├── CurrencyUnit.hpp ├── DatabaseBackend.hpp ├── DatabaseBackendType.cpp ├── DatabaseBackendType.hpp ├── DatabaseBlob.hpp ├── DatabaseColumn.hpp ├── DatabaseConnection.hpp ├── DatabaseConnectionPool.hpp ├── DatabaseEngine.hpp ├── DatabaseError.hpp ├── DatabaseResultRow.hpp ├── DatabaseResultSet.hpp ├── DatabaseStatement.hpp ├── DatabaseValueType.cpp ├── DatabaseValueType.hpp ├── DerivationPath.hpp ├── DurationMetric.hpp ├── DurationMetrics.hpp ├── DynamicArray.hpp ├── DynamicObject.hpp ├── DynamicType.cpp ├── DynamicType.hpp ├── ERC20LikeAccount.cpp ├── ERC20LikeAccount.hpp ├── ERC20LikeOperation.hpp ├── ERC20LikeOperationCallback.hpp ├── ERC20LikeOperationListCallback.hpp ├── ERC20Token.hpp ├── Error.hpp ├── ErrorCode.cpp ├── ErrorCode.hpp ├── ErrorCodeCallback.hpp ├── EstimatedSize.hpp ├── EthereumGasLimitRequest.hpp ├── EthereumLikeAccount.hpp ├── EthereumLikeAddress.hpp ├── EthereumLikeBlock.hpp ├── EthereumLikeExtendedPublicKey.hpp ├── EthereumLikeNetworkParameters.hpp ├── EthereumLikeOperation.hpp ├── EthereumLikeTransaction.hpp ├── EthereumLikeTransactionBuilder.hpp ├── EthereumLikeTransactionCallback.hpp ├── EthereumLikeWallet.hpp ├── EthereumPublicKeyProvider.hpp ├── Event.hpp ├── EventBus.hpp ├── EventCode.cpp ├── EventCode.hpp ├── EventPublisher.hpp ├── EventReceiver.hpp ├── ExecutionContext.hpp ├── ExtendedKeyAccountCreationInfo.hpp ├── ExtendedKeyAccountCreationInfoCallback.hpp ├── FormatRules.hpp ├── GetEthreumLikeWalletCallback.hpp ├── HashAlgorithmHelper.hpp ├── HttpClient.hpp ├── HttpMethod.cpp ├── HttpMethod.hpp ├── HttpReadBodyResult.hpp ├── HttpRequest.hpp ├── HttpUrlConnection.hpp ├── I32Callback.hpp ├── InternalTransaction.hpp ├── Keychain.hpp ├── KeychainEngines.cpp ├── KeychainEngines.hpp ├── LedgerCore.hpp ├── Locale.hpp ├── Lock.hpp ├── LogPrinter.hpp ├── Logger.hpp ├── Networks.hpp ├── Operation.hpp ├── OperationListCallback.hpp ├── OperationOrderKey.cpp ├── OperationOrderKey.hpp ├── OperationQuery.hpp ├── OperationType.cpp ├── OperationType.hpp ├── PathResolver.hpp ├── PoolConfiguration.cpp ├── PoolConfiguration.hpp ├── Preferences.hpp ├── PreferencesBackend.hpp ├── PreferencesChange.hpp ├── PreferencesChangeType.cpp ├── PreferencesChangeType.hpp ├── PreferencesEditor.hpp ├── QueryFilter.hpp ├── RandomNumberGenerator.hpp ├── RippleConfiguration.cpp ├── RippleConfiguration.hpp ├── RippleConfigurationDefaults.cpp ├── RippleConfigurationDefaults.hpp ├── RippleLikeAccount.hpp ├── RippleLikeAddress.hpp ├── RippleLikeBlock.hpp ├── RippleLikeExtendedPublicKey.hpp ├── RippleLikeMemo.hpp ├── RippleLikeNetworkParameters.hpp ├── RippleLikeOperation.hpp ├── RippleLikeTransaction.hpp ├── RippleLikeTransactionBuilder.hpp ├── RippleLikeTransactionCallback.hpp ├── RoundingMode.cpp ├── RoundingMode.hpp ├── Runnable.hpp ├── Secp256k1.hpp ├── StellarConfiguration.cpp ├── StellarConfiguration.hpp ├── StellarLikeAccount.hpp ├── StellarLikeAccountSigner.hpp ├── StellarLikeAccountSignerListCallback.hpp ├── StellarLikeAddress.hpp ├── StellarLikeAsset.hpp ├── StellarLikeBlock.hpp ├── StellarLikeFeeStats.hpp ├── StellarLikeFeeStatsCallback.hpp ├── StellarLikeMemo.hpp ├── StellarLikeMemoType.cpp ├── StellarLikeMemoType.hpp ├── StellarLikeNetworkParameters.hpp ├── StellarLikeOperation.hpp ├── StellarLikeOperationRecord.hpp ├── StellarLikeOperationType.cpp ├── StellarLikeOperationType.hpp ├── StellarLikeTransaction.hpp ├── StellarLikeTransactionBuilder.hpp ├── StellarLikeTransactionCallback.hpp ├── StellarLikeWallet.hpp ├── StringCallback.hpp ├── SynchronizationEngines.cpp ├── SynchronizationEngines.hpp ├── SynchronizationStatus.cpp ├── SynchronizationStatus.hpp ├── SynchronizerEngines.cpp ├── SynchronizerEngines.hpp ├── TezosConfiguration.cpp ├── TezosConfiguration.hpp ├── TezosConfigurationDefaults.cpp ├── TezosConfigurationDefaults.hpp ├── TezosCurve.cpp ├── TezosCurve.hpp ├── TezosLikeAccount.hpp ├── TezosLikeAddress.hpp ├── TezosLikeBlock.hpp ├── TezosLikeExtendedPublicKey.hpp ├── TezosLikeNetworkParameters.hpp ├── TezosLikeOperation.hpp ├── TezosLikeOriginatedAccount.hpp ├── TezosLikeTransaction.hpp ├── TezosLikeTransactionBuilder.hpp ├── TezosLikeTransactionCallback.hpp ├── TezosLikeWallet.hpp ├── TezosOperationTag.cpp ├── TezosOperationTag.hpp ├── ThreadDispatcher.hpp ├── TimePeriod.cpp ├── TimePeriod.hpp ├── TrustIndicator.hpp ├── TrustLevel.cpp ├── TrustLevel.hpp ├── Wallet.hpp ├── WalletCallback.hpp ├── WalletListCallback.hpp ├── WalletPool.hpp ├── WalletPoolBuilder.hpp ├── WalletPoolCallback.hpp ├── WalletType.cpp ├── WalletType.hpp ├── WebSocketClient.hpp ├── WebSocketConnection.hpp ├── enum_from_string.hpp └── libcore_export.h ├── js └── index.js ├── package.json ├── preinstall.js ├── src ├── NJSAccountCallback.cpp ├── NJSAccountCallback.hpp ├── NJSAccountCpp.cpp ├── NJSAccountCpp.hpp ├── NJSAccountCreationInfoCallback.cpp ├── NJSAccountCreationInfoCallback.hpp ├── NJSAccountListCallback.cpp ├── NJSAccountListCallback.hpp ├── NJSAddressCpp.cpp ├── NJSAddressCpp.hpp ├── NJSAddressListCallback.cpp ├── NJSAddressListCallback.hpp ├── NJSAlgorandAccountCpp.cpp ├── NJSAlgorandAccountCpp.hpp ├── NJSAlgorandAddressCpp.cpp ├── NJSAlgorandAddressCpp.hpp ├── NJSAlgorandAssetAmountCallback.cpp ├── NJSAlgorandAssetAmountCallback.hpp ├── NJSAlgorandAssetAmountListCallback.cpp ├── NJSAlgorandAssetAmountListCallback.hpp ├── NJSAlgorandAssetParamsCallback.cpp ├── NJSAlgorandAssetParamsCallback.hpp ├── NJSAlgorandAssetParamsListCallback.cpp ├── NJSAlgorandAssetParamsListCallback.hpp ├── NJSAlgorandBlockchainExplorerEnginesCpp.cpp ├── NJSAlgorandBlockchainExplorerEnginesCpp.hpp ├── NJSAlgorandOperationCpp.cpp ├── NJSAlgorandOperationCpp.hpp ├── NJSAlgorandTransactionCallback.cpp ├── NJSAlgorandTransactionCallback.hpp ├── NJSAlgorandTransactionCpp.cpp ├── NJSAlgorandTransactionCpp.hpp ├── NJSAlgorandWalletCpp.cpp ├── NJSAlgorandWalletCpp.hpp ├── NJSAllocationMetricsCpp.cpp ├── NJSAllocationMetricsCpp.hpp ├── NJSAmountCallback.cpp ├── NJSAmountCallback.hpp ├── NJSAmountCpp.cpp ├── NJSAmountCpp.hpp ├── NJSAmountListCallback.cpp ├── NJSAmountListCallback.hpp ├── NJSBigIntCallback.cpp ├── NJSBigIntCallback.hpp ├── NJSBigIntCpp.cpp ├── NJSBigIntCpp.hpp ├── NJSBigIntListCallback.cpp ├── NJSBigIntListCallback.hpp ├── NJSBinaryCallback.cpp ├── NJSBinaryCallback.hpp ├── NJSBitcoinLikeAccountCpp.cpp ├── NJSBitcoinLikeAccountCpp.hpp ├── NJSBitcoinLikeAddressCpp.cpp ├── NJSBitcoinLikeAddressCpp.hpp ├── NJSBitcoinLikeBlockCpp.cpp ├── NJSBitcoinLikeBlockCpp.hpp ├── NJSBitcoinLikeExtendedPublicKeyCpp.cpp ├── NJSBitcoinLikeExtendedPublicKeyCpp.hpp ├── NJSBitcoinLikeInputCpp.cpp ├── NJSBitcoinLikeInputCpp.hpp ├── NJSBitcoinLikeOperationCpp.cpp ├── NJSBitcoinLikeOperationCpp.hpp ├── NJSBitcoinLikeOutputCpp.cpp ├── NJSBitcoinLikeOutputCpp.hpp ├── NJSBitcoinLikeOutputListCallback.cpp ├── NJSBitcoinLikeOutputListCallback.hpp ├── NJSBitcoinLikeScriptChunkCpp.cpp ├── NJSBitcoinLikeScriptChunkCpp.hpp ├── NJSBitcoinLikeScriptCpp.cpp ├── NJSBitcoinLikeScriptCpp.hpp ├── NJSBitcoinLikeTransactionBuilderCpp.cpp ├── NJSBitcoinLikeTransactionBuilderCpp.hpp ├── NJSBitcoinLikeTransactionCallback.cpp ├── NJSBitcoinLikeTransactionCallback.hpp ├── NJSBitcoinLikeTransactionCpp.cpp ├── NJSBitcoinLikeTransactionCpp.hpp ├── NJSBitcoinLikeWalletConfigurationCpp.cpp ├── NJSBitcoinLikeWalletConfigurationCpp.hpp ├── NJSBitcoinLikeWalletCpp.cpp ├── NJSBitcoinLikeWalletCpp.hpp ├── NJSBlockCallback.cpp ├── NJSBlockCallback.hpp ├── NJSBlockchainExplorerEnginesCpp.cpp ├── NJSBlockchainExplorerEnginesCpp.hpp ├── NJSBlockchainObserverEnginesCpp.cpp ├── NJSBlockchainObserverEnginesCpp.hpp ├── NJSBoolCallback.cpp ├── NJSBoolCallback.hpp ├── NJSConfigurationCpp.cpp ├── NJSConfigurationCpp.hpp ├── NJSConfigurationDefaultsCpp.cpp ├── NJSConfigurationDefaultsCpp.hpp ├── NJSCosmosConfigurationDefaultsCpp.cpp ├── NJSCosmosConfigurationDefaultsCpp.hpp ├── NJSCosmosLikeAccountCpp.cpp ├── NJSCosmosLikeAccountCpp.hpp ├── NJSCosmosLikeAddressCpp.cpp ├── NJSCosmosLikeAddressCpp.hpp ├── NJSCosmosLikeBlockCpp.cpp ├── NJSCosmosLikeBlockCpp.hpp ├── NJSCosmosLikeDelegationCpp.cpp ├── NJSCosmosLikeDelegationCpp.hpp ├── NJSCosmosLikeDelegationListCallback.cpp ├── NJSCosmosLikeDelegationListCallback.hpp ├── NJSCosmosLikeExtendedPublicKeyCpp.cpp ├── NJSCosmosLikeExtendedPublicKeyCpp.hpp ├── NJSCosmosLikeMessageCpp.cpp ├── NJSCosmosLikeMessageCpp.hpp ├── NJSCosmosLikeOperationCpp.cpp ├── NJSCosmosLikeOperationCpp.hpp ├── NJSCosmosLikeRedelegationCpp.cpp ├── NJSCosmosLikeRedelegationCpp.hpp ├── NJSCosmosLikeRedelegationEntryCpp.cpp ├── NJSCosmosLikeRedelegationEntryCpp.hpp ├── NJSCosmosLikeRedelegationListCallback.cpp ├── NJSCosmosLikeRedelegationListCallback.hpp ├── NJSCosmosLikeRewardCpp.cpp ├── NJSCosmosLikeRewardCpp.hpp ├── NJSCosmosLikeRewardListCallback.cpp ├── NJSCosmosLikeRewardListCallback.hpp ├── NJSCosmosLikeTransactionBuilderCpp.cpp ├── NJSCosmosLikeTransactionBuilderCpp.hpp ├── NJSCosmosLikeTransactionCallback.cpp ├── NJSCosmosLikeTransactionCallback.hpp ├── NJSCosmosLikeTransactionCpp.cpp ├── NJSCosmosLikeTransactionCpp.hpp ├── NJSCosmosLikeUnbondingCpp.cpp ├── NJSCosmosLikeUnbondingCpp.hpp ├── NJSCosmosLikeUnbondingEntryCpp.cpp ├── NJSCosmosLikeUnbondingEntryCpp.hpp ├── NJSCosmosLikeUnbondingListCallback.cpp ├── NJSCosmosLikeUnbondingListCallback.hpp ├── NJSCosmosLikeValidatorCallback.cpp ├── NJSCosmosLikeValidatorCallback.hpp ├── NJSCosmosLikeValidatorListCallback.cpp ├── NJSCosmosLikeValidatorListCallback.hpp ├── NJSCosmosLikeWalletCpp.cpp ├── NJSCosmosLikeWalletCpp.hpp ├── NJSCurrencyCallback.cpp ├── NJSCurrencyCallback.hpp ├── NJSCurrencyListCallback.cpp ├── NJSCurrencyListCallback.hpp ├── NJSDatabaseBackendCpp.cpp ├── NJSDatabaseBackendCpp.hpp ├── NJSDatabaseBlob.cpp ├── NJSDatabaseBlob.hpp ├── NJSDatabaseColumn.cpp ├── NJSDatabaseColumn.hpp ├── NJSDatabaseConnection.cpp ├── NJSDatabaseConnection.hpp ├── NJSDatabaseConnectionPool.cpp ├── NJSDatabaseConnectionPool.hpp ├── NJSDatabaseEngine.cpp ├── NJSDatabaseEngine.hpp ├── NJSDatabaseError.cpp ├── NJSDatabaseError.hpp ├── NJSDatabaseResultRow.cpp ├── NJSDatabaseResultRow.hpp ├── NJSDatabaseResultSet.cpp ├── NJSDatabaseResultSet.hpp ├── NJSDatabaseStatement.cpp ├── NJSDatabaseStatement.hpp ├── NJSDerivationPathCpp.cpp ├── NJSDerivationPathCpp.hpp ├── NJSDurationMetricsCpp.cpp ├── NJSDurationMetricsCpp.hpp ├── NJSDynamicArrayCpp.cpp ├── NJSDynamicArrayCpp.hpp ├── NJSDynamicObjectCpp.cpp ├── NJSDynamicObjectCpp.hpp ├── NJSERC20LikeAccountCpp.cpp ├── NJSERC20LikeAccountCpp.hpp ├── NJSERC20LikeOperationCallback.cpp ├── NJSERC20LikeOperationCallback.hpp ├── NJSERC20LikeOperationCpp.cpp ├── NJSERC20LikeOperationCpp.hpp ├── NJSERC20LikeOperationListCallback.cpp ├── NJSERC20LikeOperationListCallback.hpp ├── NJSErrorCodeCallback.cpp ├── NJSErrorCodeCallback.hpp ├── NJSEthereumLikeAccountCpp.cpp ├── NJSEthereumLikeAccountCpp.hpp ├── NJSEthereumLikeAddressCpp.cpp ├── NJSEthereumLikeAddressCpp.hpp ├── NJSEthereumLikeBlockCpp.cpp ├── NJSEthereumLikeBlockCpp.hpp ├── NJSEthereumLikeExtendedPublicKeyCpp.cpp ├── NJSEthereumLikeExtendedPublicKeyCpp.hpp ├── NJSEthereumLikeOperationCpp.cpp ├── NJSEthereumLikeOperationCpp.hpp ├── NJSEthereumLikeTransactionBuilderCpp.cpp ├── NJSEthereumLikeTransactionBuilderCpp.hpp ├── NJSEthereumLikeTransactionCallback.cpp ├── NJSEthereumLikeTransactionCallback.hpp ├── NJSEthereumLikeTransactionCpp.cpp ├── NJSEthereumLikeTransactionCpp.hpp ├── NJSEthereumLikeWalletCpp.cpp ├── NJSEthereumLikeWalletCpp.hpp ├── NJSEthereumPublicKeyProvider.cpp ├── NJSEthereumPublicKeyProvider.hpp ├── NJSEventBusCpp.cpp ├── NJSEventBusCpp.hpp ├── NJSEventCpp.cpp ├── NJSEventCpp.hpp ├── NJSEventPublisherCpp.cpp ├── NJSEventPublisherCpp.hpp ├── NJSEventReceiver.cpp ├── NJSEventReceiver.hpp ├── NJSExecutionContext.cpp ├── NJSExecutionContext.hpp ├── NJSExtendedKeyAccountCreationInfoCallback.cpp ├── NJSExtendedKeyAccountCreationInfoCallback.hpp ├── NJSGetEthreumLikeWalletCallback.cpp ├── NJSGetEthreumLikeWalletCallback.hpp ├── NJSHashAlgorithmHelper.cpp ├── NJSHashAlgorithmHelper.hpp ├── NJSHexUtils.cpp ├── NJSHexUtils.hpp ├── NJSHttpClient.cpp ├── NJSHttpClient.hpp ├── NJSHttpRequestCpp.cpp ├── NJSHttpRequestCpp.hpp ├── NJSHttpUrlConnection.cpp ├── NJSHttpUrlConnection.hpp ├── NJSI32Callback.cpp ├── NJSI32Callback.hpp ├── NJSInternalTransactionCpp.cpp ├── NJSInternalTransactionCpp.hpp ├── NJSKeychainCpp.cpp ├── NJSKeychainCpp.hpp ├── NJSKeychainEnginesCpp.cpp ├── NJSKeychainEnginesCpp.hpp ├── NJSLedgerCoreCpp.cpp ├── NJSLedgerCoreCpp.hpp ├── NJSLock.cpp ├── NJSLock.hpp ├── NJSLogPrinter.cpp ├── NJSLogPrinter.hpp ├── NJSLoggerCpp.cpp ├── NJSLoggerCpp.hpp ├── NJSNetworksCpp.cpp ├── NJSNetworksCpp.hpp ├── NJSObjectWrapper.hpp ├── NJSOperationCpp.cpp ├── NJSOperationCpp.hpp ├── NJSOperationListCallback.cpp ├── NJSOperationListCallback.hpp ├── NJSOperationQueryCpp.cpp ├── NJSOperationQueryCpp.hpp ├── NJSPathResolver.cpp ├── NJSPathResolver.hpp ├── NJSPoolConfigurationCpp.cpp ├── NJSPoolConfigurationCpp.hpp ├── NJSPreferencesBackend.cpp ├── NJSPreferencesBackend.hpp ├── NJSPreferencesCpp.cpp ├── NJSPreferencesCpp.hpp ├── NJSPreferencesEditorCpp.cpp ├── NJSPreferencesEditorCpp.hpp ├── NJSQueryFilterCpp.cpp ├── NJSQueryFilterCpp.hpp ├── NJSRandomNumberGenerator.cpp ├── NJSRandomNumberGenerator.hpp ├── NJSRippleConfigurationCpp.cpp ├── NJSRippleConfigurationCpp.hpp ├── NJSRippleConfigurationDefaultsCpp.cpp ├── NJSRippleConfigurationDefaultsCpp.hpp ├── NJSRippleLikeAccountCpp.cpp ├── NJSRippleLikeAccountCpp.hpp ├── NJSRippleLikeAddressCpp.cpp ├── NJSRippleLikeAddressCpp.hpp ├── NJSRippleLikeBlockCpp.cpp ├── NJSRippleLikeBlockCpp.hpp ├── NJSRippleLikeExtendedPublicKeyCpp.cpp ├── NJSRippleLikeExtendedPublicKeyCpp.hpp ├── NJSRippleLikeOperationCpp.cpp ├── NJSRippleLikeOperationCpp.hpp ├── NJSRippleLikeTransactionBuilderCpp.cpp ├── NJSRippleLikeTransactionBuilderCpp.hpp ├── NJSRippleLikeTransactionCallback.cpp ├── NJSRippleLikeTransactionCallback.hpp ├── NJSRippleLikeTransactionCpp.cpp ├── NJSRippleLikeTransactionCpp.hpp ├── NJSRunnableCpp.cpp ├── NJSRunnableCpp.hpp ├── NJSSecp256k1Cpp.cpp ├── NJSSecp256k1Cpp.hpp ├── NJSStellarConfigurationCpp.cpp ├── NJSStellarConfigurationCpp.hpp ├── NJSStellarLikeAccountCpp.cpp ├── NJSStellarLikeAccountCpp.hpp ├── NJSStellarLikeAccountSignerListCallback.cpp ├── NJSStellarLikeAccountSignerListCallback.hpp ├── NJSStellarLikeAddressCpp.cpp ├── NJSStellarLikeAddressCpp.hpp ├── NJSStellarLikeBlockCpp.cpp ├── NJSStellarLikeBlockCpp.hpp ├── NJSStellarLikeFeeStatsCallback.cpp ├── NJSStellarLikeFeeStatsCallback.hpp ├── NJSStellarLikeMemoCpp.cpp ├── NJSStellarLikeMemoCpp.hpp ├── NJSStellarLikeOperationCpp.cpp ├── NJSStellarLikeOperationCpp.hpp ├── NJSStellarLikeTransactionBuilderCpp.cpp ├── NJSStellarLikeTransactionBuilderCpp.hpp ├── NJSStellarLikeTransactionCallback.cpp ├── NJSStellarLikeTransactionCallback.hpp ├── NJSStellarLikeTransactionCpp.cpp ├── NJSStellarLikeTransactionCpp.hpp ├── NJSStellarLikeWalletCpp.cpp ├── NJSStellarLikeWalletCpp.hpp ├── NJSStringCallback.cpp ├── NJSStringCallback.hpp ├── NJSSynchronizationEnginesCpp.cpp ├── NJSSynchronizationEnginesCpp.hpp ├── NJSSynchronizationStatusCpp.cpp ├── NJSSynchronizationStatusCpp.hpp ├── NJSSynchronizerEnginesCpp.cpp ├── NJSSynchronizerEnginesCpp.hpp ├── NJSTezosConfigurationCpp.cpp ├── NJSTezosConfigurationCpp.hpp ├── NJSTezosConfigurationDefaultsCpp.cpp ├── NJSTezosConfigurationDefaultsCpp.hpp ├── NJSTezosLikeAccountCpp.cpp ├── NJSTezosLikeAccountCpp.hpp ├── NJSTezosLikeAddressCpp.cpp ├── NJSTezosLikeAddressCpp.hpp ├── NJSTezosLikeBlockCpp.cpp ├── NJSTezosLikeBlockCpp.hpp ├── NJSTezosLikeExtendedPublicKeyCpp.cpp ├── NJSTezosLikeExtendedPublicKeyCpp.hpp ├── NJSTezosLikeOperationCpp.cpp ├── NJSTezosLikeOperationCpp.hpp ├── NJSTezosLikeOriginatedAccountCpp.cpp ├── NJSTezosLikeOriginatedAccountCpp.hpp ├── NJSTezosLikeTransactionBuilderCpp.cpp ├── NJSTezosLikeTransactionBuilderCpp.hpp ├── NJSTezosLikeTransactionCallback.cpp ├── NJSTezosLikeTransactionCallback.hpp ├── NJSTezosLikeTransactionCpp.cpp ├── NJSTezosLikeTransactionCpp.hpp ├── NJSTezosLikeWalletCpp.cpp ├── NJSTezosLikeWalletCpp.hpp ├── NJSThreadDispatcher.cpp ├── NJSThreadDispatcher.hpp ├── NJSTrustIndicatorCpp.cpp ├── NJSTrustIndicatorCpp.hpp ├── NJSWalletCallback.cpp ├── NJSWalletCallback.hpp ├── NJSWalletCpp.cpp ├── NJSWalletCpp.hpp ├── NJSWalletListCallback.cpp ├── NJSWalletListCallback.hpp ├── NJSWalletPoolBuilderCpp.cpp ├── NJSWalletPoolBuilderCpp.hpp ├── NJSWalletPoolCallback.cpp ├── NJSWalletPoolCallback.hpp ├── NJSWalletPoolCpp.cpp ├── NJSWalletPoolCpp.hpp ├── NJSWebSocketClient.cpp ├── NJSWebSocketClient.hpp ├── NJSWebSocketConnectionCpp.cpp ├── NJSWebSocketConnectionCpp.hpp ├── ledgercore.cpp └── ledgercore_doc.js ├── utils └── optional.hpp └── yarn.lock /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LedgerHQ/lib-ledger-core-node-bindings/ced62d392eff27ab153e8a5f330c92e9cd72b92c/.DS_Store -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["airbnb-base", "prettier"], 3 | "globals": { 4 | }, 5 | "rules": { 6 | "no-unused-vars": 1, 7 | "no-shadow": 0, 8 | "no-use-before-define": 0, 9 | "no-bitwise": 0, 10 | "no-plusplus": 0, 11 | "consistent-return": 0, 12 | }, 13 | } 14 | -------------------------------------------------------------------------------- /.github/workflows/test-prebuild.yml: -------------------------------------------------------------------------------- 1 | name: core-prebuild 2 | on: [push, pull_request] 3 | 4 | jobs: 5 | prebuild-for-platform: 6 | runs-on: ${{ matrix.os }} 7 | strategy: 8 | matrix: 9 | os: [ubuntu-16.04, macos-latest, windows-2016] 10 | steps: 11 | - uses: actions/checkout@v1 12 | - uses: actions/setup-node@master 13 | with: 14 | node-version: 12.x 15 | - uses: actions/setup-python@v1 16 | with: 17 | python-version: '3.6.x' 18 | - name: install 19 | run: yarn --frozen-lockfile --ignore-scripts 20 | - name: fetch libcore 21 | run: yarn preinstall 22 | - name: config gcc 23 | if: runner.os == 'Linux' 24 | run: sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 700 --slave /usr/bin/g++ g++ /usr/bin/g++-9 25 | - name: prebuild for node 12 26 | run: npx node-pre-gyp configure rebuild package --target=12.16.0 27 | - name: clean 28 | run: npx node-pre-gyp clean 29 | - name: prebuild for node 14 30 | run: npx node-pre-gyp configure rebuild package --target=14.17.0 31 | - name: clean 32 | run: npx node-pre-gyp clean 33 | - name: prebuild for electron 11.2 34 | run: npx node-pre-gyp configure build package --runtime=electron --target=11.2.0 --build-from-source --dist-url=https://electronjs.org/headers 35 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /node_modules/ 3 | /js/tmp/ 4 | /lib 5 | /prebuilds 6 | *.log 7 | dbdata/ 8 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /node_modules/ 3 | /js/tmp/ 4 | /lib 5 | /prebuilds 6 | *.log 7 | dbdata/ 8 | src/ledgercore_doc.js -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | printWidth: 100 2 | semi: false 3 | singleQuote: true 4 | trailingComma: all 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # @ledgerhq/ledger-core 2 | 3 | Ledger Core Library cross-platform C++ bindings for NodeJS. 4 | 5 | ## Usage 6 | 7 | For usage example, see [live-common/src/libcore](https://github.com/LedgerHQ/ledger-live-common/tree/master/src/libcore). 8 | 9 | ## Install 10 | 11 | ``` 12 | yarn add @ledgerhq/ledger-core 13 | ``` 14 | 15 | ## Prerequisite 16 | 17 | It currently only works with **Node 12**. 18 | 19 | ### On Linux 20 | 21 | You also need to have **g++-7** installed and set up as default. Here is a way to set it up in Debian (root): 22 | 23 | ```sh 24 | echo "deb http://ftp.us.debian.org/debian testing main contrib non-free" > /etc/apt/sources.list.d/gcc7.list 25 | apt-get update 26 | apt-get install -t testing g++-7 27 | update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 700 --slave /usr/bin/g++ g++ /usr/bin/g++-7 28 | ``` 29 | -------------------------------------------------------------------------------- /glob.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # a helper for gyp to do file globbing cross platform 3 | # Usage: python glob.py root_dir pattern [pattern...] 4 | 5 | import fnmatch 6 | import os 7 | import sys 8 | 9 | root_dir = sys.argv[1] 10 | patterns = sys.argv[2:] 11 | 12 | for (dirpath, dirnames, files) in os.walk(root_dir): 13 | for f in files: 14 | match = False 15 | for pattern in patterns: 16 | match = match or fnmatch.fnmatch(f, pattern) 17 | if match: 18 | print(dirpath + '/' + f) 19 | -------------------------------------------------------------------------------- /include/AccountCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_ACCOUNTCALLBACK_HPP 5 | #define DJINNI_GENERATED_ACCOUNTCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #include 9 | #ifndef LIBCORE_EXPORT 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #define LIBCORE_EXPORT 14 | #endif 15 | #endif 16 | 17 | namespace ledger { namespace core { namespace api { 18 | 19 | class Account; 20 | struct Error; 21 | 22 | /** Callback triggered by main completed task, returning optional result of template type T. */ 23 | class AccountCallback { 24 | public: 25 | virtual ~AccountCallback() {} 26 | 27 | /** 28 | * Method triggered when main task complete. 29 | * @params result optional of type T, non null if main task failed 30 | * @params error optional of type Error, non null if main task succeeded 31 | */ 32 | virtual void onCallback(const std::shared_ptr & result, const std::experimental::optional & error) = 0; 33 | }; 34 | 35 | } } } // namespace ledger::core::api 36 | #endif //DJINNI_GENERATED_ACCOUNTCALLBACK_HPP 37 | -------------------------------------------------------------------------------- /include/AccountCreationInfoCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_ACCOUNTCREATIONINFOCALLBACK_HPP 5 | #define DJINNI_GENERATED_ACCOUNTCREATIONINFOCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | struct AccountCreationInfo; 19 | struct Error; 20 | 21 | /** Callback triggered by main completed task, returning optional result of template type T. */ 22 | class AccountCreationInfoCallback { 23 | public: 24 | virtual ~AccountCreationInfoCallback() {} 25 | 26 | /** 27 | * Method triggered when main task complete. 28 | * @params result optional of type T, non null if main task failed 29 | * @params error optional of type Error, non null if main task succeeded 30 | */ 31 | virtual void onCallback(const std::experimental::optional & result, const std::experimental::optional & error) = 0; 32 | }; 33 | 34 | } } } // namespace ledger::core::api 35 | #endif //DJINNI_GENERATED_ACCOUNTCREATIONINFOCALLBACK_HPP 36 | -------------------------------------------------------------------------------- /include/AccountListCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_ACCOUNTLISTCALLBACK_HPP 5 | #define DJINNI_GENERATED_ACCOUNTLISTCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | class Account; 21 | struct Error; 22 | 23 | /** Callback triggered by main completed task, returning optional result as list of template type T. */ 24 | class AccountListCallback { 25 | public: 26 | virtual ~AccountListCallback() {} 27 | 28 | /** 29 | * Method triggered when main task complete. 30 | * @params result optional of type list, non null if main task failed 31 | * @params error optional of type Error, non null if main task succeeded 32 | */ 33 | virtual void onCallback(const std::experimental::optional>> & result, const std::experimental::optional & error) = 0; 34 | }; 35 | 36 | } } } // namespace ledger::core::api 37 | #endif //DJINNI_GENERATED_ACCOUNTLISTCALLBACK_HPP 38 | -------------------------------------------------------------------------------- /include/AddressListCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_ADDRESSLISTCALLBACK_HPP 5 | #define DJINNI_GENERATED_ADDRESSLISTCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | class Address; 21 | struct Error; 22 | 23 | /** Callback triggered by main completed task, returning optional result as list of template type T. */ 24 | class AddressListCallback { 25 | public: 26 | virtual ~AddressListCallback() {} 27 | 28 | /** 29 | * Method triggered when main task complete. 30 | * @params result optional of type list, non null if main task failed 31 | * @params error optional of type Error, non null if main task succeeded 32 | */ 33 | virtual void onCallback(const std::experimental::optional>> & result, const std::experimental::optional & error) = 0; 34 | }; 35 | 36 | } } } // namespace ledger::core::api 37 | #endif //DJINNI_GENERATED_ADDRESSLISTCALLBACK_HPP 38 | -------------------------------------------------------------------------------- /include/AlgorandAddress.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from idl.djinni 3 | 4 | #ifndef DJINNI_GENERATED_ALGORANDADDRESS_HPP 5 | #define DJINNI_GENERATED_ALGORANDADDRESS_HPP 6 | 7 | #include 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | class LIBCORE_EXPORT AlgorandAddress { 21 | public: 22 | virtual ~AlgorandAddress() {} 23 | 24 | static std::string fromPublicKey(const std::vector & pubkey); 25 | 26 | static std::vector toPublicKey(const std::string & address); 27 | }; 28 | 29 | } } } // namespace ledger::core::api 30 | #endif //DJINNI_GENERATED_ALGORANDADDRESS_HPP 31 | -------------------------------------------------------------------------------- /include/AlgorandAssetAmountCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_ALGORANDASSETAMOUNTCALLBACK_HPP 5 | #define DJINNI_GENERATED_ALGORANDASSETAMOUNTCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | struct AlgorandAssetAmount; 19 | struct Error; 20 | 21 | /** Callback triggered by main completed task, returning optional result of template type T. */ 22 | class AlgorandAssetAmountCallback { 23 | public: 24 | virtual ~AlgorandAssetAmountCallback() {} 25 | 26 | /** 27 | * Method triggered when main task complete. 28 | * @params result optional of type T, non null if main task failed 29 | * @params error optional of type Error, non null if main task succeeded 30 | */ 31 | virtual void onCallback(const std::experimental::optional & result, const std::experimental::optional & error) = 0; 32 | }; 33 | 34 | } } } // namespace ledger::core::api 35 | #endif //DJINNI_GENERATED_ALGORANDASSETAMOUNTCALLBACK_HPP 36 | -------------------------------------------------------------------------------- /include/AlgorandAssetAmountListCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_ALGORANDASSETAMOUNTLISTCALLBACK_HPP 5 | #define DJINNI_GENERATED_ALGORANDASSETAMOUNTLISTCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #include 9 | #ifndef LIBCORE_EXPORT 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #define LIBCORE_EXPORT 14 | #endif 15 | #endif 16 | 17 | namespace ledger { namespace core { namespace api { 18 | 19 | struct AlgorandAssetAmount; 20 | struct Error; 21 | 22 | /** Callback triggered by main completed task, returning optional result as list of template type T. */ 23 | class AlgorandAssetAmountListCallback { 24 | public: 25 | virtual ~AlgorandAssetAmountListCallback() {} 26 | 27 | /** 28 | * Method triggered when main task complete. 29 | * @params result optional of type list, non null if main task failed 30 | * @params error optional of type Error, non null if main task succeeded 31 | */ 32 | virtual void onCallback(const std::experimental::optional> & result, const std::experimental::optional & error) = 0; 33 | }; 34 | 35 | } } } // namespace ledger::core::api 36 | #endif //DJINNI_GENERATED_ALGORANDASSETAMOUNTLISTCALLBACK_HPP 37 | -------------------------------------------------------------------------------- /include/AlgorandAssetParamsCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_ALGORANDASSETPARAMSCALLBACK_HPP 5 | #define DJINNI_GENERATED_ALGORANDASSETPARAMSCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | struct AlgorandAssetParams; 19 | struct Error; 20 | 21 | /** Callback triggered by main completed task, returning optional result of template type T. */ 22 | class AlgorandAssetParamsCallback { 23 | public: 24 | virtual ~AlgorandAssetParamsCallback() {} 25 | 26 | /** 27 | * Method triggered when main task complete. 28 | * @params result optional of type T, non null if main task failed 29 | * @params error optional of type Error, non null if main task succeeded 30 | */ 31 | virtual void onCallback(const std::experimental::optional & result, const std::experimental::optional & error) = 0; 32 | }; 33 | 34 | } } } // namespace ledger::core::api 35 | #endif //DJINNI_GENERATED_ALGORANDASSETPARAMSCALLBACK_HPP 36 | -------------------------------------------------------------------------------- /include/AlgorandAssetParamsListCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_ALGORANDASSETPARAMSLISTCALLBACK_HPP 5 | #define DJINNI_GENERATED_ALGORANDASSETPARAMSLISTCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #include 9 | #ifndef LIBCORE_EXPORT 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #define LIBCORE_EXPORT 14 | #endif 15 | #endif 16 | 17 | namespace ledger { namespace core { namespace api { 18 | 19 | struct AlgorandAssetParams; 20 | struct Error; 21 | 22 | /** Callback triggered by main completed task, returning optional result as list of template type T. */ 23 | class AlgorandAssetParamsListCallback { 24 | public: 25 | virtual ~AlgorandAssetParamsListCallback() {} 26 | 27 | /** 28 | * Method triggered when main task complete. 29 | * @params result optional of type list, non null if main task failed 30 | * @params error optional of type Error, non null if main task succeeded 31 | */ 32 | virtual void onCallback(const std::experimental::optional> & result, const std::experimental::optional & error) = 0; 33 | }; 34 | 35 | } } } // namespace ledger::core::api 36 | #endif //DJINNI_GENERATED_ALGORANDASSETPARAMSLISTCALLBACK_HPP 37 | -------------------------------------------------------------------------------- /include/AlgorandBlockchainExplorerEngines.cpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from configuration.djinni 3 | 4 | #include "AlgorandBlockchainExplorerEngines.hpp" // my header 5 | 6 | namespace ledger { namespace core { namespace api { 7 | 8 | std::string const AlgorandBlockchainExplorerEngines::ALGORAND_NODE = {"ALGORAND_NODE"}; 9 | 10 | } } } // namespace ledger::core::api 11 | -------------------------------------------------------------------------------- /include/AlgorandBlockchainExplorerEngines.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from configuration.djinni 3 | 4 | #ifndef DJINNI_GENERATED_ALGORANDBLOCKCHAINEXPLORERENGINES_HPP 5 | #define DJINNI_GENERATED_ALGORANDBLOCKCHAINEXPLORERENGINES_HPP 6 | 7 | #include 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | class LIBCORE_EXPORT AlgorandBlockchainExplorerEngines { 19 | public: 20 | virtual ~AlgorandBlockchainExplorerEngines() {} 21 | 22 | static std::string const ALGORAND_NODE; 23 | }; 24 | 25 | } } } // namespace ledger::core::api 26 | #endif //DJINNI_GENERATED_ALGORANDBLOCKCHAINEXPLORERENGINES_HPP 27 | -------------------------------------------------------------------------------- /include/AlgorandOperation.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from idl.djinni 3 | 4 | #ifndef DJINNI_GENERATED_ALGORANDOPERATION_HPP 5 | #define DJINNI_GENERATED_ALGORANDOPERATION_HPP 6 | 7 | #include 8 | #include 9 | #ifndef LIBCORE_EXPORT 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #define LIBCORE_EXPORT 14 | #endif 15 | #endif 16 | 17 | namespace ledger { namespace core { namespace api { 18 | 19 | class AlgorandTransaction; 20 | enum class AlgorandOperationType; 21 | 22 | class LIBCORE_EXPORT AlgorandOperation { 23 | public: 24 | virtual ~AlgorandOperation() {} 25 | 26 | virtual std::shared_ptr getTransaction() const = 0; 27 | 28 | virtual AlgorandOperationType getAlgorandOperationType() const = 0; 29 | 30 | virtual std::string getRewards() const = 0; 31 | 32 | virtual std::string getAssetAmount() const = 0; 33 | }; 34 | 35 | } } } // namespace ledger::core::api 36 | #endif //DJINNI_GENERATED_ALGORANDOPERATION_HPP 37 | -------------------------------------------------------------------------------- /include/AlgorandTransactionCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_ALGORANDTRANSACTIONCALLBACK_HPP 5 | #define DJINNI_GENERATED_ALGORANDTRANSACTIONCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #include 9 | #ifndef LIBCORE_EXPORT 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #define LIBCORE_EXPORT 14 | #endif 15 | #endif 16 | 17 | namespace ledger { namespace core { namespace api { 18 | 19 | class AlgorandTransaction; 20 | struct Error; 21 | 22 | /** Callback triggered by main completed task, returning optional result of template type T. */ 23 | class AlgorandTransactionCallback { 24 | public: 25 | virtual ~AlgorandTransactionCallback() {} 26 | 27 | /** 28 | * Method triggered when main task complete. 29 | * @params result optional of type T, non null if main task failed 30 | * @params error optional of type Error, non null if main task succeeded 31 | */ 32 | virtual void onCallback(const std::shared_ptr & result, const std::experimental::optional & error) = 0; 33 | }; 34 | 35 | } } } // namespace ledger::core::api 36 | #endif //DJINNI_GENERATED_ALGORANDTRANSACTIONCALLBACK_HPP 37 | -------------------------------------------------------------------------------- /include/AlgorandWallet.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from idl.djinni 3 | 4 | #ifndef DJINNI_GENERATED_ALGORANDWALLET_HPP 5 | #define DJINNI_GENERATED_ALGORANDWALLET_HPP 6 | #ifndef LIBCORE_EXPORT 7 | #if defined(_MSC_VER) 8 | #include 9 | #else 10 | #define LIBCORE_EXPORT 11 | #endif 12 | #endif 13 | 14 | namespace ledger { namespace core { namespace api { 15 | 16 | class LIBCORE_EXPORT AlgorandWallet { 17 | public: 18 | virtual ~AlgorandWallet() {} 19 | }; 20 | 21 | } } } // namespace ledger::core::api 22 | #endif //DJINNI_GENERATED_ALGORANDWALLET_HPP 23 | -------------------------------------------------------------------------------- /include/AllocationMetrics.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from core.djinni 3 | 4 | #ifndef DJINNI_GENERATED_ALLOCATIONMETRICS_HPP 5 | #define DJINNI_GENERATED_ALLOCATIONMETRICS_HPP 6 | 7 | #include 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | class LIBCORE_EXPORT AllocationMetrics { 21 | public: 22 | virtual ~AllocationMetrics() {} 23 | 24 | static std::unordered_map getObjectAllocations(); 25 | }; 26 | 27 | } } } // namespace ledger::core::api 28 | #endif //DJINNI_GENERATED_ALLOCATIONMETRICS_HPP 29 | -------------------------------------------------------------------------------- /include/AmountCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_AMOUNTCALLBACK_HPP 5 | #define DJINNI_GENERATED_AMOUNTCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #include 9 | #ifndef LIBCORE_EXPORT 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #define LIBCORE_EXPORT 14 | #endif 15 | #endif 16 | 17 | namespace ledger { namespace core { namespace api { 18 | 19 | class Amount; 20 | struct Error; 21 | 22 | /** Callback triggered by main completed task, returning optional result of template type T. */ 23 | class AmountCallback { 24 | public: 25 | virtual ~AmountCallback() {} 26 | 27 | /** 28 | * Method triggered when main task complete. 29 | * @params result optional of type T, non null if main task failed 30 | * @params error optional of type Error, non null if main task succeeded 31 | */ 32 | virtual void onCallback(const std::shared_ptr & result, const std::experimental::optional & error) = 0; 33 | }; 34 | 35 | } } } // namespace ledger::core::api 36 | #endif //DJINNI_GENERATED_AMOUNTCALLBACK_HPP 37 | -------------------------------------------------------------------------------- /include/AmountListCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_AMOUNTLISTCALLBACK_HPP 5 | #define DJINNI_GENERATED_AMOUNTLISTCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | class Amount; 21 | struct Error; 22 | 23 | /** Callback triggered by main completed task, returning optional result as list of template type T. */ 24 | class AmountListCallback { 25 | public: 26 | virtual ~AmountListCallback() {} 27 | 28 | /** 29 | * Method triggered when main task complete. 30 | * @params result optional of type list, non null if main task failed 31 | * @params error optional of type Error, non null if main task succeeded 32 | */ 33 | virtual void onCallback(const std::experimental::optional>> & result, const std::experimental::optional & error) = 0; 34 | }; 35 | 36 | } } } // namespace ledger::core::api 37 | #endif //DJINNI_GENERATED_AMOUNTLISTCALLBACK_HPP 38 | -------------------------------------------------------------------------------- /include/BigIntCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_BIGINTCALLBACK_HPP 5 | #define DJINNI_GENERATED_BIGINTCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #include 9 | #ifndef LIBCORE_EXPORT 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #define LIBCORE_EXPORT 14 | #endif 15 | #endif 16 | 17 | namespace ledger { namespace core { namespace api { 18 | 19 | class BigInt; 20 | struct Error; 21 | 22 | /** Callback triggered by main completed task, returning optional result of template type T. */ 23 | class BigIntCallback { 24 | public: 25 | virtual ~BigIntCallback() {} 26 | 27 | /** 28 | * Method triggered when main task complete. 29 | * @params result optional of type T, non null if main task failed 30 | * @params error optional of type Error, non null if main task succeeded 31 | */ 32 | virtual void onCallback(const std::shared_ptr & result, const std::experimental::optional & error) = 0; 33 | }; 34 | 35 | } } } // namespace ledger::core::api 36 | #endif //DJINNI_GENERATED_BIGINTCALLBACK_HPP 37 | -------------------------------------------------------------------------------- /include/BigIntListCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_BIGINTLISTCALLBACK_HPP 5 | #define DJINNI_GENERATED_BIGINTLISTCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | class BigInt; 21 | struct Error; 22 | 23 | /** Callback triggered by main completed task, returning optional result as list of template type T. */ 24 | class BigIntListCallback { 25 | public: 26 | virtual ~BigIntListCallback() {} 27 | 28 | /** 29 | * Method triggered when main task complete. 30 | * @params result optional of type list, non null if main task failed 31 | * @params error optional of type Error, non null if main task succeeded 32 | */ 33 | virtual void onCallback(const std::experimental::optional>> & result, const std::experimental::optional & error) = 0; 34 | }; 35 | 36 | } } } // namespace ledger::core::api 37 | #endif //DJINNI_GENERATED_BIGINTLISTCALLBACK_HPP 38 | -------------------------------------------------------------------------------- /include/BinaryCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_BINARYCALLBACK_HPP 5 | #define DJINNI_GENERATED_BINARYCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | struct Error; 21 | 22 | /** Callback triggered by main completed task, returning optional result of template type T. */ 23 | class BinaryCallback { 24 | public: 25 | virtual ~BinaryCallback() {} 26 | 27 | /** 28 | * Method triggered when main task complete. 29 | * @params result optional of type T, non null if main task failed 30 | * @params error optional of type Error, non null if main task succeeded 31 | */ 32 | virtual void onCallback(const std::experimental::optional> & result, const std::experimental::optional & error) = 0; 33 | }; 34 | 35 | } } } // namespace ledger::core::api 36 | #endif //DJINNI_GENERATED_BINARYCALLBACK_HPP 37 | -------------------------------------------------------------------------------- /include/BitcoinLikeBlock.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from bitcoin_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_BITCOINLIKEBLOCK_HPP 5 | #define DJINNI_GENERATED_BITCOINLIKEBLOCK_HPP 6 | 7 | #include 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | /** Class representing Bitcoin block */ 21 | class LIBCORE_EXPORT BitcoinLikeBlock { 22 | public: 23 | virtual ~BitcoinLikeBlock() {} 24 | 25 | /** 26 | * Hash of block. 27 | * @return string representing hash of this block 28 | */ 29 | virtual std::string getHash() = 0; 30 | 31 | /** 32 | * Height of block in blockchain. 33 | * @return 64 bits integer, height of block 34 | */ 35 | virtual int64_t getHeight() = 0; 36 | 37 | /** 38 | * Timestamp when block was mined. 39 | * @return Date object, date when block was appended to blockchain 40 | */ 41 | virtual std::chrono::system_clock::time_point getTime() = 0; 42 | }; 43 | 44 | } } } // namespace ledger::core::api 45 | #endif //DJINNI_GENERATED_BITCOINLIKEBLOCK_HPP 46 | -------------------------------------------------------------------------------- /include/BitcoinLikeDustPolicy.cpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from addresses.djinni 3 | 4 | #include "BitcoinLikeDustPolicy.hpp" // my header 5 | #include "enum_from_string.hpp" 6 | 7 | namespace ledger { namespace core { namespace api { 8 | 9 | std::string to_string(const BitcoinLikeDustPolicy& bitcoinLikeDustPolicy) { 10 | switch (bitcoinLikeDustPolicy) { 11 | case BitcoinLikeDustPolicy::FIXED: return "FIXED"; 12 | case BitcoinLikeDustPolicy::PER_BYTE: return "PER_BYTE"; 13 | case BitcoinLikeDustPolicy::PER_KBYTE: return "PER_KBYTE"; 14 | default: return "UNKNOWN"; 15 | }; 16 | }; 17 | template <> 18 | BitcoinLikeDustPolicy from_string(const std::string& bitcoinLikeDustPolicy) { 19 | if (bitcoinLikeDustPolicy == "FIXED") return BitcoinLikeDustPolicy::FIXED; 20 | else if (bitcoinLikeDustPolicy == "PER_BYTE") return BitcoinLikeDustPolicy::PER_BYTE; 21 | else return BitcoinLikeDustPolicy::PER_KBYTE; 22 | }; 23 | 24 | std::ostream &operator<<(std::ostream &os, const BitcoinLikeDustPolicy &o) 25 | { 26 | switch (o) { 27 | case BitcoinLikeDustPolicy::FIXED: return os << "FIXED"; 28 | case BitcoinLikeDustPolicy::PER_BYTE: return os << "PER_BYTE"; 29 | case BitcoinLikeDustPolicy::PER_KBYTE: return os << "PER_KBYTE"; 30 | } 31 | } 32 | 33 | } } } // namespace ledger::core::api 34 | -------------------------------------------------------------------------------- /include/BitcoinLikeDustPolicy.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from addresses.djinni 3 | 4 | #ifndef DJINNI_GENERATED_BITCOINLIKEDUSTPOLICY_HPP 5 | #define DJINNI_GENERATED_BITCOINLIKEDUSTPOLICY_HPP 6 | 7 | #include 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | enum class BitcoinLikeDustPolicy : int { 21 | FIXED, 22 | PER_BYTE, 23 | PER_KBYTE, 24 | }; 25 | LIBCORE_EXPORT std::string to_string(const BitcoinLikeDustPolicy& bitcoinLikeDustPolicy); 26 | LIBCORE_EXPORT std::ostream &operator<<(std::ostream &os, const BitcoinLikeDustPolicy &o); 27 | 28 | } } } // namespace ledger::core::api 29 | 30 | namespace std { 31 | 32 | template <> 33 | struct hash<::ledger::core::api::BitcoinLikeDustPolicy> { 34 | size_t operator()(::ledger::core::api::BitcoinLikeDustPolicy type) const { 35 | return std::hash()(static_cast(type)); 36 | } 37 | }; 38 | 39 | } // namespace std 40 | #endif //DJINNI_GENERATED_BITCOINLIKEDUSTPOLICY_HPP 41 | -------------------------------------------------------------------------------- /include/BitcoinLikeFeePolicy.cpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from addresses.djinni 3 | 4 | #include "BitcoinLikeFeePolicy.hpp" // my header 5 | #include "enum_from_string.hpp" 6 | 7 | namespace ledger { namespace core { namespace api { 8 | 9 | std::string to_string(const BitcoinLikeFeePolicy& bitcoinLikeFeePolicy) { 10 | switch (bitcoinLikeFeePolicy) { 11 | case BitcoinLikeFeePolicy::PER_BYTE: return "PER_BYTE"; 12 | case BitcoinLikeFeePolicy::PER_KBYTE: return "PER_KBYTE"; 13 | default: return "UNKNOWN"; 14 | }; 15 | }; 16 | template <> 17 | BitcoinLikeFeePolicy from_string(const std::string& bitcoinLikeFeePolicy) { 18 | if (bitcoinLikeFeePolicy == "PER_BYTE") return BitcoinLikeFeePolicy::PER_BYTE; 19 | else return BitcoinLikeFeePolicy::PER_KBYTE; 20 | }; 21 | 22 | std::ostream &operator<<(std::ostream &os, const BitcoinLikeFeePolicy &o) 23 | { 24 | switch (o) { 25 | case BitcoinLikeFeePolicy::PER_BYTE: return os << "PER_BYTE"; 26 | case BitcoinLikeFeePolicy::PER_KBYTE: return os << "PER_KBYTE"; 27 | } 28 | } 29 | 30 | } } } // namespace ledger::core::api 31 | -------------------------------------------------------------------------------- /include/BitcoinLikeFeePolicy.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from addresses.djinni 3 | 4 | #ifndef DJINNI_GENERATED_BITCOINLIKEFEEPOLICY_HPP 5 | #define DJINNI_GENERATED_BITCOINLIKEFEEPOLICY_HPP 6 | 7 | #include 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | enum class BitcoinLikeFeePolicy : int { 21 | PER_BYTE, 22 | PER_KBYTE, 23 | }; 24 | LIBCORE_EXPORT std::string to_string(const BitcoinLikeFeePolicy& bitcoinLikeFeePolicy); 25 | LIBCORE_EXPORT std::ostream &operator<<(std::ostream &os, const BitcoinLikeFeePolicy &o); 26 | 27 | } } } // namespace ledger::core::api 28 | 29 | namespace std { 30 | 31 | template <> 32 | struct hash<::ledger::core::api::BitcoinLikeFeePolicy> { 33 | size_t operator()(::ledger::core::api::BitcoinLikeFeePolicy type) const { 34 | return std::hash()(static_cast(type)); 35 | } 36 | }; 37 | 38 | } // namespace std 39 | #endif //DJINNI_GENERATED_BITCOINLIKEFEEPOLICY_HPP 40 | -------------------------------------------------------------------------------- /include/BitcoinLikeOperation.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from bitcoin_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_BITCOINLIKEOPERATION_HPP 5 | #define DJINNI_GENERATED_BITCOINLIKEOPERATION_HPP 6 | 7 | #include 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | class BitcoinLikeTransaction; 19 | 20 | /** Class representing a Bitcoin Operation. */ 21 | class LIBCORE_EXPORT BitcoinLikeOperation { 22 | public: 23 | virtual ~BitcoinLikeOperation() {} 24 | 25 | /** 26 | * Get operation's transaction. 27 | * @return BitcoinLikeTransaction object 28 | */ 29 | virtual std::shared_ptr getTransaction() = 0; 30 | }; 31 | 32 | } } } // namespace ledger::core::api 33 | #endif //DJINNI_GENERATED_BITCOINLIKEOPERATION_HPP 34 | -------------------------------------------------------------------------------- /include/BitcoinLikeOutputListCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_BITCOINLIKEOUTPUTLISTCALLBACK_HPP 5 | #define DJINNI_GENERATED_BITCOINLIKEOUTPUTLISTCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | class BitcoinLikeOutput; 21 | struct Error; 22 | 23 | /** Callback triggered by main completed task, returning optional result as list of template type T. */ 24 | class BitcoinLikeOutputListCallback { 25 | public: 26 | virtual ~BitcoinLikeOutputListCallback() {} 27 | 28 | /** 29 | * Method triggered when main task complete. 30 | * @params result optional of type list, non null if main task failed 31 | * @params error optional of type Error, non null if main task succeeded 32 | */ 33 | virtual void onCallback(const std::experimental::optional>> & result, const std::experimental::optional & error) = 0; 34 | }; 35 | 36 | } } } // namespace ledger::core::api 37 | #endif //DJINNI_GENERATED_BITCOINLIKEOUTPUTLISTCALLBACK_HPP 38 | -------------------------------------------------------------------------------- /include/BitcoinLikePickingStrategy.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from bitcoin_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_BITCOINLIKEPICKINGSTRATEGY_HPP 5 | #define DJINNI_GENERATED_BITCOINLIKEPICKINGSTRATEGY_HPP 6 | 7 | #include 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | enum class BitcoinLikePickingStrategy : int { 21 | DEEP_OUTPUTS_FIRST, 22 | OPTIMIZE_SIZE, 23 | MERGE_OUTPUTS, 24 | HIGHEST_FIRST_LIMIT_UTXO, 25 | LIMIT_UTXO, 26 | }; 27 | LIBCORE_EXPORT std::string to_string(const BitcoinLikePickingStrategy& bitcoinLikePickingStrategy); 28 | LIBCORE_EXPORT std::ostream &operator<<(std::ostream &os, const BitcoinLikePickingStrategy &o); 29 | 30 | } } } // namespace ledger::core::api 31 | 32 | namespace std { 33 | 34 | template <> 35 | struct hash<::ledger::core::api::BitcoinLikePickingStrategy> { 36 | size_t operator()(::ledger::core::api::BitcoinLikePickingStrategy type) const { 37 | return std::hash()(static_cast(type)); 38 | } 39 | }; 40 | 41 | } // namespace std 42 | #endif //DJINNI_GENERATED_BITCOINLIKEPICKINGSTRATEGY_HPP 43 | -------------------------------------------------------------------------------- /include/BitcoinLikeScript.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from bitcoin_script.djinni 3 | 4 | #ifndef DJINNI_GENERATED_BITCOINLIKESCRIPT_HPP 5 | #define DJINNI_GENERATED_BITCOINLIKESCRIPT_HPP 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #ifndef LIBCORE_EXPORT 12 | #if defined(_MSC_VER) 13 | #include 14 | #else 15 | #define LIBCORE_EXPORT 16 | #endif 17 | #endif 18 | 19 | namespace ledger { namespace core { namespace api { 20 | 21 | class BitcoinLikeScriptChunk; 22 | 23 | /** A general purpose script. */ 24 | class LIBCORE_EXPORT BitcoinLikeScript { 25 | public: 26 | virtual ~BitcoinLikeScript() {} 27 | 28 | /** 29 | * Get the head of the script. Scripts are organized by chunks, so you get an iterator-like 30 | * interface. 31 | */ 32 | virtual std::shared_ptr head() = 0; 33 | 34 | /** Turn the script into a string representation. */ 35 | virtual std::string toString() = 0; 36 | 37 | /** Parse data into a script. */ 38 | static std::shared_ptr parse(const std::vector & data); 39 | }; 40 | 41 | } } } // namespace ledger::core::api 42 | #endif //DJINNI_GENERATED_BITCOINLIKESCRIPT_HPP 43 | -------------------------------------------------------------------------------- /include/BitcoinLikeScriptChunk.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from bitcoin_script.djinni 3 | 4 | #ifndef DJINNI_GENERATED_BITCOINLIKESCRIPTCHUNK_HPP 5 | #define DJINNI_GENERATED_BITCOINLIKESCRIPTCHUNK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #include 9 | #include 10 | #include 11 | #ifndef LIBCORE_EXPORT 12 | #if defined(_MSC_VER) 13 | #include 14 | #else 15 | #define LIBCORE_EXPORT 16 | #endif 17 | #endif 18 | 19 | namespace ledger { namespace core { namespace api { 20 | 21 | struct BitcoinLikeOperator; 22 | 23 | class LIBCORE_EXPORT BitcoinLikeScriptChunk { 24 | public: 25 | virtual ~BitcoinLikeScriptChunk() {} 26 | 27 | virtual bool isOperator() = 0; 28 | 29 | virtual bool isPushedData() = 0; 30 | 31 | virtual std::experimental::optional getOperator() = 0; 32 | 33 | virtual std::experimental::optional> getPushedData() = 0; 34 | 35 | virtual std::shared_ptr next() = 0; 36 | 37 | virtual bool hasNext() = 0; 38 | }; 39 | 40 | } } } // namespace ledger::core::api 41 | #endif //DJINNI_GENERATED_BITCOINLIKESCRIPTCHUNK_HPP 42 | -------------------------------------------------------------------------------- /include/BitcoinLikeSignatureState.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from bitcoin_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_BITCOINLIKESIGNATURESTATE_HPP 5 | #define DJINNI_GENERATED_BITCOINLIKESIGNATURESTATE_HPP 6 | 7 | #include 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | enum class BitcoinLikeSignatureState : int { 21 | ALREADY_SIGNED, 22 | MISSING_DATA, 23 | SIGNING_SUCCEED, 24 | }; 25 | LIBCORE_EXPORT std::string to_string(const BitcoinLikeSignatureState& bitcoinLikeSignatureState); 26 | LIBCORE_EXPORT std::ostream &operator<<(std::ostream &os, const BitcoinLikeSignatureState &o); 27 | 28 | } } } // namespace ledger::core::api 29 | 30 | namespace std { 31 | 32 | template <> 33 | struct hash<::ledger::core::api::BitcoinLikeSignatureState> { 34 | size_t operator()(::ledger::core::api::BitcoinLikeSignatureState type) const { 35 | return std::hash()(static_cast(type)); 36 | } 37 | }; 38 | 39 | } // namespace std 40 | #endif //DJINNI_GENERATED_BITCOINLIKESIGNATURESTATE_HPP 41 | -------------------------------------------------------------------------------- /include/BitcoinLikeTransactionCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_BITCOINLIKETRANSACTIONCALLBACK_HPP 5 | #define DJINNI_GENERATED_BITCOINLIKETRANSACTIONCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #include 9 | #ifndef LIBCORE_EXPORT 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #define LIBCORE_EXPORT 14 | #endif 15 | #endif 16 | 17 | namespace ledger { namespace core { namespace api { 18 | 19 | class BitcoinLikeTransaction; 20 | struct Error; 21 | 22 | /** Callback triggered by main completed task, returning optional result of template type T. */ 23 | class BitcoinLikeTransactionCallback { 24 | public: 25 | virtual ~BitcoinLikeTransactionCallback() {} 26 | 27 | /** 28 | * Method triggered when main task complete. 29 | * @params result optional of type T, non null if main task failed 30 | * @params error optional of type Error, non null if main task succeeded 31 | */ 32 | virtual void onCallback(const std::shared_ptr & result, const std::experimental::optional & error) = 0; 33 | }; 34 | 35 | } } } // namespace ledger::core::api 36 | #endif //DJINNI_GENERATED_BITCOINLIKETRANSACTIONCALLBACK_HPP 37 | -------------------------------------------------------------------------------- /include/BitcoinLikeWallet.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from bitcoin_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_BITCOINLIKEWALLET_HPP 5 | #define DJINNI_GENERATED_BITCOINLIKEWALLET_HPP 6 | #ifndef LIBCORE_EXPORT 7 | #if defined(_MSC_VER) 8 | #include 9 | #else 10 | #define LIBCORE_EXPORT 11 | #endif 12 | #endif 13 | 14 | namespace ledger { namespace core { namespace api { 15 | 16 | /** A bitcoin-like wallet. */ 17 | class LIBCORE_EXPORT BitcoinLikeWallet { 18 | public: 19 | virtual ~BitcoinLikeWallet() {} 20 | }; 21 | 22 | } } } // namespace ledger::core::api 23 | #endif //DJINNI_GENERATED_BITCOINLIKEWALLET_HPP 24 | -------------------------------------------------------------------------------- /include/BitcoinLikeWalletConfiguration.cpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from bitcoin_like_wallet.djinni 3 | 4 | #include "BitcoinLikeWalletConfiguration.hpp" // my header 5 | 6 | namespace ledger { namespace core { namespace api { 7 | 8 | std::string const BitcoinLikeWalletConfiguration::KEYCHAIN = {"keychain"}; 9 | 10 | std::string const BitcoinLikeWalletConfiguration::OBSERVER = {"observer"}; 11 | 12 | std::string const BitcoinLikeWalletConfiguration::EXPLORER = {"explorer"}; 13 | 14 | std::string const BitcoinLikeWalletConfiguration::SYNCHRONIZER = {"synchronizer"}; 15 | 16 | std::string const BitcoinLikeWalletConfiguration::KEYCHAIN_P2PKH_BIP44 = {"p2pkh_bip44"}; 17 | 18 | std::string const BitcoinLikeWalletConfiguration::OBSERVER_LEDGER_WEBSOCKET = {"ledger_websocket"}; 19 | 20 | std::string const BitcoinLikeWalletConfiguration::EXPLORER_LEDGER_API = {"ledger_api"}; 21 | 22 | std::string const BitcoinLikeWalletConfiguration::SYNCHRONIZER_DEFAULT = {"default"}; 23 | 24 | } } } // namespace ledger::core::api 25 | -------------------------------------------------------------------------------- /include/BlockCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_BLOCKCALLBACK_HPP 5 | #define DJINNI_GENERATED_BLOCKCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | struct Block; 19 | struct Error; 20 | 21 | /** Callback triggered by main completed task, returning optional result of template type T. */ 22 | class BlockCallback { 23 | public: 24 | virtual ~BlockCallback() {} 25 | 26 | /** 27 | * Method triggered when main task complete. 28 | * @params result optional of type T, non null if main task failed 29 | * @params error optional of type Error, non null if main task succeeded 30 | */ 31 | virtual void onCallback(const std::experimental::optional & result, const std::experimental::optional & error) = 0; 32 | }; 33 | 34 | } } } // namespace ledger::core::api 35 | #endif //DJINNI_GENERATED_BLOCKCALLBACK_HPP 36 | -------------------------------------------------------------------------------- /include/BlockchainExplorerEngines.cpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from configuration.djinni 3 | 4 | #include "BlockchainExplorerEngines.hpp" // my header 5 | 6 | namespace ledger { namespace core { namespace api { 7 | 8 | std::string const BlockchainExplorerEngines::STARGATE_NODE = {"STARGATE_NODE"}; 9 | 10 | std::string const BlockchainExplorerEngines::COSMOS_NODE = {"COSMOS_NODE"}; 11 | 12 | std::string const BlockchainExplorerEngines::LEDGER_API = {"LEDGER_API"}; 13 | 14 | std::string const BlockchainExplorerEngines::RIPPLE_API = {"RIPPLE_API"}; 15 | 16 | std::string const BlockchainExplorerEngines::RIPPLE_NODE = {"RIPPLE_NODE"}; 17 | 18 | std::string const BlockchainExplorerEngines::TEZOS_NODE = {"TEZOS_NODE"}; 19 | 20 | std::string const BlockchainExplorerEngines::TZSTATS_API = {"TZSTATS_API"}; 21 | 22 | } } } // namespace ledger::core::api 23 | -------------------------------------------------------------------------------- /include/BlockchainExplorerEngines.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from configuration.djinni 3 | 4 | #ifndef DJINNI_GENERATED_BLOCKCHAINEXPLORERENGINES_HPP 5 | #define DJINNI_GENERATED_BLOCKCHAINEXPLORERENGINES_HPP 6 | 7 | #include 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | /** Available API to use with explorers. */ 19 | class LIBCORE_EXPORT BlockchainExplorerEngines { 20 | public: 21 | virtual ~BlockchainExplorerEngines() {} 22 | 23 | static std::string const STARGATE_NODE; 24 | 25 | static std::string const COSMOS_NODE; 26 | 27 | static std::string const LEDGER_API; 28 | 29 | static std::string const RIPPLE_API; 30 | 31 | static std::string const RIPPLE_NODE; 32 | 33 | static std::string const TEZOS_NODE; 34 | 35 | static std::string const TZSTATS_API; 36 | }; 37 | 38 | } } } // namespace ledger::core::api 39 | #endif //DJINNI_GENERATED_BLOCKCHAINEXPLORERENGINES_HPP 40 | -------------------------------------------------------------------------------- /include/BlockchainObserverEngines.cpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from configuration.djinni 3 | 4 | #include "BlockchainObserverEngines.hpp" // my header 5 | 6 | namespace ledger { namespace core { namespace api { 7 | 8 | std::string const BlockchainObserverEngines::STARGATE_NODE = {"STARGATE_NODE"}; 9 | 10 | std::string const BlockchainObserverEngines::COSMOS_NODE = {"COSMOS_NODE"}; 11 | 12 | std::string const BlockchainObserverEngines::LEDGER_API = {"LEDGER_API"}; 13 | 14 | std::string const BlockchainObserverEngines::RIPPLE_NODE = {"RIPPLE_NODE"}; 15 | 16 | std::string const BlockchainObserverEngines::TEZOS_NODE = {"TEZOS_NODE"}; 17 | 18 | } } } // namespace ledger::core::api 19 | -------------------------------------------------------------------------------- /include/BlockchainObserverEngines.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from configuration.djinni 3 | 4 | #ifndef DJINNI_GENERATED_BLOCKCHAINOBSERVERENGINES_HPP 5 | #define DJINNI_GENERATED_BLOCKCHAINOBSERVERENGINES_HPP 6 | 7 | #include 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | /** Available API to use with observers. */ 19 | class LIBCORE_EXPORT BlockchainObserverEngines { 20 | public: 21 | virtual ~BlockchainObserverEngines() {} 22 | 23 | static std::string const STARGATE_NODE; 24 | 25 | static std::string const COSMOS_NODE; 26 | 27 | static std::string const LEDGER_API; 28 | 29 | static std::string const RIPPLE_NODE; 30 | 31 | static std::string const TEZOS_NODE; 32 | }; 33 | 34 | } } } // namespace ledger::core::api 35 | #endif //DJINNI_GENERATED_BLOCKCHAINOBSERVERENGINES_HPP 36 | -------------------------------------------------------------------------------- /include/BoolCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_BOOLCALLBACK_HPP 5 | #define DJINNI_GENERATED_BOOLCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | struct Error; 19 | 20 | /** Callback triggered by main completed task, returning optional result of template type T. */ 21 | class BoolCallback { 22 | public: 23 | virtual ~BoolCallback() {} 24 | 25 | /** 26 | * Method triggered when main task complete. 27 | * @params result optional of type T, non null if main task failed 28 | * @params error optional of type Error, non null if main task succeeded 29 | */ 30 | virtual void onCallback(std::experimental::optional result, const std::experimental::optional & error) = 0; 31 | }; 32 | 33 | } } } // namespace ledger::core::api 34 | #endif //DJINNI_GENERATED_BOOLCALLBACK_HPP 35 | -------------------------------------------------------------------------------- /include/ConfigurationDefaults.cpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from configuration.djinni 3 | 4 | #include "ConfigurationDefaults.hpp" // my header 5 | 6 | namespace ledger { namespace core { namespace api { 7 | 8 | std::string const ConfigurationDefaults::BLOCKCHAIN_DEFAULT_API_ENDPOINT = {"https://explorers.api.live.ledger.com"}; 9 | 10 | std::string const ConfigurationDefaults::BLOCKCHAIN_OBSERVER_WS_ENDPOINT = {"wss://ws.ledgerwallet.com/blockchain/v2/{}/ws"}; 11 | 12 | std::string const ConfigurationDefaults::BIP44_DERIVATION_SCHEME = {"44'/'/'//
"}; 13 | 14 | std::string const ConfigurationDefaults::DEFAULT_KEYCHAIN = {"BIP32_P2PKH"}; 15 | 16 | int32_t const ConfigurationDefaults::DEFAULT_TRUST_LIMIT = 3; 17 | 18 | int32_t const ConfigurationDefaults::KEYCHAIN_DEFAULT_OBSERVABLE_RANGE = 20; 19 | 20 | int32_t const ConfigurationDefaults::DEFAULT_TTL_CACHE = 30; 21 | 22 | int32_t const ConfigurationDefaults::DEFAULT_PG_CONNECTION_POOL_SIZE = 25; 23 | 24 | } } } // namespace ledger::core::api 25 | -------------------------------------------------------------------------------- /include/CosmosBech32Type.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from addresses.djinni 3 | 4 | #ifndef DJINNI_GENERATED_COSMOSBECH32TYPE_HPP 5 | #define DJINNI_GENERATED_COSMOSBECH32TYPE_HPP 6 | 7 | #include 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | enum class CosmosBech32Type : int { 21 | PUBLIC_KEY, 22 | PUBLIC_KEY_VAL, 23 | PUBLIC_KEY_VAL_CONS, 24 | ADDRESS, 25 | ADDRESS_VAL, 26 | ADDRESS_VAL_CONS, 27 | }; 28 | LIBCORE_EXPORT std::string to_string(const CosmosBech32Type& cosmosBech32Type); 29 | LIBCORE_EXPORT std::ostream &operator<<(std::ostream &os, const CosmosBech32Type &o); 30 | 31 | } } } // namespace ledger::core::api 32 | 33 | namespace std { 34 | 35 | template <> 36 | struct hash<::ledger::core::api::CosmosBech32Type> { 37 | size_t operator()(::ledger::core::api::CosmosBech32Type type) const { 38 | return std::hash()(static_cast(type)); 39 | } 40 | }; 41 | 42 | } // namespace std 43 | #endif //DJINNI_GENERATED_COSMOSBECH32TYPE_HPP 44 | -------------------------------------------------------------------------------- /include/CosmosConfigurationDefaults.cpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from wallet.djinni 3 | 4 | #include "CosmosConfigurationDefaults.hpp" // my header 5 | 6 | namespace ledger { namespace core { namespace api { 7 | 8 | std::string const CosmosConfigurationDefaults::COSMOS_DEFAULT_API_ENDPOINT = {"https://cosmoshub4.coin.ledger.com"}; 9 | 10 | std::string const CosmosConfigurationDefaults::COSMOS_OBSERVER_WS_ENDPOINT = {""}; 11 | 12 | } } } // namespace ledger::core::api 13 | -------------------------------------------------------------------------------- /include/CosmosConfigurationDefaults.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_COSMOSCONFIGURATIONDEFAULTS_HPP 5 | #define DJINNI_GENERATED_COSMOSCONFIGURATIONDEFAULTS_HPP 6 | 7 | #include 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | class LIBCORE_EXPORT CosmosConfigurationDefaults { 19 | public: 20 | virtual ~CosmosConfigurationDefaults() {} 21 | 22 | static std::string const COSMOS_DEFAULT_API_ENDPOINT; 23 | 24 | static std::string const COSMOS_OBSERVER_WS_ENDPOINT; 25 | }; 26 | 27 | } } } // namespace ledger::core::api 28 | #endif //DJINNI_GENERATED_COSMOSCONFIGURATIONDEFAULTS_HPP 29 | -------------------------------------------------------------------------------- /include/CosmosCurve.cpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from addresses.djinni 3 | 4 | #include "CosmosCurve.hpp" // my header 5 | #include "enum_from_string.hpp" 6 | 7 | namespace ledger { namespace core { namespace api { 8 | 9 | std::string to_string(const CosmosCurve& cosmosCurve) { 10 | switch (cosmosCurve) { 11 | case CosmosCurve::ED25519: return "ED25519"; 12 | case CosmosCurve::SECP256K1: return "SECP256K1"; 13 | default: return "UNKNOWN"; 14 | }; 15 | }; 16 | template <> 17 | CosmosCurve from_string(const std::string& cosmosCurve) { 18 | if (cosmosCurve == "ED25519") return CosmosCurve::ED25519; 19 | else return CosmosCurve::SECP256K1; 20 | }; 21 | 22 | std::ostream &operator<<(std::ostream &os, const CosmosCurve &o) 23 | { 24 | switch (o) { 25 | case CosmosCurve::ED25519: return os << "ED25519"; 26 | case CosmosCurve::SECP256K1: return os << "SECP256K1"; 27 | } 28 | } 29 | 30 | } } } // namespace ledger::core::api 31 | -------------------------------------------------------------------------------- /include/CosmosCurve.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from addresses.djinni 3 | 4 | #ifndef DJINNI_GENERATED_COSMOSCURVE_HPP 5 | #define DJINNI_GENERATED_COSMOSCURVE_HPP 6 | 7 | #include 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | enum class CosmosCurve : int { 21 | ED25519, 22 | SECP256K1, 23 | }; 24 | LIBCORE_EXPORT std::string to_string(const CosmosCurve& cosmosCurve); 25 | LIBCORE_EXPORT std::ostream &operator<<(std::ostream &os, const CosmosCurve &o); 26 | 27 | } } } // namespace ledger::core::api 28 | 29 | namespace std { 30 | 31 | template <> 32 | struct hash<::ledger::core::api::CosmosCurve> { 33 | size_t operator()(::ledger::core::api::CosmosCurve type) const { 34 | return std::hash()(static_cast(type)); 35 | } 36 | }; 37 | 38 | } // namespace std 39 | #endif //DJINNI_GENERATED_COSMOSCURVE_HPP 40 | -------------------------------------------------------------------------------- /include/CosmosLikeAmount.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from messages.djinni 3 | 4 | #ifndef DJINNI_GENERATED_COSMOSLIKEAMOUNT_HPP 5 | #define DJINNI_GENERATED_COSMOSLIKEAMOUNT_HPP 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | namespace ledger { namespace core { namespace api { 12 | 13 | struct CosmosLikeAmount final { 14 | std::string amount; 15 | std::string denom; 16 | 17 | CosmosLikeAmount(std::string amount_, 18 | std::string denom_) 19 | : amount(std::move(amount_)) 20 | , denom(std::move(denom_)) 21 | {} 22 | 23 | CosmosLikeAmount(const CosmosLikeAmount& cpy) { 24 | this->amount = cpy.amount; 25 | this->denom = cpy.denom; 26 | } 27 | 28 | CosmosLikeAmount() = default; 29 | 30 | 31 | CosmosLikeAmount& operator=(const CosmosLikeAmount& cpy) { 32 | this->amount = cpy.amount; 33 | this->denom = cpy.denom; 34 | return *this; 35 | } 36 | 37 | template 38 | void load(Archive& archive) { 39 | archive(amount, denom); 40 | } 41 | 42 | template 43 | void save(Archive& archive) const { 44 | archive(amount, denom); 45 | } 46 | }; 47 | 48 | } } } // namespace ledger::core::api 49 | #endif //DJINNI_GENERATED_COSMOSLIKEAMOUNT_HPP 50 | -------------------------------------------------------------------------------- /include/CosmosLikeBlock.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_COSMOSLIKEBLOCK_HPP 5 | #define DJINNI_GENERATED_COSMOSLIKEBLOCK_HPP 6 | 7 | #include 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | /**Class representing Cosmos block */ 21 | class LIBCORE_EXPORT CosmosLikeBlock { 22 | public: 23 | virtual ~CosmosLikeBlock() {} 24 | 25 | /** 26 | *Hash of block 27 | *@return string representing hash of this block 28 | */ 29 | virtual std::string getHash() = 0; 30 | 31 | /** 32 | *Height of block in blockchain 33 | *@return 64 bits integer, height of block 34 | */ 35 | virtual int64_t getHeight() = 0; 36 | 37 | /** 38 | *Timestamp when block was mined 39 | *@return Date object, date when block was appended to blockchain 40 | */ 41 | virtual std::chrono::system_clock::time_point getTime() = 0; 42 | }; 43 | 44 | } } } // namespace ledger::core::api 45 | #endif //DJINNI_GENERATED_COSMOSLIKEBLOCK_HPP 46 | -------------------------------------------------------------------------------- /include/CosmosLikeDelegation.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_COSMOSLIKEDELEGATION_HPP 5 | #define DJINNI_GENERATED_COSMOSLIKEDELEGATION_HPP 6 | 7 | #include 8 | #include 9 | #ifndef LIBCORE_EXPORT 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #define LIBCORE_EXPORT 14 | #endif 15 | #endif 16 | 17 | namespace ledger { namespace core { namespace api { 18 | 19 | class Amount; 20 | 21 | /**Class representing a Cosmos delegation */ 22 | class LIBCORE_EXPORT CosmosLikeDelegation { 23 | public: 24 | virtual ~CosmosLikeDelegation() {} 25 | 26 | virtual std::string getDelegatorAddress() const = 0; 27 | 28 | virtual std::string getValidatorAddress() const = 0; 29 | 30 | virtual std::shared_ptr getDelegatedAmount() const = 0; 31 | }; 32 | 33 | } } } // namespace ledger::core::api 34 | #endif //DJINNI_GENERATED_COSMOSLIKEDELEGATION_HPP 35 | -------------------------------------------------------------------------------- /include/CosmosLikeMsgUnjail.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from messages.djinni 3 | 4 | #ifndef DJINNI_GENERATED_COSMOSLIKEMSGUNJAIL_HPP 5 | #define DJINNI_GENERATED_COSMOSLIKEMSGUNJAIL_HPP 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | namespace ledger { namespace core { namespace api { 12 | 13 | struct CosmosLikeMsgUnjail final { 14 | std::string validatorAddress; 15 | 16 | CosmosLikeMsgUnjail(std::string validatorAddress_) 17 | : validatorAddress(std::move(validatorAddress_)) 18 | {} 19 | 20 | CosmosLikeMsgUnjail(const CosmosLikeMsgUnjail& cpy) { 21 | this->validatorAddress = cpy.validatorAddress; 22 | } 23 | 24 | CosmosLikeMsgUnjail() = default; 25 | 26 | 27 | CosmosLikeMsgUnjail& operator=(const CosmosLikeMsgUnjail& cpy) { 28 | this->validatorAddress = cpy.validatorAddress; 29 | return *this; 30 | } 31 | 32 | template 33 | void load(Archive& archive) { 34 | archive(validatorAddress); 35 | } 36 | 37 | template 38 | void save(Archive& archive) const { 39 | archive(validatorAddress); 40 | } 41 | }; 42 | 43 | } } } // namespace ledger::core::api 44 | #endif //DJINNI_GENERATED_COSMOSLIKEMSGUNJAIL_HPP 45 | -------------------------------------------------------------------------------- /include/CosmosLikeOperation.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_COSMOSLIKEOPERATION_HPP 5 | #define DJINNI_GENERATED_COSMOSLIKEOPERATION_HPP 6 | 7 | #include 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | class CosmosLikeMessage; 19 | class CosmosLikeTransaction; 20 | 21 | /**Class representing a Cosmos Operation */ 22 | class LIBCORE_EXPORT CosmosLikeOperation { 23 | public: 24 | virtual ~CosmosLikeOperation() {} 25 | 26 | /** 27 | *Get operation's transaction 28 | *@return CosmosLikeTransaction object 29 | */ 30 | virtual std::shared_ptr getTransaction() = 0; 31 | 32 | /** 33 | * Get message which created this operation 34 | * @return CosmosLikeMessage object 35 | */ 36 | virtual std::shared_ptr getMessage() = 0; 37 | }; 38 | 39 | } } } // namespace ledger::core::api 40 | #endif //DJINNI_GENERATED_COSMOSLIKEOPERATION_HPP 41 | -------------------------------------------------------------------------------- /include/CosmosLikeRedelegation.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_COSMOSLIKEREDELEGATION_HPP 5 | #define DJINNI_GENERATED_COSMOSLIKEREDELEGATION_HPP 6 | 7 | #include 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | class CosmosLikeRedelegationEntry; 21 | 22 | /** (Pending) Redelegation data */ 23 | class LIBCORE_EXPORT CosmosLikeRedelegation { 24 | public: 25 | virtual ~CosmosLikeRedelegation() {} 26 | 27 | virtual std::string getDelegatorAddress() = 0; 28 | 29 | virtual std::string getSrcValidatorAddress() = 0; 30 | 31 | virtual std::string getDstValidatorAddress() = 0; 32 | 33 | virtual std::vector> getEntries() = 0; 34 | }; 35 | 36 | } } } // namespace ledger::core::api 37 | #endif //DJINNI_GENERATED_COSMOSLIKEREDELEGATION_HPP 38 | -------------------------------------------------------------------------------- /include/CosmosLikeRedelegationEntry.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_COSMOSLIKEREDELEGATIONENTRY_HPP 5 | #define DJINNI_GENERATED_COSMOSLIKEREDELEGATIONENTRY_HPP 6 | 7 | #include 8 | #include 9 | #ifndef LIBCORE_EXPORT 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #define LIBCORE_EXPORT 14 | #endif 15 | #endif 16 | 17 | namespace ledger { namespace core { namespace api { 18 | 19 | class BigInt; 20 | 21 | class LIBCORE_EXPORT CosmosLikeRedelegationEntry { 22 | public: 23 | virtual ~CosmosLikeRedelegationEntry() {} 24 | 25 | /** Block height of the begin redelegate request */ 26 | virtual std::shared_ptr getCreationHeight() = 0; 27 | 28 | /** Timestamp of the redelegation completion */ 29 | virtual std::chrono::system_clock::time_point getCompletionTime() = 0; 30 | 31 | /** Balance requested to redelegate */ 32 | virtual std::shared_ptr getInitialBalance() = 0; 33 | 34 | /** Current amount being redelegated (i.e. less than initialBalance if slashed) */ 35 | virtual std::shared_ptr getBalance() = 0; 36 | }; 37 | 38 | } } } // namespace ledger::core::api 39 | #endif //DJINNI_GENERATED_COSMOSLIKEREDELEGATIONENTRY_HPP 40 | -------------------------------------------------------------------------------- /include/CosmosLikeReward.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_COSMOSLIKEREWARD_HPP 5 | #define DJINNI_GENERATED_COSMOSLIKEREWARD_HPP 6 | 7 | #include 8 | #include 9 | #ifndef LIBCORE_EXPORT 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #define LIBCORE_EXPORT 14 | #endif 15 | #endif 16 | 17 | namespace ledger { namespace core { namespace api { 18 | 19 | class Amount; 20 | 21 | /**Class representing a Cosmos reward */ 22 | class LIBCORE_EXPORT CosmosLikeReward { 23 | public: 24 | virtual ~CosmosLikeReward() {} 25 | 26 | virtual std::string getDelegatorAddress() const = 0; 27 | 28 | virtual std::string getValidatorAddress() const = 0; 29 | 30 | virtual std::shared_ptr getRewardAmount() const = 0; 31 | }; 32 | 33 | } } } // namespace ledger::core::api 34 | #endif //DJINNI_GENERATED_COSMOSLIKEREWARD_HPP 35 | -------------------------------------------------------------------------------- /include/CosmosLikeRewardListCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_COSMOSLIKEREWARDLISTCALLBACK_HPP 5 | #define DJINNI_GENERATED_COSMOSLIKEREWARDLISTCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | class CosmosLikeReward; 21 | struct Error; 22 | 23 | /** Callback triggered by main completed task, returning optional result as list of template type T. */ 24 | class CosmosLikeRewardListCallback { 25 | public: 26 | virtual ~CosmosLikeRewardListCallback() {} 27 | 28 | /** 29 | * Method triggered when main task complete. 30 | * @params result optional of type list, non null if main task failed 31 | * @params error optional of type Error, non null if main task succeeded 32 | */ 33 | virtual void onCallback(const std::experimental::optional>> & result, const std::experimental::optional & error) = 0; 34 | }; 35 | 36 | } } } // namespace ledger::core::api 37 | #endif //DJINNI_GENERATED_COSMOSLIKEREWARDLISTCALLBACK_HPP 38 | -------------------------------------------------------------------------------- /include/CosmosLikeTransactionCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_COSMOSLIKETRANSACTIONCALLBACK_HPP 5 | #define DJINNI_GENERATED_COSMOSLIKETRANSACTIONCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #include 9 | #ifndef LIBCORE_EXPORT 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #define LIBCORE_EXPORT 14 | #endif 15 | #endif 16 | 17 | namespace ledger { namespace core { namespace api { 18 | 19 | class CosmosLikeTransaction; 20 | struct Error; 21 | 22 | /** Callback triggered by main completed task, returning optional result of template type T. */ 23 | class CosmosLikeTransactionCallback { 24 | public: 25 | virtual ~CosmosLikeTransactionCallback() {} 26 | 27 | /** 28 | * Method triggered when main task complete. 29 | * @params result optional of type T, non null if main task failed 30 | * @params error optional of type Error, non null if main task succeeded 31 | */ 32 | virtual void onCallback(const std::shared_ptr & result, const std::experimental::optional & error) = 0; 33 | }; 34 | 35 | } } } // namespace ledger::core::api 36 | #endif //DJINNI_GENERATED_COSMOSLIKETRANSACTIONCALLBACK_HPP 37 | -------------------------------------------------------------------------------- /include/CosmosLikeUnbonding.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_COSMOSLIKEUNBONDING_HPP 5 | #define DJINNI_GENERATED_COSMOSLIKEUNBONDING_HPP 6 | 7 | #include 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | class CosmosLikeUnbondingEntry; 21 | 22 | /** (Pending) Unbonding data */ 23 | class LIBCORE_EXPORT CosmosLikeUnbonding { 24 | public: 25 | virtual ~CosmosLikeUnbonding() {} 26 | 27 | /** Delegator address */ 28 | virtual std::string getDelegatorAddress() = 0; 29 | 30 | /** Validator address */ 31 | virtual std::string getValidatorAddress() = 0; 32 | 33 | virtual std::vector> getEntries() = 0; 34 | }; 35 | 36 | } } } // namespace ledger::core::api 37 | #endif //DJINNI_GENERATED_COSMOSLIKEUNBONDING_HPP 38 | -------------------------------------------------------------------------------- /include/CosmosLikeUnbondingEntry.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_COSMOSLIKEUNBONDINGENTRY_HPP 5 | #define DJINNI_GENERATED_COSMOSLIKEUNBONDINGENTRY_HPP 6 | 7 | #include 8 | #include 9 | #ifndef LIBCORE_EXPORT 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #define LIBCORE_EXPORT 14 | #endif 15 | #endif 16 | 17 | namespace ledger { namespace core { namespace api { 18 | 19 | class BigInt; 20 | 21 | class LIBCORE_EXPORT CosmosLikeUnbondingEntry { 22 | public: 23 | virtual ~CosmosLikeUnbondingEntry() {} 24 | 25 | /** Block height of the unbonding request */ 26 | virtual std::shared_ptr getCreationHeight() = 0; 27 | 28 | /** Timestamp of the unbonding completion */ 29 | virtual std::chrono::system_clock::time_point getCompletionTime() = 0; 30 | 31 | /** Balance requested to unbond */ 32 | virtual std::shared_ptr getInitialBalance() = 0; 33 | 34 | /** Current amount coming back (i.e. less than initialBalance if slashed) */ 35 | virtual std::shared_ptr getBalance() = 0; 36 | }; 37 | 38 | } } } // namespace ledger::core::api 39 | #endif //DJINNI_GENERATED_COSMOSLIKEUNBONDINGENTRY_HPP 40 | -------------------------------------------------------------------------------- /include/CosmosLikeValidatorCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_COSMOSLIKEVALIDATORCALLBACK_HPP 5 | #define DJINNI_GENERATED_COSMOSLIKEVALIDATORCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | struct CosmosLikeValidator; 19 | struct Error; 20 | 21 | /** Callback triggered by main completed task, returning optional result of template type T. */ 22 | class CosmosLikeValidatorCallback { 23 | public: 24 | virtual ~CosmosLikeValidatorCallback() {} 25 | 26 | /** 27 | * Method triggered when main task complete. 28 | * @params result optional of type T, non null if main task failed 29 | * @params error optional of type Error, non null if main task succeeded 30 | */ 31 | virtual void onCallback(const std::experimental::optional & result, const std::experimental::optional & error) = 0; 32 | }; 33 | 34 | } } } // namespace ledger::core::api 35 | #endif //DJINNI_GENERATED_COSMOSLIKEVALIDATORCALLBACK_HPP 36 | -------------------------------------------------------------------------------- /include/CosmosLikeValidatorListCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_COSMOSLIKEVALIDATORLISTCALLBACK_HPP 5 | #define DJINNI_GENERATED_COSMOSLIKEVALIDATORLISTCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #include 9 | #ifndef LIBCORE_EXPORT 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #define LIBCORE_EXPORT 14 | #endif 15 | #endif 16 | 17 | namespace ledger { namespace core { namespace api { 18 | 19 | struct CosmosLikeValidator; 20 | struct Error; 21 | 22 | /** Callback triggered by main completed task, returning optional result as list of template type T. */ 23 | class CosmosLikeValidatorListCallback { 24 | public: 25 | virtual ~CosmosLikeValidatorListCallback() {} 26 | 27 | /** 28 | * Method triggered when main task complete. 29 | * @params result optional of type list, non null if main task failed 30 | * @params error optional of type Error, non null if main task succeeded 31 | */ 32 | virtual void onCallback(const std::experimental::optional> & result, const std::experimental::optional & error) = 0; 33 | }; 34 | 35 | } } } // namespace ledger::core::api 36 | #endif //DJINNI_GENERATED_COSMOSLIKEVALIDATORLISTCALLBACK_HPP 37 | -------------------------------------------------------------------------------- /include/CosmosLikeVoteOption.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from messages.djinni 3 | 4 | #ifndef DJINNI_GENERATED_COSMOSLIKEVOTEOPTION_HPP 5 | #define DJINNI_GENERATED_COSMOSLIKEVOTEOPTION_HPP 6 | 7 | #include 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | enum class CosmosLikeVoteOption : int { 21 | COSMOSVOTEYES, 22 | COSMOSVOTENO, 23 | COSMOSVOTENOWITHVETO, 24 | COSMOSVOTEABSTAIN, 25 | }; 26 | LIBCORE_EXPORT std::string to_string(const CosmosLikeVoteOption& cosmosLikeVoteOption); 27 | LIBCORE_EXPORT std::ostream &operator<<(std::ostream &os, const CosmosLikeVoteOption &o); 28 | 29 | } } } // namespace ledger::core::api 30 | 31 | namespace std { 32 | 33 | template <> 34 | struct hash<::ledger::core::api::CosmosLikeVoteOption> { 35 | size_t operator()(::ledger::core::api::CosmosLikeVoteOption type) const { 36 | return std::hash()(static_cast(type)); 37 | } 38 | }; 39 | 40 | } // namespace std 41 | #endif //DJINNI_GENERATED_COSMOSLIKEVOTEOPTION_HPP 42 | -------------------------------------------------------------------------------- /include/CosmosLikeWallet.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_COSMOSLIKEWALLET_HPP 5 | #define DJINNI_GENERATED_COSMOSLIKEWALLET_HPP 6 | #ifndef LIBCORE_EXPORT 7 | #if defined(_MSC_VER) 8 | #include 9 | #else 10 | #define LIBCORE_EXPORT 11 | #endif 12 | #endif 13 | 14 | namespace ledger { namespace core { namespace api { 15 | 16 | /** A cosmos-like wallet. */ 17 | class LIBCORE_EXPORT CosmosLikeWallet { 18 | public: 19 | virtual ~CosmosLikeWallet() {} 20 | }; 21 | 22 | } } } // namespace ledger::core::api 23 | #endif //DJINNI_GENERATED_COSMOSLIKEWALLET_HPP 24 | -------------------------------------------------------------------------------- /include/CurrencyCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_CURRENCYCALLBACK_HPP 5 | #define DJINNI_GENERATED_CURRENCYCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | struct Currency; 19 | struct Error; 20 | 21 | /** Callback triggered by main completed task, returning optional result of template type T. */ 22 | class CurrencyCallback { 23 | public: 24 | virtual ~CurrencyCallback() {} 25 | 26 | /** 27 | * Method triggered when main task complete. 28 | * @params result optional of type T, non null if main task failed 29 | * @params error optional of type Error, non null if main task succeeded 30 | */ 31 | virtual void onCallback(const std::experimental::optional & result, const std::experimental::optional & error) = 0; 32 | }; 33 | 34 | } } } // namespace ledger::core::api 35 | #endif //DJINNI_GENERATED_CURRENCYCALLBACK_HPP 36 | -------------------------------------------------------------------------------- /include/CurrencyListCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_CURRENCYLISTCALLBACK_HPP 5 | #define DJINNI_GENERATED_CURRENCYLISTCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #include 9 | #ifndef LIBCORE_EXPORT 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #define LIBCORE_EXPORT 14 | #endif 15 | #endif 16 | 17 | namespace ledger { namespace core { namespace api { 18 | 19 | struct Currency; 20 | struct Error; 21 | 22 | /** Callback triggered by main completed task, returning optional result as list of template type T. */ 23 | class CurrencyListCallback { 24 | public: 25 | virtual ~CurrencyListCallback() {} 26 | 27 | /** 28 | * Method triggered when main task complete. 29 | * @params result optional of type list, non null if main task failed 30 | * @params error optional of type Error, non null if main task succeeded 31 | */ 32 | virtual void onCallback(const std::experimental::optional> & result, const std::experimental::optional & error) = 0; 33 | }; 34 | 35 | } } } // namespace ledger::core::api 36 | #endif //DJINNI_GENERATED_CURRENCYLISTCALLBACK_HPP 37 | -------------------------------------------------------------------------------- /include/DatabaseBackendType.cpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from database.djinni 3 | 4 | #include "DatabaseBackendType.hpp" // my header 5 | #include "enum_from_string.hpp" 6 | 7 | namespace ledger { namespace core { namespace api { 8 | 9 | std::string to_string(const DatabaseBackendType& databaseBackendType) { 10 | switch (databaseBackendType) { 11 | case DatabaseBackendType::SQLITE3: return "SQLITE3"; 12 | case DatabaseBackendType::POSTGRESQL: return "POSTGRESQL"; 13 | default: return "UNKNOWN"; 14 | }; 15 | }; 16 | template <> 17 | DatabaseBackendType from_string(const std::string& databaseBackendType) { 18 | if (databaseBackendType == "SQLITE3") return DatabaseBackendType::SQLITE3; 19 | else return DatabaseBackendType::POSTGRESQL; 20 | }; 21 | 22 | std::ostream &operator<<(std::ostream &os, const DatabaseBackendType &o) 23 | { 24 | switch (o) { 25 | case DatabaseBackendType::SQLITE3: return os << "SQLITE3"; 26 | case DatabaseBackendType::POSTGRESQL: return os << "POSTGRESQL"; 27 | } 28 | } 29 | 30 | } } } // namespace ledger::core::api 31 | -------------------------------------------------------------------------------- /include/DatabaseBackendType.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from database.djinni 3 | 4 | #ifndef DJINNI_GENERATED_DATABASEBACKENDTYPE_HPP 5 | #define DJINNI_GENERATED_DATABASEBACKENDTYPE_HPP 6 | 7 | #include 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | enum class DatabaseBackendType : int { 21 | SQLITE3, 22 | POSTGRESQL, 23 | }; 24 | LIBCORE_EXPORT std::string to_string(const DatabaseBackendType& databaseBackendType); 25 | LIBCORE_EXPORT std::ostream &operator<<(std::ostream &os, const DatabaseBackendType &o); 26 | 27 | } } } // namespace ledger::core::api 28 | 29 | namespace std { 30 | 31 | template <> 32 | struct hash<::ledger::core::api::DatabaseBackendType> { 33 | size_t operator()(::ledger::core::api::DatabaseBackendType type) const { 34 | return std::hash()(static_cast(type)); 35 | } 36 | }; 37 | 38 | } // namespace std 39 | #endif //DJINNI_GENERATED_DATABASEBACKENDTYPE_HPP 40 | -------------------------------------------------------------------------------- /include/DatabaseColumn.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from database.djinni 3 | 4 | #ifndef DJINNI_GENERATED_DATABASECOLUMN_HPP 5 | #define DJINNI_GENERATED_DATABASECOLUMN_HPP 6 | 7 | #include 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | enum class DatabaseValueType; 19 | 20 | /** An object holding metadata information about a single SQL column (type, name...). */ 21 | class DatabaseColumn { 22 | public: 23 | virtual ~DatabaseColumn() {} 24 | 25 | /** 26 | * Get the type of the underlying SQL value. 27 | * @return The type of th 28 | */ 29 | virtual DatabaseValueType getType() = 0; 30 | 31 | virtual std::string getName() = 0; 32 | }; 33 | 34 | } } } // namespace ledger::core::api 35 | #endif //DJINNI_GENERATED_DATABASECOLUMN_HPP 36 | -------------------------------------------------------------------------------- /include/DatabaseConnectionPool.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from database.djinni 3 | 4 | #ifndef DJINNI_GENERATED_DATABASECONNECTIONPOOL_HPP 5 | #define DJINNI_GENERATED_DATABASECONNECTIONPOOL_HPP 6 | 7 | #include 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | class DatabaseConnection; 19 | 20 | /** A pool of connections to a single database. */ 21 | class DatabaseConnectionPool { 22 | public: 23 | virtual ~DatabaseConnectionPool() {} 24 | 25 | /** 26 | * Get a connection to the database. This method won't be called more than the engine pool size return 27 | * by DatabaseEngine::getPoolSize. 28 | * @return A connection to the database 29 | */ 30 | virtual std::shared_ptr getConnection() = 0; 31 | }; 32 | 33 | } } } // namespace ledger::core::api 34 | #endif //DJINNI_GENERATED_DATABASECONNECTIONPOOL_HPP 35 | -------------------------------------------------------------------------------- /include/DatabaseError.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from database.djinni 3 | 4 | #ifndef DJINNI_GENERATED_DATABASEERROR_HPP 5 | #define DJINNI_GENERATED_DATABASEERROR_HPP 6 | 7 | #include 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | /** Wrapper class around errors. */ 19 | class DatabaseError { 20 | public: 21 | virtual ~DatabaseError() {} 22 | 23 | /** 24 | * Get a human readable error message. 25 | * @return The error message. 26 | */ 27 | virtual std::string getMessage() = 0; 28 | }; 29 | 30 | } } } // namespace ledger::core::api 31 | #endif //DJINNI_GENERATED_DATABASEERROR_HPP 32 | -------------------------------------------------------------------------------- /include/DatabaseValueType.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from database.djinni 3 | 4 | #ifndef DJINNI_GENERATED_DATABASEVALUETYPE_HPP 5 | #define DJINNI_GENERATED_DATABASEVALUETYPE_HPP 6 | 7 | #include 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | enum class DatabaseValueType : int { 21 | STRING, 22 | DATE, 23 | DOUBLE, 24 | INTEGER, 25 | LONG_LONG, 26 | UNSIGNED_LONG_LONG, 27 | BLOB, 28 | }; 29 | LIBCORE_EXPORT std::string to_string(const DatabaseValueType& databaseValueType); 30 | LIBCORE_EXPORT std::ostream &operator<<(std::ostream &os, const DatabaseValueType &o); 31 | 32 | } } } // namespace ledger::core::api 33 | 34 | namespace std { 35 | 36 | template <> 37 | struct hash<::ledger::core::api::DatabaseValueType> { 38 | size_t operator()(::ledger::core::api::DatabaseValueType type) const { 39 | return std::hash()(static_cast(type)); 40 | } 41 | }; 42 | 43 | } // namespace std 44 | #endif //DJINNI_GENERATED_DATABASEVALUETYPE_HPP 45 | -------------------------------------------------------------------------------- /include/DurationMetrics.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from core.djinni 3 | 4 | #ifndef DJINNI_GENERATED_DURATIONMETRICS_HPP 5 | #define DJINNI_GENERATED_DURATIONMETRICS_HPP 6 | 7 | #include 8 | #include 9 | #ifndef LIBCORE_EXPORT 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #define LIBCORE_EXPORT 14 | #endif 15 | #endif 16 | 17 | namespace ledger { namespace core { namespace api { 18 | 19 | struct DurationMetric; 20 | 21 | class LIBCORE_EXPORT DurationMetrics { 22 | public: 23 | virtual ~DurationMetrics() {} 24 | 25 | /** Get all duration metrics */ 26 | static std::unordered_map getAllDurationMetrics(); 27 | }; 28 | 29 | } } } // namespace ledger::core::api 30 | #endif //DJINNI_GENERATED_DURATIONMETRICS_HPP 31 | -------------------------------------------------------------------------------- /include/ERC20LikeAccount.cpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from erc20.djinni 3 | 4 | #include "ERC20LikeAccount.hpp" // my header 5 | #include "ERC20Token.hpp" 6 | #include "TimePeriod.hpp" 7 | 8 | namespace ledger { namespace core { namespace api { 9 | 10 | std::string const ERC20LikeAccount::EV_NEW_OP_ERC20_ACCOUNT_UID = {"EV_NEW_OP_ERC20_ACCOUNT_UID"}; 11 | 12 | } } } // namespace ledger::core::api 13 | -------------------------------------------------------------------------------- /include/ERC20LikeOperationCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_ERC20LIKEOPERATIONCALLBACK_HPP 5 | #define DJINNI_GENERATED_ERC20LIKEOPERATIONCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #include 9 | #ifndef LIBCORE_EXPORT 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #define LIBCORE_EXPORT 14 | #endif 15 | #endif 16 | 17 | namespace ledger { namespace core { namespace api { 18 | 19 | class ERC20LikeOperation; 20 | struct Error; 21 | 22 | /** Callback triggered by main completed task, returning optional result of template type T. */ 23 | class ERC20LikeOperationCallback { 24 | public: 25 | virtual ~ERC20LikeOperationCallback() {} 26 | 27 | /** 28 | * Method triggered when main task complete. 29 | * @params result optional of type T, non null if main task failed 30 | * @params error optional of type Error, non null if main task succeeded 31 | */ 32 | virtual void onCallback(const std::shared_ptr & result, const std::experimental::optional & error) = 0; 33 | }; 34 | 35 | } } } // namespace ledger::core::api 36 | #endif //DJINNI_GENERATED_ERC20LIKEOPERATIONCALLBACK_HPP 37 | -------------------------------------------------------------------------------- /include/ERC20LikeOperationListCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_ERC20LIKEOPERATIONLISTCALLBACK_HPP 5 | #define DJINNI_GENERATED_ERC20LIKEOPERATIONLISTCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | class ERC20LikeOperation; 21 | struct Error; 22 | 23 | /** Callback triggered by main completed task, returning optional result as list of template type T. */ 24 | class ERC20LikeOperationListCallback { 25 | public: 26 | virtual ~ERC20LikeOperationListCallback() {} 27 | 28 | /** 29 | * Method triggered when main task complete. 30 | * @params result optional of type list, non null if main task failed 31 | * @params error optional of type Error, non null if main task succeeded 32 | */ 33 | virtual void onCallback(const std::experimental::optional>> & result, const std::experimental::optional & error) = 0; 34 | }; 35 | 36 | } } } // namespace ledger::core::api 37 | #endif //DJINNI_GENERATED_ERC20LIKEOPERATIONLISTCALLBACK_HPP 38 | -------------------------------------------------------------------------------- /include/Error.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from errors.djinni 3 | 4 | #ifndef DJINNI_GENERATED_ERROR_HPP 5 | #define DJINNI_GENERATED_ERROR_HPP 6 | 7 | #include "ErrorCode.hpp" 8 | #include 9 | #include 10 | #include 11 | 12 | namespace ledger { namespace core { namespace api { 13 | 14 | struct Error final { 15 | ErrorCode code; 16 | std::string message; 17 | 18 | Error(ErrorCode code_, 19 | std::string message_) 20 | : code(std::move(code_)) 21 | , message(std::move(message_)) 22 | {} 23 | 24 | Error(const Error& cpy) { 25 | this->code = cpy.code; 26 | this->message = cpy.message; 27 | } 28 | 29 | Error() = default; 30 | 31 | 32 | Error& operator=(const Error& cpy) { 33 | this->code = cpy.code; 34 | this->message = cpy.message; 35 | return *this; 36 | } 37 | 38 | template 39 | void load(Archive& archive) { 40 | archive(code, message); 41 | } 42 | 43 | template 44 | void save(Archive& archive) const { 45 | archive(code, message); 46 | } 47 | }; 48 | 49 | } } } // namespace ledger::core::api 50 | #endif //DJINNI_GENERATED_ERROR_HPP 51 | -------------------------------------------------------------------------------- /include/ErrorCodeCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_ERRORCODECALLBACK_HPP 5 | #define DJINNI_GENERATED_ERRORCODECALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | enum class ErrorCode; 19 | struct Error; 20 | 21 | /** Callback triggered by main completed task, returning optional result of template type T. */ 22 | class ErrorCodeCallback { 23 | public: 24 | virtual ~ErrorCodeCallback() {} 25 | 26 | /** 27 | * Method triggered when main task complete. 28 | * @params result optional of type T, non null if main task failed 29 | * @params error optional of type Error, non null if main task succeeded 30 | */ 31 | virtual void onCallback(std::experimental::optional result, const std::experimental::optional & error) = 0; 32 | }; 33 | 34 | } } } // namespace ledger::core::api 35 | #endif //DJINNI_GENERATED_ERRORCODECALLBACK_HPP 36 | -------------------------------------------------------------------------------- /include/EthereumLikeBlock.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from ethereum_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_ETHEREUMLIKEBLOCK_HPP 5 | #define DJINNI_GENERATED_ETHEREUMLIKEBLOCK_HPP 6 | 7 | #include 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | /** Class representing Ethereum block. */ 21 | class LIBCORE_EXPORT EthereumLikeBlock { 22 | public: 23 | virtual ~EthereumLikeBlock() {} 24 | 25 | /** 26 | * Hash of block. 27 | * @return string representing hash of this block 28 | */ 29 | virtual std::string getHash() = 0; 30 | 31 | /** 32 | * Height of block in blockchain. 33 | * @return 64 bits integer, height of block 34 | */ 35 | virtual int64_t getHeight() = 0; 36 | 37 | /** 38 | * Timestamp when block was mined. 39 | * @return Date object, date when block was appended to blockchain 40 | */ 41 | virtual std::chrono::system_clock::time_point getTime() = 0; 42 | }; 43 | 44 | } } } // namespace ledger::core::api 45 | #endif //DJINNI_GENERATED_ETHEREUMLIKEBLOCK_HPP 46 | -------------------------------------------------------------------------------- /include/EthereumLikeOperation.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from ethereum_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_ETHEREUMLIKEOPERATION_HPP 5 | #define DJINNI_GENERATED_ETHEREUMLIKEOPERATION_HPP 6 | 7 | #include 8 | #include 9 | #ifndef LIBCORE_EXPORT 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #define LIBCORE_EXPORT 14 | #endif 15 | #endif 16 | 17 | namespace ledger { namespace core { namespace api { 18 | 19 | class EthereumLikeTransaction; 20 | class InternalTransaction; 21 | 22 | /** Class representing a Ethereum Operation. */ 23 | class LIBCORE_EXPORT EthereumLikeOperation { 24 | public: 25 | virtual ~EthereumLikeOperation() {} 26 | 27 | /** 28 | * Get operation's transaction. 29 | * @return EthereumLikeTransaction object 30 | */ 31 | virtual std::shared_ptr getTransaction() = 0; 32 | 33 | /** Get all actions triggered by this transaction */ 34 | virtual std::vector> getInternalTransactions() = 0; 35 | }; 36 | 37 | } } } // namespace ledger::core::api 38 | #endif //DJINNI_GENERATED_ETHEREUMLIKEOPERATION_HPP 39 | -------------------------------------------------------------------------------- /include/EthereumLikeTransactionCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_ETHEREUMLIKETRANSACTIONCALLBACK_HPP 5 | #define DJINNI_GENERATED_ETHEREUMLIKETRANSACTIONCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #include 9 | #ifndef LIBCORE_EXPORT 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #define LIBCORE_EXPORT 14 | #endif 15 | #endif 16 | 17 | namespace ledger { namespace core { namespace api { 18 | 19 | class EthereumLikeTransaction; 20 | struct Error; 21 | 22 | /** Callback triggered by main completed task, returning optional result of template type T. */ 23 | class EthereumLikeTransactionCallback { 24 | public: 25 | virtual ~EthereumLikeTransactionCallback() {} 26 | 27 | /** 28 | * Method triggered when main task complete. 29 | * @params result optional of type T, non null if main task failed 30 | * @params error optional of type Error, non null if main task succeeded 31 | */ 32 | virtual void onCallback(const std::shared_ptr & result, const std::experimental::optional & error) = 0; 33 | }; 34 | 35 | } } } // namespace ledger::core::api 36 | #endif //DJINNI_GENERATED_ETHEREUMLIKETRANSACTIONCALLBACK_HPP 37 | -------------------------------------------------------------------------------- /include/EthereumLikeWallet.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from ethereum_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_ETHEREUMLIKEWALLET_HPP 5 | #define DJINNI_GENERATED_ETHEREUMLIKEWALLET_HPP 6 | #ifndef LIBCORE_EXPORT 7 | #if defined(_MSC_VER) 8 | #include 9 | #else 10 | #define LIBCORE_EXPORT 11 | #endif 12 | #endif 13 | 14 | namespace ledger { namespace core { namespace api { 15 | 16 | /** An Ethereum-like wallet. */ 17 | class LIBCORE_EXPORT EthereumLikeWallet { 18 | public: 19 | virtual ~EthereumLikeWallet() {} 20 | }; 21 | 22 | } } } // namespace ledger::core::api 23 | #endif //DJINNI_GENERATED_ETHEREUMLIKEWALLET_HPP 24 | -------------------------------------------------------------------------------- /include/EthereumPublicKeyProvider.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from ethereum_public_key_provider.djinni 3 | 4 | #ifndef DJINNI_GENERATED_ETHEREUMPUBLICKEYPROVIDER_HPP 5 | #define DJINNI_GENERATED_ETHEREUMPUBLICKEYPROVIDER_HPP 6 | #ifndef LIBCORE_EXPORT 7 | #if defined(_MSC_VER) 8 | #include 9 | #else 10 | #define LIBCORE_EXPORT 11 | #endif 12 | #endif 13 | 14 | namespace ledger { namespace core { namespace api { 15 | 16 | class EthereumPublicKeyProvider { 17 | public: 18 | virtual ~EthereumPublicKeyProvider() {} 19 | }; 20 | 21 | } } } // namespace ledger::core::api 22 | #endif //DJINNI_GENERATED_ETHEREUMPUBLICKEYPROVIDER_HPP 23 | -------------------------------------------------------------------------------- /include/EventReceiver.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from emitter.djinni 3 | 4 | #ifndef DJINNI_GENERATED_EVENTRECEIVER_HPP 5 | #define DJINNI_GENERATED_EVENTRECEIVER_HPP 6 | 7 | #include 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | class Event; 19 | 20 | /** Class respresenting an event receiver. */ 21 | class EventReceiver { 22 | public: 23 | virtual ~EventReceiver() {} 24 | 25 | /** 26 | * Method triggered when an event occurs. 27 | * @param event, Event object that triggers this method 28 | */ 29 | virtual void onEvent(const std::shared_ptr & event) = 0; 30 | }; 31 | 32 | } } } // namespace ledger::core::api 33 | #endif //DJINNI_GENERATED_EVENTRECEIVER_HPP 34 | -------------------------------------------------------------------------------- /include/ExecutionContext.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from thread_dispatcher.djinni 3 | 4 | #ifndef DJINNI_GENERATED_EXECUTIONCONTEXT_HPP 5 | #define DJINNI_GENERATED_EXECUTIONCONTEXT_HPP 6 | 7 | #include 8 | #include 9 | #ifndef LIBCORE_EXPORT 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #define LIBCORE_EXPORT 14 | #endif 15 | #endif 16 | 17 | namespace ledger { namespace core { namespace api { 18 | 19 | class Runnable; 20 | 21 | /**Class representing context in which tasks get executed */ 22 | class ExecutionContext { 23 | public: 24 | virtual ~ExecutionContext() {} 25 | 26 | /** 27 | *Execute a given runnable 28 | *@param runnalbe, Runnable object 29 | */ 30 | virtual void execute(const std::shared_ptr & runnable) = 0; 31 | 32 | /** 33 | *Execute a given runnable with a delay 34 | *@param runnalbe, Runnable object 35 | *@param millis, 64 bits integer, delay in milli-seconds 36 | */ 37 | virtual void delay(const std::shared_ptr & runnable, int64_t millis) = 0; 38 | }; 39 | 40 | } } } // namespace ledger::core::api 41 | #endif //DJINNI_GENERATED_EXECUTIONCONTEXT_HPP 42 | -------------------------------------------------------------------------------- /include/ExtendedKeyAccountCreationInfoCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_EXTENDEDKEYACCOUNTCREATIONINFOCALLBACK_HPP 5 | #define DJINNI_GENERATED_EXTENDEDKEYACCOUNTCREATIONINFOCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | struct Error; 19 | struct ExtendedKeyAccountCreationInfo; 20 | 21 | /** Callback triggered by main completed task, returning optional result of template type T. */ 22 | class ExtendedKeyAccountCreationInfoCallback { 23 | public: 24 | virtual ~ExtendedKeyAccountCreationInfoCallback() {} 25 | 26 | /** 27 | * Method triggered when main task complete. 28 | * @params result optional of type T, non null if main task failed 29 | * @params error optional of type Error, non null if main task succeeded 30 | */ 31 | virtual void onCallback(const std::experimental::optional & result, const std::experimental::optional & error) = 0; 32 | }; 33 | 34 | } } } // namespace ledger::core::api 35 | #endif //DJINNI_GENERATED_EXTENDEDKEYACCOUNTCREATIONINFOCALLBACK_HPP 36 | -------------------------------------------------------------------------------- /include/GetEthreumLikeWalletCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from ethereum_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_GETETHREUMLIKEWALLETCALLBACK_HPP 5 | #define DJINNI_GENERATED_GETETHREUMLIKEWALLETCALLBACK_HPP 6 | 7 | #include 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | class EthereumLikeWallet; 19 | struct Error; 20 | 21 | /** A callback called when an Ethereum-like wallet is available after issuing a get command. */ 22 | class GetEthreumLikeWalletCallback { 23 | public: 24 | virtual ~GetEthreumLikeWalletCallback() {} 25 | 26 | virtual void onSuccess(const std::shared_ptr & wallet, bool isCreated) = 0; 27 | 28 | virtual void onError(const Error & error) = 0; 29 | }; 30 | 31 | } } } // namespace ledger::core::api 32 | #endif //DJINNI_GENERATED_GETETHREUMLIKEWALLETCALLBACK_HPP 33 | -------------------------------------------------------------------------------- /include/HttpClient.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from http_client.djinni 3 | 4 | #ifndef DJINNI_GENERATED_HTTPCLIENT_HPP 5 | #define DJINNI_GENERATED_HTTPCLIENT_HPP 6 | 7 | #include 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | class HttpRequest; 19 | 20 | /** Class representing the http client performing the http requests. */ 21 | class HttpClient { 22 | public: 23 | virtual ~HttpClient() {} 24 | 25 | /** 26 | * Execute a giver Http request. 27 | * @param request, HttpRequest object, requestr to execute 28 | */ 29 | virtual void execute(const std::shared_ptr & request) = 0; 30 | }; 31 | 32 | } } } // namespace ledger::core::api 33 | #endif //DJINNI_GENERATED_HTTPCLIENT_HPP 34 | -------------------------------------------------------------------------------- /include/HttpMethod.cpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from http_client.djinni 3 | 4 | #include "HttpMethod.hpp" // my header 5 | #include "enum_from_string.hpp" 6 | 7 | namespace ledger { namespace core { namespace api { 8 | 9 | std::string to_string(const HttpMethod& httpMethod) { 10 | switch (httpMethod) { 11 | case HttpMethod::GET: return "GET"; 12 | case HttpMethod::POST: return "POST"; 13 | case HttpMethod::PUT: return "PUT"; 14 | case HttpMethod::DEL: return "DEL"; 15 | default: return "UNKNOWN"; 16 | }; 17 | }; 18 | template <> 19 | HttpMethod from_string(const std::string& httpMethod) { 20 | if (httpMethod == "GET") return HttpMethod::GET; 21 | else if (httpMethod == "POST") return HttpMethod::POST; 22 | else if (httpMethod == "PUT") return HttpMethod::PUT; 23 | else return HttpMethod::DEL; 24 | }; 25 | 26 | std::ostream &operator<<(std::ostream &os, const HttpMethod &o) 27 | { 28 | switch (o) { 29 | case HttpMethod::GET: return os << "GET"; 30 | case HttpMethod::POST: return os << "POST"; 31 | case HttpMethod::PUT: return os << "PUT"; 32 | case HttpMethod::DEL: return os << "DEL"; 33 | } 34 | } 35 | 36 | } } } // namespace ledger::core::api 37 | -------------------------------------------------------------------------------- /include/HttpMethod.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from http_client.djinni 3 | 4 | #ifndef DJINNI_GENERATED_HTTPMETHOD_HPP 5 | #define DJINNI_GENERATED_HTTPMETHOD_HPP 6 | 7 | #include 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | enum class HttpMethod : int { 21 | GET, 22 | POST, 23 | PUT, 24 | DEL, 25 | }; 26 | LIBCORE_EXPORT std::string to_string(const HttpMethod& httpMethod); 27 | LIBCORE_EXPORT std::ostream &operator<<(std::ostream &os, const HttpMethod &o); 28 | 29 | } } } // namespace ledger::core::api 30 | 31 | namespace std { 32 | 33 | template <> 34 | struct hash<::ledger::core::api::HttpMethod> { 35 | size_t operator()(::ledger::core::api::HttpMethod type) const { 36 | return std::hash()(static_cast(type)); 37 | } 38 | }; 39 | 40 | } // namespace std 41 | #endif //DJINNI_GENERATED_HTTPMETHOD_HPP 42 | -------------------------------------------------------------------------------- /include/I32Callback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_I32CALLBACK_HPP 5 | #define DJINNI_GENERATED_I32CALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #include 9 | #ifndef LIBCORE_EXPORT 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #define LIBCORE_EXPORT 14 | #endif 15 | #endif 16 | 17 | namespace ledger { namespace core { namespace api { 18 | 19 | struct Error; 20 | 21 | /** Callback triggered by main completed task, returning optional result of template type T. */ 22 | class I32Callback { 23 | public: 24 | virtual ~I32Callback() {} 25 | 26 | /** 27 | * Method triggered when main task complete. 28 | * @params result optional of type T, non null if main task failed 29 | * @params error optional of type Error, non null if main task succeeded 30 | */ 31 | virtual void onCallback(std::experimental::optional result, const std::experimental::optional & error) = 0; 32 | }; 33 | 34 | } } } // namespace ledger::core::api 35 | #endif //DJINNI_GENERATED_I32CALLBACK_HPP 36 | -------------------------------------------------------------------------------- /include/Keychain.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_KEYCHAIN_HPP 5 | #define DJINNI_GENERATED_KEYCHAIN_HPP 6 | 7 | #include 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | /** 19 | * Keychain abstraction. 20 | * 21 | * A keychain can be seen as an address database that can be queried to get lists of addresses, 22 | * ask whether an address is contained, or generate new addresses. 23 | */ 24 | class LIBCORE_EXPORT Keychain { 25 | public: 26 | virtual ~Keychain() {} 27 | 28 | /** Check whether an address is contained. */ 29 | virtual bool contains(const std::string & address) const = 0; 30 | }; 31 | 32 | } } } // namespace ledger::core::api 33 | #endif //DJINNI_GENERATED_KEYCHAIN_HPP 34 | -------------------------------------------------------------------------------- /include/KeychainEngines.cpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from configuration.djinni 3 | 4 | #include "KeychainEngines.hpp" // my header 5 | 6 | namespace ledger { namespace core { namespace api { 7 | 8 | std::string const KeychainEngines::BIP32_P2PKH = {"BIP32_P2PKH"}; 9 | 10 | std::string const KeychainEngines::BIP49_P2SH = {"BIP49_P2SH"}; 11 | 12 | std::string const KeychainEngines::BIP173_P2WPKH = {"BIP173_P2WPKH"}; 13 | 14 | std::string const KeychainEngines::BIP173_P2WSH = {"BIP173_P2WSH"}; 15 | 16 | } } } // namespace ledger::core::api 17 | -------------------------------------------------------------------------------- /include/KeychainEngines.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from configuration.djinni 3 | 4 | #ifndef DJINNI_GENERATED_KEYCHAINENGINES_HPP 5 | #define DJINNI_GENERATED_KEYCHAINENGINES_HPP 6 | 7 | #include 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | /** Available keychains policies. */ 19 | class LIBCORE_EXPORT KeychainEngines { 20 | public: 21 | virtual ~KeychainEngines() {} 22 | 23 | static std::string const BIP32_P2PKH; 24 | 25 | static std::string const BIP49_P2SH; 26 | 27 | static std::string const BIP173_P2WPKH; 28 | 29 | static std::string const BIP173_P2WSH; 30 | }; 31 | 32 | } } } // namespace ledger::core::api 33 | #endif //DJINNI_GENERATED_KEYCHAINENGINES_HPP 34 | -------------------------------------------------------------------------------- /include/LedgerCore.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from core.djinni 3 | 4 | #ifndef DJINNI_GENERATED_LEDGERCORE_HPP 5 | #define DJINNI_GENERATED_LEDGERCORE_HPP 6 | 7 | #include 8 | #include 9 | #ifndef LIBCORE_EXPORT 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #define LIBCORE_EXPORT 14 | #endif 15 | #endif 16 | 17 | namespace ledger { namespace core { namespace api { 18 | 19 | class LIBCORE_EXPORT LedgerCore { 20 | public: 21 | virtual ~LedgerCore() {} 22 | 23 | /** 24 | * Gets the version of the library as a human readable string. 25 | * @return The version of the library (e.g. '1.0.1') 26 | */ 27 | static std::string getStringVersion(); 28 | 29 | /** 30 | * Get the integer version of the Library 31 | * @return The integer version of the library 32 | */ 33 | static int32_t getIntVersion(); 34 | }; 35 | 36 | } } } // namespace ledger::core::api 37 | #endif //DJINNI_GENERATED_LEDGERCORE_HPP 38 | -------------------------------------------------------------------------------- /include/Lock.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from thread_dispatcher.djinni 3 | 4 | #ifndef DJINNI_GENERATED_LOCK_HPP 5 | #define DJINNI_GENERATED_LOCK_HPP 6 | #ifndef LIBCORE_EXPORT 7 | #if defined(_MSC_VER) 8 | #include 9 | #else 10 | #define LIBCORE_EXPORT 11 | #endif 12 | #endif 13 | 14 | namespace ledger { namespace core { namespace api { 15 | 16 | /**Class representing a lock, for thread safety purposes */ 17 | class Lock { 18 | public: 19 | virtual ~Lock() {} 20 | 21 | /** 22 | *Acquire lock by thread calling this method, 23 | *If Lock already acquired by another thread, execution of calling thread should be blocked 24 | *until the other thread call the unlock method 25 | */ 26 | virtual void lock() = 0; 27 | 28 | /** 29 | *Try to acquire lock 30 | *If Lock already aquired by another thread, method returns false for calling thread 31 | *without blocking its execution 32 | *@return bool, return true if Lock acquire by calling thread, false otherwise 33 | */ 34 | virtual bool tryLock() = 0; 35 | 36 | /**Release Lock ownership by calling thread */ 37 | virtual void unlock() = 0; 38 | }; 39 | 40 | } } } // namespace ledger::core::api 41 | #endif //DJINNI_GENERATED_LOCK_HPP 42 | -------------------------------------------------------------------------------- /include/OperationListCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_OPERATIONLISTCALLBACK_HPP 5 | #define DJINNI_GENERATED_OPERATIONLISTCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | class Operation; 21 | struct Error; 22 | 23 | /** Callback triggered by main completed task, returning optional result as list of template type T. */ 24 | class OperationListCallback { 25 | public: 26 | virtual ~OperationListCallback() {} 27 | 28 | /** 29 | * Method triggered when main task complete. 30 | * @params result optional of type list, non null if main task failed 31 | * @params error optional of type Error, non null if main task succeeded 32 | */ 33 | virtual void onCallback(const std::experimental::optional>> & result, const std::experimental::optional & error) = 0; 34 | }; 35 | 36 | } } } // namespace ledger::core::api 37 | #endif //DJINNI_GENERATED_OPERATIONLISTCALLBACK_HPP 38 | -------------------------------------------------------------------------------- /include/OperationOrderKey.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_OPERATIONORDERKEY_HPP 5 | #define DJINNI_GENERATED_OPERATIONORDERKEY_HPP 6 | 7 | #include 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | enum class OperationOrderKey : int { 21 | DATE, 22 | AMOUNT, 23 | SENDERS, 24 | RECIPIENTS, 25 | TYPE, 26 | CURRENCY_NAME, 27 | FEES, 28 | BLOCK_HEIGHT, 29 | }; 30 | LIBCORE_EXPORT std::string to_string(const OperationOrderKey& operationOrderKey); 31 | LIBCORE_EXPORT std::ostream &operator<<(std::ostream &os, const OperationOrderKey &o); 32 | 33 | } } } // namespace ledger::core::api 34 | 35 | namespace std { 36 | 37 | template <> 38 | struct hash<::ledger::core::api::OperationOrderKey> { 39 | size_t operator()(::ledger::core::api::OperationOrderKey type) const { 40 | return std::hash()(static_cast(type)); 41 | } 42 | }; 43 | 44 | } // namespace std 45 | #endif //DJINNI_GENERATED_OPERATIONORDERKEY_HPP 46 | -------------------------------------------------------------------------------- /include/OperationType.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_OPERATIONTYPE_HPP 5 | #define DJINNI_GENERATED_OPERATIONTYPE_HPP 6 | 7 | #include 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | enum class OperationType : int { 21 | SEND, 22 | RECEIVE, 23 | DELEGATE, 24 | UNDELEGATE, 25 | REWARDS, 26 | NONE, 27 | }; 28 | LIBCORE_EXPORT std::string to_string(const OperationType& operationType); 29 | LIBCORE_EXPORT std::ostream &operator<<(std::ostream &os, const OperationType &o); 30 | 31 | } } } // namespace ledger::core::api 32 | 33 | namespace std { 34 | 35 | template <> 36 | struct hash<::ledger::core::api::OperationType> { 37 | size_t operator()(::ledger::core::api::OperationType type) const { 38 | return std::hash()(static_cast(type)); 39 | } 40 | }; 41 | 42 | } // namespace std 43 | #endif //DJINNI_GENERATED_OPERATIONTYPE_HPP 44 | -------------------------------------------------------------------------------- /include/PoolConfiguration.cpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from configuration.djinni 3 | 4 | #include "PoolConfiguration.hpp" // my header 5 | 6 | namespace ledger { namespace core { namespace api { 7 | 8 | std::string const PoolConfiguration::DATABASE_NAME = {"DATABASE_NAME"}; 9 | 10 | std::string const PoolConfiguration::ENABLE_INTERNAL_LOGGING = {"ENABLE_INTERNAL_LOGGING"}; 11 | 12 | } } } // namespace ledger::core::api 13 | -------------------------------------------------------------------------------- /include/PoolConfiguration.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from configuration.djinni 3 | 4 | #ifndef DJINNI_GENERATED_POOLCONFIGURATION_HPP 5 | #define DJINNI_GENERATED_POOLCONFIGURATION_HPP 6 | 7 | #include 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | /** Configuration of wallet pools. */ 19 | class LIBCORE_EXPORT PoolConfiguration { 20 | public: 21 | virtual ~PoolConfiguration() {} 22 | 23 | /** Name to use for the database. */ 24 | static std::string const DATABASE_NAME; 25 | 26 | /** 27 | * Enable internal logging. 28 | * 29 | * Set to true by default. 30 | */ 31 | static std::string const ENABLE_INTERNAL_LOGGING; 32 | }; 33 | 34 | } } } // namespace ledger::core::api 35 | #endif //DJINNI_GENERATED_POOLCONFIGURATION_HPP 36 | -------------------------------------------------------------------------------- /include/PreferencesChangeType.cpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from preferences.djinni 3 | 4 | #include "PreferencesChangeType.hpp" // my header 5 | #include "enum_from_string.hpp" 6 | 7 | namespace ledger { namespace core { namespace api { 8 | 9 | std::string to_string(const PreferencesChangeType& preferencesChangeType) { 10 | switch (preferencesChangeType) { 11 | case PreferencesChangeType::PUT_TYPE: return "PUT_TYPE"; 12 | case PreferencesChangeType::DELETE_TYPE: return "DELETE_TYPE"; 13 | default: return "UNKNOWN"; 14 | }; 15 | }; 16 | template <> 17 | PreferencesChangeType from_string(const std::string& preferencesChangeType) { 18 | if (preferencesChangeType == "PUT_TYPE") return PreferencesChangeType::PUT_TYPE; 19 | else return PreferencesChangeType::DELETE_TYPE; 20 | }; 21 | 22 | std::ostream &operator<<(std::ostream &os, const PreferencesChangeType &o) 23 | { 24 | switch (o) { 25 | case PreferencesChangeType::PUT_TYPE: return os << "PUT_TYPE"; 26 | case PreferencesChangeType::DELETE_TYPE: return os << "DELETE_TYPE"; 27 | } 28 | } 29 | 30 | } } } // namespace ledger::core::api 31 | -------------------------------------------------------------------------------- /include/PreferencesChangeType.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from preferences.djinni 3 | 4 | #ifndef DJINNI_GENERATED_PREFERENCESCHANGETYPE_HPP 5 | #define DJINNI_GENERATED_PREFERENCESCHANGETYPE_HPP 6 | 7 | #include 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | enum class PreferencesChangeType : int { 21 | PUT_TYPE, 22 | DELETE_TYPE, 23 | }; 24 | LIBCORE_EXPORT std::string to_string(const PreferencesChangeType& preferencesChangeType); 25 | LIBCORE_EXPORT std::ostream &operator<<(std::ostream &os, const PreferencesChangeType &o); 26 | 27 | } } } // namespace ledger::core::api 28 | 29 | namespace std { 30 | 31 | template <> 32 | struct hash<::ledger::core::api::PreferencesChangeType> { 33 | size_t operator()(::ledger::core::api::PreferencesChangeType type) const { 34 | return std::hash()(static_cast(type)); 35 | } 36 | }; 37 | 38 | } // namespace std 39 | #endif //DJINNI_GENERATED_PREFERENCESCHANGETYPE_HPP 40 | -------------------------------------------------------------------------------- /include/RippleConfiguration.cpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from ripple_like_wallet.djinni 3 | 4 | #include "RippleConfiguration.hpp" // my header 5 | 6 | namespace ledger { namespace core { namespace api { 7 | 8 | std::string const RippleConfiguration::RIPPLE_LAST_LEDGER_SEQUENCE_OFFSET = {"RIPPLE_LAST_LEDGER_SEQUENCE_OFFSET"}; 9 | 10 | } } } // namespace ledger::core::api 11 | -------------------------------------------------------------------------------- /include/RippleConfiguration.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from ripple_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_RIPPLECONFIGURATION_HPP 5 | #define DJINNI_GENERATED_RIPPLECONFIGURATION_HPP 6 | 7 | #include 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | class LIBCORE_EXPORT RippleConfiguration { 19 | public: 20 | virtual ~RippleConfiguration() {} 21 | 22 | static std::string const RIPPLE_LAST_LEDGER_SEQUENCE_OFFSET; 23 | }; 24 | 25 | } } } // namespace ledger::core::api 26 | #endif //DJINNI_GENERATED_RIPPLECONFIGURATION_HPP 27 | -------------------------------------------------------------------------------- /include/RippleConfigurationDefaults.cpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from ripple_like_wallet.djinni 3 | 4 | #include "RippleConfigurationDefaults.hpp" // my header 5 | 6 | namespace ledger { namespace core { namespace api { 7 | 8 | std::string const RippleConfigurationDefaults::RIPPLE_DEFAULT_API_ENDPOINT = {"https://data.ripple.com"}; 9 | 10 | std::string const RippleConfigurationDefaults::RIPPLE_OBSERVER_NODE_ENDPOINT_S2 = {"https://s2.ripple.com"}; 11 | 12 | std::string const RippleConfigurationDefaults::RIPPLE_OBSERVER_NODE_ENDPOINT_S3 = {"https://s3.ripple.com"}; 13 | 14 | std::string const RippleConfigurationDefaults::RIPPLE_OBSERVER_WS_ENDPOINT_S2 = {"wss://s2.ripple.com"}; 15 | 16 | std::string const RippleConfigurationDefaults::RIPPLE_OBSERVER_WS_ENDPOINT_S3 = {"wss://s3.ripple.com"}; 17 | 18 | std::string const RippleConfigurationDefaults::RIPPLE_DEFAULT_PORT = {"51234"}; 19 | 20 | int32_t const RippleConfigurationDefaults::RIPPLE_DEFAULT_LAST_LEDGER_SEQUENCE_OFFSET = 4; 21 | 22 | } } } // namespace ledger::core::api 23 | -------------------------------------------------------------------------------- /include/RippleConfigurationDefaults.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from ripple_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_RIPPLECONFIGURATIONDEFAULTS_HPP 5 | #define DJINNI_GENERATED_RIPPLECONFIGURATIONDEFAULTS_HPP 6 | 7 | #include 8 | #include 9 | #ifndef LIBCORE_EXPORT 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #define LIBCORE_EXPORT 14 | #endif 15 | #endif 16 | 17 | namespace ledger { namespace core { namespace api { 18 | 19 | class LIBCORE_EXPORT RippleConfigurationDefaults { 20 | public: 21 | virtual ~RippleConfigurationDefaults() {} 22 | 23 | static std::string const RIPPLE_DEFAULT_API_ENDPOINT; 24 | 25 | static std::string const RIPPLE_OBSERVER_NODE_ENDPOINT_S2; 26 | 27 | static std::string const RIPPLE_OBSERVER_NODE_ENDPOINT_S3; 28 | 29 | static std::string const RIPPLE_OBSERVER_WS_ENDPOINT_S2; 30 | 31 | static std::string const RIPPLE_OBSERVER_WS_ENDPOINT_S3; 32 | 33 | static std::string const RIPPLE_DEFAULT_PORT; 34 | 35 | static int32_t const RIPPLE_DEFAULT_LAST_LEDGER_SEQUENCE_OFFSET; 36 | }; 37 | 38 | } } } // namespace ledger::core::api 39 | #endif //DJINNI_GENERATED_RIPPLECONFIGURATIONDEFAULTS_HPP 40 | -------------------------------------------------------------------------------- /include/RippleLikeBlock.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from ripple_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_RIPPLELIKEBLOCK_HPP 5 | #define DJINNI_GENERATED_RIPPLELIKEBLOCK_HPP 6 | 7 | #include 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | /**Class representing Ripple block */ 21 | class LIBCORE_EXPORT RippleLikeBlock { 22 | public: 23 | virtual ~RippleLikeBlock() {} 24 | 25 | /** 26 | *Hash of block 27 | *@return string representing hash of this block 28 | */ 29 | virtual std::string getHash() = 0; 30 | 31 | /** 32 | *Height of block in blockchain 33 | *@return 64 bits integer, height of block 34 | */ 35 | virtual int64_t getHeight() = 0; 36 | 37 | /** 38 | *Timestamp when block was mined 39 | *@return Date object, date when block was appended to blockchain 40 | */ 41 | virtual std::chrono::system_clock::time_point getTime() = 0; 42 | }; 43 | 44 | } } } // namespace ledger::core::api 45 | #endif //DJINNI_GENERATED_RIPPLELIKEBLOCK_HPP 46 | -------------------------------------------------------------------------------- /include/RippleLikeExtendedPublicKey.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from addresses.djinni 3 | 4 | #ifndef DJINNI_GENERATED_RIPPLELIKEEXTENDEDPUBLICKEY_HPP 5 | #define DJINNI_GENERATED_RIPPLELIKEEXTENDEDPUBLICKEY_HPP 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #ifndef LIBCORE_EXPORT 12 | #if defined(_MSC_VER) 13 | #include 14 | #else 15 | #define LIBCORE_EXPORT 16 | #endif 17 | #endif 18 | 19 | namespace ledger { namespace core { namespace api { 20 | 21 | class RippleLikeAddress; 22 | 23 | class LIBCORE_EXPORT RippleLikeExtendedPublicKey { 24 | public: 25 | virtual ~RippleLikeExtendedPublicKey() {} 26 | 27 | virtual std::shared_ptr derive(const std::string & path) = 0; 28 | 29 | virtual std::vector derivePublicKey(const std::string & path) = 0; 30 | 31 | virtual std::vector deriveHash160(const std::string & path) = 0; 32 | 33 | virtual std::string toBase58() = 0; 34 | 35 | virtual std::string getRootPath() = 0; 36 | }; 37 | 38 | } } } // namespace ledger::core::api 39 | #endif //DJINNI_GENERATED_RIPPLELIKEEXTENDEDPUBLICKEY_HPP 40 | -------------------------------------------------------------------------------- /include/RippleLikeOperation.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from ripple_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_RIPPLELIKEOPERATION_HPP 5 | #define DJINNI_GENERATED_RIPPLELIKEOPERATION_HPP 6 | 7 | #include 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | class RippleLikeTransaction; 19 | 20 | /**Class representing a Ripple Operation */ 21 | class LIBCORE_EXPORT RippleLikeOperation { 22 | public: 23 | virtual ~RippleLikeOperation() {} 24 | 25 | /** 26 | *Get operation's transaction 27 | *@return RippleLikeTransaction object 28 | */ 29 | virtual std::shared_ptr getTransaction() = 0; 30 | }; 31 | 32 | } } } // namespace ledger::core::api 33 | #endif //DJINNI_GENERATED_RIPPLELIKEOPERATION_HPP 34 | -------------------------------------------------------------------------------- /include/RippleLikeTransactionCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_RIPPLELIKETRANSACTIONCALLBACK_HPP 5 | #define DJINNI_GENERATED_RIPPLELIKETRANSACTIONCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #include 9 | #ifndef LIBCORE_EXPORT 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #define LIBCORE_EXPORT 14 | #endif 15 | #endif 16 | 17 | namespace ledger { namespace core { namespace api { 18 | 19 | class RippleLikeTransaction; 20 | struct Error; 21 | 22 | /** Callback triggered by main completed task, returning optional result of template type T. */ 23 | class RippleLikeTransactionCallback { 24 | public: 25 | virtual ~RippleLikeTransactionCallback() {} 26 | 27 | /** 28 | * Method triggered when main task complete. 29 | * @params result optional of type T, non null if main task failed 30 | * @params error optional of type Error, non null if main task succeeded 31 | */ 32 | virtual void onCallback(const std::shared_ptr & result, const std::experimental::optional & error) = 0; 33 | }; 34 | 35 | } } } // namespace ledger::core::api 36 | #endif //DJINNI_GENERATED_RIPPLELIKETRANSACTIONCALLBACK_HPP 37 | -------------------------------------------------------------------------------- /include/Runnable.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from thread_dispatcher.djinni 3 | 4 | #ifndef DJINNI_GENERATED_RUNNABLE_HPP 5 | #define DJINNI_GENERATED_RUNNABLE_HPP 6 | #ifndef LIBCORE_EXPORT 7 | #if defined(_MSC_VER) 8 | #include 9 | #else 10 | #define LIBCORE_EXPORT 11 | #endif 12 | #endif 13 | 14 | namespace ledger { namespace core { namespace api { 15 | 16 | /** 17 | *Class representing a runnable object 18 | *A runnable, needs a specific execution context (refer to ExecutionContext) to run 19 | */ 20 | class LIBCORE_EXPORT Runnable { 21 | public: 22 | virtual ~Runnable() {} 23 | 24 | /**Trigger runnable execution */ 25 | virtual void run() = 0; 26 | }; 27 | 28 | } } } // namespace ledger::core::api 29 | #endif //DJINNI_GENERATED_RUNNABLE_HPP 30 | -------------------------------------------------------------------------------- /include/StellarConfiguration.cpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from configuration.djinni 3 | 4 | #include "StellarConfiguration.hpp" // my header 5 | 6 | namespace ledger { namespace core { namespace api { 7 | 8 | std::string const StellarConfiguration::HORIZON_EXPLORER_ENGINE = {"HORIZON_EXPLORER_ENGINE"}; 9 | 10 | std::string const StellarConfiguration::HORIZON_MAINNET_BLOCKCHAIN_EXPLORER_URL = {"https://stellar.coin.ledger.com"}; 11 | 12 | std::string const StellarConfiguration::HORIZON_TESTNET_BLOCKCHAIN_EXPLORER_URL = {"https://horizon-testnet.stellar.org"}; 13 | 14 | } } } // namespace ledger::core::api 15 | -------------------------------------------------------------------------------- /include/StellarConfiguration.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from configuration.djinni 3 | 4 | #ifndef DJINNI_GENERATED_STELLARCONFIGURATION_HPP 5 | #define DJINNI_GENERATED_STELLARCONFIGURATION_HPP 6 | 7 | #include 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | /** Available API to use with Stellar wallets */ 19 | class LIBCORE_EXPORT StellarConfiguration { 20 | public: 21 | virtual ~StellarConfiguration() {} 22 | 23 | static std::string const HORIZON_EXPLORER_ENGINE; 24 | 25 | static std::string const HORIZON_MAINNET_BLOCKCHAIN_EXPLORER_URL; 26 | 27 | static std::string const HORIZON_TESTNET_BLOCKCHAIN_EXPLORER_URL; 28 | }; 29 | 30 | } } } // namespace ledger::core::api 31 | #endif //DJINNI_GENERATED_STELLARCONFIGURATION_HPP 32 | -------------------------------------------------------------------------------- /include/StellarLikeAddress.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from addresses.djinni 3 | 4 | #ifndef DJINNI_GENERATED_STELLARLIKEADDRESS_HPP 5 | #define DJINNI_GENERATED_STELLARLIKEADDRESS_HPP 6 | #ifndef LIBCORE_EXPORT 7 | #if defined(_MSC_VER) 8 | #include 9 | #else 10 | #define LIBCORE_EXPORT 11 | #endif 12 | #endif 13 | 14 | namespace ledger { namespace core { namespace api { 15 | 16 | class LIBCORE_EXPORT StellarLikeAddress { 17 | public: 18 | virtual ~StellarLikeAddress() {} 19 | }; 20 | 21 | } } } // namespace ledger::core::api 22 | #endif //DJINNI_GENERATED_STELLARLIKEADDRESS_HPP 23 | -------------------------------------------------------------------------------- /include/StellarLikeBlock.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from stellar_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_STELLARLIKEBLOCK_HPP 5 | #define DJINNI_GENERATED_STELLARLIKEBLOCK_HPP 6 | #ifndef LIBCORE_EXPORT 7 | #if defined(_MSC_VER) 8 | #include 9 | #else 10 | #define LIBCORE_EXPORT 11 | #endif 12 | #endif 13 | 14 | namespace ledger { namespace core { namespace api { 15 | 16 | class LIBCORE_EXPORT StellarLikeBlock { 17 | public: 18 | virtual ~StellarLikeBlock() {} 19 | }; 20 | 21 | } } } // namespace ledger::core::api 22 | #endif //DJINNI_GENERATED_STELLARLIKEBLOCK_HPP 23 | -------------------------------------------------------------------------------- /include/StellarLikeFeeStatsCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_STELLARLIKEFEESTATSCALLBACK_HPP 5 | #define DJINNI_GENERATED_STELLARLIKEFEESTATSCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | struct Error; 19 | struct StellarLikeFeeStats; 20 | 21 | /** Callback triggered by main completed task, returning optional result of template type T. */ 22 | class StellarLikeFeeStatsCallback { 23 | public: 24 | virtual ~StellarLikeFeeStatsCallback() {} 25 | 26 | /** 27 | * Method triggered when main task complete. 28 | * @params result optional of type T, non null if main task failed 29 | * @params error optional of type Error, non null if main task succeeded 30 | */ 31 | virtual void onCallback(const std::experimental::optional & result, const std::experimental::optional & error) = 0; 32 | }; 33 | 34 | } } } // namespace ledger::core::api 35 | #endif //DJINNI_GENERATED_STELLARLIKEFEESTATSCALLBACK_HPP 36 | -------------------------------------------------------------------------------- /include/StellarLikeMemoType.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from stellar_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_STELLARLIKEMEMOTYPE_HPP 5 | #define DJINNI_GENERATED_STELLARLIKEMEMOTYPE_HPP 6 | 7 | #include 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | enum class StellarLikeMemoType : int { 21 | MEMO_NONE, 22 | MEMO_TEXT, 23 | MEMO_ID, 24 | MEMO_HASH, 25 | MEMO_RETURN, 26 | }; 27 | LIBCORE_EXPORT std::string to_string(const StellarLikeMemoType& stellarLikeMemoType); 28 | LIBCORE_EXPORT std::ostream &operator<<(std::ostream &os, const StellarLikeMemoType &o); 29 | 30 | } } } // namespace ledger::core::api 31 | 32 | namespace std { 33 | 34 | template <> 35 | struct hash<::ledger::core::api::StellarLikeMemoType> { 36 | size_t operator()(::ledger::core::api::StellarLikeMemoType type) const { 37 | return std::hash()(static_cast(type)); 38 | } 39 | }; 40 | 41 | } // namespace std 42 | #endif //DJINNI_GENERATED_STELLARLIKEMEMOTYPE_HPP 43 | -------------------------------------------------------------------------------- /include/StellarLikeOperation.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from stellar_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_STELLARLIKEOPERATION_HPP 5 | #define DJINNI_GENERATED_STELLARLIKEOPERATION_HPP 6 | 7 | #include 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | class StellarLikeTransaction; 19 | struct StellarLikeOperationRecord; 20 | 21 | class LIBCORE_EXPORT StellarLikeOperation { 22 | public: 23 | virtual ~StellarLikeOperation() {} 24 | 25 | /** Get the underlying operation information */ 26 | virtual StellarLikeOperationRecord getRecord() = 0; 27 | 28 | /** Get the underlying transaction in which this operation can be found. */ 29 | virtual std::shared_ptr getTransaction() = 0; 30 | }; 31 | 32 | } } } // namespace ledger::core::api 33 | #endif //DJINNI_GENERATED_STELLARLIKEOPERATION_HPP 34 | -------------------------------------------------------------------------------- /include/StellarLikeTransactionCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_STELLARLIKETRANSACTIONCALLBACK_HPP 5 | #define DJINNI_GENERATED_STELLARLIKETRANSACTIONCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #include 9 | #ifndef LIBCORE_EXPORT 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #define LIBCORE_EXPORT 14 | #endif 15 | #endif 16 | 17 | namespace ledger { namespace core { namespace api { 18 | 19 | class StellarLikeTransaction; 20 | struct Error; 21 | 22 | /** Callback triggered by main completed task, returning optional result of template type T. */ 23 | class StellarLikeTransactionCallback { 24 | public: 25 | virtual ~StellarLikeTransactionCallback() {} 26 | 27 | /** 28 | * Method triggered when main task complete. 29 | * @params result optional of type T, non null if main task failed 30 | * @params error optional of type Error, non null if main task succeeded 31 | */ 32 | virtual void onCallback(const std::shared_ptr & result, const std::experimental::optional & error) = 0; 33 | }; 34 | 35 | } } } // namespace ledger::core::api 36 | #endif //DJINNI_GENERATED_STELLARLIKETRANSACTIONCALLBACK_HPP 37 | -------------------------------------------------------------------------------- /include/StellarLikeWallet.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from stellar_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_STELLARLIKEWALLET_HPP 5 | #define DJINNI_GENERATED_STELLARLIKEWALLET_HPP 6 | 7 | #include 8 | #include 9 | #ifndef LIBCORE_EXPORT 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #define LIBCORE_EXPORT 14 | #endif 15 | #endif 16 | 17 | namespace ledger { namespace core { namespace api { 18 | 19 | class BoolCallback; 20 | 21 | class LIBCORE_EXPORT StellarLikeWallet { 22 | public: 23 | virtual ~StellarLikeWallet() {} 24 | 25 | virtual void exists(const std::string & address, const std::shared_ptr & callback) = 0; 26 | }; 27 | 28 | } } } // namespace ledger::core::api 29 | #endif //DJINNI_GENERATED_STELLARLIKEWALLET_HPP 30 | -------------------------------------------------------------------------------- /include/StringCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_STRINGCALLBACK_HPP 5 | #define DJINNI_GENERATED_STRINGCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #include 9 | #ifndef LIBCORE_EXPORT 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #define LIBCORE_EXPORT 14 | #endif 15 | #endif 16 | 17 | namespace ledger { namespace core { namespace api { 18 | 19 | struct Error; 20 | 21 | /** Callback triggered by main completed task, returning optional result of template type T. */ 22 | class StringCallback { 23 | public: 24 | virtual ~StringCallback() {} 25 | 26 | /** 27 | * Method triggered when main task complete. 28 | * @params result optional of type T, non null if main task failed 29 | * @params error optional of type Error, non null if main task succeeded 30 | */ 31 | virtual void onCallback(const std::experimental::optional & result, const std::experimental::optional & error) = 0; 32 | }; 33 | 34 | } } } // namespace ledger::core::api 35 | #endif //DJINNI_GENERATED_STRINGCALLBACK_HPP 36 | -------------------------------------------------------------------------------- /include/SynchronizationEngines.cpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from configuration.djinni 3 | 4 | #include "SynchronizationEngines.hpp" // my header 5 | 6 | namespace ledger { namespace core { namespace api { 7 | 8 | std::string const SynchronizationEngines::BLOCKCHAIN_EXPLORER_SYNCHRONIZATION = {"BLOCKCHAIN_EXPLORER_SYNCHRONIZATION"}; 9 | 10 | } } } // namespace ledger::core::api 11 | -------------------------------------------------------------------------------- /include/SynchronizationEngines.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from configuration.djinni 3 | 4 | #ifndef DJINNI_GENERATED_SYNCHRONIZATIONENGINES_HPP 5 | #define DJINNI_GENERATED_SYNCHRONIZATIONENGINES_HPP 6 | 7 | #include 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | /** Available synchronization mechanisms. */ 19 | class LIBCORE_EXPORT SynchronizationEngines { 20 | public: 21 | virtual ~SynchronizationEngines() {} 22 | 23 | /** Synchronize via blockchain explorers. */ 24 | static std::string const BLOCKCHAIN_EXPLORER_SYNCHRONIZATION; 25 | }; 26 | 27 | } } } // namespace ledger::core::api 28 | #endif //DJINNI_GENERATED_SYNCHRONIZATIONENGINES_HPP 29 | -------------------------------------------------------------------------------- /include/SynchronizationStatus.cpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from wallet.djinni 3 | 4 | #include "SynchronizationStatus.hpp" // my header 5 | 6 | namespace ledger { namespace core { namespace api { 7 | 8 | int32_t const SynchronizationStatus::STATUS_DONE = 1; 9 | 10 | int32_t const SynchronizationStatus::STATUS_ERROR = 2; 11 | 12 | int32_t const SynchronizationStatus::STATUS_DONE_SYNCHRONIZE_NEXT_ACCOUNT = 3; 13 | 14 | } } } // namespace ledger::core::api 15 | -------------------------------------------------------------------------------- /include/SynchronizationStatus.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_SYNCHRONIZATIONSTATUS_HPP 5 | #define DJINNI_GENERATED_SYNCHRONIZATIONSTATUS_HPP 6 | 7 | #include 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | /** Class of synchronization status constants. */ 19 | class LIBCORE_EXPORT SynchronizationStatus { 20 | public: 21 | virtual ~SynchronizationStatus() {} 22 | 23 | static int32_t const STATUS_DONE; 24 | 25 | static int32_t const STATUS_ERROR; 26 | 27 | static int32_t const STATUS_DONE_SYNCHRONIZE_NEXT_ACCOUNT; 28 | }; 29 | 30 | } } } // namespace ledger::core::api 31 | #endif //DJINNI_GENERATED_SYNCHRONIZATIONSTATUS_HPP 32 | -------------------------------------------------------------------------------- /include/SynchronizerEngines.cpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from configuration.djinni 3 | 4 | #include "SynchronizerEngines.hpp" // my header 5 | 6 | namespace ledger { namespace core { namespace api { 7 | 8 | std::string const SynchronizerEngines::BLOCKCHAIN_EXPLORER = {"BLOCKCHAIN_EXPLORER"}; 9 | 10 | std::string const SynchronizerEngines::SPV = {"SPV"}; 11 | 12 | } } } // namespace ledger::core::api 13 | -------------------------------------------------------------------------------- /include/TezosConfiguration.cpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from tezos_like_wallet.djinni 3 | 4 | #include "TezosConfiguration.hpp" // my header 5 | 6 | namespace ledger { namespace core { namespace api { 7 | 8 | std::string const TezosConfiguration::BCD_API = {"BCD_API"}; 9 | 10 | std::string const TezosConfiguration::TEZOS_XPUB_CURVE = {"TEZOS_XPUB_CURVE"}; 11 | 12 | std::string const TezosConfiguration::TEZOS_PROTOCOL_UPDATE = {"TEZOS_PROTOCOL_UPDATE"}; 13 | 14 | std::string const TezosConfiguration::TEZOS_NODE = {"TEZOS_NODE"}; 15 | 16 | std::string const TezosConfiguration::TEZOS_COUNTER_STRATEGY = {"TEZOS_COUNTER_STRATEGY"}; 17 | 18 | std::string const TezosConfiguration::TEZOS_OPTIMISTIC_COUNTER_TIMEOUT = {"TEZOS_OPTIMISTIC_COUNTER_TIMEOUT"}; 19 | 20 | } } } // namespace ledger::core::api 21 | -------------------------------------------------------------------------------- /include/TezosConfiguration.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from tezos_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_TEZOSCONFIGURATION_HPP 5 | #define DJINNI_GENERATED_TEZOSCONFIGURATION_HPP 6 | 7 | #include 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | class LIBCORE_EXPORT TezosConfiguration { 19 | public: 20 | virtual ~TezosConfiguration() {} 21 | 22 | static std::string const BCD_API; 23 | 24 | static std::string const TEZOS_XPUB_CURVE; 25 | 26 | static std::string const TEZOS_PROTOCOL_UPDATE; 27 | 28 | static std::string const TEZOS_NODE; 29 | 30 | static std::string const TEZOS_COUNTER_STRATEGY; 31 | 32 | static std::string const TEZOS_OPTIMISTIC_COUNTER_TIMEOUT; 33 | }; 34 | 35 | } } } // namespace ledger::core::api 36 | #endif //DJINNI_GENERATED_TEZOSCONFIGURATION_HPP 37 | -------------------------------------------------------------------------------- /include/TezosCurve.cpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from addresses.djinni 3 | 4 | #include "TezosCurve.hpp" // my header 5 | #include "enum_from_string.hpp" 6 | 7 | namespace ledger { namespace core { namespace api { 8 | 9 | std::string to_string(const TezosCurve& tezosCurve) { 10 | switch (tezosCurve) { 11 | case TezosCurve::ED25519: return "ED25519"; 12 | case TezosCurve::SECP256K1: return "SECP256K1"; 13 | case TezosCurve::P256: return "P256"; 14 | default: return "UNKNOWN"; 15 | }; 16 | }; 17 | template <> 18 | TezosCurve from_string(const std::string& tezosCurve) { 19 | if (tezosCurve == "ED25519") return TezosCurve::ED25519; 20 | else if (tezosCurve == "SECP256K1") return TezosCurve::SECP256K1; 21 | else return TezosCurve::P256; 22 | }; 23 | 24 | std::ostream &operator<<(std::ostream &os, const TezosCurve &o) 25 | { 26 | switch (o) { 27 | case TezosCurve::ED25519: return os << "ED25519"; 28 | case TezosCurve::SECP256K1: return os << "SECP256K1"; 29 | case TezosCurve::P256: return os << "P256"; 30 | } 31 | } 32 | 33 | } } } // namespace ledger::core::api 34 | -------------------------------------------------------------------------------- /include/TezosCurve.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from addresses.djinni 3 | 4 | #ifndef DJINNI_GENERATED_TEZOSCURVE_HPP 5 | #define DJINNI_GENERATED_TEZOSCURVE_HPP 6 | 7 | #include 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | enum class TezosCurve : int { 21 | ED25519, 22 | SECP256K1, 23 | P256, 24 | }; 25 | LIBCORE_EXPORT std::string to_string(const TezosCurve& tezosCurve); 26 | LIBCORE_EXPORT std::ostream &operator<<(std::ostream &os, const TezosCurve &o); 27 | 28 | } } } // namespace ledger::core::api 29 | 30 | namespace std { 31 | 32 | template <> 33 | struct hash<::ledger::core::api::TezosCurve> { 34 | size_t operator()(::ledger::core::api::TezosCurve type) const { 35 | return std::hash()(static_cast(type)); 36 | } 37 | }; 38 | 39 | } // namespace std 40 | #endif //DJINNI_GENERATED_TEZOSCURVE_HPP 41 | -------------------------------------------------------------------------------- /include/TezosLikeBlock.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from tezos_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_TEZOSLIKEBLOCK_HPP 5 | #define DJINNI_GENERATED_TEZOSLIKEBLOCK_HPP 6 | 7 | #include 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | /**Class representing Bitcoin block */ 21 | class LIBCORE_EXPORT TezosLikeBlock { 22 | public: 23 | virtual ~TezosLikeBlock() {} 24 | 25 | /** 26 | *Hash of block 27 | *@return string representing hash of this block 28 | */ 29 | virtual std::string getHash() = 0; 30 | 31 | /** 32 | *Height of block in blockchain 33 | *@return 64 bits integer, height of block 34 | */ 35 | virtual int64_t getHeight() = 0; 36 | 37 | /** 38 | *Timestamp when block was mined 39 | *@return Date object, date when block was appended to blockchain 40 | */ 41 | virtual std::chrono::system_clock::time_point getTime() = 0; 42 | }; 43 | 44 | } } } // namespace ledger::core::api 45 | #endif //DJINNI_GENERATED_TEZOSLIKEBLOCK_HPP 46 | -------------------------------------------------------------------------------- /include/TezosLikeOperation.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from tezos_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_TEZOSLIKEOPERATION_HPP 5 | #define DJINNI_GENERATED_TEZOSLIKEOPERATION_HPP 6 | 7 | #include 8 | #ifndef LIBCORE_EXPORT 9 | #if defined(_MSC_VER) 10 | #include 11 | #else 12 | #define LIBCORE_EXPORT 13 | #endif 14 | #endif 15 | 16 | namespace ledger { namespace core { namespace api { 17 | 18 | class TezosLikeTransaction; 19 | 20 | /**Class representing a Tezos Operation */ 21 | class LIBCORE_EXPORT TezosLikeOperation { 22 | public: 23 | virtual ~TezosLikeOperation() {} 24 | 25 | /** 26 | *Get operation's transaction 27 | *@return TezosLikeTransaction object 28 | */ 29 | virtual std::shared_ptr getTransaction() = 0; 30 | }; 31 | 32 | } } } // namespace ledger::core::api 33 | #endif //DJINNI_GENERATED_TEZOSLIKEOPERATION_HPP 34 | -------------------------------------------------------------------------------- /include/TezosLikeTransactionCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_TEZOSLIKETRANSACTIONCALLBACK_HPP 5 | #define DJINNI_GENERATED_TEZOSLIKETRANSACTIONCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #include 9 | #ifndef LIBCORE_EXPORT 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #define LIBCORE_EXPORT 14 | #endif 15 | #endif 16 | 17 | namespace ledger { namespace core { namespace api { 18 | 19 | class TezosLikeTransaction; 20 | struct Error; 21 | 22 | /** Callback triggered by main completed task, returning optional result of template type T. */ 23 | class TezosLikeTransactionCallback { 24 | public: 25 | virtual ~TezosLikeTransactionCallback() {} 26 | 27 | /** 28 | * Method triggered when main task complete. 29 | * @params result optional of type T, non null if main task failed 30 | * @params error optional of type Error, non null if main task succeeded 31 | */ 32 | virtual void onCallback(const std::shared_ptr & result, const std::experimental::optional & error) = 0; 33 | }; 34 | 35 | } } } // namespace ledger::core::api 36 | #endif //DJINNI_GENERATED_TEZOSLIKETRANSACTIONCALLBACK_HPP 37 | -------------------------------------------------------------------------------- /include/TezosLikeWallet.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from tezos_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_TEZOSLIKEWALLET_HPP 5 | #define DJINNI_GENERATED_TEZOSLIKEWALLET_HPP 6 | 7 | #include 8 | #include 9 | #ifndef LIBCORE_EXPORT 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #define LIBCORE_EXPORT 14 | #endif 15 | #endif 16 | 17 | namespace ledger { namespace core { namespace api { 18 | 19 | class BoolCallback; 20 | 21 | class LIBCORE_EXPORT TezosLikeWallet { 22 | public: 23 | virtual ~TezosLikeWallet() {} 24 | 25 | virtual void isDelegate(const std::string & address, const std::shared_ptr & callback) = 0; 26 | }; 27 | 28 | } } } // namespace ledger::core::api 29 | #endif //DJINNI_GENERATED_TEZOSLIKEWALLET_HPP 30 | -------------------------------------------------------------------------------- /include/TimePeriod.cpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from wallet.djinni 3 | 4 | #include "TimePeriod.hpp" // my header 5 | #include "enum_from_string.hpp" 6 | 7 | namespace ledger { namespace core { namespace api { 8 | 9 | std::string to_string(const TimePeriod& timePeriod) { 10 | switch (timePeriod) { 11 | case TimePeriod::HOUR: return "HOUR"; 12 | case TimePeriod::DAY: return "DAY"; 13 | case TimePeriod::WEEK: return "WEEK"; 14 | case TimePeriod::MONTH: return "MONTH"; 15 | default: return "UNKNOWN"; 16 | }; 17 | }; 18 | template <> 19 | TimePeriod from_string(const std::string& timePeriod) { 20 | if (timePeriod == "HOUR") return TimePeriod::HOUR; 21 | else if (timePeriod == "DAY") return TimePeriod::DAY; 22 | else if (timePeriod == "WEEK") return TimePeriod::WEEK; 23 | else return TimePeriod::MONTH; 24 | }; 25 | 26 | std::ostream &operator<<(std::ostream &os, const TimePeriod &o) 27 | { 28 | switch (o) { 29 | case TimePeriod::HOUR: return os << "HOUR"; 30 | case TimePeriod::DAY: return os << "DAY"; 31 | case TimePeriod::WEEK: return os << "WEEK"; 32 | case TimePeriod::MONTH: return os << "MONTH"; 33 | } 34 | } 35 | 36 | } } } // namespace ledger::core::api 37 | -------------------------------------------------------------------------------- /include/TimePeriod.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_TIMEPERIOD_HPP 5 | #define DJINNI_GENERATED_TIMEPERIOD_HPP 6 | 7 | #include 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | enum class TimePeriod : int { 21 | HOUR, 22 | DAY, 23 | WEEK, 24 | MONTH, 25 | }; 26 | LIBCORE_EXPORT std::string to_string(const TimePeriod& timePeriod); 27 | LIBCORE_EXPORT std::ostream &operator<<(std::ostream &os, const TimePeriod &o); 28 | 29 | } } } // namespace ledger::core::api 30 | 31 | namespace std { 32 | 33 | template <> 34 | struct hash<::ledger::core::api::TimePeriod> { 35 | size_t operator()(::ledger::core::api::TimePeriod type) const { 36 | return std::hash()(static_cast(type)); 37 | } 38 | }; 39 | 40 | } // namespace std 41 | #endif //DJINNI_GENERATED_TIMEPERIOD_HPP 42 | -------------------------------------------------------------------------------- /include/TrustIndicator.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_TRUSTINDICATOR_HPP 5 | #define DJINNI_GENERATED_TRUSTINDICATOR_HPP 6 | 7 | #include 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | enum class TrustLevel; 21 | 22 | /** The trust indicator of an operation. */ 23 | class LIBCORE_EXPORT TrustIndicator { 24 | public: 25 | virtual ~TrustIndicator() {} 26 | 27 | virtual int32_t getTrustWeight() = 0; 28 | 29 | virtual TrustLevel getTrustLevel() = 0; 30 | 31 | virtual std::vector getConflictingOperationUids() = 0; 32 | 33 | virtual std::string getOrigin() = 0; 34 | }; 35 | 36 | } } } // namespace ledger::core::api 37 | #endif //DJINNI_GENERATED_TRUSTINDICATOR_HPP 38 | -------------------------------------------------------------------------------- /include/TrustLevel.cpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from wallet.djinni 3 | 4 | #include "TrustLevel.hpp" // my header 5 | #include "enum_from_string.hpp" 6 | 7 | namespace ledger { namespace core { namespace api { 8 | 9 | std::string to_string(const TrustLevel& trustLevel) { 10 | switch (trustLevel) { 11 | case TrustLevel::TRUSTED: return "TRUSTED"; 12 | case TrustLevel::PENDING: return "PENDING"; 13 | case TrustLevel::UNTRUSTED: return "UNTRUSTED"; 14 | case TrustLevel::DROPPED: return "DROPPED"; 15 | default: return "UNKNOWN"; 16 | }; 17 | }; 18 | template <> 19 | TrustLevel from_string(const std::string& trustLevel) { 20 | if (trustLevel == "TRUSTED") return TrustLevel::TRUSTED; 21 | else if (trustLevel == "PENDING") return TrustLevel::PENDING; 22 | else if (trustLevel == "UNTRUSTED") return TrustLevel::UNTRUSTED; 23 | else return TrustLevel::DROPPED; 24 | }; 25 | 26 | std::ostream &operator<<(std::ostream &os, const TrustLevel &o) 27 | { 28 | switch (o) { 29 | case TrustLevel::TRUSTED: return os << "TRUSTED"; 30 | case TrustLevel::PENDING: return os << "PENDING"; 31 | case TrustLevel::UNTRUSTED: return os << "UNTRUSTED"; 32 | case TrustLevel::DROPPED: return os << "DROPPED"; 33 | } 34 | } 35 | 36 | } } } // namespace ledger::core::api 37 | -------------------------------------------------------------------------------- /include/TrustLevel.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_TRUSTLEVEL_HPP 5 | #define DJINNI_GENERATED_TRUSTLEVEL_HPP 6 | 7 | #include 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | enum class TrustLevel : int { 21 | TRUSTED, 22 | PENDING, 23 | UNTRUSTED, 24 | DROPPED, 25 | }; 26 | LIBCORE_EXPORT std::string to_string(const TrustLevel& trustLevel); 27 | LIBCORE_EXPORT std::ostream &operator<<(std::ostream &os, const TrustLevel &o); 28 | 29 | } } } // namespace ledger::core::api 30 | 31 | namespace std { 32 | 33 | template <> 34 | struct hash<::ledger::core::api::TrustLevel> { 35 | size_t operator()(::ledger::core::api::TrustLevel type) const { 36 | return std::hash()(static_cast(type)); 37 | } 38 | }; 39 | 40 | } // namespace std 41 | #endif //DJINNI_GENERATED_TRUSTLEVEL_HPP 42 | -------------------------------------------------------------------------------- /include/WalletCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_WALLETCALLBACK_HPP 5 | #define DJINNI_GENERATED_WALLETCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #include 9 | #ifndef LIBCORE_EXPORT 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #define LIBCORE_EXPORT 14 | #endif 15 | #endif 16 | 17 | namespace ledger { namespace core { namespace api { 18 | 19 | class Wallet; 20 | struct Error; 21 | 22 | /** Callback triggered by main completed task, returning optional result of template type T. */ 23 | class WalletCallback { 24 | public: 25 | virtual ~WalletCallback() {} 26 | 27 | /** 28 | * Method triggered when main task complete. 29 | * @params result optional of type T, non null if main task failed 30 | * @params error optional of type Error, non null if main task succeeded 31 | */ 32 | virtual void onCallback(const std::shared_ptr & result, const std::experimental::optional & error) = 0; 33 | }; 34 | 35 | } } } // namespace ledger::core::api 36 | #endif //DJINNI_GENERATED_WALLETCALLBACK_HPP 37 | -------------------------------------------------------------------------------- /include/WalletListCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_WALLETLISTCALLBACK_HPP 5 | #define DJINNI_GENERATED_WALLETLISTCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #include 9 | #include 10 | #ifndef LIBCORE_EXPORT 11 | #if defined(_MSC_VER) 12 | #include 13 | #else 14 | #define LIBCORE_EXPORT 15 | #endif 16 | #endif 17 | 18 | namespace ledger { namespace core { namespace api { 19 | 20 | class Wallet; 21 | struct Error; 22 | 23 | /** Callback triggered by main completed task, returning optional result as list of template type T. */ 24 | class WalletListCallback { 25 | public: 26 | virtual ~WalletListCallback() {} 27 | 28 | /** 29 | * Method triggered when main task complete. 30 | * @params result optional of type list, non null if main task failed 31 | * @params error optional of type Error, non null if main task succeeded 32 | */ 33 | virtual void onCallback(const std::experimental::optional>> & result, const std::experimental::optional & error) = 0; 34 | }; 35 | 36 | } } } // namespace ledger::core::api 37 | #endif //DJINNI_GENERATED_WALLETLISTCALLBACK_HPP 38 | -------------------------------------------------------------------------------- /include/WalletPoolCallback.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from callback.djinni 3 | 4 | #ifndef DJINNI_GENERATED_WALLETPOOLCALLBACK_HPP 5 | #define DJINNI_GENERATED_WALLETPOOLCALLBACK_HPP 6 | 7 | #include "../utils/optional.hpp" 8 | #include 9 | #ifndef LIBCORE_EXPORT 10 | #if defined(_MSC_VER) 11 | #include 12 | #else 13 | #define LIBCORE_EXPORT 14 | #endif 15 | #endif 16 | 17 | namespace ledger { namespace core { namespace api { 18 | 19 | class WalletPool; 20 | struct Error; 21 | 22 | /** Callback triggered by main completed task, returning optional result of template type T. */ 23 | class WalletPoolCallback { 24 | public: 25 | virtual ~WalletPoolCallback() {} 26 | 27 | /** 28 | * Method triggered when main task complete. 29 | * @params result optional of type T, non null if main task failed 30 | * @params error optional of type Error, non null if main task succeeded 31 | */ 32 | virtual void onCallback(const std::shared_ptr & result, const std::experimental::optional & error) = 0; 33 | }; 34 | 35 | } } } // namespace ledger::core::api 36 | #endif //DJINNI_GENERATED_WALLETPOOLCALLBACK_HPP 37 | -------------------------------------------------------------------------------- /include/enum_from_string.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from tezos_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_ENUM_FROM_STRING_HPP 5 | #define DJINNI_GENERATED_ENUM_FROM_STRING_HPP 6 | 7 | #include 8 | 9 | namespace ledger { namespace core { namespace api { 10 | 11 | template 12 | T from_string(const std::string&); 13 | 14 | } } } // namespace ledger::core::api 15 | #endif //DJINNI_GENERATED_ENUM_FROM_STRING_HPP 16 | -------------------------------------------------------------------------------- /include/libcore_export.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef LIBCORE_EXPORT_H 3 | #define LIBCORE_EXPORT_H 4 | 5 | #ifdef LEDGER_CORE_STATIC_DEFINE 6 | # define LIBCORE_EXPORT 7 | # define LEDGER_CORE_NO_EXPORT 8 | #else 9 | # ifndef LIBCORE_EXPORT 10 | # ifdef ledger_core_EXPORTS 11 | /* We are building this library */ 12 | # define LIBCORE_EXPORT __declspec(dllexport) 13 | # else 14 | /* We are using this library */ 15 | # define LIBCORE_EXPORT __declspec(dllimport) 16 | # endif 17 | # endif 18 | 19 | # ifndef LEDGER_CORE_NO_EXPORT 20 | # define LEDGER_CORE_NO_EXPORT 21 | # endif 22 | #endif 23 | 24 | #ifndef LEDGER_CORE_DEPRECATED 25 | # define LEDGER_CORE_DEPRECATED __declspec(deprecated) 26 | #endif 27 | 28 | #ifndef LEDGER_CORE_DEPRECATED_EXPORT 29 | # define LEDGER_CORE_DEPRECATED_EXPORT LIBCORE_EXPORT LEDGER_CORE_DEPRECATED 30 | #endif 31 | 32 | #ifndef LEDGER_CORE_DEPRECATED_NO_EXPORT 33 | # define LEDGER_CORE_DEPRECATED_NO_EXPORT LEDGER_CORE_NO_EXPORT LEDGER_CORE_DEPRECATED 34 | #endif 35 | 36 | #if 0 /* DEFINE_NO_DEPRECATED */ 37 | # ifndef LEDGER_CORE_NO_DEPRECATED 38 | # define LEDGER_CORE_NO_DEPRECATED 39 | # endif 40 | #endif 41 | 42 | #endif /* LIBCORE_EXPORT_H */ 43 | -------------------------------------------------------------------------------- /src/NJSAlgorandAddressCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from idl.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSALGORANDADDRESS_HPP 5 | #define DJINNI_GENERATED_NJSALGORANDADDRESS_HPP 6 | 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #include 14 | #include 15 | #include "../include/AlgorandAddress.hpp" 16 | 17 | using namespace v8; 18 | using namespace node; 19 | using namespace std; 20 | using namespace ledger::core::api; 21 | 22 | class NJSAlgorandAddress final { 23 | public: 24 | 25 | static void Initialize(Local target); 26 | NJSAlgorandAddress() = delete; 27 | 28 | static Local wrap(const std::shared_ptr &object); 29 | static Nan::Persistent AlgorandAddress_prototype; 30 | 31 | private: 32 | static NAN_METHOD(fromPublicKey); 33 | 34 | static NAN_METHOD(toPublicKey); 35 | 36 | static NAN_METHOD(New); 37 | 38 | static NAN_METHOD(isNull); 39 | }; 40 | #endif //DJINNI_GENERATED_NJSALGORANDADDRESS_HPP 41 | -------------------------------------------------------------------------------- /src/NJSAlgorandBlockchainExplorerEnginesCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from configuration.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSALGORANDBLOCKCHAINEXPLORERENGINES_HPP 5 | #define DJINNI_GENERATED_NJSALGORANDBLOCKCHAINEXPLORERENGINES_HPP 6 | 7 | 8 | #include 9 | 10 | #include 11 | #include 12 | #include "../include/AlgorandBlockchainExplorerEngines.hpp" 13 | 14 | using namespace v8; 15 | using namespace node; 16 | using namespace std; 17 | using namespace ledger::core::api; 18 | 19 | class NJSAlgorandBlockchainExplorerEngines final { 20 | public: 21 | 22 | static void Initialize(Local target); 23 | NJSAlgorandBlockchainExplorerEngines() = delete; 24 | 25 | static Local wrap(const std::shared_ptr &object); 26 | static Nan::Persistent AlgorandBlockchainExplorerEngines_prototype; 27 | 28 | private: 29 | static NAN_METHOD(New); 30 | 31 | static NAN_METHOD(isNull); 32 | }; 33 | #endif //DJINNI_GENERATED_NJSALGORANDBLOCKCHAINEXPLORERENGINES_HPP 34 | -------------------------------------------------------------------------------- /src/NJSAlgorandOperationCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from idl.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSALGORANDOPERATION_HPP 5 | #define DJINNI_GENERATED_NJSALGORANDOPERATION_HPP 6 | 7 | 8 | #include "../include/AlgorandOperationType.hpp" 9 | #include "NJSAlgorandTransactionCpp.hpp" 10 | #include 11 | #include 12 | 13 | #include 14 | #include 15 | #include "../include/AlgorandOperation.hpp" 16 | 17 | using namespace v8; 18 | using namespace node; 19 | using namespace std; 20 | using namespace ledger::core::api; 21 | 22 | class NJSAlgorandOperation final { 23 | public: 24 | 25 | static void Initialize(Local target); 26 | NJSAlgorandOperation() = delete; 27 | 28 | static Local wrap(const std::shared_ptr &object); 29 | static Nan::Persistent AlgorandOperation_prototype; 30 | 31 | private: 32 | static NAN_METHOD(getTransaction); 33 | 34 | static NAN_METHOD(getAlgorandOperationType); 35 | 36 | static NAN_METHOD(getRewards); 37 | 38 | static NAN_METHOD(getAssetAmount); 39 | 40 | static NAN_METHOD(New); 41 | 42 | static NAN_METHOD(isNull); 43 | }; 44 | #endif //DJINNI_GENERATED_NJSALGORANDOPERATION_HPP 45 | -------------------------------------------------------------------------------- /src/NJSAlgorandWalletCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from idl.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSALGORANDWALLET_HPP 5 | #define DJINNI_GENERATED_NJSALGORANDWALLET_HPP 6 | 7 | 8 | #include 9 | 10 | #include 11 | #include 12 | #include "../include/AlgorandWallet.hpp" 13 | 14 | using namespace v8; 15 | using namespace node; 16 | using namespace std; 17 | using namespace ledger::core::api; 18 | 19 | class NJSAlgorandWallet final { 20 | public: 21 | 22 | static void Initialize(Local target); 23 | NJSAlgorandWallet() = delete; 24 | 25 | static Local wrap(const std::shared_ptr &object); 26 | static Nan::Persistent AlgorandWallet_prototype; 27 | 28 | private: 29 | static NAN_METHOD(New); 30 | 31 | static NAN_METHOD(isNull); 32 | }; 33 | #endif //DJINNI_GENERATED_NJSALGORANDWALLET_HPP 34 | -------------------------------------------------------------------------------- /src/NJSAllocationMetricsCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from core.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSALLOCATIONMETRICS_HPP 5 | #define DJINNI_GENERATED_NJSALLOCATIONMETRICS_HPP 6 | 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #include 14 | #include 15 | #include "../include/AllocationMetrics.hpp" 16 | 17 | using namespace v8; 18 | using namespace node; 19 | using namespace std; 20 | using namespace ledger::core::api; 21 | 22 | class NJSAllocationMetrics final { 23 | public: 24 | 25 | static void Initialize(Local target); 26 | NJSAllocationMetrics() = delete; 27 | 28 | static Local wrap(const std::shared_ptr &object); 29 | static Nan::Persistent AllocationMetrics_prototype; 30 | 31 | private: 32 | static NAN_METHOD(getObjectAllocations); 33 | 34 | static NAN_METHOD(New); 35 | 36 | static NAN_METHOD(isNull); 37 | }; 38 | #endif //DJINNI_GENERATED_NJSALLOCATIONMETRICS_HPP 39 | -------------------------------------------------------------------------------- /src/NJSBitcoinLikeOperationCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from bitcoin_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSBITCOINLIKEOPERATION_HPP 5 | #define DJINNI_GENERATED_NJSBITCOINLIKEOPERATION_HPP 6 | 7 | 8 | #include "NJSBitcoinLikeTransactionCpp.hpp" 9 | #include 10 | 11 | #include 12 | #include 13 | #include "../include/BitcoinLikeOperation.hpp" 14 | 15 | using namespace v8; 16 | using namespace node; 17 | using namespace std; 18 | using namespace ledger::core::api; 19 | 20 | class NJSBitcoinLikeOperation final { 21 | public: 22 | 23 | static void Initialize(Local target); 24 | NJSBitcoinLikeOperation() = delete; 25 | 26 | static Local wrap(const std::shared_ptr &object); 27 | static Nan::Persistent BitcoinLikeOperation_prototype; 28 | 29 | private: 30 | /** 31 | * Get operation's transaction. 32 | * @return BitcoinLikeTransaction object 33 | */ 34 | static NAN_METHOD(getTransaction); 35 | 36 | static NAN_METHOD(New); 37 | 38 | static NAN_METHOD(isNull); 39 | }; 40 | #endif //DJINNI_GENERATED_NJSBITCOINLIKEOPERATION_HPP 41 | -------------------------------------------------------------------------------- /src/NJSBitcoinLikeWalletConfigurationCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from bitcoin_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSBITCOINLIKEWALLETCONFIGURATION_HPP 5 | #define DJINNI_GENERATED_NJSBITCOINLIKEWALLETCONFIGURATION_HPP 6 | 7 | 8 | #include 9 | 10 | #include 11 | #include 12 | #include "../include/BitcoinLikeWalletConfiguration.hpp" 13 | 14 | using namespace v8; 15 | using namespace node; 16 | using namespace std; 17 | using namespace ledger::core::api; 18 | 19 | class NJSBitcoinLikeWalletConfiguration final { 20 | public: 21 | 22 | static void Initialize(Local target); 23 | NJSBitcoinLikeWalletConfiguration() = delete; 24 | 25 | static Local wrap(const std::shared_ptr &object); 26 | static Nan::Persistent BitcoinLikeWalletConfiguration_prototype; 27 | 28 | private: 29 | static NAN_METHOD(New); 30 | 31 | static NAN_METHOD(isNull); 32 | }; 33 | #endif //DJINNI_GENERATED_NJSBITCOINLIKEWALLETCONFIGURATION_HPP 34 | -------------------------------------------------------------------------------- /src/NJSBitcoinLikeWalletCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from bitcoin_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSBITCOINLIKEWALLET_HPP 5 | #define DJINNI_GENERATED_NJSBITCOINLIKEWALLET_HPP 6 | 7 | 8 | #include 9 | 10 | #include 11 | #include 12 | #include "../include/BitcoinLikeWallet.hpp" 13 | 14 | using namespace v8; 15 | using namespace node; 16 | using namespace std; 17 | using namespace ledger::core::api; 18 | 19 | class NJSBitcoinLikeWallet final { 20 | public: 21 | 22 | static void Initialize(Local target); 23 | NJSBitcoinLikeWallet() = delete; 24 | 25 | static Local wrap(const std::shared_ptr &object); 26 | static Nan::Persistent BitcoinLikeWallet_prototype; 27 | 28 | private: 29 | static NAN_METHOD(New); 30 | 31 | static NAN_METHOD(isNull); 32 | }; 33 | #endif //DJINNI_GENERATED_NJSBITCOINLIKEWALLET_HPP 34 | -------------------------------------------------------------------------------- /src/NJSBlockchainExplorerEnginesCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from configuration.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSBLOCKCHAINEXPLORERENGINES_HPP 5 | #define DJINNI_GENERATED_NJSBLOCKCHAINEXPLORERENGINES_HPP 6 | 7 | 8 | #include 9 | 10 | #include 11 | #include 12 | #include "../include/BlockchainExplorerEngines.hpp" 13 | 14 | using namespace v8; 15 | using namespace node; 16 | using namespace std; 17 | using namespace ledger::core::api; 18 | 19 | class NJSBlockchainExplorerEngines final { 20 | public: 21 | 22 | static void Initialize(Local target); 23 | NJSBlockchainExplorerEngines() = delete; 24 | 25 | static Local wrap(const std::shared_ptr &object); 26 | static Nan::Persistent BlockchainExplorerEngines_prototype; 27 | 28 | private: 29 | static NAN_METHOD(New); 30 | 31 | static NAN_METHOD(isNull); 32 | }; 33 | #endif //DJINNI_GENERATED_NJSBLOCKCHAINEXPLORERENGINES_HPP 34 | -------------------------------------------------------------------------------- /src/NJSBlockchainObserverEnginesCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from configuration.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSBLOCKCHAINOBSERVERENGINES_HPP 5 | #define DJINNI_GENERATED_NJSBLOCKCHAINOBSERVERENGINES_HPP 6 | 7 | 8 | #include 9 | 10 | #include 11 | #include 12 | #include "../include/BlockchainObserverEngines.hpp" 13 | 14 | using namespace v8; 15 | using namespace node; 16 | using namespace std; 17 | using namespace ledger::core::api; 18 | 19 | class NJSBlockchainObserverEngines final { 20 | public: 21 | 22 | static void Initialize(Local target); 23 | NJSBlockchainObserverEngines() = delete; 24 | 25 | static Local wrap(const std::shared_ptr &object); 26 | static Nan::Persistent BlockchainObserverEngines_prototype; 27 | 28 | private: 29 | static NAN_METHOD(New); 30 | 31 | static NAN_METHOD(isNull); 32 | }; 33 | #endif //DJINNI_GENERATED_NJSBLOCKCHAINOBSERVERENGINES_HPP 34 | -------------------------------------------------------------------------------- /src/NJSConfigurationCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from configuration.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSCONFIGURATION_HPP 5 | #define DJINNI_GENERATED_NJSCONFIGURATION_HPP 6 | 7 | 8 | #include 9 | 10 | #include 11 | #include 12 | #include "../include/Configuration.hpp" 13 | 14 | using namespace v8; 15 | using namespace node; 16 | using namespace std; 17 | using namespace ledger::core::api; 18 | 19 | class NJSConfiguration final { 20 | public: 21 | 22 | static void Initialize(Local target); 23 | NJSConfiguration() = delete; 24 | 25 | static Local wrap(const std::shared_ptr &object); 26 | static Nan::Persistent Configuration_prototype; 27 | 28 | private: 29 | static NAN_METHOD(New); 30 | 31 | static NAN_METHOD(isNull); 32 | }; 33 | #endif //DJINNI_GENERATED_NJSCONFIGURATION_HPP 34 | -------------------------------------------------------------------------------- /src/NJSConfigurationDefaultsCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from configuration.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSCONFIGURATIONDEFAULTS_HPP 5 | #define DJINNI_GENERATED_NJSCONFIGURATIONDEFAULTS_HPP 6 | 7 | 8 | #include 9 | 10 | #include 11 | #include 12 | #include "../include/ConfigurationDefaults.hpp" 13 | 14 | using namespace v8; 15 | using namespace node; 16 | using namespace std; 17 | using namespace ledger::core::api; 18 | 19 | class NJSConfigurationDefaults final { 20 | public: 21 | 22 | static void Initialize(Local target); 23 | NJSConfigurationDefaults() = delete; 24 | 25 | static Local wrap(const std::shared_ptr &object); 26 | static Nan::Persistent ConfigurationDefaults_prototype; 27 | 28 | private: 29 | static NAN_METHOD(New); 30 | 31 | static NAN_METHOD(isNull); 32 | }; 33 | #endif //DJINNI_GENERATED_NJSCONFIGURATIONDEFAULTS_HPP 34 | -------------------------------------------------------------------------------- /src/NJSCosmosConfigurationDefaultsCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSCOSMOSCONFIGURATIONDEFAULTS_HPP 5 | #define DJINNI_GENERATED_NJSCOSMOSCONFIGURATIONDEFAULTS_HPP 6 | 7 | 8 | #include 9 | 10 | #include 11 | #include 12 | #include "../include/CosmosConfigurationDefaults.hpp" 13 | 14 | using namespace v8; 15 | using namespace node; 16 | using namespace std; 17 | using namespace ledger::core::api; 18 | 19 | class NJSCosmosConfigurationDefaults final { 20 | public: 21 | 22 | static void Initialize(Local target); 23 | NJSCosmosConfigurationDefaults() = delete; 24 | 25 | static Local wrap(const std::shared_ptr &object); 26 | static Nan::Persistent CosmosConfigurationDefaults_prototype; 27 | 28 | private: 29 | static NAN_METHOD(New); 30 | 31 | static NAN_METHOD(isNull); 32 | }; 33 | #endif //DJINNI_GENERATED_NJSCOSMOSCONFIGURATIONDEFAULTS_HPP 34 | -------------------------------------------------------------------------------- /src/NJSCosmosLikeDelegationCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSCOSMOSLIKEDELEGATION_HPP 5 | #define DJINNI_GENERATED_NJSCOSMOSLIKEDELEGATION_HPP 6 | 7 | 8 | #include "NJSAmountCpp.hpp" 9 | #include 10 | #include 11 | 12 | #include 13 | #include 14 | #include "../include/CosmosLikeDelegation.hpp" 15 | 16 | using namespace v8; 17 | using namespace node; 18 | using namespace std; 19 | using namespace ledger::core::api; 20 | 21 | class NJSCosmosLikeDelegation final { 22 | public: 23 | 24 | static void Initialize(Local target); 25 | NJSCosmosLikeDelegation() = delete; 26 | 27 | static Local wrap(const std::shared_ptr &object); 28 | static Nan::Persistent CosmosLikeDelegation_prototype; 29 | 30 | private: 31 | static NAN_METHOD(getDelegatorAddress); 32 | 33 | static NAN_METHOD(getValidatorAddress); 34 | 35 | static NAN_METHOD(getDelegatedAmount); 36 | 37 | static NAN_METHOD(New); 38 | 39 | static NAN_METHOD(isNull); 40 | }; 41 | #endif //DJINNI_GENERATED_NJSCOSMOSLIKEDELEGATION_HPP 42 | -------------------------------------------------------------------------------- /src/NJSCosmosLikeRedelegationCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSCOSMOSLIKEREDELEGATION_HPP 5 | #define DJINNI_GENERATED_NJSCOSMOSLIKEREDELEGATION_HPP 6 | 7 | 8 | #include "NJSCosmosLikeRedelegationEntryCpp.hpp" 9 | #include 10 | #include 11 | #include 12 | 13 | #include 14 | #include 15 | #include "../include/CosmosLikeRedelegation.hpp" 16 | 17 | using namespace v8; 18 | using namespace node; 19 | using namespace std; 20 | using namespace ledger::core::api; 21 | 22 | class NJSCosmosLikeRedelegation final { 23 | public: 24 | 25 | static void Initialize(Local target); 26 | NJSCosmosLikeRedelegation() = delete; 27 | 28 | static Local wrap(const std::shared_ptr &object); 29 | static Nan::Persistent CosmosLikeRedelegation_prototype; 30 | 31 | private: 32 | static NAN_METHOD(getDelegatorAddress); 33 | 34 | static NAN_METHOD(getSrcValidatorAddress); 35 | 36 | static NAN_METHOD(getDstValidatorAddress); 37 | 38 | static NAN_METHOD(getEntries); 39 | 40 | static NAN_METHOD(New); 41 | 42 | static NAN_METHOD(isNull); 43 | }; 44 | #endif //DJINNI_GENERATED_NJSCOSMOSLIKEREDELEGATION_HPP 45 | -------------------------------------------------------------------------------- /src/NJSCosmosLikeRewardCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSCOSMOSLIKEREWARD_HPP 5 | #define DJINNI_GENERATED_NJSCOSMOSLIKEREWARD_HPP 6 | 7 | 8 | #include "NJSAmountCpp.hpp" 9 | #include 10 | #include 11 | 12 | #include 13 | #include 14 | #include "../include/CosmosLikeReward.hpp" 15 | 16 | using namespace v8; 17 | using namespace node; 18 | using namespace std; 19 | using namespace ledger::core::api; 20 | 21 | class NJSCosmosLikeReward final { 22 | public: 23 | 24 | static void Initialize(Local target); 25 | NJSCosmosLikeReward() = delete; 26 | 27 | static Local wrap(const std::shared_ptr &object); 28 | static Nan::Persistent CosmosLikeReward_prototype; 29 | 30 | private: 31 | static NAN_METHOD(getDelegatorAddress); 32 | 33 | static NAN_METHOD(getValidatorAddress); 34 | 35 | static NAN_METHOD(getRewardAmount); 36 | 37 | static NAN_METHOD(New); 38 | 39 | static NAN_METHOD(isNull); 40 | }; 41 | #endif //DJINNI_GENERATED_NJSCOSMOSLIKEREWARD_HPP 42 | -------------------------------------------------------------------------------- /src/NJSCosmosLikeUnbondingCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSCOSMOSLIKEUNBONDING_HPP 5 | #define DJINNI_GENERATED_NJSCOSMOSLIKEUNBONDING_HPP 6 | 7 | 8 | #include "NJSCosmosLikeUnbondingEntryCpp.hpp" 9 | #include 10 | #include 11 | #include 12 | 13 | #include 14 | #include 15 | #include "../include/CosmosLikeUnbonding.hpp" 16 | 17 | using namespace v8; 18 | using namespace node; 19 | using namespace std; 20 | using namespace ledger::core::api; 21 | 22 | class NJSCosmosLikeUnbonding final { 23 | public: 24 | 25 | static void Initialize(Local target); 26 | NJSCosmosLikeUnbonding() = delete; 27 | 28 | static Local wrap(const std::shared_ptr &object); 29 | static Nan::Persistent CosmosLikeUnbonding_prototype; 30 | 31 | private: 32 | /** Delegator address */ 33 | static NAN_METHOD(getDelegatorAddress); 34 | 35 | /** Validator address */ 36 | static NAN_METHOD(getValidatorAddress); 37 | 38 | static NAN_METHOD(getEntries); 39 | 40 | static NAN_METHOD(New); 41 | 42 | static NAN_METHOD(isNull); 43 | }; 44 | #endif //DJINNI_GENERATED_NJSCOSMOSLIKEUNBONDING_HPP 45 | -------------------------------------------------------------------------------- /src/NJSCosmosLikeWalletCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSCOSMOSLIKEWALLET_HPP 5 | #define DJINNI_GENERATED_NJSCOSMOSLIKEWALLET_HPP 6 | 7 | 8 | #include 9 | 10 | #include 11 | #include 12 | #include "../include/CosmosLikeWallet.hpp" 13 | 14 | using namespace v8; 15 | using namespace node; 16 | using namespace std; 17 | using namespace ledger::core::api; 18 | 19 | class NJSCosmosLikeWallet final { 20 | public: 21 | 22 | static void Initialize(Local target); 23 | NJSCosmosLikeWallet() = delete; 24 | 25 | static Local wrap(const std::shared_ptr &object); 26 | static Nan::Persistent CosmosLikeWallet_prototype; 27 | 28 | private: 29 | static NAN_METHOD(New); 30 | 31 | static NAN_METHOD(isNull); 32 | }; 33 | #endif //DJINNI_GENERATED_NJSCOSMOSLIKEWALLET_HPP 34 | -------------------------------------------------------------------------------- /src/NJSDurationMetricsCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from core.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSDURATIONMETRICS_HPP 5 | #define DJINNI_GENERATED_NJSDURATIONMETRICS_HPP 6 | 7 | 8 | #include "../include/DurationMetric.hpp" 9 | #include 10 | #include 11 | #include 12 | 13 | #include 14 | #include 15 | #include "../include/DurationMetrics.hpp" 16 | 17 | using namespace v8; 18 | using namespace node; 19 | using namespace std; 20 | using namespace ledger::core::api; 21 | 22 | class NJSDurationMetrics final { 23 | public: 24 | 25 | static void Initialize(Local target); 26 | NJSDurationMetrics() = delete; 27 | 28 | static Local wrap(const std::shared_ptr &object); 29 | static Nan::Persistent DurationMetrics_prototype; 30 | 31 | private: 32 | /** Get all duration metrics */ 33 | static NAN_METHOD(getAllDurationMetrics); 34 | 35 | static NAN_METHOD(New); 36 | 37 | static NAN_METHOD(isNull); 38 | }; 39 | #endif //DJINNI_GENERATED_NJSDURATIONMETRICS_HPP 40 | -------------------------------------------------------------------------------- /src/NJSEthereumLikeWalletCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from ethereum_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSETHEREUMLIKEWALLET_HPP 5 | #define DJINNI_GENERATED_NJSETHEREUMLIKEWALLET_HPP 6 | 7 | 8 | #include 9 | 10 | #include 11 | #include 12 | #include "../include/EthereumLikeWallet.hpp" 13 | 14 | using namespace v8; 15 | using namespace node; 16 | using namespace std; 17 | using namespace ledger::core::api; 18 | 19 | class NJSEthereumLikeWallet final { 20 | public: 21 | 22 | static void Initialize(Local target); 23 | NJSEthereumLikeWallet() = delete; 24 | 25 | static Local wrap(const std::shared_ptr &object); 26 | static Nan::Persistent EthereumLikeWallet_prototype; 27 | 28 | private: 29 | static NAN_METHOD(New); 30 | 31 | static NAN_METHOD(isNull); 32 | }; 33 | #endif //DJINNI_GENERATED_NJSETHEREUMLIKEWALLET_HPP 34 | -------------------------------------------------------------------------------- /src/NJSEthereumPublicKeyProvider.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from ethereum_public_key_provider.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSETHEREUMPUBLICKEYPROVIDER_HPP 5 | #define DJINNI_GENERATED_NJSETHEREUMPUBLICKEYPROVIDER_HPP 6 | 7 | 8 | #include 9 | #include 10 | #include "../include/EthereumPublicKeyProvider.hpp" 11 | 12 | using namespace v8; 13 | using namespace node; 14 | using namespace std; 15 | using namespace ledger::core::api; 16 | 17 | class NJSEthereumPublicKeyProvider: public ledger::core::api::EthereumPublicKeyProvider { 18 | public: 19 | 20 | static void Initialize(Local target); 21 | 22 | static Local wrap(const std::shared_ptr &object); 23 | static Nan::Persistent EthereumPublicKeyProvider_prototype; 24 | ~NJSEthereumPublicKeyProvider() 25 | { 26 | njs_impl.Reset(); 27 | }; 28 | NJSEthereumPublicKeyProvider(Local njs_implementation){njs_impl.Reset(njs_implementation);}; 29 | 30 | private: 31 | static NAN_METHOD(New); 32 | 33 | Nan::Persistent njs_impl; 34 | }; 35 | #endif //DJINNI_GENERATED_NJSETHEREUMPUBLICKEYPROVIDER_HPP 36 | -------------------------------------------------------------------------------- /src/NJSHexUtils.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni 3 | #ifndef DJINNI_GENERATED_NJSHEXUTILS_HPP 4 | #define DJINNI_GENERATED_NJSHEXUTILS_HPP 5 | 6 | #include 7 | 8 | #include 9 | #include 10 | 11 | namespace djinni 12 | { 13 | namespace js 14 | { 15 | 16 | namespace hex 17 | { 18 | std::vector toByteArray(const std::string &str); 19 | std::string toString(const std::vector& data); 20 | uint8_t digitToByte(char c); 21 | std::string toString(const std::vector& data, bool uppercase); 22 | char byteToDigit(uint8_t byte, bool uppercase); 23 | }; 24 | } //js 25 | } // djinni 26 | #endif //DJINNI_GENERATED_NJSHEXUTILS_HPP 27 | -------------------------------------------------------------------------------- /src/NJSKeychainCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSKEYCHAIN_HPP 5 | #define DJINNI_GENERATED_NJSKEYCHAIN_HPP 6 | 7 | 8 | #include 9 | #include 10 | 11 | #include 12 | #include 13 | #include "../include/Keychain.hpp" 14 | 15 | using namespace v8; 16 | using namespace node; 17 | using namespace std; 18 | using namespace ledger::core::api; 19 | 20 | class NJSKeychain final { 21 | public: 22 | 23 | static void Initialize(Local target); 24 | NJSKeychain() = delete; 25 | 26 | static Local wrap(const std::shared_ptr &object); 27 | static Nan::Persistent Keychain_prototype; 28 | 29 | private: 30 | /** Check whether an address is contained. */ 31 | static NAN_METHOD(contains); 32 | 33 | static NAN_METHOD(New); 34 | 35 | static NAN_METHOD(isNull); 36 | }; 37 | #endif //DJINNI_GENERATED_NJSKEYCHAIN_HPP 38 | -------------------------------------------------------------------------------- /src/NJSKeychainEnginesCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from configuration.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSKEYCHAINENGINES_HPP 5 | #define DJINNI_GENERATED_NJSKEYCHAINENGINES_HPP 6 | 7 | 8 | #include 9 | 10 | #include 11 | #include 12 | #include "../include/KeychainEngines.hpp" 13 | 14 | using namespace v8; 15 | using namespace node; 16 | using namespace std; 17 | using namespace ledger::core::api; 18 | 19 | class NJSKeychainEngines final { 20 | public: 21 | 22 | static void Initialize(Local target); 23 | NJSKeychainEngines() = delete; 24 | 25 | static Local wrap(const std::shared_ptr &object); 26 | static Nan::Persistent KeychainEngines_prototype; 27 | 28 | private: 29 | static NAN_METHOD(New); 30 | 31 | static NAN_METHOD(isNull); 32 | }; 33 | #endif //DJINNI_GENERATED_NJSKEYCHAINENGINES_HPP 34 | -------------------------------------------------------------------------------- /src/NJSLedgerCoreCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from core.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSLEDGERCORE_HPP 5 | #define DJINNI_GENERATED_NJSLEDGERCORE_HPP 6 | 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | #include 13 | #include 14 | #include "../include/LedgerCore.hpp" 15 | 16 | using namespace v8; 17 | using namespace node; 18 | using namespace std; 19 | using namespace ledger::core::api; 20 | 21 | class NJSLedgerCore final { 22 | public: 23 | 24 | static void Initialize(Local target); 25 | NJSLedgerCore() = delete; 26 | 27 | static Local wrap(const std::shared_ptr &object); 28 | static Nan::Persistent LedgerCore_prototype; 29 | 30 | private: 31 | /** 32 | * Gets the version of the library as a human readable string. 33 | * @return The version of the library (e.g. '1.0.1') 34 | */ 35 | static NAN_METHOD(getStringVersion); 36 | 37 | /** 38 | * Get the integer version of the Library 39 | * @return The integer version of the library 40 | */ 41 | static NAN_METHOD(getIntVersion); 42 | 43 | static NAN_METHOD(New); 44 | 45 | static NAN_METHOD(isNull); 46 | }; 47 | #endif //DJINNI_GENERATED_NJSLEDGERCORE_HPP 48 | -------------------------------------------------------------------------------- /src/NJSObjectWrapper.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni 3 | #ifndef DJINNI_GENERATED_NJSOBJECTWRAPPER_HPP 4 | #define DJINNI_GENERATED_NJSOBJECTWRAPPER_HPP 5 | 6 | #include 7 | 8 | #include 9 | #include 10 | 11 | namespace djinni 12 | { 13 | namespace js 14 | { 15 | 16 | template 17 | class ObjectWrapper: public Nan::ObjectWrap 18 | { 19 | public: 20 | static void Wrap(const std::shared_ptr& realObjectPtr, v8::Local newHandleExposedToJS) 21 | { 22 | auto wrapper = new ObjectWrapper(realObjectPtr); 23 | wrapper->Nan::ObjectWrap::Wrap(newHandleExposedToJS); 24 | } 25 | static std::shared_ptr Unwrap(v8::Local handle) 26 | { 27 | return Nan::ObjectWrap::Unwrap>(handle)->_ptr; 28 | } 29 | private: 30 | explicit ObjectWrapper(const std::shared_ptr& realObjectPtr) : _ptr(realObjectPtr) {}; 31 | std::shared_ptr _ptr; 32 | }; 33 | } //js 34 | } // djinni 35 | #endif //DJINNI_GENERATED_NJSOBJECTWRAPPER_HPP 36 | -------------------------------------------------------------------------------- /src/NJSPoolConfigurationCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from configuration.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSPOOLCONFIGURATION_HPP 5 | #define DJINNI_GENERATED_NJSPOOLCONFIGURATION_HPP 6 | 7 | 8 | #include 9 | 10 | #include 11 | #include 12 | #include "../include/PoolConfiguration.hpp" 13 | 14 | using namespace v8; 15 | using namespace node; 16 | using namespace std; 17 | using namespace ledger::core::api; 18 | 19 | class NJSPoolConfiguration final { 20 | public: 21 | 22 | static void Initialize(Local target); 23 | NJSPoolConfiguration() = delete; 24 | 25 | static Local wrap(const std::shared_ptr &object); 26 | static Nan::Persistent PoolConfiguration_prototype; 27 | 28 | private: 29 | static NAN_METHOD(New); 30 | 31 | static NAN_METHOD(isNull); 32 | }; 33 | #endif //DJINNI_GENERATED_NJSPOOLCONFIGURATION_HPP 34 | -------------------------------------------------------------------------------- /src/NJSRippleConfigurationCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from ripple_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSRIPPLECONFIGURATION_HPP 5 | #define DJINNI_GENERATED_NJSRIPPLECONFIGURATION_HPP 6 | 7 | 8 | #include 9 | 10 | #include 11 | #include 12 | #include "../include/RippleConfiguration.hpp" 13 | 14 | using namespace v8; 15 | using namespace node; 16 | using namespace std; 17 | using namespace ledger::core::api; 18 | 19 | class NJSRippleConfiguration final { 20 | public: 21 | 22 | static void Initialize(Local target); 23 | NJSRippleConfiguration() = delete; 24 | 25 | static Local wrap(const std::shared_ptr &object); 26 | static Nan::Persistent RippleConfiguration_prototype; 27 | 28 | private: 29 | static NAN_METHOD(New); 30 | 31 | static NAN_METHOD(isNull); 32 | }; 33 | #endif //DJINNI_GENERATED_NJSRIPPLECONFIGURATION_HPP 34 | -------------------------------------------------------------------------------- /src/NJSRippleConfigurationDefaultsCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from ripple_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSRIPPLECONFIGURATIONDEFAULTS_HPP 5 | #define DJINNI_GENERATED_NJSRIPPLECONFIGURATIONDEFAULTS_HPP 6 | 7 | 8 | #include 9 | 10 | #include 11 | #include 12 | #include "../include/RippleConfigurationDefaults.hpp" 13 | 14 | using namespace v8; 15 | using namespace node; 16 | using namespace std; 17 | using namespace ledger::core::api; 18 | 19 | class NJSRippleConfigurationDefaults final { 20 | public: 21 | 22 | static void Initialize(Local target); 23 | NJSRippleConfigurationDefaults() = delete; 24 | 25 | static Local wrap(const std::shared_ptr &object); 26 | static Nan::Persistent RippleConfigurationDefaults_prototype; 27 | 28 | private: 29 | static NAN_METHOD(New); 30 | 31 | static NAN_METHOD(isNull); 32 | }; 33 | #endif //DJINNI_GENERATED_NJSRIPPLECONFIGURATIONDEFAULTS_HPP 34 | -------------------------------------------------------------------------------- /src/NJSRippleLikeOperationCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from ripple_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSRIPPLELIKEOPERATION_HPP 5 | #define DJINNI_GENERATED_NJSRIPPLELIKEOPERATION_HPP 6 | 7 | 8 | #include "NJSRippleLikeTransactionCpp.hpp" 9 | #include 10 | 11 | #include 12 | #include 13 | #include "../include/RippleLikeOperation.hpp" 14 | 15 | using namespace v8; 16 | using namespace node; 17 | using namespace std; 18 | using namespace ledger::core::api; 19 | 20 | class NJSRippleLikeOperation final { 21 | public: 22 | 23 | static void Initialize(Local target); 24 | NJSRippleLikeOperation() = delete; 25 | 26 | static Local wrap(const std::shared_ptr &object); 27 | static Nan::Persistent RippleLikeOperation_prototype; 28 | 29 | private: 30 | /** 31 | *Get operation's transaction 32 | *@return RippleLikeTransaction object 33 | */ 34 | static NAN_METHOD(getTransaction); 35 | 36 | static NAN_METHOD(New); 37 | 38 | static NAN_METHOD(isNull); 39 | }; 40 | #endif //DJINNI_GENERATED_NJSRIPPLELIKEOPERATION_HPP 41 | -------------------------------------------------------------------------------- /src/NJSRunnableCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from thread_dispatcher.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSRUNNABLE_HPP 5 | #define DJINNI_GENERATED_NJSRUNNABLE_HPP 6 | 7 | 8 | #include 9 | 10 | #include 11 | #include 12 | #include "../include/Runnable.hpp" 13 | 14 | using namespace v8; 15 | using namespace node; 16 | using namespace std; 17 | using namespace ledger::core::api; 18 | 19 | class NJSRunnable final { 20 | public: 21 | 22 | static void Initialize(Local target); 23 | NJSRunnable() = delete; 24 | 25 | static Local wrap(const std::shared_ptr &object); 26 | static Nan::Persistent Runnable_prototype; 27 | 28 | private: 29 | /**Trigger runnable execution */ 30 | static NAN_METHOD(run); 31 | 32 | static NAN_METHOD(New); 33 | 34 | static NAN_METHOD(isNull); 35 | }; 36 | #endif //DJINNI_GENERATED_NJSRUNNABLE_HPP 37 | -------------------------------------------------------------------------------- /src/NJSStellarConfigurationCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from configuration.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSSTELLARCONFIGURATION_HPP 5 | #define DJINNI_GENERATED_NJSSTELLARCONFIGURATION_HPP 6 | 7 | 8 | #include 9 | 10 | #include 11 | #include 12 | #include "../include/StellarConfiguration.hpp" 13 | 14 | using namespace v8; 15 | using namespace node; 16 | using namespace std; 17 | using namespace ledger::core::api; 18 | 19 | class NJSStellarConfiguration final { 20 | public: 21 | 22 | static void Initialize(Local target); 23 | NJSStellarConfiguration() = delete; 24 | 25 | static Local wrap(const std::shared_ptr &object); 26 | static Nan::Persistent StellarConfiguration_prototype; 27 | 28 | private: 29 | static NAN_METHOD(New); 30 | 31 | static NAN_METHOD(isNull); 32 | }; 33 | #endif //DJINNI_GENERATED_NJSSTELLARCONFIGURATION_HPP 34 | -------------------------------------------------------------------------------- /src/NJSStellarLikeAddressCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from addresses.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSSTELLARLIKEADDRESS_HPP 5 | #define DJINNI_GENERATED_NJSSTELLARLIKEADDRESS_HPP 6 | 7 | 8 | #include 9 | 10 | #include 11 | #include 12 | #include "../include/StellarLikeAddress.hpp" 13 | 14 | using namespace v8; 15 | using namespace node; 16 | using namespace std; 17 | using namespace ledger::core::api; 18 | 19 | class NJSStellarLikeAddress final { 20 | public: 21 | 22 | static void Initialize(Local target); 23 | NJSStellarLikeAddress() = delete; 24 | 25 | static Local wrap(const std::shared_ptr &object); 26 | static Nan::Persistent StellarLikeAddress_prototype; 27 | 28 | private: 29 | static NAN_METHOD(New); 30 | 31 | static NAN_METHOD(isNull); 32 | }; 33 | #endif //DJINNI_GENERATED_NJSSTELLARLIKEADDRESS_HPP 34 | -------------------------------------------------------------------------------- /src/NJSStellarLikeBlockCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from stellar_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSSTELLARLIKEBLOCK_HPP 5 | #define DJINNI_GENERATED_NJSSTELLARLIKEBLOCK_HPP 6 | 7 | 8 | #include 9 | 10 | #include 11 | #include 12 | #include "../include/StellarLikeBlock.hpp" 13 | 14 | using namespace v8; 15 | using namespace node; 16 | using namespace std; 17 | using namespace ledger::core::api; 18 | 19 | class NJSStellarLikeBlock final { 20 | public: 21 | 22 | static void Initialize(Local target); 23 | NJSStellarLikeBlock() = delete; 24 | 25 | static Local wrap(const std::shared_ptr &object); 26 | static Nan::Persistent StellarLikeBlock_prototype; 27 | 28 | private: 29 | static NAN_METHOD(New); 30 | 31 | static NAN_METHOD(isNull); 32 | }; 33 | #endif //DJINNI_GENERATED_NJSSTELLARLIKEBLOCK_HPP 34 | -------------------------------------------------------------------------------- /src/NJSStellarLikeWalletCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from stellar_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSSTELLARLIKEWALLET_HPP 5 | #define DJINNI_GENERATED_NJSSTELLARLIKEWALLET_HPP 6 | 7 | 8 | #include "NJSBoolCallback.hpp" 9 | #include 10 | #include 11 | 12 | #include 13 | #include 14 | #include "../include/StellarLikeWallet.hpp" 15 | 16 | using namespace v8; 17 | using namespace node; 18 | using namespace std; 19 | using namespace ledger::core::api; 20 | 21 | class NJSStellarLikeWallet final { 22 | public: 23 | 24 | static void Initialize(Local target); 25 | NJSStellarLikeWallet() = delete; 26 | 27 | static Local wrap(const std::shared_ptr &object); 28 | static Nan::Persistent StellarLikeWallet_prototype; 29 | 30 | private: 31 | static NAN_METHOD(exists); 32 | 33 | static NAN_METHOD(New); 34 | 35 | static NAN_METHOD(isNull); 36 | }; 37 | #endif //DJINNI_GENERATED_NJSSTELLARLIKEWALLET_HPP 38 | -------------------------------------------------------------------------------- /src/NJSSynchronizationEnginesCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from configuration.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSSYNCHRONIZATIONENGINES_HPP 5 | #define DJINNI_GENERATED_NJSSYNCHRONIZATIONENGINES_HPP 6 | 7 | 8 | #include 9 | 10 | #include 11 | #include 12 | #include "../include/SynchronizationEngines.hpp" 13 | 14 | using namespace v8; 15 | using namespace node; 16 | using namespace std; 17 | using namespace ledger::core::api; 18 | 19 | class NJSSynchronizationEngines final { 20 | public: 21 | 22 | static void Initialize(Local target); 23 | NJSSynchronizationEngines() = delete; 24 | 25 | static Local wrap(const std::shared_ptr &object); 26 | static Nan::Persistent SynchronizationEngines_prototype; 27 | 28 | private: 29 | static NAN_METHOD(New); 30 | 31 | static NAN_METHOD(isNull); 32 | }; 33 | #endif //DJINNI_GENERATED_NJSSYNCHRONIZATIONENGINES_HPP 34 | -------------------------------------------------------------------------------- /src/NJSSynchronizationStatusCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSSYNCHRONIZATIONSTATUS_HPP 5 | #define DJINNI_GENERATED_NJSSYNCHRONIZATIONSTATUS_HPP 6 | 7 | 8 | #include 9 | 10 | #include 11 | #include 12 | #include "../include/SynchronizationStatus.hpp" 13 | 14 | using namespace v8; 15 | using namespace node; 16 | using namespace std; 17 | using namespace ledger::core::api; 18 | 19 | class NJSSynchronizationStatus final { 20 | public: 21 | 22 | static void Initialize(Local target); 23 | NJSSynchronizationStatus() = delete; 24 | 25 | static Local wrap(const std::shared_ptr &object); 26 | static Nan::Persistent SynchronizationStatus_prototype; 27 | 28 | private: 29 | static NAN_METHOD(New); 30 | 31 | static NAN_METHOD(isNull); 32 | }; 33 | #endif //DJINNI_GENERATED_NJSSYNCHRONIZATIONSTATUS_HPP 34 | -------------------------------------------------------------------------------- /src/NJSSynchronizerEnginesCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from configuration.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSSYNCHRONIZERENGINES_HPP 5 | #define DJINNI_GENERATED_NJSSYNCHRONIZERENGINES_HPP 6 | 7 | 8 | #include 9 | 10 | #include 11 | #include 12 | #include "../include/SynchronizerEngines.hpp" 13 | 14 | using namespace v8; 15 | using namespace node; 16 | using namespace std; 17 | using namespace ledger::core::api; 18 | 19 | class NJSSynchronizerEngines final { 20 | public: 21 | 22 | static void Initialize(Local target); 23 | NJSSynchronizerEngines() = delete; 24 | 25 | static Local wrap(const std::shared_ptr &object); 26 | static Nan::Persistent SynchronizerEngines_prototype; 27 | 28 | private: 29 | static NAN_METHOD(New); 30 | 31 | static NAN_METHOD(isNull); 32 | }; 33 | #endif //DJINNI_GENERATED_NJSSYNCHRONIZERENGINES_HPP 34 | -------------------------------------------------------------------------------- /src/NJSTezosConfigurationCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from tezos_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSTEZOSCONFIGURATION_HPP 5 | #define DJINNI_GENERATED_NJSTEZOSCONFIGURATION_HPP 6 | 7 | 8 | #include 9 | 10 | #include 11 | #include 12 | #include "../include/TezosConfiguration.hpp" 13 | 14 | using namespace v8; 15 | using namespace node; 16 | using namespace std; 17 | using namespace ledger::core::api; 18 | 19 | class NJSTezosConfiguration final { 20 | public: 21 | 22 | static void Initialize(Local target); 23 | NJSTezosConfiguration() = delete; 24 | 25 | static Local wrap(const std::shared_ptr &object); 26 | static Nan::Persistent TezosConfiguration_prototype; 27 | 28 | private: 29 | static NAN_METHOD(New); 30 | 31 | static NAN_METHOD(isNull); 32 | }; 33 | #endif //DJINNI_GENERATED_NJSTEZOSCONFIGURATION_HPP 34 | -------------------------------------------------------------------------------- /src/NJSTezosConfigurationDefaultsCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from tezos_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSTEZOSCONFIGURATIONDEFAULTS_HPP 5 | #define DJINNI_GENERATED_NJSTEZOSCONFIGURATIONDEFAULTS_HPP 6 | 7 | 8 | #include 9 | 10 | #include 11 | #include 12 | #include "../include/TezosConfigurationDefaults.hpp" 13 | 14 | using namespace v8; 15 | using namespace node; 16 | using namespace std; 17 | using namespace ledger::core::api; 18 | 19 | class NJSTezosConfigurationDefaults final { 20 | public: 21 | 22 | static void Initialize(Local target); 23 | NJSTezosConfigurationDefaults() = delete; 24 | 25 | static Local wrap(const std::shared_ptr &object); 26 | static Nan::Persistent TezosConfigurationDefaults_prototype; 27 | 28 | private: 29 | static NAN_METHOD(New); 30 | 31 | static NAN_METHOD(isNull); 32 | }; 33 | #endif //DJINNI_GENERATED_NJSTEZOSCONFIGURATIONDEFAULTS_HPP 34 | -------------------------------------------------------------------------------- /src/NJSTezosLikeOperationCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from tezos_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSTEZOSLIKEOPERATION_HPP 5 | #define DJINNI_GENERATED_NJSTEZOSLIKEOPERATION_HPP 6 | 7 | 8 | #include "NJSTezosLikeTransactionCpp.hpp" 9 | #include 10 | 11 | #include 12 | #include 13 | #include "../include/TezosLikeOperation.hpp" 14 | 15 | using namespace v8; 16 | using namespace node; 17 | using namespace std; 18 | using namespace ledger::core::api; 19 | 20 | class NJSTezosLikeOperation final { 21 | public: 22 | 23 | static void Initialize(Local target); 24 | NJSTezosLikeOperation() = delete; 25 | 26 | static Local wrap(const std::shared_ptr &object); 27 | static Nan::Persistent TezosLikeOperation_prototype; 28 | 29 | private: 30 | /** 31 | *Get operation's transaction 32 | *@return TezosLikeTransaction object 33 | */ 34 | static NAN_METHOD(getTransaction); 35 | 36 | static NAN_METHOD(New); 37 | 38 | static NAN_METHOD(isNull); 39 | }; 40 | #endif //DJINNI_GENERATED_NJSTEZOSLIKEOPERATION_HPP 41 | -------------------------------------------------------------------------------- /src/NJSTezosLikeWalletCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from tezos_like_wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSTEZOSLIKEWALLET_HPP 5 | #define DJINNI_GENERATED_NJSTEZOSLIKEWALLET_HPP 6 | 7 | 8 | #include "NJSBoolCallback.hpp" 9 | #include 10 | #include 11 | 12 | #include 13 | #include 14 | #include "../include/TezosLikeWallet.hpp" 15 | 16 | using namespace v8; 17 | using namespace node; 18 | using namespace std; 19 | using namespace ledger::core::api; 20 | 21 | class NJSTezosLikeWallet final { 22 | public: 23 | 24 | static void Initialize(Local target); 25 | NJSTezosLikeWallet() = delete; 26 | 27 | static Local wrap(const std::shared_ptr &object); 28 | static Nan::Persistent TezosLikeWallet_prototype; 29 | 30 | private: 31 | static NAN_METHOD(isDelegate); 32 | 33 | static NAN_METHOD(New); 34 | 35 | static NAN_METHOD(isNull); 36 | }; 37 | #endif //DJINNI_GENERATED_NJSTEZOSLIKEWALLET_HPP 38 | -------------------------------------------------------------------------------- /src/NJSTrustIndicatorCpp.hpp: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE - DO NOT MODIFY! 2 | // This file generated by Djinni from wallet.djinni 3 | 4 | #ifndef DJINNI_GENERATED_NJSTRUSTINDICATOR_HPP 5 | #define DJINNI_GENERATED_NJSTRUSTINDICATOR_HPP 6 | 7 | 8 | #include "../include/TrustLevel.hpp" 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | #include 15 | #include 16 | #include "../include/TrustIndicator.hpp" 17 | 18 | using namespace v8; 19 | using namespace node; 20 | using namespace std; 21 | using namespace ledger::core::api; 22 | 23 | class NJSTrustIndicator final { 24 | public: 25 | 26 | static void Initialize(Local target); 27 | NJSTrustIndicator() = delete; 28 | 29 | static Local wrap(const std::shared_ptr &object); 30 | static Nan::Persistent TrustIndicator_prototype; 31 | 32 | private: 33 | static NAN_METHOD(getTrustWeight); 34 | 35 | static NAN_METHOD(getTrustLevel); 36 | 37 | static NAN_METHOD(getConflictingOperationUids); 38 | 39 | static NAN_METHOD(getOrigin); 40 | 41 | static NAN_METHOD(New); 42 | 43 | static NAN_METHOD(isNull); 44 | }; 45 | #endif //DJINNI_GENERATED_NJSTRUSTINDICATOR_HPP 46 | --------------------------------------------------------------------------------