@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":"TopicCreateTransaction.js","sources":["../../src/topic/TopicCreateTransaction.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport AccountId from \"../account/AccountId.js\";\nimport CustomFixedFee from \"../token/CustomFixedFee.js\";\nimport Transaction, {\n DEFAULT_AUTO_RENEW_PERIOD,\n TRANSACTION_REGISTRY,\n} from \"../transaction/Transaction.js\";\nimport Duration from \"../Duration.js\";\nimport Key from \"../Key.js\";\nimport Hbar from \"../Hbar.js\";\n\n/**\n * @namespace proto\n * @typedef {import(\"@hashgraph/proto\").proto.IConsensusCreateTopicTransactionBody} HieroProto.proto.IConsensusCreateTopicTransactionBody\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 */\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 * Create a topic to be used for consensus.\n */\nexport default class TopicCreateTransaction extends Transaction {\n /**\n * @param {object} props\n * @param {Key} [props.adminKey]\n * @param {Key} [props.submitKey]\n * @param {Key} [props.feeScheduleKey]\n * @param {Duration | Long | number} [props.autoRenewPeriod]\n * @param {AccountId | string} [props.autoRenewAccountId]\n * @param {CustomFixedFee[]} [props.customFees]\n * @param {Key[]} [props.feeExemptKeys]\n * @param {string} [props.topicMemo]\n */\n constructor(props = {}) {\n super();\n\n this._defaultMaxTransactionFee = new Hbar(25);\n\n /**\n * @private\n * @type {?Key}\n */\n this._adminKey = null;\n\n /**\n * @private\n * @type {?Key}\n */\n this._submitKey = null;\n\n /**\n * @private\n * @type {?Key}\n */\n this._feeScheduleKey = null;\n\n /**\n * @private\n * @type {Key[]}\n */\n this._feeExemptKeys = [];\n\n /**\n * @private\n * @type {?AccountId}\n */\n this._autoRenewAccountId = null;\n\n /**\n * @private\n * @type {Duration}\n */\n this._autoRenewPeriod = new Duration(DEFAULT_AUTO_RENEW_PERIOD);\n\n /**\n * @private\n * @type {CustomFixedFee[]}\n */\n this._customFees = [];\n\n /**\n * @private\n * @type {?string}\n */\n this._topicMemo = null;\n\n if (props.adminKey != null) {\n this.setAdminKey(props.adminKey);\n }\n\n if (props.submitKey != null) {\n this.setSubmitKey(props.submitKey);\n }\n\n if (props.feeScheduleKey != null) {\n this.setFeeScheduleKey(props.feeScheduleKey);\n }\n\n if (props.feeExemptKeys != null) {\n this.setFeeExemptKeys(props.feeExemptKeys);\n }\n\n if (props.autoRenewAccountId != null) {\n this.setAutoRenewAccountId(props.autoRenewAccountId);\n }\n\n if (props.autoRenewPeriod != null) {\n this.setAutoRenewPeriod(props.autoRenewPeriod);\n }\n\n if (props.customFees != null) {\n this.setCustomFees(props.customFees);\n }\n\n if (props.topicMemo != null) {\n this.setTopicMemo(props.topicMemo);\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 {TopicCreateTransaction}\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.IConsensusCreateTopicTransactionBody} */ (\n body.consensusCreateTopic\n );\n\n return Transaction._fromProtobufTransactions(\n new TopicCreateTransaction({\n adminKey:\n create.adminKey != null\n ? Key._fromProtobufKey(create.adminKey)\n : undefined,\n submitKey:\n create.submitKey != null\n ? Key._fromProtobufKey(create.submitKey)\n : undefined,\n feeScheduleKey:\n create.feeScheduleKey != null\n ? Key._fromProtobufKey(create.feeScheduleKey)\n : undefined,\n feeExemptKeys:\n create.feeExemptKeyList != null\n ? create.feeExemptKeyList.map((key) =>\n Key._fromProtobufKey(key),\n )\n : undefined,\n autoRenewAccountId:\n create.autoRenewAccount != null\n ? AccountId._fromProtobuf(create.autoRenewAccount)\n : undefined,\n autoRenewPeriod:\n create.autoRenewPeriod != null\n ? create.autoRenewPeriod.seconds != null\n ? create.autoRenewPeriod.seconds\n : undefined\n : undefined,\n customFees:\n create.customFees != null\n ? create.customFees.map((customFee) =>\n CustomFixedFee._fromProtobuf(customFee),\n )\n : undefined,\n topicMemo: create.memo != null ? create.memo : undefined,\n }),\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n );\n }\n\n /**\n * @deprecated - Use `getTopicMemo()` instead\n * @returns {?string}\n */\n get topicMemo() {\n return this._topicMemo;\n }\n\n /**\n * @returns {?string}\n */\n getTopicMemo() {\n return this._topicMemo;\n }\n\n /**\n * @param {string} topicMemo\n * @returns {this}\n */\n setTopicMemo(topicMemo) {\n this._requireNotFrozen();\n this._topicMemo = topicMemo;\n\n return this;\n }\n\n /**\n * @deprecated - Use `getAdminKey()` instead\n * @returns {?Key}\n */\n get adminKey() {\n return this._adminKey;\n }\n\n /**\n * @returns {?Key}\n */\n getAdminKey() {\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 * @deprecated - Use `getSubmitKey()` instead\n * @returns {?Key}\n */\n get submitKey() {\n return this._submitKey;\n }\n\n /**\n * @returns {?Key}\n */\n getSubmitKey() {\n return this._submitKey;\n }\n\n /**\n * @param {Key} submitKey\n * @returns {this}\n */\n setSubmitKey(submitKey) {\n this._requireNotFrozen();\n this._submitKey = submitKey;\n\n return this;\n }\n\n /**\n * Returns the key which allows updates to the new topic’s fees.\n * @returns {?Key}\n */\n getFeeScheduleKey() {\n return this._feeScheduleKey;\n }\n\n /**\n * Sets the key which allows updates to the new topic’s fees.\n * @param {Key} feeScheduleKey\n * @returns {this}\n */\n setFeeScheduleKey(feeScheduleKey) {\n this._requireNotFrozen();\n this._feeScheduleKey = feeScheduleKey;\n\n return this;\n }\n\n /**\n * Returns the keys that will be exempt from paying fees.\n * @returns {Key[]}\n */\n getFeeExemptKeys() {\n return this._feeExemptKeys;\n }\n\n /**\n * Sets the keys that will be exempt from paying fees.\n * @param {Key[]} feeExemptKeys\n * @returns {this}\n */\n setFeeExemptKeys(feeExemptKeys) {\n this._requireNotFrozen();\n this._feeExemptKeys = feeExemptKeys;\n\n return this;\n }\n\n /**\n * Adds a key that will be exempt from paying fees.\n * @param {Key} key\n * @returns {this}\n */\n addFeeExemptKey(key) {\n this._requireNotFrozen();\n this._feeExemptKeys.push(key);\n\n return this;\n }\n\n /**\n * Clears all keys that will be exempt from paying fees.\n * @returns {this}\n */\n clearFeeExemptKeys() {\n this._requireNotFrozen();\n this._feeExemptKeys = [];\n\n return this;\n }\n\n /**\n * @deprecated - Use `getAutoRenewAccountId()` instead\n * @returns {?AccountId}\n */\n get autoRenewAccountId() {\n return this._autoRenewAccountId;\n }\n\n /**\n * @returns {?AccountId}\n */\n getAutoRenewAccountId() {\n return this._autoRenewAccountId;\n }\n\n /**\n * @param {AccountId | string} autoRenewAccountId\n * @returns {this}\n */\n setAutoRenewAccountId(autoRenewAccountId) {\n this._requireNotFrozen();\n this._autoRenewAccountId =\n autoRenewAccountId instanceof AccountId\n ? autoRenewAccountId\n : AccountId.fromString(autoRenewAccountId);\n\n return this;\n }\n\n /**\n * @deprecated - Use `getAutoRenewPeriod()` instead\n * @returns {Duration}\n */\n get autoRenewPeriod() {\n return this._autoRenewPeriod;\n }\n\n /**\n * @returns {Duration}\n */\n getAutoRenewPeriod() {\n return this._autoRenewPeriod;\n }\n\n /**\n * Set the auto renew period for this account.\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 the fixed fees to assess when a message is submitted to the new topic.\n * @returns {CustomFixedFee[]}\n */\n getCustomFees() {\n return this._customFees;\n }\n\n /**\n * Sets the fixed fees to assess when a message is submitted to the new topic.\n *\n * @param {CustomFixedFee[]} customFees\n * @returns {this}\n */\n setCustomFees(customFees) {\n this._requireNotFrozen();\n this._customFees = customFees;\n\n return this;\n }\n\n /**\n * Adds fixed fee to assess when a message is submitted to the new topic.\n *\n * @param {CustomFixedFee} customFee\n * @returns {this}\n */\n addCustomFee(customFee) {\n this._requireNotFrozen();\n\n this._customFees.push(customFee);\n\n return this;\n }\n\n /**\n * Clears fixed fees.\n *\n * @returns {this}\n */\n clearCustomFees() {\n this._requireNotFrozen();\n\n this._customFees = [];\n\n return this;\n }\n\n /**\n * @param {Client} client\n */\n _validateChecksums(client) {\n if (this._autoRenewAccountId != null) {\n this._autoRenewAccountId.validateChecksum(client);\n }\n }\n\n /*\n * Temporarily disabled due to issues with consensus node version 0.60.\n * This will be reintroduced once all networks (previewnet, testnet, mainnet)\n * are on version 0.60.\n *\n * @override\n * @param {?import(\"../client/Client.js\").default<Channel, *>} client\n * @returns {this}\n */\n /*\n freezeWith(client) {\n if (!this._autoRenewAccountId && this.transactionId?.accountId) {\n this.setAutoRenewAccountId(this.transactionId?.accountId);\n } else if (!this._autoRenewAccountId && client?.operatorAccountId) {\n this.setAutoRenewAccountId(client.operatorAccountId);\n }\n return super.freezeWith(client);\n }\n */\n\n /**\n * @override\n * @param {?import(\"../client/Client.js\").default<Channel, *>} client\n * @returns {this}\n */\n freezeWith(client) {\n if (!this._autoRenewAccountId && this.transactionId?.accountId) {\n this.setAutoRenewAccountId(this.transactionId?.accountId);\n } else if (!this._autoRenewAccountId && client?.operatorAccountId) {\n this.setAutoRenewAccountId(client.operatorAccountId);\n }\n return super.freezeWith(client);\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.consensus.createTopic(request);\n }\n\n /**\n * @override\n * @protected\n * @returns {NonNullable<HieroProto.proto.TransactionBody[\"data\"]>}\n */\n _getTransactionDataCase() {\n return \"consensusCreateTopic\";\n }\n\n /**\n * @override\n * @protected\n * @returns {HieroProto.proto.IConsensusCreateTopicTransactionBody}\n */\n _makeTransactionData() {\n return {\n adminKey:\n this._adminKey != null ? this._adminKey._toProtobufKey() : null,\n submitKey:\n this._submitKey != null\n ? this._submitKey._toProtobufKey()\n : null,\n feeScheduleKey:\n this._feeScheduleKey != null\n ? this._feeScheduleKey._toProtobufKey()\n : null,\n feeExemptKeyList: this._feeExemptKeys.map((key) =>\n key._toProtobufKey(),\n ),\n autoRenewAccount:\n this._autoRenewAccountId != null\n ? this._autoRenewAccountId._toProtobuf()\n : null,\n autoRenewPeriod: this._autoRenewPeriod._toProtobuf(),\n customFees: this._customFees.map((customFee) =>\n customFee._toTopicFeeProtobuf(),\n ),\n memo: this._topicMemo,\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 `TopicCreateTransaction:${timestamp.toString()}`;\n }\n}\n\nTRANSACTION_REGISTRY.set(\n \"consensusCreateTopic\",\n // eslint-disable-next-line @typescript-eslint/unbound-method\n TopicCreateTransaction._fromProtobuf,\n);\n"],"names":["TopicCreateTransaction","Transaction","constructor","props","super","this","_defaultMaxTransactionFee","Hbar","_adminKey","_submitKey","_feeScheduleKey","_feeExemptKeys","_autoRenewAccountId","_autoRenewPeriod","Duration","DEFAULT_AUTO_RENEW_PERIOD","_customFees","_topicMemo","adminKey","setAdminKey","submitKey","setSubmitKey","feeScheduleKey","setFeeScheduleKey","feeExemptKeys","setFeeExemptKeys","autoRenewAccountId","setAutoRenewAccountId","autoRenewPeriod","setAutoRenewPeriod","customFees","setCustomFees","topicMemo","setTopicMemo","_fromProtobuf","transactions","signedTransactions","transactionIds","nodeIds","bodies","create","_fromProtobufTransactions","Key","_fromProtobufKey","undefined","feeExemptKeyList","map","key","autoRenewAccount","AccountId","seconds","customFee","CustomFixedFee","memo","getTopicMemo","_requireNotFrozen","getAdminKey","getSubmitKey","getFeeScheduleKey","getFeeExemptKeys","addFeeExemptKey","push","clearFeeExemptKeys","getAutoRenewAccountId","fromString","getAutoRenewPeriod","getCustomFees","addCustomFee","clearCustomFees","_validateChecksums","client","validateChecksum","freezeWith","transactionId","accountId","operatorAccountId","_execute","channel","request","consensus","createTopic","_getTransactionDataCase","_makeTransactionData","_toProtobufKey","_toProtobuf","_toTopicFeeProtobuf","_getLogId","_transactionIds","current","toString","TRANSACTION_REGISTRY","set"],"mappings":"yQA+Be,MAAMA,UAA+BC,EAYhD,WAAAC,CAAYC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ACrB,KACVtC,iBAAkBxC,KAAKM,eAAemC,IAAKC,GACvCA,EAAIoC,kBAERnC,iBACgC,MAA5B3C,KAAKO,oBACCP,KAAKO,oBAAoBwE,cACzB,KACVxD,gBAAiBvB,KAAKQ,iBAAiBuE,cACvCtD,WAAYzB,KAAKW,YAAY8B,IAAKK,GAC9BA,EAAUkC,uBAEdhC,KAAMhD,KAAKY,WAEvB,CAKI,SAAAqE,GAII,MAAO,0BAFHjF,KAAKkF,gBAAgBC,QACxB,WAC0CC,YACnD,EAGAC,EAAqBC,IACjB,uBAEA3F,EAAuBkC"}
|
|
1
|
+
{"version":3,"file":"TopicCreateTransaction.js","sources":["../../src/topic/TopicCreateTransaction.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport AccountId from \"../account/AccountId.js\";\nimport CustomFixedFee from \"../token/CustomFixedFee.js\";\nimport Transaction, {\n DEFAULT_AUTO_RENEW_PERIOD,\n TRANSACTION_REGISTRY,\n} from \"../transaction/Transaction.js\";\nimport Duration from \"../Duration.js\";\nimport Key from \"../Key.js\";\nimport Hbar from \"../Hbar.js\";\n\n/**\n * @namespace proto\n * @typedef {import(\"@hiero-ledger/proto\").proto.IConsensusCreateTopicTransactionBody} HieroProto.proto.IConsensusCreateTopicTransactionBody\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 */\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 * Create a topic to be used for consensus.\n */\nexport default class TopicCreateTransaction extends Transaction {\n /**\n * @param {object} props\n * @param {Key} [props.adminKey]\n * @param {Key} [props.submitKey]\n * @param {Key} [props.feeScheduleKey]\n * @param {Duration | Long | number} [props.autoRenewPeriod]\n * @param {AccountId | string} [props.autoRenewAccountId]\n * @param {CustomFixedFee[]} [props.customFees]\n * @param {Key[]} [props.feeExemptKeys]\n * @param {string} [props.topicMemo]\n */\n constructor(props = {}) {\n super();\n\n this._defaultMaxTransactionFee = new Hbar(25);\n\n /**\n * @private\n * @type {?Key}\n */\n this._adminKey = null;\n\n /**\n * @private\n * @type {?Key}\n */\n this._submitKey = null;\n\n /**\n * @private\n * @type {?Key}\n */\n this._feeScheduleKey = null;\n\n /**\n * @private\n * @type {Key[]}\n */\n this._feeExemptKeys = [];\n\n /**\n * @private\n * @type {?AccountId}\n */\n this._autoRenewAccountId = null;\n\n /**\n * @private\n * @type {Duration}\n */\n this._autoRenewPeriod = new Duration(DEFAULT_AUTO_RENEW_PERIOD);\n\n /**\n * @private\n * @type {CustomFixedFee[]}\n */\n this._customFees = [];\n\n /**\n * @private\n * @type {?string}\n */\n this._topicMemo = null;\n\n if (props.adminKey != null) {\n this.setAdminKey(props.adminKey);\n }\n\n if (props.submitKey != null) {\n this.setSubmitKey(props.submitKey);\n }\n\n if (props.feeScheduleKey != null) {\n this.setFeeScheduleKey(props.feeScheduleKey);\n }\n\n if (props.feeExemptKeys != null) {\n this.setFeeExemptKeys(props.feeExemptKeys);\n }\n\n if (props.autoRenewAccountId != null) {\n this.setAutoRenewAccountId(props.autoRenewAccountId);\n }\n\n if (props.autoRenewPeriod != null) {\n this.setAutoRenewPeriod(props.autoRenewPeriod);\n }\n\n if (props.customFees != null) {\n this.setCustomFees(props.customFees);\n }\n\n if (props.topicMemo != null) {\n this.setTopicMemo(props.topicMemo);\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 {TopicCreateTransaction}\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.IConsensusCreateTopicTransactionBody} */ (\n body.consensusCreateTopic\n );\n\n return Transaction._fromProtobufTransactions(\n new TopicCreateTransaction({\n adminKey:\n create.adminKey != null\n ? Key._fromProtobufKey(create.adminKey)\n : undefined,\n submitKey:\n create.submitKey != null\n ? Key._fromProtobufKey(create.submitKey)\n : undefined,\n feeScheduleKey:\n create.feeScheduleKey != null\n ? Key._fromProtobufKey(create.feeScheduleKey)\n : undefined,\n feeExemptKeys:\n create.feeExemptKeyList != null\n ? create.feeExemptKeyList.map((key) =>\n Key._fromProtobufKey(key),\n )\n : undefined,\n autoRenewAccountId:\n create.autoRenewAccount != null\n ? AccountId._fromProtobuf(create.autoRenewAccount)\n : undefined,\n autoRenewPeriod:\n create.autoRenewPeriod != null\n ? create.autoRenewPeriod.seconds != null\n ? create.autoRenewPeriod.seconds\n : undefined\n : undefined,\n customFees:\n create.customFees != null\n ? create.customFees.map((customFee) =>\n CustomFixedFee._fromProtobuf(customFee),\n )\n : undefined,\n topicMemo: create.memo != null ? create.memo : undefined,\n }),\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n );\n }\n\n /**\n * @deprecated - Use `getTopicMemo()` instead\n * @returns {?string}\n */\n get topicMemo() {\n return this._topicMemo;\n }\n\n /**\n * @returns {?string}\n */\n getTopicMemo() {\n return this._topicMemo;\n }\n\n /**\n * @param {string} topicMemo\n * @returns {this}\n */\n setTopicMemo(topicMemo) {\n this._requireNotFrozen();\n this._topicMemo = topicMemo;\n\n return this;\n }\n\n /**\n * @deprecated - Use `getAdminKey()` instead\n * @returns {?Key}\n */\n get adminKey() {\n return this._adminKey;\n }\n\n /**\n * @returns {?Key}\n */\n getAdminKey() {\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 * @deprecated - Use `getSubmitKey()` instead\n * @returns {?Key}\n */\n get submitKey() {\n return this._submitKey;\n }\n\n /**\n * @returns {?Key}\n */\n getSubmitKey() {\n return this._submitKey;\n }\n\n /**\n * @param {Key} submitKey\n * @returns {this}\n */\n setSubmitKey(submitKey) {\n this._requireNotFrozen();\n this._submitKey = submitKey;\n\n return this;\n }\n\n /**\n * Returns the key which allows updates to the new topic’s fees.\n * @returns {?Key}\n */\n getFeeScheduleKey() {\n return this._feeScheduleKey;\n }\n\n /**\n * Sets the key which allows updates to the new topic’s fees.\n * @param {Key} feeScheduleKey\n * @returns {this}\n */\n setFeeScheduleKey(feeScheduleKey) {\n this._requireNotFrozen();\n this._feeScheduleKey = feeScheduleKey;\n\n return this;\n }\n\n /**\n * Returns the keys that will be exempt from paying fees.\n * @returns {Key[]}\n */\n getFeeExemptKeys() {\n return this._feeExemptKeys;\n }\n\n /**\n * Sets the keys that will be exempt from paying fees.\n * @param {Key[]} feeExemptKeys\n * @returns {this}\n */\n setFeeExemptKeys(feeExemptKeys) {\n this._requireNotFrozen();\n this._feeExemptKeys = feeExemptKeys;\n\n return this;\n }\n\n /**\n * Adds a key that will be exempt from paying fees.\n * @param {Key} key\n * @returns {this}\n */\n addFeeExemptKey(key) {\n this._requireNotFrozen();\n this._feeExemptKeys.push(key);\n\n return this;\n }\n\n /**\n * Clears all keys that will be exempt from paying fees.\n * @returns {this}\n */\n clearFeeExemptKeys() {\n this._requireNotFrozen();\n this._feeExemptKeys = [];\n\n return this;\n }\n\n /**\n * @deprecated - Use `getAutoRenewAccountId()` instead\n * @returns {?AccountId}\n */\n get autoRenewAccountId() {\n return this._autoRenewAccountId;\n }\n\n /**\n * @returns {?AccountId}\n */\n getAutoRenewAccountId() {\n return this._autoRenewAccountId;\n }\n\n /**\n * @param {AccountId | string} autoRenewAccountId\n * @returns {this}\n */\n setAutoRenewAccountId(autoRenewAccountId) {\n this._requireNotFrozen();\n this._autoRenewAccountId =\n autoRenewAccountId instanceof AccountId\n ? autoRenewAccountId\n : AccountId.fromString(autoRenewAccountId);\n\n return this;\n }\n\n /**\n * @deprecated - Use `getAutoRenewPeriod()` instead\n * @returns {Duration}\n */\n get autoRenewPeriod() {\n return this._autoRenewPeriod;\n }\n\n /**\n * @returns {Duration}\n */\n getAutoRenewPeriod() {\n return this._autoRenewPeriod;\n }\n\n /**\n * Set the auto renew period for this account.\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 the fixed fees to assess when a message is submitted to the new topic.\n * @returns {CustomFixedFee[]}\n */\n getCustomFees() {\n return this._customFees;\n }\n\n /**\n * Sets the fixed fees to assess when a message is submitted to the new topic.\n *\n * @param {CustomFixedFee[]} customFees\n * @returns {this}\n */\n setCustomFees(customFees) {\n this._requireNotFrozen();\n this._customFees = customFees;\n\n return this;\n }\n\n /**\n * Adds fixed fee to assess when a message is submitted to the new topic.\n *\n * @param {CustomFixedFee} customFee\n * @returns {this}\n */\n addCustomFee(customFee) {\n this._requireNotFrozen();\n\n this._customFees.push(customFee);\n\n return this;\n }\n\n /**\n * Clears fixed fees.\n *\n * @returns {this}\n */\n clearCustomFees() {\n this._requireNotFrozen();\n\n this._customFees = [];\n\n return this;\n }\n\n /**\n * @param {Client} client\n */\n _validateChecksums(client) {\n if (this._autoRenewAccountId != null) {\n this._autoRenewAccountId.validateChecksum(client);\n }\n }\n\n /*\n * Temporarily disabled due to issues with consensus node version 0.60.\n * This will be reintroduced once all networks (previewnet, testnet, mainnet)\n * are on version 0.60.\n *\n * @override\n * @param {?import(\"../client/Client.js\").default<Channel, *>} client\n * @returns {this}\n */\n /*\n freezeWith(client) {\n if (!this._autoRenewAccountId && this.transactionId?.accountId) {\n this.setAutoRenewAccountId(this.transactionId?.accountId);\n } else if (!this._autoRenewAccountId && client?.operatorAccountId) {\n this.setAutoRenewAccountId(client.operatorAccountId);\n }\n return super.freezeWith(client);\n }\n */\n\n /**\n * @override\n * @param {?import(\"../client/Client.js\").default<Channel, *>} client\n * @returns {this}\n */\n freezeWith(client) {\n if (!this._autoRenewAccountId && this.transactionId?.accountId) {\n this.setAutoRenewAccountId(this.transactionId?.accountId);\n } else if (!this._autoRenewAccountId && client?.operatorAccountId) {\n this.setAutoRenewAccountId(client.operatorAccountId);\n }\n return super.freezeWith(client);\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.consensus.createTopic(request);\n }\n\n /**\n * @override\n * @protected\n * @returns {NonNullable<HieroProto.proto.TransactionBody[\"data\"]>}\n */\n _getTransactionDataCase() {\n return \"consensusCreateTopic\";\n }\n\n /**\n * @override\n * @protected\n * @returns {HieroProto.proto.IConsensusCreateTopicTransactionBody}\n */\n _makeTransactionData() {\n return {\n adminKey:\n this._adminKey != null ? this._adminKey._toProtobufKey() : null,\n submitKey:\n this._submitKey != null\n ? this._submitKey._toProtobufKey()\n : null,\n feeScheduleKey:\n this._feeScheduleKey != null\n ? this._feeScheduleKey._toProtobufKey()\n : null,\n feeExemptKeyList: this._feeExemptKeys.map((key) =>\n key._toProtobufKey(),\n ),\n autoRenewAccount:\n this._autoRenewAccountId != null\n ? this._autoRenewAccountId._toProtobuf()\n : null,\n autoRenewPeriod: this._autoRenewPeriod._toProtobuf(),\n customFees: this._customFees.map((customFee) =>\n customFee._toTopicFeeProtobuf(),\n ),\n memo: this._topicMemo,\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 `TopicCreateTransaction:${timestamp.toString()}`;\n }\n}\n\nTRANSACTION_REGISTRY.set(\n \"consensusCreateTopic\",\n // eslint-disable-next-line @typescript-eslint/unbound-method\n TopicCreateTransaction._fromProtobuf,\n);\n"],"names":["TopicCreateTransaction","Transaction","constructor","props","super","this","_defaultMaxTransactionFee","Hbar","_adminKey","_submitKey","_feeScheduleKey","_feeExemptKeys","_autoRenewAccountId","_autoRenewPeriod","Duration","DEFAULT_AUTO_RENEW_PERIOD","_customFees","_topicMemo","adminKey","setAdminKey","submitKey","setSubmitKey","feeScheduleKey","setFeeScheduleKey","feeExemptKeys","setFeeExemptKeys","autoRenewAccountId","setAutoRenewAccountId","autoRenewPeriod","setAutoRenewPeriod","customFees","setCustomFees","topicMemo","setTopicMemo","_fromProtobuf","transactions","signedTransactions","transactionIds","nodeIds","bodies","create","_fromProtobufTransactions","Key","_fromProtobufKey","undefined","feeExemptKeyList","map","key","autoRenewAccount","AccountId","seconds","customFee","CustomFixedFee","memo","getTopicMemo","_requireNotFrozen","getAdminKey","getSubmitKey","getFeeScheduleKey","getFeeExemptKeys","addFeeExemptKey","push","clearFeeExemptKeys","getAutoRenewAccountId","fromString","getAutoRenewPeriod","getCustomFees","addCustomFee","clearCustomFees","_validateChecksums","client","validateChecksum","freezeWith","transactionId","accountId","operatorAccountId","_execute","channel","request","consensus","createTopic","_getTransactionDataCase","_makeTransactionData","_toProtobufKey","_toProtobuf","_toTopicFeeProtobuf","_getLogId","_transactionIds","current","toString","TRANSACTION_REGISTRY","set"],"mappings":"yQA+Be,MAAMA,UAA+BC,EAYhD,WAAAC,CAAYC,EAAQ,IAChBC,QAEAC,KAAKC,0BAA4B,IAAIC,EAAK,IAM1CF,KAAKG,UAAY,KAMjBH,KAAKI,WAAa,KAMlBJ,KAAKK,gBAAkB,KAMvBL,KAAKM,eAAiB,GAMtBN,KAAKO,oBA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ACvCtD,WAAYzB,KAAKW,YAAY8B,IAAKK,GAC9BA,EAAUkC,uBAEdhC,KAAMhD,KAAKY,WAEvB,CAKI,SAAAqE,GAII,MAAO,0BAFHjF,KAAKkF,gBAAgBC,QACxB,WAC0CC,YACnD,EAGAC,EAAqBC,IACjB,uBAEA3F,EAAuBkC"}
|
|
@@ -12,12 +12,12 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* @namespace proto
|
|
15
|
-
* @typedef {import("@
|
|
16
|
-
* @typedef {import("@
|
|
17
|
-
* @typedef {import("@
|
|
18
|
-
* @typedef {import("@
|
|
19
|
-
* @typedef {import("@
|
|
20
|
-
* @typedef {import("@
|
|
15
|
+
* @typedef {import("@hiero-ledger/proto").proto.IConsensusDeleteTopicTransactionBody} HieroProto.proto.IConsensusDeleteTopicTransactionBody
|
|
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
21
|
*/
|
|
22
22
|
|
|
23
23
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @namespace proto
|
|
3
|
-
* @typedef {import("@
|
|
4
|
-
* @typedef {import("@
|
|
5
|
-
* @typedef {import("@
|
|
6
|
-
* @typedef {import("@
|
|
7
|
-
* @typedef {import("@
|
|
8
|
-
* @typedef {import("@
|
|
3
|
+
* @typedef {import("@hiero-ledger/proto").proto.IConsensusDeleteTopicTransactionBody} HieroProto.proto.IConsensusDeleteTopicTransactionBody
|
|
4
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransaction} HieroProto.proto.ITransaction
|
|
5
|
+
* @typedef {import("@hiero-ledger/proto").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction
|
|
6
|
+
* @typedef {import("@hiero-ledger/proto").proto.TransactionBody} HieroProto.proto.TransactionBody
|
|
7
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionBody} HieroProto.proto.ITransactionBody
|
|
8
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionResponse} HieroProto.proto.ITransactionResponse
|
|
9
9
|
*/
|
|
10
10
|
/**
|
|
11
11
|
* @typedef {import("../channel/Channel.js").default} Channel
|
|
@@ -64,12 +64,12 @@ export default class TopicDeleteTransaction extends Transaction {
|
|
|
64
64
|
}
|
|
65
65
|
export namespace HieroProto {
|
|
66
66
|
namespace proto {
|
|
67
|
-
type IConsensusDeleteTopicTransactionBody = import("@
|
|
68
|
-
type ITransaction = import("@
|
|
69
|
-
type ISignedTransaction = import("@
|
|
70
|
-
type TransactionBody = import("@
|
|
71
|
-
type ITransactionBody = import("@
|
|
72
|
-
type ITransactionResponse = import("@
|
|
67
|
+
type IConsensusDeleteTopicTransactionBody = import("@hiero-ledger/proto").proto.IConsensusDeleteTopicTransactionBody;
|
|
68
|
+
type ITransaction = import("@hiero-ledger/proto").proto.ITransaction;
|
|
69
|
+
type ISignedTransaction = import("@hiero-ledger/proto").proto.ISignedTransaction;
|
|
70
|
+
type TransactionBody = import("@hiero-ledger/proto").proto.TransactionBody;
|
|
71
|
+
type ITransactionBody = import("@hiero-ledger/proto").proto.ITransactionBody;
|
|
72
|
+
type ITransactionResponse = import("@hiero-ledger/proto").proto.ITransactionResponse;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
export type Channel = import("../channel/Channel.js").default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopicDeleteTransaction.js","sources":["../../src/topic/TopicDeleteTransaction.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Transaction, {\n TRANSACTION_REGISTRY,\n} from \"../transaction/Transaction.js\";\nimport TopicId from \"./TopicId.js\";\n\n/**\n * @namespace proto\n * @typedef {import(\"@
|
|
1
|
+
{"version":3,"file":"TopicDeleteTransaction.js","sources":["../../src/topic/TopicDeleteTransaction.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Transaction, {\n TRANSACTION_REGISTRY,\n} from \"../transaction/Transaction.js\";\nimport TopicId from \"./TopicId.js\";\n\n/**\n * @namespace proto\n * @typedef {import(\"@hiero-ledger/proto\").proto.IConsensusDeleteTopicTransactionBody} HieroProto.proto.IConsensusDeleteTopicTransactionBody\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 */\n\n/**\n * @typedef {import(\"../channel/Channel.js\").default} Channel\n * @typedef {import(\"../client/Client.js\").default<*, *>} Client\n * @typedef {import(\"../account/AccountId.js\").default} AccountId\n * @typedef {import(\"../transaction/TransactionId.js\").default} TransactionId\n */\n\n/**\n * Delete a topic.\n *\n * No more transactions or queries on the topic will succeed.\n *\n * If an adminKey is set, this transaction must be signed by that key.\n * If there is no adminKey, this transaction will fail with Status#Unautorized.\n */\nexport default class TopicDeleteTransaction extends Transaction {\n /**\n * @param {object} props\n * @param {TopicId | string} [props.topicId]\n */\n constructor(props = {}) {\n super();\n\n /**\n * @private\n * @type {?TopicId}\n */\n this._topicId = null;\n\n if (props.topicId != null) {\n this.setTopicId(props.topicId);\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 {TopicDeleteTransaction}\n */\n static _fromProtobuf(\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n ) {\n const body = bodies[0];\n const topicDelete =\n /** @type {HieroProto.proto.IConsensusDeleteTopicTransactionBody} */ (\n body.consensusDeleteTopic\n );\n\n return Transaction._fromProtobufTransactions(\n new TopicDeleteTransaction({\n topicId:\n topicDelete.topicID != null\n ? TopicId._fromProtobuf(topicDelete.topicID)\n : undefined,\n }),\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n );\n }\n\n /**\n * @returns {?TopicId}\n */\n get topicId() {\n return this._topicId;\n }\n\n /**\n * Set the topic ID which is being deleted in this transaction.\n *\n * @param {TopicId | string} topicId\n * @returns {TopicDeleteTransaction}\n */\n setTopicId(topicId) {\n this._requireNotFrozen();\n this._topicId =\n typeof topicId === \"string\"\n ? TopicId.fromString(topicId)\n : topicId.clone();\n\n return this;\n }\n\n /**\n * @param {Client} client\n */\n _validateChecksums(client) {\n if (this._topicId != null) {\n this._topicId.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.consensus.deleteTopic(request);\n }\n\n /**\n * @override\n * @protected\n * @returns {NonNullable<HieroProto.proto.TransactionBody[\"data\"]>}\n */\n _getTransactionDataCase() {\n return \"consensusDeleteTopic\";\n }\n\n /**\n * @override\n * @protected\n * @returns {HieroProto.proto.IConsensusDeleteTopicTransactionBody}\n */\n _makeTransactionData() {\n return {\n topicID: this._topicId != null ? this._topicId._toProtobuf() : 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 `TopicDeleteTransaction:${timestamp.toString()}`;\n }\n}\n\nTRANSACTION_REGISTRY.set(\n \"consensusDeleteTopic\",\n // eslint-disable-next-line @typescript-eslint/unbound-method\n TopicDeleteTransaction._fromProtobuf,\n);\n"],"names":["TopicDeleteTransaction","Transaction","constructor","props","super","this","_topicId","topicId","setTopicId","_fromProtobuf","transactions","signedTransactions","transactionIds","nodeIds","bodies","topicDelete","_fromProtobufTransactions","topicID","TopicId","undefined","_requireNotFrozen","fromString","clone","_validateChecksums","client","validateChecksum","_execute","channel","request","consensus","deleteTopic","_getTransactionDataCase","_makeTransactionData","_toProtobuf","_getLogId","_transactionIds","current","toString","TRANSACTION_REGISTRY","set"],"mappings":"oGAgCe,MAAMA,UAA+BC,EAKhD,WAAAC,CAAYC,EAAQ,IAChBC,QAMAC,KAAKC,SAAW,KAEK,MAAjBH,EAAMI,SACNF,KAAKG,WAAWL,EAAMI,QAElC,CAWI,oBAAOE,CACHC,EACAC,EACAC,EACAC,EACAC,GAEA,MACMC,EADOD,EAAO,GAIf,qBAEL,OAAOb,EAAYe,0BACf,IAAIhB,EAAuB,CACvBO,QAC2B,MAAvBQ,EAAYE,QACNC,EAAQT,cAAcM,EAAYE,cAClCE,IAEdT,EACAC,EACAC,EACAC,EACAC,EAEZ,CAKI,WAAIP,GACA,OAAOF,KAAKC,QACpB,CAQI,UAAAE,CAAWD,GAOP,OANAF,KAAKe,oBACLf,KAAKC,SACkB,iBAAZC,EACDW,EAAQG,WAAWd,GACnBA,EAAQe,QAEXjB,IACf,CAKI,kBAAAkB,CAAmBC,GACM,MAAjBnB,KAAKC,UACLD,KAAKC,SAASmB,iBAAiBD,EAE3C,CASI,QAAAE,CAASC,EAASC,GACd,OAAOD,EAAQE,UAAUC,YAAYF,EAC7C,CAOI,uBAAAG,GACI,MAAO,sBACf,CAOI,oBAAAC,GACI,MAAO,CACHf,QAA0B,MAAjBZ,KAAKC,SAAmBD,KAAKC,SAAS2B,cAAgB,KAE3E,CAKI,SAAAC,GAII,MAAO,0BAFH7B,KAAK8B,gBAAgBC,QACxB,WAC0CC,YACnD,EAGAC,EAAqBC,IACjB,uBAEAvC,EAAuBS"}
|
package/lib/topic/TopicId.cjs
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var EntityIdHelper = _interopRequireWildcard(require("../EntityIdHelper.cjs"));
|
|
8
|
-
var HieroProto = _interopRequireWildcard(require("@
|
|
8
|
+
var HieroProto = _interopRequireWildcard(require("@hiero-ledger/proto"));
|
|
9
9
|
var _EvmAddress = _interopRequireDefault(require("../EvmAddress.cjs"));
|
|
10
10
|
var util = _interopRequireWildcard(require("../util.cjs"));
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
package/lib/topic/TopicId.d.ts
CHANGED
package/lib/topic/TopicId.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{constructor as t,fromString as r,validateChecksum as s,fromSolidityAddress as e,fromEvmAddress as o,toSolidityAddress as i,toEvmAddress as m,toStringWithChecksum as n,compare as
|
|
1
|
+
import{constructor as t,fromString as r,validateChecksum as s,fromSolidityAddress as e,fromEvmAddress as o,toSolidityAddress as i,toEvmAddress as m,toStringWithChecksum as n,compare as u}from"../EntityIdHelper.js";import*as h from"@hiero-ledger/proto";import c from"../EvmAddress.js";import{isLongZeroAddress as a}from"../util.js";class d{constructor(r,s,e){const o=t(r,s,e);this.shard=o.shard,this.realm=o.realm,this.num=o.num,this._checksum=null}static fromString(t){const s=r(t),e=new d(s);return e._checksum=s.checksum,e}static _fromProtobuf(t){return new d(null!=t.shardNum?t.shardNum:0,null!=t.realmNum?t.realmNum:0,null!=t.topicNum?t.topicNum:0)}get checksum(){return this._checksum}validate(t){console.warn("Deprecated: Use `validateChecksum` instead"),this.validateChecksum(t)}validateChecksum(t){s(this.shard,this.realm,this.num,this._checksum,t)}static fromBytes(t){return d._fromProtobuf(h.proto.TopicID.decode(t))}static fromSolidityAddress(t){const[r,s,o]=e(t);return new d(r,s,o)}static fromEvmAddress(t,r,s){const e=c.fromString(s).toBytes();if(!a(e))throw new Error("TopicId.fromEvmAddress does not support non-long-zero addresses");const[i,m,n]=o(t,r,s);return new d(i,m,n)}toSolidityAddress(){return i([this.shard,this.realm,this.num])}toEvmAddress(){return m(this.num)}_toProtobuf(){return{topicNum:this.num,shardNum:this.shard,realmNum:this.realm}}toString(){return`${this.shard.toString()}.${this.realm.toString()}.${this.num.toString()}`}toStringWithChecksum(t){return n(this.toString(),t)}toBytes(){return h.proto.TopicID.encode(this._toProtobuf()).finish()}clone(){const t=new d(this);return t._checksum=this._checksum,t}compare(t){return u([this.shard,this.realm,this.num],[t.shard,t.realm,t.num])}}export{d as default};
|
|
2
2
|
//# sourceMappingURL=TopicId.js.map
|
package/lib/topic/TopicId.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopicId.js","sources":["../../src/topic/TopicId.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport * as EntityIdHelper from \"../EntityIdHelper.js\";\nimport * as HieroProto from \"@
|
|
1
|
+
{"version":3,"file":"TopicId.js","sources":["../../src/topic/TopicId.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport * as EntityIdHelper from \"../EntityIdHelper.js\";\nimport * as HieroProto from \"@hiero-ledger/proto\";\nimport EvmAddress from \"../EvmAddress.js\";\nimport * as util from \"../util.js\";\n\n/**\n * @typedef {import(\"long\")} Long\n * @typedef {import(\"../client/Client.js\").default<*, *>} Client\n */\n\n/**\n * Unique identifier for a topic (used by the consensus service).\n */\nexport default class TopicId {\n /**\n * @param {number | Long | import(\"../EntityIdHelper\").IEntityId} props\n * @param {(number | Long)=} realm\n * @param {(number | Long)=} num\n */\n constructor(props, realm, num) {\n const result = EntityIdHelper.constructor(props, realm, num);\n\n this.shard = result.shard;\n this.realm = result.realm;\n this.num = result.num;\n\n /**\n * @type {string | null}\n */\n this._checksum = null;\n }\n\n /**\n * @param {string} text\n * @returns {TopicId}\n */\n static fromString(text) {\n const result = EntityIdHelper.fromString(text);\n const id = new TopicId(result);\n id._checksum = result.checksum;\n return id;\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.ITopicID} id\n * @returns {TopicId}\n */\n static _fromProtobuf(id) {\n const topicId = new TopicId(\n id.shardNum != null ? id.shardNum : 0,\n id.realmNum != null ? id.realmNum : 0,\n id.topicNum != null ? id.topicNum : 0,\n );\n\n return topicId;\n }\n\n /**\n * @returns {string | null}\n */\n get checksum() {\n return this._checksum;\n }\n\n /**\n * @deprecated - Use `validateChecksum` instead\n * @param {Client} client\n */\n validate(client) {\n console.warn(\"Deprecated: Use `validateChecksum` instead\");\n this.validateChecksum(client);\n }\n\n /**\n * @param {Client} client\n */\n validateChecksum(client) {\n EntityIdHelper.validateChecksum(\n this.shard,\n this.realm,\n this.num,\n this._checksum,\n client,\n );\n }\n\n /**\n * @param {Uint8Array} bytes\n * @returns {TopicId}\n */\n static fromBytes(bytes) {\n return TopicId._fromProtobuf(HieroProto.proto.TopicID.decode(bytes));\n }\n\n /**\n * @param {string} address\n * @deprecated - Use `fromEvmAddress` instead\n * @returns {TopicId}\n */\n static fromSolidityAddress(address) {\n const [shard, realm, topic] =\n EntityIdHelper.fromSolidityAddress(address);\n return new TopicId(shard, realm, topic);\n }\n\n /**\n * @param {number} shard\n * @param {number} realm\n * @param {string} address\n * @returns {TopicId}\n */\n static fromEvmAddress(shard, realm, address) {\n const addressBytes = EvmAddress.fromString(address).toBytes();\n const isLongZero = util.isLongZeroAddress(addressBytes);\n\n if (!isLongZero) {\n throw new Error(\n \"TopicId.fromEvmAddress does not support non-long-zero addresses\",\n );\n }\n\n const [shardLong, realmLong, topicLong] = EntityIdHelper.fromEvmAddress(\n shard,\n realm,\n address,\n );\n return new TopicId(shardLong, realmLong, topicLong);\n }\n\n /**\n * @deprecated - Use `toEvmAddress` instead\n * @returns {string}\n */\n toSolidityAddress() {\n return EntityIdHelper.toSolidityAddress([\n this.shard,\n this.realm,\n this.num,\n ]);\n }\n\n /**\n * @returns {string} EVM-compatible address representation of the entity\n */\n toEvmAddress() {\n return EntityIdHelper.toEvmAddress(this.num);\n }\n\n /**\n * @returns {HieroProto.proto.ITopicID}\n */\n _toProtobuf() {\n return {\n topicNum: this.num,\n shardNum: this.shard,\n realmNum: this.realm,\n };\n }\n\n /**\n * @returns {string}\n */\n toString() {\n return `${this.shard.toString()}.${this.realm.toString()}.${this.num.toString()}`;\n }\n\n /**\n * @param {Client} client\n * @returns {string}\n */\n toStringWithChecksum(client) {\n return EntityIdHelper.toStringWithChecksum(this.toString(), client);\n }\n\n /**\n * @returns {Uint8Array}\n */\n toBytes() {\n return HieroProto.proto.TopicID.encode(this._toProtobuf()).finish();\n }\n\n /**\n * @returns {TopicId}\n */\n clone() {\n const id = new TopicId(this);\n id._checksum = this._checksum;\n return id;\n }\n\n /**\n * @param {TopicId} other\n * @returns {number}\n */\n compare(other) {\n return EntityIdHelper.compare(\n [this.shard, this.realm, this.num],\n [other.shard, other.realm, other.num],\n );\n }\n}\n"],"names":["TopicId","constructor","props","realm","num","result","EntityIdHelper.constructor","this","shard","_checksum","fromString","text","EntityIdHelper.fromString","id","checksum","_fromProtobuf","shardNum","realmNum","topicNum","validate","client","console","warn","validateChecksum","EntityIdHelper.validateChecksum","fromBytes","bytes","HieroProto","proto","TopicID","decode","fromSolidityAddress","address","topic","EntityIdHelper.fromSolidityAddress","fromEvmAddress","addressBytes","EvmAddress","toBytes","util.isLongZeroAddress","Error","shardLong","realmLong","topicLong","EntityIdHelper.fromEvmAddress","toSolidityAddress","EntityIdHelper.toSolidityAddress","toEvmAddress","EntityIdHelper.toEvmAddress","_toProtobuf","toString","toStringWithChecksum","EntityIdHelper.toStringWithChecksum","encode","finish","clone","compare","other","E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MACLD,KAAKJ,MACLI,KAAKH,KAEjB,CAKI,YAAA2C,GACI,OAAOC,EAA4BzC,KAAKH,IAChD,CAKI,WAAA6C,GACI,MAAO,CACH/B,SAAUX,KAAKH,IACfY,SAAUT,KAAKC,MACfS,SAAUV,KAAKJ,MAE3B,CAKI,QAAA+C,GACI,MAAO,GAAG3C,KAAKC,MAAM0C,cAAc3C,KAAKJ,MAAM+C,cAAc3C,KAAKH,IAAI8C,YAC7E,CAMI,oBAAAC,CAAqB/B,GACjB,OAAOgC,EAAoC7C,KAAK2C,WAAY9B,EACpE,CAKI,OAAAkB,GACI,OAAOX,EAAWC,MAAMC,QAAQwB,OAAO9C,KAAK0C,eAAeK,QACnE,CAKI,KAAAC,GACI,MAAM1C,EAAK,IAAIb,EAAQO,MAEvB,OADAM,EAAGJ,UAAYF,KAAKE,UACbI,CACf,CAMI,OAAA2C,CAAQC,GACJ,OAAOC,EACH,CAACnD,KAAKC,MAAOD,KAAKJ,MAAOI,KAAKH,KAC9B,CAACqD,EAAMjD,MAAOiD,EAAMtD,MAAOsD,EAAMrD,KAE7C"}
|
package/lib/topic/TopicInfo.cjs
CHANGED
|
@@ -9,7 +9,7 @@ var _AccountId = _interopRequireDefault(require("../account/AccountId.cjs"));
|
|
|
9
9
|
var _Timestamp = _interopRequireDefault(require("../Timestamp.cjs"));
|
|
10
10
|
var _long = _interopRequireDefault(require("long"));
|
|
11
11
|
var _Duration = _interopRequireDefault(require("../Duration.cjs"));
|
|
12
|
-
var HieroProto = _interopRequireWildcard(require("@
|
|
12
|
+
var HieroProto = _interopRequireWildcard(require("@hiero-ledger/proto"));
|
|
13
13
|
var _Key = _interopRequireDefault(require("../Key.cjs"));
|
|
14
14
|
var _LedgerId = _interopRequireDefault(require("../LedgerId.cjs"));
|
|
15
15
|
var _CustomFixedFee = _interopRequireDefault(require("../token/CustomFixedFee.cjs"));
|
package/lib/topic/TopicInfo.d.ts
CHANGED
|
@@ -116,4 +116,4 @@ import Duration from "../Duration.js";
|
|
|
116
116
|
import AccountId from "../account/AccountId.js";
|
|
117
117
|
import CustomFixedFee from "../token/CustomFixedFee.js";
|
|
118
118
|
import LedgerId from "../LedgerId.js";
|
|
119
|
-
import * as HieroProto from "@
|
|
119
|
+
import * as HieroProto from "@hiero-ledger/proto";
|
package/lib/topic/TopicInfo.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"./TopicId.js";import o from"../account/AccountId.js";import t from"../Timestamp.js";import u from"long";import n from"../Duration.js";import*as i from"@
|
|
1
|
+
import e from"./TopicId.js";import o from"../account/AccountId.js";import t from"../Timestamp.js";import u from"long";import n from"../Duration.js";import*as i from"@hiero-ledger/proto";import s from"../Key.js";import r from"../LedgerId.js";import m from"../token/CustomFixedFee.js";class l{constructor(e){this.topicId=e.topicId,this.topicMemo=e.topicMemo,this.runningHash=e.runningHash,this.sequenceNumber=e.sequenceNumber,this.expirationTime=e.expirationTime,this.adminKey=e.adminKey,this.submitKey=e.submitKey,this.feeScheduleKey=e.feeScheduleKey,this.feeExemptKeys=e.feeExemptKeys,this.autoRenewPeriod=e.autoRenewPeriod,this.autoRenewAccountId=e.autoRenewAccountId,this.customFees=e.customFees,this.ledgerId=e.ledgerId,Object.freeze(this)}static _fromProtobuf(i){const c=i.topicInfo;return new l({topicId:e._fromProtobuf(i.topicID),topicMemo:null!=c.memo?c.memo:"",runningHash:null!=c.runningHash?c.runningHash:new Uint8Array,sequenceNumber:null!=c.sequenceNumber?c.sequenceNumber instanceof u?c.sequenceNumber:u.fromValue(c.sequenceNumber):u.ZERO,expirationTime:null!=c.expirationTime?t._fromProtobuf(c.expirationTime):null,adminKey:null!=c.adminKey?s._fromProtobufKey(c.adminKey):null,submitKey:null!=c.submitKey?s._fromProtobufKey(c.submitKey):null,feeScheduleKey:null!=c.feeScheduleKey?s._fromProtobufKey(c.feeScheduleKey):null,feeExemptKeys:null!=c.feeExemptKeyList?c.feeExemptKeyList.map(e=>s._fromProtobufKey(e)):null,autoRenewPeriod:null!=c.autoRenewPeriod?new n(c.autoRenewPeriod.seconds):null,autoRenewAccountId:null!=c.autoRenewAccount?o._fromProtobuf(c.autoRenewAccount):null,customFees:null!=c.customFees?c.customFees.map(e=>m._fromProtobuf(e)):null,ledgerId:null!=c.ledgerId?r.fromBytes(c.ledgerId):null})}_toProtobuf(){return{topicID:this.topicId._toProtobuf(),topicInfo:{memo:this.topicMemo,runningHash:this.runningHash,sequenceNumber:this.sequenceNumber,expirationTime:null!=this.expirationTime?this.expirationTime._toProtobuf():null,adminKey:null!=this.adminKey?this.adminKey._toProtobufKey():null,submitKey:null!=this.submitKey?this.submitKey._toProtobufKey():null,feeScheduleKey:null!=this.feeScheduleKey?this.feeScheduleKey._toProtobufKey():null,feeExemptKeyList:null!=this.feeExemptKeys?this.feeExemptKeys.map(e=>e._toProtobufKey()):null,autoRenewPeriod:null!=this.autoRenewPeriod?this.autoRenewPeriod._toProtobuf():null,autoRenewAccount:null!=this.autoRenewAccountId?this.autoRenewAccountId._toProtobuf():null,customFees:null!=this.customFees?this.customFees.map(e=>e._toProtobuf()):null}}}static fromBytes(e){return l._fromProtobuf(i.proto.ConsensusGetTopicInfoResponse.decode(e))}toBytes(){return i.proto.ConsensusGetTopicInfoResponse.encode(this._toProtobuf()).finish()}}export{l as default};
|
|
2
2
|
//# sourceMappingURL=TopicInfo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopicInfo.js","sources":["../../src/topic/TopicInfo.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport TopicId from \"./TopicId.js\";\nimport AccountId from \"../account/AccountId.js\";\nimport Timestamp from \"../Timestamp.js\";\nimport Long from \"long\";\nimport Duration from \"../Duration.js\";\nimport * as HieroProto from \"@hashgraph/proto\";\nimport Key from \"../Key.js\";\nimport LedgerId from \"../LedgerId.js\";\nimport CustomFixedFee from \"../token/CustomFixedFee.js\";\n\n/**\n * Current state of a topic.\n */\nexport default class TopicInfo {\n /**\n * @private\n * @param {object} props\n * @param {TopicId} props.topicId\n * @param {string} props.topicMemo\n * @param {Uint8Array} props.runningHash\n * @param {Long} props.sequenceNumber\n * @param {?Timestamp} props.expirationTime\n * @param {?Key} props.adminKey\n * @param {?Key} props.submitKey\n * @param {?Key} props.feeScheduleKey\n * @param {?Key[]} props.feeExemptKeys\n * @param {?Duration} props.autoRenewPeriod\n * @param {?AccountId} props.autoRenewAccountId\n * @param {?CustomFixedFee[]} props.customFees\n * @param {LedgerId|null} props.ledgerId\n */\n constructor(props) {\n /**\n * The ID of the topic for which information is requested.\n *\n * @readonly\n */\n this.topicId = props.topicId;\n\n /**\n * Short publicly visible memo about the topic. No guarantee of uniqueness.\n *\n * @readonly\n */\n this.topicMemo = props.topicMemo;\n\n /**\n * SHA-384 running hash of (previousRunningHash, topicId, consensusTimestamp, sequenceNumber, message).\n *\n * @readonly\n */\n this.runningHash = props.runningHash;\n\n /**\n * Sequence number (starting at 1 for the first submitMessage) of messages on the topic.\n *\n * @readonly\n */\n this.sequenceNumber = props.sequenceNumber;\n\n /**\n * Effective consensus timestamp at (and after) which submitMessage calls will no longer succeed on the topic.\n *\n * @readonly\n */\n this.expirationTime = props.expirationTime;\n\n /**\n * Access control for update/delete of the topic. Null if there is no key.\n *\n * @readonly\n */\n this.adminKey = props.adminKey;\n\n /**\n * Access control for ConsensusService.submitMessage. Null if there is no key.\n *\n * @readonly\n */\n this.submitKey = props.submitKey;\n\n /**\n * Access control for updating topic fees. Null If there is no key.\n *\n * @readonly\n */\n this.feeScheduleKey = props.feeScheduleKey;\n\n /**\n * The keys that will are exempt from paying fees.\n * @readonly\n */\n this.feeExemptKeys = props.feeExemptKeys;\n /**\n * @readonly\n */\n this.autoRenewPeriod = props.autoRenewPeriod;\n\n /**\n * @readonly\n */\n this.autoRenewAccountId = props.autoRenewAccountId;\n\n /**\n * The fixed fees assessed when a message is submitted to the topic.\n * @readonly\n */\n this.customFees = props.customFees;\n\n this.ledgerId = props.ledgerId;\n\n Object.freeze(this);\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.IConsensusGetTopicInfoResponse} infoResponse\n * @returns {TopicInfo}\n */\n static _fromProtobuf(infoResponse) {\n const info = /** @type {HieroProto.proto.IConsensusTopicInfo} */ (\n infoResponse.topicInfo\n );\n\n return new TopicInfo({\n topicId: TopicId._fromProtobuf(\n /** @type {HieroProto.proto.ITopicID} */ (infoResponse.topicID),\n ),\n topicMemo: info.memo != null ? info.memo : \"\",\n runningHash:\n info.runningHash != null ? info.runningHash : new Uint8Array(),\n sequenceNumber:\n info.sequenceNumber != null\n ? info.sequenceNumber instanceof Long\n ? info.sequenceNumber\n : Long.fromValue(info.sequenceNumber)\n : Long.ZERO,\n expirationTime:\n info.expirationTime != null\n ? Timestamp._fromProtobuf(info.expirationTime)\n : null,\n adminKey:\n info.adminKey != null\n ? Key._fromProtobufKey(info.adminKey)\n : null,\n submitKey:\n info.submitKey != null\n ? Key._fromProtobufKey(info.submitKey)\n : null,\n feeScheduleKey:\n info.feeScheduleKey != null\n ? Key._fromProtobufKey(info.feeScheduleKey)\n : null,\n feeExemptKeys:\n info.feeExemptKeyList != null\n ? info.feeExemptKeyList.map((key) =>\n Key._fromProtobufKey(key),\n )\n : null,\n autoRenewPeriod:\n info.autoRenewPeriod != null\n ? new Duration(\n /** @type {Long} */ (info.autoRenewPeriod.seconds),\n )\n : null,\n autoRenewAccountId:\n info.autoRenewAccount != null\n ? AccountId._fromProtobuf(info.autoRenewAccount)\n : null,\n customFees:\n info.customFees != null\n ? info.customFees.map((customFee) =>\n CustomFixedFee._fromProtobuf(customFee),\n )\n : null,\n ledgerId:\n info.ledgerId != null\n ? LedgerId.fromBytes(info.ledgerId)\n : null,\n });\n }\n\n /**\n * @internal\n * @returns {HieroProto.proto.IConsensusGetTopicInfoResponse}\n */\n _toProtobuf() {\n return {\n topicID: this.topicId._toProtobuf(),\n topicInfo: {\n memo: this.topicMemo,\n runningHash: this.runningHash,\n sequenceNumber: this.sequenceNumber,\n expirationTime:\n this.expirationTime != null\n ? this.expirationTime._toProtobuf()\n : null,\n adminKey:\n this.adminKey != null\n ? this.adminKey._toProtobufKey()\n : null,\n submitKey:\n this.submitKey != null\n ? this.submitKey._toProtobufKey()\n : null,\n feeScheduleKey:\n this.feeScheduleKey != null\n ? this.feeScheduleKey._toProtobufKey()\n : null,\n feeExemptKeyList:\n this.feeExemptKeys != null\n ? this.feeExemptKeys.map((key) => key._toProtobufKey())\n : null,\n autoRenewPeriod:\n this.autoRenewPeriod != null\n ? this.autoRenewPeriod._toProtobuf()\n : null,\n autoRenewAccount:\n this.autoRenewAccountId != null\n ? this.autoRenewAccountId._toProtobuf()\n : null,\n customFees:\n this.customFees != null\n ? this.customFees.map((customFee) =>\n customFee._toProtobuf(),\n )\n : null,\n },\n };\n }\n\n /**\n * @param {Uint8Array} bytes\n * @returns {TopicInfo}\n */\n static fromBytes(bytes) {\n return TopicInfo._fromProtobuf(\n HieroProto.proto.ConsensusGetTopicInfoResponse.decode(bytes),\n );\n }\n\n /**\n * @returns {Uint8Array}\n */\n toBytes() {\n return HieroProto.proto.ConsensusGetTopicInfoResponse.encode(\n /** @type {HieroProto.proto.ConsensusGetTopicInfoResponse} */ (\n this._toProtobuf()\n ),\n ).finish();\n }\n}\n"],"names":["TopicInfo","constructor","props","this","topicId","topicMemo","runningHash","sequenceNumber","expirationTime","adminKey","submitKey","feeScheduleKey","feeExemptKeys","autoRenewPeriod","autoRenewAccountId","customFees","ledgerId","Object","freeze","_fromProtobuf","infoResponse","info","TopicId","memo","Uint8Array","Long","fromValue","ZERO","Timestamp","Key","_fromProtobufKey","feeExemptKeyList","map","key","Duration","autoRenewAccount","AccountId","customFee","CustomFixedFee","LedgerId","fromBytes","_toProtobuf","topicID","topicInfo","_toProtobufKey","bytes","HieroProto","proto","ConsensusGetTopicInfoResponse","decode","toBytes","encode","finish"],"mappings":"wRAee,MAAMA,EAkBjB,WAAAC,CAAYC,GAMRC,KAAKC,QAAUF,EAAME,QAOrBD,KA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,kBAC7B,KACVpB,WACuB,MAAnBM,EAAKN,WACCM,EAAKN,WAAWiB,IAAKK,GACjBC,EAAenB,cAAckB,IAEjC,KACVrB,SACqB,MAAjBK,EAAKL,SACCuB,EAASC,UAAUnB,EAAKL,UACxB,MAEtB,CAMI,WAAAyB,GACI,MAAO,CACHC,QAASvC,KAAKC,QAAQqC,cACtBE,UAAW,CACPpB,KAAMpB,KAAKE,UACXC,YAAaH,KAAKG,YAClBC,eAAgBJ,KAAKI,eACrBC,eAC2B,MAAvBL,KAAKK,eACCL,KAAKK,eAAeiC,cACpB,KACVhC,SACqB,MAAjBN,KAAKM,SACCN,KAAKM,SAASmC,iBACd,KACVlC,UACsB,MAAlBP,KAAKO,UACCP,KAAKO,UAAUkC,iBACf,KACVjC,eAC2B,MAAvBR,KAAKQ,eACCR,KAAKQ,eAAeiC,iBACpB,KACVb,iBAC0B,MAAtB5B,KAAKS,cACCT,KAAKS,cAAcoB,IAAKC,GAAQA,EAAIW,kBACpC,KACV/B,gBAC4B,MAAxBV,KAAKU,gBACCV,KAAKU,gBAAgB4B,cACrB,KACVN,iBAC+B,MAA3BhC,KAAKW,mBACCX,KAAKW,mBAAmB2B,cACxB,KACV1B,WACuB,MAAnBZ,KAAKY,WACCZ,KAAKY,WAAWiB,IAAKK,GACjBA,EAAUI,eAEd,MAG1B,CAMI,gBAAOD,CAAUK,GACb,OAAO7C,EAAUmB,cACb2B,EAAWC,MAAMC,8BAA8BC,OAAOJ,GAElE,CAKI,OAAAK,GACI,OAAOJ,EAAWC,MAAMC,8BAA8BG,OAE9ChD,KAAKsC,eAEXW,QACV"}
|
|
1
|
+
{"version":3,"file":"TopicInfo.js","sources":["../../src/topic/TopicInfo.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport TopicId from \"./TopicId.js\";\nimport AccountId from \"../account/AccountId.js\";\nimport Timestamp from \"../Timestamp.js\";\nimport Long from \"long\";\nimport Duration from \"../Duration.js\";\nimport * as HieroProto from \"@hiero-ledger/proto\";\nimport Key from \"../Key.js\";\nimport LedgerId from \"../LedgerId.js\";\nimport CustomFixedFee from \"../token/CustomFixedFee.js\";\n\n/**\n * Current state of a topic.\n */\nexport default class TopicInfo {\n /**\n * @private\n * @param {object} props\n * @param {TopicId} props.topicId\n * @param {string} props.topicMemo\n * @param {Uint8Array} props.runningHash\n * @param {Long} props.sequenceNumber\n * @param {?Timestamp} props.expirationTime\n * @param {?Key} props.adminKey\n * @param {?Key} props.submitKey\n * @param {?Key} props.feeScheduleKey\n * @param {?Key[]} props.feeExemptKeys\n * @param {?Duration} props.autoRenewPeriod\n * @param {?AccountId} props.autoRenewAccountId\n * @param {?CustomFixedFee[]} props.customFees\n * @param {LedgerId|null} props.ledgerId\n */\n constructor(props) {\n /**\n * The ID of the topic for which information is requested.\n *\n * @readonly\n */\n this.topicId = props.topicId;\n\n /**\n * Short publicly visible memo about the topic. No guarantee of uniqueness.\n *\n * @readonly\n */\n this.topicMemo = props.topicMemo;\n\n /**\n * SHA-384 running hash of (previousRunningHash, topicId, consensusTimestamp, sequenceNumber, message).\n *\n * @readonly\n */\n this.runningHash = props.runningHash;\n\n /**\n * Sequence number (starting at 1 for the first submitMessage) of messages on the topic.\n *\n * @readonly\n */\n this.sequenceNumber = props.sequenceNumber;\n\n /**\n * Effective consensus timestamp at (and after) which submitMessage calls will no longer succeed on the topic.\n *\n * @readonly\n */\n this.expirationTime = props.expirationTime;\n\n /**\n * Access control for update/delete of the topic. Null if there is no key.\n *\n * @readonly\n */\n this.adminKey = props.adminKey;\n\n /**\n * Access control for ConsensusService.submitMessage. Null if there is no key.\n *\n * @readonly\n */\n this.submitKey = props.submitKey;\n\n /**\n * Access control for updating topic fees. Null If there is no key.\n *\n * @readonly\n */\n this.feeScheduleKey = props.feeScheduleKey;\n\n /**\n * The keys that will are exempt from paying fees.\n * @readonly\n */\n this.feeExemptKeys = props.feeExemptKeys;\n /**\n * @readonly\n */\n this.autoRenewPeriod = props.autoRenewPeriod;\n\n /**\n * @readonly\n */\n this.autoRenewAccountId = props.autoRenewAccountId;\n\n /**\n * The fixed fees assessed when a message is submitted to the topic.\n * @readonly\n */\n this.customFees = props.customFees;\n\n this.ledgerId = props.ledgerId;\n\n Object.freeze(this);\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.IConsensusGetTopicInfoResponse} infoResponse\n * @returns {TopicInfo}\n */\n static _fromProtobuf(infoResponse) {\n const info = /** @type {HieroProto.proto.IConsensusTopicInfo} */ (\n infoResponse.topicInfo\n );\n\n return new TopicInfo({\n topicId: TopicId._fromProtobuf(\n /** @type {HieroProto.proto.ITopicID} */ (infoResponse.topicID),\n ),\n topicMemo: info.memo != null ? info.memo : \"\",\n runningHash:\n info.runningHash != null ? info.runningHash : new Uint8Array(),\n sequenceNumber:\n info.sequenceNumber != null\n ? info.sequenceNumber instanceof Long\n ? info.sequenceNumber\n : Long.fromValue(info.sequenceNumber)\n : Long.ZERO,\n expirationTime:\n info.expirationTime != null\n ? Timestamp._fromProtobuf(info.expirationTime)\n : null,\n adminKey:\n info.adminKey != null\n ? Key._fromProtobufKey(info.adminKey)\n : null,\n submitKey:\n info.submitKey != null\n ? Key._fromProtobufKey(info.submitKey)\n : null,\n feeScheduleKey:\n info.feeScheduleKey != null\n ? Key._fromProtobufKey(info.feeScheduleKey)\n : null,\n feeExemptKeys:\n info.feeExemptKeyList != null\n ? info.feeExemptKeyList.map((key) =>\n Key._fromProtobufKey(key),\n )\n : null,\n autoRenewPeriod:\n info.autoRenewPeriod != null\n ? new Duration(\n /** @type {Long} */ (info.autoRenewPeriod.seconds),\n )\n : null,\n autoRenewAccountId:\n info.autoRenewAccount != null\n ? AccountId._fromProtobuf(info.autoRenewAccount)\n : null,\n customFees:\n info.customFees != null\n ? info.customFees.map((customFee) =>\n CustomFixedFee._fromProtobuf(customFee),\n )\n : null,\n ledgerId:\n info.ledgerId != null\n ? LedgerId.fromBytes(info.ledgerId)\n : null,\n });\n }\n\n /**\n * @internal\n * @returns {HieroProto.proto.IConsensusGetTopicInfoResponse}\n */\n _toProtobuf() {\n return {\n topicID: this.topicId._toProtobuf(),\n topicInfo: {\n memo: this.topicMemo,\n runningHash: this.runningHash,\n sequenceNumber: this.sequenceNumber,\n expirationTime:\n this.expirationTime != null\n ? this.expirationTime._toProtobuf()\n : null,\n adminKey:\n this.adminKey != null\n ? this.adminKey._toProtobufKey()\n : null,\n submitKey:\n this.submitKey != null\n ? this.submitKey._toProtobufKey()\n : null,\n feeScheduleKey:\n this.feeScheduleKey != null\n ? this.feeScheduleKey._toProtobufKey()\n : null,\n feeExemptKeyList:\n this.feeExemptKeys != null\n ? this.feeExemptKeys.map((key) => key._toProtobufKey())\n : null,\n autoRenewPeriod:\n this.autoRenewPeriod != null\n ? this.autoRenewPeriod._toProtobuf()\n : null,\n autoRenewAccount:\n this.autoRenewAccountId != null\n ? this.autoRenewAccountId._toProtobuf()\n : null,\n customFees:\n this.customFees != null\n ? this.customFees.map((customFee) =>\n customFee._toProtobuf(),\n )\n : null,\n },\n };\n }\n\n /**\n * @param {Uint8Array} bytes\n * @returns {TopicInfo}\n */\n static fromBytes(bytes) {\n return TopicInfo._fromProtobuf(\n HieroProto.proto.ConsensusGetTopicInfoResponse.decode(bytes),\n );\n }\n\n /**\n * @returns {Uint8Array}\n */\n toBytes() {\n return HieroProto.proto.ConsensusGetTopicInfoResponse.encode(\n /** @type {HieroProto.proto.ConsensusGetTopicInfoResponse} */ (\n this._toProtobuf()\n ),\n ).finish();\n }\n}\n"],"names":["TopicInfo","constructor","props","this","topicId","topicMemo","runningHash","sequenceNumber","expirationTime","adminKey","submitKey","feeScheduleKey","feeExemptKeys","autoRenewPeriod","autoRenewAccountId","customFees","ledgerId","Object","freeze","_fromProtobuf","infoResponse","info","TopicId","memo","Uint8Array","Long","fromValue","ZERO","Timestamp","Key","_fromProtobufKey","feeExemptKeyList","map","key","Duration","autoRenewAccount","AccountId","customFee","CustomFixedFee","LedgerId","fromBytes","_toProtobuf","topicID","topicInfo","_toProt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IAEzB,KACVpB,gBAC4B,MAAxBQ,EAAKR,gBACC,IAAIqB,EACqBb,EAAKR,gBAAuB,SAErD,KACVC,mBAC6B,MAAzBO,EAAKc,iBACCC,EAAUjB,cAAcE,EAAKc,kBAC7B,KACVpB,WACuB,MAAnBM,EAAKN,WACCM,EAAKN,WAAWiB,IAAKK,GACjBC,EAAenB,cAAckB,IAEjC,KACVrB,SACqB,MAAjBK,EAAKL,SACCuB,EAASC,UAAUnB,EAAKL,UACxB,MAEtB,CAMI,WAAAyB,GACI,MAAO,CACHC,QAASvC,KAAKC,QAAQqC,cACtBE,UAAW,CACPpB,KAAMpB,KAAKE,UACXC,YAAaH,KAAKG,YAClBC,eAAgBJ,KAAKI,eACrBC,eAC2B,MAAvBL,KAAKK,eACCL,KAAKK,eAAeiC,cACpB,KACVhC,SACqB,MAAjBN,KAAKM,SACCN,KAAKM,SAASmC,iBACd,KACVlC,UACsB,MAAlBP,KAAKO,UACCP,KAAKO,UAAUkC,iBACf,KACVjC,eAC2B,MAAvBR,KAAKQ,eACCR,KAAKQ,eAAeiC,iBACpB,KACVb,iBAC0B,MAAtB5B,KAAKS,cACCT,KAAKS,cAAcoB,IAAKC,GAAQA,EAAIW,kBACpC,KACV/B,gBAC4B,MAAxBV,KAAKU,gBACCV,KAAKU,gBAAgB4B,cACrB,KACVN,iBAC+B,MAA3BhC,KAAKW,mBACCX,KAAKW,mBAAmB2B,cACxB,KACV1B,WACuB,MAAnBZ,KAAKY,WACCZ,KAAKY,WAAWiB,IAAKK,GACjBA,EAAUI,eAEd,MAG1B,CAMI,gBAAOD,CAAUK,GACb,OAAO7C,EAAUmB,cACb2B,EAAWC,MAAMC,8BAA8BC,OAAOJ,GAElE,CAKI,OAAAK,GACI,OAAOJ,EAAWC,MAAMC,8BAA8BG,OAE9ChD,KAAKsC,eAEXW,QACV"}
|
|
@@ -16,17 +16,17 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* @namespace proto
|
|
19
|
-
* @typedef {import("@
|
|
20
|
-
* @typedef {import("@
|
|
21
|
-
* @typedef {import("@
|
|
22
|
-
* @typedef {import("@
|
|
23
|
-
* @typedef {import("@
|
|
24
|
-
* @typedef {import("@
|
|
19
|
+
* @typedef {import("@hiero-ledger/proto").proto.IQuery} HieroProto.proto.IQuery
|
|
20
|
+
* @typedef {import("@hiero-ledger/proto").proto.IQueryHeader} HieroProto.proto.IQueryHeader
|
|
21
|
+
* @typedef {import("@hiero-ledger/proto").proto.IResponse} HieroProto.proto.IResponse
|
|
22
|
+
* @typedef {import("@hiero-ledger/proto").proto.IResponseHeader} HieroProto.proto.IResponseHeader
|
|
23
|
+
* @typedef {import("@hiero-ledger/proto").proto.IConsensusGetTopicInfoResponse} HieroProto.proto.IConsensusGetTopicInfoResponse
|
|
24
|
+
* @typedef {import("@hiero-ledger/proto").proto.IConsensusGetTopicInfoQuery} HieroProto.proto.IConsensusGetTopicInfoQuery
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* @namespace com
|
|
29
|
-
* @typedef {import("@
|
|
29
|
+
* @typedef {import("@hiero-ledger/proto").com.hedera.mirror.api.proto.IConsensusTopicResponse} com.hedera.mirror.api.proto.IConsensusTopicResponse
|
|
30
30
|
*/
|
|
31
31
|
|
|
32
32
|
/**
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @namespace proto
|
|
3
|
-
* @typedef {import("@
|
|
4
|
-
* @typedef {import("@
|
|
5
|
-
* @typedef {import("@
|
|
6
|
-
* @typedef {import("@
|
|
7
|
-
* @typedef {import("@
|
|
8
|
-
* @typedef {import("@
|
|
3
|
+
* @typedef {import("@hiero-ledger/proto").proto.IQuery} HieroProto.proto.IQuery
|
|
4
|
+
* @typedef {import("@hiero-ledger/proto").proto.IQueryHeader} HieroProto.proto.IQueryHeader
|
|
5
|
+
* @typedef {import("@hiero-ledger/proto").proto.IResponse} HieroProto.proto.IResponse
|
|
6
|
+
* @typedef {import("@hiero-ledger/proto").proto.IResponseHeader} HieroProto.proto.IResponseHeader
|
|
7
|
+
* @typedef {import("@hiero-ledger/proto").proto.IConsensusGetTopicInfoResponse} HieroProto.proto.IConsensusGetTopicInfoResponse
|
|
8
|
+
* @typedef {import("@hiero-ledger/proto").proto.IConsensusGetTopicInfoQuery} HieroProto.proto.IConsensusGetTopicInfoQuery
|
|
9
9
|
*/
|
|
10
10
|
/**
|
|
11
11
|
* @namespace com
|
|
12
|
-
* @typedef {import("@
|
|
12
|
+
* @typedef {import("@hiero-ledger/proto").com.hedera.mirror.api.proto.IConsensusTopicResponse} com.hedera.mirror.api.proto.IConsensusTopicResponse
|
|
13
13
|
*/
|
|
14
14
|
/**
|
|
15
15
|
* @typedef {import("../channel/Channel.js").default} Channel
|
|
@@ -54,12 +54,12 @@ export default class TopicInfoQuery extends Query<TopicInfo> {
|
|
|
54
54
|
}
|
|
55
55
|
export namespace HieroProto {
|
|
56
56
|
namespace proto {
|
|
57
|
-
type IQuery = import("@
|
|
58
|
-
type IQueryHeader = import("@
|
|
59
|
-
type IResponse = import("@
|
|
60
|
-
type IResponseHeader = import("@
|
|
61
|
-
type IConsensusGetTopicInfoResponse = import("@
|
|
62
|
-
type IConsensusGetTopicInfoQuery = import("@
|
|
57
|
+
type IQuery = import("@hiero-ledger/proto").proto.IQuery;
|
|
58
|
+
type IQueryHeader = import("@hiero-ledger/proto").proto.IQueryHeader;
|
|
59
|
+
type IResponse = import("@hiero-ledger/proto").proto.IResponse;
|
|
60
|
+
type IResponseHeader = import("@hiero-ledger/proto").proto.IResponseHeader;
|
|
61
|
+
type IConsensusGetTopicInfoResponse = import("@hiero-ledger/proto").proto.IConsensusGetTopicInfoResponse;
|
|
62
|
+
type IConsensusGetTopicInfoQuery = import("@hiero-ledger/proto").proto.IConsensusGetTopicInfoQuery;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
export namespace com {
|
|
@@ -67,7 +67,7 @@ export namespace com {
|
|
|
67
67
|
namespace mirror {
|
|
68
68
|
namespace api {
|
|
69
69
|
namespace proto {
|
|
70
|
-
type IConsensusTopicResponse = import("@
|
|
70
|
+
type IConsensusTopicResponse = import("@hiero-ledger/proto").com.hedera.mirror.api.proto.IConsensusTopicResponse;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopicInfoQuery.js","sources":["../../src/topic/TopicInfoQuery.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Query, { QUERY_REGISTRY } from \"../query/Query.js\";\nimport TopicId from \"./TopicId.js\";\nimport TopicInfo from \"./TopicInfo.js\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport Hbar from \"../Hbar.js\";\n\n/**\n * @namespace proto\n * @typedef {import(\"@
|
|
1
|
+
{"version":3,"file":"TopicInfoQuery.js","sources":["../../src/topic/TopicInfoQuery.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Query, { QUERY_REGISTRY } from \"../query/Query.js\";\nimport TopicId from \"./TopicId.js\";\nimport TopicInfo from \"./TopicInfo.js\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport Hbar from \"../Hbar.js\";\n\n/**\n * @namespace proto\n * @typedef {import(\"@hiero-ledger/proto\").proto.IQuery} HieroProto.proto.IQuery\n * @typedef {import(\"@hiero-ledger/proto\").proto.IQueryHeader} HieroProto.proto.IQueryHeader\n * @typedef {import(\"@hiero-ledger/proto\").proto.IResponse} HieroProto.proto.IResponse\n * @typedef {import(\"@hiero-ledger/proto\").proto.IResponseHeader} HieroProto.proto.IResponseHeader\n * @typedef {import(\"@hiero-ledger/proto\").proto.IConsensusGetTopicInfoResponse} HieroProto.proto.IConsensusGetTopicInfoResponse\n * @typedef {import(\"@hiero-ledger/proto\").proto.IConsensusGetTopicInfoQuery} HieroProto.proto.IConsensusGetTopicInfoQuery\n */\n\n/**\n * @namespace com\n * @typedef {import(\"@hiero-ledger/proto\").com.hedera.mirror.api.proto.IConsensusTopicResponse} com.hedera.mirror.api.proto.IConsensusTopicResponse\n */\n\n/**\n * @typedef {import(\"../channel/Channel.js\").default} Channel\n * @typedef {import(\"../client/Client.js\").default<*, *>} Client\n * @typedef {import(\"../account/AccountId.js\").default} AccountId\n */\n\n/**\n * Retrieve the latest state of a topic.\n *\n * @augments {Query<TopicInfo>}\n */\nexport default class TopicInfoQuery extends Query {\n /**\n * @param {object} [props]\n * @param {TopicId | string} [props.topicId]\n */\n constructor(props = {}) {\n super();\n\n /**\n * @private\n * @type {?TopicId}\n */\n this._topicId = null;\n\n if (props.topicId != null) {\n this.setTopicId(props.topicId);\n }\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.IQuery} query\n * @returns {TopicInfoQuery}\n */\n static _fromProtobuf(query) {\n const info =\n /** @type {HieroProto.proto.IConsensusGetTopicInfoQuery} */ (\n query.consensusGetTopicInfo\n );\n\n return new TopicInfoQuery({\n topicId:\n info.topicID != null\n ? TopicId._fromProtobuf(info.topicID)\n : undefined,\n });\n }\n\n /**\n * @returns {?TopicId}\n */\n get topicId() {\n return this._topicId;\n }\n\n /**\n * Set the topic ID for which the info is being requested.\n *\n * @param {TopicId | string} topicId\n * @returns {TopicInfoQuery}\n */\n setTopicId(topicId) {\n this._topicId =\n typeof topicId === \"string\"\n ? TopicId.fromString(topicId)\n : topicId.clone();\n\n return this;\n }\n\n /**\n * @override\n * @param {import(\"../client/Client.js\").default<Channel, *>} client\n * @returns {Promise<Hbar>}\n */\n async getCost(client) {\n return super.getCost(client);\n }\n\n /**\n * @param {Client} client\n */\n _validateChecksums(client) {\n if (this._topicId != null) {\n this._topicId.validateChecksum(client);\n }\n }\n\n /**\n * @override\n * @internal\n * @param {Channel} channel\n * @param {HieroProto.proto.IQuery} request\n * @returns {Promise<HieroProto.proto.IResponse>}\n */\n _execute(channel, request) {\n return channel.consensus.getTopicInfo(request);\n }\n\n /**\n * @override\n * @internal\n * @param {HieroProto.proto.IResponse} response\n * @returns {HieroProto.proto.IResponseHeader}\n */\n _mapResponseHeader(response) {\n const consensusGetTopicInfo =\n /** @type {HieroProto.proto.IConsensusGetTopicInfoResponse} */ (\n response.consensusGetTopicInfo\n );\n return /** @type {HieroProto.proto.IResponseHeader} */ (\n consensusGetTopicInfo.header\n );\n }\n\n /**\n * @protected\n * @override\n * @param {HieroProto.proto.IResponse} response\n * @param {AccountId} nodeAccountId\n * @param {HieroProto.proto.IQuery} request\n * @returns {Promise<TopicInfo>}\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _mapResponse(response, nodeAccountId, request) {\n return Promise.resolve(\n TopicInfo._fromProtobuf(\n /** @type {HieroProto.proto.IConsensusGetTopicInfoResponse} */ (\n response.consensusGetTopicInfo\n ),\n ),\n );\n }\n\n /**\n * @override\n * @internal\n * @param {HieroProto.proto.IQueryHeader} header\n * @returns {HieroProto.proto.IQuery}\n */\n _onMakeRequest(header) {\n return {\n consensusGetTopicInfo: {\n header,\n topicID:\n this._topicId != null ? this._topicId._toProtobuf() : null,\n },\n };\n }\n\n /**\n * @returns {string}\n */\n _getLogId() {\n const timestamp =\n this._paymentTransactionId != null &&\n this._paymentTransactionId.validStart != null\n ? this._paymentTransactionId.validStart\n : this._timestamp;\n\n return `TopicInfoQuery:${timestamp.toString()}`;\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/unbound-method\nQUERY_REGISTRY.set(\"consensusGetTopicInfo\", TopicInfoQuery._fromProtobuf);\n"],"names":["TopicInfoQuery","Query","constructor","props","super","this","_topicId","topicId","setTopicId","_fromProtobuf","query","info","topicID","TopicId","undefined","fromString","clone","getCost","client","_validateChecksums","validateChecksum","_execute","channel","request","consensus","getTopicInfo","_mapResponseHeader","response","_mapResponse","nodeAccountId","Promise","resolve","TopicInfo","_onMakeRequest","header","consensusGetTopicInfo","_toProtobuf","_getLogId","_paymentTransactionId","validStart","_timestamp","toString","QUERY_REGISTRY","set"],"mappings":"yKAkCe,MAAMA,UAAuBC,EAKxC,WAAAC,CAAYC,EAAQ,IAChBC,QAMAC,KAAKC,SAAW,KAEK,MAAjBH,EAAMI,SACNF,KAAKG,WAAWL,EAAMI,QAElC,CAOI,oBAAOE,CAAcC,GACjB,MAAMC,EAEED,EACH,sBAEL,OAAO,IAAIV,EAAe,CACtBO,QACoB,MAAhBI,EAAKC,QACCC,EAAQJ,cAAcE,EAAKC,cAC3BE,GAEtB,CAKI,WAAIP,GACA,OAAOF,KAAKC,QACpB,CAQI,UAAAE,CAAWD,GAMP,OALAF,KAAKC,SACkB,iBAAZC,EACDM,EAAQE,WAAWR,GACnBA,EAAQS,QAEXX,IACf,CAOI,aAAMY,CAAQC,GACV,OAAOd,MAAMa,QAAQC,EAC7B,CAKI,kBAAAC,CAAmBD,GACM,MAAjBb,KAAKC,UACLD,KAAKC,SAASc,iBAAiBF,EAE3C,CASI,QAAAG,CAASC,EAASC,GACd,OAAOD,EAAQE,UAAUC,aAAaF,EAC9C,CAQI,kBAAAG,CAAmBC,GAKf,OAFQA,EACH,sBAGb,MACA,CAWI,YAAAC,CAAaD,EAAUE,EAAeN,GAClC,OAAOO,QAAQC,QACXC,EAAUvB,cAEFkB,EACpB,uBAGA,CAQI,cAAAM,CAAeC,GACX,MAAO,CACHC,sBAAuB,CACnBD,SACAtB,QACqB,MAAjBP,KAAKC,SAAmBD,KAAKC,SAAS8B,cAAgB,MAG1E,CAKI,SAAAC,GAOI,MAAO,mBAL2B,MAA9BhC,KAAKiC,uBACoC,MAAzCjC,KAAKiC,sBAAsBC,WACrBlC,KAAKiC,sBAAsBC,WAC3BlC,KAAKmC,YAEoBC,YAC3C,EAIAC,EAAeC,IAAI,wBAAyB3C,EAAeS"}
|
|
@@ -13,12 +13,12 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @namespace proto
|
|
16
|
-
* @typedef {import("@
|
|
16
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITimestamp} HieroProto.proto.ITimestamp
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* @namespace com
|
|
21
|
-
* @typedef {import("@
|
|
21
|
+
* @typedef {import("@hiero-ledger/proto").com.hedera.mirror.api.proto.IConsensusTopicResponse} com.hedera.mirror.api.proto.IConsensusTopicResponse
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
class TopicMessage {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @namespace proto
|
|
3
|
-
* @typedef {import("@
|
|
3
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITimestamp} HieroProto.proto.ITimestamp
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @namespace com
|
|
7
|
-
* @typedef {import("@
|
|
7
|
+
* @typedef {import("@hiero-ledger/proto").com.hedera.mirror.api.proto.IConsensusTopicResponse} com.hedera.mirror.api.proto.IConsensusTopicResponse
|
|
8
8
|
*/
|
|
9
9
|
export default class TopicMessage {
|
|
10
10
|
/**
|
|
@@ -45,7 +45,7 @@ export default class TopicMessage {
|
|
|
45
45
|
}
|
|
46
46
|
export namespace HieroProto {
|
|
47
47
|
namespace proto {
|
|
48
|
-
type ITimestamp = import("@
|
|
48
|
+
type ITimestamp = import("@hiero-ledger/proto").proto.ITimestamp;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
export namespace com {
|
|
@@ -53,7 +53,7 @@ export namespace com {
|
|
|
53
53
|
namespace mirror {
|
|
54
54
|
namespace api {
|
|
55
55
|
namespace proto {
|
|
56
|
-
type IConsensusTopicResponse = import("@
|
|
56
|
+
type IConsensusTopicResponse = import("@hiero-ledger/proto").com.hedera.mirror.api.proto.IConsensusTopicResponse;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopicMessage.js","sources":["../../src/topic/TopicMessage.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Timestamp from \"../Timestamp.js\";\nimport TopicMessageChunk from \"./TopicMessageChunk.js\";\nimport Long from \"long\";\nimport TransactionId from \"../transaction/TransactionId.js\";\n\n/**\n * @namespace proto\n * @typedef {import(\"@
|
|
1
|
+
{"version":3,"file":"TopicMessage.js","sources":["../../src/topic/TopicMessage.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Timestamp from \"../Timestamp.js\";\nimport TopicMessageChunk from \"./TopicMessageChunk.js\";\nimport Long from \"long\";\nimport TransactionId from \"../transaction/TransactionId.js\";\n\n/**\n * @namespace proto\n * @typedef {import(\"@hiero-ledger/proto\").proto.ITimestamp} HieroProto.proto.ITimestamp\n */\n\n/**\n * @namespace com\n * @typedef {import(\"@hiero-ledger/proto\").com.hedera.mirror.api.proto.IConsensusTopicResponse} com.hedera.mirror.api.proto.IConsensusTopicResponse\n */\n\nexport default class TopicMessage {\n /**\n * @private\n * @param {object} props\n * @param {Timestamp} props.consensusTimestamp\n * @param {Uint8Array} props.contents\n * @param {Uint8Array} props.runningHash\n * @param {Long} props.sequenceNumber\n * @param {?TransactionId} props.initialTransactionId\n * @param {TopicMessageChunk[]} props.chunks\n */\n constructor(props) {\n /** @readonly */\n this.consensusTimestamp = props.consensusTimestamp;\n /** @readonly */\n this.contents = props.contents;\n /** @readonly */\n this.runningHash = props.runningHash;\n /** @readonly */\n this.sequenceNumber = props.sequenceNumber;\n /** @readonly */\n this.chunks = props.chunks;\n /** @readonly */\n this.initialTransactionId = props.initialTransactionId;\n\n Object.freeze(this);\n }\n\n /**\n * @internal\n * @param {com.hedera.mirror.api.proto.IConsensusTopicResponse} response\n * @returns {TopicMessage}\n */\n static _ofSingle(response) {\n return new TopicMessage({\n consensusTimestamp: Timestamp._fromProtobuf(\n /** @type {HieroProto.proto.ITimestamp} */\n (response.consensusTimestamp),\n ),\n contents:\n response.message != null ? response.message : new Uint8Array(),\n runningHash:\n response.runningHash != null\n ? response.runningHash\n : new Uint8Array(),\n sequenceNumber:\n response.sequenceNumber != null\n ? response.sequenceNumber instanceof Long\n ? response.sequenceNumber\n : Long.fromNumber(response.sequenceNumber)\n : Long.ZERO,\n initialTransactionId:\n response.chunkInfo != null &&\n response.chunkInfo.initialTransactionID != null\n ? TransactionId._fromProtobuf(\n response.chunkInfo.initialTransactionID,\n )\n : null,\n chunks: [TopicMessageChunk._fromProtobuf(response)],\n });\n }\n\n /**\n * @internal\n * @param {com.hedera.mirror.api.proto.IConsensusTopicResponse[]} responses\n * @returns {TopicMessage}\n */\n static _ofMany(responses) {\n const length = responses.length;\n\n const last =\n /** @type {com.hedera.mirror.api.proto.IConsensusTopicResponse} */ (\n responses[length - 1]\n );\n\n const consensusTimestamp = Timestamp._fromProtobuf(\n /** @type {HieroProto.proto.ITimestamp} */\n (last.consensusTimestamp),\n );\n\n const runningHash = /** @type {Uint8Array} */ (last.runningHash);\n\n /**\n * @type {Long}\n */\n const sequenceNumber =\n last.sequenceNumber != null\n ? last.sequenceNumber instanceof Long\n ? last.sequenceNumber\n : Long.fromValue(last.sequenceNumber)\n : Long.ZERO;\n\n responses.sort((a, b) =>\n (a != null\n ? a.chunkInfo != null\n ? a.chunkInfo.number != null\n ? a.chunkInfo.number\n : 0\n : 0\n : 0) <\n (b != null\n ? b.chunkInfo != null\n ? b.chunkInfo.number != null\n ? b.chunkInfo.number\n : 0\n : 0\n : 0)\n ? -1\n : 1,\n );\n\n /**\n * @type {TopicMessageChunk[]}\n */\n const chunks = responses.map(\n /**\n * @type {com.hedera.mirror.api.proto.IConsensusTopicResponse}\n */ (m) => TopicMessageChunk._fromProtobuf(m),\n );\n\n const size = chunks\n .map((chunk) => chunk.contents.length)\n .reduce((sum, current) => sum + current, 0);\n\n const contents = new Uint8Array(size);\n let offset = 0;\n\n responses.forEach((value) => {\n contents.set(/** @type {Uint8Array} */ (value.message), offset);\n offset += /** @type {Uint8Array} */ (value.message).length;\n });\n\n let initialTransactionId = null;\n if (\n responses.length > 0 &&\n responses[0].chunkInfo != null &&\n responses[0].chunkInfo.initialTransactionID != null\n ) {\n initialTransactionId = TransactionId._fromProtobuf(\n responses[0].chunkInfo.initialTransactionID,\n );\n }\n\n return new TopicMessage({\n consensusTimestamp,\n contents,\n runningHash,\n sequenceNumber,\n chunks,\n initialTransactionId,\n });\n }\n}\n"],"names":["TopicMessage","constructor","props","this","consensusTimestamp","contents","runningHash","sequenceNumber","chunks","initialTransactionId","Object","freeze","_ofSingle","response","Timestamp","_fromProtobuf","message","Uint8Array","Long","fromNumber","ZERO","chunkInfo","initialTransactionID","TransactionId","TopicMessageChunk","_ofMany","responses","last","length","fromValue","sort","a","b","number","map","m","size","chunk","reduce","sum","current","offset","forEach","value","set"],"mappings":"wIAiBe,MAAMA,EAWjB,WAAAC,CAAYC,GAERC,KAAKC,mBAAqBF,EAAME,mBAEhCD,KAAKE,SAAWH,EAAMG,SAEtBF,KAAKG,YAAcJ,EAAMI,YAEzBH,KAAKI,eAAiBL,EAAMK,eAE5BJ,KAAKK,OAASN,EAAMM,OAEpBL,KAAKM,qBAAuBP,EAAMO,qBAElCC,OAAOC,OAAOR,KACtB,CAOI,gBAAOS,CAAUC,GACb,OAAO,IAAIb,EAAa,CACpBI,mBAAoBU,EAAUC,cAEzBF,EAA2B,oBAEhCR,SACwB,MAApBQ,EAASG,QAAkBH,EAASG,QAAU,IAAIC,WACtDX,YAC4B,MAAxBO,EAASP,YACHO,EAASP,YACT,IAAIW,WACdV,eAC+B,MAA3BM,EAASN,eACHM,EAASN,0BAA0BW,EAC/BL,EAASN,eACTW,EAAKC,WAAWN,EAASN,gBAC7BW,EAAKE,KACfX,qBAC0B,MAAtBI,EAASQ,WACkC,MAA3CR,EAASQ,UAAUC,qBACbC,EAAcR,cACVF,EAASQ,UAAUC,sBAEvB,KACVd,OAAQ,CAACgB,EAAkBT,cAAcF,KAErD,CAOI,cAAOY,CAAQC,GACX,MAEMC,EAE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