@hiero-ledger/sdk 2.77.0 → 2.78.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/dist/umd.js +592 -592
- package/dist/umd.min.js +2 -2
- package/lib/Cache.cjs +6 -6
- package/lib/Cache.d.ts +12 -12
- package/lib/Cache.js.map +1 -1
- package/lib/Duration.cjs +1 -1
- package/lib/Duration.d.ts +2 -2
- package/lib/Duration.js.map +1 -1
- package/lib/EntityIdHelper.cjs +1 -1
- package/lib/EntityIdHelper.js +1 -1
- package/lib/EntityIdHelper.js.map +1 -1
- package/lib/EthereumFlow.cjs +7 -7
- package/lib/EthereumFlow.d.ts +14 -14
- package/lib/EthereumFlow.js.map +1 -1
- package/lib/EthereumTransaction.cjs +7 -7
- package/lib/EthereumTransaction.d.ts +14 -14
- package/lib/EthereumTransaction.js.map +1 -1
- package/lib/EvmAddress.cjs +1 -1
- package/lib/EvmAddress.d.ts +2 -2
- package/lib/EvmAddress.js.map +1 -1
- package/lib/ExchangeRate.cjs +2 -2
- package/lib/ExchangeRate.d.ts +4 -4
- package/lib/ExchangeRate.js.map +1 -1
- package/lib/ExchangeRates.cjs +1 -1
- package/lib/ExchangeRates.d.ts +1 -1
- package/lib/ExchangeRates.js +1 -1
- package/lib/ExchangeRates.js.map +1 -1
- package/lib/FeeComponents.cjs +1 -1
- package/lib/FeeComponents.d.ts +1 -1
- package/lib/FeeComponents.js +1 -1
- package/lib/FeeComponents.js.map +1 -1
- package/lib/FeeData.cjs +1 -1
- package/lib/FeeData.d.ts +1 -1
- package/lib/FeeData.js +1 -1
- package/lib/FeeData.js.map +1 -1
- package/lib/FeeDataType.cjs +1 -1
- package/lib/FeeDataType.d.ts +2 -2
- package/lib/FeeDataType.js.map +1 -1
- package/lib/FeeSchedule.cjs +1 -1
- package/lib/FeeSchedule.d.ts +1 -1
- package/lib/FeeSchedule.js +1 -1
- package/lib/FeeSchedule.js.map +1 -1
- package/lib/FeeSchedules.cjs +1 -1
- package/lib/FeeSchedules.d.ts +1 -1
- package/lib/FeeSchedules.js +1 -1
- package/lib/FeeSchedules.js.map +1 -1
- package/lib/FreezeType.cjs +1 -1
- package/lib/FreezeType.d.ts +2 -2
- package/lib/FreezeType.js.map +1 -1
- package/lib/Key.cjs +1 -1
- package/lib/Key.d.ts +2 -2
- package/lib/Key.js.map +1 -1
- package/lib/KeyList.cjs +3 -3
- package/lib/KeyList.d.ts +6 -6
- package/lib/KeyList.js.map +1 -1
- package/lib/Mnemonic.cjs +1 -1
- package/lib/Mnemonic.d.ts +1 -1
- package/lib/Mnemonic.js +1 -1
- package/lib/Mnemonic.js.map +1 -1
- package/lib/PrivateKey.cjs +7 -7
- package/lib/PrivateKey.d.ts +11 -11
- package/lib/PrivateKey.js +1 -1
- package/lib/PrivateKey.js.map +1 -1
- package/lib/PrngTransaction.cjs +9 -9
- package/lib/PrngTransaction.d.ts +18 -18
- package/lib/PrngTransaction.js.map +1 -1
- package/lib/PublicKey.cjs +5 -5
- package/lib/PublicKey.d.ts +9 -9
- package/lib/PublicKey.js +1 -1
- package/lib/PublicKey.js.map +1 -1
- package/lib/RequestType.cjs +1 -1
- package/lib/RequestType.d.ts +2 -2
- package/lib/RequestType.js.map +1 -1
- package/lib/StakingInfo.cjs +1 -1
- package/lib/StakingInfo.d.ts +1 -1
- package/lib/StakingInfo.js +1 -1
- package/lib/StakingInfo.js.map +1 -1
- package/lib/Status.cjs +1 -1
- package/lib/Status.d.ts +2 -2
- package/lib/Status.js.map +1 -1
- package/lib/Timestamp.cjs +1 -1
- package/lib/Timestamp.d.ts +1 -1
- package/lib/Timestamp.js.map +1 -1
- package/lib/TransactionFeeSchedule.cjs +1 -1
- package/lib/TransactionFeeSchedule.d.ts +1 -1
- package/lib/TransactionFeeSchedule.js +1 -1
- package/lib/TransactionFeeSchedule.js.map +1 -1
- package/lib/Transfer.cjs +2 -2
- package/lib/Transfer.d.ts +4 -4
- package/lib/Transfer.js.map +1 -1
- package/lib/account/AccountAllowanceAdjustTransaction.cjs +7 -7
- package/lib/account/AccountAllowanceAdjustTransaction.d.ts +14 -14
- package/lib/account/AccountAllowanceAdjustTransaction.js.map +1 -1
- package/lib/account/AccountAllowanceApproveTransaction.cjs +8 -8
- package/lib/account/AccountAllowanceApproveTransaction.d.ts +16 -16
- package/lib/account/AccountAllowanceApproveTransaction.js.map +1 -1
- package/lib/account/AccountAllowanceDeleteTransaction.cjs +7 -7
- package/lib/account/AccountAllowanceDeleteTransaction.d.ts +14 -14
- package/lib/account/AccountAllowanceDeleteTransaction.js.map +1 -1
- package/lib/account/AccountBalance.cjs +1 -1
- package/lib/account/AccountBalance.d.ts +1 -1
- package/lib/account/AccountBalance.js +1 -1
- package/lib/account/AccountBalance.js.map +1 -1
- package/lib/account/AccountBalanceQuery.cjs +6 -6
- package/lib/account/AccountBalanceQuery.d.ts +12 -12
- package/lib/account/AccountBalanceQuery.js.map +1 -1
- package/lib/account/AccountCreateTransaction.cjs +1 -1
- package/lib/account/AccountCreateTransaction.d.ts +1 -1
- package/lib/account/AccountCreateTransaction.js +1 -1
- package/lib/account/AccountCreateTransaction.js.map +1 -1
- package/lib/account/AccountDeleteTransaction.cjs +7 -7
- package/lib/account/AccountDeleteTransaction.d.ts +14 -14
- package/lib/account/AccountDeleteTransaction.js.map +1 -1
- package/lib/account/AccountId.cjs +1 -1
- package/lib/account/AccountId.d.ts +1 -1
- package/lib/account/AccountId.js +1 -1
- package/lib/account/AccountId.js.map +1 -1
- package/lib/account/AccountInfo.cjs +1 -1
- package/lib/account/AccountInfo.d.ts +1 -1
- package/lib/account/AccountInfo.js +1 -1
- package/lib/account/AccountInfo.js.map +1 -1
- package/lib/account/AccountInfoQuery.cjs +7 -7
- package/lib/account/AccountInfoQuery.d.ts +14 -14
- package/lib/account/AccountInfoQuery.js.map +1 -1
- package/lib/account/AccountRecordsQuery.cjs +7 -7
- package/lib/account/AccountRecordsQuery.d.ts +14 -14
- package/lib/account/AccountRecordsQuery.js.map +1 -1
- package/lib/account/AccountUpdateTransaction.cjs +7 -7
- package/lib/account/AccountUpdateTransaction.d.ts +14 -14
- package/lib/account/AccountUpdateTransaction.js.map +1 -1
- package/lib/account/HbarAllowance.cjs +3 -3
- package/lib/account/HbarAllowance.d.ts +6 -6
- package/lib/account/HbarAllowance.js.map +1 -1
- package/lib/account/HbarTransferMap.cjs +2 -2
- package/lib/account/HbarTransferMap.d.ts +4 -4
- package/lib/account/HbarTransferMap.js.map +1 -1
- package/lib/account/LiveHash.cjs +3 -3
- package/lib/account/LiveHash.d.ts +6 -6
- package/lib/account/LiveHash.js.map +1 -1
- package/lib/account/LiveHashAddTransaction.cjs +7 -7
- package/lib/account/LiveHashAddTransaction.d.ts +14 -14
- package/lib/account/LiveHashAddTransaction.js.map +1 -1
- package/lib/account/LiveHashDeleteTransaction.cjs +6 -6
- package/lib/account/LiveHashDeleteTransaction.d.ts +12 -12
- package/lib/account/LiveHashDeleteTransaction.js.map +1 -1
- package/lib/account/LiveHashQuery.cjs +7 -7
- package/lib/account/LiveHashQuery.d.ts +14 -14
- package/lib/account/LiveHashQuery.js.map +1 -1
- package/lib/account/NullableTokenDecimalMap.cjs +2 -2
- package/lib/account/NullableTokenDecimalMap.d.ts +4 -4
- package/lib/account/NullableTokenDecimalMap.js.map +1 -1
- package/lib/account/ProxyStaker.cjs +2 -2
- package/lib/account/ProxyStaker.d.ts +4 -4
- package/lib/account/ProxyStaker.js.map +1 -1
- package/lib/account/TokenAllowance.cjs +4 -4
- package/lib/account/TokenAllowance.d.ts +8 -8
- package/lib/account/TokenAllowance.js.map +1 -1
- package/lib/account/TokenBalanceMap.cjs +2 -2
- package/lib/account/TokenBalanceMap.d.ts +4 -4
- package/lib/account/TokenBalanceMap.js.map +1 -1
- package/lib/account/TokenDecimalMap.cjs +2 -2
- package/lib/account/TokenDecimalMap.d.ts +4 -4
- package/lib/account/TokenDecimalMap.js.map +1 -1
- package/lib/account/TokenNftAllowance.cjs +5 -5
- package/lib/account/TokenNftAllowance.d.ts +10 -10
- package/lib/account/TokenNftAllowance.js.map +1 -1
- package/lib/account/TokenNftTransferMap.cjs +5 -5
- package/lib/account/TokenNftTransferMap.d.ts +10 -10
- package/lib/account/TokenNftTransferMap.js.map +1 -1
- package/lib/account/TokenRelationship.cjs +4 -4
- package/lib/account/TokenRelationship.d.ts +8 -8
- package/lib/account/TokenRelationship.js.map +1 -1
- package/lib/account/TokenRelationshipMap.cjs +2 -2
- package/lib/account/TokenRelationshipMap.d.ts +4 -4
- package/lib/account/TokenRelationshipMap.js.map +1 -1
- package/lib/account/TokenTransferMap.cjs +4 -4
- package/lib/account/TokenTransferMap.d.ts +8 -8
- package/lib/account/TokenTransferMap.js.map +1 -1
- package/lib/account/TransferTransaction.cjs +6 -6
- package/lib/account/TransferTransaction.d.ts +12 -12
- package/lib/account/TransferTransaction.js.map +1 -1
- package/lib/address_book/AddressBooks.cjs +1 -1
- package/lib/address_book/AddressBooks.js +1 -1
- package/lib/address_book/AddressBooks.js.map +1 -1
- package/lib/address_book/Endpoint.cjs +1 -1
- package/lib/address_book/Endpoint.d.ts +2 -2
- package/lib/address_book/Endpoint.js.map +1 -1
- package/lib/address_book/NodeAddress.cjs +1 -1
- package/lib/address_book/NodeAddress.d.ts +2 -2
- package/lib/address_book/NodeAddress.js.map +1 -1
- package/lib/address_book/NodeAddressBook.cjs +1 -1
- package/lib/address_book/NodeAddressBook.d.ts +1 -1
- package/lib/address_book/NodeAddressBook.js +1 -1
- package/lib/address_book/NodeAddressBook.js.map +1 -1
- package/lib/browser.js +1 -1
- package/lib/channel/Channel.cjs +1 -1
- package/lib/channel/Channel.d.ts +1 -1
- package/lib/channel/Channel.js +1 -1
- package/lib/channel/Channel.js.map +1 -1
- package/lib/contract/ContractByteCodeQuery.cjs +6 -6
- package/lib/contract/ContractByteCodeQuery.d.ts +12 -12
- package/lib/contract/ContractByteCodeQuery.js.map +1 -1
- package/lib/contract/ContractCallQuery.cjs +1 -1
- package/lib/contract/ContractCallQuery.d.ts +1 -1
- package/lib/contract/ContractCallQuery.js +1 -1
- package/lib/contract/ContractCallQuery.js.map +1 -1
- package/lib/contract/ContractCreateTransaction.cjs +8 -8
- package/lib/contract/ContractCreateTransaction.d.ts +16 -16
- package/lib/contract/ContractCreateTransaction.js.map +1 -1
- package/lib/contract/ContractDeleteTransaction.cjs +8 -8
- package/lib/contract/ContractDeleteTransaction.d.ts +16 -16
- package/lib/contract/ContractDeleteTransaction.js.map +1 -1
- package/lib/contract/ContractExecuteTransaction.cjs +9 -9
- package/lib/contract/ContractExecuteTransaction.d.ts +18 -18
- package/lib/contract/ContractExecuteTransaction.js.map +1 -1
- package/lib/contract/ContractFunctionResult.cjs +2 -2
- package/lib/contract/ContractFunctionResult.d.ts +4 -4
- package/lib/contract/ContractFunctionResult.js.map +1 -1
- package/lib/contract/ContractId.cjs +1 -1
- package/lib/contract/ContractId.d.ts +1 -1
- package/lib/contract/ContractId.js +1 -1
- package/lib/contract/ContractId.js.map +1 -1
- package/lib/contract/ContractInfo.cjs +1 -1
- package/lib/contract/ContractInfo.d.ts +1 -1
- package/lib/contract/ContractInfo.js +1 -1
- package/lib/contract/ContractInfo.js.map +1 -1
- package/lib/contract/ContractInfoQuery.cjs +7 -7
- package/lib/contract/ContractInfoQuery.d.ts +14 -14
- package/lib/contract/ContractInfoQuery.js.map +1 -1
- package/lib/contract/ContractLogInfo.cjs +2 -2
- package/lib/contract/ContractLogInfo.d.ts +4 -4
- package/lib/contract/ContractLogInfo.js.map +1 -1
- package/lib/contract/ContractNonceInfo.cjs +3 -3
- package/lib/contract/ContractNonceInfo.d.ts +4 -4
- package/lib/contract/ContractNonceInfo.js +1 -1
- package/lib/contract/ContractNonceInfo.js.map +1 -1
- package/lib/contract/ContractStateChange.cjs +1 -1
- package/lib/contract/ContractStateChange.d.ts +1 -1
- package/lib/contract/ContractUpdateTransaction.cjs +10 -10
- package/lib/contract/ContractUpdateTransaction.d.ts +18 -18
- package/lib/contract/ContractUpdateTransaction.js +1 -1
- package/lib/contract/ContractUpdateTransaction.js.map +1 -1
- package/lib/contract/DelegateContractId.cjs +2 -2
- package/lib/contract/DelegateContractId.d.ts +4 -4
- package/lib/contract/DelegateContractId.js.map +1 -1
- package/lib/contract/StorageChange.cjs +1 -1
- package/lib/contract/StorageChange.d.ts +1 -1
- package/lib/exports.cjs +1 -1
- package/lib/exports.d.ts +1 -1
- package/lib/exports.js +1 -1
- package/lib/exports.js.map +1 -1
- package/lib/file/FileAppendTransaction.cjs +7 -7
- package/lib/file/FileAppendTransaction.d.ts +14 -14
- package/lib/file/FileAppendTransaction.js.map +1 -1
- package/lib/file/FileContentsQuery.cjs +7 -7
- package/lib/file/FileContentsQuery.d.ts +14 -14
- package/lib/file/FileContentsQuery.js.map +1 -1
- package/lib/file/FileCreateTransaction.cjs +6 -6
- package/lib/file/FileCreateTransaction.d.ts +12 -12
- package/lib/file/FileCreateTransaction.js.map +1 -1
- package/lib/file/FileDeleteTransaction.cjs +7 -7
- package/lib/file/FileDeleteTransaction.d.ts +14 -14
- package/lib/file/FileDeleteTransaction.js.map +1 -1
- package/lib/file/FileId.cjs +1 -1
- package/lib/file/FileId.d.ts +1 -1
- package/lib/file/FileId.js +1 -1
- package/lib/file/FileId.js.map +1 -1
- package/lib/file/FileInfo.cjs +1 -1
- package/lib/file/FileInfo.d.ts +1 -1
- package/lib/file/FileInfo.js +1 -1
- package/lib/file/FileInfo.js.map +1 -1
- package/lib/file/FileInfoQuery.cjs +7 -7
- package/lib/file/FileInfoQuery.d.ts +14 -14
- package/lib/file/FileInfoQuery.js.map +1 -1
- package/lib/file/FileUpdateTransaction.cjs +6 -6
- package/lib/file/FileUpdateTransaction.d.ts +12 -12
- package/lib/file/FileUpdateTransaction.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/native.js +1 -1
- package/lib/network/AddressBookQuery.cjs +1 -1
- package/lib/network/AddressBookQuery.js +1 -1
- package/lib/network/AddressBookQuery.js.map +1 -1
- package/lib/network/NetworkVersionInfo.cjs +1 -1
- package/lib/network/NetworkVersionInfo.d.ts +1 -1
- package/lib/network/NetworkVersionInfo.js +1 -1
- package/lib/network/NetworkVersionInfo.js.map +1 -1
- package/lib/network/NetworkVersionInfoQuery.cjs +6 -6
- package/lib/network/NetworkVersionInfoQuery.d.ts +12 -12
- package/lib/network/NetworkVersionInfoQuery.js.map +1 -1
- package/lib/network/SemanticVersion.cjs +1 -1
- package/lib/network/SemanticVersion.d.ts +1 -1
- package/lib/network/SemanticVersion.js +1 -1
- package/lib/network/SemanticVersion.js.map +1 -1
- package/lib/node/NodeCreateTransaction.cjs +6 -6
- package/lib/node/NodeCreateTransaction.d.ts +12 -12
- package/lib/node/NodeCreateTransaction.js.map +1 -1
- package/lib/node/NodeDeleteTransaction.cjs +6 -6
- package/lib/node/NodeDeleteTransaction.d.ts +12 -12
- package/lib/node/NodeDeleteTransaction.js.map +1 -1
- package/lib/node/NodeUpdateTransaction.cjs +6 -6
- package/lib/node/NodeUpdateTransaction.d.ts +12 -12
- package/lib/node/NodeUpdateTransaction.js.map +1 -1
- package/lib/node/ServiceEndpoint.cjs +1 -1
- package/lib/node/ServiceEndpoint.d.ts +2 -2
- package/lib/node/ServiceEndpoint.js.map +1 -1
- package/lib/query/CostQuery.cjs +1 -1
- package/lib/query/CostQuery.d.ts +1 -1
- package/lib/query/CostQuery.js +1 -1
- package/lib/query/CostQuery.js.map +1 -1
- package/lib/query/Query.cjs +1 -1
- package/lib/query/Query.d.ts +1 -1
- package/lib/query/Query.js +1 -1
- package/lib/query/Query.js.map +1 -1
- package/lib/query/QueryBase.cjs +1 -1
- package/lib/query/QueryBase.d.ts +1 -1
- package/lib/query/QueryBase.js +1 -1
- package/lib/query/QueryBase.js.map +1 -1
- package/lib/schedule/ScheduleCreateTransaction.cjs +1 -1
- package/lib/schedule/ScheduleCreateTransaction.d.ts +1 -1
- package/lib/schedule/ScheduleCreateTransaction.js +1 -1
- package/lib/schedule/ScheduleCreateTransaction.js.map +1 -1
- package/lib/schedule/ScheduleDeleteTransaction.cjs +8 -8
- package/lib/schedule/ScheduleDeleteTransaction.d.ts +16 -16
- package/lib/schedule/ScheduleDeleteTransaction.js.map +1 -1
- package/lib/schedule/ScheduleId.cjs +1 -1
- package/lib/schedule/ScheduleId.d.ts +1 -1
- package/lib/schedule/ScheduleId.js +1 -1
- package/lib/schedule/ScheduleId.js.map +1 -1
- package/lib/schedule/ScheduleInfo.cjs +1 -1
- package/lib/schedule/ScheduleInfo.d.ts +1 -1
- package/lib/schedule/ScheduleInfo.js +1 -1
- package/lib/schedule/ScheduleInfo.js.map +1 -1
- package/lib/schedule/ScheduleInfoQuery.cjs +7 -7
- package/lib/schedule/ScheduleInfoQuery.d.ts +14 -14
- package/lib/schedule/ScheduleInfoQuery.js.map +1 -1
- package/lib/schedule/ScheduleSignTransaction.cjs +10 -10
- package/lib/schedule/ScheduleSignTransaction.d.ts +20 -20
- package/lib/schedule/ScheduleSignTransaction.js.map +1 -1
- package/lib/system/FreezeTransaction.cjs +6 -6
- package/lib/system/FreezeTransaction.d.ts +12 -12
- package/lib/system/FreezeTransaction.js.map +1 -1
- package/lib/system/SystemDeleteTransaction.cjs +8 -8
- package/lib/system/SystemDeleteTransaction.d.ts +16 -16
- package/lib/system/SystemDeleteTransaction.js.map +1 -1
- package/lib/system/SystemUndeleteTransaction.cjs +8 -8
- package/lib/system/SystemUndeleteTransaction.d.ts +16 -16
- package/lib/system/SystemUndeleteTransaction.js.map +1 -1
- package/lib/token/AbstractTokenTransferTransaction.cjs +1 -1
- package/lib/token/AbstractTokenTransferTransaction.d.ts +2 -2
- package/lib/token/AbstractTokenTransferTransaction.js.map +1 -1
- package/lib/token/AssessedCustomFee.cjs +1 -1
- package/lib/token/AssessedCustomFee.d.ts +2 -2
- package/lib/token/AssessedCustomFee.js.map +1 -1
- package/lib/token/CustomFee.cjs +1 -1
- package/lib/token/CustomFee.d.ts +2 -2
- package/lib/token/CustomFee.js.map +1 -1
- package/lib/token/CustomFixedFee.cjs +3 -3
- package/lib/token/CustomFixedFee.d.ts +6 -6
- package/lib/token/CustomFixedFee.js.map +1 -1
- package/lib/token/CustomFractionalFee.cjs +3 -3
- package/lib/token/CustomFractionalFee.d.ts +6 -6
- package/lib/token/CustomFractionalFee.js.map +1 -1
- package/lib/token/CustomRoyaltyFee.cjs +4 -4
- package/lib/token/CustomRoyaltyFee.d.ts +8 -8
- package/lib/token/CustomRoyaltyFee.js.map +1 -1
- package/lib/token/NftId.cjs +1 -1
- package/lib/token/NftId.d.ts +1 -1
- package/lib/token/NftId.js +1 -1
- package/lib/token/NftId.js.map +1 -1
- package/lib/token/PendingAirdropId.cjs +1 -1
- package/lib/token/PendingAirdropId.d.ts +1 -1
- package/lib/token/PendingAirdropId.js.map +1 -1
- package/lib/token/PendingAirdropRecord.cjs +1 -1
- package/lib/token/PendingAirdropRecord.d.ts +1 -1
- package/lib/token/PendingAirdropRecord.js.map +1 -1
- package/lib/token/TokenAirdropTransaction.cjs +8 -8
- package/lib/token/TokenAirdropTransaction.d.ts +16 -16
- package/lib/token/TokenAirdropTransaction.js.map +1 -1
- package/lib/token/TokenAssociateTransaction.cjs +7 -7
- package/lib/token/TokenAssociateTransaction.d.ts +14 -14
- package/lib/token/TokenAssociateTransaction.js.map +1 -1
- package/lib/token/TokenAssociation.cjs +1 -1
- package/lib/token/TokenAssociation.d.ts +2 -2
- package/lib/token/TokenAssociation.js.map +1 -1
- package/lib/token/TokenBurnTransaction.cjs +7 -7
- package/lib/token/TokenBurnTransaction.d.ts +14 -14
- package/lib/token/TokenBurnTransaction.js.map +1 -1
- package/lib/token/TokenCancelAirdropTransaction.cjs +6 -6
- package/lib/token/TokenCancelAirdropTransaction.d.ts +12 -12
- package/lib/token/TokenCancelAirdropTransaction.js.map +1 -1
- package/lib/token/TokenClaimAirdropTransaction.cjs +6 -6
- package/lib/token/TokenClaimAirdropTransaction.d.ts +12 -12
- package/lib/token/TokenClaimAirdropTransaction.js.map +1 -1
- package/lib/token/TokenCreateTransaction.cjs +7 -7
- package/lib/token/TokenCreateTransaction.d.ts +14 -14
- package/lib/token/TokenCreateTransaction.js.map +1 -1
- package/lib/token/TokenDeleteTransaction.cjs +7 -7
- package/lib/token/TokenDeleteTransaction.d.ts +14 -14
- package/lib/token/TokenDeleteTransaction.js.map +1 -1
- package/lib/token/TokenDissociateTransaction.cjs +7 -7
- package/lib/token/TokenDissociateTransaction.d.ts +14 -14
- package/lib/token/TokenDissociateTransaction.js.map +1 -1
- package/lib/token/TokenFeeScheduleUpdateTransaction.cjs +7 -7
- package/lib/token/TokenFeeScheduleUpdateTransaction.d.ts +14 -14
- package/lib/token/TokenFeeScheduleUpdateTransaction.js.map +1 -1
- package/lib/token/TokenFreezeTransaction.cjs +7 -7
- package/lib/token/TokenFreezeTransaction.d.ts +14 -14
- package/lib/token/TokenFreezeTransaction.js.map +1 -1
- package/lib/token/TokenGrantKycTransaction.cjs +7 -7
- package/lib/token/TokenGrantKycTransaction.d.ts +14 -14
- package/lib/token/TokenGrantKycTransaction.js.map +1 -1
- package/lib/token/TokenId.cjs +1 -1
- package/lib/token/TokenId.d.ts +1 -1
- package/lib/token/TokenId.js +1 -1
- package/lib/token/TokenId.js.map +1 -1
- package/lib/token/TokenInfo.cjs +1 -1
- package/lib/token/TokenInfo.d.ts +1 -1
- package/lib/token/TokenInfo.js +1 -1
- package/lib/token/TokenInfo.js.map +1 -1
- package/lib/token/TokenInfoQuery.cjs +7 -7
- package/lib/token/TokenInfoQuery.d.ts +14 -14
- package/lib/token/TokenInfoQuery.js.map +1 -1
- package/lib/token/TokenKeyValidation.cjs +1 -1
- package/lib/token/TokenKeyValidation.d.ts +2 -2
- package/lib/token/TokenKeyValidation.js.map +1 -1
- package/lib/token/TokenMintTransaction.cjs +7 -7
- package/lib/token/TokenMintTransaction.d.ts +14 -14
- package/lib/token/TokenMintTransaction.js.map +1 -1
- package/lib/token/TokenNftInfo.cjs +10 -10
- package/lib/token/TokenNftInfo.d.ts +20 -20
- package/lib/token/TokenNftInfo.js.map +1 -1
- package/lib/token/TokenNftInfoQuery.cjs +11 -11
- package/lib/token/TokenNftInfoQuery.d.ts +22 -22
- package/lib/token/TokenNftInfoQuery.js.map +1 -1
- package/lib/token/TokenNftTransfer.cjs +5 -5
- package/lib/token/TokenNftTransfer.d.ts +10 -10
- package/lib/token/TokenNftTransfer.js.map +1 -1
- package/lib/token/TokenNftsUpdateTransaction.cjs +7 -7
- package/lib/token/TokenNftsUpdateTransaction.d.ts +14 -14
- package/lib/token/TokenPauseTransaction.cjs +7 -7
- package/lib/token/TokenPauseTransaction.d.ts +14 -14
- package/lib/token/TokenPauseTransaction.js.map +1 -1
- package/lib/token/TokenReference.cjs +1 -1
- package/lib/token/TokenReference.d.ts +2 -2
- package/lib/token/TokenReference.js.map +1 -1
- package/lib/token/TokenRejectTransaction.cjs +7 -7
- package/lib/token/TokenRejectTransaction.d.ts +14 -14
- package/lib/token/TokenRejectTransaction.js.map +1 -1
- package/lib/token/TokenRevokeKycTransaction.cjs +7 -7
- package/lib/token/TokenRevokeKycTransaction.d.ts +14 -14
- package/lib/token/TokenRevokeKycTransaction.js.map +1 -1
- package/lib/token/TokenSupplyType.cjs +1 -1
- package/lib/token/TokenSupplyType.d.ts +2 -2
- package/lib/token/TokenSupplyType.js.map +1 -1
- package/lib/token/TokenTransfer.cjs +4 -4
- package/lib/token/TokenTransfer.d.ts +8 -8
- package/lib/token/TokenTransfer.js.map +1 -1
- package/lib/token/TokenType.cjs +1 -1
- package/lib/token/TokenType.d.ts +2 -2
- package/lib/token/TokenType.js.map +1 -1
- package/lib/token/TokenUnfreezeTransaction.cjs +7 -7
- package/lib/token/TokenUnfreezeTransaction.d.ts +14 -14
- package/lib/token/TokenUnfreezeTransaction.js.map +1 -1
- package/lib/token/TokenUnpauseTransaction.cjs +7 -7
- package/lib/token/TokenUnpauseTransaction.d.ts +14 -14
- package/lib/token/TokenUnpauseTransaction.js.map +1 -1
- package/lib/token/TokenUpdateNftsTransaction.cjs +7 -7
- package/lib/token/TokenUpdateNftsTransaction.d.ts +14 -14
- package/lib/token/TokenUpdateNftsTransaction.js.map +1 -1
- package/lib/token/TokenUpdateTransaction.cjs +7 -7
- package/lib/token/TokenUpdateTransaction.d.ts +14 -14
- package/lib/token/TokenUpdateTransaction.js.map +1 -1
- package/lib/token/TokenWipeTransaction.cjs +7 -7
- package/lib/token/TokenWipeTransaction.d.ts +14 -14
- package/lib/token/TokenWipeTransaction.js.map +1 -1
- package/lib/topic/TopicCreateTransaction.cjs +6 -6
- package/lib/topic/TopicCreateTransaction.d.ts +12 -12
- package/lib/topic/TopicCreateTransaction.js.map +1 -1
- package/lib/topic/TopicDeleteTransaction.cjs +6 -6
- package/lib/topic/TopicDeleteTransaction.d.ts +12 -12
- package/lib/topic/TopicDeleteTransaction.js.map +1 -1
- package/lib/topic/TopicId.cjs +1 -1
- package/lib/topic/TopicId.d.ts +1 -1
- package/lib/topic/TopicId.js +1 -1
- package/lib/topic/TopicId.js.map +1 -1
- package/lib/topic/TopicInfo.cjs +1 -1
- package/lib/topic/TopicInfo.d.ts +1 -1
- package/lib/topic/TopicInfo.js +1 -1
- package/lib/topic/TopicInfo.js.map +1 -1
- package/lib/topic/TopicInfoQuery.cjs +7 -7
- package/lib/topic/TopicInfoQuery.d.ts +14 -14
- package/lib/topic/TopicInfoQuery.js.map +1 -1
- package/lib/topic/TopicMessage.cjs +2 -2
- package/lib/topic/TopicMessage.d.ts +4 -4
- package/lib/topic/TopicMessage.js.map +1 -1
- package/lib/topic/TopicMessageChunk.cjs +2 -2
- package/lib/topic/TopicMessageChunk.d.ts +4 -4
- package/lib/topic/TopicMessageChunk.js.map +1 -1
- package/lib/topic/TopicMessageQuery.cjs +1 -1
- package/lib/topic/TopicMessageQuery.js +1 -1
- package/lib/topic/TopicMessageQuery.js.map +1 -1
- package/lib/topic/TopicMessageSubmitTransaction.cjs +9 -9
- package/lib/topic/TopicMessageSubmitTransaction.d.ts +18 -18
- package/lib/topic/TopicMessageSubmitTransaction.js.map +1 -1
- package/lib/topic/TopicUpdateTransaction.cjs +6 -6
- package/lib/topic/TopicUpdateTransaction.d.ts +12 -12
- package/lib/topic/TopicUpdateTransaction.js.map +1 -1
- package/lib/transaction/BatchTransaction.cjs +5 -5
- package/lib/transaction/BatchTransaction.d.ts +9 -9
- package/lib/transaction/BatchTransaction.js +1 -1
- package/lib/transaction/BatchTransaction.js.map +1 -1
- package/lib/transaction/CustomFeeLimit.cjs +2 -2
- package/lib/transaction/CustomFeeLimit.d.ts +4 -4
- package/lib/transaction/CustomFeeLimit.js.map +1 -1
- package/lib/transaction/NodeAccountIdSignatureMap.cjs +2 -2
- package/lib/transaction/NodeAccountIdSignatureMap.d.ts +2 -2
- package/lib/transaction/NodeAccountIdSignatureMap.js +1 -1
- package/lib/transaction/NodeAccountIdSignatureMap.js.map +1 -1
- package/lib/transaction/NodeAccountIdSignatureMapLegacy.cjs +1 -1
- package/lib/transaction/NodeAccountIdSignatureMapLegacy.d.ts +2 -2
- package/lib/transaction/NodeAccountIdSignatureMapLegacy.js.map +1 -1
- package/lib/transaction/SignatureMap.cjs +1 -1
- package/lib/transaction/SignatureMap.js.map +1 -1
- package/lib/transaction/SignaturePairMap.cjs +1 -1
- package/lib/transaction/SignaturePairMap.d.ts +2 -2
- package/lib/transaction/SignaturePairMap.js.map +1 -1
- package/lib/transaction/Transaction.cjs +1 -1
- package/lib/transaction/Transaction.d.ts +1 -1
- package/lib/transaction/Transaction.js +1 -1
- package/lib/transaction/Transaction.js.map +1 -1
- package/lib/transaction/TransactionHashMap.cjs +1 -1
- package/lib/transaction/TransactionHashMap.d.ts +2 -2
- package/lib/transaction/TransactionHashMap.js.map +1 -1
- package/lib/transaction/TransactionId.cjs +1 -1
- package/lib/transaction/TransactionId.d.ts +1 -1
- package/lib/transaction/TransactionId.js +1 -1
- package/lib/transaction/TransactionId.js.map +1 -1
- package/lib/transaction/TransactionReceipt.cjs +1 -1
- package/lib/transaction/TransactionReceipt.d.ts +1 -1
- package/lib/transaction/TransactionReceipt.js +1 -1
- package/lib/transaction/TransactionReceipt.js.map +1 -1
- package/lib/transaction/TransactionReceiptQuery.cjs +1 -1
- package/lib/transaction/TransactionReceiptQuery.d.ts +1 -1
- package/lib/transaction/TransactionReceiptQuery.js +1 -1
- package/lib/transaction/TransactionReceiptQuery.js.map +1 -1
- package/lib/transaction/TransactionRecord.cjs +1 -1
- package/lib/transaction/TransactionRecord.d.ts +1 -1
- package/lib/transaction/TransactionRecord.js +1 -1
- package/lib/transaction/TransactionRecord.js.map +1 -1
- package/lib/transaction/TransactionRecordQuery.cjs +1 -1
- package/lib/transaction/TransactionRecordQuery.d.ts +1 -1
- package/lib/transaction/TransactionRecordQuery.js +1 -1
- package/lib/transaction/TransactionRecordQuery.js.map +1 -1
- package/lib/util/ASN1-Decoder.cjs +1 -1
- package/lib/util/ASN1-Decoder.js +1 -1
- package/lib/util/ASN1-Decoder.js.map +1 -1
- package/lib/version.js +1 -1
- package/package.json +3 -3
- package/src/Cache.js +6 -6
- package/src/Duration.js +1 -1
- package/src/EntityIdHelper.js +1 -1
- package/src/EthereumFlow.js +7 -7
- package/src/EthereumTransaction.js +7 -7
- package/src/EvmAddress.js +1 -1
- package/src/ExchangeRate.js +2 -2
- package/src/ExchangeRates.js +1 -1
- package/src/FeeComponents.js +1 -1
- package/src/FeeData.js +1 -1
- package/src/FeeDataType.js +1 -1
- package/src/FeeSchedule.js +1 -1
- package/src/FeeSchedules.js +1 -1
- package/src/FreezeType.js +1 -1
- package/src/Key.js +1 -1
- package/src/KeyList.js +3 -3
- package/src/Mnemonic.js +1 -1
- package/src/PrivateKey.js +7 -7
- package/src/PrngTransaction.js +9 -9
- package/src/PublicKey.js +5 -5
- package/src/RequestType.js +1 -1
- package/src/StakingInfo.js +1 -1
- package/src/Status.js +1 -1
- package/src/Timestamp.js +1 -1
- package/src/TransactionFeeSchedule.js +1 -1
- package/src/Transfer.js +2 -2
- package/src/account/AccountAllowanceAdjustTransaction.js +7 -7
- package/src/account/AccountAllowanceApproveTransaction.js +8 -8
- package/src/account/AccountAllowanceDeleteTransaction.js +7 -7
- package/src/account/AccountBalance.js +1 -1
- package/src/account/AccountBalanceQuery.js +6 -6
- package/src/account/AccountCreateTransaction.js +1 -1
- package/src/account/AccountDeleteTransaction.js +7 -7
- package/src/account/AccountId.js +1 -1
- package/src/account/AccountInfo.js +1 -1
- package/src/account/AccountInfoQuery.js +7 -7
- package/src/account/AccountRecordsQuery.js +7 -7
- package/src/account/AccountUpdateTransaction.js +7 -7
- package/src/account/HbarAllowance.js +3 -3
- package/src/account/HbarTransferMap.js +2 -2
- package/src/account/LiveHash.js +3 -3
- package/src/account/LiveHashAddTransaction.js +7 -7
- package/src/account/LiveHashDeleteTransaction.js +6 -6
- package/src/account/LiveHashQuery.js +7 -7
- package/src/account/NullableTokenDecimalMap.js +2 -2
- package/src/account/ProxyStaker.js +2 -2
- package/src/account/TokenAllowance.js +4 -4
- package/src/account/TokenBalanceMap.js +2 -2
- package/src/account/TokenDecimalMap.js +2 -2
- package/src/account/TokenNftAllowance.js +5 -5
- package/src/account/TokenNftTransferMap.js +5 -5
- package/src/account/TokenRelationship.js +4 -4
- package/src/account/TokenRelationshipMap.js +2 -2
- package/src/account/TokenTransferMap.js +4 -4
- package/src/account/TransferTransaction.js +6 -6
- package/src/address_book/AddressBooks.js +1 -1
- package/src/address_book/Endpoint.js +1 -1
- package/src/address_book/NodeAddress.js +1 -1
- package/src/address_book/NodeAddressBook.js +1 -1
- package/src/channel/Channel.js +1 -1
- package/src/contract/ContractByteCodeQuery.js +6 -6
- package/src/contract/ContractCallQuery.js +1 -1
- package/src/contract/ContractCreateTransaction.js +8 -8
- package/src/contract/ContractDeleteTransaction.js +8 -8
- package/src/contract/ContractExecuteTransaction.js +9 -9
- package/src/contract/ContractFunctionResult.js +2 -2
- package/src/contract/ContractId.js +1 -1
- package/src/contract/ContractInfo.js +1 -1
- package/src/contract/ContractInfoQuery.js +7 -7
- package/src/contract/ContractLogInfo.js +2 -2
- package/src/contract/ContractNonceInfo.js +3 -3
- package/src/contract/ContractStateChange.js +1 -1
- package/src/contract/ContractUpdateTransaction.js +10 -10
- package/src/contract/DelegateContractId.js +2 -2
- package/src/contract/StorageChange.js +1 -1
- package/src/exports.js +1 -1
- package/src/file/FileAppendTransaction.js +7 -7
- package/src/file/FileContentsQuery.js +7 -7
- package/src/file/FileCreateTransaction.js +6 -6
- package/src/file/FileDeleteTransaction.js +7 -7
- package/src/file/FileId.js +1 -1
- package/src/file/FileInfo.js +1 -1
- package/src/file/FileInfoQuery.js +7 -7
- package/src/file/FileUpdateTransaction.js +6 -6
- package/src/network/AddressBookQuery.js +1 -1
- package/src/network/NetworkVersionInfo.js +1 -1
- package/src/network/NetworkVersionInfoQuery.js +6 -6
- package/src/network/SemanticVersion.js +1 -1
- package/src/node/NodeCreateTransaction.js +6 -6
- package/src/node/NodeDeleteTransaction.js +6 -6
- package/src/node/NodeUpdateTransaction.js +6 -6
- package/src/node/ServiceEndpoint.js +1 -1
- package/src/query/CostQuery.js +1 -1
- package/src/query/Query.js +1 -1
- package/src/query/QueryBase.js +1 -1
- package/src/schedule/ScheduleCreateTransaction.js +1 -1
- package/src/schedule/ScheduleDeleteTransaction.js +8 -8
- package/src/schedule/ScheduleId.js +1 -1
- package/src/schedule/ScheduleInfo.js +1 -1
- package/src/schedule/ScheduleInfoQuery.js +7 -7
- package/src/schedule/ScheduleSignTransaction.js +10 -10
- package/src/system/FreezeTransaction.js +6 -6
- package/src/system/SystemDeleteTransaction.js +8 -8
- package/src/system/SystemUndeleteTransaction.js +8 -8
- package/src/token/AbstractTokenTransferTransaction.js +1 -1
- package/src/token/AssessedCustomFee.js +1 -1
- package/src/token/CustomFee.js +1 -1
- package/src/token/CustomFixedFee.js +3 -3
- package/src/token/CustomFractionalFee.js +3 -3
- package/src/token/CustomRoyaltyFee.js +4 -4
- package/src/token/NftId.js +1 -1
- package/src/token/PendingAirdropId.js +1 -1
- package/src/token/PendingAirdropRecord.js +1 -1
- package/src/token/TokenAirdropTransaction.js +8 -8
- package/src/token/TokenAssociateTransaction.js +7 -7
- package/src/token/TokenAssociation.js +1 -1
- package/src/token/TokenBurnTransaction.js +7 -7
- package/src/token/TokenCancelAirdropTransaction.js +6 -6
- package/src/token/TokenClaimAirdropTransaction.js +6 -6
- package/src/token/TokenCreateTransaction.js +7 -7
- package/src/token/TokenDeleteTransaction.js +7 -7
- package/src/token/TokenDissociateTransaction.js +7 -7
- package/src/token/TokenFeeScheduleUpdateTransaction.js +7 -7
- package/src/token/TokenFreezeTransaction.js +7 -7
- package/src/token/TokenGrantKycTransaction.js +7 -7
- package/src/token/TokenId.js +1 -1
- package/src/token/TokenInfo.js +1 -1
- package/src/token/TokenInfoQuery.js +7 -7
- package/src/token/TokenKeyValidation.js +1 -1
- package/src/token/TokenMintTransaction.js +7 -7
- package/src/token/TokenNftInfo.js +10 -10
- package/src/token/TokenNftInfoQuery.js +11 -11
- package/src/token/TokenNftTransfer.js +5 -5
- package/src/token/TokenNftsUpdateTransaction.js +7 -7
- package/src/token/TokenPauseTransaction.js +7 -7
- package/src/token/TokenReference.js +1 -1
- package/src/token/TokenRejectTransaction.js +7 -7
- package/src/token/TokenRevokeKycTransaction.js +7 -7
- package/src/token/TokenSupplyType.js +1 -1
- package/src/token/TokenTransfer.js +4 -4
- package/src/token/TokenType.js +1 -1
- package/src/token/TokenUnfreezeTransaction.js +7 -7
- package/src/token/TokenUnpauseTransaction.js +7 -7
- package/src/token/TokenUpdateNftsTransaction.js +7 -7
- package/src/token/TokenUpdateTransaction.js +7 -7
- package/src/token/TokenWipeTransaction.js +7 -7
- package/src/topic/TopicCreateTransaction.js +6 -6
- package/src/topic/TopicDeleteTransaction.js +6 -6
- package/src/topic/TopicId.js +1 -1
- package/src/topic/TopicInfo.js +1 -1
- package/src/topic/TopicInfoQuery.js +7 -7
- package/src/topic/TopicMessage.js +2 -2
- package/src/topic/TopicMessageChunk.js +2 -2
- package/src/topic/TopicMessageQuery.js +1 -1
- package/src/topic/TopicMessageSubmitTransaction.js +9 -9
- package/src/topic/TopicUpdateTransaction.js +6 -6
- package/src/transaction/BatchTransaction.js +5 -5
- package/src/transaction/CustomFeeLimit.js +2 -2
- package/src/transaction/NodeAccountIdSignatureMap.js +2 -2
- package/src/transaction/NodeAccountIdSignatureMapLegacy.js +1 -1
- package/src/transaction/SignatureMap.js +1 -1
- package/src/transaction/SignaturePairMap.js +1 -1
- package/src/transaction/Transaction.js +1 -1
- package/src/transaction/TransactionHashMap.js +1 -1
- package/src/transaction/TransactionId.js +1 -1
- package/src/transaction/TransactionReceipt.js +1 -1
- package/src/transaction/TransactionReceiptQuery.js +1 -1
- package/src/transaction/TransactionRecord.js +1 -1
- package/src/transaction/TransactionRecordQuery.js +1 -1
- package/src/util/ASN1-Decoder.js +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import t,{QUERY_REGISTRY as e}from"../query/Query.js";import r from"./TransactionRecord.js";import n from"./TransactionReceipt.js";import s from"./TransactionId.js";import
|
|
1
|
+
import t,{QUERY_REGISTRY as e}from"../query/Query.js";import r from"./TransactionRecord.js";import n from"./TransactionReceipt.js";import s from"./TransactionId.js";import i from"../Status.js";import a from"../PrecheckStatusError.js";import o from"../ReceiptStatusError.js";import c from"../RecordStatusError.js";import{ExecutionState as d}from"../Executable.js";import*as u from"@hiero-ledger/proto";const{proto:l}=u;class h extends t{constructor(t={}){super(),this._transactionId=null,this._includeChildren=null,this._includeDuplicates=null,this._validateReceiptStatus=!0,null!=t.transactionId&&this.setTransactionId(t.transactionId),null!=t.includeChildren&&this.setIncludeChildren(t.includeChildren),null!=t.includeDuplicates&&this.setIncludeDuplicates(t.includeDuplicates),null!=t.validateReceiptStatus&&this.setValidateReceiptStatus(t.validateReceiptStatus)}get transactionId(){return this._transactionId}static _fromProtobuf(t){const e=t.transactionGetRecord;return new h({transactionId:e.transactionID?s._fromProtobuf(e.transactionID):void 0,includeChildren:null!=e.includeChildRecords?e.includeChildRecords:void 0,includeDuplicates:null!=e.includeDuplicates?e.includeDuplicates:void 0})}setTransactionId(t){return this._transactionId="string"==typeof t?s.fromString(t):t.clone(),this}setIncludeChildren(t){return this._includeChildren=t,this}get includeChildren(){return null!=this._includeChildren&&this._includeChildren}setIncludeDuplicates(t){return this._duplicates=t,this}get includeDuplicates(){return null!=this._duplicates&&this._duplicates}setValidateReceiptStatus(t){return this._validateReceiptStatus=t,this}get validateReceiptStatus(){return this._validateReceiptStatus}_shouldRetry(t,e){const{nodeTransactionPrecheckCode:r}=this._mapResponseHeader(e);let n=i._fromCode(null!=r?r:l.ResponseCodeEnum.OK);switch(this._logger&&this._logger.debug(`[${this._getLogId()}] received node precheck status ${n.toString()}`),n){case i.Busy:case i.Unknown:case i.ReceiptNotFound:case i.RecordNotFound:case i.PlatformNotActive:return[n,d.Retry];case i.Ok:break;default:return[n,d.Error]}const s=e.transactionGetRecord;if(s.header.responseType===u.proto.ResponseType.COST_ANSWER)return[n,d.Finished];const a=s.transactionRecord.receipt.status;switch(n=i._fromCode(a),this._logger&&this._logger.debug(`[${this._getLogId()}] received record's receipt ${n.toString()}`),n){case i.Ok:case i.Busy:case i.Unknown:case i.ReceiptNotFound:case i.RecordNotFound:return[n,d.Retry];case i.Success:return[n,d.Finished];default:return[n,this._validateReceiptStatus?d.Error:d.Finished]}}_mapStatusError(t,e,s){const{nodeTransactionPrecheckCode:d}=this._mapResponseHeader(e);let u=i._fromCode(null!=d?d:l.ResponseCodeEnum.OK);switch(u){case i.Ok:break;case i.ContractRevertExecuted:return new c({status:u,transactionId:this._getTransactionId(),transactionRecord:r._fromProtobuf({transactionRecord:e.transactionGetRecord.transactionRecord})});default:return new a({nodeId:s,status:u,transactionId:this._getTransactionId(),contractFunctionResult:null})}const h=e.transactionGetRecord.transactionRecord.receipt,p=h.status;return u=i._fromCode(p),u===i.ContractRevertExecuted?new c({status:u,transactionId:this._getTransactionId(),transactionRecord:r._fromProtobuf({transactionRecord:e.transactionGetRecord.transactionRecord})}):new o({status:u,transactionId:this._getTransactionId(),transactionReceipt:n._fromProtobuf({receipt:h})})}_validateChecksums(t){null!=this._transactionId&&null!=this._transactionId.accountId&&this._transactionId.accountId.validateChecksum(t)}_execute(t,e){return t.crypto.getTxRecordByTxID(e)}_mapResponseHeader(t){return t.transactionGetRecord.header}_mapResponse(t,e,n){const s=t.transactionGetRecord;return Promise.resolve(r._fromProtobuf(s))}_onMakeRequest(t){return{transactionGetRecord:{header:t,transactionID:null!=this._transactionId?this._transactionId._toProtobuf():null,includeChildRecords:this._includeChildren,includeDuplicates:this._includeDuplicates}}}_getLogId(){return`TransactionRecordQuery:${(null!=this._paymentTransactionId&&null!=this._paymentTransactionId.validStart?this._paymentTransactionId.validStart:this._timestamp).toString()}`}}e.set("transactionGetRecord",h._fromProtobuf);export{h as default};
|
|
2
2
|
//# sourceMappingURL=TransactionRecordQuery.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransactionRecordQuery.js","sources":["../../src/transaction/TransactionRecordQuery.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Query, { QUERY_REGISTRY } from \"../query/Query.js\";\nimport TransactionRecord from \"./TransactionRecord.js\";\nimport TransactionReceipt from \"./TransactionReceipt.js\";\nimport TransactionId from \"./TransactionId.js\";\nimport Status from \"../Status.js\";\nimport PrecheckStatusError from \"../PrecheckStatusError.js\";\nimport ReceiptStatusError from \"../ReceiptStatusError.js\";\nimport RecordStatusError from \"../RecordStatusError.js\";\nimport { ExecutionState } from \"../Executable.js\";\nimport * as HieroProto from \"@hashgraph/proto\";\n\nconst { proto } = HieroProto;\n\n/**\n * @typedef {import(\"../channel/Channel.js\").default} Channel\n * @typedef {import(\"../client/Client.js\").default<*, *>} Client\n * @typedef {import(\"../account/AccountId.js\").default} AccountId\n */\n\n/**\n * Get the record for a transaction.\n * <p>\n * If the transaction requested a record, then the record lasts for one hour, and a state proof is available for it.\n * If the transaction created an account, file, or smart contract instance, then the record will contain the ID for\n * what it created. If the transaction called a smart contract function, then the record contains the result of\n * that call. If the transaction was a cryptocurrency transfer, then the record includes the TransferList\n * which gives the details of that transfer. If the transaction didn't return anything that should be\n * in the record, then the results field will be set to nothing.\n * @augments {Query<TransactionRecord>}\n */\nexport default class TransactionRecordQuery extends Query {\n /**\n * @param {object} [props]\n * @param {TransactionId} [props.transactionId]\n * @param {boolean} [props.includeChildren]\n * @param {boolean} [props.includeDuplicates]\n * @param {boolean} [props.validateReceiptStatus]\n */\n constructor(props = {}) {\n super();\n\n /**\n * @private\n * @type {?TransactionId}\n */\n this._transactionId = null;\n\n /**\n * @private\n * @type {?boolean}\n */\n this._includeChildren = null;\n\n /**\n * @private\n * @type {?boolean}\n */\n this._includeDuplicates = null;\n\n this._validateReceiptStatus = true;\n\n if (props.transactionId != null) {\n this.setTransactionId(props.transactionId);\n }\n\n if (props.includeChildren != null) {\n this.setIncludeChildren(props.includeChildren);\n }\n\n if (props.includeDuplicates != null) {\n this.setIncludeDuplicates(props.includeDuplicates);\n }\n\n if (props.validateReceiptStatus != null) {\n this.setValidateReceiptStatus(props.validateReceiptStatus);\n }\n }\n\n /**\n * @returns {?TransactionId}\n */\n get transactionId() {\n return this._transactionId;\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.IQuery} query\n * @returns {TransactionRecordQuery}\n */\n static _fromProtobuf(query) {\n const record =\n /** @type {HieroProto.proto.ITransactionGetRecordQuery} */ (\n query.transactionGetRecord\n );\n\n return new TransactionRecordQuery({\n transactionId: record.transactionID\n ? TransactionId._fromProtobuf(record.transactionID)\n : undefined,\n includeChildren:\n record.includeChildRecords != null\n ? record.includeChildRecords\n : undefined,\n includeDuplicates:\n record.includeDuplicates != null\n ? record.includeDuplicates\n : undefined,\n });\n }\n\n /**\n * Set the transaction ID for which the record is being requested.\n *\n * @param {TransactionId | string} transactionId\n * @returns {TransactionRecordQuery}\n */\n setTransactionId(transactionId) {\n this._transactionId =\n typeof transactionId === \"string\"\n ? TransactionId.fromString(transactionId)\n : transactionId.clone();\n\n return this;\n }\n\n /**\n * @param {boolean} includeChildren\n * @returns {TransactionRecordQuery}\n */\n setIncludeChildren(includeChildren) {\n this._includeChildren = includeChildren;\n return this;\n }\n\n /**\n * @returns {boolean}\n */\n get includeChildren() {\n return this._includeChildren != null ? this._includeChildren : false;\n }\n\n /**\n * @param {boolean} includeDuplicates\n * @returns {TransactionRecordQuery}\n */\n setIncludeDuplicates(includeDuplicates) {\n this._duplicates = includeDuplicates;\n return this;\n }\n\n /**\n * @returns {boolean}\n */\n get includeDuplicates() {\n return this._duplicates != null ? this._duplicates : false;\n }\n\n /**\n * @param {boolean} validateReceiptStatus\n * @returns {this}\n */\n setValidateReceiptStatus(validateReceiptStatus) {\n this._validateReceiptStatus = validateReceiptStatus;\n return this;\n }\n\n /**\n * @returns {boolean}\n */\n get validateReceiptStatus() {\n return this._validateReceiptStatus;\n }\n\n /**\n * @override\n * @internal\n * @param {HieroProto.proto.IQuery} request\n * @param {HieroProto.proto.IResponse} response\n * @returns {[Status, ExecutionState]}\n */\n _shouldRetry(request, response) {\n const { nodeTransactionPrecheckCode } =\n this._mapResponseHeader(response);\n\n let status = Status._fromCode(\n nodeTransactionPrecheckCode != null\n ? nodeTransactionPrecheckCode\n : proto.ResponseCodeEnum.OK,\n );\n\n if (this._logger) {\n this._logger.debug(\n `[${this._getLogId()}] received node precheck status ${status.toString()}`,\n );\n }\n\n switch (status) {\n case Status.Busy:\n case Status.Unknown:\n case Status.ReceiptNotFound:\n case Status.RecordNotFound:\n case Status.PlatformNotActive:\n return [status, ExecutionState.Retry];\n\n case Status.Ok:\n break;\n\n default:\n return [status, ExecutionState.Error];\n }\n\n const transactionGetRecord =\n /** @type {HieroProto.proto.ITransactionGetRecordResponse} */ (\n response.transactionGetRecord\n );\n const header = /** @type {HieroProto.proto.IResponseHeader} */ (\n transactionGetRecord.header\n );\n\n if (header.responseType === HieroProto.proto.ResponseType.COST_ANSWER) {\n return [status, ExecutionState.Finished];\n }\n\n const record = /** @type {HieroProto.proto.ITransactionRecord} */ (\n transactionGetRecord.transactionRecord\n );\n const receipt = /** @type {HieroProto.proto.ITransactionReceipt} */ (\n record.receipt\n );\n const receiptStatusCode =\n /** @type {HieroProto.proto.ResponseCodeEnum} */ (receipt.status);\n status = Status._fromCode(receiptStatusCode);\n\n if (this._logger) {\n this._logger.debug(\n `[${this._getLogId()}] received record's receipt ${status.toString()}`,\n );\n }\n\n switch (status) {\n case Status.Ok:\n case Status.Busy:\n case Status.Unknown:\n case Status.ReceiptNotFound:\n case Status.RecordNotFound:\n return [status, ExecutionState.Retry];\n\n case Status.Success:\n return [status, ExecutionState.Finished];\n\n default:\n return [\n status,\n this._validateReceiptStatus\n ? ExecutionState.Error\n : ExecutionState.Finished,\n ];\n }\n }\n\n /**\n * @override\n * @internal\n * @param {HieroProto.proto.IQuery} request\n * @param {HieroProto.proto.IResponse} response\n * @param {AccountId} nodeId\n * @returns {Error}\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _mapStatusError(request, response, nodeId) {\n const { nodeTransactionPrecheckCode } =\n this._mapResponseHeader(response);\n\n let status = Status._fromCode(\n nodeTransactionPrecheckCode != null\n ? nodeTransactionPrecheckCode\n : proto.ResponseCodeEnum.OK,\n );\n switch (status) {\n case Status.Ok:\n // Do nothing\n break;\n\n case Status.ContractRevertExecuted:\n return new RecordStatusError({\n status,\n transactionId: this._getTransactionId(),\n transactionRecord: TransactionRecord._fromProtobuf({\n transactionRecord:\n // @ts-ignore\n response.transactionGetRecord.transactionRecord,\n }),\n });\n\n default:\n return new PrecheckStatusError({\n nodeId,\n status,\n transactionId: this._getTransactionId(),\n contractFunctionResult: null,\n });\n }\n\n const transactionGetRecord =\n /** @type {HieroProto.proto.ITransactionGetRecordResponse} */ (\n response.transactionGetRecord\n );\n const record = /** @type {HieroProto.proto.ITransactionRecord} */ (\n transactionGetRecord.transactionRecord\n );\n const receipt = /** @type {HieroProto.proto.ITransactionReceipt} */ (\n record.receipt\n );\n const receiptStatusError =\n /** @type {HieroProto.proto.ResponseCodeEnum} */ (receipt.status);\n\n status = Status._fromCode(receiptStatusError);\n\n switch (status) {\n case Status.ContractRevertExecuted:\n return new RecordStatusError({\n status,\n transactionId: this._getTransactionId(),\n transactionRecord: TransactionRecord._fromProtobuf({\n transactionRecord:\n // @ts-ignore\n response.transactionGetRecord.transactionRecord,\n }),\n });\n\n default:\n return new ReceiptStatusError({\n status,\n transactionId: this._getTransactionId(),\n transactionReceipt: TransactionReceipt._fromProtobuf({\n receipt,\n }),\n });\n }\n }\n\n /**\n * @param {Client} client\n */\n _validateChecksums(client) {\n if (\n this._transactionId != null &&\n this._transactionId.accountId != null\n ) {\n this._transactionId.accountId.validateChecksum(client);\n }\n }\n\n /**\n * @override\n * @internal\n * @param {Channel} channel\n * @param {HieroProto.proto.IQuery} request\n * @returns {Promise<HieroProto.proto.IResponse>}\n */\n _execute(channel, request) {\n return channel.crypto.getTxRecordByTxID(request);\n }\n\n /**\n * @override\n * @override\n * @internal\n * @param {HieroProto.proto.IResponse} response\n * @returns {HieroProto.proto.IResponseHeader}\n */\n _mapResponseHeader(response) {\n const transactionGetRecord =\n /** @type {HieroProto.proto.ITransactionGetRecordResponse} */ (\n response.transactionGetRecord\n );\n return /** @type {HieroProto.proto.IResponseHeader} */ (\n transactionGetRecord.header\n );\n }\n\n /**\n * @override\n * @internal\n * @param {HieroProto.proto.IResponse} response\n * @param {AccountId} nodeAccountId\n * @param {HieroProto.proto.IQuery} request\n * @returns {Promise<TransactionRecord>}\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _mapResponse(response, nodeAccountId, request) {\n const record =\n /** @type {HieroProto.proto.ITransactionGetRecordResponse} */ (\n response.transactionGetRecord\n );\n return Promise.resolve(TransactionRecord._fromProtobuf(record));\n }\n\n /**\n * @override\n * @internal\n * @param {HieroProto.proto.IQueryHeader} header\n * @returns {HieroProto.proto.IQuery}\n */\n _onMakeRequest(header) {\n return {\n transactionGetRecord: {\n header,\n transactionID:\n this._transactionId != null\n ? this._transactionId._toProtobuf()\n : null,\n includeChildRecords: this._includeChildren,\n includeDuplicates: this._includeDuplicates,\n },\n };\n }\n\n /**\n * @returns {string}\n */\n _getLogId() {\n const timestamp =\n this._paymentTransactionId != null &&\n this._paymentTransactionId.validStart != null\n ? this._paymentTransactionId.validStart\n : this._timestamp;\n\n return `TransactionRecordQuery:${timestamp.toString()}`;\n }\n}\n\nQUERY_REGISTRY.set(\n \"transactionGetRecord\",\n // eslint-disable-next-line @typescript-eslint/unbound-method\n TransactionRecordQuery._fromProtobuf,\n);\n"],"names":["proto","HieroProto","TransactionRecordQuery","Query","constructor","props","super","this","_transactionId","_includeChildren","_includeDuplicates","_validateReceiptStatus","transactionId","setTransactionId","includeChildren","setIncludeChildren","includeDuplicates","setIncludeDuplicates","validateReceiptStatus","setValidateReceiptStatus","_fromProtobuf","query","record","transactionID","TransactionId","undefined","includeChildRecords","fromString","clone","_duplicates","_shouldRetry","request","response","nodeTransactionPrecheckCode","_mapResponseHeader","status","Status","_fromCode","ResponseCodeEnum","OK","_logger","debug","_getLogId","toString","Busy","Unknown","ReceiptNotFound","RecordNotFound","PlatformNotActive","ExecutionState","Retry","Ok","Error","transactionGetRecord","responseType","ResponseType","COST_ANSWER","Finished","receiptStatusCode","Success","_mapStatusError","nodeId","ContractRevertExecuted","RecordStatusError","_getTransactionId","transactionRecord","TransactionRecord","PrecheckStatusError","contractFunctionResult","receipt","receiptStatusError","ReceiptStatusError","transactionReceipt","TransactionReceipt","_validateChecksums","client","accountId","validateChecksum","_execute","channel","crypto","getTxRecordByTxID","_mapResponse","nodeAccountId","Promise","resolve","_onMakeRequest","header","_toProtobuf","_paymentTransactionId","validStart","_timestamp","QUERY_REGISTRY","set"],"mappings":"8YAaA,MAAMA,MAAEA,GAAUC,EAmBH,MAAMC,UAA+BC,EAQhD,WAAAC,CAAYC,EAAQ,IAChBC,QAMAC,KAAKC,eAAiB,KAMtBD,KAAKE,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oBACpBI,uBAAwB,OAIpC,MAOMC,EALErC,EACH,qBAGJ,kBAGA,QACKsC,EACgDD,EAAc,OAIpE,OAFAlC,EAASC,EAAOC,UAAUiC,GAElBnC,IACCC,EAAO0B,uBACD,IAAIC,EAAkB,CACzB5B,SACAvB,cAAeL,KAAKyD,oBACpBC,kBAAmBC,EAAkB9C,cAAc,CAC/C6C,kBAEIjC,EAASqB,qBAAqBY,sBAKnC,IAAIM,EAAmB,CAC1BpC,SACAvB,cAAeL,KAAKyD,oBACpBQ,mBAAoBC,EAAmBrD,cAAc,CACjDiD,aAIxB,CAKI,kBAAAK,CAAmBC,GAEY,MAAvBpE,KAAKC,gBAC4B,MAAjCD,KAAKC,eAAeoE,WAEpBrE,KAAKC,eAAeoE,UAAUC,iBAAiBF,EAE3D,CASI,QAAAG,CAASC,EAAShD,GACd,OAAOgD,EAAQC,OAAOC,kBAAkBlD,EAChD,CASI,kBAAAG,CAAmBF,GAKf,OAFQA,EACH,qBAGb,MACA,CAWI,YAAAkD,CAAalD,EAAUmD,EAAepD,GAClC,MAAMT,EAEEU,EACH,qBACL,OAAOoD,QAAQC,QAAQnB,EAAkB9C,cAAcE,GAC/D,CAQI,cAAAgE,CAAeC,GACX,MAAO,CACHlC,qBAAsB,CAClBkC,SACAhE,cAC2B,MAAvBhB,KAAKC,eACCD,KAAKC,eAAegF,cACpB,KACV9D,oBAAqBnB,KAAKE,iBAC1BO,kBAAmBT,KAAKG,oBAGxC,CAKI,SAAAgC,GAOI,MAAO,2BAL2B,MAA9BnC,KAAKkF,uBACoC,MAAzClF,KAAKkF,sBAAsBC,WACrBnF,KAAKkF,sBAAsBC,WAC3BnF,KAAKoF,YAE4BhD,YACnD,EAGAiD,EAAeC,IACX,uBAEA3F,EAAuBkB"}
|
|
1
|
+
{"version":3,"file":"TransactionRecordQuery.js","sources":["../../src/transaction/TransactionRecordQuery.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Query, { QUERY_REGISTRY } from \"../query/Query.js\";\nimport TransactionRecord from \"./TransactionRecord.js\";\nimport TransactionReceipt from \"./TransactionReceipt.js\";\nimport TransactionId from \"./TransactionId.js\";\nimport Status from \"../Status.js\";\nimport PrecheckStatusError from \"../PrecheckStatusError.js\";\nimport ReceiptStatusError from \"../ReceiptStatusError.js\";\nimport RecordStatusError from \"../RecordStatusError.js\";\nimport { ExecutionState } from \"../Executable.js\";\nimport * as HieroProto from \"@hiero-ledger/proto\";\n\nconst { proto } = HieroProto;\n\n/**\n * @typedef {import(\"../channel/Channel.js\").default} Channel\n * @typedef {import(\"../client/Client.js\").default<*, *>} Client\n * @typedef {import(\"../account/AccountId.js\").default} AccountId\n */\n\n/**\n * Get the record for a transaction.\n * <p>\n * If the transaction requested a record, then the record lasts for one hour, and a state proof is available for it.\n * If the transaction created an account, file, or smart contract instance, then the record will contain the ID for\n * what it created. If the transaction called a smart contract function, then the record contains the result of\n * that call. If the transaction was a cryptocurrency transfer, then the record includes the TransferList\n * which gives the details of that transfer. If the transaction didn't return anything that should be\n * in the record, then the results field will be set to nothing.\n * @augments {Query<TransactionRecord>}\n */\nexport default class TransactionRecordQuery extends Query {\n /**\n * @param {object} [props]\n * @param {TransactionId} [props.transactionId]\n * @param {boolean} [props.includeChildren]\n * @param {boolean} [props.includeDuplicates]\n * @param {boolean} [props.validateReceiptStatus]\n */\n constructor(props = {}) {\n super();\n\n /**\n * @private\n * @type {?TransactionId}\n */\n this._transactionId = null;\n\n /**\n * @private\n * @type {?boolean}\n */\n this._includeChildren = null;\n\n /**\n * @private\n * @type {?boolean}\n */\n this._includeDuplicates = null;\n\n this._validateReceiptStatus = true;\n\n if (props.transactionId != null) {\n this.setTransactionId(props.transactionId);\n }\n\n if (props.includeChildren != null) {\n this.setIncludeChildren(props.includeChildren);\n }\n\n if (props.includeDuplicates != null) {\n this.setIncludeDuplicates(props.includeDuplicates);\n }\n\n if (props.validateReceiptStatus != null) {\n this.setValidateReceiptStatus(props.validateReceiptStatus);\n }\n }\n\n /**\n * @returns {?TransactionId}\n */\n get transactionId() {\n return this._transactionId;\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.IQuery} query\n * @returns {TransactionRecordQuery}\n */\n static _fromProtobuf(query) {\n const record =\n /** @type {HieroProto.proto.ITransactionGetRecordQuery} */ (\n query.transactionGetRecord\n );\n\n return new TransactionRecordQuery({\n transactionId: record.transactionID\n ? TransactionId._fromProtobuf(record.transactionID)\n : undefined,\n includeChildren:\n record.includeChildRecords != null\n ? record.includeChildRecords\n : undefined,\n includeDuplicates:\n record.includeDuplicates != null\n ? record.includeDuplicates\n : undefined,\n });\n }\n\n /**\n * Set the transaction ID for which the record is being requested.\n *\n * @param {TransactionId | string} transactionId\n * @returns {TransactionRecordQuery}\n */\n setTransactionId(transactionId) {\n this._transactionId =\n typeof transactionId === \"string\"\n ? TransactionId.fromString(transactionId)\n : transactionId.clone();\n\n return this;\n }\n\n /**\n * @param {boolean} includeChildren\n * @returns {TransactionRecordQuery}\n */\n setIncludeChildren(includeChildren) {\n this._includeChildren = includeChildren;\n return this;\n }\n\n /**\n * @returns {boolean}\n */\n get includeChildren() {\n return this._includeChildren != null ? this._includeChildren : false;\n }\n\n /**\n * @param {boolean} includeDuplicates\n * @returns {TransactionRecordQuery}\n */\n setIncludeDuplicates(includeDuplicates) {\n this._duplicates = includeDuplicates;\n return this;\n }\n\n /**\n * @returns {boolean}\n */\n get includeDuplicates() {\n return this._duplicates != null ? this._duplicates : false;\n }\n\n /**\n * @param {boolean} validateReceiptStatus\n * @returns {this}\n */\n setValidateReceiptStatus(validateReceiptStatus) {\n this._validateReceiptStatus = validateReceiptStatus;\n return this;\n }\n\n /**\n * @returns {boolean}\n */\n get validateReceiptStatus() {\n return this._validateReceiptStatus;\n }\n\n /**\n * @override\n * @internal\n * @param {HieroProto.proto.IQuery} request\n * @param {HieroProto.proto.IResponse} response\n * @returns {[Status, ExecutionState]}\n */\n _shouldRetry(request, response) {\n const { nodeTransactionPrecheckCode } =\n this._mapResponseHeader(response);\n\n let status = Status._fromCode(\n nodeTransactionPrecheckCode != null\n ? nodeTransactionPrecheckCode\n : proto.ResponseCodeEnum.OK,\n );\n\n if (this._logger) {\n this._logger.debug(\n `[${this._getLogId()}] received node precheck status ${status.toString()}`,\n );\n }\n\n switch (status) {\n case Status.Busy:\n case Status.Unknown:\n case Status.ReceiptNotFound:\n case Status.RecordNotFound:\n case Status.PlatformNotActive:\n return [status, ExecutionState.Retry];\n\n case Status.Ok:\n break;\n\n default:\n return [status, ExecutionState.Error];\n }\n\n const transactionGetRecord =\n /** @type {HieroProto.proto.ITransactionGetRecordResponse} */ (\n response.transactionGetRecord\n );\n const header = /** @type {HieroProto.proto.IResponseHeader} */ (\n transactionGetRecord.header\n );\n\n if (header.responseType === HieroProto.proto.ResponseType.COST_ANSWER) {\n return [status, ExecutionState.Finished];\n }\n\n const record = /** @type {HieroProto.proto.ITransactionRecord} */ (\n transactionGetRecord.transactionRecord\n );\n const receipt = /** @type {HieroProto.proto.ITransactionReceipt} */ (\n record.receipt\n );\n const receiptStatusCode =\n /** @type {HieroProto.proto.ResponseCodeEnum} */ (receipt.status);\n status = Status._fromCode(receiptStatusCode);\n\n if (this._logger) {\n this._logger.debug(\n `[${this._getLogId()}] received record's receipt ${status.toString()}`,\n );\n }\n\n switch (status) {\n case Status.Ok:\n case Status.Busy:\n case Status.Unknown:\n case Status.ReceiptNotFound:\n case Status.RecordNotFound:\n return [status, ExecutionState.Retry];\n\n case Status.Success:\n return [status, ExecutionState.Finished];\n\n default:\n return [\n status,\n this._validateReceiptStatus\n ? ExecutionState.Error\n : ExecutionState.Finished,\n ];\n }\n }\n\n /**\n * @override\n * @internal\n * @param {HieroProto.proto.IQuery} request\n * @param {HieroProto.proto.IResponse} response\n * @param {AccountId} nodeId\n * @returns {Error}\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _mapStatusError(request, response, nodeId) {\n const { nodeTransactionPrecheckCode } =\n this._mapResponseHeader(response);\n\n let status = Status._fromCode(\n nodeTransactionPrecheckCode != null\n ? nodeTransactionPrecheckCode\n : proto.ResponseCodeEnum.OK,\n );\n switch (status) {\n case Status.Ok:\n // Do nothing\n break;\n\n case Status.ContractRevertExecuted:\n return new RecordStatusError({\n status,\n transactionId: this._getTransactionId(),\n transactionRecord: TransactionRecord._fromProtobuf({\n transactionRecord:\n // @ts-ignore\n response.transactionGetRecord.transactionRecord,\n }),\n });\n\n default:\n return new PrecheckStatusError({\n nodeId,\n status,\n transactionId: this._getTransactionId(),\n contractFunctionResult: null,\n });\n }\n\n const transactionGetRecord =\n /** @type {HieroProto.proto.ITransactionGetRecordResponse} */ (\n response.transactionGetRecord\n );\n const record = /** @type {HieroProto.proto.ITransactionRecord} */ (\n transactionGetRecord.transactionRecord\n );\n const receipt = /** @type {HieroProto.proto.ITransactionReceipt} */ (\n record.receipt\n );\n const receiptStatusError =\n /** @type {HieroProto.proto.ResponseCodeEnum} */ (receipt.status);\n\n status = Status._fromCode(receiptStatusError);\n\n switch (status) {\n case Status.ContractRevertExecuted:\n return new RecordStatusError({\n status,\n transactionId: this._getTransactionId(),\n transactionRecord: TransactionRecord._fromProtobuf({\n transactionRecord:\n // @ts-ignore\n response.transactionGetRecord.transactionRecord,\n }),\n });\n\n default:\n return new ReceiptStatusError({\n status,\n transactionId: this._getTransactionId(),\n transactionReceipt: TransactionReceipt._fromProtobuf({\n receipt,\n }),\n });\n }\n }\n\n /**\n * @param {Client} client\n */\n _validateChecksums(client) {\n if (\n this._transactionId != null &&\n this._transactionId.accountId != null\n ) {\n this._transactionId.accountId.validateChecksum(client);\n }\n }\n\n /**\n * @override\n * @internal\n * @param {Channel} channel\n * @param {HieroProto.proto.IQuery} request\n * @returns {Promise<HieroProto.proto.IResponse>}\n */\n _execute(channel, request) {\n return channel.crypto.getTxRecordByTxID(request);\n }\n\n /**\n * @override\n * @override\n * @internal\n * @param {HieroProto.proto.IResponse} response\n * @returns {HieroProto.proto.IResponseHeader}\n */\n _mapResponseHeader(response) {\n const transactionGetRecord =\n /** @type {HieroProto.proto.ITransactionGetRecordResponse} */ (\n response.transactionGetRecord\n );\n return /** @type {HieroProto.proto.IResponseHeader} */ (\n transactionGetRecord.header\n );\n }\n\n /**\n * @override\n * @internal\n * @param {HieroProto.proto.IResponse} response\n * @param {AccountId} nodeAccountId\n * @param {HieroProto.proto.IQuery} request\n * @returns {Promise<TransactionRecord>}\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _mapResponse(response, nodeAccountId, request) {\n const record =\n /** @type {HieroProto.proto.ITransactionGetRecordResponse} */ (\n response.transactionGetRecord\n );\n return Promise.resolve(TransactionRecord._fromProtobuf(record));\n }\n\n /**\n * @override\n * @internal\n * @param {HieroProto.proto.IQueryHeader} header\n * @returns {HieroProto.proto.IQuery}\n */\n _onMakeRequest(header) {\n return {\n transactionGetRecord: {\n header,\n transactionID:\n this._transactionId != null\n ? this._transactionId._toProtobuf()\n : null,\n includeChildRecords: this._includeChildren,\n includeDuplicates: this._includeDuplicates,\n },\n };\n }\n\n /**\n * @returns {string}\n */\n _getLogId() {\n const timestamp =\n this._paymentTransactionId != null &&\n this._paymentTransactionId.validStart != null\n ? this._paymentTransactionId.validStart\n : this._timestamp;\n\n return `TransactionRecordQuery:${timestamp.toString()}`;\n }\n}\n\nQUERY_REGISTRY.set(\n \"transactionGetRecord\",\n // eslint-disable-next-line @typescript-eslint/unbound-method\n TransactionRecordQuery._fromProtobuf,\n);\n"],"names":["proto","HieroProto","TransactionRecordQuery","Query","constructor","props","super","this","_transactionId","_includeChildren","_includeDuplicates","_validateReceiptStatus","transactionId","setTransactionId","includeChildren","setIncludeChildren","includeDuplicates","setIncludeDuplicates","validateReceiptStatus","setValidateReceiptStatus","_fromProtobuf","query","record","transactionID","TransactionId","undefined","includeChildRecords","fromString","clone","_duplicates","_shouldRetry","request","response","nodeTransactionPrecheckCode","_mapResponseHeader","status","Status","_fromCode","ResponseCodeEnum","OK","_logger","debug","_getLogId","toString","Busy","Unknown","ReceiptNotFound","RecordNotFound","PlatformNotActive","ExecutionState","Retry","Ok","Error","transactionGetRecord","responseType","ResponseType","COST_ANSWER","Finished","receiptStatusCode","Success","_mapStatusError","nodeId","ContractRevertExecuted","RecordStatusError","_getTransactionId","transactionRecord","TransactionRecord","PrecheckStatusError","contractFunctionResult","receipt","receiptStatusError","ReceiptStatusError","transactionReceipt","TransactionReceipt","_validateChecksums","client","accountId","validateChecksum","_execute","channel","crypto","getTxRecordByTxID","_mapResponse","nodeAccountId","Promise","resolve","_onMakeRequest","header","_toProtobuf","_paymentTransactionId","validStart","_timestamp","QUERY_REGISTRY","set"],"mappings":"iZAaA,MAAMA,MAAEA,GAAUC,EAmBH,MAAMC,UAA+BC,EAQhD,WAAAC,CAAYC,EAAQ,IAChBC,QAMAC,KAAKC,eAAiB,KAMtBD,KAAKE,iBAAmB,KAMxBF,KAAKG,mBAAqB,KAE1BH,KAAKI,wBAAyB,EAEH,MAAvBN,EAAMO,eACNL,KAAKM,iBAAiBR,EAAMO,eAGH,MAAzBP,EAAMS,iBACNP,KAAKQ,mBAAmBV,EAAMS,iBAGH,MAA3BT,EAAMW,mBACNT,KAAKU,qBAAqBZ,EAAMW,mBAGD,MAA/BX,EAAMa,uBACNX,KAAKY,yBAAyBd,EAAMa,sBAEhD,CAKI,iBAAIN,GACA,OAAOL,KAAKC,cACpB,CAOI,oBAAOY,CAAcC,GACjB,MAAMC,EAEED,EACH,qBAEL,OAAO,IAAInB,EAAuB,CAC9BU,cAAeU,EAAOC,cAChBC,EAAcJ,cAAcE,EAAOC,oBACnCE,EACNX,gBACkC,MAA9BQ,EAAOI,oBACDJ,EAAOI,yBACPD,EACVT,kBACgC,MAA5BM,EAAON,kBACDM,EAAON,uBACPS,GAEtB,CAQI,gBAAAZ,CAAiBD,GAMb,OALAL,KAAKC,eACwB,iBAAlBI,EACDY,EAAcG,WAAWf,GACzBA,EAAcgB,QAEjBrB,IACf,CAMI,kBAAAQ,CAAmBD,GAEf,OADAP,KAAKE,iBA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AcE,GAC/D,CAQI,cAAAgE,CAAeC,GACX,MAAO,CACHlC,qBAAsB,CAClBkC,SACAhE,cAC2B,MAAvBhB,KAAKC,eACCD,KAAKC,eAAegF,cACpB,KACV9D,oBAAqBnB,KAAKE,iBAC1BO,kBAAmBT,KAAKG,oBAGxC,CAKI,SAAAgC,GAOI,MAAO,2BAL2B,MAA9BnC,KAAKkF,uBACoC,MAAzClF,KAAKkF,sBAAsBC,WACrBnF,KAAKkF,sBAAsBC,WAC3BnF,KAAKoF,YAE4BhD,YACnD,EAGAiD,EAAeC,IACX,uBAEA3F,EAAuBkB"}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.asn1DecodeStringDer = exports.ASN1Decoder = void 0;
|
|
7
|
-
var _proto = require("@
|
|
7
|
+
var _proto = require("@hiero-ledger/proto");
|
|
8
8
|
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
|
9
9
|
/**
|
|
10
10
|
* A class to decode ASN.1 encoded data, typically used for parsing cryptographic key data.
|
package/lib/util/ASN1-Decoder.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"@
|
|
1
|
+
import"@hiero-ledger/proto";class t{constructor(t){this.data=new Uint8Array(t),this.pos=0,this.oids=[],this.oidMap={"1.3.132.0.10":"ecdsa","1.3.101.112":"ed25519","1.2.840.10045.2.1":"pubkey"},this.isPublicKey=!1}readLength(){let t=this.data[this.pos++];if(128&t){let s=127&t;t=0;for(let e=0;e<s;e++)t=t<<8|this.data[this.pos++]}return t}readType(){return this.data[this.pos++]}readInteger(){const t=this.readLength();let s=0;for(let e=0;e<t;e++)s=s<<8|this.data[this.pos++];return{integer:s}}readOctetString(){const t=this.readLength(),s=this.data.slice(this.pos,this.pos+t);return this.pos+=t,{pkey:s}}readBitString(){const t=this.readLength(),s=this.data[this.pos++],e=this.data.slice(this.pos,this.pos+t-1);return this.pos+=t-1,{unusedBits:s,pubkey:e}}readObjectIdentifier(){const t=this.readLength(),s=this.pos+t,e=[];let i=0;const r=this.data[this.pos++];for(e.push(Math.floor(r/40)),e.push(r%40);this.pos<s;){const t=this.data[this.pos++];i=i<<7|127&t,128&t||(e.push(i),i=0)}const h=e.join(".");return this.oids.push(h),{oid:h}}getOids(){return this.oids}getOidKeyTypes(){return this.oids.map(t=>this.oidMap[t]||"unknown")}readSequence(){const t=this.readLength(),s=this.pos+t,e=[];for(;this.pos<s;)e.push(this.read());return e}read(){const t=this.readType();switch(t){case 2:return this.readInteger();case 3:return this.readBitString();case 4:return this.readOctetString();case 6:return this.readObjectIdentifier();case 48:case 160:case 161:return this.readSequence();default:throw new Error(`Unsupported type: ${t}`)}}isPublicKeyType(){return this.isPublicKey}}export{t as ASN1Decoder};
|
|
2
2
|
//# sourceMappingURL=ASN1-Decoder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ASN1-Decoder.js","sources":["../../src/util/ASN1-Decoder.js"],"sourcesContent":["import { proto } from \"@hashgraph/proto\";\n/* eslint-disable @typescript-eslint/no-unsafe-return */\n/**\n * A class to decode ASN.1 encoded data, typically used for parsing cryptographic key data.\n * @class\n */\nexport class ASN1Decoder {\n /**\n * Creates a new ASN1Decoder instance.\n * @param {Uint8Array|ArrayBuffer} data - The ASN.1 encoded data to decode.\n */\n constructor(data) {\n /**\n * @private\n * @type {Uint8Array}\n */\n this.data = new Uint8Array(data);\n\n /**\n * @private\n * @type {number}\n */\n this.pos = 0;\n\n /**\n * @private\n * @type {string[]}\n */\n this.oids = [];\n\n /**\n * @private\n * @type {{[key: string]: string}}\n */\n this.oidMap = {\n \"1.3.132.0.10\": \"ecdsa\",\n \"1.3.101.112\": \"ed25519\",\n \"1.2.840.10045.2.1\": \"pubkey\",\n };\n\n /**\n * @private\n * @type {boolean}\n */\n this.isPublicKey = false;\n }\n\n /**\n * Reads the length field from the ASN.1 data.\n * @private\n * @returns {number} The length value.\n */\n readLength() {\n let length = this.data[this.pos++];\n if (length & 0x80) {\n let numBytes = length & 0x7f;\n length = 0;\n for (let i = 0; i < numBytes; i++) {\n length = (length << 8) | this.data[this.pos++];\n }\n }\n return length;\n }\n\n /**\n * Reads the type field from the ASN.1 data.\n * @private\n * @returns {number} The type value.\n */\n readType() {\n return this.data[this.pos++];\n }\n\n /**\n * Reads an integer value from the ASN.1 data.\n * @private\n * @returns {{integer: number}} Object containing the integer value.\n */\n readInteger() {\n const length = this.readLength();\n let value = 0;\n for (let i = 0; i < length; i++) {\n value = (value << 8) | this.data[this.pos++];\n }\n return { integer: value };\n }\n\n /**\n * Reads an octet string from the ASN.1 data.\n * @private\n * @returns {{pkey: Uint8Array}} Object containing the private key data.\n */\n readOctetString() {\n const length = this.readLength();\n const value = this.data.slice(this.pos, this.pos + length);\n this.pos += length;\n return { pkey: value };\n }\n\n /**\n * Reads a bit string from the ASN.1 data.\n * @private\n * @returns {{unusedBits: number, pubkey: Uint8Array}} Object containing the public key data and unused bits.\n */\n readBitString() {\n const length = this.readLength();\n const unusedBits = this.data[this.pos++]; // First byte indicates the number of unused bits\n const value = this.data.slice(this.pos, this.pos + length - 1);\n this.pos += length - 1;\n return { unusedBits, pubkey: value };\n }\n\n /**\n * Reads an object identifier from the ASN.1 data.\n * @private\n * @returns {{oid: string}} Object containing the OID as a string.\n */\n readObjectIdentifier() {\n const length = this.readLength();\n const endPos = this.pos + length;\n const oid = [];\n let value = 0;\n\n // The first byte contains the first two components\n const firstByte = this.data[this.pos++];\n oid.push(Math.floor(firstByte / 40));\n oid.push(firstByte % 40);\n\n while (this.pos < endPos) {\n const byte = this.data[this.pos++];\n value = (value << 7) | (byte & 0x7f);\n if (!(byte & 0x80)) {\n oid.push(value);\n value = 0;\n }\n }\n\n const oidStr = oid.join(\".\");\n this.oids.push(oidStr);\n return { oid: oidStr }; // Return OID as a string\n }\n\n /**\n * Gets the list of object identifiers found during decoding.\n * @returns {string[]} Array of OID strings.\n */\n getOids() {\n return this.oids;\n }\n\n /**\n * Gets the key types corresponding to the OIDs found during decoding.\n * @returns {string[]} Array of key type strings.\n */\n getOidKeyTypes() {\n return this.oids.map((oid) => this.oidMap[oid] || \"unknown\");\n }\n\n /**\n * Reads a sequence from the ASN.1 data.\n * @private\n * @returns {Array<any>} Array of decoded items in the sequence.\n */\n readSequence() {\n const length = this.readLength();\n const endPos = this.pos + length;\n const items = []; // this would better be map or obj\n while (this.pos < endPos) {\n items.push(this.read());\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return items;\n }\n\n /**\n * Reads and decodes the next ASN.1 element.\n * @returns {any} The decoded ASN.1 element.\n * @throws {Error} If an unsupported type is encountered.\n */\n read() {\n const type = this.readType();\n\n switch (type) {\n case 0x02: // INTEGER\n return this.readInteger();\n case 0x03: // BIT STRING FOR PUBKEY\n return this.readBitString();\n case 0x04: // OCTET STRING FOR PKEY\n return this.readOctetString();\n case 0x06: // OBJECT IDENTIFIER FOR CURVE TYPE\n return this.readObjectIdentifier();\n case 0x30: // SEQUENCE\n return this.readSequence();\n case 0xa0: // NODE TAG COULD BE TREATED AS SEQUENCE\n return this.readSequence();\n case 0xa1: // NODE TAG COULD BE TREATED AS SEQUENCE\n return this.readSequence();\n default:\n throw new Error(`Unsupported type: ${type}`);\n }\n }\n\n /**\n * Checks if the decoded key is a public key.\n * @returns {boolean} True if the key is a public key, false otherwise.\n */\n isPublicKeyType() {\n return this.isPublicKey;\n }\n}\n\n/**\n * Processes a hexadecimal string representation of an ASN.1 encoded key.\n * Checks if the input is a list of keys in hexadecimal format. If not, it decodes\n * the ASN.1 data to extract key types and identify if the key is a public key.\n *\n * @param {string} keyString - The hexadecimal string representation of the ASN.1 encoded key.\n * @returns {{keyTypes: string[], isPublicKey: boolean, isKeyListHex: boolean}} Object containing information about the decoded key.\n */\nexport const asn1DecodeStringDer = (keyString) => {\n const isKeyListHex = isHexKeyList(keyString);\n\n if (isKeyListHex) {\n return { keyTypes: [], isPublicKey: false, isKeyListHex };\n }\n\n const signerData = Uint8Array.from(Buffer.from(keyString, \"hex\"));\n const decoder = new ASN1Decoder(signerData);\n\n decoder.read();\n const keyTypes = decoder.getOidKeyTypes();\n const isPublicKey = decoder.isPublicKeyType();\n\n return {\n keyTypes,\n isPublicKey,\n isKeyListHex: false,\n };\n};\n\n/**\n * Checks if the input is a list of keys in hexadecimal format.\n * @param {string} hexString - The hexadecimal string representation of the ASN.1 encoded key.\n * @returns {boolean} True if the key is a public key, false otherwise.\n */\nconst isHexKeyList = (hexString) => {\n try {\n const binaryData = Buffer.from(hexString, \"hex\");\n const decodedData = proto.KeyList.decode(binaryData);\n\n return !!decodedData.keys && Array.isArray(decodedData.keys);\n } catch (error) {\n return false;\n }\n};\n"],"names":["ASN1Decoder","constructor","data","this","Uint8Array","pos","oids","oidMap","isPublicKey","readLength","length","numBytes","i","readType","readInteger","value","integer","readOctetString","slice","pkey","readBitString","unusedBits","pubkey","readObjectIdentifier","endPos","oid","firstByte","push","Math","floor","byte","oidStr","join","getOids","getOidKeyTypes","map","readSequence","items","read","type","Error","isPublicKeyType"],"mappings":"yBAMO,MAAMA,EAKT,WAAAC,CAAYC,GAKRC,KAAKD,KAAO,IAAIE,WAAWF,GAM3BC,KAAKE,IAAM,EAMXF,KAAKG,KAAO,GAMZH,KAAKI,OAAS,CACV,eAAgB,QAChB,cAAe,UACf,oBAAqB,UAOzBJ,KAAKK,aAAc,CAC3B,CAOI,UAAAC,GACI,IAAIC,EAASP,KAAKD,KAAKC,KAAKE,OAC5B,GAAa,IAATK,EAAe,CACf,IAAIC,EAAoB,IAATD,EACfA,EAAS,EACT,IAAK,IAAIE,EAAI,EAAGA,EAAID,EAAUC,IAC1BF,EAAUA,GAAU,EAAKP,KAAKD,KAAKC,KAAKE,MAExD,CACQ,OAAOK,CACf,CAOI,QAAAG,GACI,OAAOV,KAAKD,KAAKC,KAAKE,MAC9B,CAOI,WAAAS,GACI,MAAMJ,EAASP,KAAKM,aACpB,IAAIM,EAAQ,EACZ,I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xB,KAAKmC,QAIpB,OAAOD,CACf,CAOI,IAAAC,GACI,MAAMC,EAAOpC,KAAKU,WAElB,OAAQ0B,GACJ,KAAK,EACD,OAAOpC,KAAKW,cAChB,KAAK,EACD,OAAOX,KAAKiB,gBAChB,KAAK,EACD,OAAOjB,KAAKc,kBAChB,KAAK,EACD,OAAOd,KAAKoB,uBAChB,KAAK,GAEL,KAAK,IAEL,KAAK,IACD,OAAOpB,KAAKiC,eAChB,QACI,MAAM,IAAII,MAAM,qBAAqBD,KAErD,CAMI,eAAAE,GACI,OAAOtC,KAAKK,WACpB"}
|
|
1
|
+
{"version":3,"file":"ASN1-Decoder.js","sources":["../../src/util/ASN1-Decoder.js"],"sourcesContent":["import { proto } from \"@hiero-ledger/proto\";\n/* eslint-disable @typescript-eslint/no-unsafe-return */\n/**\n * A class to decode ASN.1 encoded data, typically used for parsing cryptographic key data.\n * @class\n */\nexport class ASN1Decoder {\n /**\n * Creates a new ASN1Decoder instance.\n * @param {Uint8Array|ArrayBuffer} data - The ASN.1 encoded data to decode.\n */\n constructor(data) {\n /**\n * @private\n * @type {Uint8Array}\n */\n this.data = new Uint8Array(data);\n\n /**\n * @private\n * @type {number}\n */\n this.pos = 0;\n\n /**\n * @private\n * @type {string[]}\n */\n this.oids = [];\n\n /**\n * @private\n * @type {{[key: string]: string}}\n */\n this.oidMap = {\n \"1.3.132.0.10\": \"ecdsa\",\n \"1.3.101.112\": \"ed25519\",\n \"1.2.840.10045.2.1\": \"pubkey\",\n };\n\n /**\n * @private\n * @type {boolean}\n */\n this.isPublicKey = false;\n }\n\n /**\n * Reads the length field from the ASN.1 data.\n * @private\n * @returns {number} The length value.\n */\n readLength() {\n let length = this.data[this.pos++];\n if (length & 0x80) {\n let numBytes = length & 0x7f;\n length = 0;\n for (let i = 0; i < numBytes; i++) {\n length = (length << 8) | this.data[this.pos++];\n }\n }\n return length;\n }\n\n /**\n * Reads the type field from the ASN.1 data.\n * @private\n * @returns {number} The type value.\n */\n readType() {\n return this.data[this.pos++];\n }\n\n /**\n * Reads an integer value from the ASN.1 data.\n * @private\n * @returns {{integer: number}} Object containing the integer value.\n */\n readInteger() {\n const length = this.readLength();\n let value = 0;\n for (let i = 0; i < length; i++) {\n value = (value << 8) | this.data[this.pos++];\n }\n return { integer: value };\n }\n\n /**\n * Reads an octet string from the ASN.1 data.\n * @private\n * @returns {{pkey: Uint8Array}} Object containing the private key data.\n */\n readOctetString() {\n const length = this.readLength();\n const value = this.data.slice(this.pos, this.pos + length);\n this.pos += length;\n return { pkey: value };\n }\n\n /**\n * Reads a bit string from the ASN.1 data.\n * @private\n * @returns {{unusedBits: number, pubkey: Uint8Array}} Object containing the public key data and unused bits.\n */\n readBitString() {\n const length = this.readLength();\n const unusedBits = this.data[this.pos++]; // First byte indicates the number of unused bits\n const value = this.data.slice(this.pos, this.pos + length - 1);\n this.pos += length - 1;\n return { unusedBits, pubkey: value };\n }\n\n /**\n * Reads an object identifier from the ASN.1 data.\n * @private\n * @returns {{oid: string}} Object containing the OID as a string.\n */\n readObjectIdentifier() {\n const length = this.readLength();\n const endPos = this.pos + length;\n const oid = [];\n let value = 0;\n\n // The first byte contains the first two components\n const firstByte = this.data[this.pos++];\n oid.push(Math.floor(firstByte / 40));\n oid.push(firstByte % 40);\n\n while (this.pos < endPos) {\n const byte = this.data[this.pos++];\n value = (value << 7) | (byte & 0x7f);\n if (!(byte & 0x80)) {\n oid.push(value);\n value = 0;\n }\n }\n\n const oidStr = oid.join(\".\");\n this.oids.push(oidStr);\n return { oid: oidStr }; // Return OID as a string\n }\n\n /**\n * Gets the list of object identifiers found during decoding.\n * @returns {string[]} Array of OID strings.\n */\n getOids() {\n return this.oids;\n }\n\n /**\n * Gets the key types corresponding to the OIDs found during decoding.\n * @returns {string[]} Array of key type strings.\n */\n getOidKeyTypes() {\n return this.oids.map((oid) => this.oidMap[oid] || \"unknown\");\n }\n\n /**\n * Reads a sequence from the ASN.1 data.\n * @private\n * @returns {Array<any>} Array of decoded items in the sequence.\n */\n readSequence() {\n const length = this.readLength();\n const endPos = this.pos + length;\n const items = []; // this would better be map or obj\n while (this.pos < endPos) {\n items.push(this.read());\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return items;\n }\n\n /**\n * Reads and decodes the next ASN.1 element.\n * @returns {any} The decoded ASN.1 element.\n * @throws {Error} If an unsupported type is encountered.\n */\n read() {\n const type = this.readType();\n\n switch (type) {\n case 0x02: // INTEGER\n return this.readInteger();\n case 0x03: // BIT STRING FOR PUBKEY\n return this.readBitString();\n case 0x04: // OCTET STRING FOR PKEY\n return this.readOctetString();\n case 0x06: // OBJECT IDENTIFIER FOR CURVE TYPE\n return this.readObjectIdentifier();\n case 0x30: // SEQUENCE\n return this.readSequence();\n case 0xa0: // NODE TAG COULD BE TREATED AS SEQUENCE\n return this.readSequence();\n case 0xa1: // NODE TAG COULD BE TREATED AS SEQUENCE\n return this.readSequence();\n default:\n throw new Error(`Unsupported type: ${type}`);\n }\n }\n\n /**\n * Checks if the decoded key is a public key.\n * @returns {boolean} True if the key is a public key, false otherwise.\n */\n isPublicKeyType() {\n return this.isPublicKey;\n }\n}\n\n/**\n * Processes a hexadecimal string representation of an ASN.1 encoded key.\n * Checks if the input is a list of keys in hexadecimal format. If not, it decodes\n * the ASN.1 data to extract key types and identify if the key is a public key.\n *\n * @param {string} keyString - The hexadecimal string representation of the ASN.1 encoded key.\n * @returns {{keyTypes: string[], isPublicKey: boolean, isKeyListHex: boolean}} Object containing information about the decoded key.\n */\nexport const asn1DecodeStringDer = (keyString) => {\n const isKeyListHex = isHexKeyList(keyString);\n\n if (isKeyListHex) {\n return { keyTypes: [], isPublicKey: false, isKeyListHex };\n }\n\n const signerData = Uint8Array.from(Buffer.from(keyString, \"hex\"));\n const decoder = new ASN1Decoder(signerData);\n\n decoder.read();\n const keyTypes = decoder.getOidKeyTypes();\n const isPublicKey = decoder.isPublicKeyType();\n\n return {\n keyTypes,\n isPublicKey,\n isKeyListHex: false,\n };\n};\n\n/**\n * Checks if the input is a list of keys in hexadecimal format.\n * @param {string} hexString - The hexadecimal string representation of the ASN.1 encoded key.\n * @returns {boolean} True if the key is a public key, false otherwise.\n */\nconst isHexKeyList = (hexString) => {\n try {\n const binaryData = Buffer.from(hexString, \"hex\");\n const decodedData = proto.KeyList.decode(binaryData);\n\n return !!decodedData.keys && Array.isArray(decodedData.keys);\n } catch (error) {\n return false;\n }\n};\n"],"names":["ASN1Decoder","constructor","data","this","Uint8Array","pos","oids","oidMap","isPublicKey","readLength","length","numBytes","i","readType","readInteger","value","integer","readOctetString","slice","pkey","readBitString","unusedBits","pubkey","readObjectIdentifier","endPos","oid","firstByte","push","Math","floor","byte","oidStr","join","getOids","getOidKeyTypes","map","readSequence","items","read","type","Error","isPublicKeyType"],"mappings":"4BAMO,MAAMA,EAKT,WAAAC,CAAYC,GAKRC,KAAKD,KAAO,IAAIE,WAAWF,GAM3BC,KAAKE,IAAM,EAMXF,KAAKG,KAAO,GAMZH,KAAKI,OAAS,CACV,eAAgB,QAChB,cAAe,UACf,oBAAqB,UAOzBJ,KAAKK,aAAc,CAC3B,CAOI,UAAAC,GACI,IAAIC,EAASP,KAAKD,KAAKC,KAAKE,OAC5B,GAAa,IAATK,EAAe,CACf,IAAIC,EAAoB,IAATD,EACfA,EAAS,EACT,IAAK,IAAIE,EAAI,EAAGA,EAAID,EAAUC,IAC1BF,EAAUA,GAAU,EAAKP,KAAKD,KAAKC,KAAKE,MAExD,CACQ,OAAOK,CACf,CAOI,QAAAG,GACI,OAAOV,KAAKD,KAAKC,KAAKE,MAC9B,CAOI,WAAAS,GACI,MAAMJ,EAASP,KAAKM,aACpB,IAAIM,EAAQ,EACZ,IAAK,IAAIH,EAAI,EAAGA,EAAIF,EAAQE,IACxBG,EAASA,GAAS,EAAKZ,KAAKD,KAAKC,KAAKE,OAE1C,MAAO,CAAEW,QAASD,EAC1B,CAOI,eAAAE,GACI,MAAMP,EAASP,KAAKM,aACdM,EAAQZ,KAAKD,KAAKgB,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B,KAAK,EACD,OAAOd,KAAKoB,uBAChB,KAAK,GAEL,KAAK,IAEL,KAAK,IACD,OAAOpB,KAAKiC,eAChB,QACI,MAAM,IAAII,MAAM,qBAAqBD,KAErD,CAMI,eAAAE,GACI,OAAOtC,KAAKK,WACpB"}
|
package/lib/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e="hiero-sdk-js",o="2.78.0-beta.2";export{e as SDK_NAME,o as SDK_VERSION};
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hiero-ledger/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.78.0-beta.2",
|
|
4
4
|
"description": "Hiero SDK",
|
|
5
5
|
"types": "./lib/index.d.ts",
|
|
6
6
|
"main": "./lib/index.cjs",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"@ethersproject/bytes": "5.8.0",
|
|
66
66
|
"@ethersproject/rlp": "5.8.0",
|
|
67
67
|
"@grpc/grpc-js": "1.12.6",
|
|
68
|
-
"@
|
|
69
|
-
"@
|
|
68
|
+
"@hiero-ledger/cryptography": "1.15.0",
|
|
69
|
+
"@hiero-ledger/proto": "2.24.0",
|
|
70
70
|
"ansi-regex": "6.2.2",
|
|
71
71
|
"ansi-styles": "6.2.3",
|
|
72
72
|
"bignumber.js": "9.1.1",
|
package/src/Cache.js
CHANGED
|
@@ -16,16 +16,16 @@
|
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* @namespace proto
|
|
19
|
-
* @typedef {import("@
|
|
20
|
-
* @typedef {import("@
|
|
21
|
-
* @typedef {import("@
|
|
22
|
-
* @typedef {import("@
|
|
19
|
+
* @typedef {import("@hiero-ledger/proto").proto.IKey} HieroProto.proto.IKey
|
|
20
|
+
* @typedef {import("@hiero-ledger/proto").proto.IKeyList} HieroProto.proto.IKeyList
|
|
21
|
+
* @typedef {import("@hiero-ledger/proto").proto.IThresholdKey} HieroProto.proto.IThresholdKey
|
|
22
|
+
* @typedef {import("@hiero-ledger/proto").proto.IContractID} HieroProto.proto.IContractID
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* @namespace cryptography
|
|
27
|
-
* @typedef {import("@
|
|
28
|
-
* @typedef {import("@
|
|
27
|
+
* @typedef {import("@hiero-ledger/cryptography").PrivateKey} cryptography.PrivateKey
|
|
28
|
+
* @typedef {import("@hiero-ledger/cryptography").Mnemonic} cryptography.Mnemonic
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
31
|
/**
|
package/src/Duration.js
CHANGED
package/src/EntityIdHelper.js
CHANGED
|
@@ -5,7 +5,7 @@ import * as hex from "./encoding/hex.js";
|
|
|
5
5
|
import BadEntityIdError from "./BadEntityIdError.js";
|
|
6
6
|
import * as util from "./util.js";
|
|
7
7
|
import base32 from "./base32.js";
|
|
8
|
-
import * as HieroProto from "@
|
|
8
|
+
import * as HieroProto from "@hiero-ledger/proto";
|
|
9
9
|
import PublicKey from "./PublicKey.js";
|
|
10
10
|
import { arrayify } from "@ethersproject/bytes";
|
|
11
11
|
import EvmAddress from "./EvmAddress.js";
|
package/src/EthereumFlow.js
CHANGED
|
@@ -9,13 +9,13 @@ import * as hex from "./encoding/hex.js";
|
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @namespace proto
|
|
12
|
-
* @typedef {import("@
|
|
13
|
-
* @typedef {import("@
|
|
14
|
-
* @typedef {import("@
|
|
15
|
-
* @typedef {import("@
|
|
16
|
-
* @typedef {import("@
|
|
17
|
-
* @typedef {import("@
|
|
18
|
-
* @typedef {import("@
|
|
12
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransaction} HieroProto.proto.ITransaction
|
|
13
|
+
* @typedef {import("@hiero-ledger/proto").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction
|
|
14
|
+
* @typedef {import("@hiero-ledger/proto").proto.TransactionBody} HieroProto.proto.TransactionBody
|
|
15
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionBody} HieroProto.proto.ITransactionBody
|
|
16
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionResponse} HieroProto.proto.ITransactionResponse
|
|
17
|
+
* @typedef {import("@hiero-ledger/proto").proto.IEthereumTransactionBody} HieroProto.proto.IEthereumTransactionBody
|
|
18
|
+
* @typedef {import("@hiero-ledger/proto").proto.IAccountID} HieroProto.proto.IAccountID
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
/**
|
|
@@ -8,13 +8,13 @@ import Transaction, {
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @namespace proto
|
|
11
|
-
* @typedef {import("@
|
|
12
|
-
* @typedef {import("@
|
|
13
|
-
* @typedef {import("@
|
|
14
|
-
* @typedef {import("@
|
|
15
|
-
* @typedef {import("@
|
|
16
|
-
* @typedef {import("@
|
|
17
|
-
* @typedef {import("@
|
|
11
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransaction} HieroProto.proto.ITransaction
|
|
12
|
+
* @typedef {import("@hiero-ledger/proto").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction
|
|
13
|
+
* @typedef {import("@hiero-ledger/proto").proto.TransactionBody} HieroProto.proto.TransactionBody
|
|
14
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionBody} HieroProto.proto.ITransactionBody
|
|
15
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionResponse} HieroProto.proto.ITransactionResponse
|
|
16
|
+
* @typedef {import("@hiero-ledger/proto").proto.IEthereumTransactionBody} HieroProto.proto.IEthereumTransactionBody
|
|
17
|
+
* @typedef {import("@hiero-ledger/proto").proto.IAccountID} HieroProto.proto.IAccountID
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
/**
|
package/src/EvmAddress.js
CHANGED
package/src/ExchangeRate.js
CHANGED
|
@@ -61,7 +61,7 @@ export default class ExchangeRate {
|
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
63
|
* @internal
|
|
64
|
-
* @param {import("@
|
|
64
|
+
* @param {import("@hiero-ledger/proto").proto.IExchangeRate} rate
|
|
65
65
|
* @returns {ExchangeRate}
|
|
66
66
|
*/
|
|
67
67
|
static _fromProtobuf(rate) {
|
|
@@ -82,7 +82,7 @@ export default class ExchangeRate {
|
|
|
82
82
|
|
|
83
83
|
/**
|
|
84
84
|
* @internal
|
|
85
|
-
* @returns {import("@
|
|
85
|
+
* @returns {import("@hiero-ledger/proto").proto.IExchangeRate}
|
|
86
86
|
*/
|
|
87
87
|
_toProtobuf() {
|
|
88
88
|
return {
|
package/src/ExchangeRates.js
CHANGED
package/src/FeeComponents.js
CHANGED
package/src/FeeData.js
CHANGED
package/src/FeeDataType.js
CHANGED
package/src/FeeSchedule.js
CHANGED
package/src/FeeSchedules.js
CHANGED
package/src/FreezeType.js
CHANGED
package/src/Key.js
CHANGED
package/src/KeyList.js
CHANGED
|
@@ -5,9 +5,9 @@ import CACHE from "./Cache.js";
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @namespace proto
|
|
8
|
-
* @typedef {import("@
|
|
9
|
-
* @typedef {import("@
|
|
10
|
-
* @typedef {import("@
|
|
8
|
+
* @typedef {import("@hiero-ledger/proto").proto.IKey} HieroProto.proto.IKey
|
|
9
|
+
* @typedef {import("@hiero-ledger/proto").proto.IKeyList} HieroProto.proto.IKeyList
|
|
10
|
+
* @typedef {import("@hiero-ledger/proto").proto.IThresholdKey} HieroProto.proto.IThresholdKey
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
/**
|
package/src/Mnemonic.js
CHANGED
package/src/PrivateKey.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
|
2
2
|
import { hexlify } from "@ethersproject/bytes";
|
|
3
|
-
import { PrivateKey as PrivateKeyCrypto } from "@
|
|
4
|
-
import { proto } from "@
|
|
3
|
+
import { PrivateKey as PrivateKeyCrypto } from "@hiero-ledger/cryptography";
|
|
4
|
+
import { proto } from "@hiero-ledger/proto";
|
|
5
5
|
import Mnemonic from "./Mnemonic.js";
|
|
6
6
|
import PublicKey from "./PublicKey.js";
|
|
7
7
|
import Key from "./Key.js";
|
|
@@ -18,11 +18,11 @@ import { ASN1Decoder } from "./util/ASN1-Decoder.js";
|
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* @namespace proto
|
|
21
|
-
* @typedef {import("@
|
|
22
|
-
* @typedef {import("@
|
|
23
|
-
* @typedef {import("@
|
|
24
|
-
* @typedef {import("@
|
|
25
|
-
* @typedef {import("@
|
|
21
|
+
* @typedef {import("@hiero-ledger/proto").proto.IKey} HieroProto.proto.IKey
|
|
22
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransaction} HieroProto.proto.ITransaction
|
|
23
|
+
* @typedef {import("@hiero-ledger/proto").proto.ISignaturePair} HieroProto.proto.ISignaturePair
|
|
24
|
+
* @typedef {import("@hiero-ledger/proto").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction
|
|
25
|
+
* @typedef {import("@hiero-ledger/proto").proto.TransactionBody} HieroProto.proto.TransactionBody
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
28
|
export default class PrivateKey extends Key {
|
package/src/PrngTransaction.js
CHANGED
|
@@ -6,15 +6,15 @@ import Transaction, {
|
|
|
6
6
|
import { isNumber } from "./util.js";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* @typedef {import("@
|
|
10
|
-
* @typedef {import("@
|
|
11
|
-
* @typedef {import("@
|
|
12
|
-
* @typedef {import("@
|
|
13
|
-
* @typedef {import("@
|
|
14
|
-
* @typedef {import("@
|
|
15
|
-
* @typedef {import("@
|
|
16
|
-
* @typedef {import("@
|
|
17
|
-
* @typedef {import("@
|
|
9
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransaction} HieroProto.proto.ITransaction
|
|
10
|
+
* @typedef {import("@hiero-ledger/proto").proto.Transaction} HieroProto.proto.Transaction
|
|
11
|
+
* @typedef {import("@hiero-ledger/proto").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction
|
|
12
|
+
* @typedef {import("@hiero-ledger/proto").proto.SignedTransaction} HieroProto.proto.SignedTransaction
|
|
13
|
+
* @typedef {import("@hiero-ledger/proto").proto.IUtilPrngTransactionBody } HieroProto.proto.IUtilPrngTransactionBody
|
|
14
|
+
* @typedef {import("@hiero-ledger/proto").proto.UtilPrngTransactionBody} HieroProto.proto.UtilPrngTransactionBody
|
|
15
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionResponse} HieroProto.proto.TransactionResponse
|
|
16
|
+
* @typedef {import("@hiero-ledger/proto").proto.TransactionBody} HieroProto.proto.TransactionBody
|
|
17
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionBody} HieroProto.proto.ITransactionBody
|
|
18
18
|
* @typedef {import("./account/AccountId.js").default} AccountId
|
|
19
19
|
* @typedef {import("./transaction/TransactionId.js").default} TransactionId
|
|
20
20
|
*/
|
package/src/PublicKey.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
|
2
2
|
|
|
3
|
-
import { PublicKey as PublicKeyCrypto } from "@
|
|
3
|
+
import { PublicKey as PublicKeyCrypto } from "@hiero-ledger/cryptography";
|
|
4
4
|
import { arrayEqual } from "./array.js";
|
|
5
5
|
import Key from "./Key.js";
|
|
6
6
|
import CACHE from "./Cache.js";
|
|
@@ -12,10 +12,10 @@ import CACHE from "./Cache.js";
|
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* @namespace proto
|
|
15
|
-
* @typedef {import("@
|
|
16
|
-
* @typedef {import("@
|
|
17
|
-
* @typedef {import("@
|
|
18
|
-
* @typedef {import("@
|
|
15
|
+
* @typedef {import("@hiero-ledger/proto").proto.IKey} HieroProto.proto.IKey
|
|
16
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransaction} HieroProto.proto.ITransaction
|
|
17
|
+
* @typedef {import("@hiero-ledger/proto").proto.ISignaturePair} HieroProto.proto.ISignaturePair
|
|
18
|
+
* @typedef {import("@hiero-ledger/proto").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
export default class PublicKey extends Key {
|
package/src/RequestType.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @namespace proto
|
|
5
|
-
* @typedef {import("@
|
|
5
|
+
* @typedef {import("@hiero-ledger/proto").proto.HederaFunctionality} HieroProto.proto.HederaFunctionality
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
export default class RequestType {
|
package/src/StakingInfo.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import AccountId from "./account/AccountId.js";
|
|
4
4
|
import Hbar from "./Hbar.js";
|
|
5
5
|
import Timestamp from "./Timestamp.js";
|
|
6
|
-
import * as HieroProto from "@
|
|
6
|
+
import * as HieroProto from "@hiero-ledger/proto";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @typedef {import("long")} Long
|
package/src/Status.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @namespace proto
|
|
5
|
-
* @typedef {import("@
|
|
5
|
+
* @typedef {import("@hiero-ledger/proto").proto.ResponseCodeEnum} HieroProto.proto.ResponseCodeEnum
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
export default class Status {
|
package/src/Timestamp.js
CHANGED
|
@@ -5,7 +5,7 @@ import Cache from "./Cache.js";
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @namespace proto
|
|
8
|
-
* @typedef {import("@
|
|
8
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITimestamp} HieroProto.proto.ITimestamp
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
const MAX_NS = Long.fromNumber(1000000000);
|
package/src/Transfer.js
CHANGED
|
@@ -12,8 +12,8 @@ import Hbar from "./Hbar.js";
|
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* @namespace proto
|
|
15
|
-
* @typedef {import("@
|
|
16
|
-
* @typedef {import("@
|
|
15
|
+
* @typedef {import("@hiero-ledger/proto").proto.IAccountAmount} HieroProto.proto.IAccountAmount
|
|
16
|
+
* @typedef {import("@hiero-ledger/proto").proto.IAccountID} HieroProto.proto.IAccountID
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
/**
|
|
@@ -14,13 +14,13 @@ import * as util from "../util.js";
|
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* @namespace proto
|
|
17
|
-
* @typedef {import("@
|
|
18
|
-
* @typedef {import("@
|
|
19
|
-
* @typedef {import("@
|
|
20
|
-
* @typedef {import("@
|
|
21
|
-
* @typedef {import("@
|
|
22
|
-
* @typedef {import("@
|
|
23
|
-
* @typedef {import("@
|
|
17
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransaction} HieroProto.proto.ITransaction
|
|
18
|
+
* @typedef {import("@hiero-ledger/proto").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction
|
|
19
|
+
* @typedef {import("@hiero-ledger/proto").proto.TransactionBody} HieroProto.proto.TransactionBody
|
|
20
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionBody} HieroProto.proto.ITransactionBody
|
|
21
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionResponse} HieroProto.proto.ITransactionResponse
|
|
22
|
+
* @typedef {import("@hiero-ledger/proto").proto.IAccountID} HieroProto.proto.IAccountID
|
|
23
|
+
* @typedef {import("@hiero-ledger/proto").proto.IContractID} HieroProto.proto.IContractID
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
26
|
/**
|