@hiero-ledger/sdk 2.76.0 → 2.78.0-beta.1
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 +1017 -673
- package/dist/umd.min.js +14 -14
- 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/Executable.cjs +13 -3
- package/lib/Executable.js +1 -1
- package/lib/Executable.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 +26 -2
- package/lib/channel/Channel.d.ts +21 -1
- package/lib/channel/Channel.js +1 -1
- package/lib/channel/Channel.js.map +1 -1
- package/lib/channel/NativeChannel.cjs +96 -2
- package/lib/channel/NativeChannel.d.ts +21 -1
- package/lib/channel/NativeChannel.js +1 -1
- package/lib/channel/NativeChannel.js.map +1 -1
- package/lib/channel/NodeChannel.cjs +4 -5
- package/lib/channel/NodeChannel.d.ts +2 -3
- package/lib/channel/NodeChannel.js +1 -1
- package/lib/channel/NodeChannel.js.map +1 -1
- package/lib/channel/WebChannel.cjs +163 -13
- package/lib/channel/WebChannel.d.ts +51 -1
- package/lib/channel/WebChannel.js +1 -1
- package/lib/channel/WebChannel.js.map +1 -1
- package/lib/client/Client.cjs +62 -5
- package/lib/client/Client.d.ts +26 -3
- package/lib/client/Client.js +1 -1
- package/lib/client/Client.js.map +1 -1
- package/lib/client/NativeClient.cjs +1 -1
- package/lib/client/NativeClient.js +1 -1
- package/lib/client/NativeClient.js.map +1 -1
- package/lib/client/NodeClient.cjs +7 -6
- package/lib/client/NodeClient.d.ts +3 -3
- package/lib/client/NodeClient.js +1 -1
- package/lib/client/NodeClient.js.map +1 -1
- package/lib/client/WebClient.cjs +55 -27
- package/lib/client/WebClient.d.ts +6 -0
- package/lib/client/WebClient.js +1 -1
- package/lib/client/WebClient.js.map +1 -1
- package/lib/client/addressbooks/mainnet.cjs +1 -1
- package/lib/client/addressbooks/mainnet.d.ts +1 -1
- package/lib/client/addressbooks/mainnet.js +1 -1
- package/lib/client/addressbooks/mainnet.js.map +1 -1
- package/lib/client/addressbooks/previewnet.cjs +1 -1
- package/lib/client/addressbooks/previewnet.d.ts +1 -1
- package/lib/client/addressbooks/previewnet.js +1 -1
- package/lib/client/addressbooks/previewnet.js.map +1 -1
- package/lib/client/addressbooks/testnet.cjs +1 -1
- package/lib/client/addressbooks/testnet.d.ts +1 -1
- package/lib/client/addressbooks/testnet.js +1 -1
- package/lib/client/addressbooks/testnet.js.map +1 -1
- package/lib/constants/ClientConstants.cjs +17 -1
- package/lib/constants/ClientConstants.d.ts +14 -0
- package/lib/constants/ClientConstants.js +1 -1
- package/lib/constants/ClientConstants.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 -5
- package/lib/network/AddressBookQuery.js +1 -1
- package/lib/network/AddressBookQuery.js.map +1 -1
- package/lib/network/AddressBookQueryWeb.cjs +1 -5
- package/lib/network/AddressBookQueryWeb.js +1 -1
- package/lib/network/AddressBookQueryWeb.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 +6 -8
- 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/Executable.js +18 -2
- 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 +26 -2
- package/src/channel/NativeChannel.js +111 -2
- package/src/channel/NodeChannel.js +4 -7
- package/src/channel/WebChannel.js +189 -21
- package/src/client/Client.js +79 -5
- package/src/client/NativeClient.js +1 -1
- package/src/client/NodeClient.js +7 -6
- package/src/client/WebClient.js +64 -31
- package/src/client/addressbooks/mainnet.js +1 -1
- package/src/client/addressbooks/previewnet.js +1 -1
- package/src/client/addressbooks/testnet.js +1 -1
- package/src/constants/ClientConstants.js +16 -0
- 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 -8
- package/src/network/AddressBookQueryWeb.js +1 -8
- 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
|
@@ -7,7 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
var _Query = _interopRequireDefault(require("../query/Query.cjs"));
|
|
8
8
|
var _NodeAddress = _interopRequireDefault(require("../address_book/NodeAddress.cjs"));
|
|
9
9
|
var _NodeAddressBook = _interopRequireDefault(require("../address_book/NodeAddressBook.cjs"));
|
|
10
|
-
var HieroProto = _interopRequireWildcard(require("@
|
|
10
|
+
var HieroProto = _interopRequireWildcard(require("@hiero-ledger/proto"));
|
|
11
11
|
var _FileId = _interopRequireDefault(require("../file/FileId.cjs"));
|
|
12
12
|
var _Executable = require("../Executable.cjs");
|
|
13
13
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
@@ -164,10 +164,6 @@ class AddressBookQuery extends _Query.default {
|
|
|
164
164
|
* @returns {Promise<NodeAddressBook>}
|
|
165
165
|
*/
|
|
166
166
|
execute(client, requestTimeout) {
|
|
167
|
-
// Extra validation when initializing the client with only a mirror network
|
|
168
|
-
if (client._network._network.size === 0 && !client._timer) {
|
|
169
|
-
throw new Error("The client's network update period is required. Please set it using the setNetworkUpdatePeriod method.");
|
|
170
|
-
}
|
|
171
167
|
return new Promise((resolve, reject) => {
|
|
172
168
|
this._makeServerStreamRequest(client, /** @type {(value: NodeAddressBook) => void} */resolve, reject, requestTimeout);
|
|
173
169
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import t from"../query/Query.js";import e from"../address_book/NodeAddress.js";import
|
|
1
|
+
import t from"../query/Query.js";import e from"../address_book/NodeAddress.js";import i from"../address_book/NodeAddressBook.js";import*as r from"@hiero-ledger/proto";import s from"../file/FileId.js";import{RST_STREAM as o}from"../Executable.js";class m extends t{constructor(t={}){super(),this._fileId=null,null!=t.fileId&&this.setFileId(t.fileId),this._limit=null,null!=t.limit&&this.setLimit(t.limit),this._retryHandler=t=>{if(null!=t){if(t instanceof Error)return!0;switch(t.code){case 13:return o.test(t.details.toString());case 5:case 8:case 14:case 17:return!0;default:return!1}}return!1},this._addresses=[],this._attempt=0}get fileId(){return this._fileId}setFileId(t){return this._fileId="string"==typeof t?s.fromString(t):t.clone(),this}get limit(){return this._limit}setLimit(t){return this._limit=t,this}setMaxAttempts(t){return this._maxAttempts=t,this}setMaxBackoff(t){return this._maxBackoff=t,this}execute(t,e){return new Promise((i,r)=>{this._makeServerStreamRequest(t,i,r,e)})}_makeServerStreamRequest(t,s,o,m){const l=r.com.hedera.mirror.api.proto.AddressBookQuery.encode({fileId:null!=this._fileId?this._fileId._toProtobuf():null,limit:this._limit}).finish();t._mirrorNetwork.getNextMirrorNode().getChannel().makeServerStreamRequest("NetworkService","getNodes",l,t=>{this._addresses.push(e._fromProtobuf(r.proto.NodeAddress.decode(t))),null!=this._limit&&this._limit>0&&(this._limit=this._limit-1)},e=>{const i=e instanceof Error?e.message:e.details;if(this._attempt<this._maxAttempts&&!t.isClientShutDown&&this._retryHandler(e)){const e=Math.min(250*2**this._attempt,this._maxBackoff);this._attempt>=this._maxAttempts&&console.warn(`Error getting nodes from mirror for file ${null!=this._fileId?this._fileId.toString():"UNKNOWN"} during attempt ${this._attempt}. Waiting ${e} ms before next attempt: ${i}`),this._logger&&this._logger.debug(`Error getting nodes from mirror for file ${null!=this._fileId?this._fileId.toString():"UNKNOWN"} during attempt ${this._attempt}. Waiting ${e} ms before next attempt: ${i}`),this._attempt+=1,setTimeout(()=>{this._makeServerStreamRequest(t,s,o,m)},e)}else o(new Error("failed to query address book"))},()=>{s(new i({nodeAddresses:this._addresses}))})}}export{m as default};
|
|
2
2
|
//# sourceMappingURL=AddressBookQuery.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBookQuery.js","sources":["../../src/network/AddressBookQuery.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Query from \"../query/Query.js\";\nimport NodeAddress from \"../address_book/NodeAddress.js\";\nimport NodeAddressBook from \"../address_book/NodeAddressBook.js\";\nimport * as HieroProto from \"@hashgraph/proto\";\nimport FileId from \"../file/FileId.js\";\nimport { RST_STREAM } from \"../Executable.js\";\n\n/**\n * @typedef {import(\"../channel/Channel.js\").default} Channel\n * @typedef {import(\"../channel/MirrorChannel.js\").default} MirrorChannel\n * @typedef {import(\"../channel/MirrorChannel.js\").MirrorError} MirrorError\n */\n\n/**\n * @template {Channel} ChannelT\n * @typedef {import(\"../client/Client.js\").default<ChannelT, MirrorChannel>} Client<ChannelT, MirrorChannel>\n */\n\n/**\n * Query to get a list of Hedera network node addresses from a mirror node.\n *\n * This query can be used to retrieve node addresses either from a specific file ID\n * or from the most recent address book if no file ID is specified. The response\n * contains node metadata including IP addresses and ports for both node and mirror\n * node services.\n * @augments {Query<NodeAddressBook>}\n */\nexport default class AddressBookQuery extends Query {\n /**\n * @param {object} props\n * @param {FileId | string} [props.fileId]\n * @param {number} [props.limit]\n */\n constructor(props = {}) {\n super();\n\n /**\n * @private\n * @type {?FileId}\n */\n this._fileId = null;\n if (props.fileId != null) {\n this.setFileId(props.fileId);\n }\n\n /**\n * @private\n * @type {?number}\n */\n this._limit = null;\n if (props.limit != null) {\n this.setLimit(props.limit);\n }\n\n /**\n * @private\n * @type {(error: MirrorError | Error | null) => boolean}\n */\n this._retryHandler = (error) => {\n if (error != null) {\n if (error instanceof Error) {\n // Retry on all errors which are not `MirrorError` because they're\n // likely lower level HTTP/2 errors\n return true;\n } else {\n // Retry on `NOT_FOUND`, `RESOURCE_EXHAUSTED`, `UNAVAILABLE`, and conditionally on `INTERNAL`\n // if the message matches the right regex.\n switch (error.code) {\n // INTERNAL\n // eslint-disable-next-line no-fallthrough\n case 13:\n return RST_STREAM.test(error.details.toString());\n // NOT_FOUND\n // eslint-disable-next-line no-fallthrough\n case 5:\n // RESOURCE_EXHAUSTED\n // eslint-disable-next-line no-fallthrough\n case 8:\n // UNAVAILABLE\n // eslint-disable-next-line no-fallthrough\n case 14:\n case 17:\n return true;\n default:\n return false;\n }\n }\n }\n\n return false;\n };\n\n /** @type {NodeAddress[]} */\n this._addresses = [];\n\n /**\n * @private\n * @type {number}\n */\n this._attempt = 0;\n }\n\n /**\n * @returns {?FileId}\n */\n get fileId() {\n return this._fileId;\n }\n\n /**\n * @param {FileId | string} fileId\n * @returns {AddressBookQuery}\n */\n setFileId(fileId) {\n this._fileId =\n typeof fileId === \"string\"\n ? FileId.fromString(fileId)\n : fileId.clone();\n\n return this;\n }\n\n /**\n * @returns {?number}\n */\n get limit() {\n return this._limit;\n }\n\n /**\n * @param {number} limit\n * @returns {AddressBookQuery}\n */\n setLimit(limit) {\n this._limit = limit;\n\n return this;\n }\n\n /**\n * @param {number} attempts\n * @returns {this}\n */\n setMaxAttempts(attempts) {\n this._maxAttempts = attempts;\n return this;\n }\n\n /**\n * @param {number} backoff\n * @returns {this}\n */\n setMaxBackoff(backoff) {\n this._maxBackoff = backoff;\n return this;\n }\n\n /**\n * @param {Client<Channel>} client\n * @param {number=} requestTimeout\n * @returns {Promise<NodeAddressBook>}\n */\n execute(client, requestTimeout) {\n // Extra validation when initializing the client with only a mirror network\n if (client._network._network.size === 0 && !client._timer) {\n throw new Error(\n \"The client's network update period is required. Please set it using the setNetworkUpdatePeriod method.\",\n );\n }\n\n return new Promise((resolve, reject) => {\n this._makeServerStreamRequest(\n client,\n /** @type {(value: NodeAddressBook) => void} */ (resolve),\n reject,\n requestTimeout,\n );\n });\n }\n\n /**\n * @private\n * @param {Client<Channel>} client\n * @param {(value: NodeAddressBook) => void} resolve\n * @param {(error: Error) => void} reject\n * @param {number=} requestTimeout\n */\n _makeServerStreamRequest(client, resolve, reject, requestTimeout) {\n const request =\n HieroProto.com.hedera.mirror.api.proto.AddressBookQuery.encode({\n fileId:\n this._fileId != null ? this._fileId._toProtobuf() : null,\n limit: this._limit,\n }).finish();\n\n client._mirrorNetwork\n .getNextMirrorNode()\n .getChannel()\n .makeServerStreamRequest(\n \"NetworkService\",\n \"getNodes\",\n request,\n (data) => {\n this._addresses.push(\n NodeAddress._fromProtobuf(\n HieroProto.proto.NodeAddress.decode(data),\n ),\n );\n\n if (this._limit != null && this._limit > 0) {\n this._limit = this._limit - 1;\n }\n },\n (error) => {\n const message =\n error instanceof Error ? error.message : error.details;\n if (\n this._attempt < this._maxAttempts &&\n !client.isClientShutDown &&\n this._retryHandler(error)\n ) {\n const delay = Math.min(\n 250 * 2 ** this._attempt,\n this._maxBackoff,\n );\n if (this._attempt >= this._maxAttempts) {\n console.warn(\n `Error getting nodes from mirror for file ${\n this._fileId != null\n ? this._fileId.toString()\n : \"UNKNOWN\"\n } during attempt ${\n this._attempt\n }. Waiting ${delay} ms before next attempt: ${message}`,\n );\n }\n if (this._logger) {\n this._logger.debug(\n `Error getting nodes from mirror for file ${\n this._fileId != null\n ? this._fileId.toString()\n : \"UNKNOWN\"\n } during attempt ${\n this._attempt\n }. Waiting ${delay} ms before next attempt: ${message}`,\n );\n }\n\n this._attempt += 1;\n\n setTimeout(() => {\n this._makeServerStreamRequest(\n client,\n resolve,\n reject,\n requestTimeout,\n );\n }, delay);\n } else {\n reject(new Error(\"failed to query address book\"));\n }\n },\n () => {\n resolve(\n new NodeAddressBook({ nodeAddresses: this._addresses }),\n );\n },\n );\n }\n}\n"],"names":["AddressBookQuery","Query","constructor","props","super","this","_fileId","fileId","setFileId","_limit","limit","setLimit","_retryHandler","error","Error","code","RST_STREAM","test","details","toString","_addresses","_attempt","FileId","fromString","clone","setMaxAttempts","attempts","_maxAttempts","setMaxBackoff","backoff","_maxBackoff","execute","client","requestTimeout","_network","size","_timer","Promise","resolve","reject","_makeServerStreamRequest","request","HieroProto","com","hedera","mirror","api","proto","encode","_toProtobuf","finish","_mirrorNetwork","getNextMirrorNode","getChannel","makeServerStreamRequest","data","push","NodeAddress","_fromProtobuf","decode","message","isClientShutDown","delay","Math","min","console","warn","_logger","debug","setTimeout","NodeAddressBook","nodeAddresses"],"mappings":"mPA6Be,MAAMA,UAAyBC,EAM1C,WAAAC,CAAYC,EAAQ,IAChBC,QAMAC,KAAKC,QAAU,KACK,MAAhBH,EAAMI,QACNF,KAAKG,UAAUL,EAAMI,QAOzBF,KAAKI,OAAS,KACK,MAAfN,EAAMO,OACNL,KAAKM,SAASR,EAAMO,OAOxBL,KAAKO,cAAiBC,IAClB,GAAa,MAATA,EAAe,CACf,GAAIA,aAAiBC,MAGjB,OAAO,EAIP,OAAQD,EAAME,MAGV,KAAK,GACD,OAAOC,EAAWC,KAAKJ,EAAMK,QAAQC,YAGzC,KAAK,EAGL,KAAK,EAGL,KAAK,GACL,KAAK,GACD,OAAO,EACX,QACI,OAAO,EAGnC,CAEY,OAAO,GAIXd,KAAKe,WAAa,GAMlBf,KAAKgB,SAAW,CACxB,CAKI,UAAId,GACA,OAAOF,KAAKC,OACpB,CAMI,SAAAE,CAAUD,GAMN,OALAF,KAAKC,QACiB,iBAAXC,EACDe,EAAOC,WAAWhB,GAClBA,EAAOiB,QAEVnB,IACf,CAKI,SAAIK,GACA,OAAOL,KAAKI,MACpB,CAMI,QAAAE,CAASD,GAGL,OAFAL,KAAKI,OAASC,EAEPL,IACf,CAMI,cAAAoB,CAAeC,GAEX,OADArB,KAAKsB,aAAeD,EACbrB,IACf,CAMI,aAAAuB,CAAcC,GAEV,OADAxB,KAAKyB,YAAcD,EACZxB,IACf,CAOI,OAAA0B,CAAQC,EAAQC,GAEZ,GAAsC,IAAlCD,EAAOE,SAASA,SAASC,OAAeH,EAAOI,OAC/C,MAAM,IAAItB,MACN,0GAIR,OAAO,IAAIuB,QAAQ,CAACC,EAASC,KACzBlC,KAAKmC,yBACDR,EAChB,EACgBO,EACAN,IAGhB,CASI,wBAAAO,CAAyBR,EAAQM,EAASC,EAAQN,GAC9C,MAAMQ,EACFC,EAAWC,IAAIC,OAAOC,OAAOC,IAAIC,MAAM/C,iBAAiBgD,OAAO,CAC3DzC,OACoB,MAAhBF,KAAKC,QAAkBD,KAAKC,QAAQ2C,cAAgB,KACxDvC,MAAOL,KAAKI,SACbyC,SAEPlB,EAAOmB,eACFC,oBACAC,aACAC,wBACG,iBACA,WACAb,EACCc,IACGlD,KAAKe,WAAWoC,KACZC,EAAYC,cACRhB,EAAWK,MAAMU,YAAYE,OAAOJ,KAIzB,MAAflD,KAAKI,QAAkBJ,KAAKI,OAAS,IACrCJ,KAAKI,OAASJ,KAAKI,OAAS,IAGnCI,IACG,MAAM+C,EACF/C,aAAiBC,MAAQD,EAAM+C,QAAU/C,EAAMK,QACnD,GACIb,KAAKgB,SAAWhB,KAAKsB,eACpBK,EAAO6B,kBACRxD,KAAKO,cAAcC,GACrB,CACE,MAAMiD,EAAQC,KAAKC,IACf,IAAM,GAAK3D,KAAKgB,SAChBhB,KAAKyB,aAELzB,KAAKgB,UAAYhB,KAAKsB,cACtBsC,QAAQC,KACJ,4CACoB,MAAhB7D,KAAKC,QACCD,KAAKC,QAAQa,WACb,4BAENd,KAAKgB,qBACIyC,6BAAiCF,KAGlDvD,KAAK8D,SACL9D,KAAK8D,QAAQC,MACT,4CACoB,MAAhB/D,KAAKC,QACCD,KAAKC,QAAQa,WACb,4BAENd,KAAKgB,qBACIyC,6BAAiCF,KAItDvD,KAAKgB,UAAY,EAEjBgD,WAAW,KACPhE,KAAKmC,yBACDR,EACAM,EACAC,EACAN,IAEL6B,EAC3B,MACwBvB,EAAO,IAAIzB,MAAM,kCAGzB,KACIwB,EACI,IAAIgC,EAAgB,CAAEC,cAAelE,KAAKe,eAIlE"}
|
|
1
|
+
{"version":3,"file":"AddressBookQuery.js","sources":["../../src/network/AddressBookQuery.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Query from \"../query/Query.js\";\nimport NodeAddress from \"../address_book/NodeAddress.js\";\nimport NodeAddressBook from \"../address_book/NodeAddressBook.js\";\nimport * as HieroProto from \"@hiero-ledger/proto\";\nimport FileId from \"../file/FileId.js\";\nimport { RST_STREAM } from \"../Executable.js\";\n\n/**\n * @typedef {import(\"../channel/Channel.js\").default} Channel\n * @typedef {import(\"../channel/MirrorChannel.js\").default} MirrorChannel\n * @typedef {import(\"../channel/MirrorChannel.js\").MirrorError} MirrorError\n */\n\n/**\n * @template {Channel} ChannelT\n * @typedef {import(\"../client/Client.js\").default<ChannelT, MirrorChannel>} Client<ChannelT, MirrorChannel>\n */\n\n/**\n * Query to get a list of Hedera network node addresses from a mirror node.\n *\n * This query can be used to retrieve node addresses either from a specific file ID\n * or from the most recent address book if no file ID is specified. The response\n * contains node metadata including IP addresses and ports for both node and mirror\n * node services.\n * @augments {Query<NodeAddressBook>}\n */\nexport default class AddressBookQuery extends Query {\n /**\n * @param {object} props\n * @param {FileId | string} [props.fileId]\n * @param {number} [props.limit]\n */\n constructor(props = {}) {\n super();\n\n /**\n * @private\n * @type {?FileId}\n */\n this._fileId = null;\n if (props.fileId != null) {\n this.setFileId(props.fileId);\n }\n\n /**\n * @private\n * @type {?number}\n */\n this._limit = null;\n if (props.limit != null) {\n this.setLimit(props.limit);\n }\n\n /**\n * @private\n * @type {(error: MirrorError | Error | null) => boolean}\n */\n this._retryHandler = (error) => {\n if (error != null) {\n if (error instanceof Error) {\n // Retry on all errors which are not `MirrorError` because they're\n // likely lower level HTTP/2 errors\n return true;\n } else {\n // Retry on `NOT_FOUND`, `RESOURCE_EXHAUSTED`, `UNAVAILABLE`, and conditionally on `INTERNAL`\n // if the message matches the right regex.\n switch (error.code) {\n // INTERNAL\n // eslint-disable-next-line no-fallthrough\n case 13:\n return RST_STREAM.test(error.details.toString());\n // NOT_FOUND\n // eslint-disable-next-line no-fallthrough\n case 5:\n // RESOURCE_EXHAUSTED\n // eslint-disable-next-line no-fallthrough\n case 8:\n // UNAVAILABLE\n // eslint-disable-next-line no-fallthrough\n case 14:\n case 17:\n return true;\n default:\n return false;\n }\n }\n }\n\n return false;\n };\n\n /** @type {NodeAddress[]} */\n this._addresses = [];\n\n /**\n * @private\n * @type {number}\n */\n this._attempt = 0;\n }\n\n /**\n * @returns {?FileId}\n */\n get fileId() {\n return this._fileId;\n }\n\n /**\n * @param {FileId | string} fileId\n * @returns {AddressBookQuery}\n */\n setFileId(fileId) {\n this._fileId =\n typeof fileId === \"string\"\n ? FileId.fromString(fileId)\n : fileId.clone();\n\n return this;\n }\n\n /**\n * @returns {?number}\n */\n get limit() {\n return this._limit;\n }\n\n /**\n * @param {number} limit\n * @returns {AddressBookQuery}\n */\n setLimit(limit) {\n this._limit = limit;\n\n return this;\n }\n\n /**\n * @param {number} attempts\n * @returns {this}\n */\n setMaxAttempts(attempts) {\n this._maxAttempts = attempts;\n return this;\n }\n\n /**\n * @param {number} backoff\n * @returns {this}\n */\n setMaxBackoff(backoff) {\n this._maxBackoff = backoff;\n return this;\n }\n\n /**\n * @param {Client<Channel>} client\n * @param {number=} requestTimeout\n * @returns {Promise<NodeAddressBook>}\n */\n execute(client, requestTimeout) {\n return new Promise((resolve, reject) => {\n this._makeServerStreamRequest(\n client,\n /** @type {(value: NodeAddressBook) => void} */ (resolve),\n reject,\n requestTimeout,\n );\n });\n }\n\n /**\n * @private\n * @param {Client<Channel>} client\n * @param {(value: NodeAddressBook) => void} resolve\n * @param {(error: Error) => void} reject\n * @param {number=} requestTimeout\n */\n _makeServerStreamRequest(client, resolve, reject, requestTimeout) {\n const request =\n HieroProto.com.hedera.mirror.api.proto.AddressBookQuery.encode({\n fileId:\n this._fileId != null ? this._fileId._toProtobuf() : null,\n limit: this._limit,\n }).finish();\n\n client._mirrorNetwork\n .getNextMirrorNode()\n .getChannel()\n .makeServerStreamRequest(\n \"NetworkService\",\n \"getNodes\",\n request,\n (data) => {\n this._addresses.push(\n NodeAddress._fromProtobuf(\n HieroProto.proto.NodeAddress.decode(data),\n ),\n );\n\n if (this._limit != null && this._limit > 0) {\n this._limit = this._limit - 1;\n }\n },\n (error) => {\n const message =\n error instanceof Error ? error.message : error.details;\n if (\n this._attempt < this._maxAttempts &&\n !client.isClientShutDown &&\n this._retryHandler(error)\n ) {\n const delay = Math.min(\n 250 * 2 ** this._attempt,\n this._maxBackoff,\n );\n if (this._attempt >= this._maxAttempts) {\n console.warn(\n `Error getting nodes from mirror for file ${\n this._fileId != null\n ? this._fileId.toString()\n : \"UNKNOWN\"\n } during attempt ${\n this._attempt\n }. Waiting ${delay} ms before next attempt: ${message}`,\n );\n }\n if (this._logger) {\n this._logger.debug(\n `Error getting nodes from mirror for file ${\n this._fileId != null\n ? this._fileId.toString()\n : \"UNKNOWN\"\n } during attempt ${\n this._attempt\n }. Waiting ${delay} ms before next attempt: ${message}`,\n );\n }\n\n this._attempt += 1;\n\n setTimeout(() => {\n this._makeServerStreamRequest(\n client,\n resolve,\n reject,\n requestTimeout,\n );\n }, delay);\n } else {\n reject(new Error(\"failed to query address book\"));\n }\n },\n () => {\n resolve(\n new NodeAddressBook({ nodeAddresses: this._addresses }),\n );\n },\n );\n }\n}\n"],"names":["AddressBookQuery","Query","constructor","props","super","this","_fileId","fileId","setFileId","_limit","limit","setLimit","_retryHandler","error","Error","code","RST_STREAM","test","details","toString","_addresses","_attempt","FileId","fromString","clone","setMaxAttempts","attempts","_maxAttempts","setMaxBackoff","backoff","_maxBackoff","execute","client","requestTimeout","Promise","resolve","reject","_makeServerStreamRequest","request","HieroProto","com","hedera","mirror","api","proto","encode","_toProtobuf","finish","_mirrorNetwork","getNextMirrorNode","getChannel","makeServerStreamRequest","data","push","NodeAddress","_fromProtobuf","decode","message","isClientShutDown","delay","Math","min","console","warn","_logger","debug","setTimeout","NodeAddressBook","nodeAddresses"],"mappings":"sPA6Be,MAAMA,UAAyBC,EAM1C,WAAAC,CAAYC,EAAQ,IAChBC,QAMAC,KAAKC,QAAU,KACK,MAAhBH,EAAMI,QACNF,KAAKG,UAAUL,EAAMI,QAOzBF,KAAKI,OAAS,KACK,MAAfN,EAAMO,OACNL,KAAKM,SAASR,EAAMO,OAOxBL,KAAKO,cAAiBC,IAClB,GAAa,MAATA,EAAe,CACf,GAAIA,aAAiBC,MAGjB,OAAO,EAIP,OAAQD,EAAME,MAGV,KAAK,GACD,OAAOC,EAAWC,KAAKJ,EAAMK,QAAQC,YAGzC,KAAK,EAGL,KAAK,EAGL,KAAK,GACL,KAAK,GACD,OAAO,EACX,QACI,OAAO,EAGnC,CAEY,OAAO,GAIXd,KAAKe,WAAa,GAMlBf,KAAKgB,SAAW,CACxB,CAKI,UAAId,GACA,OAAOF,KAAKC,OACpB,CAMI,SAAAE,CAAUD,GAMN,OALAF,KAAKC,QACiB,iBAAXC,EACDe,EAAOC,WAAWhB,GAClBA,EAAOiB,QAEVnB,IACf,CAKI,SAAIK,GACA,OAAOL,KAAKI,MACpB,CAMI,QAAAE,CAASD,GAGL,OAFAL,KAAKI,OAASC,EAEPL,IACf,CAMI,cAAAoB,CAAeC,GAEX,OADArB,KAAKsB,aAAeD,EACbrB,IACf,CAMI,aAAAuB,CAAcC,GAEV,OADAxB,KAAKyB,YAAcD,EACZxB,IACf,CAOI,OAAA0B,CAAQC,EAAQC,GACZ,OAAO,IAAIC,QAAQ,CAACC,EAASC,KACzB/B,KAAKgC,yBACDL,EAChB,EACgBI,EACAH,IAGhB,CASI,wBAAAI,CAAyBL,EAAQG,EAASC,EAAQH,GAC9C,MAAMK,EACFC,EAAWC,IAAIC,OAAOC,OAAOC,IAAIC,MAAM5C,iBAAiB6C,OAAO,CAC3DtC,OACoB,MAAhBF,KAAKC,QAAkBD,KAAKC,QAAQwC,cAAgB,KACxDpC,MAAOL,KAAKI,SACbsC,SAEPf,EAAOgB,eACFC,oBACAC,aACAC,wBACG,iBACA,WACAb,EACCc,IACG/C,KAAKe,WAAWiC,KACZC,EAAYC,cACRhB,EAAWK,MAAMU,YAAYE,OAAOJ,KAIzB,MAAf/C,KAAKI,QAAkBJ,KAAKI,OAAS,IACrCJ,KAAKI,OAASJ,KAAKI,OAAS,IAGnCI,IACG,MAAM4C,EACF5C,aAAiBC,MAAQD,EAAM4C,QAAU5C,EAAMK,QACnD,GACIb,KAAKgB,SAAWhB,KAAKsB,eACpBK,EAAO0B,kBACRrD,KAAKO,cAAcC,GACrB,CACE,MAAM8C,EAAQC,KAAKC,IACf,IAAM,GAAKxD,KAAKgB,SAChBhB,KAAKyB,aAELzB,KAAKgB,UAAYhB,KAAKsB,cACtBmC,QAAQC,KACJ,4CACoB,MAAhB1D,KAAKC,QACCD,KAAKC,QAAQa,WACb,4BAENd,KAAKgB,qBACIsC,6BAAiCF,KAGlDpD,KAAK2D,SACL3D,KAAK2D,QAAQC,MACT,4CACoB,MAAhB5D,KAAKC,QACCD,KAAKC,QAAQa,WACb,4BAENd,KAAKgB,qBACIsC,6BAAiCF,KAItDpD,KAAKgB,UAAY,EAEjB6C,WAAW,KACP7D,KAAKgC,yBACDL,EACAG,EACAC,EACAH,IAEL0B,EAC3B,MACwBvB,EAAO,IAAItB,MAAM,kCAGzB,KACIqB,EACI,IAAIgC,EAAgB,CAAEC,cAAe/D,KAAKe,eAIlE"}
|
|
@@ -197,10 +197,6 @@ class AddressBookQueryWeb extends _Query.default {
|
|
|
197
197
|
* @returns {Promise<NodeAddressBook>}
|
|
198
198
|
*/
|
|
199
199
|
execute(client, requestTimeout) {
|
|
200
|
-
// Extra validation when initializing the client with only a mirror network
|
|
201
|
-
if (client._network._network.size === 0 && !client._timer) {
|
|
202
|
-
throw new Error("The client's network update period is required. Please set it using the setNetworkUpdatePeriod method.");
|
|
203
|
-
}
|
|
204
200
|
return new Promise((resolve, reject) => {
|
|
205
201
|
void this._makeFetchRequest(client, resolve, reject, requestTimeout);
|
|
206
202
|
});
|
|
@@ -268,7 +264,7 @@ class AddressBookQueryWeb extends _Query.default {
|
|
|
268
264
|
certHash: node.node_cert_hash,
|
|
269
265
|
publicKey: node.public_key,
|
|
270
266
|
description: node.description,
|
|
271
|
-
stake: node.stake
|
|
267
|
+
stake: node.stake?.toString()
|
|
272
268
|
}));
|
|
273
269
|
this._addresses.push(...pageNodes);
|
|
274
270
|
nextUrl = data.links?.next || null;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import t from"../query/Query.js";import e from"../address_book/NodeAddressBook.js";import s from"../file/FileId.js";import{RST_STREAM as r}from"../Executable.js";import i from"../address_book/NodeAddress.js";import{MAINNET as o,WEB_TESTNET as n,WEB_PREVIEWNET as d}from"../constants/ClientConstants.js";class a extends t{constructor(t={}){super(),this._fileId=null,null!=t.fileId&&this.setFileId(t.fileId),this._limit=null,null!=t.limit&&this.setLimit(t.limit),this._retryHandler=t=>{if(null!=t){if(t instanceof Error)return!0;switch(t.code){case 13:return r.test(t.details.toString());case 5:case 8:case 14:case 17:return!0;default:return!1}}return!1},this._addresses=[]}get fileId(){return this._fileId}setFileId(t){return this._fileId="string"==typeof t?s.fromString(t):t.clone(),this}get limit(){return this._limit}setLimit(t){return this._limit=t,this}setMaxAttempts(t){return this._maxAttempts=t,this}setMaxBackoff(t){return this._maxBackoff=t,this}execute(t,e){
|
|
1
|
+
import t from"../query/Query.js";import e from"../address_book/NodeAddressBook.js";import s from"../file/FileId.js";import{RST_STREAM as r}from"../Executable.js";import i from"../address_book/NodeAddress.js";import{MAINNET as o,WEB_TESTNET as n,WEB_PREVIEWNET as d}from"../constants/ClientConstants.js";class a extends t{constructor(t={}){super(),this._fileId=null,null!=t.fileId&&this.setFileId(t.fileId),this._limit=null,null!=t.limit&&this.setLimit(t.limit),this._retryHandler=t=>{if(null!=t){if(t instanceof Error)return!0;switch(t.code){case 13:return r.test(t.details.toString());case 5:case 8:case 14:case 17:return!0;default:return!1}}return!1},this._addresses=[]}get fileId(){return this._fileId}setFileId(t){return this._fileId="string"==typeof t?s.fromString(t):t.clone(),this}get limit(){return this._limit}setLimit(t){return this._limit=t,this}setMaxAttempts(t){return this._maxAttempts=t,this}setMaxBackoff(t){return this._maxBackoff=t,this}execute(t,e){return new Promise((s,r)=>{this._makeFetchRequest(t,s,r,e)})}async _makeFetchRequest(t,s,r,o){const{port:n,address:d}=t._mirrorNetwork.getNextMirrorNode().address;let a=`${d.includes("127.0.0.1")||d.includes("localhost")?"http":"https"}://${d}`;n&&(a=`${a}:${n}`),this._addresses=[];let l=null,c=!1;const m=new URL(`${a}/api/v1/network/nodes`);null!=this._fileId&&m.searchParams.append("file.id",this._fileId.toString());const h=null!=this._limit?this._limit:25;for(m.searchParams.append("limit",h.toString());!c;){const e=l?new URL(l,a):m;for(let s=0;s<=this._maxAttempts;s++)try{const s=await fetch(e.toString(),{method:"GET",headers:{Accept:"application/json"},signal:o?AbortSignal.timeout(o):void 0});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);const r=await s.json(),n=(r.nodes||[]).map(e=>i.fromJSON({nodeId:e.node_id.toString(),accountId:e.node_account_id,addresses:this._handleAddressesFromGrpcProxyEndpoint(e,t),certHash:e.node_cert_hash,publicKey:e.public_key,description:e.description,stake:e.stake?.toString()}));this._addresses.push(...n),l=r.links?.next||null,l||(c=!0);break}catch(e){console.error("Error in _makeFetchRequest:",e);const i=e instanceof Error?e.message:String(e);if(s<this._maxAttempts&&!t.isClientShutDown&&this._retryHandler(e)){const t=Math.min(250*2**s,this._maxBackoff);this._logger&&this._logger.debug(`Error getting nodes from mirror for file ${null!=this._fileId?this._fileId.toString():"UNKNOWN"} during attempt ${s+1}. Waiting ${t} ms before next attempt: ${i}`),await new Promise(e=>setTimeout(e,t));continue}const o=s>=this._maxAttempts?`Failed to query address book after ${this._maxAttempts+1} attempts. Last error: ${i}`:`Failed to query address book: ${i}`;return void r(new Error(o))}}s(new e({nodeAddresses:this._addresses}))}_handleAddressesFromGrpcProxyEndpoint(t,e){const s=t.grpc_proxy_endpoint;if(s&&s.domain_name&&s.port)return[{address:s.domain_name,port:s.port.toString()}];let r;const i=e._network.ledgerId;if(i&&i.isMainnet())r=o;else if(i&&i.isTestnet())r=n;else{if(!i||!i.isPreviewnet())return[];r=d}const a=t.node_account_id;for(const[t,e]of Object.entries(r))if(e.toString()===a){const[e,s]=t.split(":");return[{address:e,port:s}]}return[]}}export{a as default};
|
|
2
2
|
//# sourceMappingURL=AddressBookQueryWeb.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBookQueryWeb.js","sources":["../../src/network/AddressBookQueryWeb.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Query from \"../query/Query.js\";\nimport NodeAddressBook from \"../address_book/NodeAddressBook.js\";\nimport FileId from \"../file/FileId.js\";\nimport { RST_STREAM } from \"../Executable.js\";\nimport NodeAddress from \"../address_book/NodeAddress.js\";\nimport {\n MAINNET,\n WEB_TESTNET,\n WEB_PREVIEWNET,\n} from \"../constants/ClientConstants.js\";\n\n/**\n * @typedef {import(\"../channel/Channel.js\").default} Channel\n * @typedef {import(\"../channel/MirrorChannel.js\").default} MirrorChannel\n * @typedef {import(\"../channel/MirrorChannel.js\").MirrorError} MirrorError\n */\n\n/**\n * @template {Channel} ChannelT\n * @typedef {import(\"../client/Client.js\").default<ChannelT, MirrorChannel>} Client<ChannelT, MirrorChannel>\n */\n\n/**\n * @typedef {object} EndpointWebResponse\n * @property {string} domain_name\n * @property {string} ip_address_v4\n * @property {number} port\n */\n\n/**\n * @typedef {object} AddressBookQueryWebResponse\n * @property {Array<{\n * admin_key: {\n * key: string,\n * _type: string,\n * },\n * decline_reward: boolean,\n * grpc_proxy_endpoint: EndpointWebResponse,\n * file_id: string,\n * memo: string,\n * public_key: string,\n * node_id: number,\n * node_account_id: string,\n * node_cert_hash: string,\n * address: string,\n * service_endpoints: EndpointWebResponse[],\n * description: string,\n * stake: number\n * }>} nodes\n * @property {?{next: ?string}} links - Links object containing pagination information\n */\n\n/**\n * Default page size limit for optimal pagination performance\n * @constant {number}\n */\nconst DEFAULT_PAGE_SIZE = 25;\n\n/**\n * Web-compatible query to get a list of Hedera network node addresses from a mirror node.\n * Uses fetch API instead of gRPC for web environments.\n *\n * This query can be used to retrieve node addresses either from a specific file ID\n * or from the most recent address book if no file ID is specified. The response\n * contains node metadata including IP addresses and ports for both node and mirror\n * node services.\n * @augments {Query<NodeAddressBook>}\n */\nexport default class AddressBookQueryWeb extends Query {\n /**\n * @param {object} props\n * @param {FileId | string} [props.fileId]\n * @param {number} [props.limit] - Page size limit (defaults to 25 for optimal performance)\n */\n constructor(props = {}) {\n super();\n\n /**\n * @private\n * @type {?FileId}\n */\n this._fileId = null;\n if (props.fileId != null) {\n this.setFileId(props.fileId);\n }\n\n /**\n * Page limit for the query\n * @private\n * @type {?number}\n */\n this._limit = null;\n if (props.limit != null) {\n this.setLimit(props.limit);\n }\n\n /**\n * @private\n * @type {(error: MirrorError | Error | null) => boolean}\n */\n this._retryHandler = (error) => {\n if (error != null) {\n if (error instanceof Error) {\n // Retry on all errors which are not `MirrorError` because they're\n // likely lower level HTTP errors\n return true;\n } else {\n // Retry on `NOT_FOUND`, `RESOURCE_EXHAUSTED`, `UNAVAILABLE`, and conditionally on `INTERNAL`\n // if the message matches the right regex.\n switch (error.code) {\n // INTERNAL\n // eslint-disable-next-line no-fallthrough\n case 13:\n return RST_STREAM.test(error.details.toString());\n // NOT_FOUND\n // eslint-disable-next-line no-fallthrough\n case 5:\n // RESOURCE_EXHAUSTED\n // eslint-disable-next-line no-fallthrough\n case 8:\n // UNAVAILABLE\n // eslint-disable-next-line no-fallthrough\n case 14:\n case 17:\n return true;\n default:\n return false;\n }\n }\n }\n\n return false;\n };\n\n /** @type {NodeAddress[]} */\n this._addresses = [];\n }\n\n /**\n * @returns {?FileId}\n */\n get fileId() {\n return this._fileId;\n }\n\n /**\n * @param {FileId | string} fileId\n * @returns {AddressBookQueryWeb}\n */\n setFileId(fileId) {\n this._fileId =\n typeof fileId === \"string\"\n ? FileId.fromString(fileId)\n : fileId.clone();\n\n return this;\n }\n\n /**\n * Page limit for the query\n * @returns {?number}\n */\n get limit() {\n return this._limit;\n }\n\n /**\n * Set the page limit for the query\n * @param {number} limit\n * @returns {AddressBookQueryWeb}\n */\n setLimit(limit) {\n this._limit = limit;\n\n return this;\n }\n\n /**\n * @param {number} attempts\n * @returns {this}\n */\n setMaxAttempts(attempts) {\n this._maxAttempts = attempts;\n return this;\n }\n\n /**\n * @param {number} backoff\n * @returns {this}\n */\n setMaxBackoff(backoff) {\n this._maxBackoff = backoff;\n return this;\n }\n\n /**\n * @param {Client<Channel>} client\n * @param {number=} requestTimeout\n * @returns {Promise<NodeAddressBook>}\n */\n execute(client, requestTimeout) {\n // Extra validation when initializing the client with only a mirror network\n if (client._network._network.size === 0 && !client._timer) {\n throw new Error(\n \"The client's network update period is required. Please set it using the setNetworkUpdatePeriod method.\",\n );\n }\n\n return new Promise((resolve, reject) => {\n void this._makeFetchRequest(\n client,\n resolve,\n reject,\n requestTimeout,\n );\n });\n }\n\n /**\n * @private\n * @param {Client<Channel>} client\n * @param {(value: NodeAddressBook) => void} resolve\n * @param {(error: Error) => void} reject\n * @param {number=} requestTimeout\n */\n async _makeFetchRequest(client, resolve, reject, requestTimeout) {\n const { port, address } =\n client._mirrorNetwork.getNextMirrorNode().address;\n\n let baseUrl = `${\n address.includes(\"127.0.0.1\") || address.includes(\"localhost\")\n ? \"http\"\n : \"https\"\n }://${address}`;\n\n if (port) {\n baseUrl = `${baseUrl}:${port}`;\n }\n\n // Initialize aggregated results\n this._addresses = [];\n let nextUrl = null;\n let isLastPage = false;\n\n // Build initial URL\n const initialUrl = new URL(`${baseUrl}/api/v1/network/nodes`);\n if (this._fileId != null) {\n initialUrl.searchParams.append(\"file.id\", this._fileId.toString());\n }\n\n // Use the specified limit, or default to DEFAULT_PAGE_SIZE for optimal pagination performance\n const effectiveLimit =\n this._limit != null ? this._limit : DEFAULT_PAGE_SIZE;\n initialUrl.searchParams.append(\"limit\", effectiveLimit.toString());\n\n // Fetch all pages\n while (!isLastPage) {\n const currentUrl = nextUrl ? new URL(nextUrl, baseUrl) : initialUrl;\n\n for (let attempt = 0; attempt <= this._maxAttempts; attempt++) {\n try {\n // eslint-disable-next-line n/no-unsupported-features/node-builtins\n const response = await fetch(currentUrl.toString(), {\n method: \"GET\",\n headers: {\n Accept: \"application/json\",\n },\n signal: requestTimeout\n ? AbortSignal.timeout(requestTimeout)\n : undefined,\n });\n\n if (!response.ok) {\n throw new Error(\n `HTTP error! status: ${response.status}`,\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const data = /** @type {AddressBookQueryWebResponse} */ (\n await response.json()\n );\n\n const nodes = data.nodes || [];\n\n // Aggregate nodes from this page\n const pageNodes = nodes.map((node) =>\n NodeAddress.fromJSON({\n nodeId: node.node_id.toString(),\n accountId: node.node_account_id,\n addresses:\n this._handleAddressesFromGrpcProxyEndpoint(\n node,\n client,\n ),\n certHash: node.node_cert_hash,\n publicKey: node.public_key,\n description: node.description,\n stake: node.stake.toString(),\n }),\n );\n\n this._addresses.push(...pageNodes);\n nextUrl = data.links?.next || null;\n\n // If no more pages, set flag to exit loop\n if (!nextUrl) {\n isLastPage = true;\n }\n\n // Move to next page\n break;\n } catch (error) {\n console.error(\"Error in _makeFetchRequest:\", error);\n const message =\n error instanceof Error ? error.message : String(error);\n\n // Check if we should retry\n if (\n attempt < this._maxAttempts &&\n !client.isClientShutDown &&\n this._retryHandler(\n /** @type {MirrorError | Error | null} */ (error),\n )\n ) {\n const delay = Math.min(\n 250 * 2 ** attempt,\n this._maxBackoff,\n );\n\n if (this._logger) {\n this._logger.debug(\n `Error getting nodes from mirror for file ${\n this._fileId != null\n ? this._fileId.toString()\n : \"UNKNOWN\"\n } during attempt ${\n attempt + 1\n }. Waiting ${delay} ms before next attempt: ${message}`,\n );\n }\n\n // Wait before next attempt\n // eslint-disable-next-line ie11/no-loop-func\n await new Promise((resolve) =>\n setTimeout(resolve, delay),\n );\n continue;\n }\n\n // If we shouldn't retry or have exhausted attempts, reject\n const maxAttemptsReached = attempt >= this._maxAttempts;\n const errorMessage = maxAttemptsReached\n ? `Failed to query address book after ${\n this._maxAttempts + 1\n } attempts. Last error: ${message}`\n : `Failed to query address book: ${message}`;\n reject(new Error(errorMessage));\n return;\n }\n }\n }\n\n // Return the aggregated results\n const addressBook = new NodeAddressBook({\n nodeAddresses: this._addresses,\n });\n resolve(addressBook);\n }\n\n /**\n * Handles the grpc_proxy_endpoint fallback logic for a node.\n * @param {AddressBookQueryWebResponse['nodes'][number]} node - The node object from the mirror node response.\n * @param {Client<Channel>} client - The client instance.\n * @returns {Array<{address: string, port: string}>}\n */\n _handleAddressesFromGrpcProxyEndpoint(node, client) {\n const grpcProxyEndpoint = node.grpc_proxy_endpoint;\n\n if (\n grpcProxyEndpoint &&\n grpcProxyEndpoint.domain_name &&\n grpcProxyEndpoint.port\n ) {\n return [\n {\n address: grpcProxyEndpoint.domain_name,\n port: grpcProxyEndpoint.port.toString(),\n },\n ];\n }\n\n let networkConstant;\n const ledgerId = client._network.ledgerId;\n\n if (ledgerId && ledgerId.isMainnet()) {\n networkConstant = MAINNET;\n } else if (ledgerId && ledgerId.isTestnet()) {\n networkConstant = WEB_TESTNET;\n } else if (ledgerId && ledgerId.isPreviewnet()) {\n networkConstant = WEB_PREVIEWNET;\n } else {\n return [];\n }\n\n const nodeAccountId = node.node_account_id;\n\n for (const [address, accountIdObj] of Object.entries(networkConstant)) {\n if (accountIdObj.toString() === nodeAccountId) {\n const [domain_name, port] = address.split(\":\");\n\n return [\n {\n address: domain_name,\n port,\n },\n ];\n }\n }\n\n return [];\n }\n}\n"],"names":["AddressBookQueryWeb","Query","constructor","props","super","this","_fileId","fileId","setFileId","_limit","limit","setLimit","_retryHandler","error","Error","code","RST_STREAM","test","details","toString","_addresses","FileId","fromString","clone","setMaxAttempts","attempts","_maxAttempts","setMaxBackoff","backoff","_maxBackoff","execute","client","requestTimeout","_network","size","_timer","Promise","resolve","reject","_makeFetchRequest","port","address","_mirrorNetwork","getNextMirrorNode","baseUrl","includes","nextUrl","isLastPage","initialUrl","URL","searchParams","append","effectiveLimit","currentUrl","attempt","response","fetch","method","headers","Accept","signal","AbortSignal","timeout","undefined","ok","status","data","json","pageNodes","nodes","map","node","NodeAddress","fromJSON","nodeId","node_id","accountId","node_account_id","addresses","_handleAddressesFromGrpcProxyEndpoint","certHash","node_cert_hash","publicKey","public_key","description","stake","push","links","next","console","message","String","isClientShutDown","delay","Math","min","_logger","debug","setTimeout","errorMessage","NodeAddressBook","nodeAddresses","grpcProxyEndpoint","grpc_proxy_endpoint","domain_name","networkConstant","ledgerId","isMainnet","MAINNET","isTestnet","WEB_TESTNET","isPreviewnet","WEB_PREVIEWNET","nodeAccountId","accountIdObj","Object","entries","split"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"AddressBookQueryWeb.js","sources":["../../src/network/AddressBookQueryWeb.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Query from \"../query/Query.js\";\nimport NodeAddressBook from \"../address_book/NodeAddressBook.js\";\nimport FileId from \"../file/FileId.js\";\nimport { RST_STREAM } from \"../Executable.js\";\nimport NodeAddress from \"../address_book/NodeAddress.js\";\nimport {\n MAINNET,\n WEB_TESTNET,\n WEB_PREVIEWNET,\n} from \"../constants/ClientConstants.js\";\n\n/**\n * @typedef {import(\"../channel/Channel.js\").default} Channel\n * @typedef {import(\"../channel/MirrorChannel.js\").default} MirrorChannel\n * @typedef {import(\"../channel/MirrorChannel.js\").MirrorError} MirrorError\n */\n\n/**\n * @template {Channel} ChannelT\n * @typedef {import(\"../client/Client.js\").default<ChannelT, MirrorChannel>} Client<ChannelT, MirrorChannel>\n */\n\n/**\n * @typedef {object} EndpointWebResponse\n * @property {string} domain_name\n * @property {string} ip_address_v4\n * @property {number} port\n */\n\n/**\n * @typedef {object} AddressBookQueryWebResponse\n * @property {Array<{\n * admin_key: {\n * key: string,\n * _type: string,\n * },\n * decline_reward: boolean,\n * grpc_proxy_endpoint: EndpointWebResponse,\n * file_id: string,\n * memo: string,\n * public_key: string,\n * node_id: number,\n * node_account_id: string,\n * node_cert_hash: string,\n * address: string,\n * service_endpoints: EndpointWebResponse[],\n * description: string,\n * stake: number\n * }>} nodes\n * @property {?{next: ?string}} links - Links object containing pagination information\n */\n\n/**\n * Default page size limit for optimal pagination performance\n * @constant {number}\n */\nconst DEFAULT_PAGE_SIZE = 25;\n\n/**\n * Web-compatible query to get a list of Hedera network node addresses from a mirror node.\n * Uses fetch API instead of gRPC for web environments.\n *\n * This query can be used to retrieve node addresses either from a specific file ID\n * or from the most recent address book if no file ID is specified. The response\n * contains node metadata including IP addresses and ports for both node and mirror\n * node services.\n * @augments {Query<NodeAddressBook>}\n */\nexport default class AddressBookQueryWeb extends Query {\n /**\n * @param {object} props\n * @param {FileId | string} [props.fileId]\n * @param {number} [props.limit] - Page size limit (defaults to 25 for optimal performance)\n */\n constructor(props = {}) {\n super();\n\n /**\n * @private\n * @type {?FileId}\n */\n this._fileId = null;\n if (props.fileId != null) {\n this.setFileId(props.fileId);\n }\n\n /**\n * Page limit for the query\n * @private\n * @type {?number}\n */\n this._limit = null;\n if (props.limit != null) {\n this.setLimit(props.limit);\n }\n\n /**\n * @private\n * @type {(error: MirrorError | Error | null) => boolean}\n */\n this._retryHandler = (error) => {\n if (error != null) {\n if (error instanceof Error) {\n // Retry on all errors which are not `MirrorError` because they're\n // likely lower level HTTP errors\n return true;\n } else {\n // Retry on `NOT_FOUND`, `RESOURCE_EXHAUSTED`, `UNAVAILABLE`, and conditionally on `INTERNAL`\n // if the message matches the right regex.\n switch (error.code) {\n // INTERNAL\n // eslint-disable-next-line no-fallthrough\n case 13:\n return RST_STREAM.test(error.details.toString());\n // NOT_FOUND\n // eslint-disable-next-line no-fallthrough\n case 5:\n // RESOURCE_EXHAUSTED\n // eslint-disable-next-line no-fallthrough\n case 8:\n // UNAVAILABLE\n // eslint-disable-next-line no-fallthrough\n case 14:\n case 17:\n return true;\n default:\n return false;\n }\n }\n }\n\n return false;\n };\n\n /** @type {NodeAddress[]} */\n this._addresses = [];\n }\n\n /**\n * @returns {?FileId}\n */\n get fileId() {\n return this._fileId;\n }\n\n /**\n * @param {FileId | string} fileId\n * @returns {AddressBookQueryWeb}\n */\n setFileId(fileId) {\n this._fileId =\n typeof fileId === \"string\"\n ? FileId.fromString(fileId)\n : fileId.clone();\n\n return this;\n }\n\n /**\n * Page limit for the query\n * @returns {?number}\n */\n get limit() {\n return this._limit;\n }\n\n /**\n * Set the page limit for the query\n * @param {number} limit\n * @returns {AddressBookQueryWeb}\n */\n setLimit(limit) {\n this._limit = limit;\n\n return this;\n }\n\n /**\n * @param {number} attempts\n * @returns {this}\n */\n setMaxAttempts(attempts) {\n this._maxAttempts = attempts;\n return this;\n }\n\n /**\n * @param {number} backoff\n * @returns {this}\n */\n setMaxBackoff(backoff) {\n this._maxBackoff = backoff;\n return this;\n }\n\n /**\n * @param {Client<Channel>} client\n * @param {number=} requestTimeout\n * @returns {Promise<NodeAddressBook>}\n */\n execute(client, requestTimeout) {\n return new Promise((resolve, reject) => {\n void this._makeFetchRequest(\n client,\n resolve,\n reject,\n requestTimeout,\n );\n });\n }\n\n /**\n * @private\n * @param {Client<Channel>} client\n * @param {(value: NodeAddressBook) => void} resolve\n * @param {(error: Error) => void} reject\n * @param {number=} requestTimeout\n */\n async _makeFetchRequest(client, resolve, reject, requestTimeout) {\n const { port, address } =\n client._mirrorNetwork.getNextMirrorNode().address;\n\n let baseUrl = `${\n address.includes(\"127.0.0.1\") || address.includes(\"localhost\")\n ? \"http\"\n : \"https\"\n }://${address}`;\n\n if (port) {\n baseUrl = `${baseUrl}:${port}`;\n }\n\n // Initialize aggregated results\n this._addresses = [];\n let nextUrl = null;\n let isLastPage = false;\n\n // Build initial URL\n const initialUrl = new URL(`${baseUrl}/api/v1/network/nodes`);\n if (this._fileId != null) {\n initialUrl.searchParams.append(\"file.id\", this._fileId.toString());\n }\n\n // Use the specified limit, or default to DEFAULT_PAGE_SIZE for optimal pagination performance\n const effectiveLimit =\n this._limit != null ? this._limit : DEFAULT_PAGE_SIZE;\n initialUrl.searchParams.append(\"limit\", effectiveLimit.toString());\n\n // Fetch all pages\n while (!isLastPage) {\n const currentUrl = nextUrl ? new URL(nextUrl, baseUrl) : initialUrl;\n\n for (let attempt = 0; attempt <= this._maxAttempts; attempt++) {\n try {\n // eslint-disable-next-line n/no-unsupported-features/node-builtins\n const response = await fetch(currentUrl.toString(), {\n method: \"GET\",\n headers: {\n Accept: \"application/json\",\n },\n signal: requestTimeout\n ? AbortSignal.timeout(requestTimeout)\n : undefined,\n });\n\n if (!response.ok) {\n throw new Error(\n `HTTP error! status: ${response.status}`,\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const data = /** @type {AddressBookQueryWebResponse} */ (\n await response.json()\n );\n\n const nodes = data.nodes || [];\n\n // Aggregate nodes from this page\n const pageNodes = nodes.map((node) =>\n NodeAddress.fromJSON({\n nodeId: node.node_id.toString(),\n accountId: node.node_account_id,\n addresses:\n this._handleAddressesFromGrpcProxyEndpoint(\n node,\n client,\n ),\n certHash: node.node_cert_hash,\n publicKey: node.public_key,\n description: node.description,\n stake: node.stake?.toString(),\n }),\n );\n\n this._addresses.push(...pageNodes);\n nextUrl = data.links?.next || null;\n\n // If no more pages, set flag to exit loop\n if (!nextUrl) {\n isLastPage = true;\n }\n\n // Move to next page\n break;\n } catch (error) {\n console.error(\"Error in _makeFetchRequest:\", error);\n const message =\n error instanceof Error ? error.message : String(error);\n\n // Check if we should retry\n if (\n attempt < this._maxAttempts &&\n !client.isClientShutDown &&\n this._retryHandler(\n /** @type {MirrorError | Error | null} */ (error),\n )\n ) {\n const delay = Math.min(\n 250 * 2 ** attempt,\n this._maxBackoff,\n );\n\n if (this._logger) {\n this._logger.debug(\n `Error getting nodes from mirror for file ${\n this._fileId != null\n ? this._fileId.toString()\n : \"UNKNOWN\"\n } during attempt ${\n attempt + 1\n }. Waiting ${delay} ms before next attempt: ${message}`,\n );\n }\n\n // Wait before next attempt\n // eslint-disable-next-line ie11/no-loop-func\n await new Promise((resolve) =>\n setTimeout(resolve, delay),\n );\n continue;\n }\n\n // If we shouldn't retry or have exhausted attempts, reject\n const maxAttemptsReached = attempt >= this._maxAttempts;\n const errorMessage = maxAttemptsReached\n ? `Failed to query address book after ${\n this._maxAttempts + 1\n } attempts. Last error: ${message}`\n : `Failed to query address book: ${message}`;\n reject(new Error(errorMessage));\n return;\n }\n }\n }\n\n // Return the aggregated results\n const addressBook = new NodeAddressBook({\n nodeAddresses: this._addresses,\n });\n resolve(addressBook);\n }\n\n /**\n * Handles the grpc_proxy_endpoint fallback logic for a node.\n * @param {AddressBookQueryWebResponse['nodes'][number]} node - The node object from the mirror node response.\n * @param {Client<Channel>} client - The client instance.\n * @returns {Array<{address: string, port: string}>}\n */\n _handleAddressesFromGrpcProxyEndpoint(node, client) {\n const grpcProxyEndpoint = node.grpc_proxy_endpoint;\n\n if (\n grpcProxyEndpoint &&\n grpcProxyEndpoint.domain_name &&\n grpcProxyEndpoint.port\n ) {\n return [\n {\n address: grpcProxyEndpoint.domain_name,\n port: grpcProxyEndpoint.port.toString(),\n },\n ];\n }\n\n let networkConstant;\n const ledgerId = client._network.ledgerId;\n\n if (ledgerId && ledgerId.isMainnet()) {\n networkConstant = MAINNET;\n } else if (ledgerId && ledgerId.isTestnet()) {\n networkConstant = WEB_TESTNET;\n } else if (ledgerId && ledgerId.isPreviewnet()) {\n networkConstant = WEB_PREVIEWNET;\n } else {\n return [];\n }\n\n const nodeAccountId = node.node_account_id;\n\n for (const [address, accountIdObj] of Object.entries(networkConstant)) {\n if (accountIdObj.toString() === nodeAccountId) {\n const [domain_name, port] = address.split(\":\");\n\n return [\n {\n address: domain_name,\n port,\n },\n ];\n }\n }\n\n return [];\n }\n}\n"],"names":["AddressBookQueryWeb","Query","constructor","props","super","this","_fileId","fileId","setFileId","_limit","limit","setLimit","_retryHandler","error","Error","code","RST_STREAM","test","details","toString","_addresses","FileId","fromString","clone","setMaxAttempts","attempts","_maxAttempts","setMaxBackoff","backoff","_maxBackoff","execute","client","requestTimeout","Promise","resolve","reject","_makeFetchRequest","port","address","_mirrorNetwork","getNextMirrorNode","baseUrl","includes","nextUrl","isLastPage","initialUrl","URL","searchParams","append","effectiveLimit","currentUrl","attempt","response","fetch","method","headers","Accept","signal","AbortSignal","timeout","undefined","ok","status","data","json","pageNodes","nodes","map","node","NodeAddress","fromJSON","nodeId","node_id","accountId","node_account_id","addresses","_handleAddressesFromGrpcProxyEndpoint","certHash","node_cert_hash","publicKey","public_key","description","stake","push","links","next","console","message","String","isClientShutDown","delay","Math","min","_logger","debug","setTimeout","errorMessage","NodeAddressBook","nodeAddresses","grpcProxyEndpoint","grpc_proxy_endpoint","domain_name","networkConstant","ledgerId","_network","isMainnet","MAINNET","isTestnet","WEB_TESTNET","isPreviewnet","WEB_PREVIEWNET","nodeAccountId","accountIdObj","Object","entries","split"],"mappings":"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"}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _SemanticVersion = _interopRequireDefault(require("./SemanticVersion.cjs"));
|
|
8
|
-
var HieroProto = _interopRequireWildcard(require("@
|
|
8
|
+
var HieroProto = _interopRequireWildcard(require("@hiero-ledger/proto"));
|
|
9
9
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
10
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
11
|
// SPDX-License-Identifier: Apache-2.0
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"./SemanticVersion.js";import*as r from"@
|
|
1
|
+
import o from"./SemanticVersion.js";import*as r from"@hiero-ledger/proto";class e{constructor(o){this.protobufVersion=o.protobufVersion,this.servicesVersion=o.servicesVersion,Object.freeze(this)}static _fromProtobuf(r){return new e({protobufVersion:o._fromProtobuf(r.hapiProtoVersion),servicesVersion:o._fromProtobuf(r.hederaServicesVersion)})}_toProtobuf(){return{hapiProtoVersion:this.protobufVersion._toProtobuf(),hederaServicesVersion:this.servicesVersion._toProtobuf()}}static fromBytes(o){return e._fromProtobuf(r.proto.NetworkGetVersionInfoResponse.decode(o))}toBytes(){return r.proto.NetworkGetVersionInfoResponse.encode(this._toProtobuf()).finish()}}export{e as default};
|
|
2
2
|
//# sourceMappingURL=NetworkVersionInfo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkVersionInfo.js","sources":["../../src/network/NetworkVersionInfo.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport SemanticVersion from \"./SemanticVersion.js\";\nimport * as HieroProto from \"@
|
|
1
|
+
{"version":3,"file":"NetworkVersionInfo.js","sources":["../../src/network/NetworkVersionInfo.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport SemanticVersion from \"./SemanticVersion.js\";\nimport * as HieroProto from \"@hiero-ledger/proto\";\n\n/**\n * Response when the client sends the node CryptoGetVersionInfoQuery.\n */\nexport default class NetworkVersionInfo {\n /**\n * @private\n * @param {object} props\n * @param {SemanticVersion} props.protobufVersion\n * @param {SemanticVersion} props.servicesVersion\n */\n constructor(props) {\n /**\n * The account ID for which this information applies.\n *\n * @readonly\n */\n this.protobufVersion = props.protobufVersion;\n\n /**\n * The account ID for which this information applies.\n *\n * @readonly\n */\n this.servicesVersion = props.servicesVersion;\n\n Object.freeze(this);\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.INetworkGetVersionInfoResponse} info\n * @returns {NetworkVersionInfo}\n */\n static _fromProtobuf(info) {\n return new NetworkVersionInfo({\n protobufVersion: SemanticVersion._fromProtobuf(\n /** @type {HieroProto.proto.ISemanticVersion} */\n (info.hapiProtoVersion),\n ),\n servicesVersion: SemanticVersion._fromProtobuf(\n /** @type {HieroProto.proto.ISemanticVersion} */\n (info.hederaServicesVersion),\n ),\n });\n }\n\n /**\n * @internal\n * @returns {HieroProto.proto.INetworkGetVersionInfoResponse}\n */\n _toProtobuf() {\n return {\n hapiProtoVersion: this.protobufVersion._toProtobuf(),\n hederaServicesVersion: this.servicesVersion._toProtobuf(),\n };\n }\n\n /**\n * @param {Uint8Array} bytes\n * @returns {NetworkVersionInfo}\n */\n static fromBytes(bytes) {\n return NetworkVersionInfo._fromProtobuf(\n HieroProto.proto.NetworkGetVersionInfoResponse.decode(bytes),\n );\n }\n\n /**\n * @returns {Uint8Array}\n */\n toBytes() {\n return HieroProto.proto.NetworkGetVersionInfoResponse.encode(\n this._toProtobuf(),\n ).finish();\n }\n}\n"],"names":["NetworkVersionInfo","constructor","props","this","protobufVersion","servicesVersion","Object","freeze","_fromProtobuf","info","SemanticVersion","_toProtobuf","hapiProtoVersion","hederaServicesVersion","fromBytes","bytes","HieroProto","proto","NetworkGetVersionInfoResponse","decode","toBytes","encode","finish"],"mappings":"0EAQe,MAAMA,EAOjB,WAAAC,CAAYC,GAMRC,KAAKC,gBAAkBF,EAAME,gBAO7BD,KAAKE,gBAAkBH,EAAMG,gBAE7BC,OAAOC,OAAOJ,KACtB,CAOI,oBAAOK,CAAcC,GACjB,OAAO,IAAIT,EAAmB,CAC1BI,gBAAiBM,EAAgBF,cAE5BC,EAAqB,kBAE1BJ,gBAAiBK,EAAgBF,cAE5BC,EAA0B,wBAG3C,CAMI,WAAAE,GACI,MAAO,CACHC,iBAAkBT,KAAKC,gBAAgBO,cACvCE,sBAAuBV,KAAKE,gBAAgBM,cAExD,CAMI,gBAAOG,CAAUC,GACb,OAAOf,EAAmBQ,cACtBQ,EAAWC,MAAMC,8BAA8BC,OAAOJ,GAElE,CAKI,OAAAK,GACI,OAAOJ,EAAWC,MAAMC,8BAA8BG,OAClDlB,KAAKQ,eACPW,QACV"}
|
|
@@ -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.IQuery} HieroProto.proto.IQuery
|
|
16
|
+
* @typedef {import("@hiero-ledger/proto").proto.IQueryHeader} HieroProto.proto.IQueryHeader
|
|
17
|
+
* @typedef {import("@hiero-ledger/proto").proto.IResponse} HieroProto.proto.IResponse
|
|
18
|
+
* @typedef {import("@hiero-ledger/proto").proto.IResponseHeader} HieroProto.proto.IResponseHeader
|
|
19
|
+
* @typedef {import("@hiero-ledger/proto").proto.INetworkGetVersionInfoQuery} HieroProto.proto.INetworkGetVersionInfoQuery
|
|
20
|
+
* @typedef {import("@hiero-ledger/proto").proto.INetworkGetVersionInfoResponse} HieroProto.proto.INetworkGetVersionInfoResponse
|
|
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.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.INetworkGetVersionInfoQuery} HieroProto.proto.INetworkGetVersionInfoQuery
|
|
8
|
+
* @typedef {import("@hiero-ledger/proto").proto.INetworkGetVersionInfoResponse} HieroProto.proto.INetworkGetVersionInfoResponse
|
|
9
9
|
*/
|
|
10
10
|
/**
|
|
11
11
|
* @typedef {import("../channel/Channel.js").default} Channel
|
|
@@ -37,12 +37,12 @@ export default class NetworkVersionInfoQuery extends Query<NetworkVersionInfo> {
|
|
|
37
37
|
}
|
|
38
38
|
export namespace HieroProto {
|
|
39
39
|
namespace proto {
|
|
40
|
-
type IQuery = import("@
|
|
41
|
-
type IQueryHeader = import("@
|
|
42
|
-
type IResponse = import("@
|
|
43
|
-
type IResponseHeader = import("@
|
|
44
|
-
type INetworkGetVersionInfoQuery = import("@
|
|
45
|
-
type INetworkGetVersionInfoResponse = import("@
|
|
40
|
+
type IQuery = import("@hiero-ledger/proto").proto.IQuery;
|
|
41
|
+
type IQueryHeader = import("@hiero-ledger/proto").proto.IQueryHeader;
|
|
42
|
+
type IResponse = import("@hiero-ledger/proto").proto.IResponse;
|
|
43
|
+
type IResponseHeader = import("@hiero-ledger/proto").proto.IResponseHeader;
|
|
44
|
+
type INetworkGetVersionInfoQuery = import("@hiero-ledger/proto").proto.INetworkGetVersionInfoQuery;
|
|
45
|
+
type INetworkGetVersionInfoResponse = import("@hiero-ledger/proto").proto.INetworkGetVersionInfoResponse;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
export type Channel = import("../channel/Channel.js").default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkVersionInfoQuery.js","sources":["../../src/network/NetworkVersionInfoQuery.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Query, { QUERY_REGISTRY } from \"../query/Query.js\";\nimport NetworkVersionInfo from \"./NetworkVersionInfo.js\";\n\n/**\n * @namespace proto\n * @typedef {import(\"@
|
|
1
|
+
{"version":3,"file":"NetworkVersionInfoQuery.js","sources":["../../src/network/NetworkVersionInfoQuery.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Query, { QUERY_REGISTRY } from \"../query/Query.js\";\nimport NetworkVersionInfo from \"./NetworkVersionInfo.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.INetworkGetVersionInfoQuery} HieroProto.proto.INetworkGetVersionInfoQuery\n * @typedef {import(\"@hiero-ledger/proto\").proto.INetworkGetVersionInfoResponse} HieroProto.proto.INetworkGetVersionInfoResponse\n */\n\n/**\n * @typedef {import(\"../channel/Channel.js\").default} Channel\n */\n\n/**\n *\n * A query to retrieve version information about the Hedera network.\n *\n * This query returns information about the versions of both the Hedera Services software\n * and the protobuf schema in use by the network. This information is useful for ensuring\n * client-network compatibility and debugging version-related issues.\n *\n * @augments {Query<NetworkVersionInfo>}\n */\nexport default class NetworkVersionInfoQuery extends Query {\n constructor() {\n super();\n }\n\n /**\n * @param {HieroProto.proto.IQuery} query\n * @returns {NetworkVersionInfoQuery}\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n static _fromProtobuf(query) {\n return new NetworkVersionInfoQuery();\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.network.getVersionInfo(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 networkGetVersionInfo =\n /** @type {HieroProto.proto.INetworkGetVersionInfoResponse} */ (\n response.networkGetVersionInfo\n );\n return /** @type {HieroProto.proto.IResponseHeader} */ (\n networkGetVersionInfo.header\n );\n }\n\n /**\n * @protected\n * @override\n * @param {HieroProto.proto.IResponse} response\n * @returns {Promise<NetworkVersionInfo>}\n */\n _mapResponse(response) {\n const info =\n /** @type {HieroProto.proto.INetworkGetVersionInfoResponse} */ (\n response.networkGetVersionInfo\n );\n return Promise.resolve(NetworkVersionInfo._fromProtobuf(info));\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 networkGetVersionInfo: {\n header,\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 `NetworkVersionInfoQuery:${timestamp.toString()}`;\n }\n}\n\nQUERY_REGISTRY.set(\n \"networkGetVersionInfo\",\n // eslint-disable-next-line @typescript-eslint/unbound-method\n NetworkVersionInfoQuery._fromProtobuf,\n);\n"],"names":["NetworkVersionInfoQuery","Query","constructor","super","_fromProtobuf","query","_execute","channel","request","network","getVersionInfo","_mapResponseHeader","response","_mapResponse","info","Promise","resolve","NetworkVersionInfo","_onMakeRequest","header","networkGetVersionInfo","_getLogId","this","_paymentTransactionId","validStart","_timestamp","toString","QUERY_REGISTRY","set"],"mappings":"6FA6Be,MAAMA,UAAgCC,EACjD,WAAAC,GACIC,OACR,CAOI,oBAAOC,CAAcC,GACjB,OAAO,IAAIL,CACnB,CASI,QAAAM,CAASC,EAASC,GACd,OAAOD,EAAQE,QAAQC,eAAeF,EAC9C,CAQI,kBAAAG,CAAmBC,GAKf,OAFQA,EACH,sBAGb,MACA,CAQI,YAAAC,CAAaD,GACT,MAAME,EAEEF,EACH,sBACL,OAAOG,QAAQC,QAAQC,EAAmBb,cAAcU,GAChE,CAQI,cAAAI,CAAeC,GACX,MAAO,CACHC,sBAAuB,CACnBD,UAGhB,CAKI,SAAAE,GAOI,MAAO,4BAL2B,MAA9BC,KAAKC,uBACoC,MAAzCD,KAAKC,sBAAsBC,WACrBF,KAAKC,sBAAsBC,WAC3BF,KAAKG,YAE6BC,YACpD,EAGAC,EAAeC,IACX,wBAEA5B,EAAwBI"}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var HieroProto = _interopRequireWildcard(require("@
|
|
7
|
+
var HieroProto = _interopRequireWildcard(require("@hiero-ledger/proto"));
|
|
8
8
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
9
9
|
// SPDX-License-Identifier: Apache-2.0
|
|
10
10
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as o from"@hiero-ledger/proto";class t{constructor(o){this.major=o.major,this.minor=o.minor,this.patch=o.patch,Object.freeze(this)}static _fromProtobuf(o){return new t({major:o.major,minor:o.minor,patch:o.patch})}_toProtobuf(){return{major:this.major,minor:this.minor,patch:this.patch}}static fromBytes(r){return t._fromProtobuf(o.proto.SemanticVersion.decode(r))}toBytes(){return o.proto.SemanticVersion.encode(this._toProtobuf()).finish()}}export{t as default};
|
|
2
2
|
//# sourceMappingURL=SemanticVersion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SemanticVersion.js","sources":["../../src/network/SemanticVersion.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport * as HieroProto from \"@
|
|
1
|
+
{"version":3,"file":"SemanticVersion.js","sources":["../../src/network/SemanticVersion.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport * as HieroProto from \"@hiero-ledger/proto\";\n/**\n * Represents a semantic versioning structure for software components.\n *\n * This class encapsulates the major, minor, and patch version numbers, following\n * the Semantic Versioning (SemVer) specification. It provides methods for creating,\n * comparing, and manipulating version numbers, ensuring that versioning adheres to\n * the SemVer rules.\n */\nexport default class SemanticVersion {\n /**\n * @private\n * @param {object} props\n * @param {number} props.major\n * @param {number} props.minor\n * @param {number} props.patch\n */\n constructor(props) {\n /** @readonly */\n this.major = props.major;\n /** @readonly */\n this.minor = props.minor;\n /** @readonly */\n this.patch = props.patch;\n\n Object.freeze(this);\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.ISemanticVersion} version\n * @returns {SemanticVersion}\n */\n static _fromProtobuf(version) {\n return new SemanticVersion({\n major: /** @type {number} */ (version.major),\n minor: /** @type {number} */ (version.minor),\n patch: /** @type {number} */ (version.patch),\n });\n }\n\n /**\n * @internal\n * @returns {HieroProto.proto.ISemanticVersion}\n */\n _toProtobuf() {\n return {\n major: this.major,\n minor: this.minor,\n patch: this.patch,\n };\n }\n\n /**\n * @param {Uint8Array} bytes\n * @returns {SemanticVersion}\n */\n static fromBytes(bytes) {\n return SemanticVersion._fromProtobuf(\n HieroProto.proto.SemanticVersion.decode(bytes),\n );\n }\n\n /**\n * @returns {Uint8Array}\n */\n toBytes() {\n return HieroProto.proto.SemanticVersion.encode(\n this._toProtobuf(),\n ).finish();\n }\n}\n"],"names":["SemanticVersion","constructor","props","this","major","minor","patch","Object","freeze","_fromProtobuf","version","_toProtobuf","fromBytes","bytes","HieroProto","proto","decode","toBytes","encode","finish"],"mappings":"sCAWe,MAAMA,EAQjB,WAAAC,CAAYC,GAERC,KAAKC,MAAQF,EAAME,MAEnBD,KAAKE,MAAQH,EAAMG,MAEnBF,KAAKG,MAAQJ,EAAMI,MAEnBC,OAAOC,OAAOL,KACtB,CAOI,oBAAOM,CAAcC,GACjB,OAAO,IAAIV,EAAgB,CACvBI,MAA8BM,EAAa,MAC3CL,MAA8BK,EAAa,MAC3CJ,MAA8BI,EAAa,OAEvD,CAMI,WAAAC,GACI,MAAO,CACHP,MAAOD,KAAKC,MACZC,MAAOF,KAAKE,MACZC,MAAOH,KAAKG,MAExB,CAMI,gBAAOM,CAAUC,GACb,OAAOb,EAAgBS,cACnBK,EAAWC,MAAMf,gBAAgBgB,OAAOH,GAEpD,CAKI,OAAAI,GACI,OAAOH,EAAWC,MAAMf,gBAAgBkB,OACpCf,KAAKQ,eACPQ,QACV"}
|
|
@@ -18,16 +18,16 @@ const SERVICE_ENDPOINTS_MAX_LENGTH = 8;
|
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* @namespace proto
|
|
21
|
-
* @typedef {import("@
|
|
22
|
-
* @typedef {import("@
|
|
23
|
-
* @typedef {import("@
|
|
24
|
-
* @typedef {import("@
|
|
25
|
-
* @typedef {import("@
|
|
21
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransaction} ITransaction
|
|
22
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransaction} ISignedTransaction
|
|
23
|
+
* @typedef {import("@hiero-ledger/proto").proto.TransactionBody} TransactionBody
|
|
24
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionBody} ITransactionBody
|
|
25
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionResponse} ITransactionResponse
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* @namespace com.hedera.hapi.node.addressbook
|
|
30
|
-
* @typedef {import("@
|
|
30
|
+
* @typedef {import("@hiero-ledger/proto").com.hedera.hapi.node.addressbook.INodeCreateTransactionBody} INodeCreateTransactionBody
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
33
|
/**
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @namespace proto
|
|
3
|
-
* @typedef {import("@
|
|
4
|
-
* @typedef {import("@
|
|
5
|
-
* @typedef {import("@
|
|
6
|
-
* @typedef {import("@
|
|
7
|
-
* @typedef {import("@
|
|
3
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransaction} ITransaction
|
|
4
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransaction} ISignedTransaction
|
|
5
|
+
* @typedef {import("@hiero-ledger/proto").proto.TransactionBody} TransactionBody
|
|
6
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionBody} ITransactionBody
|
|
7
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionResponse} ITransactionResponse
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
10
|
* @namespace com.hedera.hapi.node.addressbook
|
|
11
|
-
* @typedef {import("@
|
|
11
|
+
* @typedef {import("@hiero-ledger/proto").com.hedera.hapi.node.addressbook.INodeCreateTransactionBody} INodeCreateTransactionBody
|
|
12
12
|
*/
|
|
13
13
|
/**
|
|
14
14
|
* @typedef {import("../channel/Channel.js").default} Channel
|
|
@@ -224,12 +224,12 @@ export default class NodeCreateTransaction extends Transaction {
|
|
|
224
224
|
*/
|
|
225
225
|
protected override _makeTransactionData(): INodeCreateTransactionBody;
|
|
226
226
|
}
|
|
227
|
-
export type ITransaction = import("@
|
|
228
|
-
export type ISignedTransaction = import("@
|
|
229
|
-
export type TransactionBody = import("@
|
|
230
|
-
export type ITransactionBody = import("@
|
|
231
|
-
export type ITransactionResponse = import("@
|
|
232
|
-
export type INodeCreateTransactionBody = import("@
|
|
227
|
+
export type ITransaction = import("@hiero-ledger/proto").proto.ITransaction;
|
|
228
|
+
export type ISignedTransaction = import("@hiero-ledger/proto").proto.ITransaction;
|
|
229
|
+
export type TransactionBody = import("@hiero-ledger/proto").proto.TransactionBody;
|
|
230
|
+
export type ITransactionBody = import("@hiero-ledger/proto").proto.ITransactionBody;
|
|
231
|
+
export type ITransactionResponse = import("@hiero-ledger/proto").proto.ITransactionResponse;
|
|
232
|
+
export type INodeCreateTransactionBody = import("@hiero-ledger/proto").com.hedera.hapi.node.addressbook.INodeCreateTransactionBody;
|
|
233
233
|
export type Channel = import("../channel/Channel.js").default;
|
|
234
234
|
export type TransactionId = import("../transaction/TransactionId.js").default;
|
|
235
235
|
export type Client = import("../client/Client.js").default<any, any>;
|