@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 @@
|
|
|
1
|
+
{"version":3,"file":"userWallet.js","sourceRoot":"","sources":["../../src/wallet/userWallet.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,2BAA2D;AAC3D,6CAAuD;AACvD,2CAA+C;AAC/C,2CAAqC;AACrC,2CAAwC;AACxC,qCAAmH;AACnH,gEAAsE;AACtE,yCAAsC;AACtC,yCAA0D;AAQ1D,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,yCAAuB,CAAA;IACvB,uCAAqB,CAAA;AACzB,CAAC,EAHW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAGzB;AAED,MAAa,UAAU;IAKnB,YAAoB,EAChB,IAAI,EACJ,aAAa,EACb,4BAA4B,GAK/B;QACG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,4BAA4B,GAAG,4BAA4B,CAAC;IACrE,CAAC;IAED,MAAM,CAAC,aAAa,CAAC,EACjB,SAAS,EACT,QAAQ,EACR,UAAU,GAKb;QACG,UAAU,GAAG,UAAU,IAAI,IAAI,mBAAU,EAAE,CAAC;QAE5C,MAAM,SAAS,GAAG,SAAS,CAAC,iBAAiB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AqB,sBAAa,CAAC,iBAAiB;QACrE,MAAM,YAAY,GAAG,iBAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YAC5C,CAAC,CAAC,cAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YAC1B,CAAC,CAAC,cAAO,CAAC,WAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;QAEpD,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAC5C,kBAAa,CAAC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;CACJ;AAzOD,gCAyOC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
export declare const VALIDATOR_SECRETKEY_LENGTH = 32;
|
|
3
|
+
export declare const VALIDATOR_PUBKEY_LENGTH = 96;
|
|
4
|
+
export declare class BLS {
|
|
5
|
+
private static isInitialized;
|
|
6
|
+
static bls: any;
|
|
7
|
+
private static loadBLSModule;
|
|
8
|
+
static initIfNecessary(): Promise<void>;
|
|
9
|
+
static guardInitialized(): void;
|
|
10
|
+
}
|
|
11
|
+
export declare class ValidatorSecretKey {
|
|
12
|
+
private readonly secretKey;
|
|
13
|
+
private readonly publicKey;
|
|
14
|
+
constructor(buffer: Buffer | Uint8Array);
|
|
15
|
+
static fromPem(text: string, index?: number): ValidatorSecretKey;
|
|
16
|
+
generatePublicKey(): ValidatorPublicKey;
|
|
17
|
+
sign(message: Buffer | Uint8Array): Buffer;
|
|
18
|
+
hex(): string;
|
|
19
|
+
valueOf(): Buffer;
|
|
20
|
+
}
|
|
21
|
+
export declare class ValidatorPublicKey {
|
|
22
|
+
private readonly buffer;
|
|
23
|
+
constructor(buffer: Buffer | Uint8Array);
|
|
24
|
+
hex(): string;
|
|
25
|
+
valueOf(): Buffer;
|
|
26
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ValidatorPublicKey = exports.ValidatorSecretKey = exports.BLS = exports.VALIDATOR_PUBKEY_LENGTH = exports.VALIDATOR_SECRETKEY_LENGTH = void 0;
|
|
4
|
+
const errors_1 = require("../core/errors");
|
|
5
|
+
const assertions_1 = require("./assertions");
|
|
6
|
+
const pem_1 = require("./pem");
|
|
7
|
+
exports.VALIDATOR_SECRETKEY_LENGTH = 32;
|
|
8
|
+
exports.VALIDATOR_PUBKEY_LENGTH = 96;
|
|
9
|
+
class BLS {
|
|
10
|
+
static loadBLSModule() {
|
|
11
|
+
if (!BLS.bls) {
|
|
12
|
+
try {
|
|
13
|
+
BLS.bls = require("@terradharitri/sdk-bls-wasm");
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
throw new Error("BLS module is required but not installed. Please install '@terradharitri/sdk-bls-wasm'.");
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
static async initIfNecessary() {
|
|
21
|
+
if (BLS.isInitialized) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
BLS.loadBLSModule();
|
|
25
|
+
await BLS.bls.init(BLS.bls.BLS12_381);
|
|
26
|
+
BLS.isInitialized = true;
|
|
27
|
+
}
|
|
28
|
+
static guardInitialized() {
|
|
29
|
+
if (!BLS.isInitialized) {
|
|
30
|
+
throw new errors_1.ErrInvariantFailed("BLS modules are not initalized. Make sure that 'await BLS.initIfNecessary()' is called correctly.");
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.BLS = BLS;
|
|
35
|
+
BLS.isInitialized = false;
|
|
36
|
+
class ValidatorSecretKey {
|
|
37
|
+
constructor(buffer) {
|
|
38
|
+
BLS.guardInitialized();
|
|
39
|
+
assertions_1.guardLength(buffer, exports.VALIDATOR_SECRETKEY_LENGTH);
|
|
40
|
+
this.secretKey = new BLS.bls.SecretKey();
|
|
41
|
+
this.secretKey.setLittleEndian(Uint8Array.from(buffer));
|
|
42
|
+
this.publicKey = this.secretKey.getPublicKey();
|
|
43
|
+
}
|
|
44
|
+
static fromPem(text, index = 0) {
|
|
45
|
+
return pem_1.parseValidatorKey(text, index);
|
|
46
|
+
}
|
|
47
|
+
generatePublicKey() {
|
|
48
|
+
let buffer = Buffer.from(this.publicKey.serialize());
|
|
49
|
+
return new ValidatorPublicKey(buffer);
|
|
50
|
+
}
|
|
51
|
+
sign(message) {
|
|
52
|
+
let signatureObject = this.secretKey.sign(message);
|
|
53
|
+
let signature = Buffer.from(signatureObject.serialize());
|
|
54
|
+
return signature;
|
|
55
|
+
}
|
|
56
|
+
hex() {
|
|
57
|
+
return this.valueOf().toString("hex");
|
|
58
|
+
}
|
|
59
|
+
valueOf() {
|
|
60
|
+
return Buffer.from(this.secretKey.serialize());
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.ValidatorSecretKey = ValidatorSecretKey;
|
|
64
|
+
class ValidatorPublicKey {
|
|
65
|
+
constructor(buffer) {
|
|
66
|
+
assertions_1.guardLength(buffer, exports.VALIDATOR_PUBKEY_LENGTH);
|
|
67
|
+
this.buffer = Buffer.from(buffer);
|
|
68
|
+
}
|
|
69
|
+
hex() {
|
|
70
|
+
return this.buffer.toString("hex");
|
|
71
|
+
}
|
|
72
|
+
valueOf() {
|
|
73
|
+
return this.buffer;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
exports.ValidatorPublicKey = ValidatorPublicKey;
|
|
77
|
+
//# sourceMappingURL=validatorKeys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validatorKeys.js","sourceRoot":"","sources":["../../src/wallet/validatorKeys.ts"],"names":[],"mappings":";;;AAAA,2CAAoD;AACpD,6CAA2C;AAC3C,+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|
|
8
|
+
*/
|
|
9
|
+
signUsingPem(pemText: string, pemIndex: number | undefined, signable: Buffer | Uint8Array): Promise<Uint8Array>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ValidatorSigner = void 0;
|
|
4
|
+
const errors_1 = require("../core/errors");
|
|
5
|
+
const validatorKeys_1 = require("./validatorKeys");
|
|
6
|
+
/**
|
|
7
|
+
* Validator signer (BLS signer)
|
|
8
|
+
*/
|
|
9
|
+
class ValidatorSigner {
|
|
10
|
+
/**
|
|
11
|
+
* Signs a message.
|
|
12
|
+
*/
|
|
13
|
+
async signUsingPem(pemText, pemIndex = 0, signable) {
|
|
14
|
+
await validatorKeys_1.BLS.initIfNecessary();
|
|
15
|
+
try {
|
|
16
|
+
let secretKey = validatorKeys_1.ValidatorSecretKey.fromPem(pemText, pemIndex);
|
|
17
|
+
return secretKey.sign(signable);
|
|
18
|
+
}
|
|
19
|
+
catch (err) {
|
|
20
|
+
throw new errors_1.ErrSignerCannotSign(err);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.ValidatorSigner = ValidatorSigner;
|
|
25
|
+
//# sourceMappingURL=validatorSigner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validatorSigner.js","sourceRoot":"","sources":["../../src/wallet/validatorSigner.ts"],"names":[],"mappings":";;;AAAA,2CAAqD;AACrD,mDAA0D;AAE1D;;GAEG;AACH,MAAa,eAAe;IACxB;;OAEG;IACH,KAAK,CAAC,YAAY,CAAC,OAAe,EAAE,WAAmB,CAAC,EAAE,QAA6B;QACnF,MAAM,mBAAG,CAAC,eAAe,EAAE,CAAC;QAE5B,IAAI;YACA,IAAI,SAAS,GAAG,kCAAkB,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YAC9D,OAAO,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACnC;QAAC,OAAO,GAAQ,EAAE;YACf,MAAM,IAAI,4BAAmB,CAAC,GAAG,CAAC,CAAC;SACtC;IACL,CAAC;CACJ;AAdD,0CAcC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sravankumar02/sdk-core",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "DharitrI SDK for JavaScript and TypeScript",
|
|
5
|
+
"author": "DharitrI",
|
|
6
|
+
"homepage": "https://dharitri.org",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"repository": "github:terradharitri/drt-js-sdk-core",
|
|
9
|
+
"bugs": {
|
|
10
|
+
"url": "https://github.com/terradharitri/drt-js-sdk-core/issues"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"dharitri",
|
|
14
|
+
"sdk",
|
|
15
|
+
"blockchain"
|
|
16
|
+
],
|
|
17
|
+
"main": "out/index.js",
|
|
18
|
+
"types": "out/index.d.js",
|
|
19
|
+
"files": [
|
|
20
|
+
"out/**/*",
|
|
21
|
+
"out-browser/**/*"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"test": "npm run tests-unit",
|
|
25
|
+
"tests-unit": "mocha $(find . -name '*.spec.ts' ! -name '*.local.net.spec.*' ! -name '*.test.net.spec.*' ! -name '*.dev.net.spec.*' ! -name '*.main.net.spec.*')",
|
|
26
|
+
"tests-localnet": "mocha $(find . -name '*.local.net.spec.ts')",
|
|
27
|
+
"tests-testnet": "mocha $(find . -name '*.test.net.spec.ts')",
|
|
28
|
+
"tests-devnet": "mocha $(find . -name '*.dev.net.spec.ts')",
|
|
29
|
+
"tests-mainnet": "mocha $(find . -name '*.main.net.spec.ts')",
|
|
30
|
+
"compile-browser": "tsc -p tsconfig.json && browserify out/index.js -o out-browser/sdk-core.js --standalone dharitriSdkCore -p esmify",
|
|
31
|
+
"compile": "tsc -p tsconfig.json",
|
|
32
|
+
"compile-proto": "npx pbjs -t static-module -w default -o src/proto/compiled.js src/proto/transaction.proto",
|
|
33
|
+
"browser-tests": "make clean && make browser-tests && http-server --port=9876 -o browser-tests/index.html",
|
|
34
|
+
"lint": "eslint .",
|
|
35
|
+
"pretty": "prettier --write ./src/**/*.{js,ts}",
|
|
36
|
+
"pretest": "npm run compile",
|
|
37
|
+
"prepare": "npm run compile"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@terradharitri/sdk-transaction-decoder": "0.0.7",
|
|
41
|
+
"@noble/ed25519": "1.7.3",
|
|
42
|
+
"@noble/hashes": "1.3.0",
|
|
43
|
+
"bech32": "1.1.4",
|
|
44
|
+
"blake2b": "2.1.3",
|
|
45
|
+
"buffer": "6.0.3",
|
|
46
|
+
"ed25519-hd-key": "1.1.2",
|
|
47
|
+
"ed2curve": "0.3.0",
|
|
48
|
+
"json-bigint": "1.0.0",
|
|
49
|
+
"keccak": "3.0.2",
|
|
50
|
+
"scryptsy": "2.1.0",
|
|
51
|
+
"tweetnacl": "1.0.3",
|
|
52
|
+
"uuid": "8.3.2"
|
|
53
|
+
},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"@types/assert": "1.4.6",
|
|
56
|
+
"@types/chai": "4.2.11",
|
|
57
|
+
"@types/ed2curve": "0.2.2",
|
|
58
|
+
"@types/mocha": "9.1.0",
|
|
59
|
+
"@types/node": "13.13.2",
|
|
60
|
+
"@types/scryptsy": "2.0.0",
|
|
61
|
+
"@types/uuid": "8.3.0",
|
|
62
|
+
"@typescript-eslint/eslint-plugin": "5.44.0",
|
|
63
|
+
"@typescript-eslint/parser": "5.44.0",
|
|
64
|
+
"assert": "2.0.0",
|
|
65
|
+
"browserify": "17.0.0",
|
|
66
|
+
"chai": "4.2.0",
|
|
67
|
+
"eslint": "8.28.0",
|
|
68
|
+
"eslint-config-prettier": "9.1.0",
|
|
69
|
+
"mocha": "11.5.0",
|
|
70
|
+
"prettier": "3.2.4",
|
|
71
|
+
"protobufjs-cli": "1.1.2",
|
|
72
|
+
"ts-node": "9.1.1",
|
|
73
|
+
"typescript": "4.1.2"
|
|
74
|
+
},
|
|
75
|
+
"peerDependencies": {
|
|
76
|
+
"bignumber.js": "^9.0.1",
|
|
77
|
+
"protobufjs": "^7.2.6"
|
|
78
|
+
},
|
|
79
|
+
"optionalDependencies": {
|
|
80
|
+
"@terradharitri/sdk-bls-wasm": "0.0.3",
|
|
81
|
+
"axios": "^1.10.0",
|
|
82
|
+
"bip39": "3.1.0"
|
|
83
|
+
}
|
|
84
|
+
}
|