@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContractFunctionResult.js","sources":["../../src/contract/ContractFunctionResult.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport ContractLogInfo from \"./ContractLogInfo.js\";\nimport ContractId from \"./ContractId.js\";\nimport AccountId from \"../account/AccountId.js\";\nimport BigNumber from \"bignumber.js\";\nimport * as hex from \"../encoding/hex.js\";\nimport * as utf8 from \"../encoding/utf8.js\";\nimport * as util from \"../util.js\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { ParamType, defaultAbiCoder } from \"@ethersproject/abi\";\nimport Long from \"long\";\nimport ContractNonceInfo from \"./ContractNonceInfo.js\";\n\n/**\n * @typedef {import(\"./ContractStateChange.js\").default} ContractStateChange\n */\n\n/**\n * @namespace proto\n * @typedef {import(\"@hashgraph/proto\").proto.IContractFunctionResult} HieroProto.proto.IContractFunctionResult\n * @typedef {import(\"@hashgraph/proto\").proto.IContractID} HieroProto.proto.IContractID\n */\n\n/**\n * The result returned by a call to a smart contract function. This is part of the response to\n * a ContractCallLocal query, and is in the record for a ContractCall or ContractCreateInstance\n * transaction. The ContractCreateInstance transaction record has the results of the call to\n * the constructor.\n */\nexport default class ContractFunctionResult {\n /**\n * Constructor isn't part of the stable API\n *\n * @param {object} result\n * @param {boolean} result._createResult\n * @param {?ContractId} result.contractId\n * @param {?string} result.errorMessage\n * @param {Uint8Array} result.bloom\n * @param {Long} result.gasUsed\n * @param {ContractLogInfo[]} result.logs\n * @param {ContractId[]} result.createdContractIds\n * @param {Uint8Array | null} result.evmAddress\n * @param {Uint8Array} result.bytes\n * @param {Long} result.gas\n * @param {Long} result.amount\n * @param {Uint8Array} result.functionParameters\n * @param {?AccountId} result.senderAccountId\n * @param {ContractStateChange[]} result.stateChanges\n * @param {ContractNonceInfo[]} result.contractNonces\n * @param {Long | null} result.signerNonce\n */\n constructor(result) {\n /**\n * Determines if this result came from `record.contractCreateResult` if true\n * or `record.contractCallResult` if false\n */\n this._createResult = result._createResult;\n\n /**\n * The smart contract instance whose function was called.\n */\n this.contractId = result.contractId;\n\n this.bytes = result.bytes;\n\n /**\n * Message In case there was an error during smart contract execution.\n */\n this.errorMessage = result.errorMessage;\n\n /**\n * Bloom filter for record\n */\n this.bloom = result.bloom;\n\n /**\n * Units of gas used to execute contract.\n */\n this.gasUsed = result.gasUsed;\n\n /**\n * The log info for events returned by the function.\n */\n this.logs = result.logs;\n\n /**\n * @deprecated the list of smart contracts that were created by the function call.\n *\n * The created ids will now _also_ be externalized through internal transaction\n * records, where each record has its alias field populated with the new contract's\n * EVM address. (This is needed for contracts created with CREATE2, since\n * there is no longer a simple relationship between the new contract's 0.0.X id\n * and its Solidity address.)\n */\n // eslint-disable-next-line deprecation/deprecation\n this.createdContractIds = result.createdContractIds;\n\n this.evmAddress = result.evmAddress;\n\n /**\n * @deprecated - Use mirror node for contract traceability instead\n */\n // eslint-disable-next-line deprecation/deprecation\n this.stateChanges = result.stateChanges;\n\n /**\n * The amount of gas available for the call, aka the gasLimit.\n */\n this.gas = result.gas;\n\n /**\n * Number of tinybars sent (the function must be payable if this is nonzero).\n */\n this.amount = result.amount;\n\n /**\n * The parameters passed into the contract call.\n */\n this.functionParameters = result.functionParameters;\n\n /**\n * The account that is the \"sender.\" If not present it is the accountId from the transactionId.\n *\n * This field should only be populated when the paired TransactionBody in the record stream is not a\n * ContractCreateTransactionBody or a ContractCallTransactionBody.\n */\n this.senderAccountId = result.senderAccountId;\n\n /**\n * A list of updated contract account nonces containing the new nonce value for each contract account.\n * This is always empty in a ContractCallLocalResponse#ContractFunctionResult message, since no internal creations can happen in a static EVM call.\n */\n this.contractNonces = result.contractNonces;\n\n /**\n * If not null this field specifies what the value of the signer account nonce is post transaction execution.\n * For transactions that don't update the signer nonce (like HAPI ContractCall and ContractCreate transactions) this field should be null.\n */\n this.signerNonce = result.signerNonce;\n }\n\n /**\n * @param {HieroProto.proto.IContractFunctionResult} result\n * @param {boolean} _createResult\n * @returns {ContractFunctionResult}\n */\n static _fromProtobuf(result, _createResult) {\n const contractId = /** @type {HieroProto.proto.IContractID | null} */ (\n result.contractID\n );\n const gasUsed = /** @type {Long} */ (result.gasUsed);\n const gas = /** @type {Long} */ (result.gas ? result.gas : -1);\n const amount = /** @type {Long} */ (result.amount ? result.amount : -1);\n\n return new ContractFunctionResult({\n _createResult,\n bytes: /** @type {Uint8Array} */ (result.contractCallResult),\n contractId:\n contractId != null\n ? ContractId._fromProtobuf(contractId)\n : null,\n errorMessage:\n result.errorMessage != null ? result.errorMessage : null,\n bloom: /** @type {Uint8Array} */ (result.bloom),\n gasUsed:\n gasUsed instanceof Long ? gasUsed : Long.fromValue(gasUsed),\n logs: (result.logInfo != null ? result.logInfo : []).map((info) =>\n ContractLogInfo._fromProtobuf(info),\n ),\n createdContractIds: (result.createdContractIDs != null\n ? result.createdContractIDs\n : []\n ).map((contractId) => ContractId._fromProtobuf(contractId)),\n evmAddress:\n result.evmAddress != null &&\n Object.hasOwn(result.evmAddress, \"value\") &&\n result.evmAddress.value != null\n ? result.evmAddress.value\n : null,\n stateChanges: [],\n gas: gas instanceof Long ? gas : Long.fromValue(gas),\n amount: amount instanceof Long ? amount : Long.fromValue(amount),\n functionParameters: /** @type {Uint8Array} */ (\n result.functionParameters\n ),\n senderAccountId:\n result.senderId != null\n ? AccountId._fromProtobuf(result.senderId)\n : null,\n contractNonces: (result.contractNonces != null\n ? result.contractNonces\n : []\n ).map((contractNonce) =>\n ContractNonceInfo._fromProtobuf(contractNonce),\n ),\n signerNonce:\n result.signerNonce != null\n ? Object.hasOwn(result.signerNonce, \"value\")\n ? result.signerNonce.value || null\n : null\n : null,\n });\n }\n\n /**\n * @returns {Uint8Array}\n */\n asBytes() {\n return this.bytes;\n }\n\n /**\n * @param {number} [index]\n * @returns {string}\n */\n getString(index) {\n return utf8.decode(this.getBytes(index));\n }\n\n /**\n * @private\n * @param {number} [index]\n * @returns {Uint8Array}\n */\n getBytes(index) {\n // Len should never be larger than Number.MAX\n // index * 32 is the position of the lenth\n // (index + 1) * 32 onward to (index + 1) * 32 + len will be the elements of the array\n // Arrays in solidity cannot be longer than 1024:\n // https://solidity.readthedocs.io/en/v0.4.21/introduction-to-smart-contracts.html\n const offset = this.getInt32(index);\n const len = util.safeView(this.bytes).getInt32(offset + 28);\n\n return this.bytes.subarray(offset + 32, offset + 32 + len);\n }\n\n /**\n * @param {number} [index]\n * @returns {Uint8Array}\n */\n getBytes32(index) {\n return this.bytes.subarray(\n (index != null ? index : 0) * 32,\n (index != null ? index : 0) * 32 + 32,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {boolean}\n */\n getBool(index) {\n return this.bytes[(index != null ? index : 0) * 32 + 31] !== 0;\n }\n\n /**\n * @param {number} [index]\n * @returns {number}\n */\n getInt8(index) {\n const position = (index != null ? index : 0) * 32 + 31;\n return util.safeView(this.bytes).getInt8(position);\n }\n\n /**\n * @param {number} [index]\n * @returns {number}\n */\n getUint8(index) {\n return this.bytes[(index != null ? index : 0) * 32 + 31];\n }\n\n /**\n * @param {number} [index]\n * @returns {number}\n */\n getInt16(index) {\n // .getInt32() interprets as big-endian\n // Using DataView instead of Uint32Array because the latter interprets\n // using platform endianness which is little-endian on x86\n const position = (index != null ? index : 0) * 32 + 28;\n return util.safeView(this.bytes).getInt32(position);\n }\n\n /**\n * @param {number} [index]\n * @returns {number}\n */\n getUint16(index) {\n // .getUint32() interprets as big-endian\n // Using DataView instead of Uint32Array because the latter interprets\n // using platform endianness which is little-endian on x86\n const position = (index != null ? index : 0) * 32 + 28;\n return util.safeView(this.bytes).getUint32(position);\n }\n\n /**\n * @param {number} [index]\n * @returns {number}\n */\n getInt24(index) {\n // .getInt32() interprets as big-endian\n // Using DataView instead of Uint32Array because the latter interprets\n // using platform endianness which is little-endian on x86\n const position = (index != null ? index : 0) * 32 + 28;\n return util.safeView(this.bytes).getInt32(position);\n }\n\n /**\n * @param {number} [index]\n * @returns {number}\n */\n getUint24(index) {\n // .getUint32() interprets as big-endian\n // Using DataView instead of Uint32Array because the latter interprets\n // using platform endianness which is little-endian on x86\n const position = (index != null ? index : 0) * 32 + 28;\n return util.safeView(this.bytes).getUint32(position);\n }\n\n /**\n * @param {number} [index]\n * @returns {number}\n */\n getInt32(index) {\n // .getInt32() interprets as big-endian\n // Using DataView instead of Uint32Array because the latter interprets\n // using platform endianness which is little-endian on x86\n const position = (index != null ? index : 0) * 32 + 28;\n return util.safeView(this.bytes).getInt32(position);\n }\n\n /**\n * @param {number} [index]\n * @returns {number}\n */\n getUint32(index) {\n // .getUint32() interprets as big-endian\n // Using DataView instead of Uint32Array because the latter interprets\n // using platform endianness which is little-endian on x86\n const position = (index != null ? index : 0) * 32 + 28;\n return util.safeView(this.bytes).getUint32(position);\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt40(index) {\n const result = defaultAbiCoder.decode(\n [\"int40\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint40(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(27, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt48(index) {\n const result = defaultAbiCoder.decode(\n [\"int48\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint48(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(26, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt56(index) {\n const result = defaultAbiCoder.decode(\n [\"int56\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint56(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(25, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt64(index) {\n const result = defaultAbiCoder.decode(\n [\"int64\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint64(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(24, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt72(index) {\n const result = defaultAbiCoder.decode(\n [\"int72\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint72(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(23, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt80(index) {\n const result = defaultAbiCoder.decode(\n [\"int80\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint80(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(22, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt88(index) {\n const result = defaultAbiCoder.decode(\n [\"int88\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint88(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(21, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt96(index) {\n const result = defaultAbiCoder.decode(\n [\"int96\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint96(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(20, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt104(index) {\n const result = defaultAbiCoder.decode(\n [\"int104\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint104(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(19, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt112(index) {\n const result = defaultAbiCoder.decode(\n [\"int112\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint112(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(18, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt120(index) {\n const result = defaultAbiCoder.decode(\n [\"int120\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint120(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(17, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt128(index) {\n const result = defaultAbiCoder.decode(\n [\"int128\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint128(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(16, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt136(index) {\n const result = defaultAbiCoder.decode(\n [\"int136\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint136(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(15, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt144(index) {\n const result = defaultAbiCoder.decode(\n [\"int144\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint144(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(14, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt152(index) {\n const result = defaultAbiCoder.decode(\n [\"int152\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint152(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(13, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt160(index) {\n const result = defaultAbiCoder.decode(\n [\"int160\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint160(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(12, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt168(index) {\n const result = defaultAbiCoder.decode(\n [\"int168\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint168(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(11, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt176(index) {\n const result = defaultAbiCoder.decode(\n [\"int176\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint176(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(10, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt184(index) {\n const result = defaultAbiCoder.decode(\n [\"int184\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint184(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(9, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt192(index) {\n const result = defaultAbiCoder.decode(\n [\"int192\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint192(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(8, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt200(index) {\n const result = defaultAbiCoder.decode(\n [\"int200\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint200(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(7, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt208(index) {\n const result = defaultAbiCoder.decode(\n [\"int208\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint208(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(6, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt216(index) {\n const result = defaultAbiCoder.decode(\n [\"int216\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint216(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(5, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt224(index) {\n const result = defaultAbiCoder.decode(\n [\"int224\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint224(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(4, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt232(index) {\n const result = defaultAbiCoder.decode(\n [\"int232\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint232(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(3, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt240(index) {\n const result = defaultAbiCoder.decode(\n [\"int240\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint240(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(2, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt248(index) {\n const result = defaultAbiCoder.decode(\n [\"int248\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint248(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(1, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt256(index) {\n const result = defaultAbiCoder.decode(\n [\"int256\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint256(index) {\n return new BigNumber(hex.encode(this._getBytes32(index)), 16);\n }\n\n /**\n * @param {number} [index]\n * @returns {string}\n */\n getAddress(index) {\n return hex.encode(\n this.bytes.subarray(\n (index != null ? index : 0) * 32 + 12,\n (index != null ? index : 0) * 32 + 32,\n ),\n );\n }\n\n /**\n * @description Decode the data according to the array of types, each of which may be a string or ParamType.\n * @param {Array<string | ParamType>} types\n * @returns {string | any}\n */\n getResult(types) {\n return defaultAbiCoder.decode(types, this.bytes);\n }\n\n /**\n * @param {number} [index]\n * @returns {Uint8Array}\n */\n _getBytes32(index) {\n return this.bytes.subarray(\n (index != null ? index : 0) * 32,\n (index != null ? index : 0) * 32 + 32,\n );\n }\n\n /**\n * @returns {HieroProto.proto.IContractFunctionResult}\n */\n _toProtobuf() {\n return {\n contractID:\n this.contractId != null ? this.contractId._toProtobuf() : null,\n contractCallResult: this.bytes,\n errorMessage: this.errorMessage,\n bloom: this.bloom,\n gasUsed: this.gasUsed,\n logInfo: this.logs.map((log) => log._toProtobuf()),\n // eslint-disable-next-line deprecation/deprecation\n createdContractIDs: this.createdContractIds.map((id) =>\n id._toProtobuf(),\n ),\n evmAddress:\n this.evmAddress != null\n ? {\n value: this.evmAddress,\n }\n : null,\n gas: this.gas,\n amount: this.amount,\n functionParameters: this.functionParameters,\n senderId:\n this.senderAccountId != null\n ? this.senderAccountId._toProtobuf()\n : null,\n contractNonces: this.contractNonces.map((contractNonce) =>\n contractNonce._toProtobuf(),\n ),\n signerNonce:\n this.signerNonce != null\n ? {\n value: this.signerNonce,\n }\n : null,\n };\n }\n}\n"],"names":["ContractFunctionResult","constructor","result","this","_createResult","contractId","bytes","errorMessage","bloom","gasUsed","logs","createdContractIds","evmAddress","stateChanges","gas","amount","functionParameters","senderAccountId","contractNonces","signerNonce","_fromProtobuf","ContractId","Long","fromValue","logInfo","map","info","ContractLogInfo","createdContractIDs","Object","hasOwn","value","senderId","AccountId","contractNonce","ContractNonceInfo","asBytes","getString","index","utf8.decode","getBytes","offset","getInt32","len","util.safeView","subarray","getBytes32","getBool","getInt8","position","getUint8","getInt16","getUint16","getUint32","getInt24","getUint24","getInt40","defaultAbiCoder","decode","_getBytes32","BigNumber","toString","getUint40","hex.encode","getInt48","getUint48","getInt56","getUint56","getInt64","getUint64","getInt72","getUint72","getInt80","getUint80","getInt88","getUint88","getInt96","getUint96","getInt104","getUint104","getInt112","getUint112","getInt120","getUint120","getInt128","getUint128","getInt136","getUint136","getInt144","getUint144","getInt152","getUint152","getInt160","getUint160","getInt168","getUint168","getInt176","getUint176","getInt184","getUint184","getInt192","getUint192","getInt200","getUint200","getInt208","getUint208","getInt216","getUint216","getInt224","getUint224","getInt232","getUint232","getInt240","getUint240","getInt248","getUint248","getInt256","getUint256","getAddress","getResult","types","_toProtobuf","contractID","contractCallResult","log","id"],"mappings":"oXA8Be,MAAMA,EAsBjB,WAAAC,CAAYC,GAKRC,KAAKC,cAAgBF,EAAOE,cAK5BD,KAAKE,WAAaH,EAAOG,WAEzBF,KAAKG,MAAQJ,EAAOI,MAKpBH,KAAKI,aAAeL,EAAOK,aAK3BJ,KAAKK,MAAQN,EAAOM,MAKpBL,KAAKM,QAAUP,EAAOO,QAKtBN,KAAKO,KAAOR,EAAOQ,KAYnBP,KAAKQ,mBAAqBT,EAAOS,mBAEjCR,KAAKS,WAAaV,EA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ionResult.js","sources":["../../src/contract/ContractFunctionResult.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport ContractLogInfo from \"./ContractLogInfo.js\";\nimport ContractId from \"./ContractId.js\";\nimport AccountId from \"../account/AccountId.js\";\nimport BigNumber from \"bignumber.js\";\nimport * as hex from \"../encoding/hex.js\";\nimport * as utf8 from \"../encoding/utf8.js\";\nimport * as util from \"../util.js\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { ParamType, defaultAbiCoder } from \"@ethersproject/abi\";\nimport Long from \"long\";\nimport ContractNonceInfo from \"./ContractNonceInfo.js\";\n\n/**\n * @typedef {import(\"./ContractStateChange.js\").default} ContractStateChange\n */\n\n/**\n * @namespace proto\n * @typedef {import(\"@hiero-ledger/proto\").proto.IContractFunctionResult} HieroProto.proto.IContractFunctionResult\n * @typedef {import(\"@hiero-ledger/proto\").proto.IContractID} HieroProto.proto.IContractID\n */\n\n/**\n * The result returned by a call to a smart contract function. This is part of the response to\n * a ContractCallLocal query, and is in the record for a ContractCall or ContractCreateInstance\n * transaction. The ContractCreateInstance transaction record has the results of the call to\n * the constructor.\n */\nexport default class ContractFunctionResult {\n /**\n * Constructor isn't part of the stable API\n *\n * @param {object} result\n * @param {boolean} result._createResult\n * @param {?ContractId} result.contractId\n * @param {?string} result.errorMessage\n * @param {Uint8Array} result.bloom\n * @param {Long} result.gasUsed\n * @param {ContractLogInfo[]} result.logs\n * @param {ContractId[]} result.createdContractIds\n * @param {Uint8Array | null} result.evmAddress\n * @param {Uint8Array} result.bytes\n * @param {Long} result.gas\n * @param {Long} result.amount\n * @param {Uint8Array} result.functionParameters\n * @param {?AccountId} result.senderAccountId\n * @param {ContractStateChange[]} result.stateChanges\n * @param {ContractNonceInfo[]} result.contractNonces\n * @param {Long | null} result.signerNonce\n */\n constructor(result) {\n /**\n * Determines if this result came from `record.contractCreateResult` if true\n * or `record.contractCallResult` if false\n */\n this._createResult = result._createResult;\n\n /**\n * The smart contract instance whose function was called.\n */\n this.contractId = result.contractId;\n\n this.bytes = result.bytes;\n\n /**\n * Message In case there was an error during smart contract execution.\n */\n this.errorMessage = result.errorMessage;\n\n /**\n * Bloom filter for record\n */\n this.bloom = result.bloom;\n\n /**\n * Units of gas used to execute contract.\n */\n this.gasUsed = result.gasUsed;\n\n /**\n * The log info for events returned by the function.\n */\n this.logs = result.logs;\n\n /**\n * @deprecated the list of smart contracts that were created by the function call.\n *\n * The created ids will now _also_ be externalized through internal transaction\n * records, where each record has its alias field populated with the new contract's\n * EVM address. (This is needed for contracts created with CREATE2, since\n * there is no longer a simple relationship between the new contract's 0.0.X id\n * and its Solidity address.)\n */\n // eslint-disable-next-line deprecation/deprecation\n this.createdContractIds = result.createdContractIds;\n\n this.evmAddress = result.evmAddress;\n\n /**\n * @deprecated - Use mirror node for contract traceability instead\n */\n // eslint-disable-next-line deprecation/deprecation\n this.stateChanges = result.stateChanges;\n\n /**\n * The amount of gas available for the call, aka the gasLimit.\n */\n this.gas = result.gas;\n\n /**\n * Number of tinybars sent (the function must be payable if this is nonzero).\n */\n this.amount = result.amount;\n\n /**\n * The parameters passed into the contract call.\n */\n this.functionParameters = result.functionParameters;\n\n /**\n * The account that is the \"sender.\" If not present it is the accountId from the transactionId.\n *\n * This field should only be populated when the paired TransactionBody in the record stream is not a\n * ContractCreateTransactionBody or a ContractCallTransactionBody.\n */\n this.senderAccountId = result.senderAccountId;\n\n /**\n * A list of updated contract account nonces containing the new nonce value for each contract account.\n * This is always empty in a ContractCallLocalResponse#ContractFunctionResult message, since no internal creations can happen in a static EVM call.\n */\n this.contractNonces = result.contractNonces;\n\n /**\n * If not null this field specifies what the value of the signer account nonce is post transaction execution.\n * For transactions that don't update the signer nonce (like HAPI ContractCall and ContractCreate transactions) this field should be null.\n */\n this.signerNonce = result.signerNonce;\n }\n\n /**\n * @param {HieroProto.proto.IContractFunctionResult} result\n * @param {boolean} _createResult\n * @returns {ContractFunctionResult}\n */\n static _fromProtobuf(result, _createResult) {\n const contractId = /** @type {HieroProto.proto.IContractID | null} */ (\n result.contractID\n );\n const gasUsed = /** @type {Long} */ (result.gasUsed);\n const gas = /** @type {Long} */ (result.gas ? result.gas : -1);\n const amount = /** @type {Long} */ (result.amount ? result.amount : -1);\n\n return new ContractFunctionResult({\n _createResult,\n bytes: /** @type {Uint8Array} */ (result.contractCallResult),\n contractId:\n contractId != null\n ? ContractId._fromProtobuf(contractId)\n : null,\n errorMessage:\n result.errorMessage != null ? result.errorMessage : null,\n bloom: /** @type {Uint8Array} */ (result.bloom),\n gasUsed:\n gasUsed instanceof Long ? gasUsed : Long.fromValue(gasUsed),\n logs: (result.logInfo != null ? result.logInfo : []).map((info) =>\n ContractLogInfo._fromProtobuf(info),\n ),\n createdContractIds: (result.createdContractIDs != null\n ? result.createdContractIDs\n : []\n ).map((contractId) => ContractId._fromProtobuf(contractId)),\n evmAddress:\n result.evmAddress != null &&\n Object.hasOwn(result.evmAddress, \"value\") &&\n result.evmAddress.value != null\n ? result.evmAddress.value\n : null,\n stateChanges: [],\n gas: gas instanceof Long ? gas : Long.fromValue(gas),\n amount: amount instanceof Long ? amount : Long.fromValue(amount),\n functionParameters: /** @type {Uint8Array} */ (\n result.functionParameters\n ),\n senderAccountId:\n result.senderId != null\n ? AccountId._fromProtobuf(result.senderId)\n : null,\n contractNonces: (result.contractNonces != null\n ? result.contractNonces\n : []\n ).map((contractNonce) =>\n ContractNonceInfo._fromProtobuf(contractNonce),\n ),\n signerNonce:\n result.signerNonce != null\n ? Object.hasOwn(result.signerNonce, \"value\")\n ? result.signerNonce.value || null\n : null\n : null,\n });\n }\n\n /**\n * @returns {Uint8Array}\n */\n asBytes() {\n return this.bytes;\n }\n\n /**\n * @param {number} [index]\n * @returns {string}\n */\n getString(index) {\n return utf8.decode(this.getBytes(index));\n }\n\n /**\n * @private\n * @param {number} [index]\n * @returns {Uint8Array}\n */\n getBytes(index) {\n // Len should never be larger than Number.MAX\n // index * 32 is the position of the lenth\n // (index + 1) * 32 onward to (index + 1) * 32 + len will be the elements of the array\n // Arrays in solidity cannot be longer than 1024:\n // https://solidity.readthedocs.io/en/v0.4.21/introduction-to-smart-contracts.html\n const offset = this.getInt32(index);\n const len = util.safeView(this.bytes).getInt32(offset + 28);\n\n return this.bytes.subarray(offset + 32, offset + 32 + len);\n }\n\n /**\n * @param {number} [index]\n * @returns {Uint8Array}\n */\n getBytes32(index) {\n return this.bytes.subarray(\n (index != null ? index : 0) * 32,\n (index != null ? index : 0) * 32 + 32,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {boolean}\n */\n getBool(index) {\n return this.bytes[(index != null ? index : 0) * 32 + 31] !== 0;\n }\n\n /**\n * @param {number} [index]\n * @returns {number}\n */\n getInt8(index) {\n const position = (index != null ? index : 0) * 32 + 31;\n return util.safeView(this.bytes).getInt8(position);\n }\n\n /**\n * @param {number} [index]\n * @returns {number}\n */\n getUint8(index) {\n return this.bytes[(index != null ? index : 0) * 32 + 31];\n }\n\n /**\n * @param {number} [index]\n * @returns {number}\n */\n getInt16(index) {\n // .getInt32() interprets as big-endian\n // Using DataView instead of Uint32Array because the latter interprets\n // using platform endianness which is little-endian on x86\n const position = (index != null ? index : 0) * 32 + 28;\n return util.safeView(this.bytes).getInt32(position);\n }\n\n /**\n * @param {number} [index]\n * @returns {number}\n */\n getUint16(index) {\n // .getUint32() interprets as big-endian\n // Using DataView instead of Uint32Array because the latter interprets\n // using platform endianness which is little-endian on x86\n const position = (index != null ? index : 0) * 32 + 28;\n return util.safeView(this.bytes).getUint32(position);\n }\n\n /**\n * @param {number} [index]\n * @returns {number}\n */\n getInt24(index) {\n // .getInt32() interprets as big-endian\n // Using DataView instead of Uint32Array because the latter interprets\n // using platform endianness which is little-endian on x86\n const position = (index != null ? index : 0) * 32 + 28;\n return util.safeView(this.bytes).getInt32(position);\n }\n\n /**\n * @param {number} [index]\n * @returns {number}\n */\n getUint24(index) {\n // .getUint32() interprets as big-endian\n // Using DataView instead of Uint32Array because the latter interprets\n // using platform endianness which is little-endian on x86\n const position = (index != null ? index : 0) * 32 + 28;\n return util.safeView(this.bytes).getUint32(position);\n }\n\n /**\n * @param {number} [index]\n * @returns {number}\n */\n getInt32(index) {\n // .getInt32() interprets as big-endian\n // Using DataView instead of Uint32Array because the latter interprets\n // using platform endianness which is little-endian on x86\n const position = (index != null ? index : 0) * 32 + 28;\n return util.safeView(this.bytes).getInt32(position);\n }\n\n /**\n * @param {number} [index]\n * @returns {number}\n */\n getUint32(index) {\n // .getUint32() interprets as big-endian\n // Using DataView instead of Uint32Array because the latter interprets\n // using platform endianness which is little-endian on x86\n const position = (index != null ? index : 0) * 32 + 28;\n return util.safeView(this.bytes).getUint32(position);\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt40(index) {\n const result = defaultAbiCoder.decode(\n [\"int40\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint40(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(27, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt48(index) {\n const result = defaultAbiCoder.decode(\n [\"int48\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint48(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(26, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt56(index) {\n const result = defaultAbiCoder.decode(\n [\"int56\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint56(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(25, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt64(index) {\n const result = defaultAbiCoder.decode(\n [\"int64\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint64(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(24, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt72(index) {\n const result = defaultAbiCoder.decode(\n [\"int72\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint72(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(23, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt80(index) {\n const result = defaultAbiCoder.decode(\n [\"int80\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint80(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(22, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt88(index) {\n const result = defaultAbiCoder.decode(\n [\"int88\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint88(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(21, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt96(index) {\n const result = defaultAbiCoder.decode(\n [\"int96\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint96(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(20, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt104(index) {\n const result = defaultAbiCoder.decode(\n [\"int104\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint104(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(19, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt112(index) {\n const result = defaultAbiCoder.decode(\n [\"int112\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint112(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(18, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt120(index) {\n const result = defaultAbiCoder.decode(\n [\"int120\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint120(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(17, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt128(index) {\n const result = defaultAbiCoder.decode(\n [\"int128\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint128(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(16, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt136(index) {\n const result = defaultAbiCoder.decode(\n [\"int136\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint136(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(15, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt144(index) {\n const result = defaultAbiCoder.decode(\n [\"int144\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint144(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(14, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt152(index) {\n const result = defaultAbiCoder.decode(\n [\"int152\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint152(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(13, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt160(index) {\n const result = defaultAbiCoder.decode(\n [\"int160\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint160(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(12, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt168(index) {\n const result = defaultAbiCoder.decode(\n [\"int168\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint168(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(11, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt176(index) {\n const result = defaultAbiCoder.decode(\n [\"int176\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint176(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(10, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt184(index) {\n const result = defaultAbiCoder.decode(\n [\"int184\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint184(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(9, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt192(index) {\n const result = defaultAbiCoder.decode(\n [\"int192\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint192(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(8, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt200(index) {\n const result = defaultAbiCoder.decode(\n [\"int200\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint200(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(7, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt208(index) {\n const result = defaultAbiCoder.decode(\n [\"int208\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint208(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(6, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt216(index) {\n const result = defaultAbiCoder.decode(\n [\"int216\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint216(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(5, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt224(index) {\n const result = defaultAbiCoder.decode(\n [\"int224\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint224(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(4, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt232(index) {\n const result = defaultAbiCoder.decode(\n [\"int232\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint232(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(3, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt240(index) {\n const result = defaultAbiCoder.decode(\n [\"int240\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint240(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(2, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt248(index) {\n const result = defaultAbiCoder.decode(\n [\"int248\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint248(index) {\n return new BigNumber(\n hex.encode(this._getBytes32(index).subarray(1, 32)),\n 16,\n );\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getInt256(index) {\n const result = defaultAbiCoder.decode(\n [\"int256\"],\n this._getBytes32(index != null ? index : 0),\n );\n return new BigNumber(result.toString());\n }\n\n /**\n * @param {number} [index]\n * @returns {BigNumber}\n */\n getUint256(index) {\n return new BigNumber(hex.encode(this._getBytes32(index)), 16);\n }\n\n /**\n * @param {number} [index]\n * @returns {string}\n */\n getAddress(index) {\n return hex.encode(\n this.bytes.subarray(\n (index != null ? index : 0) * 32 + 12,\n (index != null ? index : 0) * 32 + 32,\n ),\n );\n }\n\n /**\n * @description Decode the data according to the array of types, each of which may be a string or ParamType.\n * @param {Array<string | ParamType>} types\n * @returns {string | any}\n */\n getResult(types) {\n return defaultAbiCoder.decode(types, this.bytes);\n }\n\n /**\n * @param {number} [index]\n * @returns {Uint8Array}\n */\n _getBytes32(index) {\n return this.bytes.subarray(\n (index != null ? index : 0) * 32,\n (index != null ? index : 0) * 32 + 32,\n );\n }\n\n /**\n * @returns {HieroProto.proto.IContractFunctionResult}\n */\n _toProtobuf() {\n return {\n contractID:\n this.contractId != null ? this.contractId._toProtobuf() : null,\n contractCallResult: this.bytes,\n errorMessage: this.errorMessage,\n bloom: this.bloom,\n gasUsed: this.gasUsed,\n logInfo: this.logs.map((log) => log._toProtobuf()),\n // eslint-disable-next-line deprecation/deprecation\n createdContractIDs: this.createdContractIds.map((id) =>\n id._toProtobuf(),\n ),\n evmAddress:\n this.evmAddress != null\n ? {\n value: this.evmAddress,\n }\n : null,\n gas: this.gas,\n amount: this.amount,\n functionParameters: this.functionParameters,\n senderId:\n this.senderAccountId != null\n ? this.senderAccountId._toProtobuf()\n : null,\n contractNonces: this.contractNonces.map((contractNonce) =>\n contractNonce._toProtobuf(),\n ),\n signerNonce:\n this.signerNonce != null\n ? {\n value: this.signerNonce,\n }\n : null,\n };\n }\n}\n"],"names":["ContractFunctionResult","constructor","result","this","_createResult","contractId","bytes","errorMessage","bloom","gasUsed","logs","createdContractIds","evmAddress","stateChanges","gas","amount","functionParameters","senderAccountId","contractNonces","signerNonce","_fromProtobuf","ContractId","Long","fromValue","logInfo","map","info","ContractLogInfo","createdContractIDs","Object","hasOwn","value","senderId","AccountId","contractNonce","ContractNonceInfo","asBytes","getString","index","utf8.decode","getBytes","offset","getInt32","len","util.safeView","subarray","getBytes32","getBool","getInt8","position","getUint8","getInt16","getUint16","getUint32","getInt24","getUint24","getInt40","defaultAbiCoder","decode","_getBytes32","BigNumber","toString","getUint40","hex.encode","getInt48","getUint48","getInt56","getUint56","getInt64","getUint64","getInt72","getUint72","getInt80","getUint80","getInt88","getUint88","getInt96","getUint96","getInt104","getUint104","getInt112","getUint112","getInt120","getUint120","getInt128","getUint128","getInt136","getUint136","getInt144","getUint144","getInt152","getUint152","getInt160","getUint160","getInt168","getUint168","getInt176","getUint176","getInt184","getUint184","getInt192","getUint192","getInt200","getUint200","getInt208","getUint208","getInt216","getUint216","getInt224","getUint224","getInt232","getUint232","getInt240","getUint240","getInt248","getUint248","getInt256","getUint256","getAddress","getResult","types","_toProtobuf","contractID","contractCallResult","log","id"],"mappings":"oXA8Be,MAAMA,EAsBjB,WAAAC,CAAYC,GAKRC,KAAKC,cAAgBF,EAAOE,cAK5BD,KAAKE,WAAaH,EAAOG,WAEzBF,KAAKG,MAAQJ,EAAOI,MAKpBH,KAAKI,aAAeL,EAAOK,aAK3BJ,KAAKK,MAAQN,EAAOM,MAKpBL,KAAKM,QAAUP,EAAOO,QAKtBN,KAAKO,KAAOR,EAAOQ,KAYnBP,KAAKQ,mBAAqBT,EAAOS,mBAEjCR,KAAKS,WAAaV,EAAOU,WAMzBT,KAAKU,aAAeX,EAAOW,aAK3BV,KAAKW,IAAMZ,EAAOY,IAKlBX,KAAKY,OAASb,EAAOa,OAKrBZ,KAAKa,mBAAqBd,EAAOc,mBAQjCb,KAAKc,gBAAkBf,EAAOe,gBAM9Bd,KAAKe,eAAiBhB,EAAOgB,eAM7Bf,KAAKgB,YAAcjB,EAAOiB,WAClC,CAOI,oBAAOC,CAAclB,EAAQE,GACzB,MAAMC,EACFH,EACH,WACKO,EAA+BP,EAAc,QAC7CY,EAA2BZ,EAAOY,IAAMZ,EAAOY,KAAM,EACrDC,EAA8Bb,EAAOa,OAASb,EAAOa,QAAS,EAEpE,OAAO,IAAIf,EAAuB,CAC9BI,gBACAE,MAAkCJ,EAAyB,mBAC3DG,WACkB,MAAdA,EACMgB,EAAWD,cAAcf,GACzB,KACVE,aAC2B,MAAvBL,EAAOK,aAAuBL,EAAOK,aAAe,KACxDC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AAQ,GAAU,GAE/C,CAKI,WAAAmF,GACI,MAAO,CACHC,WACuB,MAAnBvH,KAAKE,WAAqBF,KAAKE,WAAWoH,cAAgB,KAC9DE,mBAAoBxH,KAAKG,MACzBC,aAAcJ,KAAKI,aACnBC,MAAOL,KAAKK,MACZC,QAASN,KAAKM,QACde,QAASrB,KAAKO,KAAKe,IAAKmG,GAAQA,EAAIH,eAEpC7F,mBAAoBzB,KAAKQ,mBAAmBc,IAAKoG,GAC7CA,EAAGJ,eAEP7G,WACuB,MAAnBT,KAAKS,WACC,CACImB,MAAO5B,KAAKS,YAEhB,KACVE,IAAKX,KAAKW,IACVC,OAAQZ,KAAKY,OACbC,mBAAoBb,KAAKa,mBACzBgB,SAC4B,MAAxB7B,KAAKc,gBACCd,KAAKc,gBAAgBwG,cACrB,KACVvG,eAAgBf,KAAKe,eAAeO,IAAKS,GACrCA,EAAcuF,eAElBtG,YACwB,MAApBhB,KAAKgB,YACC,CACIY,MAAO5B,KAAKgB,aAEhB,KAEtB"}
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var EntityIdHelper = _interopRequireWildcard(require("../EntityIdHelper.cjs"));
|
|
8
8
|
var _Key = _interopRequireDefault(require("../Key.cjs"));
|
|
9
|
-
var HieroProto = _interopRequireWildcard(require("@
|
|
9
|
+
var HieroProto = _interopRequireWildcard(require("@hiero-ledger/proto"));
|
|
10
10
|
var _Cache = _interopRequireDefault(require("../Cache.cjs"));
|
|
11
11
|
var hex = _interopRequireWildcard(require("../encoding/hex.cjs"));
|
|
12
12
|
var _array = require("../array.cjs");
|
|
@@ -120,4 +120,4 @@ export default class ContractId extends Key {
|
|
|
120
120
|
export type Client = import("../client/Client.js").default<any, any>;
|
|
121
121
|
import Key from "../Key.js";
|
|
122
122
|
import Long from "long";
|
|
123
|
-
import * as HieroProto from "@
|
|
123
|
+
import * as HieroProto from "@hiero-ledger/proto";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{constructor as t,fromEvmAddress as r,fromStringSplitter as s,validateChecksum as e,fromSolidityAddress as o,toSolidityAddress as m,toEvmAddress as i,toStringWithChecksum as n,compare as
|
|
1
|
+
import{constructor as t,fromEvmAddress as r,fromStringSplitter as s,validateChecksum as e,fromSolidityAddress as o,toSolidityAddress as m,toEvmAddress as i,toStringWithChecksum as n,compare as u}from"../EntityIdHelper.js";import h from"../Key.js";import*as d from"@hiero-ledger/proto";import a from"../Cache.js";import{decode as l,encode as c}from"../encoding/hex.js";import{arrayEqual as f}from"../array.js";import v from"long";import{isLongZeroAddress as A}from"../util.js";import g from"../EvmAddress.js";class p extends h{constructor(r,s,e,o){super();const m=t(r,s,e);this.shard=m.shard,this.realm=m.realm,this.num=m.num,this.evmAddress=null!=o?o:null,this._checksum=null}static fromEvmAddress(t,s,e){const o=g.fromString(e),[m,i,n,u]=r(t,s,o.toString());return new p(m,i,n,u?.toBytes())}static fromString(t){const r=s(t);if(Number.isNaN(r.shard)||Number.isNaN(r.realm))throw new Error("invalid format for entity ID");const e=null!=r.shard?v.fromString(r.shard):v.ZERO,o=null!=r.realm?v.fromString(r.realm):v.ZERO,[m,i]=r.numOrHex.length<40?[v.fromString(r.numOrHex),void 0]:[v.ZERO,l(r.numOrHex)];return new p(e,o,m,i)}static _fromProtobuf(t){return new p(null!=t.shardNum?t.shardNum:0,null!=t.realmNum?t.realmNum:0,null!=t.contractNum?t.contractNum:0)}get checksum(){return this._checksum}async populateAccountNum(t){const r=`${t.mirrorRestApiBaseUrl}/contracts/${this.toEvmAddress()}`,s=await fetch(r),e=(await s.json()).contract_id;return this.num=v.fromString(e.slice(e.lastIndexOf(".")+1)),this}validate(t){console.warn("Deprecated: Use `validateChecksum` instead"),this.validateChecksum(t)}validateChecksum(t){e(this.shard,this.realm,this.num,this._checksum,t)}static fromBytes(t){return p._fromProtobuf(d.proto.ContractID.decode(t))}static fromSolidityAddress(t){return A(l(t))?new p(...o(t)):this.fromEvmAddress(0,0,t)}toSolidityAddress(){return null!=this.evmAddress?c(this.evmAddress):m([this.shard,this.realm,this.num])}toEvmAddress(){return null!=this.evmAddress?i(this.evmAddress):i(this.num)}_toProtobuf(){return{contractNum:this.num,shardNum:this.shard,realmNum:this.realm,evmAddress:this.evmAddress}}toString(){return null!=this.evmAddress?`${this.shard.toString()}.${this.realm.toString()}.${c(this.evmAddress)}`:`${this.shard.toString()}.${this.realm.toString()}.${this.num.toString()}`}toStringWithChecksum(t){return n(this.toString(),t)}toBytes(){return d.proto.ContractID.encode(this._toProtobuf()).finish()}clone(){const t=new p(this);return t._checksum=this._checksum,t.evmAddress=this.evmAddress,t}compare(t){return u([this.shard,this.realm,this.num],[t.shard,t.realm,t.num])}equals(t){let r=!1;return null!=this.evmAddress&&null!=t.evmAddress&&(r=f(this.evmAddress,t.evmAddress)),this.shard.eq(t.shard)&&this.realm.eq(t.realm)&&this.num.eq(t.num)&&r}_toProtobufKey(){return{contractID:this._toProtobuf()}}static __fromProtobufKey(t){return p._fromProtobuf(t)}}a.setContractId(t=>p.__fromProtobufKey(t));export{p as default};
|
|
2
2
|
//# sourceMappingURL=ContractId.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContractId.js","sources":["../../src/contract/ContractId.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport * as EntityIdHelper from \"../EntityIdHelper.js\";\nimport Key from \"../Key.js\";\nimport * as HieroProto from \"@hashgraph/proto\";\nimport CACHE from \"../Cache.js\";\nimport * as hex from \"../encoding/hex.js\";\nimport { arrayEqual } from \"../array.js\";\nimport Long from \"long\";\nimport { isLongZeroAddress } from \"../util.js\";\nimport EvmAddress from \"../EvmAddress.js\";\n\n/**\n * @typedef {import(\"../client/Client.js\").default<*, *>} Client\n */\n\n/**\n * The ID for a crypto-currency contract on Hedera.\n */\nexport default class ContractId extends Key {\n /**\n * @param {number | Long | import(\"../EntityIdHelper\").IEntityId} props\n * @param {(number | Long)=} realm\n * @param {(number | Long)=} num\n * @param {Uint8Array=} evmAddress\n */\n constructor(props, realm, num, evmAddress) {\n super();\n\n const result = EntityIdHelper.constructor(props, realm, num);\n\n this.shard = result.shard;\n this.realm = result.realm;\n this.num = result.num;\n\n this.evmAddress = evmAddress != null ? evmAddress : null;\n\n /**\n * @type {string | null}\n */\n this._checksum = null;\n }\n\n /**\n * @description This handles both long-zero format and evm address format addresses.\n * If an actual evm address is passed, please use `ContractId.populateAccountNum(client)` method\n * to get the actual `num` value, since there is no cryptographic relation to the evm address\n * and cannot be populated directly\n * @param {Long | number} shard\n * @param {Long | number} realm\n * @param {string} evmAddress\n * @returns {ContractId}\n */\n static fromEvmAddress(shard, realm, evmAddress) {\n const evmAddressObj = EvmAddress.fromString(evmAddress);\n\n const [shardLong, realmLong, num, address] =\n EntityIdHelper.fromEvmAddress(\n shard,\n realm,\n evmAddressObj.toString(),\n );\n\n return new ContractId(shardLong, realmLong, num, address?.toBytes());\n }\n\n /**\n * @param {string} text\n * @returns {ContractId}\n */\n static fromString(text) {\n const result = EntityIdHelper.fromStringSplitter(text);\n\n if (Number.isNaN(result.shard) || Number.isNaN(result.realm)) {\n throw new Error(\"invalid format for entity ID\");\n }\n\n const shard =\n result.shard != null ? Long.fromString(result.shard) : Long.ZERO;\n const realm =\n result.realm != null ? Long.fromString(result.realm) : Long.ZERO;\n const [num, evmAddress] =\n result.numOrHex.length < 40\n ? [Long.fromString(result.numOrHex), undefined]\n : [Long.ZERO, hex.decode(result.numOrHex)];\n\n return new ContractId(shard, realm, num, evmAddress);\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.IContractID} id\n * @returns {ContractId}\n */\n static _fromProtobuf(id) {\n const contractId = new ContractId(\n id.shardNum != null ? id.shardNum : 0,\n id.realmNum != null ? id.realmNum : 0,\n id.contractNum != null ? id.contractNum : 0,\n );\n\n return contractId;\n }\n\n /**\n * @returns {string | null}\n */\n get checksum() {\n return this._checksum;\n }\n\n /**\n * @description Gets the actual `num` field of the `ContractId` from the Mirror Node.\n * Should be used after generating `ContractId.fromEvmAddress()` because it sets the `num` field to `0`\n * automatically since there is no connection between the `num` and the `evmAddress`\n * @param {Client} client\n * @returns {Promise<ContractId>}\n */\n async populateAccountNum(client) {\n const mirrorRestApiBaseUrl = client.mirrorRestApiBaseUrl;\n const url = `${mirrorRestApiBaseUrl}/contracts/${this.toEvmAddress()}`;\n\n /* eslint-disable */\n const response = await fetch(url);\n const data = await response.json();\n const mirrorAccountId = data.contract_id;\n\n this.num = Long.fromString(\n mirrorAccountId.slice(mirrorAccountId.lastIndexOf(\".\") + 1),\n );\n /* eslint-enable */\n\n return this;\n }\n\n /**\n * @deprecated - Use `validateChecksum` instead\n * @param {Client} client\n */\n validate(client) {\n console.warn(\"Deprecated: Use `validateChecksum` instead\");\n this.validateChecksum(client);\n }\n\n /**\n * @param {Client} client\n */\n validateChecksum(client) {\n EntityIdHelper.validateChecksum(\n this.shard,\n this.realm,\n this.num,\n this._checksum,\n client,\n );\n }\n\n /**\n * @param {Uint8Array} bytes\n * @returns {ContractId}\n */\n static fromBytes(bytes) {\n return ContractId._fromProtobuf(\n HieroProto.proto.ContractID.decode(bytes),\n );\n }\n\n /**\n * @deprecated - Use `fromEvmAddress` instead\n * @param {string} address\n * @returns {ContractId}\n */\n static fromSolidityAddress(address) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n if (isLongZeroAddress(hex.decode(address))) {\n return new ContractId(\n ...EntityIdHelper.fromSolidityAddress(address),\n );\n } else {\n return this.fromEvmAddress(0, 0, address);\n }\n }\n\n /**\n * @deprecated - Use `toEvmAddress` instead\n * @returns {string}\n */\n toSolidityAddress() {\n if (this.evmAddress != null) {\n return hex.encode(this.evmAddress);\n } else {\n return EntityIdHelper.toSolidityAddress([\n this.shard,\n this.realm,\n this.num,\n ]);\n }\n }\n\n /**\n * @returns {string} EVM-compatible address representation of the entity\n */\n toEvmAddress() {\n if (this.evmAddress != null) {\n return EntityIdHelper.toEvmAddress(this.evmAddress);\n }\n\n return EntityIdHelper.toEvmAddress(this.num);\n }\n /**\n * @internal\n * @returns {HieroProto.proto.IContractID}\n */\n _toProtobuf() {\n return {\n contractNum: this.num,\n shardNum: this.shard,\n realmNum: this.realm,\n evmAddress: this.evmAddress,\n };\n }\n\n /**\n * @returns {string}\n */\n toString() {\n if (this.evmAddress != null) {\n return `${this.shard.toString()}.${this.realm.toString()}.${hex.encode(\n this.evmAddress,\n )}`;\n } else {\n return `${this.shard.toString()}.${this.realm.toString()}.${this.num.toString()}`;\n }\n }\n\n /**\n * @param {Client} client\n * @returns {string}\n */\n toStringWithChecksum(client) {\n return EntityIdHelper.toStringWithChecksum(this.toString(), client);\n }\n\n /**\n * @returns {Uint8Array}\n */\n toBytes() {\n return HieroProto.proto.ContractID.encode(this._toProtobuf()).finish();\n }\n\n /**\n * @returns {ContractId}\n */\n clone() {\n const id = new ContractId(this);\n id._checksum = this._checksum;\n id.evmAddress = this.evmAddress;\n return id;\n }\n\n /**\n * @param {ContractId} other\n * @returns {number}\n */\n compare(other) {\n return EntityIdHelper.compare(\n [this.shard, this.realm, this.num],\n [other.shard, other.realm, other.num],\n );\n }\n\n /**\n * @param {this} other\n * @returns {boolean}\n */\n equals(other) {\n let evmAddresses = false;\n if (this.evmAddress != null && other.evmAddress != null) {\n evmAddresses = arrayEqual(this.evmAddress, other.evmAddress);\n }\n\n return (\n this.shard.eq(other.shard) &&\n this.realm.eq(other.realm) &&\n this.num.eq(other.num) &&\n evmAddresses\n );\n }\n\n /**\n * @returns {HieroProto.proto.IKey}\n */\n _toProtobufKey() {\n return {\n contractID: this._toProtobuf(),\n };\n }\n\n /**\n * @param {HieroProto.proto.IContractID} key\n * @returns {ContractId}\n */\n static __fromProtobufKey(key) {\n return ContractId._fromProtobuf(key);\n }\n}\n\nCACHE.setContractId((key) => ContractId.__fromProtobufKey(key));\n"],"names":["ContractId","Key","constructor","props","realm","num","evmAddress","super","result","EntityIdHelper.constructor","this","shard","_checksum","fromEvmAddress","evmAddressObj","EvmAddress","fromString","shardLong","realmLong","address","EntityIdHelper.fromEvmAddress","toString","toBytes","text","EntityIdHelper.fromStringSplitter","Number","isNaN","Error","Long","ZERO","numOrHex","length","undefined","hex.decode","_fromProtobuf","id","shardNum","realmNum","contractNum","checksum","populateAccountNum","client","url","mirrorRestApiBaseUrl","toEvmAddress","response","fetch","mirrorAccountId","json","contract_id","slice","lastIndexOf","validate","console","warn","validateChecksum","EntityIdHelper.validateChecksum","fromBytes","bytes","HieroProto","proto","ContractID","decode","fromSolidityAddress","isLongZeroAddress","EntityIdHelper.fromSolidityAddress","toSolidityAddress","hex.encode","EntityIdHelper.toSolidityAddress","EntityIdHelper.toEvmAddress","_toProtobuf","toStringWithChecksum","EntityIdHelper.toStringWithChecksum","encode","finish","clone","compare","other","EntityIdHelper.compare","equals","evmAddresses","arrayEqual","eq","_toProtobufKey","contractID","__fromProtobufKey","key","CACHE","setContractId"],"mappings":"yfAmBe,MAAMA,UAAmBC,EAOpC,WAAAC,CAAYC,EAAOC,EAAOC,EAAKC,GAC3BC,QAEA,MAAMC,EAASC,EAA2BN,EAAOC,EAAOC,GAExDK,KAAKC,MAAQH,EAAOG,MACpBD,KAAKN,MAAQI,EAAOJ,MACpBM,KAAKL,IAAMG,EAAOH,IAElBK,KAAKJ,WAA2B,MAAdA,EAAqBA,EAAa,KAKpDI,KAAKE,UAAY,IACzB,CAYI,qBAAOC,CAAeF,EAAOP,EAAOE,GAChC,MAAMQ,EAAgBC,EAAWC,WAAWV,IAErCW,EAAWC,EAAWb,EAAKc,GAC9BC,EACIT,EACAP,EACAU,EAAcO,YAGtB,OAAO,IAAIrB,EAAWiB,EAAWC,EAAWb,EAAKc,GAASG,UAClE,CAMI,iBAAON,CAAWO,GACd,MAAMf,EAASgB,EAAkCD,GAEjD,GAAIE,OAAOC,MAAMlB,EAAOG,QAAUc,OAAOC,MAAMlB,EAAOJ,OAClD,MAAM,IAAIuB,MAAM,gCAGpB,MAAMhB,EACc,MAA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E7B,CAMI,wBAAOe,CAAkBC,GACrB,OAAOtF,EAAWkC,cAAcoD,EACxC,EAGAC,EAAMC,cAAeF,GAAQtF,EAAWqF,kBAAkBC"}
|
|
1
|
+
{"version":3,"file":"ContractId.js","sources":["../../src/contract/ContractId.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport * as EntityIdHelper from \"../EntityIdHelper.js\";\nimport Key from \"../Key.js\";\nimport * as HieroProto from \"@hiero-ledger/proto\";\nimport CACHE from \"../Cache.js\";\nimport * as hex from \"../encoding/hex.js\";\nimport { arrayEqual } from \"../array.js\";\nimport Long from \"long\";\nimport { isLongZeroAddress } from \"../util.js\";\nimport EvmAddress from \"../EvmAddress.js\";\n\n/**\n * @typedef {import(\"../client/Client.js\").default<*, *>} Client\n */\n\n/**\n * The ID for a crypto-currency contract on Hedera.\n */\nexport default class ContractId extends Key {\n /**\n * @param {number | Long | import(\"../EntityIdHelper\").IEntityId} props\n * @param {(number | Long)=} realm\n * @param {(number | Long)=} num\n * @param {Uint8Array=} evmAddress\n */\n constructor(props, realm, num, evmAddress) {\n super();\n\n const result = EntityIdHelper.constructor(props, realm, num);\n\n this.shard = result.shard;\n this.realm = result.realm;\n this.num = result.num;\n\n this.evmAddress = evmAddress != null ? evmAddress : null;\n\n /**\n * @type {string | null}\n */\n this._checksum = null;\n }\n\n /**\n * @description This handles both long-zero format and evm address format addresses.\n * If an actual evm address is passed, please use `ContractId.populateAccountNum(client)` method\n * to get the actual `num` value, since there is no cryptographic relation to the evm address\n * and cannot be populated directly\n * @param {Long | number} shard\n * @param {Long | number} realm\n * @param {string} evmAddress\n * @returns {ContractId}\n */\n static fromEvmAddress(shard, realm, evmAddress) {\n const evmAddressObj = EvmAddress.fromString(evmAddress);\n\n const [shardLong, realmLong, num, address] =\n EntityIdHelper.fromEvmAddress(\n shard,\n realm,\n evmAddressObj.toString(),\n );\n\n return new ContractId(shardLong, realmLong, num, address?.toBytes());\n }\n\n /**\n * @param {string} text\n * @returns {ContractId}\n */\n static fromString(text) {\n const result = EntityIdHelper.fromStringSplitter(text);\n\n if (Number.isNaN(result.shard) || Number.isNaN(result.realm)) {\n throw new Error(\"invalid format for entity ID\");\n }\n\n const shard =\n result.shard != null ? Long.fromString(result.shard) : Long.ZERO;\n const realm =\n result.realm != null ? Long.fromString(result.realm) : Long.ZERO;\n const [num, evmAddress] =\n result.numOrHex.length < 40\n ? [Long.fromString(result.numOrHex), undefined]\n : [Long.ZERO, hex.decode(result.numOrHex)];\n\n return new ContractId(shard, realm, num, evmAddress);\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.IContractID} id\n * @returns {ContractId}\n */\n static _fromProtobuf(id) {\n const contractId = new ContractId(\n id.shardNum != null ? id.shardNum : 0,\n id.realmNum != null ? id.realmNum : 0,\n id.contractNum != null ? id.contractNum : 0,\n );\n\n return contractId;\n }\n\n /**\n * @returns {string | null}\n */\n get checksum() {\n return this._checksum;\n }\n\n /**\n * @description Gets the actual `num` field of the `ContractId` from the Mirror Node.\n * Should be used after generating `ContractId.fromEvmAddress()` because it sets the `num` field to `0`\n * automatically since there is no connection between the `num` and the `evmAddress`\n * @param {Client} client\n * @returns {Promise<ContractId>}\n */\n async populateAccountNum(client) {\n const mirrorRestApiBaseUrl = client.mirrorRestApiBaseUrl;\n const url = `${mirrorRestApiBaseUrl}/contracts/${this.toEvmAddress()}`;\n\n /* eslint-disable */\n const response = await fetch(url);\n const data = await response.json();\n const mirrorAccountId = data.contract_id;\n\n this.num = Long.fromString(\n mirrorAccountId.slice(mirrorAccountId.lastIndexOf(\".\") + 1),\n );\n /* eslint-enable */\n\n return this;\n }\n\n /**\n * @deprecated - Use `validateChecksum` instead\n * @param {Client} client\n */\n validate(client) {\n console.warn(\"Deprecated: Use `validateChecksum` instead\");\n this.validateChecksum(client);\n }\n\n /**\n * @param {Client} client\n */\n validateChecksum(client) {\n EntityIdHelper.validateChecksum(\n this.shard,\n this.realm,\n this.num,\n this._checksum,\n client,\n );\n }\n\n /**\n * @param {Uint8Array} bytes\n * @returns {ContractId}\n */\n static fromBytes(bytes) {\n return ContractId._fromProtobuf(\n HieroProto.proto.ContractID.decode(bytes),\n );\n }\n\n /**\n * @deprecated - Use `fromEvmAddress` instead\n * @param {string} address\n * @returns {ContractId}\n */\n static fromSolidityAddress(address) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n if (isLongZeroAddress(hex.decode(address))) {\n return new ContractId(\n ...EntityIdHelper.fromSolidityAddress(address),\n );\n } else {\n return this.fromEvmAddress(0, 0, address);\n }\n }\n\n /**\n * @deprecated - Use `toEvmAddress` instead\n * @returns {string}\n */\n toSolidityAddress() {\n if (this.evmAddress != null) {\n return hex.encode(this.evmAddress);\n } else {\n return EntityIdHelper.toSolidityAddress([\n this.shard,\n this.realm,\n this.num,\n ]);\n }\n }\n\n /**\n * @returns {string} EVM-compatible address representation of the entity\n */\n toEvmAddress() {\n if (this.evmAddress != null) {\n return EntityIdHelper.toEvmAddress(this.evmAddress);\n }\n\n return EntityIdHelper.toEvmAddress(this.num);\n }\n /**\n * @internal\n * @returns {HieroProto.proto.IContractID}\n */\n _toProtobuf() {\n return {\n contractNum: this.num,\n shardNum: this.shard,\n realmNum: this.realm,\n evmAddress: this.evmAddress,\n };\n }\n\n /**\n * @returns {string}\n */\n toString() {\n if (this.evmAddress != null) {\n return `${this.shard.toString()}.${this.realm.toString()}.${hex.encode(\n this.evmAddress,\n )}`;\n } else {\n return `${this.shard.toString()}.${this.realm.toString()}.${this.num.toString()}`;\n }\n }\n\n /**\n * @param {Client} client\n * @returns {string}\n */\n toStringWithChecksum(client) {\n return EntityIdHelper.toStringWithChecksum(this.toString(), client);\n }\n\n /**\n * @returns {Uint8Array}\n */\n toBytes() {\n return HieroProto.proto.ContractID.encode(this._toProtobuf()).finish();\n }\n\n /**\n * @returns {ContractId}\n */\n clone() {\n const id = new ContractId(this);\n id._checksum = this._checksum;\n id.evmAddress = this.evmAddress;\n return id;\n }\n\n /**\n * @param {ContractId} other\n * @returns {number}\n */\n compare(other) {\n return EntityIdHelper.compare(\n [this.shard, this.realm, this.num],\n [other.shard, other.realm, other.num],\n );\n }\n\n /**\n * @param {this} other\n * @returns {boolean}\n */\n equals(other) {\n let evmAddresses = false;\n if (this.evmAddress != null && other.evmAddress != null) {\n evmAddresses = arrayEqual(this.evmAddress, other.evmAddress);\n }\n\n return (\n this.shard.eq(other.shard) &&\n this.realm.eq(other.realm) &&\n this.num.eq(other.num) &&\n evmAddresses\n );\n }\n\n /**\n * @returns {HieroProto.proto.IKey}\n */\n _toProtobufKey() {\n return {\n contractID: this._toProtobuf(),\n };\n }\n\n /**\n * @param {HieroProto.proto.IContractID} key\n * @returns {ContractId}\n */\n static __fromProtobufKey(key) {\n return ContractId._fromProtobuf(key);\n }\n}\n\nCACHE.setContractId((key) => ContractId.__fromProtobufKey(key));\n"],"names":["ContractId","Key","constructor","props","realm","num","evmAddress","super","result","EntityIdHelper.constructor","this","shard","_checksum","fromEvmAddress","evmAddressObj","EvmAddress","fromString","shardLong","realmLong","address","EntityIdHelper.fromEvmAddress","toString","toBytes","text","EntityIdHelper.fromStringSplitter","Number","isNaN","Error","Long","ZERO","numOrHex","length","undefined","hex.decode","_fromProtobuf","id","shardNum","realmNum","contractNum","checksum","populateAccountNum","client","url","mirrorRestApiBaseUrl","toEvmAddress","response","fetch","mirrorAccountId","json","contract_id","slice","lastIndexOf","validate","console","warn","validateChecksum","EntityIdHelper.validateChecksum","fromBytes","bytes","HieroProto","proto","ContractID","decode","fromSolidityAddress","isLongZeroAddress","EntityIdHelper.fromSolidityAddress","toSolidityAddress","hex.encode","EntityIdHelper.toSolidityAddress","EntityIdHelper.toEvmAddress","_toProtobuf","toStringWithChecksum","EntityIdHelper.toStringWithChecksum","encode","finish","clone","compare","other","EntityIdHelper.compare","equals","evmAddresses","arrayEqual","eq","_toProtobufKey","contractID","__fromProtobufKey","key","CACHE","setContractId"],"mappings":"4fAmBe,MAAMA,UAAmBC,EAOpC,WAAAC,CAA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CAKI,KAAAC,GACI,MAAMxC,EAAK,IAAInC,EAAWU,MAG1B,OAFAyB,EAAGvB,UAAYF,KAAKE,UACpBuB,EAAG7B,WAAaI,KAAKJ,WACd6B,CACf,CAMI,OAAAyC,CAAQC,GACJ,OAAOC,EACH,CAACpE,KAAKC,MAAOD,KAAKN,MAAOM,KAAKL,KAC9B,CAACwE,EAAMlE,MAAOkE,EAAMzE,MAAOyE,EAAMxE,KAE7C,CAMI,MAAA0E,CAAOF,GACH,IAAIG,GAAe,EAKnB,OAJuB,MAAnBtE,KAAKJ,YAA0C,MAApBuE,EAAMvE,aACjC0E,EAAeC,EAAWvE,KAAKJ,WAAYuE,EAAMvE,aAIjDI,KAAKC,MAAMuE,GAAGL,EAAMlE,QACpBD,KAAKN,MAAM8E,GAAGL,EAAMzE,QACpBM,KAAKL,IAAI6E,GAAGL,EAAMxE,MAClB2E,CAEZ,CAKI,cAAAG,GACI,MAAO,CACHC,WAAY1E,KAAK4D,cAE7B,CAMI,wBAAOe,CAAkBC,GACrB,OAAOtF,EAAWkC,cAAcoD,EACxC,EAGAC,EAAMC,cAAeF,GAAQtF,EAAWqF,kBAAkBC"}
|
|
@@ -11,7 +11,7 @@ var _Timestamp = _interopRequireDefault(require("../Timestamp.cjs"));
|
|
|
11
11
|
var _Duration = _interopRequireDefault(require("../Duration.cjs"));
|
|
12
12
|
var _Hbar = _interopRequireDefault(require("../Hbar.cjs"));
|
|
13
13
|
var _long = _interopRequireDefault(require("long"));
|
|
14
|
-
var HieroProto = _interopRequireWildcard(require("@
|
|
14
|
+
var HieroProto = _interopRequireWildcard(require("@hiero-ledger/proto"));
|
|
15
15
|
var _TokenRelationshipMap = _interopRequireDefault(require("../account/TokenRelationshipMap.cjs"));
|
|
16
16
|
var _Key = _interopRequireDefault(require("../Key.cjs"));
|
|
17
17
|
var _LedgerId = _interopRequireDefault(require("../LedgerId.cjs"));
|
|
@@ -154,4 +154,4 @@ import Hbar from "../Hbar.js";
|
|
|
154
154
|
import TokenRelationshipMap from "../account/TokenRelationshipMap.js";
|
|
155
155
|
import LedgerId from "../LedgerId.js";
|
|
156
156
|
import StakingInfo from "../StakingInfo.js";
|
|
157
|
-
import * as HieroProto from "@
|
|
157
|
+
import * as HieroProto from "@hiero-ledger/proto";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import t from"./ContractId.js";import o from"../account/AccountId.js";import n from"../StakingInfo.js";import e from"../Timestamp.js";import i from"../Duration.js";import a from"../Hbar.js";import s from"long";import*as r from"@
|
|
1
|
+
import t from"./ContractId.js";import o from"../account/AccountId.js";import n from"../StakingInfo.js";import e from"../Timestamp.js";import i from"../Duration.js";import a from"../Hbar.js";import s from"long";import*as r from"@hiero-ledger/proto";import c from"../account/TokenRelationshipMap.js";import u from"../Key.js";import l from"../LedgerId.js";const{proto:m}=r;class d{constructor(t){this.contractId=t.contractId,this.accountId=t.accountId,this.contractAccountId=t.contractAccountId,this.adminKey=null!=t.adminKey?t.adminKey:null,this.expirationTime=t.expirationTime,this.autoRenewPeriod=t.autoRenewPeriod,this.autoRenewAccountId=t.autoRenewAccountId,this.storage=t.storage,this.contractMemo=t.contractMemo,this.balance=t.balance,this.isDeleted=t.isDeleted,this.tokenRelationships=t.tokenRelationships,this.maxAutomaticTokenAssociations=t.maxAutomaticTokenAssociations,this.ledgerId=t.ledgerId,this.stakingInfo=t.stakingInfo,Object.freeze(this)}static _fromProtobuf(r){const m=r.autoRenewPeriod.seconds;return new d({contractId:t._fromProtobuf(r.contractID),accountId:o._fromProtobuf(r.accountID),contractAccountId:null!=r.contractAccountID?r.contractAccountID:"",adminKey:null!=r.adminKey?u._fromProtobufKey(r.adminKey):null,expirationTime:e._fromProtobuf(r.expirationTime),autoRenewPeriod:new i(m),autoRenewAccountId:null!=r.autoRenewAccountId?o._fromProtobuf(r.autoRenewAccountId):null,storage:null!=r.storage?r.storage instanceof s?r.storage:s.fromValue(r.storage):s.ZERO,contractMemo:null!=r.memo?r.memo:"",balance:a.fromTinybars(null!=r.balance?r.balance:0),isDeleted:r.deleted,tokenRelationships:c._fromProtobuf(null!=r.tokenRelationships?r.tokenRelationships:[]),ledgerId:null!=r.ledgerId?l.fromBytes(r.ledgerId):null,stakingInfo:null!=r.stakingInfo?n._fromProtobuf(r.stakingInfo):null,maxAutomaticTokenAssociations:null!=r.maxAutomaticTokenAssociations?s.isLong(r.maxAutomaticTokenAssociations)?r.maxAutomaticTokenAssociations:s.fromValue(r.maxAutomaticTokenAssociations):s.ZERO})}_toProtobuf(){return{contractID:this.contractId._toProtobuf(),accountID:this.accountId._toProtobuf(),contractAccountID:this.contractAccountId,adminKey:null!=this.adminKey?this.adminKey._toProtobufKey():null,expirationTime:this.expirationTime._toProtobuf(),autoRenewPeriod:null!=this.autoRenewPeriod?this.autoRenewPeriod._toProtobuf():null,autoRenewAccountId:null!=this.autoRenewAccountId?this.autoRenewAccountId._toProtobuf():null,storage:this.storage,memo:this.contractMemo,balance:this.balance.toTinybars(),deleted:this.isDeleted,tokenRelationships:null!=this.tokenRelationships?this.tokenRelationships._toProtobuf():null,ledgerId:null!=this.ledgerId?this.ledgerId.toBytes():null,stakingInfo:null!=this.stakingInfo?this.stakingInfo._toProtobuf():null,maxAutomaticTokenAssociations:this.maxAutomaticTokenAssociations.toNumber()}}static fromBytes(t){return d._fromProtobuf(m.ContractGetInfoResponse.ContractInfo.decode(t))}toBytes(){return m.ContractGetInfoResponse.ContractInfo.encode(this._toProtobuf()).finish()}}export{d as default};
|
|
2
2
|
//# sourceMappingURL=ContractInfo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContractInfo.js","sources":["../../src/contract/ContractInfo.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport ContractId from \"./ContractId.js\";\nimport AccountId from \"../account/AccountId.js\";\nimport StakingInfo from \"../StakingInfo.js\";\nimport Timestamp from \"../Timestamp.js\";\nimport Duration from \"../Duration.js\";\nimport Hbar from \"../Hbar.js\";\nimport Long from \"long\";\nimport * as HieroProto from \"@hashgraph/proto\";\nimport TokenRelationshipMap from \"../account/TokenRelationshipMap.js\";\nimport Key from \"../Key.js\";\nimport LedgerId from \"../LedgerId.js\";\n\nconst { proto } = HieroProto;\n\n/**\n * @typedef {import(\"../StakingInfo.js\").StakingInfoJson} StakingInfoJson\n */\n\n/**\n * Response when the client sends the node CryptoGetInfoQuery.\n */\nexport default class ContractInfo {\n /**\n * @private\n * @param {object} props\n * @param {ContractId} props.contractId\n * @param {AccountId} props.accountId\n * @param {string} props.contractAccountId\n * @param {?Key} props.adminKey\n * @param {Timestamp} props.expirationTime\n * @param {Duration} props.autoRenewPeriod\n * @param {?AccountId} props.autoRenewAccountId\n * @param {Long} props.storage\n * @param {string} props.contractMemo\n * @param {Hbar} props.balance\n * @param {boolean} props.isDeleted\n * @param {TokenRelationshipMap} props.tokenRelationships\n * @param {LedgerId|null} props.ledgerId\n * @param {?StakingInfo} props.stakingInfo\n * @param {Long} props.maxAutomaticTokenAssociations\n */\n constructor(props) {\n /**\n * ID of the contract instance, in the format used in transactions.\n *\n * @readonly\n */\n this.contractId = props.contractId;\n\n /**\n * ID of the cryptocurrency account owned by the contract instance,\n * in the format used in transactions.\n *\n * @readonly\n */\n this.accountId = props.accountId;\n\n /**\n * ID of both the contract instance and the cryptocurrency account owned by the contract\n * instance, in the format used by Solidity.\n *\n * @readonly\n */\n this.contractAccountId = props.contractAccountId;\n\n /**\n * The state of the instance and its fields can be modified arbitrarily if this key signs a\n * transaction to modify it. If this is null, then such modifications are not possible,\n * and there is no administrator that can override the normal operation of this smart\n * contract instance. Note that if it is created with no admin keys, then there is no\n * administrator to authorize changing the admin keys, so there can never be any admin keys\n * for that instance.\n *\n * @readonly\n */\n this.adminKey = props.adminKey != null ? props.adminKey : null;\n\n /**\n * The current time at which this contract instance (and its account) is set to expire.\n *\n * @readonly\n */\n this.expirationTime = props.expirationTime;\n\n /**\n * The expiration time will extend every this many seconds. If there are insufficient funds,\n * then it extends as long as possible. If the account is empty when it expires,\n * then it is deleted.\n *\n * @readonly\n */\n this.autoRenewPeriod = props.autoRenewPeriod;\n\n /**\n * ID of the an account to charge for auto-renewal of this contract. If not set, or set\n * to an account with zero hbar balance, the contract's own hbar balance will be used\n * to cover auto-renewal fees.\n *\n * @readonly\n */\n this.autoRenewAccountId = props.autoRenewAccountId;\n\n /**\n * Number of bytes of storage being used by this instance (which affects the cost to\n * extend the expiration time).\n *\n * @readonly\n */\n this.storage = props.storage;\n\n /**\n * The memo associated with the contract (max 100 bytes).\n *\n * @readonly\n */\n this.contractMemo = props.contractMemo;\n\n /**\n * The current balance of the contract.\n *\n * @readonly\n */\n this.balance = props.balance;\n\n /**\n * Whether the contract has been deleted\n *\n * @readonly\n */\n this.isDeleted = props.isDeleted;\n\n /**\n * The tokens associated to the contract\n *\n * @readonly\n */\n this.tokenRelationships = props.tokenRelationships;\n\n /**\n * The maximum number of automatic token associations allowed for this contract.\n * @readonly\n */\n this.maxAutomaticTokenAssociations =\n props.maxAutomaticTokenAssociations;\n\n /**\n * The ledger ID the response was returned from; please see <a href=\"https://github.com/hashgraph/hedera-improvement-proposal/blob/master/HIP/hip-198.md\">HIP-198</a> for the network-specific IDs.\n */\n this.ledgerId = props.ledgerId;\n\n /**\n * Staking metadata for this account.\n */\n this.stakingInfo = props.stakingInfo;\n\n Object.freeze(this);\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.ContractGetInfoResponse.IContractInfo} info\n * @returns {ContractInfo}\n */\n static _fromProtobuf(info) {\n const autoRenewPeriod = /** @type {Long | number} */ (\n /** @type {HieroProto.proto.IDuration} */ (info.autoRenewPeriod)\n .seconds\n );\n\n return new ContractInfo({\n contractId: ContractId._fromProtobuf(\n /** @type {HieroProto.proto.IContractID} */ (info.contractID),\n ),\n accountId: AccountId._fromProtobuf(\n /** @type {HieroProto.proto.IAccountID} */ (info.accountID),\n ),\n contractAccountId:\n info.contractAccountID != null ? info.contractAccountID : \"\",\n adminKey:\n info.adminKey != null\n ? Key._fromProtobufKey(info.adminKey)\n : null,\n expirationTime: Timestamp._fromProtobuf(\n /** @type {HieroProto.proto.ITimestamp} */ (\n info.expirationTime\n ),\n ),\n autoRenewPeriod: new Duration(autoRenewPeriod),\n autoRenewAccountId:\n info.autoRenewAccountId != null\n ? AccountId._fromProtobuf(info.autoRenewAccountId)\n : null,\n storage:\n info.storage != null\n ? info.storage instanceof Long\n ? info.storage\n : Long.fromValue(info.storage)\n : Long.ZERO,\n contractMemo: info.memo != null ? info.memo : \"\",\n balance: Hbar.fromTinybars(info.balance != null ? info.balance : 0),\n isDeleted: /** @type {boolean} */ (info.deleted),\n tokenRelationships: TokenRelationshipMap._fromProtobuf(\n info.tokenRelationships != null ? info.tokenRelationships : [],\n ),\n ledgerId:\n info.ledgerId != null\n ? LedgerId.fromBytes(info.ledgerId)\n : null,\n stakingInfo:\n info.stakingInfo != null\n ? StakingInfo._fromProtobuf(info.stakingInfo)\n : null,\n maxAutomaticTokenAssociations:\n info.maxAutomaticTokenAssociations != null\n ? Long.isLong(info.maxAutomaticTokenAssociations)\n ? info.maxAutomaticTokenAssociations\n : Long.fromValue(info.maxAutomaticTokenAssociations)\n : Long.ZERO,\n });\n }\n\n /**\n * @internal\n * @returns {HieroProto.proto.ContractGetInfoResponse.IContractInfo}\n */\n _toProtobuf() {\n return {\n contractID: this.contractId._toProtobuf(),\n accountID: this.accountId._toProtobuf(),\n contractAccountID: this.contractAccountId,\n adminKey:\n this.adminKey != null ? this.adminKey._toProtobufKey() : null,\n expirationTime: this.expirationTime._toProtobuf(),\n autoRenewPeriod:\n this.autoRenewPeriod != null\n ? this.autoRenewPeriod._toProtobuf()\n : null,\n autoRenewAccountId:\n this.autoRenewAccountId != null\n ? this.autoRenewAccountId._toProtobuf()\n : null,\n storage: this.storage,\n memo: this.contractMemo,\n balance: this.balance.toTinybars(),\n deleted: this.isDeleted,\n tokenRelationships:\n this.tokenRelationships != null\n ? this.tokenRelationships._toProtobuf()\n : null,\n ledgerId: this.ledgerId != null ? this.ledgerId.toBytes() : null,\n stakingInfo:\n this.stakingInfo != null\n ? this.stakingInfo._toProtobuf()\n : null,\n maxAutomaticTokenAssociations:\n this.maxAutomaticTokenAssociations.toNumber(),\n };\n }\n\n /**\n * @param {Uint8Array} bytes\n * @returns {ContractInfo}\n */\n static fromBytes(bytes) {\n return ContractInfo._fromProtobuf(\n proto.ContractGetInfoResponse.ContractInfo.decode(bytes),\n );\n }\n\n /**\n * @returns {Uint8Array}\n */\n toBytes() {\n return proto.ContractGetInfoResponse.ContractInfo.encode(\n this._toProtobuf(),\n ).finish();\n }\n}\n"],"names":["proto","HieroProto","ContractInfo","constructor","props","this","contractId","accountId","contractAccountId","adminKey","expirationTime","autoRenewPeriod","autoRenewAccountId","storage","contractMemo","balance","isDeleted","tokenRelationships","maxAutomaticTokenAssociations","ledgerId","stakingInfo","Object","freeze","_fromProtobuf","info","ContractId","AccountId","contractAccountID","Key","_fromProtobufKey","Timestamp","Duration","Long","fromValue","ZERO","memo","Hbar","fromTinybars","TokenRelationshipMap","LedgerId","fromBytes","StakingInfo","isLong","_toProtobuf","contractID","accountID","_toProtobufKey","toTinybars","deleted","toBytes","toNumber","bytes","ContractGetInfoResponse","decode","encode","finish"],"mappings":"8VAcA,MAAMA,MAAEA,GAAUC,EASH,MAAMC,EAoBjB,WAAAC,CAAYC,GAMRC,KAAKC,WAAaF,EAAME,WAQxBD,KAAKE,UAAYH,EAAMG,UAQvBF,KAAKG,kBAAoBJ,EAAMI,kBAY/BH,KAAKI,SAA6B,MAAlBL,EAAMK,SAAmBL,EAAMK,SAAW,KAO1DJ,KAAKK,eAAiBN,EAAMM,eAS5BL,KAAKM,gBAAkBP,EAAMO,gBAS7BN,KAAKO,mBAAqBR,EAAMQ,mBAQhCP,KAAKQ,QAAUT,EAAMS,QAOrBR,KAAKS,aAAeV,EAAMU,aAO1BT,KAAKU,QAAUX,EAAMW,QAOrBV,KAAKW,UAAYZ,EAAMY,UAOvBX,KAAKY,mBAAqBb,EAA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hB,kBAAmBtB,KAAKG,kBACxBC,SACqB,MAAjBJ,KAAKI,SAAmBJ,KAAKI,SAASqC,iBAAmB,KAC7DpC,eAAgBL,KAAKK,eAAeiC,cACpChC,gBAC4B,MAAxBN,KAAKM,gBACCN,KAAKM,gBAAgBgC,cACrB,KACV/B,mBAC+B,MAA3BP,KAAKO,mBACCP,KAAKO,mBAAmB+B,cACxB,KACV9B,QAASR,KAAKQ,QACdsB,KAAM9B,KAAKS,aACXC,QAASV,KAAKU,QAAQgC,aACtBC,QAAS3C,KAAKW,UACdC,mBAC+B,MAA3BZ,KAAKY,mBACCZ,KAAKY,mBAAmB0B,cACxB,KACVxB,SAA2B,MAAjBd,KAAKc,SAAmBd,KAAKc,SAAS8B,UAAY,KAC5D7B,YACwB,MAApBf,KAAKe,YACCf,KAAKe,YAAYuB,cACjB,KACVzB,8BACIb,KAAKa,8BAA8BgC,WAEnD,CAMI,gBAAOV,CAAUW,GACb,OAAOjD,EAAaqB,cAChBvB,EAAMoD,wBAAwBlD,aAAamD,OAAOF,GAE9D,CAKI,OAAAF,GACI,OAAOjD,EAAMoD,wBAAwBlD,aAAaoD,OAC9CjD,KAAKsC,eACPY,QACV"}
|
|
1
|
+
{"version":3,"file":"ContractInfo.js","sources":["../../src/contract/ContractInfo.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport ContractId from \"./ContractId.js\";\nimport AccountId from \"../account/AccountId.js\";\nimport StakingInfo from \"../StakingInfo.js\";\nimport Timestamp from \"../Timestamp.js\";\nimport Duration from \"../Duration.js\";\nimport Hbar from \"../Hbar.js\";\nimport Long from \"long\";\nimport * as HieroProto from \"@hiero-ledger/proto\";\nimport TokenRelationshipMap from \"../account/TokenRelationshipMap.js\";\nimport Key from \"../Key.js\";\nimport LedgerId from \"../LedgerId.js\";\n\nconst { proto } = HieroProto;\n\n/**\n * @typedef {import(\"../StakingInfo.js\").StakingInfoJson} StakingInfoJson\n */\n\n/**\n * Response when the client sends the node CryptoGetInfoQuery.\n */\nexport default class ContractInfo {\n /**\n * @private\n * @param {object} props\n * @param {ContractId} props.contractId\n * @param {AccountId} props.accountId\n * @param {string} props.contractAccountId\n * @param {?Key} props.adminKey\n * @param {Timestamp} props.expirationTime\n * @param {Duration} props.autoRenewPeriod\n * @param {?AccountId} props.autoRenewAccountId\n * @param {Long} props.storage\n * @param {string} props.contractMemo\n * @param {Hbar} props.balance\n * @param {boolean} props.isDeleted\n * @param {TokenRelationshipMap} props.tokenRelationships\n * @param {LedgerId|null} props.ledgerId\n * @param {?StakingInfo} props.stakingInfo\n * @param {Long} props.maxAutomaticTokenAssociations\n */\n constructor(props) {\n /**\n * ID of the contract instance, in the format used in transactions.\n *\n * @readonly\n */\n this.contractId = props.contractId;\n\n /**\n * ID of the cryptocurrency account owned by the contract instance,\n * in the format used in transactions.\n *\n * @readonly\n */\n this.accountId = props.accountId;\n\n /**\n * ID of both the contract instance and the cryptocurrency account owned by the contract\n * instance, in the format used by Solidity.\n *\n * @readonly\n */\n this.contractAccountId = props.contractAccountId;\n\n /**\n * The state of the instance and its fields can be modified arbitrarily if this key signs a\n * transaction to modify it. If this is null, then such modifications are not possible,\n * and there is no administrator that can override the normal operation of this smart\n * contract instance. Note that if it is created with no admin keys, then there is no\n * administrator to authorize changing the admin keys, so there can never be any admin keys\n * for that instance.\n *\n * @readonly\n */\n this.adminKey = props.adminKey != null ? props.adminKey : null;\n\n /**\n * The current time at which this contract instance (and its account) is set to expire.\n *\n * @readonly\n */\n this.expirationTime = props.expirationTime;\n\n /**\n * The expiration time will extend every this many seconds. If there are insufficient funds,\n * then it extends as long as possible. If the account is empty when it expires,\n * then it is deleted.\n *\n * @readonly\n */\n this.autoRenewPeriod = props.autoRenewPeriod;\n\n /**\n * ID of the an account to charge for auto-renewal of this contract. If not set, or set\n * to an account with zero hbar balance, the contract's own hbar balance will be used\n * to cover auto-renewal fees.\n *\n * @readonly\n */\n this.autoRenewAccountId = props.autoRenewAccountId;\n\n /**\n * Number of bytes of storage being used by this instance (which affects the cost to\n * extend the expiration time).\n *\n * @readonly\n */\n this.storage = props.storage;\n\n /**\n * The memo associated with the contract (max 100 bytes).\n *\n * @readonly\n */\n this.contractMemo = props.contractMemo;\n\n /**\n * The current balance of the contract.\n *\n * @readonly\n */\n this.balance = props.balance;\n\n /**\n * Whether the contract has been deleted\n *\n * @readonly\n */\n this.isDeleted = props.isDeleted;\n\n /**\n * The tokens associated to the contract\n *\n * @readonly\n */\n this.tokenRelationships = props.tokenRelationships;\n\n /**\n * The maximum number of automatic token associations allowed for this contract.\n * @readonly\n */\n this.maxAutomaticTokenAssociations =\n props.maxAutomaticTokenAssociations;\n\n /**\n * The ledger ID the response was returned from; please see <a href=\"https://github.com/hashgraph/hedera-improvement-proposal/blob/master/HIP/hip-198.md\">HIP-198</a> for the network-specific IDs.\n */\n this.ledgerId = props.ledgerId;\n\n /**\n * Staking metadata for this account.\n */\n this.stakingInfo = props.stakingInfo;\n\n Object.freeze(this);\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.ContractGetInfoResponse.IContractInfo} info\n * @returns {ContractInfo}\n */\n static _fromProtobuf(info) {\n const autoRenewPeriod = /** @type {Long | number} */ (\n /** @type {HieroProto.proto.IDuration} */ (info.autoRenewPeriod)\n .seconds\n );\n\n return new ContractInfo({\n contractId: ContractId._fromProtobuf(\n /** @type {HieroProto.proto.IContractID} */ (info.contractID),\n ),\n accountId: AccountId._fromProtobuf(\n /** @type {HieroProto.proto.IAccountID} */ (info.accountID),\n ),\n contractAccountId:\n info.contractAccountID != null ? info.contractAccountID : \"\",\n adminKey:\n info.adminKey != null\n ? Key._fromProtobufKey(info.adminKey)\n : null,\n expirationTime: Timestamp._fromProtobuf(\n /** @type {HieroProto.proto.ITimestamp} */ (\n info.expirationTime\n ),\n ),\n autoRenewPeriod: new Duration(autoRenewPeriod),\n autoRenewAccountId:\n info.autoRenewAccountId != null\n ? AccountId._fromProtobuf(info.autoRenewAccountId)\n : null,\n storage:\n info.storage != null\n ? info.storage instanceof Long\n ? info.storage\n : Long.fromValue(info.storage)\n : Long.ZERO,\n contractMemo: info.memo != null ? info.memo : \"\",\n balance: Hbar.fromTinybars(info.balance != null ? info.balance : 0),\n isDeleted: /** @type {boolean} */ (info.deleted),\n tokenRelationships: TokenRelationshipMap._fromProtobuf(\n info.tokenRelationships != null ? info.tokenRelationships : [],\n ),\n ledgerId:\n info.ledgerId != null\n ? LedgerId.fromBytes(info.ledgerId)\n : null,\n stakingInfo:\n info.stakingInfo != null\n ? StakingInfo._fromProtobuf(info.stakingInfo)\n : null,\n maxAutomaticTokenAssociations:\n info.maxAutomaticTokenAssociations != null\n ? Long.isLong(info.maxAutomaticTokenAssociations)\n ? info.maxAutomaticTokenAssociations\n : Long.fromValue(info.maxAutomaticTokenAssociations)\n : Long.ZERO,\n });\n }\n\n /**\n * @internal\n * @returns {HieroProto.proto.ContractGetInfoResponse.IContractInfo}\n */\n _toProtobuf() {\n return {\n contractID: this.contractId._toProtobuf(),\n accountID: this.accountId._toProtobuf(),\n contractAccountID: this.contractAccountId,\n adminKey:\n this.adminKey != null ? this.adminKey._toProtobufKey() : null,\n expirationTime: this.expirationTime._toProtobuf(),\n autoRenewPeriod:\n this.autoRenewPeriod != null\n ? this.autoRenewPeriod._toProtobuf()\n : null,\n autoRenewAccountId:\n this.autoRenewAccountId != null\n ? this.autoRenewAccountId._toProtobuf()\n : null,\n storage: this.storage,\n memo: this.contractMemo,\n balance: this.balance.toTinybars(),\n deleted: this.isDeleted,\n tokenRelationships:\n this.tokenRelationships != null\n ? this.tokenRelationships._toProtobuf()\n : null,\n ledgerId: this.ledgerId != null ? this.ledgerId.toBytes() : null,\n stakingInfo:\n this.stakingInfo != null\n ? this.stakingInfo._toProtobuf()\n : null,\n maxAutomaticTokenAssociations:\n this.maxAutomaticTokenAssociations.toNumber(),\n };\n }\n\n /**\n * @param {Uint8Array} bytes\n * @returns {ContractInfo}\n */\n static fromBytes(bytes) {\n return ContractInfo._fromProtobuf(\n proto.ContractGetInfoResponse.ContractInfo.decode(bytes),\n );\n }\n\n /**\n * @returns {Uint8Array}\n */\n toBytes() {\n return proto.ContractGetInfoResponse.ContractInfo.encode(\n this._toProtobuf(),\n ).finish();\n }\n}\n"],"names":["proto","HieroProto","ContractInfo","constructor","props","this","contractId","accountId","contractAccountId","adminKey","expirationTime","autoRenewPeriod","autoRenewAccountId","storage","contractMemo","balance","isDeleted","tokenRelationships","maxAutomaticTokenAssociations","ledgerId","stakingInfo","Object","freeze","_fromProtobuf","info","ContractId","AccountId","contractAccountID","Key","_fromProtobufKey","Timestamp","Duration","Long","fromValue","ZERO","memo","Hbar","fromTinybars","TokenRelationshipMap","LedgerId","fromBytes","StakingInfo","isLong","_toProtobuf","contractID","accountID","_toProtobufKey","toTinybars","deleted","toBytes","toNumber","bytes","ContractGetInfoResponse","decode","encode","finish"],"mappings":"iWAcA,MAAMA,MAAEA,GAAUC,EASH,MAAMC,EAoBjB,WAAAC,CAAYC,GAMRC,KAAKC,WAAaF,EAAME,WAQxBD,KAAKE,UAAYH,EAAMG,UAQvBF,KAAKG,kBAAoBJ,EAAMI,kBAY/BH,KAAKI,SAA6B,MAAlBL,EAAMK,SAAmBL,EAAMK,SAAW,KAO1DJ,KAAKK,eAAiBN,EAAMM,eAS5BL,KAAKM,gBAAkBP,EAAMO,gBAS7BN,KAAKO,mBAAqBR,EAAMQ,mBAQhCP,KAAKQ,QAAUT,EAAMS,QAOrBR,KAAKS,aAAeV,EAAMU,aAO1BT,KAAKU,QAAUX,EAAMW,QAOrBV,KAAKW,UAAYZ,EAAMY,UAOvBX,KAAKY,mBAAqBb,EAAMa,mBAMhCZ,KAAKa,8BACDd,EAAMc,8BAKVb,KAAKc,SAAWf,EAAMe,SAKtBd,KAAKe,YAAchB,EAAMgB,YAEzBC,OAAOC,OAAOjB,KACtB,CAOI,oBAAOkB,CAAcC,GACjB,MAAMb,EACyCa,EAAoB,gBAElE,QAED,OAAO,IAAItB,EAAa,CACpBI,WAAYmB,EAA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BAAmB+B,cACxB,KACV9B,QAASR,KAAKQ,QACdsB,KAAM9B,KAAKS,aACXC,QAASV,KAAKU,QAAQgC,aACtBC,QAAS3C,KAAKW,UACdC,mBAC+B,MAA3BZ,KAAKY,mBACCZ,KAAKY,mBAAmB0B,cACxB,KACVxB,SAA2B,MAAjBd,KAAKc,SAAmBd,KAAKc,SAAS8B,UAAY,KAC5D7B,YACwB,MAApBf,KAAKe,YACCf,KAAKe,YAAYuB,cACjB,KACVzB,8BACIb,KAAKa,8BAA8BgC,WAEnD,CAMI,gBAAOV,CAAUW,GACb,OAAOjD,EAAaqB,cAChBvB,EAAMoD,wBAAwBlD,aAAamD,OAAOF,GAE9D,CAKI,OAAAF,GACI,OAAOjD,EAAMoD,wBAAwBlD,aAAaoD,OAC9CjD,KAAKsC,eACPY,QACV"}
|
|
@@ -16,13 +16,13 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* @namespace proto
|
|
19
|
-
* @typedef {import("@
|
|
20
|
-
* @typedef {import("@
|
|
21
|
-
* @typedef {import("@
|
|
22
|
-
* @typedef {import("@
|
|
23
|
-
* @typedef {import("@
|
|
24
|
-
* @typedef {import("@
|
|
25
|
-
* @typedef {import("@
|
|
19
|
+
* @typedef {import("@hiero-ledger/proto").proto.IQuery} HieroProto.proto.IQuery
|
|
20
|
+
* @typedef {import("@hiero-ledger/proto").proto.IQueryHeader} HieroProto.proto.IQueryHeader
|
|
21
|
+
* @typedef {import("@hiero-ledger/proto").proto.IResponse} HieroProto.proto.IResponse
|
|
22
|
+
* @typedef {import("@hiero-ledger/proto").proto.IResponseHeader} HieroProto.proto.IResponseHeader
|
|
23
|
+
* @typedef {import("@hiero-ledger/proto").proto.IContractGetInfoQuery} HieroProto.proto.IContractGetInfoQuery
|
|
24
|
+
* @typedef {import("@hiero-ledger/proto").proto.IContractGetInfoResponse} HieroProto.proto.IContractGetInfoResponse
|
|
25
|
+
* @typedef {import("@hiero-ledger/proto").proto.ContractGetInfoResponse.IContractInfo} HieroProto.proto.ContractGetInfoResponse.IContractInfo
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
28
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @namespace proto
|
|
3
|
-
* @typedef {import("@
|
|
4
|
-
* @typedef {import("@
|
|
5
|
-
* @typedef {import("@
|
|
6
|
-
* @typedef {import("@
|
|
7
|
-
* @typedef {import("@
|
|
8
|
-
* @typedef {import("@
|
|
9
|
-
* @typedef {import("@
|
|
3
|
+
* @typedef {import("@hiero-ledger/proto").proto.IQuery} HieroProto.proto.IQuery
|
|
4
|
+
* @typedef {import("@hiero-ledger/proto").proto.IQueryHeader} HieroProto.proto.IQueryHeader
|
|
5
|
+
* @typedef {import("@hiero-ledger/proto").proto.IResponse} HieroProto.proto.IResponse
|
|
6
|
+
* @typedef {import("@hiero-ledger/proto").proto.IResponseHeader} HieroProto.proto.IResponseHeader
|
|
7
|
+
* @typedef {import("@hiero-ledger/proto").proto.IContractGetInfoQuery} HieroProto.proto.IContractGetInfoQuery
|
|
8
|
+
* @typedef {import("@hiero-ledger/proto").proto.IContractGetInfoResponse} HieroProto.proto.IContractGetInfoResponse
|
|
9
|
+
* @typedef {import("@hiero-ledger/proto").proto.ContractGetInfoResponse.IContractInfo} HieroProto.proto.ContractGetInfoResponse.IContractInfo
|
|
10
10
|
*/
|
|
11
11
|
/**
|
|
12
12
|
* @typedef {import("../channel/Channel.js").default} Channel
|
|
@@ -51,14 +51,14 @@ export default class ContractInfoQuery extends Query<ContractInfo> {
|
|
|
51
51
|
}
|
|
52
52
|
export namespace HieroProto {
|
|
53
53
|
namespace proto {
|
|
54
|
-
type IQuery = import("@
|
|
55
|
-
type IQueryHeader = import("@
|
|
56
|
-
type IResponse = import("@
|
|
57
|
-
type IResponseHeader = import("@
|
|
58
|
-
type IContractGetInfoQuery = import("@
|
|
59
|
-
type IContractGetInfoResponse = import("@
|
|
54
|
+
type IQuery = import("@hiero-ledger/proto").proto.IQuery;
|
|
55
|
+
type IQueryHeader = import("@hiero-ledger/proto").proto.IQueryHeader;
|
|
56
|
+
type IResponse = import("@hiero-ledger/proto").proto.IResponse;
|
|
57
|
+
type IResponseHeader = import("@hiero-ledger/proto").proto.IResponseHeader;
|
|
58
|
+
type IContractGetInfoQuery = import("@hiero-ledger/proto").proto.IContractGetInfoQuery;
|
|
59
|
+
type IContractGetInfoResponse = import("@hiero-ledger/proto").proto.IContractGetInfoResponse;
|
|
60
60
|
namespace ContractGetInfoResponse {
|
|
61
|
-
type IContractInfo = import("@
|
|
61
|
+
type IContractInfo = import("@hiero-ledger/proto").proto.ContractGetInfoResponse.IContractInfo;
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContractInfoQuery.js","sources":["../../src/contract/ContractInfoQuery.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Query, { QUERY_REGISTRY } from \"../query/Query.js\";\nimport ContractId from \"./ContractId.js\";\nimport ContractInfo from \"./ContractInfo.js\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport Hbar from \"../Hbar.js\";\n\n/**\n * @namespace proto\n * @typedef {import(\"@
|
|
1
|
+
{"version":3,"file":"ContractInfoQuery.js","sources":["../../src/contract/ContractInfoQuery.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Query, { QUERY_REGISTRY } from \"../query/Query.js\";\nimport ContractId from \"./ContractId.js\";\nimport ContractInfo from \"./ContractInfo.js\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport Hbar from \"../Hbar.js\";\n\n/**\n * @namespace proto\n * @typedef {import(\"@hiero-ledger/proto\").proto.IQuery} HieroProto.proto.IQuery\n * @typedef {import(\"@hiero-ledger/proto\").proto.IQueryHeader} HieroProto.proto.IQueryHeader\n * @typedef {import(\"@hiero-ledger/proto\").proto.IResponse} HieroProto.proto.IResponse\n * @typedef {import(\"@hiero-ledger/proto\").proto.IResponseHeader} HieroProto.proto.IResponseHeader\n * @typedef {import(\"@hiero-ledger/proto\").proto.IContractGetInfoQuery} HieroProto.proto.IContractGetInfoQuery\n * @typedef {import(\"@hiero-ledger/proto\").proto.IContractGetInfoResponse} HieroProto.proto.IContractGetInfoResponse\n * @typedef {import(\"@hiero-ledger/proto\").proto.ContractGetInfoResponse.IContractInfo} HieroProto.proto.ContractGetInfoResponse.IContractInfo\n */\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 * A query that returns information about a smart contract instance.\n * This includes the account that it owns, the contract's bytecode, and the timestamp when it will expire.\n * @augments {Query<ContractInfo>}\n */\nexport default class ContractInfoQuery extends Query {\n /**\n * @param {object} [props]\n * @param {ContractId | string} [props.contractId]\n */\n constructor(props = {}) {\n super();\n\n /**\n * @type {?ContractId}\n * @private\n */\n this._contractId = null;\n if (props.contractId != null) {\n this.setContractId(props.contractId);\n }\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.IQuery} query\n * @returns {ContractInfoQuery}\n */\n static _fromProtobuf(query) {\n const info = /** @type {HieroProto.proto.IContractGetInfoQuery} */ (\n query.contractGetInfo\n );\n\n return new ContractInfoQuery({\n contractId:\n info.contractID != null\n ? ContractId._fromProtobuf(info.contractID)\n : undefined,\n });\n }\n\n /**\n * @returns {?ContractId}\n */\n get contractId() {\n return this._contractId;\n }\n\n /**\n * Set the contract ID for which the info is being requested.\n *\n * @param {ContractId | string} contractId\n * @returns {ContractInfoQuery}\n */\n setContractId(contractId) {\n this._contractId =\n typeof contractId === \"string\"\n ? ContractId.fromString(contractId)\n : contractId.clone();\n\n return this;\n }\n\n /**\n * @param {Client} client\n */\n _validateChecksums(client) {\n if (this._contractId != null) {\n this._contractId.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.smartContract.getContractInfo(request);\n }\n\n /**\n * @override\n * @param {import(\"../client/Client.js\").default<Channel, *>} client\n * @returns {Promise<Hbar>}\n */\n async getCost(client) {\n return super.getCost(client);\n }\n\n /**\n * @override\n * @internal\n * @param {HieroProto.proto.IResponse} response\n * @returns {HieroProto.proto.IResponseHeader}\n */\n _mapResponseHeader(response) {\n const contractGetInfo =\n /** @type {HieroProto.proto.IContractGetInfoResponse} */ (\n response.contractGetInfo\n );\n return /** @type {HieroProto.proto.IResponseHeader} */ (\n contractGetInfo.header\n );\n }\n\n /**\n * @protected\n * @override\n * @param {HieroProto.proto.IResponse} response\n * @param {AccountId} nodeAccountId\n * @param {HieroProto.proto.IQuery} request\n * @returns {Promise<ContractInfo>}\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _mapResponse(response, nodeAccountId, request) {\n const info = /** @type {HieroProto.proto.IContractGetInfoResponse} */ (\n response.contractGetInfo\n );\n\n return Promise.resolve(\n ContractInfo._fromProtobuf(\n /** @type {HieroProto.proto.ContractGetInfoResponse.IContractInfo} */ (\n info.contractInfo\n ),\n ),\n );\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 contractGetInfo: {\n header,\n contractID:\n this._contractId != null\n ? this._contractId._toProtobuf()\n : null,\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 `ContractInfoQuery:${timestamp.toString()}`;\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/unbound-method\nQUERY_REGISTRY.set(\"contractGetInfo\", ContractInfoQuery._fromProtobuf);\n"],"names":["ContractInfoQuery","Query","constructor","props","super","this","_contractId","contractId","setContractId","_fromProtobuf","query","info","contractID","ContractId","undefined","fromString","clone","_validateChecksums","client","validateChecksum","_execute","channel","request","smartContract","getContractInfo","getCost","_mapResponseHeader","response","_mapResponse","nodeAccountId","Promise","resolve","ContractInfo","_onMakeRequest","header","contractGetInfo","_toProtobuf","_getLogId","_paymentTransactionId","validStart","_timestamp","toString","QUERY_REGISTRY","set"],"mappings":"+KA8Be,MAAMA,UAA0BC,EAK3C,WAAAC,CAAYC,EAAQ,IAChBC,QAMAC,KAAKC,YAAc,KACK,MAApBH,EAAMI,YACNF,KAAKG,cAAcL,EAAMI,WAErC,CAOI,oBAAOE,CAAcC,GACjB,MAAMC,EACFD,EACH,gBAED,OAAO,IAAIV,EAAkB,CACzBO,WACuB,MAAnBI,EAAKC,WACCC,EAAWJ,cAAcE,EAAKC,iBAC9BE,GAEtB,CAKI,cAAIP,GACA,OAAOF,KAAKC,WACpB,CAQI,aAAAE,CAAcD,GAMV,OALAF,KAAKC,YACqB,iBAAfC,EACDM,EAAWE,WAAWR,GACtBA,EAAWS,QAEdX,IACf,CAKI,kBAAAY,CAAmBC,GACS,MAApBb,KAAKC,aACLD,KAAKC,YAAYa,iBAAiBD,EAE9C,CASI,QAAAE,CAASC,EAASC,GACd,OAAOD,EAAQE,cAAcC,gBAAgBF,EACrD,CAOI,aAAMG,CAAQP,GACV,OAAOd,MAAMqB,QAAQP,EAC7B,CAQI,kBAAAQ,CAAmBC,GAKf,OAFQA,EACH,gBAGb,MACA,CAWI,YAAAC,CAAaD,EAAUE,EAAeP,GAClC,MAAMX,EACFgB,EACH,gBAED,OAAOG,QAAQC,QACXC,EAAavB,cAELE,EACpB,cAGA,CAQI,cAAAsB,CAAeC,GACX,MAAO,CACHC,gBAAiB,CACbD,SACAtB,WACwB,MAApBP,KAAKC,YACCD,KAAKC,YAAY8B,cACjB,MAG1B,CAKI,SAAAC,GAOI,MAAO,sBAL2B,MAA9BhC,KAAKiC,uBACoC,MAAzCjC,KAAKiC,sBAAsBC,WACrBlC,KAAKiC,sBAAsBC,WAC3BlC,KAAKmC,YAEuBC,YAC9C,EAIAC,EAAeC,IAAI,kBAAmB3C,EAAkBS"}
|
|
@@ -10,8 +10,8 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @namespace proto
|
|
13
|
-
* @typedef {import("@
|
|
14
|
-
* @typedef {import("@
|
|
13
|
+
* @typedef {import("@hiero-ledger/proto").proto.IContractLoginfo} HieroProto.proto.IContractLoginfo
|
|
14
|
+
* @typedef {import("@hiero-ledger/proto").proto.IContractID} HieroProto.proto.IContractID
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @namespace proto
|
|
3
|
-
* @typedef {import("@
|
|
4
|
-
* @typedef {import("@
|
|
3
|
+
* @typedef {import("@hiero-ledger/proto").proto.IContractLoginfo} HieroProto.proto.IContractLoginfo
|
|
4
|
+
* @typedef {import("@hiero-ledger/proto").proto.IContractID} HieroProto.proto.IContractID
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
7
|
* The log information for an event returned by a smart contract function call. One function call
|
|
@@ -59,8 +59,8 @@ export default class ContractLogInfo {
|
|
|
59
59
|
}
|
|
60
60
|
export namespace HieroProto {
|
|
61
61
|
namespace proto {
|
|
62
|
-
type IContractLoginfo = import("@
|
|
63
|
-
type IContractID = import("@
|
|
62
|
+
type IContractLoginfo = import("@hiero-ledger/proto").proto.IContractLoginfo;
|
|
63
|
+
type IContractID = import("@hiero-ledger/proto").proto.IContractID;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
import ContractId from "./ContractId.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContractLogInfo.js","sources":["../../src/contract/ContractLogInfo.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport ContractId from \"./ContractId.js\";\n\n/**\n * @namespace proto\n * @typedef {import(\"@
|
|
1
|
+
{"version":3,"file":"ContractLogInfo.js","sources":["../../src/contract/ContractLogInfo.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport ContractId from \"./ContractId.js\";\n\n/**\n * @namespace proto\n * @typedef {import(\"@hiero-ledger/proto\").proto.IContractLoginfo} HieroProto.proto.IContractLoginfo\n * @typedef {import(\"@hiero-ledger/proto\").proto.IContractID} HieroProto.proto.IContractID\n */\n\n/**\n * The log information for an event returned by a smart contract function call. One function call\n * may return several such events.\n */\nexport default class ContractLogInfo {\n /**\n * @param {object} props\n * @param {ContractId} props.contractId\n * @param {Uint8Array} props.bloom\n * @param {Uint8Array[]} props.topics\n * @param {Uint8Array} props.data\n */\n constructor(props) {\n /**\n * Address of a contract that emitted the event.\n *\n * @readonly\n */\n this.contractId = props.contractId;\n\n /**\n * Bloom filter for a particular log.\n *\n * @readonly\n */\n this.bloom = props.bloom;\n\n /**\n * Topics of a particular event.\n *\n * @readonly\n */\n this.topics = props.topics;\n\n /**\n * Event data.\n *\n * @readonly\n */\n this.data = props.data;\n\n Object.freeze(this);\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.IContractLoginfo} info\n * @returns {ContractLogInfo}\n */\n static _fromProtobuf(info) {\n return new ContractLogInfo({\n contractId: ContractId._fromProtobuf(\n /** @type {HieroProto.proto.IContractID} */ (info.contractID),\n ),\n bloom: info.bloom != null ? info.bloom : new Uint8Array(),\n topics: info.topic != null ? info.topic : [],\n data: info.data != null ? info.data : new Uint8Array(),\n });\n }\n\n /**\n * @internal\n * @returns {HieroProto.proto.IContractLoginfo}\n */\n _toProtobuf() {\n return {\n contractID: this.contractId._toProtobuf(),\n bloom: this.bloom,\n topic: this.topics,\n data: this.data,\n };\n }\n}\n"],"names":["ContractLogInfo","constructor","props","this","contractId","bloom","topics","data","Object","freeze","_fromProtobuf","info","ContractId","Uint8Array","topic","_toProtobuf","contractID"],"mappings":"+BAce,MAAMA,EAQjB,WAAAC,CAAYC,GAMRC,KAAKC,WAAaF,EAAME,WAOxBD,KAAKE,MAAQH,EAAMG,MAOnBF,KAAKG,OAASJ,EAAMI,OAOpBH,KAAKI,KAAOL,EAAMK,KAElBC,OAAOC,OAAON,KACtB,CAOI,oBAAOO,CAAcC,GACjB,OAAO,IAAIX,EAAgB,CACvBI,WAAYQ,EAAWF,cAC0BC,EAAe,YAEhEN,MAAqB,MAAdM,EAAKN,MAAgBM,EAAKN,MAAQ,IAAIQ,WAC7CP,OAAsB,MAAdK,EAAKG,MAAgBH,EAAKG,MAAQ,GAC1CP,KAAmB,MAAbI,EAAKJ,KAAeI,EAAKJ,KAAO,IAAIM,YAEtD,CAMI,WAAAE,GACI,MAAO,CACHC,WAAYb,KAAKC,WAAWW,cAC5BV,MAAOF,KAAKE,MACZS,MAAOX,KAAKG,OACZC,KAAMJ,KAAKI,KAEvB"}
|