@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,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.Fields = exports.Field = exports.FieldDefinition = void 0;
|
|
23
|
+
const errors = __importStar(require("../../core/errors"));
|
|
24
|
+
const typeExpressionParser_1 = require("./typeExpressionParser");
|
|
25
|
+
class FieldDefinition {
|
|
26
|
+
constructor(name, description, type) {
|
|
27
|
+
this.name = name;
|
|
28
|
+
this.description = description;
|
|
29
|
+
this.type = type;
|
|
30
|
+
}
|
|
31
|
+
static fromJSON(json) {
|
|
32
|
+
let parsedType = new typeExpressionParser_1.TypeExpressionParser().parse(json.type);
|
|
33
|
+
return new FieldDefinition(json.name, json.description, parsedType);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.FieldDefinition = FieldDefinition;
|
|
37
|
+
class Field {
|
|
38
|
+
constructor(value, name = "") {
|
|
39
|
+
this.value = value;
|
|
40
|
+
this.name = name;
|
|
41
|
+
}
|
|
42
|
+
checkTyping(expectedDefinition) {
|
|
43
|
+
const actualType = this.value.getType();
|
|
44
|
+
if (!actualType.equals(expectedDefinition.type)) {
|
|
45
|
+
throw new errors.ErrTypingSystem(`check type of field "${expectedDefinition.name}; expected: ${expectedDefinition.type}, actual: ${actualType}"`);
|
|
46
|
+
}
|
|
47
|
+
if (this.name != expectedDefinition.name) {
|
|
48
|
+
throw new errors.ErrTypingSystem(`check name of field "${expectedDefinition.name}"`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
equals(other) {
|
|
52
|
+
return this.name == other.name && this.value.equals(other.value);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.Field = Field;
|
|
56
|
+
class Fields {
|
|
57
|
+
static checkTyping(fields, definitions) {
|
|
58
|
+
if (fields.length != definitions.length) {
|
|
59
|
+
throw new errors.ErrTypingSystem("fields length vs. field definitions length");
|
|
60
|
+
}
|
|
61
|
+
for (let i = 0; i < fields.length; i++) {
|
|
62
|
+
let field = fields[i];
|
|
63
|
+
let definition = definitions[i];
|
|
64
|
+
field.checkTyping(definition);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
static equals(actual, expected) {
|
|
68
|
+
if (actual.length != expected.length) {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
for (let i = 0; i < actual.length; i++) {
|
|
72
|
+
let selfField = actual[i];
|
|
73
|
+
let otherField = expected[i];
|
|
74
|
+
if (!selfField.equals(otherField)) {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
static getNamesOfTypeDependencies(definitions) {
|
|
81
|
+
const dependencies = [];
|
|
82
|
+
for (const definition of definitions) {
|
|
83
|
+
dependencies.push(definition.type.getName());
|
|
84
|
+
dependencies.push(...definition.type.getNamesOfDependencies());
|
|
85
|
+
}
|
|
86
|
+
return [...new Set(dependencies)];
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
exports.Fields = Fields;
|
|
90
|
+
//# sourceMappingURL=fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../src/abi/typesystem/fields.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Type, TypedValue } from "./types";
|
|
2
|
+
export declare class OptionType extends Type {
|
|
3
|
+
static ClassName: string;
|
|
4
|
+
constructor(typeParameter: Type);
|
|
5
|
+
getClassName(): string;
|
|
6
|
+
isAssignableFrom(type: Type): boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare class ListType extends Type {
|
|
9
|
+
static ClassName: string;
|
|
10
|
+
constructor(typeParameter: Type);
|
|
11
|
+
getClassName(): string;
|
|
12
|
+
}
|
|
13
|
+
export declare class OptionValue extends TypedValue {
|
|
14
|
+
static ClassName: string;
|
|
15
|
+
private readonly value;
|
|
16
|
+
constructor(type: OptionType, value?: TypedValue | null);
|
|
17
|
+
getClassName(): string;
|
|
18
|
+
/**
|
|
19
|
+
* Creates an OptionValue, as a missing option argument.
|
|
20
|
+
*/
|
|
21
|
+
static newMissing(): OptionValue;
|
|
22
|
+
static newMissingTyped(type: Type): OptionValue;
|
|
23
|
+
/**
|
|
24
|
+
* Creates an OptionValue, as a provided option argument.
|
|
25
|
+
*/
|
|
26
|
+
static newProvided(typedValue: TypedValue): OptionValue;
|
|
27
|
+
isSet(): boolean;
|
|
28
|
+
getTypedValue(): TypedValue;
|
|
29
|
+
valueOf(): any;
|
|
30
|
+
equals(other: OptionValue): boolean;
|
|
31
|
+
}
|
|
32
|
+
export declare class List extends TypedValue {
|
|
33
|
+
static ClassName: string;
|
|
34
|
+
private readonly backingCollection;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @param type the type of this TypedValue (an instance of ListType), not the type parameter of the ListType
|
|
38
|
+
* @param items the items, having the type type.getFirstTypeParameter()
|
|
39
|
+
*/
|
|
40
|
+
constructor(type: ListType, items: TypedValue[]);
|
|
41
|
+
getClassName(): string;
|
|
42
|
+
static fromItems(items: TypedValue[]): List;
|
|
43
|
+
getLength(): number;
|
|
44
|
+
getItems(): ReadonlyArray<TypedValue>;
|
|
45
|
+
valueOf(): any[];
|
|
46
|
+
equals(other: List): boolean;
|
|
47
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.List = exports.OptionValue = exports.ListType = exports.OptionType = void 0;
|
|
4
|
+
const utils_1 = require("../../core/utils");
|
|
5
|
+
const collections_1 = require("./collections");
|
|
6
|
+
const types_1 = require("./types");
|
|
7
|
+
// TODO: Move to a new file, "genericOption.ts"
|
|
8
|
+
class OptionType extends types_1.Type {
|
|
9
|
+
constructor(typeParameter) {
|
|
10
|
+
super("Option", [typeParameter]);
|
|
11
|
+
}
|
|
12
|
+
getClassName() {
|
|
13
|
+
return OptionType.ClassName;
|
|
14
|
+
}
|
|
15
|
+
isAssignableFrom(type) {
|
|
16
|
+
if (!type.hasExactClass(OptionType.ClassName)) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
let invariantTypeParameters = this.getFirstTypeParameter().equals(type.getFirstTypeParameter());
|
|
20
|
+
let fakeCovarianceToNull = type.getFirstTypeParameter().hasExactClass(types_1.NullType.ClassName);
|
|
21
|
+
return invariantTypeParameters || fakeCovarianceToNull;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.OptionType = OptionType;
|
|
25
|
+
OptionType.ClassName = "OptionType";
|
|
26
|
+
// TODO: Move to a new file, "genericList.ts"
|
|
27
|
+
class ListType extends types_1.Type {
|
|
28
|
+
constructor(typeParameter) {
|
|
29
|
+
super("List", [typeParameter]);
|
|
30
|
+
}
|
|
31
|
+
getClassName() {
|
|
32
|
+
return ListType.ClassName;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.ListType = ListType;
|
|
36
|
+
ListType.ClassName = "ListType";
|
|
37
|
+
// TODO: Move to a new file, "genericOption.ts"
|
|
38
|
+
class OptionValue extends types_1.TypedValue {
|
|
39
|
+
constructor(type, value = null) {
|
|
40
|
+
super(type);
|
|
41
|
+
// TODO: assert value is of type type.getFirstTypeParameter()
|
|
42
|
+
this.value = value;
|
|
43
|
+
}
|
|
44
|
+
getClassName() {
|
|
45
|
+
return OptionValue.ClassName;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Creates an OptionValue, as a missing option argument.
|
|
49
|
+
*/
|
|
50
|
+
static newMissing() {
|
|
51
|
+
let type = new OptionType(new types_1.NullType());
|
|
52
|
+
return new OptionValue(type);
|
|
53
|
+
}
|
|
54
|
+
static newMissingTyped(type) {
|
|
55
|
+
return new OptionValue(new OptionType(type));
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Creates an OptionValue, as a provided option argument.
|
|
59
|
+
*/
|
|
60
|
+
static newProvided(typedValue) {
|
|
61
|
+
let type = new OptionType(typedValue.getType());
|
|
62
|
+
return new OptionValue(type, typedValue);
|
|
63
|
+
}
|
|
64
|
+
isSet() {
|
|
65
|
+
return this.value ? true : false;
|
|
66
|
+
}
|
|
67
|
+
getTypedValue() {
|
|
68
|
+
utils_1.guardValueIsSet("value", this.value);
|
|
69
|
+
return this.value;
|
|
70
|
+
}
|
|
71
|
+
valueOf() {
|
|
72
|
+
return this.value ? this.value.valueOf() : null;
|
|
73
|
+
}
|
|
74
|
+
equals(other) {
|
|
75
|
+
return this.value?.equals(other.value) || false;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
exports.OptionValue = OptionValue;
|
|
79
|
+
OptionValue.ClassName = "OptionValue";
|
|
80
|
+
// TODO: Move to a new file, "genericList.ts"
|
|
81
|
+
// TODO: Rename to ListValue, for consistency (though the term is slighly unfortunate).
|
|
82
|
+
// Question for review: or not?
|
|
83
|
+
class List extends types_1.TypedValue {
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
* @param type the type of this TypedValue (an instance of ListType), not the type parameter of the ListType
|
|
87
|
+
* @param items the items, having the type type.getFirstTypeParameter()
|
|
88
|
+
*/
|
|
89
|
+
constructor(type, items) {
|
|
90
|
+
super(type);
|
|
91
|
+
// TODO: assert items are of type type.getFirstTypeParameter()
|
|
92
|
+
this.backingCollection = new collections_1.CollectionOfTypedValues(items);
|
|
93
|
+
}
|
|
94
|
+
getClassName() {
|
|
95
|
+
return List.ClassName;
|
|
96
|
+
}
|
|
97
|
+
static fromItems(items) {
|
|
98
|
+
if (items.length == 0) {
|
|
99
|
+
return new List(new types_1.TypePlaceholder(), []);
|
|
100
|
+
}
|
|
101
|
+
let typeParameter = items[0].getType();
|
|
102
|
+
let listType = new ListType(typeParameter);
|
|
103
|
+
return new List(listType, items);
|
|
104
|
+
}
|
|
105
|
+
getLength() {
|
|
106
|
+
return this.backingCollection.getLength();
|
|
107
|
+
}
|
|
108
|
+
getItems() {
|
|
109
|
+
return this.backingCollection.getItems();
|
|
110
|
+
}
|
|
111
|
+
valueOf() {
|
|
112
|
+
return this.backingCollection.valueOf();
|
|
113
|
+
}
|
|
114
|
+
equals(other) {
|
|
115
|
+
return this.backingCollection.equals(other.backingCollection);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
exports.List = List;
|
|
119
|
+
List.ClassName = "List";
|
|
120
|
+
//# sourceMappingURL=generic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generic.js","sourceRoot":"","sources":["../../../src/abi/typesystem/generic.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Type, TypedValue } from "./types";
|
|
2
|
+
export declare class ArrayVecType extends Type {
|
|
3
|
+
static ClassName: string;
|
|
4
|
+
readonly length: number;
|
|
5
|
+
constructor(length: number, typeParameter: Type);
|
|
6
|
+
getClassName(): string;
|
|
7
|
+
}
|
|
8
|
+
export declare class ArrayVec extends TypedValue {
|
|
9
|
+
static ClassName: string;
|
|
10
|
+
private readonly backingCollection;
|
|
11
|
+
constructor(type: ArrayVecType, items: TypedValue[]);
|
|
12
|
+
getClassName(): string;
|
|
13
|
+
getLength(): number;
|
|
14
|
+
getItems(): ReadonlyArray<TypedValue>;
|
|
15
|
+
valueOf(): any[];
|
|
16
|
+
equals(other: ArrayVec): boolean;
|
|
17
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ArrayVec = exports.ArrayVecType = void 0;
|
|
4
|
+
const utils_1 = require("../../core/utils");
|
|
5
|
+
const collections_1 = require("./collections");
|
|
6
|
+
const types_1 = require("./types");
|
|
7
|
+
// A type for known-length arrays. E.g. "array20", "array32", "array64" etc.
|
|
8
|
+
class ArrayVecType extends types_1.Type {
|
|
9
|
+
constructor(length, typeParameter) {
|
|
10
|
+
super("Array", [typeParameter]);
|
|
11
|
+
utils_1.guardTrue(length > 0, "array length > 0");
|
|
12
|
+
this.length = length;
|
|
13
|
+
}
|
|
14
|
+
getClassName() {
|
|
15
|
+
return ArrayVecType.ClassName;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.ArrayVecType = ArrayVecType;
|
|
19
|
+
ArrayVecType.ClassName = "ArrayVecType";
|
|
20
|
+
class ArrayVec extends types_1.TypedValue {
|
|
21
|
+
constructor(type, items) {
|
|
22
|
+
super(type);
|
|
23
|
+
utils_1.guardLength(items, type.length);
|
|
24
|
+
this.backingCollection = new collections_1.CollectionOfTypedValues(items);
|
|
25
|
+
}
|
|
26
|
+
getClassName() {
|
|
27
|
+
return ArrayVec.ClassName;
|
|
28
|
+
}
|
|
29
|
+
getLength() {
|
|
30
|
+
return this.backingCollection.getLength();
|
|
31
|
+
}
|
|
32
|
+
getItems() {
|
|
33
|
+
return this.backingCollection.getItems();
|
|
34
|
+
}
|
|
35
|
+
valueOf() {
|
|
36
|
+
return this.backingCollection.valueOf();
|
|
37
|
+
}
|
|
38
|
+
equals(other) {
|
|
39
|
+
return this.backingCollection.equals(other.backingCollection);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.ArrayVec = ArrayVec;
|
|
43
|
+
ArrayVec.ClassName = "ArrayVec";
|
|
44
|
+
//# sourceMappingURL=genericArray.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"genericArray.js","sourceRoot":"","sources":["../../../src/abi/typesystem/genericArray.ts"],"names":[],"mappings":";;;AAAA,4CAA0D;AAC1D,+CAAwD;AACxD,mCAA2C;AAE3C,4EAA4E;AAC5E,MAAa,YAAa,SAAQ,YAAI;IAIlC,YAAY,MAAc,EAAE,aAAmB;QAC3C,KAAK,CAAC,OAAO,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;QAEhC,iBAAS,CAAC,MAAM,GAAG,CAAC,EAAE,kBAAkB,CAAC,CAAC;QAC1C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAED,YAAY;QACR,OAAO,YAAY,CAAC,SAAS,CAAC;IAClC,CAAC;;AAbL,oCAcC;AAbU,sBAAS,GAAG,cAAc,CAAC;AAetC,MAAa,QAAS,SAAQ,kBAAU;IAIpC,YAAY,IAAkB,EAAE,KAAmB;QAC/C,KAAK,CAAC,IAAI,CAAC,CAAC;QACZ,mBAAW,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,iBAAiB,GAAG,IAAI,qCAAuB,CAAC,KAAK,CAAC,CAAC;IAChE,CAAC;IAED,YAAY;QACR,OAAO,QAAQ,CAAC,SAAS,CAAC;IAC9B,CAAC;IAED,SAAS;QACL,OAAO,IAAI,CAAC,iBAAiB,CAAC,SAAS,EAAE,CAAC;IAC9C,CAAC;IAED,QAAQ;QACJ,OAAO,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,CAAC;IAC7C,CAAC;IAED,OAAO;QACH,OAAO,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,CAAC;IAC5C,CAAC;IAED,MAAM,CAAC,KAAe;QAClB,OAAO,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAClE,CAAC;;AA5BL,4BA6BC;AA5BU,kBAAS,GAAG,UAAU,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { PrimitiveType, PrimitiveValue } from "./types";
|
|
3
|
+
export declare class H256Type extends PrimitiveType {
|
|
4
|
+
static ClassName: string;
|
|
5
|
+
constructor();
|
|
6
|
+
getClassName(): string;
|
|
7
|
+
}
|
|
8
|
+
export declare class H256Value extends PrimitiveValue {
|
|
9
|
+
static ClassName: string;
|
|
10
|
+
private readonly value;
|
|
11
|
+
constructor(value: Buffer);
|
|
12
|
+
getClassName(): string;
|
|
13
|
+
/**
|
|
14
|
+
* Returns whether two objects have the same value.
|
|
15
|
+
*/
|
|
16
|
+
equals(other: H256Value): boolean;
|
|
17
|
+
valueOf(): Buffer;
|
|
18
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.H256Value = exports.H256Type = void 0;
|
|
4
|
+
const types_1 = require("./types");
|
|
5
|
+
class H256Type extends types_1.PrimitiveType {
|
|
6
|
+
constructor() {
|
|
7
|
+
super("H256");
|
|
8
|
+
}
|
|
9
|
+
getClassName() {
|
|
10
|
+
return H256Type.ClassName;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.H256Type = H256Type;
|
|
14
|
+
H256Type.ClassName = "H256Type";
|
|
15
|
+
class H256Value extends types_1.PrimitiveValue {
|
|
16
|
+
constructor(value) {
|
|
17
|
+
super(new H256Type());
|
|
18
|
+
this.value = value;
|
|
19
|
+
}
|
|
20
|
+
getClassName() {
|
|
21
|
+
return H256Value.ClassName;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Returns whether two objects have the same value.
|
|
25
|
+
*/
|
|
26
|
+
equals(other) {
|
|
27
|
+
return this.value.equals(other.value);
|
|
28
|
+
}
|
|
29
|
+
valueOf() {
|
|
30
|
+
return this.value;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.H256Value = H256Value;
|
|
34
|
+
H256Value.ClassName = "H256Value";
|
|
35
|
+
//# sourceMappingURL=h256.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"h256.js","sourceRoot":"","sources":["../../../src/abi/typesystem/h256.ts"],"names":[],"mappings":";;;AAAA,mCAAwD;AAExD,MAAa,QAAS,SAAQ,qBAAa;IAGvC;QACI,KAAK,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC;IAED,YAAY;QACR,OAAO,QAAQ,CAAC,SAAS,CAAC;IAC9B,CAAC;;AATL,4BAUC;AATU,kBAAS,GAAG,UAAU,CAAC;AAWlC,MAAa,SAAU,SAAQ,sBAAc;IAIzC,YAAY,KAAa;QACrB,KAAK,CAAC,IAAI,QAAQ,EAAE,CAAC,CAAC;QACtB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,YAAY;QACR,OAAO,SAAS,CAAC,SAAS,CAAC;IAC/B,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,KAAgB;QACnB,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC1C,CAAC;IAED,OAAO;QACH,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;;AAtBL,8BAuBC;AAtBU,mBAAS,GAAG,WAAW,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* @module typesystem
|
|
4
|
+
*/
|
|
5
|
+
export * from "./abi";
|
|
6
|
+
export * from "./address";
|
|
7
|
+
export * from "./algebraic";
|
|
8
|
+
export * from "./boolean";
|
|
9
|
+
export * from "./bytes";
|
|
10
|
+
export * from "./codeMetadata";
|
|
11
|
+
export * from "./composite";
|
|
12
|
+
export * from "./endpoint";
|
|
13
|
+
export * from "./enum";
|
|
14
|
+
export * from "./event";
|
|
15
|
+
export * from "./explicit-enum";
|
|
16
|
+
export * from "./factory";
|
|
17
|
+
export * from "./fields";
|
|
18
|
+
export * from "./generic";
|
|
19
|
+
export * from "./genericArray";
|
|
20
|
+
export * from "./h256";
|
|
21
|
+
export * from "./managedDecimal";
|
|
22
|
+
export * from "./managedDecimalSigned";
|
|
23
|
+
export * from "./matchers";
|
|
24
|
+
export * from "./nothing";
|
|
25
|
+
export * from "./numerical";
|
|
26
|
+
export * from "./string";
|
|
27
|
+
export * from "./struct";
|
|
28
|
+
export * from "./tokenIdentifier";
|
|
29
|
+
export * from "./tuple";
|
|
30
|
+
export * from "./typeExpressionParser";
|
|
31
|
+
export * from "./typeMapper";
|
|
32
|
+
export * from "./types";
|
|
33
|
+
export * from "./variadic";
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @packageDocumentation
|
|
4
|
+
* @module typesystem
|
|
5
|
+
*/
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./abi"), exports);
|
|
18
|
+
__exportStar(require("./address"), exports);
|
|
19
|
+
__exportStar(require("./algebraic"), exports);
|
|
20
|
+
__exportStar(require("./boolean"), exports);
|
|
21
|
+
__exportStar(require("./bytes"), exports);
|
|
22
|
+
__exportStar(require("./codeMetadata"), exports);
|
|
23
|
+
__exportStar(require("./composite"), exports);
|
|
24
|
+
__exportStar(require("./endpoint"), exports);
|
|
25
|
+
__exportStar(require("./enum"), exports);
|
|
26
|
+
__exportStar(require("./event"), exports);
|
|
27
|
+
__exportStar(require("./explicit-enum"), exports);
|
|
28
|
+
__exportStar(require("./factory"), exports);
|
|
29
|
+
__exportStar(require("./fields"), exports);
|
|
30
|
+
__exportStar(require("./generic"), exports);
|
|
31
|
+
__exportStar(require("./genericArray"), exports);
|
|
32
|
+
__exportStar(require("./h256"), exports);
|
|
33
|
+
__exportStar(require("./managedDecimal"), exports);
|
|
34
|
+
__exportStar(require("./managedDecimalSigned"), exports);
|
|
35
|
+
__exportStar(require("./matchers"), exports);
|
|
36
|
+
__exportStar(require("./nothing"), exports);
|
|
37
|
+
__exportStar(require("./numerical"), exports);
|
|
38
|
+
__exportStar(require("./string"), exports);
|
|
39
|
+
__exportStar(require("./struct"), exports);
|
|
40
|
+
__exportStar(require("./tokenIdentifier"), exports);
|
|
41
|
+
__exportStar(require("./tuple"), exports);
|
|
42
|
+
__exportStar(require("./typeExpressionParser"), exports);
|
|
43
|
+
__exportStar(require("./typeMapper"), exports);
|
|
44
|
+
__exportStar(require("./types"), exports);
|
|
45
|
+
__exportStar(require("./variadic"), exports);
|
|
46
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/abi/typesystem/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;AAEH,wCAAsB;AACtB,4CAA0B;AAC1B,8CAA4B;AAC5B,4CAA0B;AAC1B,0CAAwB;AACxB,iDAA+B;AAC/B,8CAA4B;AAC5B,6CAA2B;AAC3B,yCAAuB;AACvB,0CAAwB;AACxB,kDAAgC;AAChC,4CAA0B;AAC1B,2CAAyB;AACzB,4CAA0B;AAC1B,iDAA+B;AAC/B,yCAAuB;AACvB,mDAAiC;AACjC,yDAAuC;AACvC,6CAA2B;AAC3B,4CAA0B;AAC1B,8CAA4B;AAC5B,2CAAyB;AACzB,2CAAyB;AACzB,oDAAkC;AAClC,0CAAwB;AACxB,yDAAuC;AACvC,+CAA6B;AAC7B,0CAAwB;AACxB,6CAA2B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import BigNumber from "bignumber.js";
|
|
2
|
+
import { Type, TypedValue } from "./types";
|
|
3
|
+
export declare class ManagedDecimalType extends Type {
|
|
4
|
+
static ClassName: string;
|
|
5
|
+
constructor(metadata: number | "usize");
|
|
6
|
+
getClassName(): string;
|
|
7
|
+
getMetadata(): number | "usize";
|
|
8
|
+
isVariable(): boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare class ManagedDecimalValue extends TypedValue {
|
|
11
|
+
static ClassName: string;
|
|
12
|
+
private readonly value;
|
|
13
|
+
private readonly scale;
|
|
14
|
+
private readonly variable;
|
|
15
|
+
constructor(value: BigNumber.Value, scale: number, isVariable?: boolean);
|
|
16
|
+
getClassName(): string;
|
|
17
|
+
getScale(): number;
|
|
18
|
+
getPrecision(): number;
|
|
19
|
+
/**
|
|
20
|
+
* Returns whether two objects have the same value.
|
|
21
|
+
*/
|
|
22
|
+
equals(other: ManagedDecimalValue): boolean;
|
|
23
|
+
valueOf(): BigNumber;
|
|
24
|
+
toString(): string;
|
|
25
|
+
isVariable(): boolean;
|
|
26
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ManagedDecimalValue = exports.ManagedDecimalType = void 0;
|
|
7
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
8
|
+
const types_1 = require("./types");
|
|
9
|
+
class ManagedDecimalType extends types_1.Type {
|
|
10
|
+
constructor(metadata) {
|
|
11
|
+
super("ManagedDecimal", undefined, undefined, metadata);
|
|
12
|
+
}
|
|
13
|
+
getClassName() {
|
|
14
|
+
return ManagedDecimalType.ClassName;
|
|
15
|
+
}
|
|
16
|
+
getMetadata() {
|
|
17
|
+
return this.metadata;
|
|
18
|
+
}
|
|
19
|
+
isVariable() {
|
|
20
|
+
return this.metadata == "usize";
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.ManagedDecimalType = ManagedDecimalType;
|
|
24
|
+
ManagedDecimalType.ClassName = "ManagedDecimalType";
|
|
25
|
+
class ManagedDecimalValue extends types_1.TypedValue {
|
|
26
|
+
constructor(value, scale, isVariable = false) {
|
|
27
|
+
super(new ManagedDecimalType(isVariable ? "usize" : scale));
|
|
28
|
+
this.value = new bignumber_js_1.default(value);
|
|
29
|
+
this.scale = scale;
|
|
30
|
+
this.variable = isVariable;
|
|
31
|
+
}
|
|
32
|
+
getClassName() {
|
|
33
|
+
return ManagedDecimalValue.ClassName;
|
|
34
|
+
}
|
|
35
|
+
getScale() {
|
|
36
|
+
return this.scale;
|
|
37
|
+
}
|
|
38
|
+
getPrecision() {
|
|
39
|
+
return this.value.toFixed(this.scale).replace(".", "").length;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Returns whether two objects have the same value.
|
|
43
|
+
*/
|
|
44
|
+
equals(other) {
|
|
45
|
+
if (this.getPrecision() != other.getPrecision()) {
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
return new bignumber_js_1.default(this.value).eq(other.value);
|
|
49
|
+
}
|
|
50
|
+
valueOf() {
|
|
51
|
+
return this.value;
|
|
52
|
+
}
|
|
53
|
+
toString() {
|
|
54
|
+
return this.value.toFixed(this.scale);
|
|
55
|
+
}
|
|
56
|
+
isVariable() {
|
|
57
|
+
return this.variable;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.ManagedDecimalValue = ManagedDecimalValue;
|
|
61
|
+
ManagedDecimalValue.ClassName = "ManagedDecimalValue";
|
|
62
|
+
//# sourceMappingURL=managedDecimal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"managedDecimal.js","sourceRoot":"","sources":["../../../src/abi/typesystem/managedDecimal.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAqC;AACrC,mCAA2C;AAE3C,MAAa,kBAAmB,SAAQ,YAAI;IAGxC,YAAY,QAA0B;QAClC,KAAK,CAAC,gBAAgB,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC5D,CAAC;IAED,YAAY;QACR,OAAO,kBAAkB,CAAC,SAAS,CAAC;IACxC,CAAC;IAED,WAAW;QACP,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED,UAAU;QACN,OAAO,IAAI,CAAC,QAAQ,IAAI,OAAO,CAAC;IACpC,CAAC;;AAjBL,gDAkBC;AAjBU,4BAAS,GAAG,oBAAoB,CAAC;AAmB5C,MAAa,mBAAoB,SAAQ,kBAAU;IAM/C,YAAY,KAAsB,EAAE,KAAa,EAAE,aAAsB,KAAK;QAC1E,KAAK,CAAC,IAAI,kBAAkB,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QAC5D,IAAI,CAAC,KAAK,GAAG,IAAI,sBAAS,CAAC,KAAK,CAAC,CAAC;QAClC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAC;IAC/B,CAAC;IAED,YAAY;QACR,OAAO,mBAAmB,CAAC,SAAS,CAAC;IACzC,CAAC;IAED,QAAQ;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,YAAY;QACR,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC;IAClE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,KAA0B;QAC7B,IAAI,IAAI,CAAC,YAAY,EAAE,IAAI,KAAK,CAAC,YAAY,EAAE,EAAE;YAC7C,OAAO,KAAK,CAAC;SAChB;QAED,OAAO,IAAI,sBAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACrD,CAAC;IAED,OAAO;QACH,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,QAAQ;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1C,CAAC;IAED,UAAU;QACN,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;;AA9CL,kDA+CC;AA9CU,6BAAS,GAAG,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import BigNumber from "bignumber.js";
|
|
2
|
+
import { Type, TypedValue } from "./types";
|
|
3
|
+
export declare class ManagedDecimalSignedType extends Type {
|
|
4
|
+
static ClassName: string;
|
|
5
|
+
constructor(metadata: number | "usize");
|
|
6
|
+
getClassName(): string;
|
|
7
|
+
getMetadata(): number | "usize";
|
|
8
|
+
isVariable(): boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare class ManagedDecimalSignedValue extends TypedValue {
|
|
11
|
+
static ClassName: string;
|
|
12
|
+
private readonly value;
|
|
13
|
+
private readonly scale;
|
|
14
|
+
private readonly variable;
|
|
15
|
+
constructor(value: BigNumber.Value, scale: number, isVariable?: boolean);
|
|
16
|
+
getClassName(): string;
|
|
17
|
+
getPrecision(): number;
|
|
18
|
+
getScale(): number;
|
|
19
|
+
/**
|
|
20
|
+
* Returns whether two objects have the same value.
|
|
21
|
+
*/
|
|
22
|
+
equals(other: ManagedDecimalSignedValue): boolean;
|
|
23
|
+
valueOf(): BigNumber;
|
|
24
|
+
toString(): string;
|
|
25
|
+
isVariable(): boolean;
|
|
26
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ManagedDecimalSignedValue = exports.ManagedDecimalSignedType = void 0;
|
|
7
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
8
|
+
const types_1 = require("./types");
|
|
9
|
+
class ManagedDecimalSignedType extends types_1.Type {
|
|
10
|
+
constructor(metadata) {
|
|
11
|
+
super("ManagedDecimalSigned", undefined, undefined, metadata);
|
|
12
|
+
}
|
|
13
|
+
getClassName() {
|
|
14
|
+
return ManagedDecimalSignedType.ClassName;
|
|
15
|
+
}
|
|
16
|
+
getMetadata() {
|
|
17
|
+
return this.metadata;
|
|
18
|
+
}
|
|
19
|
+
isVariable() {
|
|
20
|
+
return this.metadata == "usize";
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.ManagedDecimalSignedType = ManagedDecimalSignedType;
|
|
24
|
+
ManagedDecimalSignedType.ClassName = "ManagedDecimalSignedType";
|
|
25
|
+
class ManagedDecimalSignedValue extends types_1.TypedValue {
|
|
26
|
+
constructor(value, scale, isVariable = false) {
|
|
27
|
+
super(new ManagedDecimalSignedType(isVariable ? "usize" : scale));
|
|
28
|
+
this.value = new bignumber_js_1.default(value);
|
|
29
|
+
this.scale = scale;
|
|
30
|
+
this.variable = isVariable;
|
|
31
|
+
}
|
|
32
|
+
getClassName() {
|
|
33
|
+
return ManagedDecimalSignedValue.ClassName;
|
|
34
|
+
}
|
|
35
|
+
getPrecision() {
|
|
36
|
+
return this.value.toFixed(this.scale).replace(".", "").length;
|
|
37
|
+
}
|
|
38
|
+
getScale() {
|
|
39
|
+
return this.scale;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Returns whether two objects have the same value.
|
|
43
|
+
*/
|
|
44
|
+
equals(other) {
|
|
45
|
+
if (this.getPrecision() != other.getPrecision()) {
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
return new bignumber_js_1.default(this.value).eq(other.value);
|
|
49
|
+
}
|
|
50
|
+
valueOf() {
|
|
51
|
+
return this.value;
|
|
52
|
+
}
|
|
53
|
+
toString() {
|
|
54
|
+
return this.value.toFixed(this.scale);
|
|
55
|
+
}
|
|
56
|
+
isVariable() {
|
|
57
|
+
return this.variable;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.ManagedDecimalSignedValue = ManagedDecimalSignedValue;
|
|
61
|
+
ManagedDecimalSignedValue.ClassName = "ManagedDecimalSignedValue";
|
|
62
|
+
//# sourceMappingURL=managedDecimalSigned.js.map
|