@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":"ContractCreateTransaction.js","sources":["../../src/contract/ContractCreateTransaction.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Hbar from \"../Hbar.js\";\nimport AccountId from \"../account/AccountId.js\";\nimport FileId from \"../file/FileId.js\";\nimport ContractFunctionParameters from \"./ContractFunctionParameters.js\";\nimport Transaction, {\n DEFAULT_AUTO_RENEW_PERIOD,\n TRANSACTION_REGISTRY,\n} from \"../transaction/Transaction.js\";\nimport Long from \"long\";\nimport Duration from \"../Duration.js\";\nimport Key from \"../Key.js\";\n\n/**\n * @namespace proto\n * @typedef {import(\"@hashgraph/proto\").proto.ITransaction} HieroProto.proto.ITransaction\n * @typedef {import(\"@hashgraph/proto\").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction\n * @typedef {import(\"@hashgraph/proto\").proto.TransactionBody} HieroProto.proto.TransactionBody\n * @typedef {import(\"@hashgraph/proto\").proto.ITransactionBody} HieroProto.proto.ITransactionBody\n * @typedef {import(\"@hashgraph/proto\").proto.ITransactionResponse} HieroProto.proto.ITransactionResponse\n * @typedef {import(\"@hashgraph/proto\").proto.IContractCreateTransactionBody} HieroProto.proto.IContractCreateTransactionBody\n * @typedef {import(\"@hashgraph/proto\").proto.IAccountID} HieroProto.proto.IAccountID\n * @typedef {import(\"@hashgraph/proto\").proto.IFileID} HieroProto.proto.IFileID\n */\n\n/**\n * @typedef {import(\"bignumber.js\").default} BigNumber\n * @typedef {import(\"../channel/Channel.js\").default} Channel\n * @typedef {import(\"../client/Client.js\").default<*, *>} Client\n * @typedef {import(\"../transaction/TransactionId.js\").default} TransactionId\n */\n\n/**\n * Create a new smart contract.\n *\n * If this transaction succeeds, the `ContractID` for the new smart contract\n * SHALL be set in the transaction receipt.<br/>\n * The contract is defined by the initial bytecode (or `initcode`). The\n * `initcode` SHALL be stored either in a previously created file, or in the\n * transaction body itself for very small contracts.\n *\n * As part of contract creation, the constructor defined for the new smart\n * contract SHALL run with the parameters provided in the\n * `constructorParameters` field.<br/>\n * The gas to \"power\" that constructor MUST be provided via the `gas` field,\n * and SHALL be charged to the payer for this transaction.<br/>\n * If the contract _constructor_ stores information, it is charged gas for that\n * storage. There is a separate fee in HBAR to maintain that storage until the\n * expiration, and that fee SHALL be added to this transaction as part of the\n * _transaction fee_, rather than gas.\n *\n */\n\nexport default class ContractCreateTransaction extends Transaction {\n /**\n * @param {object} [props]\n * @param {FileId | string} [props.bytecodeFileId]\n * @param {Uint8Array} [props.bytecode]\n * @param {Key} [props.adminKey]\n * @param {number | Long} [props.gas]\n * @param {number | string | Long | BigNumber | Hbar} [props.initialBalance]\n * @param {AccountId | string} [props.proxyAccountId]\n * @param {Duration | Long | number} [props.autoRenewPeriod]\n * @param {Uint8Array} [props.constructorParameters]\n * @param {string} [props.contractMemo]\n * @param {number} [props.maxAutomaticTokenAssociations]\n * @param {AccountId | string} [props.stakedAccountId]\n * @param {Long | number} [props.stakedNodeId]\n * @param {boolean} [props.declineStakingReward]\n * @param {AccountId} [props.autoRenewAccountId]\n */\n constructor(props = {}) {\n super();\n\n /**\n * @private\n * @type {?FileId}\n */\n this._bytecodeFileId = null;\n\n /**\n * @private\n * @type {?Uint8Array}\n */\n this._bytecode = null;\n\n /**\n * @private\n * @type {?Key}\n */\n this._adminKey = null;\n\n /**\n * @private\n * @type {?Long}\n */\n this._gas = null;\n\n /**\n * @private\n * @type {?Hbar}\n */\n this._initialBalance = null;\n\n /**\n * @private\n * @type {?AccountId}\n */\n this._proxyAccountId = null;\n\n /**\n * @private\n * @type {Duration}\n */\n this._autoRenewPeriod = new Duration(DEFAULT_AUTO_RENEW_PERIOD);\n\n /**\n * @private\n * @type {?Uint8Array}\n */\n this._constructorParameters = null;\n\n /**\n * @private\n * @type {?string}\n */\n this._contractMemo = null;\n\n /**\n * @private\n * @type {?number}\n */\n this._maxAutomaticTokenAssociations = null;\n\n this._defaultMaxTransactionFee = new Hbar(20);\n\n /**\n * @private\n * @type {?AccountId}\n */\n this._stakedAccountId = null;\n\n /**\n * @private\n * @type {?Long}\n */\n this._stakedNodeId = null;\n\n /**\n * @private\n * @type {boolean}\n */\n this._declineStakingReward = false;\n\n /**\n * @type {?AccountId}\n */\n this._autoRenewAccountId = null;\n\n if (props.bytecodeFileId != null) {\n this.setBytecodeFileId(props.bytecodeFileId);\n }\n\n if (props.bytecode != null) {\n this.setBytecode(props.bytecode);\n }\n\n if (props.adminKey != null) {\n this.setAdminKey(props.adminKey);\n }\n\n if (props.gas != null) {\n this.setGas(props.gas);\n }\n\n if (props.initialBalance != null) {\n this.setInitialBalance(props.initialBalance);\n }\n\n if (props.proxyAccountId != null) {\n // eslint-disable-next-line deprecation/deprecation\n this.setProxyAccountId(props.proxyAccountId);\n }\n\n if (props.autoRenewPeriod != null) {\n this.setAutoRenewPeriod(props.autoRenewPeriod);\n }\n\n if (props.constructorParameters != null) {\n this.setConstructorParameters(props.constructorParameters);\n }\n\n if (props.contractMemo != null) {\n this.setContractMemo(props.contractMemo);\n }\n\n if (props.maxAutomaticTokenAssociations != null) {\n this.setMaxAutomaticTokenAssociations(\n props.maxAutomaticTokenAssociations,\n );\n }\n\n if (props.stakedAccountId != null) {\n this.setStakedAccountId(props.stakedAccountId);\n }\n\n if (props.stakedNodeId != null) {\n this.setStakedNodeId(props.stakedNodeId);\n }\n\n if (props.declineStakingReward != null) {\n this.setDeclineStakingReward(props.declineStakingReward);\n }\n\n if (props.autoRenewAccountId != null) {\n this.setAutoRenewAccountId(props.autoRenewAccountId);\n }\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.ITransaction[]} transactions\n * @param {HieroProto.proto.ISignedTransaction[]} signedTransactions\n * @param {TransactionId[]} transactionIds\n * @param {AccountId[]} nodeIds\n * @param {HieroProto.proto.ITransactionBody[]} bodies\n * @returns {ContractCreateTransaction}\n */\n static _fromProtobuf(\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n ) {\n const body = bodies[0];\n const create =\n /** @type {HieroProto.proto.IContractCreateTransactionBody} */ (\n body.contractCreateInstance\n );\n\n return Transaction._fromProtobufTransactions(\n new ContractCreateTransaction({\n bytecodeFileId:\n create.fileID != null\n ? FileId._fromProtobuf(\n /** @type {HieroProto.proto.IFileID} */ (\n create.fileID\n ),\n )\n : undefined,\n adminKey:\n create.adminKey != null\n ? Key._fromProtobufKey(create.adminKey)\n : undefined,\n gas: create.gas != null ? create.gas : undefined,\n initialBalance:\n create.initialBalance != null\n ? Hbar.fromTinybars(create.initialBalance)\n : undefined,\n proxyAccountId:\n create.proxyAccountID != null\n ? AccountId._fromProtobuf(\n /** @type {HieroProto.proto.IAccountID} */ (\n create.proxyAccountID\n ),\n )\n : undefined,\n autoRenewPeriod:\n create.autoRenewPeriod != null\n ? create.autoRenewPeriod.seconds != null\n ? create.autoRenewPeriod.seconds\n : undefined\n : undefined,\n constructorParameters:\n create.constructorParameters != null\n ? create.constructorParameters\n : undefined,\n contractMemo: create.memo != null ? create.memo : undefined,\n maxAutomaticTokenAssociations:\n create.maxAutomaticTokenAssociations != null\n ? create.maxAutomaticTokenAssociations\n : undefined,\n stakedAccountId:\n create.stakedAccountId != null\n ? AccountId._fromProtobuf(create.stakedAccountId)\n : undefined,\n stakedNodeId:\n create.stakedNodeId != null\n ? create.stakedNodeId\n : undefined,\n declineStakingReward: create.declineReward == true,\n autoRenewAccountId:\n create.autoRenewAccountId != null\n ? AccountId._fromProtobuf(create.autoRenewAccountId)\n : undefined,\n }),\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n );\n }\n\n /**\n * @returns {?FileId}\n */\n get bytecodeFileId() {\n return this._bytecodeFileId;\n }\n\n /**\n * @param {FileId | string} bytecodeFileId\n * @returns {this}\n */\n setBytecodeFileId(bytecodeFileId) {\n this._requireNotFrozen();\n this._bytecodeFileId =\n typeof bytecodeFileId === \"string\"\n ? FileId.fromString(bytecodeFileId)\n : bytecodeFileId.clone();\n this._bytecode = null;\n\n return this;\n }\n\n /**\n * @returns {?Uint8Array}\n */\n get bytecode() {\n return this._bytecode;\n }\n\n /**\n * @param {Uint8Array} bytecode\n * @returns {this}\n */\n setBytecode(bytecode) {\n this._requireNotFrozen();\n this._bytecode = bytecode;\n this._bytecodeFileId = null;\n\n return this;\n }\n\n /**\n * @returns {?Key}\n */\n get adminKey() {\n return this._adminKey;\n }\n\n /**\n * @param {Key} adminKey\n * @returns {this}\n */\n setAdminKey(adminKey) {\n this._requireNotFrozen();\n this._adminKey = adminKey;\n\n return this;\n }\n\n /**\n * @returns {?Long}\n */\n get gas() {\n return this._gas;\n }\n\n /**\n * @param {number | Long} gas\n * @returns {this}\n */\n setGas(gas) {\n this._requireNotFrozen();\n this._gas = gas instanceof Long ? gas : Long.fromValue(gas);\n if (this._gas.lessThan(0)) {\n throw new Error(\"Gas cannot be negative number\");\n }\n return this;\n }\n\n /**\n * @returns {?Hbar}\n */\n get initialBalance() {\n return this._initialBalance;\n }\n\n /**\n * Set the initial amount to transfer into this contract.\n *\n * @param {number | string | Long | BigNumber | Hbar} initialBalance\n * @returns {this}\n */\n setInitialBalance(initialBalance) {\n this._requireNotFrozen();\n this._initialBalance =\n initialBalance instanceof Hbar\n ? initialBalance\n : new Hbar(initialBalance);\n\n return this;\n }\n\n /**\n * @deprecated\n * @returns {?AccountId}\n */\n get proxyAccountId() {\n return this._proxyAccountId;\n }\n\n /**\n * @deprecated\n * @param {AccountId | string} proxyAccountId\n * @returns {this}\n */\n setProxyAccountId(proxyAccountId) {\n this._requireNotFrozen();\n this._proxyAccountId =\n proxyAccountId instanceof AccountId\n ? proxyAccountId\n : AccountId.fromString(proxyAccountId);\n\n return this;\n }\n\n /**\n * @returns {Duration}\n */\n get autoRenewPeriod() {\n return this._autoRenewPeriod;\n }\n\n /**\n * An account to charge for auto-renewal of this contract. If not set, or set to an\n * account with zero hbar balance, the contract's own hbar balance will be used to\n * cover auto-renewal fees.\n *\n * @param {Duration | Long | number} autoRenewPeriod\n * @returns {this}\n */\n setAutoRenewPeriod(autoRenewPeriod) {\n this._requireNotFrozen();\n this._autoRenewPeriod =\n autoRenewPeriod instanceof Duration\n ? autoRenewPeriod\n : new Duration(autoRenewPeriod);\n\n return this;\n }\n\n /**\n * @returns {?Uint8Array}\n */\n get constructorParameters() {\n return this._constructorParameters;\n }\n\n /**\n * @param {Uint8Array | ContractFunctionParameters} constructorParameters\n * @returns {this}\n */\n setConstructorParameters(constructorParameters) {\n this._requireNotFrozen();\n this._constructorParameters =\n constructorParameters instanceof ContractFunctionParameters\n ? constructorParameters._build()\n : constructorParameters;\n\n return this;\n }\n\n /**\n * @returns {?string}\n */\n get contractMemo() {\n return this._contractMemo;\n }\n\n /**\n * @param {string} contractMemo\n * @returns {this}\n */\n setContractMemo(contractMemo) {\n this._requireNotFrozen();\n this._contractMemo = contractMemo;\n\n return this;\n }\n\n /**\n * @returns {?number}\n */\n get maxAutomaticTokenAssociations() {\n return this._maxAutomaticTokenAssociations;\n }\n\n /**\n * @param {number} maxAutomaticTokenAssociations\n * @returns {this}\n */\n setMaxAutomaticTokenAssociations(maxAutomaticTokenAssociations) {\n this._maxAutomaticTokenAssociations = maxAutomaticTokenAssociations;\n\n return this;\n }\n\n /**\n * @returns {?AccountId}\n */\n get stakedAccountId() {\n return this._stakedAccountId;\n }\n\n /**\n * @param {AccountId | string} stakedAccountId\n * @returns {this}\n */\n setStakedAccountId(stakedAccountId) {\n this._requireNotFrozen();\n this._stakedAccountId =\n typeof stakedAccountId === \"string\"\n ? AccountId.fromString(stakedAccountId)\n : stakedAccountId;\n this._stakedNodeId = null;\n return this;\n }\n\n /**\n * @returns {?Long}\n */\n get stakedNodeId() {\n return this._stakedNodeId;\n }\n\n /**\n * @param {Long | number} stakedNodeId\n * @returns {this}\n */\n setStakedNodeId(stakedNodeId) {\n this._requireNotFrozen();\n this._stakedNodeId = Long.fromValue(stakedNodeId);\n this._stakedAccountId = null;\n return this;\n }\n\n /**\n * @returns {boolean}\n */\n get declineStakingRewards() {\n return this._declineStakingReward;\n }\n\n /**\n * @param {boolean} declineStakingReward\n * @returns {this}\n */\n setDeclineStakingReward(declineStakingReward) {\n this._requireNotFrozen();\n this._declineStakingReward = declineStakingReward;\n\n return this;\n }\n\n /**\n * @returns {?AccountId}\n */\n get autoRenewAccountId() {\n return this._autoRenewAccountId;\n }\n\n /**\n * @param {string | AccountId} autoRenewAccountId\n * @returns {this}\n */\n setAutoRenewAccountId(autoRenewAccountId) {\n this._requireNotFrozen();\n this._autoRenewAccountId =\n typeof autoRenewAccountId === \"string\"\n ? AccountId.fromString(autoRenewAccountId)\n : autoRenewAccountId;\n\n return this;\n }\n\n /**\n * @param {Client} client\n */\n _validateChecksums(client) {\n if (this._bytecodeFileId != null) {\n this._bytecodeFileId.validateChecksum(client);\n }\n\n if (this._proxyAccountId != null) {\n this._proxyAccountId.validateChecksum(client);\n }\n }\n\n /**\n * @override\n * @internal\n * @param {Channel} channel\n * @param {HieroProto.proto.ITransaction} request\n * @returns {Promise<HieroProto.proto.ITransactionResponse>}\n */\n _execute(channel, request) {\n return channel.smartContract.createContract(request);\n }\n\n /**\n * @override\n * @protected\n * @returns {NonNullable<HieroProto.proto.TransactionBody[\"data\"]>}\n */\n _getTransactionDataCase() {\n return \"contractCreateInstance\";\n }\n\n /**\n * @override\n * @protected\n * @returns {HieroProto.proto.IContractCreateTransactionBody}\n */\n _makeTransactionData() {\n return {\n fileID:\n this._bytecodeFileId != null\n ? this._bytecodeFileId._toProtobuf()\n : null,\n initcode: this._bytecode,\n adminKey:\n this._adminKey != null ? this._adminKey._toProtobufKey() : null,\n gas: this._gas,\n initialBalance:\n this._initialBalance != null\n ? this._initialBalance.toTinybars()\n : null,\n proxyAccountID:\n this._proxyAccountId != null\n ? this._proxyAccountId._toProtobuf()\n : null,\n autoRenewPeriod: this._autoRenewPeriod._toProtobuf(),\n constructorParameters: this._constructorParameters,\n memo: this._contractMemo,\n maxAutomaticTokenAssociations: this._maxAutomaticTokenAssociations,\n stakedAccountId:\n this.stakedAccountId != null\n ? this.stakedAccountId._toProtobuf()\n : null,\n stakedNodeId: this.stakedNodeId,\n declineReward: this.declineStakingRewards,\n autoRenewAccountId:\n this._autoRenewAccountId != null\n ? this._autoRenewAccountId._toProtobuf()\n : null,\n };\n }\n\n /**\n * @returns {string}\n */\n _getLogId() {\n const timestamp = /** @type {import(\"../Timestamp.js\").default} */ (\n this._transactionIds.current.validStart\n );\n return `ContractCreateTransaction:${timestamp.toString()}`;\n }\n}\n\nTRANSACTION_REGISTRY.set(\n \"contractCreateInstance\",\n // eslint-disable-next-line @typescript-eslint/unbound-method\n ContractCreateTransaction._fromProtobuf,\n);\n"],"names":["ContractCreateTransaction","Transaction","constructor","props","super","this","_bytecodeFileId","_bytecode","_adminKey","_gas","_initialBalance","_proxyAccountId","_autoRenewPeriod","Duration","DEFAULT_AUTO_RENEW_PERIOD","_constructorParameters","_contractMemo","_maxAutomaticTokenAssociations","_defaultMaxTransactionFee","Hbar","_stakedAccountId","_stakedNodeId","_declineStakingReward","_autoRenewAccountId","bytecodeFileId","setBytecodeFileId","bytecode","setBytecode","adminKey","setAdminKey","gas","setGas","initialBalance","setInitialBalance","proxyAccountId","setProxyAccountId","autoRenewPeriod","setAutoRenewPeriod","constructorParameters","setConstructorParameters","contractMemo","setContractMemo","maxAutomaticTokenAssociations","setMaxAutomaticTokenAssociations","stakedAccountId","setStakedAccountId","stakedNodeId","setStakedNodeId","declineStakingReward","setDeclineStakingReward","autoRenewAccountId","setAutoRenewAccountId","_fromProtobuf","transactions","signedTransactions","transactionIds","nodeIds","bodies","create","_fromProtobufTransactions","fileID","FileId","undefined","Key","_fromProtobufKey","fromTinybars","proxyAccountID","AccountId","seconds","memo","declineReward","_requireNotFrozen","fromString","clone","Long","fromValue","lessThan","Error","ContractFunctionParameters","_build","declineStakingRewards","_validateChecksums","client","validateChecksum","_execute","channel","request","smartContract","createContract","_getTransactionDataCase","_makeTransactionData","_toProtobuf","initcode","_toProtobufKey","toTinybars","_getLogId","_transactionIds","current","toString","TRANSACTION_REGISTRY","set"],"mappings":"mUAsDe,MAAMA,UAAkCC,EAkBnD,WAAAC,CAAYC,EAAQ,IAChBC,QAMAC,KAAKC,gBAAkB,KAMvBD,KAAKE,UAAY,KAMjBF,KAAKG,UAAY,KAMjBH,KAAKI,KAAO,KAMZJ,KAAKK,gBAAkB,KAMvBL,KAAKM,gBAAkB,KAMvBN,KAAKO,iBAAmB,IAAIC,EAASC,GAMrCT,KAAKU,uBAAyB,KAM9BV,KAAKW,cAAgB,KAMrBX,KAAKY,+BAAiC,KAEtCZ,KAAKa,0BAA4B,IAAIC,EAAK,IAM1Cd,KAAKe,iBAAmB,KAMxBf,KAAKgB,cAAgB,KAMrBhB,KAAKiB,uBAAwB,EAK7BjB,KAAKkB,oBAAsB,KAEC,MAAxBpB,EAAMqB,gBACNnB,KAAKoB,kBAAkBtB,EAAMqB,gBAGX,MAAlBrB,EAAMuB,UACNrB,KAAKsB,YAAYxB,EAAMuB,UAGL,MAAlBvB,EAAMyB,UACNvB,KAAKwB,YAAY1B,EAAMyB,UAGV,MAAbzB,EAAM2B,KACNzB,KAAK0B,OAAO5B,EAAM2B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ACf,CAKI,sBAAI6C,GACA,OAAO7C,KAAKkB,mBACpB,CAMI,qBAAA4B,CAAsBD,GAOlB,OANA7C,KAAKkE,oBACLlE,KAAKkB,oBAC6B,iBAAvB2B,EACDiB,EAAUK,WAAWtB,GACrBA,EAEH7C,IACf,CAKI,kBAAA4E,CAAmBC,GACa,MAAxB7E,KAAKC,iBACLD,KAAKC,gBAAgB6E,iBAAiBD,GAGd,MAAxB7E,KAAKM,iBACLN,KAAKM,gBAAgBwE,iBAAiBD,EAElD,CASI,QAAAE,CAASC,EAASC,GACd,OAAOD,EAAQE,cAAcC,eAAeF,EACpD,CAOI,uBAAAG,GACI,MAAO,wBACf,CAOI,oBAAAC,GACI,MAAO,CACH9B,OAC4B,MAAxBvD,KAAKC,gBACCD,KAAKC,gBAAgBqF,cACrB,KACVC,SAAUvF,KAAKE,UACfqB,SACsB,MAAlBvB,KAAKG,UAAoBH,KAAKG,UAAUqF,iBAAmB,KAC/D/D,IAAKzB,KAAKI,KACVuB,eAC4B,MAAxB3B,KAAKK,gBACCL,KAAKK,gBAAgBoF,aACrB,KACV5B,eAC4B,MAAxB7D,KAAKM,gBACCN,KAAKM,gBAAgBgF,cACrB,KACVvD,gBAAiB/B,KAAKO,iBAAiB+E,cACvCrD,sBAAuBjC,KAAKU,uBAC5BsD,KAAMhE,KAAKW,cACX0B,8BAA+BrC,KAAKY,+BACpC2B,gBAC4B,MAAxBvC,KAAKuC,gBACCvC,KAAKuC,gBAAgB+C,cACrB,KACV7C,aAAczC,KAAKyC,aACnBwB,cAAejE,KAAK2E,sBACpB9B,mBACgC,MAA5B7C,KAAKkB,oBACClB,KAAKkB,oBAAoBoE,cACzB,KAEtB,CAKI,SAAAI,GAII,MAAO,6BAFH1F,KAAK2F,gBAAgBC,QACxB,WAC6CC,YACtD,EAGAC,EAAqBC,IACjB,yBAEApG,EAA0BoD"}
|
|
1
|
+
{"version":3,"file":"ContractCreateTransaction.js","sources":["../../src/contract/ContractCreateTransaction.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Hbar from \"../Hbar.js\";\nimport AccountId from \"../account/AccountId.js\";\nimport FileId from \"../file/FileId.js\";\nimport ContractFunctionParameters from \"./ContractFunctionParameters.js\";\nimport Transaction, {\n DEFAULT_AUTO_RENEW_PERIOD,\n TRANSACTION_REGISTRY,\n} from \"../transaction/Transaction.js\";\nimport Long from \"long\";\nimport Duration from \"../Duration.js\";\nimport Key from \"../Key.js\";\n\n/**\n * @namespace proto\n * @typedef {import(\"@hiero-ledger/proto\").proto.ITransaction} HieroProto.proto.ITransaction\n * @typedef {import(\"@hiero-ledger/proto\").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction\n * @typedef {import(\"@hiero-ledger/proto\").proto.TransactionBody} HieroProto.proto.TransactionBody\n * @typedef {import(\"@hiero-ledger/proto\").proto.ITransactionBody} HieroProto.proto.ITransactionBody\n * @typedef {import(\"@hiero-ledger/proto\").proto.ITransactionResponse} HieroProto.proto.ITransactionResponse\n * @typedef {import(\"@hiero-ledger/proto\").proto.IContractCreateTransactionBody} HieroProto.proto.IContractCreateTransactionBody\n * @typedef {import(\"@hiero-ledger/proto\").proto.IAccountID} HieroProto.proto.IAccountID\n * @typedef {import(\"@hiero-ledger/proto\").proto.IFileID} HieroProto.proto.IFileID\n */\n\n/**\n * @typedef {import(\"bignumber.js\").default} BigNumber\n * @typedef {import(\"../channel/Channel.js\").default} Channel\n * @typedef {import(\"../client/Client.js\").default<*, *>} Client\n * @typedef {import(\"../transaction/TransactionId.js\").default} TransactionId\n */\n\n/**\n * Create a new smart contract.\n *\n * If this transaction succeeds, the `ContractID` for the new smart contract\n * SHALL be set in the transaction receipt.<br/>\n * The contract is defined by the initial bytecode (or `initcode`). The\n * `initcode` SHALL be stored either in a previously created file, or in the\n * transaction body itself for very small contracts.\n *\n * As part of contract creation, the constructor defined for the new smart\n * contract SHALL run with the parameters provided in the\n * `constructorParameters` field.<br/>\n * The gas to \"power\" that constructor MUST be provided via the `gas` field,\n * and SHALL be charged to the payer for this transaction.<br/>\n * If the contract _constructor_ stores information, it is charged gas for that\n * storage. There is a separate fee in HBAR to maintain that storage until the\n * expiration, and that fee SHALL be added to this transaction as part of the\n * _transaction fee_, rather than gas.\n *\n */\n\nexport default class ContractCreateTransaction extends Transaction {\n /**\n * @param {object} [props]\n * @param {FileId | string} [props.bytecodeFileId]\n * @param {Uint8Array} [props.bytecode]\n * @param {Key} [props.adminKey]\n * @param {number | Long} [props.gas]\n * @param {number | string | Long | BigNumber | Hbar} [props.initialBalance]\n * @param {AccountId | string} [props.proxyAccountId]\n * @param {Duration | Long | number} [props.autoRenewPeriod]\n * @param {Uint8Array} [props.constructorParameters]\n * @param {string} [props.contractMemo]\n * @param {number} [props.maxAutomaticTokenAssociations]\n * @param {AccountId | string} [props.stakedAccountId]\n * @param {Long | number} [props.stakedNodeId]\n * @param {boolean} [props.declineStakingReward]\n * @param {AccountId} [props.autoRenewAccountId]\n */\n constructor(props = {}) {\n super();\n\n /**\n * @private\n * @type {?FileId}\n */\n this._bytecodeFileId = null;\n\n /**\n * @private\n * @type {?Uint8Array}\n */\n this._bytecode = null;\n\n /**\n * @private\n * @type {?Key}\n */\n this._adminKey = null;\n\n /**\n * @private\n * @type {?Long}\n */\n this._gas = null;\n\n /**\n * @private\n * @type {?Hbar}\n */\n this._initialBalance = null;\n\n /**\n * @private\n * @type {?AccountId}\n */\n this._proxyAccountId = null;\n\n /**\n * @private\n * @type {Duration}\n */\n this._autoRenewPeriod = new Duration(DEFAULT_AUTO_RENEW_PERIOD);\n\n /**\n * @private\n * @type {?Uint8Array}\n */\n this._constructorParameters = null;\n\n /**\n * @private\n * @type {?string}\n */\n this._contractMemo = null;\n\n /**\n * @private\n * @type {?number}\n */\n this._maxAutomaticTokenAssociations = null;\n\n this._defaultMaxTransactionFee = new Hbar(20);\n\n /**\n * @private\n * @type {?AccountId}\n */\n this._stakedAccountId = null;\n\n /**\n * @private\n * @type {?Long}\n */\n this._stakedNodeId = null;\n\n /**\n * @private\n * @type {boolean}\n */\n this._declineStakingReward = false;\n\n /**\n * @type {?AccountId}\n */\n this._autoRenewAccountId = null;\n\n if (props.bytecodeFileId != null) {\n this.setBytecodeFileId(props.bytecodeFileId);\n }\n\n if (props.bytecode != null) {\n this.setBytecode(props.bytecode);\n }\n\n if (props.adminKey != null) {\n this.setAdminKey(props.adminKey);\n }\n\n if (props.gas != null) {\n this.setGas(props.gas);\n }\n\n if (props.initialBalance != null) {\n this.setInitialBalance(props.initialBalance);\n }\n\n if (props.proxyAccountId != null) {\n // eslint-disable-next-line deprecation/deprecation\n this.setProxyAccountId(props.proxyAccountId);\n }\n\n if (props.autoRenewPeriod != null) {\n this.setAutoRenewPeriod(props.autoRenewPeriod);\n }\n\n if (props.constructorParameters != null) {\n this.setConstructorParameters(props.constructorParameters);\n }\n\n if (props.contractMemo != null) {\n this.setContractMemo(props.contractMemo);\n }\n\n if (props.maxAutomaticTokenAssociations != null) {\n this.setMaxAutomaticTokenAssociations(\n props.maxAutomaticTokenAssociations,\n );\n }\n\n if (props.stakedAccountId != null) {\n this.setStakedAccountId(props.stakedAccountId);\n }\n\n if (props.stakedNodeId != null) {\n this.setStakedNodeId(props.stakedNodeId);\n }\n\n if (props.declineStakingReward != null) {\n this.setDeclineStakingReward(props.declineStakingReward);\n }\n\n if (props.autoRenewAccountId != null) {\n this.setAutoRenewAccountId(props.autoRenewAccountId);\n }\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.ITransaction[]} transactions\n * @param {HieroProto.proto.ISignedTransaction[]} signedTransactions\n * @param {TransactionId[]} transactionIds\n * @param {AccountId[]} nodeIds\n * @param {HieroProto.proto.ITransactionBody[]} bodies\n * @returns {ContractCreateTransaction}\n */\n static _fromProtobuf(\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n ) {\n const body = bodies[0];\n const create =\n /** @type {HieroProto.proto.IContractCreateTransactionBody} */ (\n body.contractCreateInstance\n );\n\n return Transaction._fromProtobufTransactions(\n new ContractCreateTransaction({\n bytecodeFileId:\n create.fileID != null\n ? FileId._fromProtobuf(\n /** @type {HieroProto.proto.IFileID} */ (\n create.fileID\n ),\n )\n : undefined,\n adminKey:\n create.adminKey != null\n ? Key._fromProtobufKey(create.adminKey)\n : undefined,\n gas: create.gas != null ? create.gas : undefined,\n initialBalance:\n create.initialBalance != null\n ? Hbar.fromTinybars(create.initialBalance)\n : undefined,\n proxyAccountId:\n create.proxyAccountID != null\n ? AccountId._fromProtobuf(\n /** @type {HieroProto.proto.IAccountID} */ (\n create.proxyAccountID\n ),\n )\n : undefined,\n autoRenewPeriod:\n create.autoRenewPeriod != null\n ? create.autoRenewPeriod.seconds != null\n ? create.autoRenewPeriod.seconds\n : undefined\n : undefined,\n constructorParameters:\n create.constructorParameters != null\n ? create.constructorParameters\n : undefined,\n contractMemo: create.memo != null ? create.memo : undefined,\n maxAutomaticTokenAssociations:\n create.maxAutomaticTokenAssociations != null\n ? create.maxAutomaticTokenAssociations\n : undefined,\n stakedAccountId:\n create.stakedAccountId != null\n ? AccountId._fromProtobuf(create.stakedAccountId)\n : undefined,\n stakedNodeId:\n create.stakedNodeId != null\n ? create.stakedNodeId\n : undefined,\n declineStakingReward: create.declineReward == true,\n autoRenewAccountId:\n create.autoRenewAccountId != null\n ? AccountId._fromProtobuf(create.autoRenewAccountId)\n : undefined,\n }),\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n );\n }\n\n /**\n * @returns {?FileId}\n */\n get bytecodeFileId() {\n return this._bytecodeFileId;\n }\n\n /**\n * @param {FileId | string} bytecodeFileId\n * @returns {this}\n */\n setBytecodeFileId(bytecodeFileId) {\n this._requireNotFrozen();\n this._bytecodeFileId =\n typeof bytecodeFileId === \"string\"\n ? FileId.fromString(bytecodeFileId)\n : bytecodeFileId.clone();\n this._bytecode = null;\n\n return this;\n }\n\n /**\n * @returns {?Uint8Array}\n */\n get bytecode() {\n return this._bytecode;\n }\n\n /**\n * @param {Uint8Array} bytecode\n * @returns {this}\n */\n setBytecode(bytecode) {\n this._requireNotFrozen();\n this._bytecode = bytecode;\n this._bytecodeFileId = null;\n\n return this;\n }\n\n /**\n * @returns {?Key}\n */\n get adminKey() {\n return this._adminKey;\n }\n\n /**\n * @param {Key} adminKey\n * @returns {this}\n */\n setAdminKey(adminKey) {\n this._requireNotFrozen();\n this._adminKey = adminKey;\n\n return this;\n }\n\n /**\n * @returns {?Long}\n */\n get gas() {\n return this._gas;\n }\n\n /**\n * @param {number | Long} gas\n * @returns {this}\n */\n setGas(gas) {\n this._requireNotFrozen();\n this._gas = gas instanceof Long ? gas : Long.fromValue(gas);\n if (this._gas.lessThan(0)) {\n throw new Error(\"Gas cannot be negative number\");\n }\n return this;\n }\n\n /**\n * @returns {?Hbar}\n */\n get initialBalance() {\n return this._initialBalance;\n }\n\n /**\n * Set the initial amount to transfer into this contract.\n *\n * @param {number | string | Long | BigNumber | Hbar} initialBalance\n * @returns {this}\n */\n setInitialBalance(initialBalance) {\n this._requireNotFrozen();\n this._initialBalance =\n initialBalance instanceof Hbar\n ? initialBalance\n : new Hbar(initialBalance);\n\n return this;\n }\n\n /**\n * @deprecated\n * @returns {?AccountId}\n */\n get proxyAccountId() {\n return this._proxyAccountId;\n }\n\n /**\n * @deprecated\n * @param {AccountId | string} proxyAccountId\n * @returns {this}\n */\n setProxyAccountId(proxyAccountId) {\n this._requireNotFrozen();\n this._proxyAccountId =\n proxyAccountId instanceof AccountId\n ? proxyAccountId\n : AccountId.fromString(proxyAccountId);\n\n return this;\n }\n\n /**\n * @returns {Duration}\n */\n get autoRenewPeriod() {\n return this._autoRenewPeriod;\n }\n\n /**\n * An account to charge for auto-renewal of this contract. If not set, or set to an\n * account with zero hbar balance, the contract's own hbar balance will be used to\n * cover auto-renewal fees.\n *\n * @param {Duration | Long | number} autoRenewPeriod\n * @returns {this}\n */\n setAutoRenewPeriod(autoRenewPeriod) {\n this._requireNotFrozen();\n this._autoRenewPeriod =\n autoRenewPeriod instanceof Duration\n ? autoRenewPeriod\n : new Duration(autoRenewPeriod);\n\n return this;\n }\n\n /**\n * @returns {?Uint8Array}\n */\n get constructorParameters() {\n return this._constructorParameters;\n }\n\n /**\n * @param {Uint8Array | ContractFunctionParameters} constructorParameters\n * @returns {this}\n */\n setConstructorParameters(constructorParameters) {\n this._requireNotFrozen();\n this._constructorParameters =\n constructorParameters instanceof ContractFunctionParameters\n ? constructorParameters._build()\n : constructorParameters;\n\n return this;\n }\n\n /**\n * @returns {?string}\n */\n get contractMemo() {\n return this._contractMemo;\n }\n\n /**\n * @param {string} contractMemo\n * @returns {this}\n */\n setContractMemo(contractMemo) {\n this._requireNotFrozen();\n this._contractMemo = contractMemo;\n\n return this;\n }\n\n /**\n * @returns {?number}\n */\n get maxAutomaticTokenAssociations() {\n return this._maxAutomaticTokenAssociations;\n }\n\n /**\n * @param {number} maxAutomaticTokenAssociations\n * @returns {this}\n */\n setMaxAutomaticTokenAssociations(maxAutomaticTokenAssociations) {\n this._maxAutomaticTokenAssociations = maxAutomaticTokenAssociations;\n\n return this;\n }\n\n /**\n * @returns {?AccountId}\n */\n get stakedAccountId() {\n return this._stakedAccountId;\n }\n\n /**\n * @param {AccountId | string} stakedAccountId\n * @returns {this}\n */\n setStakedAccountId(stakedAccountId) {\n this._requireNotFrozen();\n this._stakedAccountId =\n typeof stakedAccountId === \"string\"\n ? AccountId.fromString(stakedAccountId)\n : stakedAccountId;\n this._stakedNodeId = null;\n return this;\n }\n\n /**\n * @returns {?Long}\n */\n get stakedNodeId() {\n return this._stakedNodeId;\n }\n\n /**\n * @param {Long | number} stakedNodeId\n * @returns {this}\n */\n setStakedNodeId(stakedNodeId) {\n this._requireNotFrozen();\n this._stakedNodeId = Long.fromValue(stakedNodeId);\n this._stakedAccountId = null;\n return this;\n }\n\n /**\n * @returns {boolean}\n */\n get declineStakingRewards() {\n return this._declineStakingReward;\n }\n\n /**\n * @param {boolean} declineStakingReward\n * @returns {this}\n */\n setDeclineStakingReward(declineStakingReward) {\n this._requireNotFrozen();\n this._declineStakingReward = declineStakingReward;\n\n return this;\n }\n\n /**\n * @returns {?AccountId}\n */\n get autoRenewAccountId() {\n return this._autoRenewAccountId;\n }\n\n /**\n * @param {string | AccountId} autoRenewAccountId\n * @returns {this}\n */\n setAutoRenewAccountId(autoRenewAccountId) {\n this._requireNotFrozen();\n this._autoRenewAccountId =\n typeof autoRenewAccountId === \"string\"\n ? AccountId.fromString(autoRenewAccountId)\n : autoRenewAccountId;\n\n return this;\n }\n\n /**\n * @param {Client} client\n */\n _validateChecksums(client) {\n if (this._bytecodeFileId != null) {\n this._bytecodeFileId.validateChecksum(client);\n }\n\n if (this._proxyAccountId != null) {\n this._proxyAccountId.validateChecksum(client);\n }\n }\n\n /**\n * @override\n * @internal\n * @param {Channel} channel\n * @param {HieroProto.proto.ITransaction} request\n * @returns {Promise<HieroProto.proto.ITransactionResponse>}\n */\n _execute(channel, request) {\n return channel.smartContract.createContract(request);\n }\n\n /**\n * @override\n * @protected\n * @returns {NonNullable<HieroProto.proto.TransactionBody[\"data\"]>}\n */\n _getTransactionDataCase() {\n return \"contractCreateInstance\";\n }\n\n /**\n * @override\n * @protected\n * @returns {HieroProto.proto.IContractCreateTransactionBody}\n */\n _makeTransactionData() {\n return {\n fileID:\n this._bytecodeFileId != null\n ? this._bytecodeFileId._toProtobuf()\n : null,\n initcode: this._bytecode,\n adminKey:\n this._adminKey != null ? this._adminKey._toProtobufKey() : null,\n gas: this._gas,\n initialBalance:\n this._initialBalance != null\n ? this._initialBalance.toTinybars()\n : null,\n proxyAccountID:\n this._proxyAccountId != null\n ? this._proxyAccountId._toProtobuf()\n : null,\n autoRenewPeriod: this._autoRenewPeriod._toProtobuf(),\n constructorParameters: this._constructorParameters,\n memo: this._contractMemo,\n maxAutomaticTokenAssociations: this._maxAutomaticTokenAssociations,\n stakedAccountId:\n this.stakedAccountId != null\n ? this.stakedAccountId._toProtobuf()\n : null,\n stakedNodeId: this.stakedNodeId,\n declineReward: this.declineStakingRewards,\n autoRenewAccountId:\n this._autoRenewAccountId != null\n ? this._autoRenewAccountId._toProtobuf()\n : null,\n };\n }\n\n /**\n * @returns {string}\n */\n _getLogId() {\n const timestamp = /** @type {import(\"../Timestamp.js\").default} */ (\n this._transactionIds.current.validStart\n );\n return `ContractCreateTransaction:${timestamp.toString()}`;\n }\n}\n\nTRANSACTION_REGISTRY.set(\n \"contractCreateInstance\",\n // eslint-disable-next-line @typescript-eslint/unbound-method\n ContractCreateTransaction._fromProtobuf,\n);\n"],"names":["ContractCreateTransaction","Transaction","constructor","props","super","this","_bytecodeFileId","_bytecode","_adminKey","_gas","_initialBalance","_proxyAccountId","_autoRenewPeriod","Duration","DEFAULT_AUTO_RENEW_PERIOD","_constructorParameters","_contractMemo","_maxAutomaticTokenAssociations","_defaultMaxTransactionFee","Hbar","_stakedAccountId","_stakedNodeId","_declineStakingReward","_autoRenewAccountId","bytecodeFileId","setBytecodeFileId","bytecode","setBytecode","adminKey","setAdminKey","gas","setGas","initialBalance","setInitialBalance","proxyAccountId","setProxyAccountId","autoRenewPeriod","setAutoRenewPeriod","constructorParameters","setConstructorParameters","contractMemo","setContractMemo","maxAutomaticTokenAssociations","setMaxAutomaticTokenAssociations","stakedAccountId","setStakedAccountId","stakedNodeId","setStakedNodeId","declineStakingReward","setDeclineStakingReward","autoRenewAccountId","setAutoRenewAccountId","_fromProtobuf","transactions","signedTransactions","transactionIds","nodeIds","bodies","create","_fromProtobufTransactions","fileID","FileId","undefined","Key","_fromProtobufKey","fromTinybars","proxyAccountID","AccountId","seconds","memo","declineReward","_requireNotFrozen","fromString","clone","Long","fromValue","lessThan","Error","ContractFunctionParameters","_build","declineStakingRewards","_validateChecksums","client","validateChecksum","_execute","channel","request","smartContract","createContract","_getTransactionDataCase","_makeTransactionData","_toProtobuf","initcode","_toProtobufKey","toTinybars","_getLogId","_transactionIds","current","toString","TRANSACTION_REGISTRY","set"],"mappings":"mUAsDe,MAAMA,UAAkCC,EAkBnD,WAAAC,CAA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zB,KAAKI,KACVuB,eAC4B,MAAxB3B,KAAKK,gBACCL,KAAKK,gBAAgBoF,aACrB,KACV5B,eAC4B,MAAxB7D,KAAKM,gBACCN,KAAKM,gBAAgBgF,cACrB,KACVvD,gBAAiB/B,KAAKO,iBAAiB+E,cACvCrD,sBAAuBjC,KAAKU,uBAC5BsD,KAAMhE,KAAKW,cACX0B,8BAA+BrC,KAAKY,+BACpC2B,gBAC4B,MAAxBvC,KAAKuC,gBACCvC,KAAKuC,gBAAgB+C,cACrB,KACV7C,aAAczC,KAAKyC,aACnBwB,cAAejE,KAAK2E,sBACpB9B,mBACgC,MAA5B7C,KAAKkB,oBACClB,KAAKkB,oBAAoBoE,cACzB,KAEtB,CAKI,SAAAI,GAII,MAAO,6BAFH1F,KAAK2F,gBAAgBC,QACxB,WAC6CC,YACtD,EAGAC,EAAqBC,IACjB,yBAEApG,EAA0BoD"}
|
|
@@ -13,14 +13,14 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @namespace proto
|
|
16
|
-
* @typedef {import("@
|
|
17
|
-
* @typedef {import("@
|
|
18
|
-
* @typedef {import("@
|
|
19
|
-
* @typedef {import("@
|
|
20
|
-
* @typedef {import("@
|
|
21
|
-
* @typedef {import("@
|
|
22
|
-
* @typedef {import("@
|
|
23
|
-
* @typedef {import("@
|
|
16
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransaction} HieroProto.proto.ITransaction
|
|
17
|
+
* @typedef {import("@hiero-ledger/proto").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction
|
|
18
|
+
* @typedef {import("@hiero-ledger/proto").proto.TransactionBody} HieroProto.proto.TransactionBody
|
|
19
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionBody} HieroProto.proto.ITransactionBody
|
|
20
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionResponse} HieroProto.proto.ITransactionResponse
|
|
21
|
+
* @typedef {import("@hiero-ledger/proto").proto.IContractDeleteTransactionBody} HieroProto.proto.IContractDeleteTransactionBody
|
|
22
|
+
* @typedef {import("@hiero-ledger/proto").proto.IContractID} HieroProto.proto.IContractID
|
|
23
|
+
* @typedef {import("@hiero-ledger/proto").proto.IAccountID} HieroProto.proto.IAccountID
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
26
|
/**
|
|
@@ -1,13 +1,13 @@
|
|
|
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("@
|
|
10
|
-
* @typedef {import("@
|
|
3
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransaction} HieroProto.proto.ITransaction
|
|
4
|
+
* @typedef {import("@hiero-ledger/proto").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction
|
|
5
|
+
* @typedef {import("@hiero-ledger/proto").proto.TransactionBody} HieroProto.proto.TransactionBody
|
|
6
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionBody} HieroProto.proto.ITransactionBody
|
|
7
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionResponse} HieroProto.proto.ITransactionResponse
|
|
8
|
+
* @typedef {import("@hiero-ledger/proto").proto.IContractDeleteTransactionBody} HieroProto.proto.IContractDeleteTransactionBody
|
|
9
|
+
* @typedef {import("@hiero-ledger/proto").proto.IContractID} HieroProto.proto.IContractID
|
|
10
|
+
* @typedef {import("@hiero-ledger/proto").proto.IAccountID} HieroProto.proto.IAccountID
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
13
|
* @typedef {import("../channel/Channel.js").default} Channel
|
|
@@ -135,14 +135,14 @@ export default class ContractDeleteTransaction extends Transaction {
|
|
|
135
135
|
}
|
|
136
136
|
export namespace HieroProto {
|
|
137
137
|
namespace proto {
|
|
138
|
-
type ITransaction = import("@
|
|
139
|
-
type ISignedTransaction = import("@
|
|
140
|
-
type TransactionBody = import("@
|
|
141
|
-
type ITransactionBody = import("@
|
|
142
|
-
type ITransactionResponse = import("@
|
|
143
|
-
type IContractDeleteTransactionBody = import("@
|
|
144
|
-
type IContractID = import("@
|
|
145
|
-
type IAccountID = import("@
|
|
138
|
+
type ITransaction = import("@hiero-ledger/proto").proto.ITransaction;
|
|
139
|
+
type ISignedTransaction = import("@hiero-ledger/proto").proto.ISignedTransaction;
|
|
140
|
+
type TransactionBody = import("@hiero-ledger/proto").proto.TransactionBody;
|
|
141
|
+
type ITransactionBody = import("@hiero-ledger/proto").proto.ITransactionBody;
|
|
142
|
+
type ITransactionResponse = import("@hiero-ledger/proto").proto.ITransactionResponse;
|
|
143
|
+
type IContractDeleteTransactionBody = import("@hiero-ledger/proto").proto.IContractDeleteTransactionBody;
|
|
144
|
+
type IContractID = import("@hiero-ledger/proto").proto.IContractID;
|
|
145
|
+
type IAccountID = import("@hiero-ledger/proto").proto.IAccountID;
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
export type Channel = import("../channel/Channel.js").default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContractDeleteTransaction.js","sources":["../../src/contract/ContractDeleteTransaction.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Transaction, {\n TRANSACTION_REGISTRY,\n} from \"../transaction/Transaction.js\";\nimport ContractId from \"./ContractId.js\";\nimport AccountId from \"../account/AccountId.js\";\n\n/**\n * @namespace proto\n * @typedef {import(\"@hashgraph/proto\").proto.ITransaction} HieroProto.proto.ITransaction\n * @typedef {import(\"@hashgraph/proto\").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction\n * @typedef {import(\"@hashgraph/proto\").proto.TransactionBody} HieroProto.proto.TransactionBody\n * @typedef {import(\"@hashgraph/proto\").proto.ITransactionBody} HieroProto.proto.ITransactionBody\n * @typedef {import(\"@hashgraph/proto\").proto.ITransactionResponse} HieroProto.proto.ITransactionResponse\n * @typedef {import(\"@hashgraph/proto\").proto.IContractDeleteTransactionBody} HieroProto.proto.IContractDeleteTransactionBody\n * @typedef {import(\"@hashgraph/proto\").proto.IContractID} HieroProto.proto.IContractID\n * @typedef {import(\"@hashgraph/proto\").proto.IAccountID} HieroProto.proto.IAccountID\n */\n\n/**\n * @typedef {import(\"../channel/Channel.js\").default} Channel\n * @typedef {import(\"../client/Client.js\").default<*, *>} Client\n * @typedef {import(\"../transaction/TransactionId.js\").default} TransactionId\n */\n\n/**\n * Delete a smart contract, and transfer any remaining HBAR balance to a\n * designated account.\n *\n * If this call succeeds then all subsequent calls to that smart contract\n * SHALL execute the `0x0` opcode, as required for EVM equivalence.\n *\n * ### Requirements\n * - An account or smart contract MUST be designated to receive all remaining\n * account balances.\n * - The smart contract MUST have an admin key set. If the contract does not\n * have `admin_key` set, then this transaction SHALL fail and response code\n * `MODIFYING_IMMUTABLE_CONTRACT` SHALL be set.\n * - If `admin_key` is, or contains, an empty `KeyList` key, it SHALL be\n * treated the same as an admin key that is not set.\n * - The `Key` set for `admin_key` on the smart contract MUST have a valid\n * signature set on this transaction.\n * - The designated receiving account MAY have `receiver_sig_required` set. If\n * that field is set, the receiver account MUST also sign this transaction.\n * - The field `permanent_removal` MUST NOT be set. That field is reserved for\n * internal system use when purging the smart contract from state. Any user\n * transaction with that field set SHALL be rejected and a response code\n * `PERMANENT_REMOVAL_REQUIRES_SYSTEM_INITIATION` SHALL be set.\n */\nexport default class ContractDeleteTransaction extends Transaction {\n /**\n * @param {object} [props]\n * @param {ContractId | string} [props.contractId]\n * @param {ContractId | string} [props.transferContractId]\n * @param {AccountId | string} [props.transferAccountId]\n * @param {boolean} [props.permanentRemoval]\n */\n constructor(props = {}) {\n super();\n\n /**\n * @private\n * @type {?ContractId}\n */\n this._contractId = null;\n\n /**\n * @private\n * @type {?AccountId}\n */\n this._transferAccountId = null;\n\n /**\n * @private\n * @type {?ContractId}\n */\n this._transferContractId = null;\n\n /**\n * @private\n * @type {boolean}\n */\n this._permanentRemoval = false;\n\n if (props.contractId != null) {\n this.setContractId(props.contractId);\n }\n\n if (props.transferAccountId != null) {\n this.setTransferAccountId(props.transferAccountId);\n }\n\n if (props.transferContractId != null) {\n this.setTransferContractId(props.transferContractId);\n }\n\n if (props.permanentRemoval != null) {\n this.setPermanentRemoval(props.permanentRemoval);\n }\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.ITransaction[]} transactions\n * @param {HieroProto.proto.ISignedTransaction[]} signedTransactions\n * @param {TransactionId[]} transactionIds\n * @param {AccountId[]} nodeIds\n * @param {HieroProto.proto.ITransactionBody[]} bodies\n * @returns {ContractDeleteTransaction}\n */\n static _fromProtobuf(\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n ) {\n const body = bodies[0];\n const contractDelete =\n /** @type {HieroProto.proto.IContractDeleteTransactionBody} */ (\n body.contractDeleteInstance\n );\n\n return Transaction._fromProtobufTransactions(\n new ContractDeleteTransaction({\n contractId:\n contractDelete.contractID != null\n ? ContractId._fromProtobuf(\n /** @type {HieroProto.proto.IContractID} */ (\n contractDelete.contractID\n ),\n )\n : undefined,\n transferAccountId:\n contractDelete.transferAccountID != null\n ? AccountId._fromProtobuf(\n /** @type {HieroProto.proto.IAccountID} */ (\n contractDelete.transferAccountID\n ),\n )\n : undefined,\n transferContractId:\n contractDelete.transferContractID != null\n ? ContractId._fromProtobuf(\n /** @type {HieroProto.proto.IContractID} */ (\n contractDelete.transferContractID\n ),\n )\n : undefined,\n permanentRemoval: contractDelete.permanentRemoval ?? false,\n }),\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n );\n }\n\n /**\n * @returns {?ContractId}\n */\n get contractId() {\n return this._contractId;\n }\n\n /**\n * Sets the contract ID which is being deleted in this transaction.\n *\n * @param {ContractId | string} contractId\n * @returns {ContractDeleteTransaction}\n */\n setContractId(contractId) {\n this._requireNotFrozen();\n this._contractId =\n typeof contractId === \"string\"\n ? ContractId.fromString(contractId)\n : contractId.clone();\n\n return this;\n }\n\n /**\n * @returns {?ContractId}\n */\n get transferContractId() {\n return this._transferContractId;\n }\n\n /**\n * Sets the contract ID which will receive all remaining hbars.\n *\n * @param {ContractId | string} transferContractId\n * @returns {ContractDeleteTransaction}\n */\n setTransferContractId(transferContractId) {\n this._requireNotFrozen();\n this._transferContractId =\n transferContractId instanceof ContractId\n ? transferContractId\n : ContractId.fromString(transferContractId);\n this._transferAccountId = null;\n\n return this;\n }\n\n /**\n * @returns {?AccountId}\n */\n get transferAccountId() {\n return this._transferAccountId;\n }\n\n /**\n * Sets the account ID which will receive all remaining hbars.\n *\n * @param {AccountId | string} transferAccountId\n * @returns {ContractDeleteTransaction}\n */\n setTransferAccountId(transferAccountId) {\n this._requireNotFrozen();\n this._transferAccountId =\n transferAccountId instanceof AccountId\n ? transferAccountId\n : AccountId.fromString(transferAccountId);\n this._transferContractId = null;\n\n return this;\n }\n\n /**\n * @returns {boolean}\n */\n get permanentRemoval() {\n return this._permanentRemoval;\n }\n\n /**\n * Sets the permanent removal flag.\n *\n * @param {boolean} permanentRemoval\n * @returns {ContractDeleteTransaction}\n */\n setPermanentRemoval(permanentRemoval) {\n this._requireNotFrozen();\n this._permanentRemoval = permanentRemoval;\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 if (this._transferAccountId != null) {\n this._transferAccountId.validateChecksum(client);\n }\n\n if (this._transferContractId != null) {\n this._transferContractId.validateChecksum(client);\n }\n }\n\n /**\n * @override\n * @internal\n * @param {Channel} channel\n * @param {HieroProto.proto.ITransaction} request\n * @returns {Promise<HieroProto.proto.ITransactionResponse>}\n */\n _execute(channel, request) {\n return channel.smartContract.deleteContract(request);\n }\n\n /**\n * @override\n * @protected\n * @returns {NonNullable<HieroProto.proto.TransactionBody[\"data\"]>}\n */\n _getTransactionDataCase() {\n return \"contractDeleteInstance\";\n }\n\n /**\n * @override\n * @protected\n * @returns {HieroProto.proto.IContractDeleteTransactionBody}\n */\n _makeTransactionData() {\n return {\n contractID:\n this._contractId != null\n ? this._contractId._toProtobuf()\n : null,\n transferAccountID: this._transferAccountId\n ? this._transferAccountId._toProtobuf()\n : null,\n transferContractID:\n this._transferContractId != null\n ? this._transferContractId._toProtobuf()\n : null,\n permanentRemoval: this._permanentRemoval,\n };\n }\n\n /**\n * @returns {string}\n */\n _getLogId() {\n const timestamp = /** @type {import(\"../Timestamp.js\").default} */ (\n this._transactionIds.current.validStart\n );\n return `ContractDeleteTransaction:${timestamp.toString()}`;\n }\n}\n\nTRANSACTION_REGISTRY.set(\n \"contractDeleteInstance\",\n // eslint-disable-next-line @typescript-eslint/unbound-method\n ContractDeleteTransaction._fromProtobuf,\n);\n"],"names":["ContractDeleteTransaction","Transaction","constructor","props","super","this","_contractId","_transferAccountId","_transferContractId","_permanentRemoval","contractId","setContractId","transferAccountId","setTransferAccountId","transferContractId","setTransferContractId","permanentRemoval","setPermanentRemoval","_fromProtobuf","transactions","signedTransactions","transactionIds","nodeIds","bodies","contractDelete","_fromProtobufTransactions","contractID","ContractId","undefined","transferAccountID","AccountId","transferContractID","_requireNotFrozen","fromString","clone","_validateChecksums","client","validateChecksum","_execute","channel","request","smartContract","deleteContract","_getTransactionDataCase","_makeTransactionData","_toProtobuf","_getLogId","_transactionIds","current","toString","TRANSACTION_REGISTRY","set"],"mappings":"8IAkDe,MAAMA,UAAkCC,EAQnD,WAAAC,CAAYC,EAAQ,IAChBC,QAMAC,KAAKC,YAAc,KAMnBD,KAAKE,mBAAqB,KAM1BF,KAAKG,oBAAsB,KAM3BH,KAAKI,mBAAoB,EAED,MAApBN,EAAMO,YACNL,KAAKM,cAAcR,EAAMO,YAGE,MAA3BP,EAAMS,mBACNP,KAAKQ,qBAAqBV,EAAMS,mBAGJ,MAA5BT,EAAMW,oBACNT,KAAKU,sBAAsBZ,EAAMW,oBAGP,MAA1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iBD,GAGb,MAA5B/B,KAAKG,qBACLH,KAAKG,oBAAoB6B,iBAAiBD,EAEtD,CASI,QAAAE,CAASC,EAASC,GACd,OAAOD,EAAQE,cAAcC,eAAeF,EACpD,CAOI,uBAAAG,GACI,MAAO,wBACf,CAOI,oBAAAC,GACI,MAAO,CACHlB,WACwB,MAApBrB,KAAKC,YACCD,KAAKC,YAAYuC,cACjB,KACVhB,kBAAmBxB,KAAKE,mBAClBF,KAAKE,mBAAmBsC,cACxB,KACNd,mBACgC,MAA5B1B,KAAKG,oBACCH,KAAKG,oBAAoBqC,cACzB,KACV7B,iBAAkBX,KAAKI,kBAEnC,CAKI,SAAAqC,GAII,MAAO,6BAFHzC,KAAK0C,gBAAgBC,QACxB,WAC6CC,YACtD,EAGAC,EAAqBC,IACjB,yBAEAnD,EAA0BkB"}
|
|
1
|
+
{"version":3,"file":"ContractDeleteTransaction.js","sources":["../../src/contract/ContractDeleteTransaction.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Transaction, {\n TRANSACTION_REGISTRY,\n} from \"../transaction/Transaction.js\";\nimport ContractId from \"./ContractId.js\";\nimport AccountId from \"../account/AccountId.js\";\n\n/**\n * @namespace proto\n * @typedef {import(\"@hiero-ledger/proto\").proto.ITransaction} HieroProto.proto.ITransaction\n * @typedef {import(\"@hiero-ledger/proto\").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction\n * @typedef {import(\"@hiero-ledger/proto\").proto.TransactionBody} HieroProto.proto.TransactionBody\n * @typedef {import(\"@hiero-ledger/proto\").proto.ITransactionBody} HieroProto.proto.ITransactionBody\n * @typedef {import(\"@hiero-ledger/proto\").proto.ITransactionResponse} HieroProto.proto.ITransactionResponse\n * @typedef {import(\"@hiero-ledger/proto\").proto.IContractDeleteTransactionBody} HieroProto.proto.IContractDeleteTransactionBody\n * @typedef {import(\"@hiero-ledger/proto\").proto.IContractID} HieroProto.proto.IContractID\n * @typedef {import(\"@hiero-ledger/proto\").proto.IAccountID} HieroProto.proto.IAccountID\n */\n\n/**\n * @typedef {import(\"../channel/Channel.js\").default} Channel\n * @typedef {import(\"../client/Client.js\").default<*, *>} Client\n * @typedef {import(\"../transaction/TransactionId.js\").default} TransactionId\n */\n\n/**\n * Delete a smart contract, and transfer any remaining HBAR balance to a\n * designated account.\n *\n * If this call succeeds then all subsequent calls to that smart contract\n * SHALL execute the `0x0` opcode, as required for EVM equivalence.\n *\n * ### Requirements\n * - An account or smart contract MUST be designated to receive all remaining\n * account balances.\n * - The smart contract MUST have an admin key set. If the contract does not\n * have `admin_key` set, then this transaction SHALL fail and response code\n * `MODIFYING_IMMUTABLE_CONTRACT` SHALL be set.\n * - If `admin_key` is, or contains, an empty `KeyList` key, it SHALL be\n * treated the same as an admin key that is not set.\n * - The `Key` set for `admin_key` on the smart contract MUST have a valid\n * signature set on this transaction.\n * - The designated receiving account MAY have `receiver_sig_required` set. If\n * that field is set, the receiver account MUST also sign this transaction.\n * - The field `permanent_removal` MUST NOT be set. That field is reserved for\n * internal system use when purging the smart contract from state. Any user\n * transaction with that field set SHALL be rejected and a response code\n * `PERMANENT_REMOVAL_REQUIRES_SYSTEM_INITIATION` SHALL be set.\n */\nexport default class ContractDeleteTransaction extends Transaction {\n /**\n * @param {object} [props]\n * @param {ContractId | string} [props.contractId]\n * @param {ContractId | string} [props.transferContractId]\n * @param {AccountId | string} [props.transferAccountId]\n * @param {boolean} [props.permanentRemoval]\n */\n constructor(props = {}) {\n super();\n\n /**\n * @private\n * @type {?ContractId}\n */\n this._contractId = null;\n\n /**\n * @private\n * @type {?AccountId}\n */\n this._transferAccountId = null;\n\n /**\n * @private\n * @type {?ContractId}\n */\n this._transferContractId = null;\n\n /**\n * @private\n * @type {boolean}\n */\n this._permanentRemoval = false;\n\n if (props.contractId != null) {\n this.setContractId(props.contractId);\n }\n\n if (props.transferAccountId != null) {\n this.setTransferAccountId(props.transferAccountId);\n }\n\n if (props.transferContractId != null) {\n this.setTransferContractId(props.transferContractId);\n }\n\n if (props.permanentRemoval != null) {\n this.setPermanentRemoval(props.permanentRemoval);\n }\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.ITransaction[]} transactions\n * @param {HieroProto.proto.ISignedTransaction[]} signedTransactions\n * @param {TransactionId[]} transactionIds\n * @param {AccountId[]} nodeIds\n * @param {HieroProto.proto.ITransactionBody[]} bodies\n * @returns {ContractDeleteTransaction}\n */\n static _fromProtobuf(\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n ) {\n const body = bodies[0];\n const contractDelete =\n /** @type {HieroProto.proto.IContractDeleteTransactionBody} */ (\n body.contractDeleteInstance\n );\n\n return Transaction._fromProtobufTransactions(\n new ContractDeleteTransaction({\n contractId:\n contractDelete.contractID != null\n ? ContractId._fromProtobuf(\n /** @type {HieroProto.proto.IContractID} */ (\n contractDelete.contractID\n ),\n )\n : undefined,\n transferAccountId:\n contractDelete.transferAccountID != null\n ? AccountId._fromProtobuf(\n /** @type {HieroProto.proto.IAccountID} */ (\n contractDelete.transferAccountID\n ),\n )\n : undefined,\n transferContractId:\n contractDelete.transferContractID != null\n ? ContractId._fromProtobuf(\n /** @type {HieroProto.proto.IContractID} */ (\n contractDelete.transferContractID\n ),\n )\n : undefined,\n permanentRemoval: contractDelete.permanentRemoval ?? false,\n }),\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n );\n }\n\n /**\n * @returns {?ContractId}\n */\n get contractId() {\n return this._contractId;\n }\n\n /**\n * Sets the contract ID which is being deleted in this transaction.\n *\n * @param {ContractId | string} contractId\n * @returns {ContractDeleteTransaction}\n */\n setContractId(contractId) {\n this._requireNotFrozen();\n this._contractId =\n typeof contractId === \"string\"\n ? ContractId.fromString(contractId)\n : contractId.clone();\n\n return this;\n }\n\n /**\n * @returns {?ContractId}\n */\n get transferContractId() {\n return this._transferContractId;\n }\n\n /**\n * Sets the contract ID which will receive all remaining hbars.\n *\n * @param {ContractId | string} transferContractId\n * @returns {ContractDeleteTransaction}\n */\n setTransferContractId(transferContractId) {\n this._requireNotFrozen();\n this._transferContractId =\n transferContractId instanceof ContractId\n ? transferContractId\n : ContractId.fromString(transferContractId);\n this._transferAccountId = null;\n\n return this;\n }\n\n /**\n * @returns {?AccountId}\n */\n get transferAccountId() {\n return this._transferAccountId;\n }\n\n /**\n * Sets the account ID which will receive all remaining hbars.\n *\n * @param {AccountId | string} transferAccountId\n * @returns {ContractDeleteTransaction}\n */\n setTransferAccountId(transferAccountId) {\n this._requireNotFrozen();\n this._transferAccountId =\n transferAccountId instanceof AccountId\n ? transferAccountId\n : AccountId.fromString(transferAccountId);\n this._transferContractId = null;\n\n return this;\n }\n\n /**\n * @returns {boolean}\n */\n get permanentRemoval() {\n return this._permanentRemoval;\n }\n\n /**\n * Sets the permanent removal flag.\n *\n * @param {boolean} permanentRemoval\n * @returns {ContractDeleteTransaction}\n */\n setPermanentRemoval(permanentRemoval) {\n this._requireNotFrozen();\n this._permanentRemoval = permanentRemoval;\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 if (this._transferAccountId != null) {\n this._transferAccountId.validateChecksum(client);\n }\n\n if (this._transferContractId != null) {\n this._transferContractId.validateChecksum(client);\n }\n }\n\n /**\n * @override\n * @internal\n * @param {Channel} channel\n * @param {HieroProto.proto.ITransaction} request\n * @returns {Promise<HieroProto.proto.ITransactionResponse>}\n */\n _execute(channel, request) {\n return channel.smartContract.deleteContract(request);\n }\n\n /**\n * @override\n * @protected\n * @returns {NonNullable<HieroProto.proto.TransactionBody[\"data\"]>}\n */\n _getTransactionDataCase() {\n return \"contractDeleteInstance\";\n }\n\n /**\n * @override\n * @protected\n * @returns {HieroProto.proto.IContractDeleteTransactionBody}\n */\n _makeTransactionData() {\n return {\n contractID:\n this._contractId != null\n ? this._contractId._toProtobuf()\n : null,\n transferAccountID: this._transferAccountId\n ? this._transferAccountId._toProtobuf()\n : null,\n transferContractID:\n this._transferContractId != null\n ? this._transferContractId._toProtobuf()\n : null,\n permanentRemoval: this._permanentRemoval,\n };\n }\n\n /**\n * @returns {string}\n */\n _getLogId() {\n const timestamp = /** @type {import(\"../Timestamp.js\").default} */ (\n this._transactionIds.current.validStart\n );\n return `ContractDeleteTransaction:${timestamp.toString()}`;\n }\n}\n\nTRANSACTION_REGISTRY.set(\n \"contractDeleteInstance\",\n // eslint-disable-next-line @typescript-eslint/unbound-method\n ContractDeleteTransaction._fromProtobuf,\n);\n"],"names":["ContractDeleteTransaction","Transaction","constructor","props","super","this","_contractId","_transferAccountId","_transferContractId","_permanentRemoval","contractId","setContractId","transferAccountId","setTransferAccountId","transferContractId","setTransferContractId","permanentRemoval","setPermanentRemoval","_fromProtobuf","transactions","signedTransactions","transactionIds","nodeIds","bodies","contractDelete","_fromProtobufTransactions","contractID","ContractId","undefined","transferAccountID","AccountId","transferContractID","_requireNotFrozen","fromString","clone","_validateChecksums","client","validateChecksum","_execute","channel","request","smartContract","deleteContract","_getTransactionDataCase","_makeTransactionData","_toProtobuf","_getLogId","_transactionIds","current","toString","TRANSACTION_REGISTRY","set"],"mappings":"8IAkDe,MAAMA,UAAkCC,EAQnD,WAAAC,CAAYC,EAAQ,IAChBC,QAMAC,KAAKC,YAAc,KAMnBD,KAAKE,mBAAqB,KAM1BF,KAAKG,oBAAsB,KAM3BH,KAAKI,mBAAoB,EAED,MAApBN,EAAMO,YACNL,KAAKM,cAAcR,EAAMO,YAGE,MAA3BP,EAAMS,mBACNP,KAAKQ,qBAAqBV,EAAMS,mBAGJ,MAA5BT,EAAMW,oBACNT,KAAKU,sBAAsBZ,EAAMW,oBAGP,MAA1BX,EAAMa,kBACNX,KAAKY,oBAAoBd,EAAMa,iBAE3C,CAWI,oBAAOE,CACHC,EACAC,EACAC,EACAC,EACAC,GAEA,MACMC,EADOD,EAAO,GAIf,uBAEL,OAAOtB,EAAYwB,0BACf,IAAIzB,EAA0B,CAC1BU,WACiC,MAA7Bc,EAAeE,WACTC,EAA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KAAKC,YACCD,KAAKC,YAAYuC,cACjB,KACVhB,kBAAmBxB,KAAKE,mBAClBF,KAAKE,mBAAmBsC,cACxB,KACNd,mBACgC,MAA5B1B,KAAKG,oBACCH,KAAKG,oBAAoBqC,cACzB,KACV7B,iBAAkBX,KAAKI,kBAEnC,CAKI,SAAAqC,GAII,MAAO,6BAFHzC,KAAK0C,gBAAgBC,QACxB,WAC6CC,YACtD,EAGAC,EAAqBC,IACjB,yBAEAnD,EAA0BkB"}
|
|
@@ -16,15 +16,15 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
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("@
|
|
26
|
-
* @typedef {import("@
|
|
27
|
-
* @typedef {import("@
|
|
19
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransaction} HieroProto.proto.ITransaction
|
|
20
|
+
* @typedef {import("@hiero-ledger/proto").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction
|
|
21
|
+
* @typedef {import("@hiero-ledger/proto").proto.TransactionBody} HieroProto.proto.TransactionBody
|
|
22
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionBody} HieroProto.proto.ITransactionBody
|
|
23
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionResponse} HieroProto.proto.ITransactionResponse
|
|
24
|
+
* @typedef {import("@hiero-ledger/proto").proto.IContractCallTransactionBody} HieroProto.proto.IContractCallTransactionBody
|
|
25
|
+
* @typedef {import("@hiero-ledger/proto").proto.IAccountID} HieroProto.proto.IAccountID
|
|
26
|
+
* @typedef {import("@hiero-ledger/proto").proto.IContractID} HieroProto.proto.IContractID
|
|
27
|
+
* @typedef {import("@hiero-ledger/proto").proto.IFileID} HieroProto.proto.IFileID
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
30
|
/**
|
|
@@ -1,14 +1,14 @@
|
|
|
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("@
|
|
10
|
-
* @typedef {import("@
|
|
11
|
-
* @typedef {import("@
|
|
3
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransaction} HieroProto.proto.ITransaction
|
|
4
|
+
* @typedef {import("@hiero-ledger/proto").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction
|
|
5
|
+
* @typedef {import("@hiero-ledger/proto").proto.TransactionBody} HieroProto.proto.TransactionBody
|
|
6
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionBody} HieroProto.proto.ITransactionBody
|
|
7
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionResponse} HieroProto.proto.ITransactionResponse
|
|
8
|
+
* @typedef {import("@hiero-ledger/proto").proto.IContractCallTransactionBody} HieroProto.proto.IContractCallTransactionBody
|
|
9
|
+
* @typedef {import("@hiero-ledger/proto").proto.IAccountID} HieroProto.proto.IAccountID
|
|
10
|
+
* @typedef {import("@hiero-ledger/proto").proto.IContractID} HieroProto.proto.IContractID
|
|
11
|
+
* @typedef {import("@hiero-ledger/proto").proto.IFileID} HieroProto.proto.IFileID
|
|
12
12
|
*/
|
|
13
13
|
/**
|
|
14
14
|
* @typedef {import("bignumber.js").default} BigNumber
|
|
@@ -136,15 +136,15 @@ export default class ContractExecuteTransaction extends Transaction {
|
|
|
136
136
|
}
|
|
137
137
|
export namespace HieroProto {
|
|
138
138
|
namespace proto {
|
|
139
|
-
type ITransaction = import("@
|
|
140
|
-
type ISignedTransaction = import("@
|
|
141
|
-
type TransactionBody = import("@
|
|
142
|
-
type ITransactionBody = import("@
|
|
143
|
-
type ITransactionResponse = import("@
|
|
144
|
-
type IContractCallTransactionBody = import("@
|
|
145
|
-
type IAccountID = import("@
|
|
146
|
-
type IContractID = import("@
|
|
147
|
-
type IFileID = import("@
|
|
139
|
+
type ITransaction = import("@hiero-ledger/proto").proto.ITransaction;
|
|
140
|
+
type ISignedTransaction = import("@hiero-ledger/proto").proto.ISignedTransaction;
|
|
141
|
+
type TransactionBody = import("@hiero-ledger/proto").proto.TransactionBody;
|
|
142
|
+
type ITransactionBody = import("@hiero-ledger/proto").proto.ITransactionBody;
|
|
143
|
+
type ITransactionResponse = import("@hiero-ledger/proto").proto.ITransactionResponse;
|
|
144
|
+
type IContractCallTransactionBody = import("@hiero-ledger/proto").proto.IContractCallTransactionBody;
|
|
145
|
+
type IAccountID = import("@hiero-ledger/proto").proto.IAccountID;
|
|
146
|
+
type IContractID = import("@hiero-ledger/proto").proto.IContractID;
|
|
147
|
+
type IFileID = import("@hiero-ledger/proto").proto.IFileID;
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
export type BigNumber = import("bignumber.js").default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContractExecuteTransaction.js","sources":["../../src/contract/ContractExecuteTransaction.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Hbar from \"../Hbar.js\";\nimport Transaction, {\n TRANSACTION_REGISTRY,\n} from \"../transaction/Transaction.js\";\nimport ContractId from \"./ContractId.js\";\nimport ContractFunctionParameters from \"./ContractFunctionParameters.js\";\nimport Long from \"long\";\nimport HbarUnit from \"../HbarUnit.js\";\n\n/**\n * @namespace proto\n * @typedef {import(\"@hashgraph/proto\").proto.ITransaction} HieroProto.proto.ITransaction\n * @typedef {import(\"@hashgraph/proto\").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction\n * @typedef {import(\"@hashgraph/proto\").proto.TransactionBody} HieroProto.proto.TransactionBody\n * @typedef {import(\"@hashgraph/proto\").proto.ITransactionBody} HieroProto.proto.ITransactionBody\n * @typedef {import(\"@hashgraph/proto\").proto.ITransactionResponse} HieroProto.proto.ITransactionResponse\n * @typedef {import(\"@hashgraph/proto\").proto.IContractCallTransactionBody} HieroProto.proto.IContractCallTransactionBody\n * @typedef {import(\"@hashgraph/proto\").proto.IAccountID} HieroProto.proto.IAccountID\n * @typedef {import(\"@hashgraph/proto\").proto.IContractID} HieroProto.proto.IContractID\n * @typedef {import(\"@hashgraph/proto\").proto.IFileID} HieroProto.proto.IFileID\n */\n\n/**\n * @typedef {import(\"bignumber.js\").default} BigNumber\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 * @typedef {import(\"../transaction/TransactionId.js\").default} TransactionId\n */\n\n/**\n * @typedef {object} FunctionParameters\n * @property {string} name\n * @property {ContractFunctionParameters} parameters\n */\n\n/**\n * Call a function of a given smart contract, providing function parameter\n * inputs as needed.\n * <p>\n * Resource (\"gas\") charges SHALL include all relevant fees incurred by\n * the contract execution, including any storage required.<br/>\n * The total transaction fee SHALL incorporate all of the \"gas\" actually\n * consumed as well as the standard fees for transaction handling,\n * data transfers, signature verification, etc...\n */\nexport default class ContractExecuteTransaction extends Transaction {\n /**\n * @param {object} [props]\n * @param {ContractId | string} [props.contractId]\n * @param {number | Long} [props.gas]\n * @param {number | string | Long | BigNumber | Hbar} [props.amount]\n * @param {Uint8Array} [props.functionParameters]\n * @param {FunctionParameters} [props.function]\n */\n constructor(props = {}) {\n super();\n\n /**\n * @private\n * @type {?ContractId}\n */\n this._contractId = null;\n\n /**\n * @private\n * @type {?Long}\n */\n this._gas = null;\n\n /**\n * @private\n * @type {?Hbar}\n */\n this._amount = null;\n\n /**\n * @private\n * @type {?Uint8Array}\n */\n this._functionParameters = null;\n\n if (props.contractId != null) {\n this.setContractId(props.contractId);\n }\n\n if (props.gas != null) {\n this.setGas(props.gas);\n }\n\n if (props.amount != null) {\n this.setPayableAmount(props.amount);\n }\n\n if (props.functionParameters != null) {\n this.setFunctionParameters(props.functionParameters);\n } else if (props.function != null) {\n this.setFunction(props.function.name, props.function.parameters);\n }\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.ITransaction[]} transactions\n * @param {HieroProto.proto.ISignedTransaction[]} signedTransactions\n * @param {TransactionId[]} transactionIds\n * @param {AccountId[]} nodeIds\n * @param {HieroProto.proto.ITransactionBody[]} bodies\n * @returns {ContractExecuteTransaction}\n */\n static _fromProtobuf(\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n ) {\n const body = bodies[0];\n const call =\n /** @type {HieroProto.proto.IContractCallTransactionBody} */ (\n body.contractCall\n );\n\n return Transaction._fromProtobufTransactions(\n new ContractExecuteTransaction({\n contractId:\n call.contractID != null\n ? ContractId._fromProtobuf(\n /** @type {HieroProto.proto.IContractID} */ (\n call.contractID\n ),\n )\n : undefined,\n gas: call.gas != null ? call.gas : undefined,\n amount:\n call.amount != null\n ? Hbar.fromTinybars(call.amount)\n : undefined,\n functionParameters:\n call.functionParameters != null\n ? call.functionParameters\n : undefined,\n }),\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n );\n }\n\n /**\n * @returns {?ContractId}\n */\n get contractId() {\n return this._contractId;\n }\n\n /**\n * Sets the contract ID which is being executed in this transaction.\n *\n * @param {ContractId | string} contractId\n * @returns {ContractExecuteTransaction}\n */\n setContractId(contractId) {\n this._requireNotFrozen();\n this._contractId =\n typeof contractId === \"string\"\n ? ContractId.fromString(contractId)\n : contractId.clone();\n\n return this;\n }\n\n /**\n * @returns {?Long}\n */\n get gas() {\n return this._gas;\n }\n\n /**\n * Sets the amount of gas to use for the call.\n *\n * @param {number | Long} gas\n * @returns {ContractExecuteTransaction}\n */\n setGas(gas) {\n this._requireNotFrozen();\n const gasLong = gas instanceof Long ? gas : Long.fromValue(gas);\n if (gasLong.lt(0)) {\n throw new Error(\"Gas must be greater than 0\");\n }\n this._gas = gasLong;\n\n return this;\n }\n\n /**\n * @returns {?Hbar}\n */\n get payableAmount() {\n return this._amount;\n }\n\n /**\n * Sets the number of hbars to be sent with this function call.\n *\n * @param {number | string | Long | BigNumber | Hbar} amount\n * @param {HbarUnit} unit\n * @returns {ContractExecuteTransaction}\n */\n setPayableAmount(amount, unit = HbarUnit.Hbar) {\n this._requireNotFrozen();\n this._amount =\n amount instanceof Hbar ? amount : Hbar.from(amount, unit);\n\n return this;\n }\n\n /**\n * @returns {?Uint8Array}\n */\n get functionParameters() {\n return this._functionParameters;\n }\n\n /**\n * @param {Uint8Array} functionParameters\n * @returns {this}\n */\n setFunctionParameters(functionParameters) {\n this._requireNotFrozen();\n this._functionParameters = functionParameters;\n\n return this;\n }\n\n /**\n * @param {string} name\n * @param {ContractFunctionParameters} [functionParameters]\n * @returns {this}\n */\n setFunction(name, functionParameters) {\n this._requireNotFrozen();\n this._functionParameters =\n functionParameters != null\n ? functionParameters._build(name)\n : new ContractFunctionParameters()._build(name);\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.ITransaction} request\n * @returns {Promise<HieroProto.proto.ITransactionResponse>}\n */\n _execute(channel, request) {\n return channel.smartContract.contractCallMethod(request);\n }\n\n /**\n * @override\n * @protected\n * @returns {NonNullable<HieroProto.proto.TransactionBody[\"data\"]>}\n */\n _getTransactionDataCase() {\n return \"contractCall\";\n }\n\n /**\n * @override\n * @protected\n * @returns {HieroProto.proto.IContractCallTransactionBody}\n */\n _makeTransactionData() {\n return {\n contractID:\n this._contractId != null\n ? this._contractId._toProtobuf()\n : null,\n gas: this._gas,\n amount: this._amount != null ? this._amount.toTinybars() : null,\n functionParameters: this._functionParameters,\n };\n }\n\n /**\n * @returns {string}\n */\n _getLogId() {\n const timestamp = /** @type {import(\"../Timestamp.js\").default} */ (\n this._transactionIds.current.validStart\n );\n return `ContractExecuteTransaction:${timestamp.toString()}`;\n }\n}\n\nTRANSACTION_REGISTRY.set(\n \"contractCall\",\n // eslint-disable-next-line @typescript-eslint/unbound-method\n ContractExecuteTransaction._fromProtobuf,\n);\n"],"names":["ContractExecuteTransaction","Transaction","constructor","props","super","this","_contractId","_gas","_amount","_functionParameters","contractId","setContractId","gas","setGas","amount","setPayableAmount","functionParameters","setFunctionParameters","function","setFunction","name","parameters","_fromProtobuf","transactions","signedTransactions","transactionIds","nodeIds","bodies","call","_fromProtobufTransactions","contractID","ContractId","undefined","Hbar","fromTinybars","_requireNotFrozen","fromString","clone","gasLong","Long","fromValue","lt","Error","payableAmount","unit","HbarUnit","from","_build","ContractFunctionParameters","_validateChecksums","client","validateChecksum","_execute","channel","request","smartContract","contractCallMethod","_getTransactionDataCase","_makeTransactionData","_toProtobuf","toTinybars","_getLogId","_transactionIds","current","toString","TRANSACTION_REGISTRY","set"],"mappings":"kOAgDe,MAAMA,UAAmCC,EASpD,WAAAC,CAAYC,EAAQ,IAChBC,QAMAC,KAAKC,YAAc,KAMnBD,KAAKE,KAAO,KAMZF,KAAKG,QAAU,KAMfH,KAAKI,oBAAsB,KAEH,MAApBN,EAAMO,YACNL,KAAKM,cAAcR,EAAMO,YAGZ,MAAbP,EAAMS,KACNP,KAAKQ,OAAOV,EAAMS,KAGF,MAAhBT,EAAMW,QACNT,KAAKU,iBAAiBZ,EAAMW,QAGA,MAA5BX,EAAMa,mBACNX,KAAKY,sBAAsBd,EAAMa,oBACR,MAAlBb,EAAMe,UACbb,KAAKc,YAAYhB,EAAMe,SAASE,KAAMjB,EAAMe,SAASG,WAEjE,CAWI,oBAAOC,CACHC,EACAC,EACAC,EACAC,EACAC,GAEA,MACMC,EADOD,EAAO,GAIf,aAEL,OAAO1B,EAAY4B,0BACf,IAAI7B,EAA2B,CAC3BU,WACuB,MAAnBkB,EAAKE,WACCC,EAAWT,cAEHM,EAClC,iBAE0BI,EAC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D,CAOI,uBAAAG,GACI,MAAO,cACf,CAOI,oBAAAC,GACI,MAAO,CACH5B,WACwB,MAApBzB,KAAKC,YACCD,KAAKC,YAAYqD,cACjB,KACV/C,IAAKP,KAAKE,KACVO,OAAwB,MAAhBT,KAAKG,QAAkBH,KAAKG,QAAQoD,aAAe,KAC3D5C,mBAAoBX,KAAKI,oBAErC,CAKI,SAAAoD,GAII,MAAO,8BAFHxD,KAAKyD,gBAAgBC,QACxB,WAC8CC,YACvD,EAGAC,EAAqBC,IACjB,eAEAlE,EAA2BsB"}
|
|
1
|
+
{"version":3,"file":"ContractExecuteTransaction.js","sources":["../../src/contract/ContractExecuteTransaction.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Hbar from \"../Hbar.js\";\nimport Transaction, {\n TRANSACTION_REGISTRY,\n} from \"../transaction/Transaction.js\";\nimport ContractId from \"./ContractId.js\";\nimport ContractFunctionParameters from \"./ContractFunctionParameters.js\";\nimport Long from \"long\";\nimport HbarUnit from \"../HbarUnit.js\";\n\n/**\n * @namespace proto\n * @typedef {import(\"@hiero-ledger/proto\").proto.ITransaction} HieroProto.proto.ITransaction\n * @typedef {import(\"@hiero-ledger/proto\").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction\n * @typedef {import(\"@hiero-ledger/proto\").proto.TransactionBody} HieroProto.proto.TransactionBody\n * @typedef {import(\"@hiero-ledger/proto\").proto.ITransactionBody} HieroProto.proto.ITransactionBody\n * @typedef {import(\"@hiero-ledger/proto\").proto.ITransactionResponse} HieroProto.proto.ITransactionResponse\n * @typedef {import(\"@hiero-ledger/proto\").proto.IContractCallTransactionBody} HieroProto.proto.IContractCallTransactionBody\n * @typedef {import(\"@hiero-ledger/proto\").proto.IAccountID} HieroProto.proto.IAccountID\n * @typedef {import(\"@hiero-ledger/proto\").proto.IContractID} HieroProto.proto.IContractID\n * @typedef {import(\"@hiero-ledger/proto\").proto.IFileID} HieroProto.proto.IFileID\n */\n\n/**\n * @typedef {import(\"bignumber.js\").default} BigNumber\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 * @typedef {import(\"../transaction/TransactionId.js\").default} TransactionId\n */\n\n/**\n * @typedef {object} FunctionParameters\n * @property {string} name\n * @property {ContractFunctionParameters} parameters\n */\n\n/**\n * Call a function of a given smart contract, providing function parameter\n * inputs as needed.\n * <p>\n * Resource (\"gas\") charges SHALL include all relevant fees incurred by\n * the contract execution, including any storage required.<br/>\n * The total transaction fee SHALL incorporate all of the \"gas\" actually\n * consumed as well as the standard fees for transaction handling,\n * data transfers, signature verification, etc...\n */\nexport default class ContractExecuteTransaction extends Transaction {\n /**\n * @param {object} [props]\n * @param {ContractId | string} [props.contractId]\n * @param {number | Long} [props.gas]\n * @param {number | string | Long | BigNumber | Hbar} [props.amount]\n * @param {Uint8Array} [props.functionParameters]\n * @param {FunctionParameters} [props.function]\n */\n constructor(props = {}) {\n super();\n\n /**\n * @private\n * @type {?ContractId}\n */\n this._contractId = null;\n\n /**\n * @private\n * @type {?Long}\n */\n this._gas = null;\n\n /**\n * @private\n * @type {?Hbar}\n */\n this._amount = null;\n\n /**\n * @private\n * @type {?Uint8Array}\n */\n this._functionParameters = null;\n\n if (props.contractId != null) {\n this.setContractId(props.contractId);\n }\n\n if (props.gas != null) {\n this.setGas(props.gas);\n }\n\n if (props.amount != null) {\n this.setPayableAmount(props.amount);\n }\n\n if (props.functionParameters != null) {\n this.setFunctionParameters(props.functionParameters);\n } else if (props.function != null) {\n this.setFunction(props.function.name, props.function.parameters);\n }\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.ITransaction[]} transactions\n * @param {HieroProto.proto.ISignedTransaction[]} signedTransactions\n * @param {TransactionId[]} transactionIds\n * @param {AccountId[]} nodeIds\n * @param {HieroProto.proto.ITransactionBody[]} bodies\n * @returns {ContractExecuteTransaction}\n */\n static _fromProtobuf(\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n ) {\n const body = bodies[0];\n const call =\n /** @type {HieroProto.proto.IContractCallTransactionBody} */ (\n body.contractCall\n );\n\n return Transaction._fromProtobufTransactions(\n new ContractExecuteTransaction({\n contractId:\n call.contractID != null\n ? ContractId._fromProtobuf(\n /** @type {HieroProto.proto.IContractID} */ (\n call.contractID\n ),\n )\n : undefined,\n gas: call.gas != null ? call.gas : undefined,\n amount:\n call.amount != null\n ? Hbar.fromTinybars(call.amount)\n : undefined,\n functionParameters:\n call.functionParameters != null\n ? call.functionParameters\n : undefined,\n }),\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n );\n }\n\n /**\n * @returns {?ContractId}\n */\n get contractId() {\n return this._contractId;\n }\n\n /**\n * Sets the contract ID which is being executed in this transaction.\n *\n * @param {ContractId | string} contractId\n * @returns {ContractExecuteTransaction}\n */\n setContractId(contractId) {\n this._requireNotFrozen();\n this._contractId =\n typeof contractId === \"string\"\n ? ContractId.fromString(contractId)\n : contractId.clone();\n\n return this;\n }\n\n /**\n * @returns {?Long}\n */\n get gas() {\n return this._gas;\n }\n\n /**\n * Sets the amount of gas to use for the call.\n *\n * @param {number | Long} gas\n * @returns {ContractExecuteTransaction}\n */\n setGas(gas) {\n this._requireNotFrozen();\n const gasLong = gas instanceof Long ? gas : Long.fromValue(gas);\n if (gasLong.lt(0)) {\n throw new Error(\"Gas must be greater than 0\");\n }\n this._gas = gasLong;\n\n return this;\n }\n\n /**\n * @returns {?Hbar}\n */\n get payableAmount() {\n return this._amount;\n }\n\n /**\n * Sets the number of hbars to be sent with this function call.\n *\n * @param {number | string | Long | BigNumber | Hbar} amount\n * @param {HbarUnit} unit\n * @returns {ContractExecuteTransaction}\n */\n setPayableAmount(amount, unit = HbarUnit.Hbar) {\n this._requireNotFrozen();\n this._amount =\n amount instanceof Hbar ? amount : Hbar.from(amount, unit);\n\n return this;\n }\n\n /**\n * @returns {?Uint8Array}\n */\n get functionParameters() {\n return this._functionParameters;\n }\n\n /**\n * @param {Uint8Array} functionParameters\n * @returns {this}\n */\n setFunctionParameters(functionParameters) {\n this._requireNotFrozen();\n this._functionParameters = functionParameters;\n\n return this;\n }\n\n /**\n * @param {string} name\n * @param {ContractFunctionParameters} [functionParameters]\n * @returns {this}\n */\n setFunction(name, functionParameters) {\n this._requireNotFrozen();\n this._functionParameters =\n functionParameters != null\n ? functionParameters._build(name)\n : new ContractFunctionParameters()._build(name);\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.ITransaction} request\n * @returns {Promise<HieroProto.proto.ITransactionResponse>}\n */\n _execute(channel, request) {\n return channel.smartContract.contractCallMethod(request);\n }\n\n /**\n * @override\n * @protected\n * @returns {NonNullable<HieroProto.proto.TransactionBody[\"data\"]>}\n */\n _getTransactionDataCase() {\n return \"contractCall\";\n }\n\n /**\n * @override\n * @protected\n * @returns {HieroProto.proto.IContractCallTransactionBody}\n */\n _makeTransactionData() {\n return {\n contractID:\n this._contractId != null\n ? this._contractId._toProtobuf()\n : null,\n gas: this._gas,\n amount: this._amount != null ? this._amount.toTinybars() : null,\n functionParameters: this._functionParameters,\n };\n }\n\n /**\n * @returns {string}\n */\n _getLogId() {\n const timestamp = /** @type {import(\"../Timestamp.js\").default} */ (\n this._transactionIds.current.validStart\n );\n return `ContractExecuteTransaction:${timestamp.toString()}`;\n }\n}\n\nTRANSACTION_REGISTRY.set(\n \"contractCall\",\n // eslint-disable-next-line @typescript-eslint/unbound-method\n ContractExecuteTransaction._fromProtobuf,\n);\n"],"names":["ContractExecuteTransaction","Transaction","constructor","props","super","this","_contractId","_gas","_amount","_functionParameters","contractId","setContractId","gas","setGas","amount","setPayableAmount","functionParameters","setFunctionParameters","function","setFunction","name","parameters","_fromProtobuf","transactions","signedTransactions","transactionIds","nodeIds","bodies","call","_fromProtobufTransactions","contractID","ContractId","undefined","Hbar","fromTinybars","_requireNotFrozen","fromString","clone","gasLong","Long","fromValue","lt","Error","payableAmount","unit","HbarUnit","from","_build","ContractFunctionParameters","_validateChecksums","client","validateChecksum","_execute","channel","request","smartContract","contractCallMethod","_getTransactionDataCase","_makeTransactionData","_toProtobuf","toTinybars","_getLogId","_transactionIds","current","toString","TRANSACTION_REGISTRY","set"],"mappings":"kOAgDe,MAAMA,UAAmCC,EASpD,WAAAC,CAAYC,EAAQ,IAChBC,QAMAC,KAAKC,YAAc,KAMnBD,KAAKE,KAAO,KAMZF,KAAKG,QAAU,KAMfH,KAAKI,oBAAsB,KAEH,MAApBN,EAAMO,YACNL,KAAKM,cAAcR,EAAMO,YAGZ,MAAbP,EAAMS,KACNP,KAAKQ,OAAOV,EAAMS,KAGF,MAAhBT,EAAMW,QACNT,KAAKU,iBAAiBZ,EAAMW,QAGA,MAA5BX,EAAMa,mBACNX,KAAKY,sBAAsBd,EAAMa,oBACR,MAAlBb,EAAMe,UACbb,KAAKc,YAAYhB,EAAMe,SAASE,KAAMjB,EAAMe,SAASG,WAEjE,CAWI,oBAAOC,CACHC,EACAC,EACAC,EACAC,EACAC,GAEA,MACMC,EADOD,EAAO,GAIf,aAEL,OAAO1B,EAAY4B,0BACf,IAAI7B,EAA2B,CAC3BU,WACuB,MAAnBkB,EAAKE,WACCC,EAAWT,cAEHM,EAClC,iBAE0BI,EACVpB,IAAiB,MAAZgB,EAAKhB,IAAcgB,EAAKhB,SAAMoB,EACnClB,OACmB,MAAfc,EAAKd,OACCmB,EAAKC,aAAaN,EAAKd,aACvBkB,EACVhB,mBAC+B,MAA3BY,EAAKZ,mBACCY,EAAKZ,wBACLgB,IAEdT,EACAC,EACAC,EACAC,EACAC,EAEZ,CAKI,cAAIjB,GACA,OAAOL,KAAKC,WACpB,CAQI,aAAAK,CAAcD,GAOV,OANAL,KAAK8B,oBACL9B,KAAKC,YACqB,iBAAfI,EACDqB,EAAWK,WAAW1B,G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@@ -26,8 +26,8 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* @namespace proto
|
|
29
|
-
* @typedef {import("@
|
|
30
|
-
* @typedef {import("@
|
|
29
|
+
* @typedef {import("@hiero-ledger/proto").proto.IContractFunctionResult} HieroProto.proto.IContractFunctionResult
|
|
30
|
+
* @typedef {import("@hiero-ledger/proto").proto.IContractID} HieroProto.proto.IContractID
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
33
|
/**
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* @namespace proto
|
|
6
|
-
* @typedef {import("@
|
|
7
|
-
* @typedef {import("@
|
|
6
|
+
* @typedef {import("@hiero-ledger/proto").proto.IContractFunctionResult} HieroProto.proto.IContractFunctionResult
|
|
7
|
+
* @typedef {import("@hiero-ledger/proto").proto.IContractID} HieroProto.proto.IContractID
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
10
|
* The result returned by a call to a smart contract function. This is part of the response to
|
|
@@ -497,8 +497,8 @@ export default class ContractFunctionResult {
|
|
|
497
497
|
export type ContractStateChange = import("./ContractStateChange.js").default;
|
|
498
498
|
export namespace HieroProto {
|
|
499
499
|
namespace proto {
|
|
500
|
-
type IContractFunctionResult = import("@
|
|
501
|
-
type IContractID = import("@
|
|
500
|
+
type IContractFunctionResult = import("@hiero-ledger/proto").proto.IContractFunctionResult;
|
|
501
|
+
type IContractID = import("@hiero-ledger/proto").proto.IContractID;
|
|
502
502
|
}
|
|
503
503
|
}
|
|
504
504
|
import ContractId from "./ContractId.js";
|