@sravankumar02/sdk-core 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +11 -0
- package/README.md +94 -0
- package/out/abi/argSerializer.d.ts +45 -0
- package/out/abi/argSerializer.js +171 -0
- package/out/abi/argSerializer.js.map +1 -0
- package/out/abi/argumentErrorContext.d.ts +12 -0
- package/out/abi/argumentErrorContext.js +34 -0
- package/out/abi/argumentErrorContext.js.map +1 -0
- package/out/abi/code.d.ts +23 -0
- package/out/abi/code.js +41 -0
- package/out/abi/code.js.map +1 -0
- package/out/abi/codec/address.d.ts +24 -0
- package/out/abi/codec/address.js +41 -0
- package/out/abi/codec/address.js.map +1 -0
- package/out/abi/codec/arrayVec.d.ts +11 -0
- package/out/abi/codec/arrayVec.js +39 -0
- package/out/abi/codec/arrayVec.js.map +1 -0
- package/out/abi/codec/binary.d.ts +30 -0
- package/out/abi/codec/binary.js +134 -0
- package/out/abi/codec/binary.js.map +1 -0
- package/out/abi/codec/binaryCodecUtils.d.ts +6 -0
- package/out/abi/codec/binaryCodecUtils.js +35 -0
- package/out/abi/codec/binaryCodecUtils.js.map +1 -0
- package/out/abi/codec/boolean.d.ts +13 -0
- package/out/abi/codec/boolean.js +57 -0
- package/out/abi/codec/boolean.js.map +1 -0
- package/out/abi/codec/bytes.d.ts +11 -0
- package/out/abi/codec/bytes.js +30 -0
- package/out/abi/codec/bytes.js.map +1 -0
- package/out/abi/codec/codemetadata.d.ts +8 -0
- package/out/abi/codec/codemetadata.js +23 -0
- package/out/abi/codec/codemetadata.js.map +1 -0
- package/out/abi/codec/constants.d.ts +1 -0
- package/out/abi/codec/constants.js +5 -0
- package/out/abi/codec/constants.js.map +1 -0
- package/out/abi/codec/enum.d.ts +13 -0
- package/out/abi/codec/enum.js +49 -0
- package/out/abi/codec/enum.js.map +1 -0
- package/out/abi/codec/explicit-enum.d.ts +10 -0
- package/out/abi/codec/explicit-enum.js +30 -0
- package/out/abi/codec/explicit-enum.js.map +1 -0
- package/out/abi/codec/fields.d.ts +9 -0
- package/out/abi/codec/fields.js +31 -0
- package/out/abi/codec/fields.js.map +1 -0
- package/out/abi/codec/h256.d.ts +24 -0
- package/out/abi/codec/h256.js +39 -0
- package/out/abi/codec/h256.js.map +1 -0
- package/out/abi/codec/index.d.ts +6 -0
- package/out/abi/codec/index.js +19 -0
- package/out/abi/codec/index.js.map +1 -0
- package/out/abi/codec/list.d.ts +14 -0
- package/out/abi/codec/list.js +67 -0
- package/out/abi/codec/list.js.map +1 -0
- package/out/abi/codec/managedDecimal.d.ts +11 -0
- package/out/abi/codec/managedDecimal.js +53 -0
- package/out/abi/codec/managedDecimal.js.map +1 -0
- package/out/abi/codec/managedDecimalSigned.d.ts +11 -0
- package/out/abi/codec/managedDecimalSigned.js +53 -0
- package/out/abi/codec/managedDecimalSigned.js.map +1 -0
- package/out/abi/codec/nothing.d.ts +8 -0
- package/out/abi/codec/nothing.js +20 -0
- package/out/abi/codec/nothing.js.map +1 -0
- package/out/abi/codec/numerical.d.ts +13 -0
- package/out/abi/codec/numerical.js +122 -0
- package/out/abi/codec/numerical.js.map +1 -0
- package/out/abi/codec/option.d.ts +14 -0
- package/out/abi/codec/option.js +66 -0
- package/out/abi/codec/option.js.map +1 -0
- package/out/abi/codec/primitive.d.ts +20 -0
- package/out/abi/codec/primitive.js +81 -0
- package/out/abi/codec/primitive.js.map +1 -0
- package/out/abi/codec/string.d.ts +9 -0
- package/out/abi/codec/string.js +28 -0
- package/out/abi/codec/string.js.map +1 -0
- package/out/abi/codec/struct.d.ts +11 -0
- package/out/abi/codec/struct.js +30 -0
- package/out/abi/codec/struct.js.map +1 -0
- package/out/abi/codec/tokenIdentifier.d.ts +9 -0
- package/out/abi/codec/tokenIdentifier.js +28 -0
- package/out/abi/codec/tokenIdentifier.js.map +1 -0
- package/out/abi/codec/tuple.d.ts +11 -0
- package/out/abi/codec/tuple.js +23 -0
- package/out/abi/codec/tuple.js.map +1 -0
- package/out/abi/codec/utils.d.ts +20 -0
- package/out/abi/codec/utils.js +69 -0
- package/out/abi/codec/utils.js.map +1 -0
- package/out/abi/function.d.ts +24 -0
- package/out/abi/function.js +56 -0
- package/out/abi/function.js.map +1 -0
- package/out/abi/index.d.ts +12 -0
- package/out/abi/index.js +25 -0
- package/out/abi/index.js.map +1 -0
- package/out/abi/interaction.d.ts +67 -0
- package/out/abi/interaction.js +146 -0
- package/out/abi/interaction.js.map +1 -0
- package/out/abi/interface.d.ts +85 -0
- package/out/abi/interface.js +3 -0
- package/out/abi/interface.js.map +1 -0
- package/out/abi/nativeSerializer.d.ts +27 -0
- package/out/abi/nativeSerializer.js +343 -0
- package/out/abi/nativeSerializer.js.map +1 -0
- package/out/abi/query.d.ts +18 -0
- package/out/abi/query.js +19 -0
- package/out/abi/query.js.map +1 -0
- package/out/abi/returnCode.d.ts +26 -0
- package/out/abi/returnCode.js +45 -0
- package/out/abi/returnCode.js.map +1 -0
- package/out/abi/smartContract.d.ts +74 -0
- package/out/abi/smartContract.js +208 -0
- package/out/abi/smartContract.js.map +1 -0
- package/out/abi/typeFormula.d.ts +7 -0
- package/out/abi/typeFormula.js +20 -0
- package/out/abi/typeFormula.js.map +1 -0
- package/out/abi/typeFormulaParser.d.ts +14 -0
- package/out/abi/typeFormulaParser.js +126 -0
- package/out/abi/typeFormulaParser.js.map +1 -0
- package/out/abi/typesystem/abi.d.ts +64 -0
- package/out/abi/typesystem/abi.js +208 -0
- package/out/abi/typesystem/abi.js.map +1 -0
- package/out/abi/typesystem/address.d.ts +23 -0
- package/out/abi/typesystem/address.js +41 -0
- package/out/abi/typesystem/address.js.map +1 -0
- package/out/abi/typesystem/algebraic.d.ts +24 -0
- package/out/abi/typesystem/algebraic.js +59 -0
- package/out/abi/typesystem/algebraic.js.map +1 -0
- package/out/abi/typesystem/boolean.d.ts +24 -0
- package/out/abi/typesystem/boolean.js +46 -0
- package/out/abi/typesystem/boolean.js.map +1 -0
- package/out/abi/typesystem/bytes.d.ts +28 -0
- package/out/abi/typesystem/bytes.js +58 -0
- package/out/abi/typesystem/bytes.js.map +1 -0
- package/out/abi/typesystem/codeMetadata.d.ts +11 -0
- package/out/abi/typesystem/codeMetadata.js +24 -0
- package/out/abi/typesystem/codeMetadata.js.map +1 -0
- package/out/abi/typesystem/collections.d.ts +9 -0
- package/out/abi/typesystem/collections.js +32 -0
- package/out/abi/typesystem/collections.js.map +1 -0
- package/out/abi/typesystem/composite.d.ts +16 -0
- package/out/abi/typesystem/composite.js +53 -0
- package/out/abi/typesystem/composite.js.map +1 -0
- package/out/abi/typesystem/endpoint.d.ts +41 -0
- package/out/abi/typesystem/endpoint.js +78 -0
- package/out/abi/typesystem/endpoint.js.map +1 -0
- package/out/abi/typesystem/enum.d.ts +51 -0
- package/out/abi/typesystem/enum.js +137 -0
- package/out/abi/typesystem/enum.js.map +1 -0
- package/out/abi/typesystem/event.d.ts +25 -0
- package/out/abi/typesystem/event.js +36 -0
- package/out/abi/typesystem/event.js.map +1 -0
- package/out/abi/typesystem/explicit-enum.d.ts +33 -0
- package/out/abi/typesystem/explicit-enum.js +63 -0
- package/out/abi/typesystem/explicit-enum.js.map +1 -0
- package/out/abi/typesystem/factory.d.ts +4 -0
- package/out/abi/typesystem/factory.js +19 -0
- package/out/abi/typesystem/factory.js.map +1 -0
- package/out/abi/typesystem/fields.d.ts +24 -0
- package/out/abi/typesystem/fields.js +90 -0
- package/out/abi/typesystem/fields.js.map +1 -0
- package/out/abi/typesystem/generic.d.ts +47 -0
- package/out/abi/typesystem/generic.js +120 -0
- package/out/abi/typesystem/generic.js.map +1 -0
- package/out/abi/typesystem/genericArray.d.ts +17 -0
- package/out/abi/typesystem/genericArray.js +44 -0
- package/out/abi/typesystem/genericArray.js.map +1 -0
- package/out/abi/typesystem/h256.d.ts +18 -0
- package/out/abi/typesystem/h256.js +35 -0
- package/out/abi/typesystem/h256.js.map +1 -0
- package/out/abi/typesystem/index.d.ts +33 -0
- package/out/abi/typesystem/index.js +46 -0
- package/out/abi/typesystem/index.js.map +1 -0
- package/out/abi/typesystem/managedDecimal.d.ts +26 -0
- package/out/abi/typesystem/managedDecimal.js +62 -0
- package/out/abi/typesystem/managedDecimal.js.map +1 -0
- package/out/abi/typesystem/managedDecimalSigned.d.ts +26 -0
- package/out/abi/typesystem/managedDecimalSigned.js +62 -0
- package/out/abi/typesystem/managedDecimalSigned.js.map +1 -0
- package/out/abi/typesystem/matchers.d.ts +51 -0
- package/out/abi/typesystem/matchers.js +185 -0
- package/out/abi/typesystem/matchers.js.map +1 -0
- package/out/abi/typesystem/nothing.d.ts +13 -0
- package/out/abi/typesystem/nothing.js +31 -0
- package/out/abi/typesystem/nothing.js.map +1 -0
- package/out/abi/typesystem/numerical.d.ts +130 -0
- package/out/abi/typesystem/numerical.js +286 -0
- package/out/abi/typesystem/numerical.js.map +1 -0
- package/out/abi/typesystem/string.d.ts +26 -0
- package/out/abi/typesystem/string.js +51 -0
- package/out/abi/typesystem/string.js.map +1 -0
- package/out/abi/typesystem/struct.d.ts +30 -0
- package/out/abi/typesystem/struct.js +78 -0
- package/out/abi/typesystem/struct.js.map +1 -0
- package/out/abi/typesystem/tokenIdentifier.d.ts +21 -0
- package/out/abi/typesystem/tokenIdentifier.js +51 -0
- package/out/abi/typesystem/tokenIdentifier.js.map +1 -0
- package/out/abi/typesystem/tuple.d.ts +16 -0
- package/out/abi/typesystem/tuple.js +71 -0
- package/out/abi/typesystem/tuple.js.map +1 -0
- package/out/abi/typesystem/typeExpressionParser.d.ts +8 -0
- package/out/abi/typesystem/typeExpressionParser.js +30 -0
- package/out/abi/typesystem/typeExpressionParser.js.map +1 -0
- package/out/abi/typesystem/typeMapper.d.ts +20 -0
- package/out/abi/typesystem/typeMapper.js +215 -0
- package/out/abi/typesystem/typeMapper.js.map +1 -0
- package/out/abi/typesystem/types.d.ts +129 -0
- package/out/abi/typesystem/types.js +285 -0
- package/out/abi/typesystem/types.js.map +1 -0
- package/out/abi/typesystem/variadic.d.ts +35 -0
- package/out/abi/typesystem/variadic.js +81 -0
- package/out/abi/typesystem/variadic.js.map +1 -0
- package/out/accountManagement/accountController.d.ts +18 -0
- package/out/accountManagement/accountController.js +54 -0
- package/out/accountManagement/accountController.js.map +1 -0
- package/out/accountManagement/accountTransactionsFactory.d.ts +27 -0
- package/out/accountManagement/accountTransactionsFactory.js +78 -0
- package/out/accountManagement/accountTransactionsFactory.js.map +1 -0
- package/out/accountManagement/index.d.ts +3 -0
- package/out/accountManagement/index.js +16 -0
- package/out/accountManagement/index.js.map +1 -0
- package/out/accountManagement/resources.d.ts +8 -0
- package/out/accountManagement/resources.js +3 -0
- package/out/accountManagement/resources.js.map +1 -0
- package/out/accounts/account.d.ts +94 -0
- package/out/accounts/account.js +154 -0
- package/out/accounts/account.js.map +1 -0
- package/out/accounts/index.d.ts +1 -0
- package/out/accounts/index.js +14 -0
- package/out/accounts/index.js.map +1 -0
- package/out/core/address.d.ts +105 -0
- package/out/core/address.js +313 -0
- package/out/core/address.js.map +1 -0
- package/out/core/asyncTimer.d.ts +27 -0
- package/out/core/asyncTimer.js +91 -0
- package/out/core/asyncTimer.js.map +1 -0
- package/out/core/baseController.d.ts +16 -0
- package/out/core/baseController.js +34 -0
- package/out/core/baseController.js.map +1 -0
- package/out/core/codeMetadata.d.ts +74 -0
- package/out/core/codeMetadata.js +146 -0
- package/out/core/codeMetadata.js.map +1 -0
- package/out/core/compatibility.d.ts +10 -0
- package/out/core/compatibility.js +22 -0
- package/out/core/compatibility.js.map +1 -0
- package/out/core/config.d.ts +15 -0
- package/out/core/config.js +20 -0
- package/out/core/config.js.map +1 -0
- package/out/core/constants.d.ts +28 -0
- package/out/core/constants.js +32 -0
- package/out/core/constants.js.map +1 -0
- package/out/core/errors.d.ts +279 -0
- package/out/core/errors.js +437 -0
- package/out/core/errors.js.map +1 -0
- package/out/core/globals.d.ts +0 -0
- package/out/core/globals.js +5 -0
- package/out/core/globals.js.map +1 -0
- package/out/core/index.d.ts +21 -0
- package/out/core/index.js +35 -0
- package/out/core/index.js.map +1 -0
- package/out/core/interfaces.d.ts +40 -0
- package/out/core/interfaces.js +3 -0
- package/out/core/interfaces.js.map +1 -0
- package/out/core/logger.d.ts +17 -0
- package/out/core/logger.js +50 -0
- package/out/core/logger.js.map +1 -0
- package/out/core/message.d.ts +57 -0
- package/out/core/message.js +71 -0
- package/out/core/message.js.map +1 -0
- package/out/core/networkParams.d.ts +57 -0
- package/out/core/networkParams.js +112 -0
- package/out/core/networkParams.js.map +1 -0
- package/out/core/reflection.d.ts +1 -0
- package/out/core/reflection.js +14 -0
- package/out/core/reflection.js.map +1 -0
- package/out/core/signature.d.ts +17 -0
- package/out/core/signature.js +82 -0
- package/out/core/signature.js.map +1 -0
- package/out/core/smartContractQuery.d.ts +35 -0
- package/out/core/smartContractQuery.js +34 -0
- package/out/core/smartContractQuery.js.map +1 -0
- package/out/core/tokenTransfersDataBuilder.d.ts +10 -0
- package/out/core/tokenTransfersDataBuilder.js +44 -0
- package/out/core/tokenTransfersDataBuilder.js.map +1 -0
- package/out/core/tokens.d.ts +130 -0
- package/out/core/tokens.js +287 -0
- package/out/core/tokens.js.map +1 -0
- package/out/core/transaction.d.ts +263 -0
- package/out/core/transaction.js +323 -0
- package/out/core/transaction.js.map +1 -0
- package/out/core/transactionBuilder.d.ts +32 -0
- package/out/core/transactionBuilder.js +45 -0
- package/out/core/transactionBuilder.js.map +1 -0
- package/out/core/transactionComputer.d.ts +51 -0
- package/out/core/transactionComputer.js +163 -0
- package/out/core/transactionComputer.js.map +1 -0
- package/out/core/transactionEvents.d.ts +17 -0
- package/out/core/transactionEvents.js +27 -0
- package/out/core/transactionEvents.js.map +1 -0
- package/out/core/transactionLogs.d.ts +11 -0
- package/out/core/transactionLogs.js +38 -0
- package/out/core/transactionLogs.js.map +1 -0
- package/out/core/transactionOnNetwork.d.ts +40 -0
- package/out/core/transactionOnNetwork.js +164 -0
- package/out/core/transactionOnNetwork.js.map +1 -0
- package/out/core/transactionStatus.d.ts +45 -0
- package/out/core/transactionStatus.js +71 -0
- package/out/core/transactionStatus.js.map +1 -0
- package/out/core/transactionWatcher.d.ts +48 -0
- package/out/core/transactionWatcher.js +148 -0
- package/out/core/transactionWatcher.js.map +1 -0
- package/out/core/transactionsFactoryConfig.d.ts +54 -0
- package/out/core/transactionsFactoryConfig.js +66 -0
- package/out/core/transactionsFactoryConfig.js.map +1 -0
- package/out/core/utils.codec.d.ts +8 -0
- package/out/core/utils.codec.js +75 -0
- package/out/core/utils.codec.js.map +1 -0
- package/out/core/utils.d.ts +20 -0
- package/out/core/utils.js +86 -0
- package/out/core/utils.js.map +1 -0
- package/out/delegation/delegationController.d.ts +37 -0
- package/out/delegation/delegationController.js +215 -0
- package/out/delegation/delegationController.js.map +1 -0
- package/out/delegation/delegationTransactionsFactory.d.ts +48 -0
- package/out/delegation/delegationTransactionsFactory.js +311 -0
- package/out/delegation/delegationTransactionsFactory.js.map +1 -0
- package/out/delegation/delegationTransactionsOutcomeParser.d.ts +10 -0
- package/out/delegation/delegationTransactionsOutcomeParser.js +35 -0
- package/out/delegation/delegationTransactionsOutcomeParser.js.map +1 -0
- package/out/delegation/index.d.ts +4 -0
- package/out/delegation/index.js +17 -0
- package/out/delegation/index.js.map +1 -0
- package/out/delegation/resources.d.ts +38 -0
- package/out/delegation/resources.js +3 -0
- package/out/delegation/resources.js.map +1 -0
- package/out/entrypoints/config.d.ts +29 -0
- package/out/entrypoints/config.js +36 -0
- package/out/entrypoints/config.js.map +1 -0
- package/out/entrypoints/entrypoints.d.ts +92 -0
- package/out/entrypoints/entrypoints.js +203 -0
- package/out/entrypoints/entrypoints.js.map +1 -0
- package/out/entrypoints/index.d.ts +2 -0
- package/out/entrypoints/index.js +15 -0
- package/out/entrypoints/index.js.map +1 -0
- package/out/governance/governanceController.d.ts +33 -0
- package/out/governance/governanceController.js +205 -0
- package/out/governance/governanceController.js.map +1 -0
- package/out/governance/governanceTransactionsFactory.d.ts +16 -0
- package/out/governance/governanceTransactionsFactory.js +99 -0
- package/out/governance/governanceTransactionsFactory.js.map +1 -0
- package/out/governance/governanceTransactionsOutcomeParser.d.ts +15 -0
- package/out/governance/governanceTransactionsOutcomeParser.js +99 -0
- package/out/governance/governanceTransactionsOutcomeParser.js.map +1 -0
- package/out/governance/index.d.ts +4 -0
- package/out/governance/index.js +17 -0
- package/out/governance/index.js.map +1 -0
- package/out/governance/resources.d.ts +82 -0
- package/out/governance/resources.js +11 -0
- package/out/governance/resources.js.map +1 -0
- package/out/index.d.ts +19 -0
- package/out/index.js +32 -0
- package/out/index.js.map +1 -0
- package/out/multisig/index.d.ts +3 -0
- package/out/multisig/index.js +16 -0
- package/out/multisig/index.js.map +1 -0
- package/out/multisig/multisigController.d.ts +221 -0
- package/out/multisig/multisigController.js +540 -0
- package/out/multisig/multisigController.js.map +1 -0
- package/out/multisig/multisigTransactionsFactory.d.ts +110 -0
- package/out/multisig/multisigTransactionsFactory.js +355 -0
- package/out/multisig/multisigTransactionsFactory.js.map +1 -0
- package/out/multisig/multisigTransactionsOutcomeParser.d.ts +31 -0
- package/out/multisig/multisigTransactionsOutcomeParser.js +41 -0
- package/out/multisig/multisigTransactionsOutcomeParser.js.map +1 -0
- package/out/multisig/proposeTransferExecuteContractInput.d.ts +32 -0
- package/out/multisig/proposeTransferExecuteContractInput.js +65 -0
- package/out/multisig/proposeTransferExecuteContractInput.js.map +1 -0
- package/out/multisig/resources.d.ts +182 -0
- package/out/multisig/resources.js +125 -0
- package/out/multisig/resources.js.map +1 -0
- package/out/networkProviders/accountAwaiter.d.ts +35 -0
- package/out/networkProviders/accountAwaiter.js +67 -0
- package/out/networkProviders/accountAwaiter.js.map +1 -0
- package/out/networkProviders/accounts.d.ts +55 -0
- package/out/networkProviders/accounts.js +154 -0
- package/out/networkProviders/accounts.js.map +1 -0
- package/out/networkProviders/apiNetworkProvider.d.ts +48 -0
- package/out/networkProviders/apiNetworkProvider.js +235 -0
- package/out/networkProviders/apiNetworkProvider.js.map +1 -0
- package/out/networkProviders/blocks.d.ts +48 -0
- package/out/networkProviders/blocks.js +76 -0
- package/out/networkProviders/blocks.js.map +1 -0
- package/out/networkProviders/config.d.ts +6 -0
- package/out/networkProviders/config.js +18 -0
- package/out/networkProviders/config.js.map +1 -0
- package/out/networkProviders/constants.d.ts +9 -0
- package/out/networkProviders/constants.js +16 -0
- package/out/networkProviders/constants.js.map +1 -0
- package/out/networkProviders/contractQueryRequest.d.ts +6 -0
- package/out/networkProviders/contractQueryRequest.js +20 -0
- package/out/networkProviders/contractQueryRequest.js.map +1 -0
- package/out/networkProviders/index.d.ts +11 -0
- package/out/networkProviders/index.js +28 -0
- package/out/networkProviders/index.js.map +1 -0
- package/out/networkProviders/interface.d.ts +110 -0
- package/out/networkProviders/interface.js +3 -0
- package/out/networkProviders/interface.js.map +1 -0
- package/out/networkProviders/networkConfig.d.ts +48 -0
- package/out/networkProviders/networkConfig.js +41 -0
- package/out/networkProviders/networkConfig.js.map +1 -0
- package/out/networkProviders/networkProviderConfig.d.ts +4 -0
- package/out/networkProviders/networkProviderConfig.js +3 -0
- package/out/networkProviders/networkProviderConfig.js.map +1 -0
- package/out/networkProviders/networkStatus.d.ts +31 -0
- package/out/networkProviders/networkStatus.js +31 -0
- package/out/networkProviders/networkStatus.js.map +1 -0
- package/out/networkProviders/proxyNetworkProvider.d.ts +51 -0
- package/out/networkProviders/proxyNetworkProvider.js +261 -0
- package/out/networkProviders/proxyNetworkProvider.js.map +1 -0
- package/out/networkProviders/resources.d.ts +12 -0
- package/out/networkProviders/resources.js +29 -0
- package/out/networkProviders/resources.js.map +1 -0
- package/out/networkProviders/tokenDefinitions.d.ts +49 -0
- package/out/networkProviders/tokenDefinitions.js +152 -0
- package/out/networkProviders/tokenDefinitions.js.map +1 -0
- package/out/networkProviders/tokens.d.ts +40 -0
- package/out/networkProviders/tokens.js +106 -0
- package/out/networkProviders/tokens.js.map +1 -0
- package/out/networkProviders/userAgent.d.ts +2 -0
- package/out/networkProviders/userAgent.js +30 -0
- package/out/networkProviders/userAgent.js.map +1 -0
- package/out/proto/compiled.d.ts +2 -0
- package/out/proto/compiled.js +719 -0
- package/out/proto/compiled.js.map +1 -0
- package/out/proto/index.d.ts +5 -0
- package/out/proto/index.js +18 -0
- package/out/proto/index.js.map +1 -0
- package/out/proto/serializer.d.ts +22 -0
- package/out/proto/serializer.js +114 -0
- package/out/proto/serializer.js.map +1 -0
- package/out/smartContracts/index.d.ts +4 -0
- package/out/smartContracts/index.js +17 -0
- package/out/smartContracts/index.js.map +1 -0
- package/out/smartContracts/resources.d.ts +38 -0
- package/out/smartContracts/resources.js +3 -0
- package/out/smartContracts/resources.js.map +1 -0
- package/out/smartContracts/smartContractController.d.ts +32 -0
- package/out/smartContracts/smartContractController.js +128 -0
- package/out/smartContracts/smartContractController.js.map +1 -0
- package/out/smartContracts/smartContractTransactionsFactory.d.ts +42 -0
- package/out/smartContracts/smartContractTransactionsFactory.js +165 -0
- package/out/smartContracts/smartContractTransactionsFactory.js.map +1 -0
- package/out/smartContracts/smartContractTransactionsOutcomeParser.d.ts +28 -0
- package/out/smartContracts/smartContractTransactionsOutcomeParser.js +189 -0
- package/out/smartContracts/smartContractTransactionsOutcomeParser.js.map +1 -0
- package/out/tokenManagement/index.d.ts +4 -0
- package/out/tokenManagement/index.js +17 -0
- package/out/tokenManagement/index.js.map +1 -0
- package/out/tokenManagement/resources.d.ts +220 -0
- package/out/tokenManagement/resources.js +3 -0
- package/out/tokenManagement/resources.js.map +1 -0
- package/out/tokenManagement/tokenManagementController.d.ts +108 -0
- package/out/tokenManagement/tokenManagementController.js +582 -0
- package/out/tokenManagement/tokenManagementController.js.map +1 -0
- package/out/tokenManagement/tokenManagementTransactionsFactory.d.ts +82 -0
- package/out/tokenManagement/tokenManagementTransactionsFactory.js +684 -0
- package/out/tokenManagement/tokenManagementTransactionsFactory.js.map +1 -0
- package/out/tokenManagement/tokenManagementTransactionsOutcomeParser.d.ts +109 -0
- package/out/tokenManagement/tokenManagementTransactionsOutcomeParser.js +356 -0
- package/out/tokenManagement/tokenManagementTransactionsOutcomeParser.js.map +1 -0
- package/out/tokenOperations/codec.d.ts +7 -0
- package/out/tokenOperations/codec.js +55 -0
- package/out/tokenOperations/codec.js.map +1 -0
- package/out/transactionsOutcomeParsers/index.d.ts +4 -0
- package/out/transactionsOutcomeParsers/index.js +17 -0
- package/out/transactionsOutcomeParsers/index.js.map +1 -0
- package/out/transactionsOutcomeParsers/resources.d.ts +23 -0
- package/out/transactionsOutcomeParsers/resources.js +48 -0
- package/out/transactionsOutcomeParsers/resources.js.map +1 -0
- package/out/transactionsOutcomeParsers/transactionEventsParser.d.ts +16 -0
- package/out/transactionsOutcomeParsers/transactionEventsParser.js +48 -0
- package/out/transactionsOutcomeParsers/transactionEventsParser.js.map +1 -0
- package/out/transfers/index.d.ts +3 -0
- package/out/transfers/index.js +16 -0
- package/out/transfers/index.js.map +1 -0
- package/out/transfers/resources.d.ts +17 -0
- package/out/transfers/resources.js +3 -0
- package/out/transfers/resources.js.map +1 -0
- package/out/transfers/transferTransactionsFactory.d.ts +32 -0
- package/out/transfers/transferTransactionsFactory.js +131 -0
- package/out/transfers/transferTransactionsFactory.js.map +1 -0
- package/out/transfers/transfersControllers.d.ts +11 -0
- package/out/transfers/transfersControllers.js +43 -0
- package/out/transfers/transfersControllers.js.map +1 -0
- package/out/wallet/assertions.d.ts +3 -0
- package/out/wallet/assertions.js +12 -0
- package/out/wallet/assertions.js.map +1 -0
- package/out/wallet/crypto/constants.d.ts +6 -0
- package/out/wallet/crypto/constants.js +11 -0
- package/out/wallet/crypto/constants.js.map +1 -0
- package/out/wallet/crypto/decryptor.d.ts +5 -0
- package/out/wallet/crypto/decryptor.js +29 -0
- package/out/wallet/crypto/decryptor.js.map +1 -0
- package/out/wallet/crypto/derivationParams.d.ts +23 -0
- package/out/wallet/crypto/derivationParams.js +38 -0
- package/out/wallet/crypto/derivationParams.js.map +1 -0
- package/out/wallet/crypto/encryptedData.d.ts +15 -0
- package/out/wallet/crypto/encryptedData.js +52 -0
- package/out/wallet/crypto/encryptedData.js.map +1 -0
- package/out/wallet/crypto/encryptor.d.ts +14 -0
- package/out/wallet/crypto/encryptor.js +39 -0
- package/out/wallet/crypto/encryptor.js.map +1 -0
- package/out/wallet/crypto/index.d.ts +7 -0
- package/out/wallet/crypto/index.js +20 -0
- package/out/wallet/crypto/index.js.map +1 -0
- package/out/wallet/crypto/pubkeyDecryptor.d.ts +6 -0
- package/out/wallet/crypto/pubkeyDecryptor.js +38 -0
- package/out/wallet/crypto/pubkeyDecryptor.js.map +1 -0
- package/out/wallet/crypto/pubkeyEncryptor.d.ts +6 -0
- package/out/wallet/crypto/pubkeyEncryptor.js +54 -0
- package/out/wallet/crypto/pubkeyEncryptor.js.map +1 -0
- package/out/wallet/crypto/randomness.d.ts +7 -0
- package/out/wallet/crypto/randomness.js +15 -0
- package/out/wallet/crypto/randomness.js.map +1 -0
- package/out/wallet/crypto/x25519EncryptedData.d.ts +15 -0
- package/out/wallet/crypto/x25519EncryptedData.js +37 -0
- package/out/wallet/crypto/x25519EncryptedData.js.map +1 -0
- package/out/wallet/index.d.ts +11 -0
- package/out/wallet/index.js +24 -0
- package/out/wallet/index.js.map +1 -0
- package/out/wallet/keypair.d.ts +12 -0
- package/out/wallet/keypair.js +32 -0
- package/out/wallet/keypair.js.map +1 -0
- package/out/wallet/mnemonic.d.ts +13 -0
- package/out/wallet/mnemonic.js +74 -0
- package/out/wallet/mnemonic.js.map +1 -0
- package/out/wallet/pem.d.ts +8 -0
- package/out/wallet/pem.js +60 -0
- package/out/wallet/pem.js.map +1 -0
- package/out/wallet/pemEntry.d.ts +10 -0
- package/out/wallet/pemEntry.js +73 -0
- package/out/wallet/pemEntry.js.map +1 -0
- package/out/wallet/userKeys.d.ts +23 -0
- package/out/wallet/userKeys.js +99 -0
- package/out/wallet/userKeys.js.map +1 -0
- package/out/wallet/userPem.d.ts +15 -0
- package/out/wallet/userPem.js +51 -0
- package/out/wallet/userPem.js.map +1 -0
- package/out/wallet/userSigner.d.ts +16 -0
- package/out/wallet/userSigner.js +41 -0
- package/out/wallet/userSigner.js.map +1 -0
- package/out/wallet/userVerifier.d.ts +18 -0
- package/out/wallet/userVerifier.js +27 -0
- package/out/wallet/userVerifier.js.map +1 -0
- package/out/wallet/userWallet.d.ts +54 -0
- package/out/wallet/userWallet.js +206 -0
- package/out/wallet/userWallet.js.map +1 -0
- package/out/wallet/validatorKeys.d.ts +26 -0
- package/out/wallet/validatorKeys.js +77 -0
- package/out/wallet/validatorKeys.js.map +1 -0
- package/out/wallet/validatorSigner.d.ts +10 -0
- package/out/wallet/validatorSigner.js +25 -0
- package/out/wallet/validatorSigner.js.map +1 -0
- package/package.json +84 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { Address, SmartContractQuery, SmartContractQueryResponse, Token, Transaction, TransactionOnNetwork, TransactionStatus } from "../core";
|
|
2
|
+
import { AccountOnNetwork, AccountStorage, AccountStorageEntry } from "./accounts";
|
|
3
|
+
import { NetworkConfig } from "./networkConfig";
|
|
4
|
+
import { NetworkStatus } from "./networkStatus";
|
|
5
|
+
import { AwaitingOptions, TransactionCostResponse } from "./resources";
|
|
6
|
+
import { DefinitionOfFungibleTokenOnNetwork, DefinitionOfTokenCollectionOnNetwork } from "./tokenDefinitions";
|
|
7
|
+
import { TokenAmountOnNetwork } from "./tokens";
|
|
8
|
+
/**
|
|
9
|
+
* An interface that defines the endpoints of an HTTP API Provider.
|
|
10
|
+
*/
|
|
11
|
+
export interface INetworkProvider {
|
|
12
|
+
/**
|
|
13
|
+
* Fetches the Network configuration.
|
|
14
|
+
*/
|
|
15
|
+
getNetworkConfig(): Promise<NetworkConfig>;
|
|
16
|
+
/**
|
|
17
|
+
* Fetches the Network status.
|
|
18
|
+
*/
|
|
19
|
+
getNetworkStatus(): Promise<NetworkStatus>;
|
|
20
|
+
/**
|
|
21
|
+
* Fetches the state of an account.
|
|
22
|
+
*/
|
|
23
|
+
getAccount(address: Address): Promise<AccountOnNetwork>;
|
|
24
|
+
/**
|
|
25
|
+
* Fetches the storage (key-value pairs) of an account.
|
|
26
|
+
*/
|
|
27
|
+
getAccountStorage(address: Address): Promise<AccountStorage>;
|
|
28
|
+
/**
|
|
29
|
+
* Fetches a specific storage entry of an account.
|
|
30
|
+
*/
|
|
31
|
+
getAccountStorageEntry(address: Address, entryKey: string): Promise<AccountStorageEntry>;
|
|
32
|
+
/**
|
|
33
|
+
* Waits until an account satisfies a given condition.
|
|
34
|
+
* Can throw:
|
|
35
|
+
* - ErrAwaitConditionNotReached
|
|
36
|
+
*/
|
|
37
|
+
awaitAccountOnCondition(address: Address, condition: (account: AccountOnNetwork) => boolean, options?: AwaitingOptions): Promise<AccountOnNetwork>;
|
|
38
|
+
/**
|
|
39
|
+
* Broadcasts an already-signed transaction.
|
|
40
|
+
*/
|
|
41
|
+
sendTransaction(tx: Transaction): Promise<string>;
|
|
42
|
+
/**
|
|
43
|
+
* Simulates the processing of an already-signed transaction. *
|
|
44
|
+
*/
|
|
45
|
+
simulateTransaction(tx: Transaction): Promise<TransactionOnNetwork>;
|
|
46
|
+
/**
|
|
47
|
+
* Estimates the cost of a transaction. *
|
|
48
|
+
*/
|
|
49
|
+
estimateTransactionCost(tx: Transaction): Promise<TransactionCostResponse>;
|
|
50
|
+
/**
|
|
51
|
+
* Broadcasts a list of already-signed transactions.
|
|
52
|
+
*/
|
|
53
|
+
sendTransactions(txs: Transaction[]): Promise<[number, string[]]>;
|
|
54
|
+
/**
|
|
55
|
+
* Fetches the state of a transaction.
|
|
56
|
+
*/
|
|
57
|
+
getTransaction(txHash: string, withProcessStatus?: boolean): Promise<TransactionOnNetwork>;
|
|
58
|
+
/**
|
|
59
|
+
* Fetches the status of a transaction.
|
|
60
|
+
*/
|
|
61
|
+
getTransactionStatus(txHash: string): Promise<TransactionStatus>;
|
|
62
|
+
/**
|
|
63
|
+
* Waits until the transaction is completely processed.
|
|
64
|
+
* Can throw:
|
|
65
|
+
* - ErrAwaitConditionNotReached
|
|
66
|
+
*/
|
|
67
|
+
awaitTransactionCompleted(transactionHash: string, options?: AwaitingOptions): Promise<TransactionOnNetwork>;
|
|
68
|
+
/**
|
|
69
|
+
* Waits until the transaction satisfies a given condition.
|
|
70
|
+
* Can throw:
|
|
71
|
+
* - ErrAwaitConditionNotReached
|
|
72
|
+
*/
|
|
73
|
+
awaitTransactionOnCondition(transactionHash: string, condition: (account: TransactionOnNetwork) => boolean, options?: AwaitingOptions): Promise<TransactionOnNetwork>;
|
|
74
|
+
/**
|
|
75
|
+
* Fetches the balance of an account, for a given token.
|
|
76
|
+
*/
|
|
77
|
+
getTokenOfAccount(address: Address, token: Token): Promise<TokenAmountOnNetwork>;
|
|
78
|
+
/**
|
|
79
|
+
* Fetches data about the fungible tokens held by an account.
|
|
80
|
+
*/
|
|
81
|
+
getFungibleTokensOfAccount(address: Address, pagination?: IPagination): Promise<TokenAmountOnNetwork[]>;
|
|
82
|
+
/**
|
|
83
|
+
* Fetches data about the non-fungible tokens held by account.
|
|
84
|
+
*/
|
|
85
|
+
getNonFungibleTokensOfAccount(address: Address, pagination?: IPagination): Promise<TokenAmountOnNetwork[]>;
|
|
86
|
+
/**
|
|
87
|
+
* Fetches the definition of a fungible token.
|
|
88
|
+
*/
|
|
89
|
+
getDefinitionOfFungibleToken(tokenIdentifier: string): Promise<DefinitionOfFungibleTokenOnNetwork>;
|
|
90
|
+
/**
|
|
91
|
+
* Fetches the definition of a SFT (including Meta DCDT) or NFT.
|
|
92
|
+
*/
|
|
93
|
+
getDefinitionOfTokenCollection(collection: string): Promise<DefinitionOfTokenCollectionOnNetwork>;
|
|
94
|
+
/**
|
|
95
|
+
* Queries a Smart Contract - runs a pure function defined by the contract and returns its results.
|
|
96
|
+
*/
|
|
97
|
+
queryContract(query: SmartContractQuery): Promise<SmartContractQueryResponse>;
|
|
98
|
+
/**
|
|
99
|
+
* Performs a generic GET action against the provider (useful for new HTTP endpoints).
|
|
100
|
+
*/
|
|
101
|
+
doGetGeneric(resourceUrl: string): Promise<any>;
|
|
102
|
+
/**
|
|
103
|
+
* Performs a generic POST action against the provider (useful for new HTTP endpoints).
|
|
104
|
+
*/
|
|
105
|
+
doPostGeneric(resourceUrl: string, payload: any): Promise<any>;
|
|
106
|
+
}
|
|
107
|
+
export interface IPagination {
|
|
108
|
+
from: number;
|
|
109
|
+
size: number;
|
|
110
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../src/networkProviders/interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An object holding Network configuration parameters.
|
|
3
|
+
*/
|
|
4
|
+
export declare class NetworkConfig {
|
|
5
|
+
raw: Record<string, any>;
|
|
6
|
+
/**
|
|
7
|
+
* The chain ID. E.g. "1" for the Mainnet.
|
|
8
|
+
*/
|
|
9
|
+
chainID: string;
|
|
10
|
+
/**
|
|
11
|
+
* The gas required by the Network to process a byte of the transaction data.
|
|
12
|
+
*/
|
|
13
|
+
gasPerDataByte: bigint;
|
|
14
|
+
gasPriceModifier: number;
|
|
15
|
+
/**
|
|
16
|
+
* The minimum gas limit required to be set when broadcasting a transaction.
|
|
17
|
+
*/
|
|
18
|
+
minGasLimit: bigint;
|
|
19
|
+
/**
|
|
20
|
+
* The minimum gas price required to be set when broadcasting a transaction.
|
|
21
|
+
*/
|
|
22
|
+
minGasPrice: bigint;
|
|
23
|
+
/**
|
|
24
|
+
* The extra gas needed for guarded transactions.
|
|
25
|
+
*/
|
|
26
|
+
extraGasLimitForGuardedTransactions: bigint;
|
|
27
|
+
/**
|
|
28
|
+
* The number of shards.
|
|
29
|
+
*/
|
|
30
|
+
numShards: number;
|
|
31
|
+
/**
|
|
32
|
+
* The round duration.
|
|
33
|
+
*/
|
|
34
|
+
roundDuration: number;
|
|
35
|
+
/**
|
|
36
|
+
* The number of rounds per epoch.
|
|
37
|
+
*/
|
|
38
|
+
numRoundsPerEpoch: number;
|
|
39
|
+
/**
|
|
40
|
+
* The genesis timestamp
|
|
41
|
+
*/
|
|
42
|
+
genesisTimestamp: number;
|
|
43
|
+
constructor();
|
|
44
|
+
/**
|
|
45
|
+
* Constructs a configuration object from a HTTP response (as returned by the provider).
|
|
46
|
+
*/
|
|
47
|
+
static fromHttpResponse(payload: any): NetworkConfig;
|
|
48
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NetworkConfig = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* An object holding Network configuration parameters.
|
|
6
|
+
*/
|
|
7
|
+
class NetworkConfig {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.raw = {};
|
|
10
|
+
this.chainID = "";
|
|
11
|
+
this.gasPerDataByte = 0n;
|
|
12
|
+
this.genesisTimestamp = 0;
|
|
13
|
+
this.roundDuration = 0;
|
|
14
|
+
this.numRoundsPerEpoch = 0;
|
|
15
|
+
this.minGasLimit = 0n;
|
|
16
|
+
this.minGasPrice = 0n;
|
|
17
|
+
this.extraGasLimitForGuardedTransactions = 0n;
|
|
18
|
+
this.gasPriceModifier = 1;
|
|
19
|
+
this.numShards = 0;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Constructs a configuration object from a HTTP response (as returned by the provider).
|
|
23
|
+
*/
|
|
24
|
+
static fromHttpResponse(payload) {
|
|
25
|
+
let networkConfig = new NetworkConfig();
|
|
26
|
+
networkConfig.raw = payload;
|
|
27
|
+
networkConfig.chainID = String(payload["drt_chain_id"]);
|
|
28
|
+
networkConfig.gasPerDataByte = BigInt(payload["drt_gas_per_data_byte"]);
|
|
29
|
+
networkConfig.gasPriceModifier = Number(payload["drt_top_up_factor"]);
|
|
30
|
+
networkConfig.minGasLimit = BigInt(payload["drt_min_gas_limit"]);
|
|
31
|
+
networkConfig.minGasPrice = BigInt(payload["drt_min_gas_price"]);
|
|
32
|
+
networkConfig.extraGasLimitForGuardedTransactions = BigInt(payload["drt_extra_gas_limit_guarded_tx"]);
|
|
33
|
+
networkConfig.numShards = Number(payload["drt_num_shards_without_meta"]);
|
|
34
|
+
networkConfig.roundDuration = Number(payload["drt_round_duration"]);
|
|
35
|
+
networkConfig.numRoundsPerEpoch = Number(payload["drt_rounds_per_epoch"]);
|
|
36
|
+
networkConfig.genesisTimestamp = Number(payload["drt_start_time"]);
|
|
37
|
+
return networkConfig;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.NetworkConfig = NetworkConfig;
|
|
41
|
+
//# sourceMappingURL=networkConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"networkConfig.js","sourceRoot":"","sources":["../../src/networkProviders/networkConfig.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,aAAa;IAgDtB;QA/CA,QAAG,GAAwB,EAAE,CAAC;QAgD1B,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAClB,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,gBAAgB,GAAG,CAAC,CAAC;QAC1B,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC;QACvB,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAC;QAC3B,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,mCAAmC,GAAG,EAAE,CAAC;QAC9C,IAAI,CAAC,gBAAgB,GAAG,CAAC,CAAC;QAC1B,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,OAAY;QAChC,IAAI,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC;QAExC,aAAa,CAAC,GAAG,GAAG,OAAO,CAAC;QAC5B,aAAa,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC;QACxD,aAAa,CAAC,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC,CAAC;QACxE,aAAa,CAAC,gBAAgB,GAAG,MAAM,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC;QACtE,aAAa,CAAC,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC;QACjE,aAAa,CAAC,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC;QACjE,aAAa,CAAC,mCAAmC,GAAG,MAAM,CAAC,OAAO,CAAC,gCAAgC,CAAC,CAAC,CAAC;QACtG,aAAa,CAAC,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,6BAA6B,CAAC,CAAC,CAAC;QACzE,aAAa,CAAC,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC;QACpE,aAAa,CAAC,iBAAiB,GAAG,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC,CAAC;QAC1E,aAAa,CAAC,gBAAgB,GAAG,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC;QAEnE,OAAO,aAAa,CAAC;IACzB,CAAC;CACJ;AAjFD,sCAiFC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"networkProviderConfig.js","sourceRoot":"","sources":["../../src/networkProviders/networkProviderConfig.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An object holding network status configuration parameters.
|
|
3
|
+
*/
|
|
4
|
+
export declare class NetworkStatus {
|
|
5
|
+
raw: Record<string, any>;
|
|
6
|
+
/**
|
|
7
|
+
* The block timestamp.
|
|
8
|
+
*/
|
|
9
|
+
blockTimestamp: number;
|
|
10
|
+
/**
|
|
11
|
+
* The block nonce.
|
|
12
|
+
*/
|
|
13
|
+
blockNonce: bigint;
|
|
14
|
+
/**
|
|
15
|
+
* The highest final nonce.
|
|
16
|
+
*/
|
|
17
|
+
highestFinalNonce: bigint;
|
|
18
|
+
/**
|
|
19
|
+
* The current round.
|
|
20
|
+
*/
|
|
21
|
+
currentRound: bigint;
|
|
22
|
+
/**
|
|
23
|
+
* The current epoch.
|
|
24
|
+
*/
|
|
25
|
+
currentEpoch: number;
|
|
26
|
+
constructor();
|
|
27
|
+
/**
|
|
28
|
+
* Constructs a configuration object from a HTTP response (as returned by the provider).
|
|
29
|
+
*/
|
|
30
|
+
static fromHttpResponse(payload: any): NetworkStatus;
|
|
31
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NetworkStatus = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* An object holding network status configuration parameters.
|
|
6
|
+
*/
|
|
7
|
+
class NetworkStatus {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.raw = {};
|
|
10
|
+
this.currentRound = 0n;
|
|
11
|
+
this.currentEpoch = 0;
|
|
12
|
+
this.highestFinalNonce = 0n;
|
|
13
|
+
this.blockNonce = 0n;
|
|
14
|
+
this.blockTimestamp = 0;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Constructs a configuration object from a HTTP response (as returned by the provider).
|
|
18
|
+
*/
|
|
19
|
+
static fromHttpResponse(payload) {
|
|
20
|
+
let networkStatus = new NetworkStatus();
|
|
21
|
+
networkStatus.raw = payload;
|
|
22
|
+
networkStatus.currentRound = BigInt(payload["drt_current_round"]);
|
|
23
|
+
networkStatus.currentEpoch = Number(payload["drt_epoch_number"]);
|
|
24
|
+
networkStatus.highestFinalNonce = BigInt(payload["drt_highest_final_nonce"]);
|
|
25
|
+
networkStatus.blockNonce = BigInt(payload["drt_nonce"]);
|
|
26
|
+
networkStatus.blockTimestamp = Number(payload["drt_block_timestamp"]);
|
|
27
|
+
return networkStatus;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.NetworkStatus = NetworkStatus;
|
|
31
|
+
//# sourceMappingURL=networkStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"networkStatus.js","sourceRoot":"","sources":["../../src/networkProviders/networkStatus.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,aAAa;IA4BtB;QA3BA,QAAG,GAAwB,EAAE,CAAC;QA4B1B,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QACvB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QACtB,IAAI,CAAC,iBAAiB,GAAG,EAAE,CAAC;QAC5B,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QACrB,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,OAAY;QAChC,IAAI,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC;QAExC,aAAa,CAAC,GAAG,GAAG,OAAO,CAAC;QAC5B,aAAa,CAAC,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC;QAClE,aAAa,CAAC,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC;QACjE,aAAa,CAAC,iBAAiB,GAAG,MAAM,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC,CAAC;QAC7E,aAAa,CAAC,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;QACxD,aAAa,CAAC,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,CAAC;QAEtE,OAAO,aAAa,CAAC;IACzB,CAAC;CACJ;AAnDD,sCAmDC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Address, SmartContractQuery, SmartContractQueryResponse, Token, Transaction, TransactionOnNetwork, TransactionStatus } from "../core";
|
|
2
|
+
import { AccountOnNetwork, AccountStorage, AccountStorageEntry, GuardianData } from "./accounts";
|
|
3
|
+
import { BlockOnNetwork } from "./blocks";
|
|
4
|
+
import { INetworkProvider } from "./interface";
|
|
5
|
+
import { NetworkConfig } from "./networkConfig";
|
|
6
|
+
import { NetworkProviderConfig } from "./networkProviderConfig";
|
|
7
|
+
import { NetworkStatus } from "./networkStatus";
|
|
8
|
+
import { AwaitingOptions, TransactionCostResponse } from "./resources";
|
|
9
|
+
import { DefinitionOfFungibleTokenOnNetwork, DefinitionOfTokenCollectionOnNetwork } from "./tokenDefinitions";
|
|
10
|
+
import { TokenAmountOnNetwork } from "./tokens";
|
|
11
|
+
export declare class ProxyNetworkProvider implements INetworkProvider {
|
|
12
|
+
private url;
|
|
13
|
+
private config;
|
|
14
|
+
private userAgentPrefix;
|
|
15
|
+
private axios;
|
|
16
|
+
constructor(url: string, config?: NetworkProviderConfig);
|
|
17
|
+
getNetworkConfig(): Promise<NetworkConfig>;
|
|
18
|
+
getNetworkStatus(shard?: number): Promise<NetworkStatus>;
|
|
19
|
+
getBlock(args: {
|
|
20
|
+
shard: number;
|
|
21
|
+
blockHash?: string;
|
|
22
|
+
blockNonce?: bigint;
|
|
23
|
+
}): Promise<BlockOnNetwork>;
|
|
24
|
+
getLatestBlock(shard?: number): Promise<BlockOnNetwork>;
|
|
25
|
+
getAccount(address: Address): Promise<AccountOnNetwork>;
|
|
26
|
+
getGuardianData(address: Address): Promise<GuardianData>;
|
|
27
|
+
getAccountStorage(address: Address): Promise<AccountStorage>;
|
|
28
|
+
getAccountStorageEntry(address: Address, entryKey: string): Promise<AccountStorageEntry>;
|
|
29
|
+
awaitAccountOnCondition(address: Address, condition: (account: AccountOnNetwork) => boolean, options?: AwaitingOptions): Promise<AccountOnNetwork>;
|
|
30
|
+
sendTransaction(tx: Transaction): Promise<string>;
|
|
31
|
+
simulateTransaction(tx: Transaction, checkSignature?: boolean): Promise<any>;
|
|
32
|
+
estimateTransactionCost(tx: Transaction): Promise<TransactionCostResponse>;
|
|
33
|
+
sendTransactions(txs: Transaction[]): Promise<[number, string[]]>;
|
|
34
|
+
getTransaction(txHash: string): Promise<TransactionOnNetwork>;
|
|
35
|
+
awaitTransactionOnCondition(transactionHash: string, condition: (account: TransactionOnNetwork) => boolean, options?: AwaitingOptions): Promise<TransactionOnNetwork>;
|
|
36
|
+
awaitTransactionCompleted(transactionHash: string, options?: AwaitingOptions): Promise<TransactionOnNetwork>;
|
|
37
|
+
getTokenOfAccount(address: Address, token: Token): Promise<TokenAmountOnNetwork>;
|
|
38
|
+
getFungibleTokensOfAccount(address: Address): Promise<TokenAmountOnNetwork[]>;
|
|
39
|
+
getNonFungibleTokensOfAccount(address: Address): Promise<TokenAmountOnNetwork[]>;
|
|
40
|
+
getTransactionStatus(txHash: string): Promise<TransactionStatus>;
|
|
41
|
+
getDefinitionOfFungibleToken(tokenIdentifier: string): Promise<DefinitionOfFungibleTokenOnNetwork>;
|
|
42
|
+
queryContract(query: SmartContractQuery): Promise<SmartContractQueryResponse>;
|
|
43
|
+
private getTokenProperties;
|
|
44
|
+
getDefinitionOfTokenCollection(collection: string): Promise<DefinitionOfTokenCollectionOnNetwork>;
|
|
45
|
+
doGetGeneric(resourceUrl: string): Promise<any>;
|
|
46
|
+
doPostGeneric(resourceUrl: string, payload: any): Promise<any>;
|
|
47
|
+
private doGet;
|
|
48
|
+
private doPost;
|
|
49
|
+
private buildUrlWithQueryParameters;
|
|
50
|
+
private handleApiError;
|
|
51
|
+
}
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProxyNetworkProvider = void 0;
|
|
4
|
+
const core_1 = require("../core");
|
|
5
|
+
const constants_1 = require("../core/constants");
|
|
6
|
+
const accountAwaiter_1 = require("./accountAwaiter");
|
|
7
|
+
const accounts_1 = require("./accounts");
|
|
8
|
+
const blocks_1 = require("./blocks");
|
|
9
|
+
const config_1 = require("./config");
|
|
10
|
+
const constants_2 = require("./constants");
|
|
11
|
+
const contractQueryRequest_1 = require("./contractQueryRequest");
|
|
12
|
+
const networkConfig_1 = require("./networkConfig");
|
|
13
|
+
const networkStatus_1 = require("./networkStatus");
|
|
14
|
+
const resources_1 = require("./resources");
|
|
15
|
+
const tokenDefinitions_1 = require("./tokenDefinitions");
|
|
16
|
+
const tokens_1 = require("./tokens");
|
|
17
|
+
const userAgent_1 = require("./userAgent");
|
|
18
|
+
// TODO: Find & remove duplicate code between "ProxyNetworkProvider" and "ApiNetworkProvider".
|
|
19
|
+
class ProxyNetworkProvider {
|
|
20
|
+
constructor(url, config) {
|
|
21
|
+
this.userAgentPrefix = `${constants_2.BaseUserAgent}/proxy`;
|
|
22
|
+
this.url = url;
|
|
23
|
+
this.config = { ...config_1.defaultAxiosConfig, ...config };
|
|
24
|
+
this.axios = core_1.getAxios();
|
|
25
|
+
userAgent_1.extendUserAgentIfBackend(this.userAgentPrefix, this.config);
|
|
26
|
+
}
|
|
27
|
+
async getNetworkConfig() {
|
|
28
|
+
const response = await this.doGetGeneric("network/config");
|
|
29
|
+
const networkConfig = networkConfig_1.NetworkConfig.fromHttpResponse(response.config);
|
|
30
|
+
return networkConfig;
|
|
31
|
+
}
|
|
32
|
+
async getNetworkStatus(shard = constants_1.METACHAIN_ID) {
|
|
33
|
+
const response = await this.doGetGeneric(`network/status/${shard}`);
|
|
34
|
+
const networkStatus = networkStatus_1.NetworkStatus.fromHttpResponse(response.status);
|
|
35
|
+
return networkStatus;
|
|
36
|
+
}
|
|
37
|
+
async getBlock(args) {
|
|
38
|
+
let response;
|
|
39
|
+
if (args.blockHash) {
|
|
40
|
+
response = await this.doGetGeneric(`block/${args.shard}/by-hash/${args.blockHash}`);
|
|
41
|
+
}
|
|
42
|
+
else if (args.blockNonce) {
|
|
43
|
+
response = await this.doGetGeneric(`block/${args.shard}/by-nonce/${args.blockNonce}`);
|
|
44
|
+
}
|
|
45
|
+
else
|
|
46
|
+
throw new Error("Block hash or block nonce not provided.");
|
|
47
|
+
return blocks_1.BlockOnNetwork.fromHttpResponse(response.block);
|
|
48
|
+
}
|
|
49
|
+
async getLatestBlock(shard = constants_1.METACHAIN_ID) {
|
|
50
|
+
const blockNonce = (await this.getNetworkStatus(shard)).blockNonce;
|
|
51
|
+
const response = await this.doGetGeneric(`block/${shard}/by-nonce/${blockNonce}`);
|
|
52
|
+
return blocks_1.BlockOnNetwork.fromHttpResponse(response);
|
|
53
|
+
}
|
|
54
|
+
async getAccount(address) {
|
|
55
|
+
const response = await this.doGetGeneric(`address/${address.toBech32()}`);
|
|
56
|
+
const account = accounts_1.AccountOnNetwork.fromProxyHttpResponse(response.account);
|
|
57
|
+
return account;
|
|
58
|
+
}
|
|
59
|
+
async getGuardianData(address) {
|
|
60
|
+
const response = await this.doGetGeneric(`address/${address.toBech32()}/guardian-data`);
|
|
61
|
+
const accountGuardian = accounts_1.GuardianData.fromHttpResponse(response.guardianData);
|
|
62
|
+
return accountGuardian;
|
|
63
|
+
}
|
|
64
|
+
async getAccountStorage(address) {
|
|
65
|
+
const response = await this.doGetGeneric(`address/${address.toBech32()}/keys`);
|
|
66
|
+
const account = accounts_1.AccountStorage.fromHttpResponse(response);
|
|
67
|
+
return account;
|
|
68
|
+
}
|
|
69
|
+
async getAccountStorageEntry(address, entryKey) {
|
|
70
|
+
const keyAsHex = Buffer.from(entryKey).toString("hex");
|
|
71
|
+
const response = await this.doGetGeneric(`address/${address.toBech32()}/key/${keyAsHex}`);
|
|
72
|
+
const account = accounts_1.AccountStorageEntry.fromHttpResponse(response, entryKey);
|
|
73
|
+
return account;
|
|
74
|
+
}
|
|
75
|
+
async awaitAccountOnCondition(address, condition, options) {
|
|
76
|
+
if (!options) {
|
|
77
|
+
options = new resources_1.AwaitingOptions();
|
|
78
|
+
}
|
|
79
|
+
const awaiter = new accountAwaiter_1.AccountAwaiter({
|
|
80
|
+
fetcher: this,
|
|
81
|
+
patienceTimeInMilliseconds: options.patienceInMilliseconds,
|
|
82
|
+
pollingIntervalInMilliseconds: options.pollingIntervalInMilliseconds,
|
|
83
|
+
timeoutIntervalInMilliseconds: options.timeoutInMilliseconds,
|
|
84
|
+
});
|
|
85
|
+
return await awaiter.awaitOnCondition(address, condition);
|
|
86
|
+
}
|
|
87
|
+
async sendTransaction(tx) {
|
|
88
|
+
const transaction = core_1.prepareTransactionForBroadcasting(tx);
|
|
89
|
+
const response = await this.doPostGeneric("transaction/send", transaction);
|
|
90
|
+
return response.txHash;
|
|
91
|
+
}
|
|
92
|
+
async simulateTransaction(tx, checkSignature = false) {
|
|
93
|
+
const transaction = core_1.prepareTransactionForBroadcasting(tx);
|
|
94
|
+
let url = "transaction/simulate?checkSignature=false";
|
|
95
|
+
if (checkSignature) {
|
|
96
|
+
url = "transaction/simulate";
|
|
97
|
+
}
|
|
98
|
+
const response = await this.doPostGeneric(url, transaction);
|
|
99
|
+
return core_1.TransactionOnNetwork.fromSimulateResponse(transaction, response["result"] ?? {});
|
|
100
|
+
}
|
|
101
|
+
async estimateTransactionCost(tx) {
|
|
102
|
+
const transaction = core_1.prepareTransactionForBroadcasting(tx);
|
|
103
|
+
const response = await this.doPostGeneric("transaction/cost", transaction);
|
|
104
|
+
return resources_1.TransactionCostResponse.fromHttpResponse(response);
|
|
105
|
+
}
|
|
106
|
+
async sendTransactions(txs) {
|
|
107
|
+
const data = txs.map((tx) => core_1.prepareTransactionForBroadcasting(tx));
|
|
108
|
+
const response = await this.doPostGeneric("transaction/send-multiple", data);
|
|
109
|
+
const numSent = Number(response["numOfSentTxs"] ?? 0);
|
|
110
|
+
const hashes = Array(txs.length).fill(null);
|
|
111
|
+
for (let i = 0; i < txs.length; i++) {
|
|
112
|
+
hashes[i] = response.txsHashes[i.toString()] || null;
|
|
113
|
+
}
|
|
114
|
+
return [numSent, hashes];
|
|
115
|
+
}
|
|
116
|
+
async getTransaction(txHash) {
|
|
117
|
+
const url = this.buildUrlWithQueryParameters(`transaction/${txHash}`, { withResults: "true" });
|
|
118
|
+
const [data, status] = await Promise.all([this.doGetGeneric(url), this.getTransactionStatus(txHash)]);
|
|
119
|
+
return core_1.TransactionOnNetwork.fromProxyHttpResponse(txHash, data.transaction, status);
|
|
120
|
+
}
|
|
121
|
+
async awaitTransactionOnCondition(transactionHash, condition, options) {
|
|
122
|
+
if (!options) {
|
|
123
|
+
options = new resources_1.AwaitingOptions();
|
|
124
|
+
}
|
|
125
|
+
const awaiter = new core_1.TransactionWatcher(this, {
|
|
126
|
+
patienceMilliseconds: options.patienceInMilliseconds,
|
|
127
|
+
pollingIntervalMilliseconds: options.pollingIntervalInMilliseconds,
|
|
128
|
+
timeoutMilliseconds: options.timeoutInMilliseconds,
|
|
129
|
+
});
|
|
130
|
+
return await awaiter.awaitOnCondition(transactionHash, condition);
|
|
131
|
+
}
|
|
132
|
+
async awaitTransactionCompleted(transactionHash, options) {
|
|
133
|
+
if (!options) {
|
|
134
|
+
options = new resources_1.AwaitingOptions();
|
|
135
|
+
}
|
|
136
|
+
const awaiter = new core_1.TransactionWatcher(this, {
|
|
137
|
+
patienceMilliseconds: options.patienceInMilliseconds,
|
|
138
|
+
pollingIntervalMilliseconds: options.pollingIntervalInMilliseconds,
|
|
139
|
+
timeoutMilliseconds: options.timeoutInMilliseconds,
|
|
140
|
+
});
|
|
141
|
+
return await awaiter.awaitCompleted(transactionHash);
|
|
142
|
+
}
|
|
143
|
+
async getTokenOfAccount(address, token) {
|
|
144
|
+
let response;
|
|
145
|
+
if (token.nonce === 0n) {
|
|
146
|
+
response = await this.doGetGeneric(`address/${address.toBech32()}/dcdt/${token.identifier}`);
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
response = await this.doGetGeneric(`address/${address.toBech32()}/nft/${token.identifier}/nonce/${token.nonce}`);
|
|
150
|
+
}
|
|
151
|
+
return tokens_1.TokenAmountOnNetwork.fromProxyResponse(response["tokenData"]);
|
|
152
|
+
}
|
|
153
|
+
async getFungibleTokensOfAccount(address) {
|
|
154
|
+
const url = `address/${address.toBech32()}/dcdt`;
|
|
155
|
+
const response = await this.doGetGeneric(url);
|
|
156
|
+
const responseItems = Object.values(response.dcdts);
|
|
157
|
+
// Skip NFTs / SFTs.
|
|
158
|
+
const responseItemsFiltered = responseItems.filter((item) => !item.nonce);
|
|
159
|
+
const tokens = responseItemsFiltered.map((item) => tokens_1.TokenAmountOnNetwork.fromProxyResponse(item));
|
|
160
|
+
return tokens;
|
|
161
|
+
}
|
|
162
|
+
async getNonFungibleTokensOfAccount(address) {
|
|
163
|
+
const url = `address/${address.toBech32()}/dcdt`;
|
|
164
|
+
const response = await this.doGetGeneric(url);
|
|
165
|
+
const responseItems = Object.values(response.dcdts);
|
|
166
|
+
// Skip fungible tokens.
|
|
167
|
+
const responseItemsFiltered = responseItems.filter((item) => item.nonce >= 0);
|
|
168
|
+
const tokens = responseItemsFiltered.map((item) => tokens_1.TokenAmountOnNetwork.fromProxyResponse(item));
|
|
169
|
+
return tokens;
|
|
170
|
+
}
|
|
171
|
+
async getTransactionStatus(txHash) {
|
|
172
|
+
const response = await this.doGetGeneric(`transaction/${txHash}/process-status`);
|
|
173
|
+
const status = new core_1.TransactionStatus(response.status);
|
|
174
|
+
return status;
|
|
175
|
+
}
|
|
176
|
+
async getDefinitionOfFungibleToken(tokenIdentifier) {
|
|
177
|
+
const properties = await this.getTokenProperties(tokenIdentifier);
|
|
178
|
+
const definition = tokenDefinitions_1.DefinitionOfFungibleTokenOnNetwork.fromResponseOfGetTokenProperties(tokenIdentifier, properties);
|
|
179
|
+
return definition;
|
|
180
|
+
}
|
|
181
|
+
async queryContract(query) {
|
|
182
|
+
try {
|
|
183
|
+
const request = new contractQueryRequest_1.ContractQueryRequest(query).toHttpRequest();
|
|
184
|
+
const response = await this.doPostGeneric("vm-values/query", request);
|
|
185
|
+
return core_1.SmartContractQueryResponse.fromHttpResponse(response.data, query.function);
|
|
186
|
+
}
|
|
187
|
+
catch (error) {
|
|
188
|
+
throw new core_1.ErrContractQuery(error);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
async getTokenProperties(identifier) {
|
|
192
|
+
const encodedIdentifier = Buffer.from(identifier);
|
|
193
|
+
const queryResponse = await this.queryContract({
|
|
194
|
+
contract: core_1.Address.newFromHex(constants_1.DCDT_CONTRACT_ADDRESS_HEX),
|
|
195
|
+
function: "getTokenProperties",
|
|
196
|
+
arguments: [new Uint8Array(encodedIdentifier)],
|
|
197
|
+
});
|
|
198
|
+
const properties = queryResponse.returnDataParts;
|
|
199
|
+
return properties?.map((prop) => Buffer.from(prop));
|
|
200
|
+
}
|
|
201
|
+
async getDefinitionOfTokenCollection(collection) {
|
|
202
|
+
const properties = await this.getTokenProperties(collection);
|
|
203
|
+
const definition = tokenDefinitions_1.DefinitionOfTokenCollectionOnNetwork.fromResponseOfGetTokenProperties(collection, properties);
|
|
204
|
+
return definition;
|
|
205
|
+
}
|
|
206
|
+
async doGetGeneric(resourceUrl) {
|
|
207
|
+
const response = await this.doGet(resourceUrl);
|
|
208
|
+
return response;
|
|
209
|
+
}
|
|
210
|
+
async doPostGeneric(resourceUrl, payload) {
|
|
211
|
+
const response = await this.doPost(resourceUrl, payload);
|
|
212
|
+
return response;
|
|
213
|
+
}
|
|
214
|
+
async doGet(resourceUrl) {
|
|
215
|
+
const url = `${this.url}/${resourceUrl}`;
|
|
216
|
+
try {
|
|
217
|
+
const response = await this.axios.default.get(url, this.config);
|
|
218
|
+
const payload = response.data.data;
|
|
219
|
+
return payload;
|
|
220
|
+
}
|
|
221
|
+
catch (error) {
|
|
222
|
+
this.handleApiError(error, resourceUrl);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
async doPost(resourceUrl, payload) {
|
|
226
|
+
const url = `${this.url}/${resourceUrl}`;
|
|
227
|
+
try {
|
|
228
|
+
const response = await this.axios.default.post(url, payload, {
|
|
229
|
+
...this.config,
|
|
230
|
+
headers: {
|
|
231
|
+
"Content-Type": "application/json",
|
|
232
|
+
...this.config.headers,
|
|
233
|
+
},
|
|
234
|
+
});
|
|
235
|
+
const responsePayload = response.data.data;
|
|
236
|
+
return responsePayload;
|
|
237
|
+
}
|
|
238
|
+
catch (error) {
|
|
239
|
+
this.handleApiError(error, resourceUrl);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
buildUrlWithQueryParameters(endpoint, params) {
|
|
243
|
+
const searchParams = new URLSearchParams();
|
|
244
|
+
for (let [key, value] of Object.entries(params)) {
|
|
245
|
+
if (value) {
|
|
246
|
+
searchParams.append(key, value);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
return `${endpoint}?${searchParams.toString()}`;
|
|
250
|
+
}
|
|
251
|
+
handleApiError(error, resourceUrl) {
|
|
252
|
+
if (!error.response) {
|
|
253
|
+
throw new core_1.ErrNetworkProvider(resourceUrl, error.toString(), error);
|
|
254
|
+
}
|
|
255
|
+
const errorData = error.response.data;
|
|
256
|
+
const originalErrorMessage = errorData.message || errorData.error || JSON.stringify(errorData);
|
|
257
|
+
throw new core_1.ErrNetworkProvider(resourceUrl, originalErrorMessage, error);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
exports.ProxyNetworkProvider = ProxyNetworkProvider;
|
|
261
|
+
//# sourceMappingURL=proxyNetworkProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proxyNetworkProvider.js","sourceRoot":"","sources":["../../src/networkProviders/proxyNetworkProvider.ts"],"names":[],"mappings":";;;AAAA,kCAaiB;AACjB,iDAA4E;AAC5E,qDAAkD;AAClD,yCAAiG;AACjG,qCAA0C;AAC1C,qCAA8C;AAC9C,2CAA4C;AAC5C,iEAA8D;AAE9D,mDAAgD;AAEhD,mDAAgD;AAChD,2CAAuE;AACvE,yDAA8G;AAC9G,qCAAgD;AAChD,2CAAuD;AAEvD,8FAA8F;AAC9F,MAAa,oBAAoB;IAM7B,YAAY,GAAW,EAAE,MAA8B;QAH/C,oBAAe,GAAG,GAAG,yBAAa,QA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;YACjB,MAAM,IAAI,yBAAkB,CAAC,WAAW,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,CAAC;SACtE;QAED,MAAM,SAAS,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC;QACtC,MAAM,oBAAoB,GAAG,SAAS,CAAC,OAAO,IAAI,SAAS,CAAC,KAAK,IAAI,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QAC/F,MAAM,IAAI,yBAAkB,CAAC,WAAW,EAAE,oBAAoB,EAAE,KAAK,CAAC,CAAC;IAC3E,CAAC;CACJ;AAxSD,oDAwSC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TransactionStatus } from "../core/transactionStatus";
|
|
2
|
+
export declare class AwaitingOptions {
|
|
3
|
+
pollingIntervalInMilliseconds: number;
|
|
4
|
+
timeoutInMilliseconds: number;
|
|
5
|
+
patienceInMilliseconds: number;
|
|
6
|
+
}
|
|
7
|
+
export declare class TransactionCostResponse {
|
|
8
|
+
raw: Record<string, any>;
|
|
9
|
+
gasLimit: number;
|
|
10
|
+
status: TransactionStatus;
|
|
11
|
+
static fromHttpResponse(payload: any): TransactionCostResponse;
|
|
12
|
+
}
|