@hiero-ledger/sdk 2.77.0 → 2.78.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/dist/umd.js +592 -592
- package/dist/umd.min.js +2 -2
- package/lib/Cache.cjs +6 -6
- package/lib/Cache.d.ts +12 -12
- package/lib/Cache.js.map +1 -1
- package/lib/Duration.cjs +1 -1
- package/lib/Duration.d.ts +2 -2
- package/lib/Duration.js.map +1 -1
- package/lib/EntityIdHelper.cjs +1 -1
- package/lib/EntityIdHelper.js +1 -1
- package/lib/EntityIdHelper.js.map +1 -1
- package/lib/EthereumFlow.cjs +7 -7
- package/lib/EthereumFlow.d.ts +14 -14
- package/lib/EthereumFlow.js.map +1 -1
- package/lib/EthereumTransaction.cjs +7 -7
- package/lib/EthereumTransaction.d.ts +14 -14
- package/lib/EthereumTransaction.js.map +1 -1
- package/lib/EvmAddress.cjs +1 -1
- package/lib/EvmAddress.d.ts +2 -2
- package/lib/EvmAddress.js.map +1 -1
- package/lib/ExchangeRate.cjs +2 -2
- package/lib/ExchangeRate.d.ts +4 -4
- package/lib/ExchangeRate.js.map +1 -1
- package/lib/ExchangeRates.cjs +1 -1
- package/lib/ExchangeRates.d.ts +1 -1
- package/lib/ExchangeRates.js +1 -1
- package/lib/ExchangeRates.js.map +1 -1
- package/lib/FeeComponents.cjs +1 -1
- package/lib/FeeComponents.d.ts +1 -1
- package/lib/FeeComponents.js +1 -1
- package/lib/FeeComponents.js.map +1 -1
- package/lib/FeeData.cjs +1 -1
- package/lib/FeeData.d.ts +1 -1
- package/lib/FeeData.js +1 -1
- package/lib/FeeData.js.map +1 -1
- package/lib/FeeDataType.cjs +1 -1
- package/lib/FeeDataType.d.ts +2 -2
- package/lib/FeeDataType.js.map +1 -1
- package/lib/FeeSchedule.cjs +1 -1
- package/lib/FeeSchedule.d.ts +1 -1
- package/lib/FeeSchedule.js +1 -1
- package/lib/FeeSchedule.js.map +1 -1
- package/lib/FeeSchedules.cjs +1 -1
- package/lib/FeeSchedules.d.ts +1 -1
- package/lib/FeeSchedules.js +1 -1
- package/lib/FeeSchedules.js.map +1 -1
- package/lib/FreezeType.cjs +1 -1
- package/lib/FreezeType.d.ts +2 -2
- package/lib/FreezeType.js.map +1 -1
- package/lib/Key.cjs +1 -1
- package/lib/Key.d.ts +2 -2
- package/lib/Key.js.map +1 -1
- package/lib/KeyList.cjs +3 -3
- package/lib/KeyList.d.ts +6 -6
- package/lib/KeyList.js.map +1 -1
- package/lib/Mnemonic.cjs +1 -1
- package/lib/Mnemonic.d.ts +1 -1
- package/lib/Mnemonic.js +1 -1
- package/lib/Mnemonic.js.map +1 -1
- package/lib/PrivateKey.cjs +7 -7
- package/lib/PrivateKey.d.ts +11 -11
- package/lib/PrivateKey.js +1 -1
- package/lib/PrivateKey.js.map +1 -1
- package/lib/PrngTransaction.cjs +9 -9
- package/lib/PrngTransaction.d.ts +18 -18
- package/lib/PrngTransaction.js.map +1 -1
- package/lib/PublicKey.cjs +5 -5
- package/lib/PublicKey.d.ts +9 -9
- package/lib/PublicKey.js +1 -1
- package/lib/PublicKey.js.map +1 -1
- package/lib/RequestType.cjs +1 -1
- package/lib/RequestType.d.ts +2 -2
- package/lib/RequestType.js.map +1 -1
- package/lib/StakingInfo.cjs +1 -1
- package/lib/StakingInfo.d.ts +1 -1
- package/lib/StakingInfo.js +1 -1
- package/lib/StakingInfo.js.map +1 -1
- package/lib/Status.cjs +1 -1
- package/lib/Status.d.ts +2 -2
- package/lib/Status.js.map +1 -1
- package/lib/Timestamp.cjs +1 -1
- package/lib/Timestamp.d.ts +1 -1
- package/lib/Timestamp.js.map +1 -1
- package/lib/TransactionFeeSchedule.cjs +1 -1
- package/lib/TransactionFeeSchedule.d.ts +1 -1
- package/lib/TransactionFeeSchedule.js +1 -1
- package/lib/TransactionFeeSchedule.js.map +1 -1
- package/lib/Transfer.cjs +2 -2
- package/lib/Transfer.d.ts +4 -4
- package/lib/Transfer.js.map +1 -1
- package/lib/account/AccountAllowanceAdjustTransaction.cjs +7 -7
- package/lib/account/AccountAllowanceAdjustTransaction.d.ts +14 -14
- package/lib/account/AccountAllowanceAdjustTransaction.js.map +1 -1
- package/lib/account/AccountAllowanceApproveTransaction.cjs +8 -8
- package/lib/account/AccountAllowanceApproveTransaction.d.ts +16 -16
- package/lib/account/AccountAllowanceApproveTransaction.js.map +1 -1
- package/lib/account/AccountAllowanceDeleteTransaction.cjs +7 -7
- package/lib/account/AccountAllowanceDeleteTransaction.d.ts +14 -14
- package/lib/account/AccountAllowanceDeleteTransaction.js.map +1 -1
- package/lib/account/AccountBalance.cjs +1 -1
- package/lib/account/AccountBalance.d.ts +1 -1
- package/lib/account/AccountBalance.js +1 -1
- package/lib/account/AccountBalance.js.map +1 -1
- package/lib/account/AccountBalanceQuery.cjs +6 -6
- package/lib/account/AccountBalanceQuery.d.ts +12 -12
- package/lib/account/AccountBalanceQuery.js.map +1 -1
- package/lib/account/AccountCreateTransaction.cjs +1 -1
- package/lib/account/AccountCreateTransaction.d.ts +1 -1
- package/lib/account/AccountCreateTransaction.js +1 -1
- package/lib/account/AccountCreateTransaction.js.map +1 -1
- package/lib/account/AccountDeleteTransaction.cjs +7 -7
- package/lib/account/AccountDeleteTransaction.d.ts +14 -14
- package/lib/account/AccountDeleteTransaction.js.map +1 -1
- package/lib/account/AccountId.cjs +1 -1
- package/lib/account/AccountId.d.ts +1 -1
- package/lib/account/AccountId.js +1 -1
- package/lib/account/AccountId.js.map +1 -1
- package/lib/account/AccountInfo.cjs +1 -1
- package/lib/account/AccountInfo.d.ts +1 -1
- package/lib/account/AccountInfo.js +1 -1
- package/lib/account/AccountInfo.js.map +1 -1
- package/lib/account/AccountInfoQuery.cjs +7 -7
- package/lib/account/AccountInfoQuery.d.ts +14 -14
- package/lib/account/AccountInfoQuery.js.map +1 -1
- package/lib/account/AccountRecordsQuery.cjs +7 -7
- package/lib/account/AccountRecordsQuery.d.ts +14 -14
- package/lib/account/AccountRecordsQuery.js.map +1 -1
- package/lib/account/AccountUpdateTransaction.cjs +7 -7
- package/lib/account/AccountUpdateTransaction.d.ts +14 -14
- package/lib/account/AccountUpdateTransaction.js.map +1 -1
- package/lib/account/HbarAllowance.cjs +3 -3
- package/lib/account/HbarAllowance.d.ts +6 -6
- package/lib/account/HbarAllowance.js.map +1 -1
- package/lib/account/HbarTransferMap.cjs +2 -2
- package/lib/account/HbarTransferMap.d.ts +4 -4
- package/lib/account/HbarTransferMap.js.map +1 -1
- package/lib/account/LiveHash.cjs +3 -3
- package/lib/account/LiveHash.d.ts +6 -6
- package/lib/account/LiveHash.js.map +1 -1
- package/lib/account/LiveHashAddTransaction.cjs +7 -7
- package/lib/account/LiveHashAddTransaction.d.ts +14 -14
- package/lib/account/LiveHashAddTransaction.js.map +1 -1
- package/lib/account/LiveHashDeleteTransaction.cjs +6 -6
- package/lib/account/LiveHashDeleteTransaction.d.ts +12 -12
- package/lib/account/LiveHashDeleteTransaction.js.map +1 -1
- package/lib/account/LiveHashQuery.cjs +7 -7
- package/lib/account/LiveHashQuery.d.ts +14 -14
- package/lib/account/LiveHashQuery.js.map +1 -1
- package/lib/account/NullableTokenDecimalMap.cjs +2 -2
- package/lib/account/NullableTokenDecimalMap.d.ts +4 -4
- package/lib/account/NullableTokenDecimalMap.js.map +1 -1
- package/lib/account/ProxyStaker.cjs +2 -2
- package/lib/account/ProxyStaker.d.ts +4 -4
- package/lib/account/ProxyStaker.js.map +1 -1
- package/lib/account/TokenAllowance.cjs +4 -4
- package/lib/account/TokenAllowance.d.ts +8 -8
- package/lib/account/TokenAllowance.js.map +1 -1
- package/lib/account/TokenBalanceMap.cjs +2 -2
- package/lib/account/TokenBalanceMap.d.ts +4 -4
- package/lib/account/TokenBalanceMap.js.map +1 -1
- package/lib/account/TokenDecimalMap.cjs +2 -2
- package/lib/account/TokenDecimalMap.d.ts +4 -4
- package/lib/account/TokenDecimalMap.js.map +1 -1
- package/lib/account/TokenNftAllowance.cjs +5 -5
- package/lib/account/TokenNftAllowance.d.ts +10 -10
- package/lib/account/TokenNftAllowance.js.map +1 -1
- package/lib/account/TokenNftTransferMap.cjs +5 -5
- package/lib/account/TokenNftTransferMap.d.ts +10 -10
- package/lib/account/TokenNftTransferMap.js.map +1 -1
- package/lib/account/TokenRelationship.cjs +4 -4
- package/lib/account/TokenRelationship.d.ts +8 -8
- package/lib/account/TokenRelationship.js.map +1 -1
- package/lib/account/TokenRelationshipMap.cjs +2 -2
- package/lib/account/TokenRelationshipMap.d.ts +4 -4
- package/lib/account/TokenRelationshipMap.js.map +1 -1
- package/lib/account/TokenTransferMap.cjs +4 -4
- package/lib/account/TokenTransferMap.d.ts +8 -8
- package/lib/account/TokenTransferMap.js.map +1 -1
- package/lib/account/TransferTransaction.cjs +6 -6
- package/lib/account/TransferTransaction.d.ts +12 -12
- package/lib/account/TransferTransaction.js.map +1 -1
- package/lib/address_book/AddressBooks.cjs +1 -1
- package/lib/address_book/AddressBooks.js +1 -1
- package/lib/address_book/AddressBooks.js.map +1 -1
- package/lib/address_book/Endpoint.cjs +1 -1
- package/lib/address_book/Endpoint.d.ts +2 -2
- package/lib/address_book/Endpoint.js.map +1 -1
- package/lib/address_book/NodeAddress.cjs +1 -1
- package/lib/address_book/NodeAddress.d.ts +2 -2
- package/lib/address_book/NodeAddress.js.map +1 -1
- package/lib/address_book/NodeAddressBook.cjs +1 -1
- package/lib/address_book/NodeAddressBook.d.ts +1 -1
- package/lib/address_book/NodeAddressBook.js +1 -1
- package/lib/address_book/NodeAddressBook.js.map +1 -1
- package/lib/browser.js +1 -1
- package/lib/channel/Channel.cjs +1 -1
- package/lib/channel/Channel.d.ts +1 -1
- package/lib/channel/Channel.js +1 -1
- package/lib/channel/Channel.js.map +1 -1
- package/lib/contract/ContractByteCodeQuery.cjs +6 -6
- package/lib/contract/ContractByteCodeQuery.d.ts +12 -12
- package/lib/contract/ContractByteCodeQuery.js.map +1 -1
- package/lib/contract/ContractCallQuery.cjs +1 -1
- package/lib/contract/ContractCallQuery.d.ts +1 -1
- package/lib/contract/ContractCallQuery.js +1 -1
- package/lib/contract/ContractCallQuery.js.map +1 -1
- package/lib/contract/ContractCreateTransaction.cjs +8 -8
- package/lib/contract/ContractCreateTransaction.d.ts +16 -16
- package/lib/contract/ContractCreateTransaction.js.map +1 -1
- package/lib/contract/ContractDeleteTransaction.cjs +8 -8
- package/lib/contract/ContractDeleteTransaction.d.ts +16 -16
- package/lib/contract/ContractDeleteTransaction.js.map +1 -1
- package/lib/contract/ContractExecuteTransaction.cjs +9 -9
- package/lib/contract/ContractExecuteTransaction.d.ts +18 -18
- package/lib/contract/ContractExecuteTransaction.js.map +1 -1
- package/lib/contract/ContractFunctionResult.cjs +2 -2
- package/lib/contract/ContractFunctionResult.d.ts +4 -4
- package/lib/contract/ContractFunctionResult.js.map +1 -1
- package/lib/contract/ContractId.cjs +1 -1
- package/lib/contract/ContractId.d.ts +1 -1
- package/lib/contract/ContractId.js +1 -1
- package/lib/contract/ContractId.js.map +1 -1
- package/lib/contract/ContractInfo.cjs +1 -1
- package/lib/contract/ContractInfo.d.ts +1 -1
- package/lib/contract/ContractInfo.js +1 -1
- package/lib/contract/ContractInfo.js.map +1 -1
- package/lib/contract/ContractInfoQuery.cjs +7 -7
- package/lib/contract/ContractInfoQuery.d.ts +14 -14
- package/lib/contract/ContractInfoQuery.js.map +1 -1
- package/lib/contract/ContractLogInfo.cjs +2 -2
- package/lib/contract/ContractLogInfo.d.ts +4 -4
- package/lib/contract/ContractLogInfo.js.map +1 -1
- package/lib/contract/ContractNonceInfo.cjs +3 -3
- package/lib/contract/ContractNonceInfo.d.ts +4 -4
- package/lib/contract/ContractNonceInfo.js +1 -1
- package/lib/contract/ContractNonceInfo.js.map +1 -1
- package/lib/contract/ContractStateChange.cjs +1 -1
- package/lib/contract/ContractStateChange.d.ts +1 -1
- package/lib/contract/ContractUpdateTransaction.cjs +10 -10
- package/lib/contract/ContractUpdateTransaction.d.ts +18 -18
- package/lib/contract/ContractUpdateTransaction.js +1 -1
- package/lib/contract/ContractUpdateTransaction.js.map +1 -1
- package/lib/contract/DelegateContractId.cjs +2 -2
- package/lib/contract/DelegateContractId.d.ts +4 -4
- package/lib/contract/DelegateContractId.js.map +1 -1
- package/lib/contract/StorageChange.cjs +1 -1
- package/lib/contract/StorageChange.d.ts +1 -1
- package/lib/exports.cjs +1 -1
- package/lib/exports.d.ts +1 -1
- package/lib/exports.js +1 -1
- package/lib/exports.js.map +1 -1
- package/lib/file/FileAppendTransaction.cjs +7 -7
- package/lib/file/FileAppendTransaction.d.ts +14 -14
- package/lib/file/FileAppendTransaction.js.map +1 -1
- package/lib/file/FileContentsQuery.cjs +7 -7
- package/lib/file/FileContentsQuery.d.ts +14 -14
- package/lib/file/FileContentsQuery.js.map +1 -1
- package/lib/file/FileCreateTransaction.cjs +6 -6
- package/lib/file/FileCreateTransaction.d.ts +12 -12
- package/lib/file/FileCreateTransaction.js.map +1 -1
- package/lib/file/FileDeleteTransaction.cjs +7 -7
- package/lib/file/FileDeleteTransaction.d.ts +14 -14
- package/lib/file/FileDeleteTransaction.js.map +1 -1
- package/lib/file/FileId.cjs +1 -1
- package/lib/file/FileId.d.ts +1 -1
- package/lib/file/FileId.js +1 -1
- package/lib/file/FileId.js.map +1 -1
- package/lib/file/FileInfo.cjs +1 -1
- package/lib/file/FileInfo.d.ts +1 -1
- package/lib/file/FileInfo.js +1 -1
- package/lib/file/FileInfo.js.map +1 -1
- package/lib/file/FileInfoQuery.cjs +7 -7
- package/lib/file/FileInfoQuery.d.ts +14 -14
- package/lib/file/FileInfoQuery.js.map +1 -1
- package/lib/file/FileUpdateTransaction.cjs +6 -6
- package/lib/file/FileUpdateTransaction.d.ts +12 -12
- package/lib/file/FileUpdateTransaction.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/native.js +1 -1
- package/lib/network/AddressBookQuery.cjs +1 -1
- package/lib/network/AddressBookQuery.js +1 -1
- package/lib/network/AddressBookQuery.js.map +1 -1
- package/lib/network/NetworkVersionInfo.cjs +1 -1
- package/lib/network/NetworkVersionInfo.d.ts +1 -1
- package/lib/network/NetworkVersionInfo.js +1 -1
- package/lib/network/NetworkVersionInfo.js.map +1 -1
- package/lib/network/NetworkVersionInfoQuery.cjs +6 -6
- package/lib/network/NetworkVersionInfoQuery.d.ts +12 -12
- package/lib/network/NetworkVersionInfoQuery.js.map +1 -1
- package/lib/network/SemanticVersion.cjs +1 -1
- package/lib/network/SemanticVersion.d.ts +1 -1
- package/lib/network/SemanticVersion.js +1 -1
- package/lib/network/SemanticVersion.js.map +1 -1
- package/lib/node/NodeCreateTransaction.cjs +6 -6
- package/lib/node/NodeCreateTransaction.d.ts +12 -12
- package/lib/node/NodeCreateTransaction.js.map +1 -1
- package/lib/node/NodeDeleteTransaction.cjs +6 -6
- package/lib/node/NodeDeleteTransaction.d.ts +12 -12
- package/lib/node/NodeDeleteTransaction.js.map +1 -1
- package/lib/node/NodeUpdateTransaction.cjs +6 -6
- package/lib/node/NodeUpdateTransaction.d.ts +12 -12
- package/lib/node/NodeUpdateTransaction.js.map +1 -1
- package/lib/node/ServiceEndpoint.cjs +1 -1
- package/lib/node/ServiceEndpoint.d.ts +2 -2
- package/lib/node/ServiceEndpoint.js.map +1 -1
- package/lib/query/CostQuery.cjs +1 -1
- package/lib/query/CostQuery.d.ts +1 -1
- package/lib/query/CostQuery.js +1 -1
- package/lib/query/CostQuery.js.map +1 -1
- package/lib/query/Query.cjs +1 -1
- package/lib/query/Query.d.ts +1 -1
- package/lib/query/Query.js +1 -1
- package/lib/query/Query.js.map +1 -1
- package/lib/query/QueryBase.cjs +1 -1
- package/lib/query/QueryBase.d.ts +1 -1
- package/lib/query/QueryBase.js +1 -1
- package/lib/query/QueryBase.js.map +1 -1
- package/lib/schedule/ScheduleCreateTransaction.cjs +1 -1
- package/lib/schedule/ScheduleCreateTransaction.d.ts +1 -1
- package/lib/schedule/ScheduleCreateTransaction.js +1 -1
- package/lib/schedule/ScheduleCreateTransaction.js.map +1 -1
- package/lib/schedule/ScheduleDeleteTransaction.cjs +8 -8
- package/lib/schedule/ScheduleDeleteTransaction.d.ts +16 -16
- package/lib/schedule/ScheduleDeleteTransaction.js.map +1 -1
- package/lib/schedule/ScheduleId.cjs +1 -1
- package/lib/schedule/ScheduleId.d.ts +1 -1
- package/lib/schedule/ScheduleId.js +1 -1
- package/lib/schedule/ScheduleId.js.map +1 -1
- package/lib/schedule/ScheduleInfo.cjs +1 -1
- package/lib/schedule/ScheduleInfo.d.ts +1 -1
- package/lib/schedule/ScheduleInfo.js +1 -1
- package/lib/schedule/ScheduleInfo.js.map +1 -1
- package/lib/schedule/ScheduleInfoQuery.cjs +7 -7
- package/lib/schedule/ScheduleInfoQuery.d.ts +14 -14
- package/lib/schedule/ScheduleInfoQuery.js.map +1 -1
- package/lib/schedule/ScheduleSignTransaction.cjs +10 -10
- package/lib/schedule/ScheduleSignTransaction.d.ts +20 -20
- package/lib/schedule/ScheduleSignTransaction.js.map +1 -1
- package/lib/system/FreezeTransaction.cjs +6 -6
- package/lib/system/FreezeTransaction.d.ts +12 -12
- package/lib/system/FreezeTransaction.js.map +1 -1
- package/lib/system/SystemDeleteTransaction.cjs +8 -8
- package/lib/system/SystemDeleteTransaction.d.ts +16 -16
- package/lib/system/SystemDeleteTransaction.js.map +1 -1
- package/lib/system/SystemUndeleteTransaction.cjs +8 -8
- package/lib/system/SystemUndeleteTransaction.d.ts +16 -16
- package/lib/system/SystemUndeleteTransaction.js.map +1 -1
- package/lib/token/AbstractTokenTransferTransaction.cjs +1 -1
- package/lib/token/AbstractTokenTransferTransaction.d.ts +2 -2
- package/lib/token/AbstractTokenTransferTransaction.js.map +1 -1
- package/lib/token/AssessedCustomFee.cjs +1 -1
- package/lib/token/AssessedCustomFee.d.ts +2 -2
- package/lib/token/AssessedCustomFee.js.map +1 -1
- package/lib/token/CustomFee.cjs +1 -1
- package/lib/token/CustomFee.d.ts +2 -2
- package/lib/token/CustomFee.js.map +1 -1
- package/lib/token/CustomFixedFee.cjs +3 -3
- package/lib/token/CustomFixedFee.d.ts +6 -6
- package/lib/token/CustomFixedFee.js.map +1 -1
- package/lib/token/CustomFractionalFee.cjs +3 -3
- package/lib/token/CustomFractionalFee.d.ts +6 -6
- package/lib/token/CustomFractionalFee.js.map +1 -1
- package/lib/token/CustomRoyaltyFee.cjs +4 -4
- package/lib/token/CustomRoyaltyFee.d.ts +8 -8
- package/lib/token/CustomRoyaltyFee.js.map +1 -1
- package/lib/token/NftId.cjs +1 -1
- package/lib/token/NftId.d.ts +1 -1
- package/lib/token/NftId.js +1 -1
- package/lib/token/NftId.js.map +1 -1
- package/lib/token/PendingAirdropId.cjs +1 -1
- package/lib/token/PendingAirdropId.d.ts +1 -1
- package/lib/token/PendingAirdropId.js.map +1 -1
- package/lib/token/PendingAirdropRecord.cjs +1 -1
- package/lib/token/PendingAirdropRecord.d.ts +1 -1
- package/lib/token/PendingAirdropRecord.js.map +1 -1
- package/lib/token/TokenAirdropTransaction.cjs +8 -8
- package/lib/token/TokenAirdropTransaction.d.ts +16 -16
- package/lib/token/TokenAirdropTransaction.js.map +1 -1
- package/lib/token/TokenAssociateTransaction.cjs +7 -7
- package/lib/token/TokenAssociateTransaction.d.ts +14 -14
- package/lib/token/TokenAssociateTransaction.js.map +1 -1
- package/lib/token/TokenAssociation.cjs +1 -1
- package/lib/token/TokenAssociation.d.ts +2 -2
- package/lib/token/TokenAssociation.js.map +1 -1
- package/lib/token/TokenBurnTransaction.cjs +7 -7
- package/lib/token/TokenBurnTransaction.d.ts +14 -14
- package/lib/token/TokenBurnTransaction.js.map +1 -1
- package/lib/token/TokenCancelAirdropTransaction.cjs +6 -6
- package/lib/token/TokenCancelAirdropTransaction.d.ts +12 -12
- package/lib/token/TokenCancelAirdropTransaction.js.map +1 -1
- package/lib/token/TokenClaimAirdropTransaction.cjs +6 -6
- package/lib/token/TokenClaimAirdropTransaction.d.ts +12 -12
- package/lib/token/TokenClaimAirdropTransaction.js.map +1 -1
- package/lib/token/TokenCreateTransaction.cjs +7 -7
- package/lib/token/TokenCreateTransaction.d.ts +14 -14
- package/lib/token/TokenCreateTransaction.js.map +1 -1
- package/lib/token/TokenDeleteTransaction.cjs +7 -7
- package/lib/token/TokenDeleteTransaction.d.ts +14 -14
- package/lib/token/TokenDeleteTransaction.js.map +1 -1
- package/lib/token/TokenDissociateTransaction.cjs +7 -7
- package/lib/token/TokenDissociateTransaction.d.ts +14 -14
- package/lib/token/TokenDissociateTransaction.js.map +1 -1
- package/lib/token/TokenFeeScheduleUpdateTransaction.cjs +7 -7
- package/lib/token/TokenFeeScheduleUpdateTransaction.d.ts +14 -14
- package/lib/token/TokenFeeScheduleUpdateTransaction.js.map +1 -1
- package/lib/token/TokenFreezeTransaction.cjs +7 -7
- package/lib/token/TokenFreezeTransaction.d.ts +14 -14
- package/lib/token/TokenFreezeTransaction.js.map +1 -1
- package/lib/token/TokenGrantKycTransaction.cjs +7 -7
- package/lib/token/TokenGrantKycTransaction.d.ts +14 -14
- package/lib/token/TokenGrantKycTransaction.js.map +1 -1
- package/lib/token/TokenId.cjs +1 -1
- package/lib/token/TokenId.d.ts +1 -1
- package/lib/token/TokenId.js +1 -1
- package/lib/token/TokenId.js.map +1 -1
- package/lib/token/TokenInfo.cjs +1 -1
- package/lib/token/TokenInfo.d.ts +1 -1
- package/lib/token/TokenInfo.js +1 -1
- package/lib/token/TokenInfo.js.map +1 -1
- package/lib/token/TokenInfoQuery.cjs +7 -7
- package/lib/token/TokenInfoQuery.d.ts +14 -14
- package/lib/token/TokenInfoQuery.js.map +1 -1
- package/lib/token/TokenKeyValidation.cjs +1 -1
- package/lib/token/TokenKeyValidation.d.ts +2 -2
- package/lib/token/TokenKeyValidation.js.map +1 -1
- package/lib/token/TokenMintTransaction.cjs +7 -7
- package/lib/token/TokenMintTransaction.d.ts +14 -14
- package/lib/token/TokenMintTransaction.js.map +1 -1
- package/lib/token/TokenNftInfo.cjs +10 -10
- package/lib/token/TokenNftInfo.d.ts +20 -20
- package/lib/token/TokenNftInfo.js.map +1 -1
- package/lib/token/TokenNftInfoQuery.cjs +11 -11
- package/lib/token/TokenNftInfoQuery.d.ts +22 -22
- package/lib/token/TokenNftInfoQuery.js.map +1 -1
- package/lib/token/TokenNftTransfer.cjs +5 -5
- package/lib/token/TokenNftTransfer.d.ts +10 -10
- package/lib/token/TokenNftTransfer.js.map +1 -1
- package/lib/token/TokenNftsUpdateTransaction.cjs +7 -7
- package/lib/token/TokenNftsUpdateTransaction.d.ts +14 -14
- package/lib/token/TokenPauseTransaction.cjs +7 -7
- package/lib/token/TokenPauseTransaction.d.ts +14 -14
- package/lib/token/TokenPauseTransaction.js.map +1 -1
- package/lib/token/TokenReference.cjs +1 -1
- package/lib/token/TokenReference.d.ts +2 -2
- package/lib/token/TokenReference.js.map +1 -1
- package/lib/token/TokenRejectTransaction.cjs +7 -7
- package/lib/token/TokenRejectTransaction.d.ts +14 -14
- package/lib/token/TokenRejectTransaction.js.map +1 -1
- package/lib/token/TokenRevokeKycTransaction.cjs +7 -7
- package/lib/token/TokenRevokeKycTransaction.d.ts +14 -14
- package/lib/token/TokenRevokeKycTransaction.js.map +1 -1
- package/lib/token/TokenSupplyType.cjs +1 -1
- package/lib/token/TokenSupplyType.d.ts +2 -2
- package/lib/token/TokenSupplyType.js.map +1 -1
- package/lib/token/TokenTransfer.cjs +4 -4
- package/lib/token/TokenTransfer.d.ts +8 -8
- package/lib/token/TokenTransfer.js.map +1 -1
- package/lib/token/TokenType.cjs +1 -1
- package/lib/token/TokenType.d.ts +2 -2
- package/lib/token/TokenType.js.map +1 -1
- package/lib/token/TokenUnfreezeTransaction.cjs +7 -7
- package/lib/token/TokenUnfreezeTransaction.d.ts +14 -14
- package/lib/token/TokenUnfreezeTransaction.js.map +1 -1
- package/lib/token/TokenUnpauseTransaction.cjs +7 -7
- package/lib/token/TokenUnpauseTransaction.d.ts +14 -14
- package/lib/token/TokenUnpauseTransaction.js.map +1 -1
- package/lib/token/TokenUpdateNftsTransaction.cjs +7 -7
- package/lib/token/TokenUpdateNftsTransaction.d.ts +14 -14
- package/lib/token/TokenUpdateNftsTransaction.js.map +1 -1
- package/lib/token/TokenUpdateTransaction.cjs +7 -7
- package/lib/token/TokenUpdateTransaction.d.ts +14 -14
- package/lib/token/TokenUpdateTransaction.js.map +1 -1
- package/lib/token/TokenWipeTransaction.cjs +7 -7
- package/lib/token/TokenWipeTransaction.d.ts +14 -14
- package/lib/token/TokenWipeTransaction.js.map +1 -1
- package/lib/topic/TopicCreateTransaction.cjs +6 -6
- package/lib/topic/TopicCreateTransaction.d.ts +12 -12
- package/lib/topic/TopicCreateTransaction.js.map +1 -1
- package/lib/topic/TopicDeleteTransaction.cjs +6 -6
- package/lib/topic/TopicDeleteTransaction.d.ts +12 -12
- package/lib/topic/TopicDeleteTransaction.js.map +1 -1
- package/lib/topic/TopicId.cjs +1 -1
- package/lib/topic/TopicId.d.ts +1 -1
- package/lib/topic/TopicId.js +1 -1
- package/lib/topic/TopicId.js.map +1 -1
- package/lib/topic/TopicInfo.cjs +1 -1
- package/lib/topic/TopicInfo.d.ts +1 -1
- package/lib/topic/TopicInfo.js +1 -1
- package/lib/topic/TopicInfo.js.map +1 -1
- package/lib/topic/TopicInfoQuery.cjs +7 -7
- package/lib/topic/TopicInfoQuery.d.ts +14 -14
- package/lib/topic/TopicInfoQuery.js.map +1 -1
- package/lib/topic/TopicMessage.cjs +2 -2
- package/lib/topic/TopicMessage.d.ts +4 -4
- package/lib/topic/TopicMessage.js.map +1 -1
- package/lib/topic/TopicMessageChunk.cjs +2 -2
- package/lib/topic/TopicMessageChunk.d.ts +4 -4
- package/lib/topic/TopicMessageChunk.js.map +1 -1
- package/lib/topic/TopicMessageQuery.cjs +1 -1
- package/lib/topic/TopicMessageQuery.js +1 -1
- package/lib/topic/TopicMessageQuery.js.map +1 -1
- package/lib/topic/TopicMessageSubmitTransaction.cjs +9 -9
- package/lib/topic/TopicMessageSubmitTransaction.d.ts +18 -18
- package/lib/topic/TopicMessageSubmitTransaction.js.map +1 -1
- package/lib/topic/TopicUpdateTransaction.cjs +6 -6
- package/lib/topic/TopicUpdateTransaction.d.ts +12 -12
- package/lib/topic/TopicUpdateTransaction.js.map +1 -1
- package/lib/transaction/BatchTransaction.cjs +5 -5
- package/lib/transaction/BatchTransaction.d.ts +9 -9
- package/lib/transaction/BatchTransaction.js +1 -1
- package/lib/transaction/BatchTransaction.js.map +1 -1
- package/lib/transaction/CustomFeeLimit.cjs +2 -2
- package/lib/transaction/CustomFeeLimit.d.ts +4 -4
- package/lib/transaction/CustomFeeLimit.js.map +1 -1
- package/lib/transaction/NodeAccountIdSignatureMap.cjs +2 -2
- package/lib/transaction/NodeAccountIdSignatureMap.d.ts +2 -2
- package/lib/transaction/NodeAccountIdSignatureMap.js +1 -1
- package/lib/transaction/NodeAccountIdSignatureMap.js.map +1 -1
- package/lib/transaction/NodeAccountIdSignatureMapLegacy.cjs +1 -1
- package/lib/transaction/NodeAccountIdSignatureMapLegacy.d.ts +2 -2
- package/lib/transaction/NodeAccountIdSignatureMapLegacy.js.map +1 -1
- package/lib/transaction/SignatureMap.cjs +1 -1
- package/lib/transaction/SignatureMap.js.map +1 -1
- package/lib/transaction/SignaturePairMap.cjs +1 -1
- package/lib/transaction/SignaturePairMap.d.ts +2 -2
- package/lib/transaction/SignaturePairMap.js.map +1 -1
- package/lib/transaction/Transaction.cjs +1 -1
- package/lib/transaction/Transaction.d.ts +1 -1
- package/lib/transaction/Transaction.js +1 -1
- package/lib/transaction/Transaction.js.map +1 -1
- package/lib/transaction/TransactionHashMap.cjs +1 -1
- package/lib/transaction/TransactionHashMap.d.ts +2 -2
- package/lib/transaction/TransactionHashMap.js.map +1 -1
- package/lib/transaction/TransactionId.cjs +1 -1
- package/lib/transaction/TransactionId.d.ts +1 -1
- package/lib/transaction/TransactionId.js +1 -1
- package/lib/transaction/TransactionId.js.map +1 -1
- package/lib/transaction/TransactionReceipt.cjs +1 -1
- package/lib/transaction/TransactionReceipt.d.ts +1 -1
- package/lib/transaction/TransactionReceipt.js +1 -1
- package/lib/transaction/TransactionReceipt.js.map +1 -1
- package/lib/transaction/TransactionReceiptQuery.cjs +1 -1
- package/lib/transaction/TransactionReceiptQuery.d.ts +1 -1
- package/lib/transaction/TransactionReceiptQuery.js +1 -1
- package/lib/transaction/TransactionReceiptQuery.js.map +1 -1
- package/lib/transaction/TransactionRecord.cjs +1 -1
- package/lib/transaction/TransactionRecord.d.ts +1 -1
- package/lib/transaction/TransactionRecord.js +1 -1
- package/lib/transaction/TransactionRecord.js.map +1 -1
- package/lib/transaction/TransactionRecordQuery.cjs +1 -1
- package/lib/transaction/TransactionRecordQuery.d.ts +1 -1
- package/lib/transaction/TransactionRecordQuery.js +1 -1
- package/lib/transaction/TransactionRecordQuery.js.map +1 -1
- package/lib/util/ASN1-Decoder.cjs +1 -1
- package/lib/util/ASN1-Decoder.js +1 -1
- package/lib/util/ASN1-Decoder.js.map +1 -1
- package/lib/version.js +1 -1
- package/package.json +3 -3
- package/src/Cache.js +6 -6
- package/src/Duration.js +1 -1
- package/src/EntityIdHelper.js +1 -1
- package/src/EthereumFlow.js +7 -7
- package/src/EthereumTransaction.js +7 -7
- package/src/EvmAddress.js +1 -1
- package/src/ExchangeRate.js +2 -2
- package/src/ExchangeRates.js +1 -1
- package/src/FeeComponents.js +1 -1
- package/src/FeeData.js +1 -1
- package/src/FeeDataType.js +1 -1
- package/src/FeeSchedule.js +1 -1
- package/src/FeeSchedules.js +1 -1
- package/src/FreezeType.js +1 -1
- package/src/Key.js +1 -1
- package/src/KeyList.js +3 -3
- package/src/Mnemonic.js +1 -1
- package/src/PrivateKey.js +7 -7
- package/src/PrngTransaction.js +9 -9
- package/src/PublicKey.js +5 -5
- package/src/RequestType.js +1 -1
- package/src/StakingInfo.js +1 -1
- package/src/Status.js +1 -1
- package/src/Timestamp.js +1 -1
- package/src/TransactionFeeSchedule.js +1 -1
- package/src/Transfer.js +2 -2
- package/src/account/AccountAllowanceAdjustTransaction.js +7 -7
- package/src/account/AccountAllowanceApproveTransaction.js +8 -8
- package/src/account/AccountAllowanceDeleteTransaction.js +7 -7
- package/src/account/AccountBalance.js +1 -1
- package/src/account/AccountBalanceQuery.js +6 -6
- package/src/account/AccountCreateTransaction.js +1 -1
- package/src/account/AccountDeleteTransaction.js +7 -7
- package/src/account/AccountId.js +1 -1
- package/src/account/AccountInfo.js +1 -1
- package/src/account/AccountInfoQuery.js +7 -7
- package/src/account/AccountRecordsQuery.js +7 -7
- package/src/account/AccountUpdateTransaction.js +7 -7
- package/src/account/HbarAllowance.js +3 -3
- package/src/account/HbarTransferMap.js +2 -2
- package/src/account/LiveHash.js +3 -3
- package/src/account/LiveHashAddTransaction.js +7 -7
- package/src/account/LiveHashDeleteTransaction.js +6 -6
- package/src/account/LiveHashQuery.js +7 -7
- package/src/account/NullableTokenDecimalMap.js +2 -2
- package/src/account/ProxyStaker.js +2 -2
- package/src/account/TokenAllowance.js +4 -4
- package/src/account/TokenBalanceMap.js +2 -2
- package/src/account/TokenDecimalMap.js +2 -2
- package/src/account/TokenNftAllowance.js +5 -5
- package/src/account/TokenNftTransferMap.js +5 -5
- package/src/account/TokenRelationship.js +4 -4
- package/src/account/TokenRelationshipMap.js +2 -2
- package/src/account/TokenTransferMap.js +4 -4
- package/src/account/TransferTransaction.js +6 -6
- package/src/address_book/AddressBooks.js +1 -1
- package/src/address_book/Endpoint.js +1 -1
- package/src/address_book/NodeAddress.js +1 -1
- package/src/address_book/NodeAddressBook.js +1 -1
- package/src/channel/Channel.js +1 -1
- package/src/contract/ContractByteCodeQuery.js +6 -6
- package/src/contract/ContractCallQuery.js +1 -1
- package/src/contract/ContractCreateTransaction.js +8 -8
- package/src/contract/ContractDeleteTransaction.js +8 -8
- package/src/contract/ContractExecuteTransaction.js +9 -9
- package/src/contract/ContractFunctionResult.js +2 -2
- package/src/contract/ContractId.js +1 -1
- package/src/contract/ContractInfo.js +1 -1
- package/src/contract/ContractInfoQuery.js +7 -7
- package/src/contract/ContractLogInfo.js +2 -2
- package/src/contract/ContractNonceInfo.js +3 -3
- package/src/contract/ContractStateChange.js +1 -1
- package/src/contract/ContractUpdateTransaction.js +10 -10
- package/src/contract/DelegateContractId.js +2 -2
- package/src/contract/StorageChange.js +1 -1
- package/src/exports.js +1 -1
- package/src/file/FileAppendTransaction.js +7 -7
- package/src/file/FileContentsQuery.js +7 -7
- package/src/file/FileCreateTransaction.js +6 -6
- package/src/file/FileDeleteTransaction.js +7 -7
- package/src/file/FileId.js +1 -1
- package/src/file/FileInfo.js +1 -1
- package/src/file/FileInfoQuery.js +7 -7
- package/src/file/FileUpdateTransaction.js +6 -6
- package/src/network/AddressBookQuery.js +1 -1
- package/src/network/NetworkVersionInfo.js +1 -1
- package/src/network/NetworkVersionInfoQuery.js +6 -6
- package/src/network/SemanticVersion.js +1 -1
- package/src/node/NodeCreateTransaction.js +6 -6
- package/src/node/NodeDeleteTransaction.js +6 -6
- package/src/node/NodeUpdateTransaction.js +6 -6
- package/src/node/ServiceEndpoint.js +1 -1
- package/src/query/CostQuery.js +1 -1
- package/src/query/Query.js +1 -1
- package/src/query/QueryBase.js +1 -1
- package/src/schedule/ScheduleCreateTransaction.js +1 -1
- package/src/schedule/ScheduleDeleteTransaction.js +8 -8
- package/src/schedule/ScheduleId.js +1 -1
- package/src/schedule/ScheduleInfo.js +1 -1
- package/src/schedule/ScheduleInfoQuery.js +7 -7
- package/src/schedule/ScheduleSignTransaction.js +10 -10
- package/src/system/FreezeTransaction.js +6 -6
- package/src/system/SystemDeleteTransaction.js +8 -8
- package/src/system/SystemUndeleteTransaction.js +8 -8
- package/src/token/AbstractTokenTransferTransaction.js +1 -1
- package/src/token/AssessedCustomFee.js +1 -1
- package/src/token/CustomFee.js +1 -1
- package/src/token/CustomFixedFee.js +3 -3
- package/src/token/CustomFractionalFee.js +3 -3
- package/src/token/CustomRoyaltyFee.js +4 -4
- package/src/token/NftId.js +1 -1
- package/src/token/PendingAirdropId.js +1 -1
- package/src/token/PendingAirdropRecord.js +1 -1
- package/src/token/TokenAirdropTransaction.js +8 -8
- package/src/token/TokenAssociateTransaction.js +7 -7
- package/src/token/TokenAssociation.js +1 -1
- package/src/token/TokenBurnTransaction.js +7 -7
- package/src/token/TokenCancelAirdropTransaction.js +6 -6
- package/src/token/TokenClaimAirdropTransaction.js +6 -6
- package/src/token/TokenCreateTransaction.js +7 -7
- package/src/token/TokenDeleteTransaction.js +7 -7
- package/src/token/TokenDissociateTransaction.js +7 -7
- package/src/token/TokenFeeScheduleUpdateTransaction.js +7 -7
- package/src/token/TokenFreezeTransaction.js +7 -7
- package/src/token/TokenGrantKycTransaction.js +7 -7
- package/src/token/TokenId.js +1 -1
- package/src/token/TokenInfo.js +1 -1
- package/src/token/TokenInfoQuery.js +7 -7
- package/src/token/TokenKeyValidation.js +1 -1
- package/src/token/TokenMintTransaction.js +7 -7
- package/src/token/TokenNftInfo.js +10 -10
- package/src/token/TokenNftInfoQuery.js +11 -11
- package/src/token/TokenNftTransfer.js +5 -5
- package/src/token/TokenNftsUpdateTransaction.js +7 -7
- package/src/token/TokenPauseTransaction.js +7 -7
- package/src/token/TokenReference.js +1 -1
- package/src/token/TokenRejectTransaction.js +7 -7
- package/src/token/TokenRevokeKycTransaction.js +7 -7
- package/src/token/TokenSupplyType.js +1 -1
- package/src/token/TokenTransfer.js +4 -4
- package/src/token/TokenType.js +1 -1
- package/src/token/TokenUnfreezeTransaction.js +7 -7
- package/src/token/TokenUnpauseTransaction.js +7 -7
- package/src/token/TokenUpdateNftsTransaction.js +7 -7
- package/src/token/TokenUpdateTransaction.js +7 -7
- package/src/token/TokenWipeTransaction.js +7 -7
- package/src/topic/TopicCreateTransaction.js +6 -6
- package/src/topic/TopicDeleteTransaction.js +6 -6
- package/src/topic/TopicId.js +1 -1
- package/src/topic/TopicInfo.js +1 -1
- package/src/topic/TopicInfoQuery.js +7 -7
- package/src/topic/TopicMessage.js +2 -2
- package/src/topic/TopicMessageChunk.js +2 -2
- package/src/topic/TopicMessageQuery.js +1 -1
- package/src/topic/TopicMessageSubmitTransaction.js +9 -9
- package/src/topic/TopicUpdateTransaction.js +6 -6
- package/src/transaction/BatchTransaction.js +5 -5
- package/src/transaction/CustomFeeLimit.js +2 -2
- package/src/transaction/NodeAccountIdSignatureMap.js +2 -2
- package/src/transaction/NodeAccountIdSignatureMapLegacy.js +1 -1
- package/src/transaction/SignatureMap.js +1 -1
- package/src/transaction/SignaturePairMap.js +1 -1
- package/src/transaction/Transaction.js +1 -1
- package/src/transaction/TransactionHashMap.js +1 -1
- package/src/transaction/TransactionId.js +1 -1
- package/src/transaction/TransactionReceipt.js +1 -1
- package/src/transaction/TransactionReceiptQuery.js +1 -1
- package/src/transaction/TransactionRecord.js +1 -1
- package/src/transaction/TransactionRecordQuery.js +1 -1
- package/src/util/ASN1-Decoder.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenFreezeTransaction.js","sources":["../../src/token/TokenFreezeTransaction.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport TokenId from \"./TokenId.js\";\nimport AccountId from \"../account/AccountId.js\";\nimport Transaction, {\n TRANSACTION_REGISTRY,\n} from \"../transaction/Transaction.js\";\n\n/**\n * @namespace proto\n * @typedef {import(\"@
|
|
1
|
+
{"version":3,"file":"TokenFreezeTransaction.js","sources":["../../src/token/TokenFreezeTransaction.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport TokenId from \"./TokenId.js\";\nimport AccountId from \"../account/AccountId.js\";\nimport Transaction, {\n TRANSACTION_REGISTRY,\n} from \"../transaction/Transaction.js\";\n\n/**\n * @namespace proto\n * @typedef {import(\"@hiero-ledger/proto\").proto.ITransaction} HieroProto.proto.ITransaction\n * @typedef {import(\"@hiero-ledger/proto\").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction\n * @typedef {import(\"@hiero-ledger/proto\").proto.TransactionBody} HieroProto.proto.TransactionBody\n * @typedef {import(\"@hiero-ledger/proto\").proto.ITransactionBody} HieroProto.proto.ITransactionBody\n * @typedef {import(\"@hiero-ledger/proto\").proto.ITransactionResponse} HieroProto.proto.ITransactionResponse\n * @typedef {import(\"@hiero-ledger/proto\").proto.ITokenFreezeAccountTransactionBody} HieroProto.proto.ITokenFreezeAccountTransactionBody\n * @typedef {import(\"@hiero-ledger/proto\").proto.ITokenID} HieroProto.proto.ITokenID\n */\n\n/**\n * @typedef {import(\"../channel/Channel.js\").default} Channel\n * @typedef {import(\"../client/Client.js\").default<*, *>} Client\n * @typedef {import(\"../transaction/TransactionId.js\").default} TransactionId\n */\n\n/**\n * Freeze a new Hedera™ crypto-currency token.\n */\nexport default class TokenFreezeTransaction extends Transaction {\n /**\n * @param {object} [props]\n * @param {TokenId | string} [props.tokenId]\n * @param {AccountId | string} [props.accountId]\n */\n constructor(props = {}) {\n super();\n\n /**\n * @private\n * @type {?TokenId}\n */\n this._tokenId = null;\n\n /**\n * @private\n * @type {?AccountId}\n */\n this._accountId = null;\n\n if (props.tokenId != null) {\n this.setTokenId(props.tokenId);\n }\n\n if (props.accountId != null) {\n this.setAccountId(props.accountId);\n }\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.ITransaction[]} transactions\n * @param {HieroProto.proto.ISignedTransaction[]} signedTransactions\n * @param {TransactionId[]} transactionIds\n * @param {AccountId[]} nodeIds\n * @param {HieroProto.proto.ITransactionBody[]} bodies\n * @returns {TokenFreezeTransaction}\n */\n static _fromProtobuf(\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n ) {\n const body = bodies[0];\n const freezeToken =\n /** @type {HieroProto.proto.ITokenFreezeAccountTransactionBody} */ (\n body.tokenFreeze\n );\n\n return Transaction._fromProtobufTransactions(\n new TokenFreezeTransaction({\n tokenId:\n freezeToken.token != null\n ? TokenId._fromProtobuf(freezeToken.token)\n : undefined,\n accountId:\n freezeToken.account != null\n ? AccountId._fromProtobuf(freezeToken.account)\n : undefined,\n }),\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n );\n }\n\n /**\n * @returns {?TokenId}\n */\n get tokenId() {\n return this._tokenId;\n }\n\n /**\n * @param {TokenId | string} tokenId\n * @returns {this}\n */\n setTokenId(tokenId) {\n this._requireNotFrozen();\n this._tokenId =\n typeof tokenId === \"string\"\n ? TokenId.fromString(tokenId)\n : tokenId.clone();\n\n return this;\n }\n\n /**\n * @returns {?AccountId}\n */\n get accountId() {\n return this._accountId;\n }\n\n /**\n * @param {AccountId | string} accountId\n * @returns {this}\n */\n setAccountId(accountId) {\n this._requireNotFrozen();\n this._accountId =\n typeof accountId === \"string\"\n ? AccountId.fromString(accountId)\n : accountId.clone();\n\n return this;\n }\n\n /**\n * @param {Client} client\n */\n _validateChecksums(client) {\n if (this._tokenId != null) {\n this._tokenId.validateChecksum(client);\n }\n\n if (this._accountId != null) {\n this._accountId.validateChecksum(client);\n }\n }\n\n /**\n * @override\n * @internal\n * @param {Channel} channel\n * @param {HieroProto.proto.ITransaction} request\n * @returns {Promise<HieroProto.proto.ITransactionResponse>}\n */\n _execute(channel, request) {\n return channel.token.freezeTokenAccount(request);\n }\n\n /**\n * @override\n * @protected\n * @returns {NonNullable<HieroProto.proto.TransactionBody[\"data\"]>}\n */\n _getTransactionDataCase() {\n return \"tokenFreeze\";\n }\n\n /**\n * @override\n * @protected\n * @returns {HieroProto.proto.ITokenFreezeAccountTransactionBody}\n */\n _makeTransactionData() {\n return {\n token: this._tokenId != null ? this._tokenId._toProtobuf() : null,\n account:\n this._accountId != null ? this._accountId._toProtobuf() : null,\n };\n }\n\n /**\n * @returns {string}\n */\n _getLogId() {\n const timestamp = /** @type {import(\"../Timestamp.js\").default} */ (\n this._transactionIds.current.validStart\n );\n return `TokenFreezeTransaction:${timestamp.toString()}`;\n }\n}\n\nTRANSACTION_REGISTRY.set(\n \"tokenFreeze\",\n // eslint-disable-next-line @typescript-eslint/unbound-method\n TokenFreezeTransaction._fromProtobuf,\n);\n"],"names":["TokenFreezeTransaction","Transaction","constructor","props","super","this","_tokenId","_accountId","tokenId","setTokenId","accountId","setAccountId","_fromProtobuf","transactions","signedTransactions","transactionIds","nodeIds","bodies","freezeToken","_fromProtobufTransactions","token","TokenId","undefined","account","AccountId","_requireNotFrozen","fromString","clone","_validateChecksums","client","validateChecksum","_execute","channel","request","freezeTokenAccount","_getTransactionDataCase","_makeTransactionData","_toProtobuf","_getLogId","_transactionIds","current","toString","TRANSACTION_REGISTRY","set"],"mappings":"2IA4Be,MAAMA,UAA+BC,EAMhD,WAAAC,CAAYC,EAAQ,IAChBC,QAMAC,KAAKC,SAAW,KAMhBD,KAAKE,WAAa,KAEG,MAAjBJ,EAAMK,SACNH,KAAKI,WAAWN,EAAMK,SAGH,MAAnBL,EAAMO,WACNL,KAAKM,aAAaR,EAAMO,UAEpC,CAWI,oBAAOE,CACHC,EACAC,EACAC,EACAC,EACAC,GAEA,MACMC,EADOD,EAAO,GAIf,YAEL,OAAOhB,EAAYkB,0BACf,IAAInB,EAAuB,CACvBQ,QACyB,MAArBU,EAAYE,MACNC,EAAQT,cAAcM,EAAYE,YAClCE,EACVZ,UAC2B,MAAvBQ,EAAYK,QACNC,EAAUZ,cAAcM,EAAYK,cACpCD,IAEdT,EACAC,EACAC,EACAC,EACAC,EAEZ,CAKI,WAAIT,GACA,OAAOH,KAAKC,QACpB,CAMI,UAAAG,CAAWD,GAOP,OANAH,KAAKoB,oBACLpB,KAAKC,SACkB,iBAAZE,EACDa,EAAQK,WAAWlB,GACnBA,EAAQmB,QAEXtB,IACf,CAKI,aAAIK,GACA,OAAOL,KAAKE,UACpB,CAMI,YAAAI,CAAaD,GAOT,OANAL,KAAKoB,oBACLpB,KAAKE,WACoB,iBAAdG,EACDc,EAAUE,WAAWhB,GACrBA,EAAUiB,QAEbtB,IACf,CAKI,kBAAAuB,CAAmBC,GACM,MAAjBxB,KAAKC,UACLD,KAAKC,SAASwB,iBAAiBD,GAGZ,MAAnBxB,KAAKE,YACLF,KAAKE,WAAWuB,iBAAiBD,EAE7C,CASI,QAAAE,CAASC,EAASC,GACd,OAAOD,EAAQZ,MAAMc,mBAAmBD,EAChD,CAOI,uBAAAE,GACI,MAAO,aACf,CAOI,oBAAAC,GACI,MAAO,CACHhB,MAAwB,MAAjBf,KAAKC,SAAmBD,KAAKC,SAAS+B,cAAgB,KAC7Dd,QACuB,MAAnBlB,KAAKE,WAAqBF,KAAKE,WAAW8B,cAAgB,KAE1E,CAKI,SAAAC,GAII,MAAO,0BAFHjC,KAAKkC,gBAAgBC,QACxB,WAC0CC,YACnD,EAGAC,EAAqBC,IACjB,cAEA3C,EAAuBY"}
|
|
@@ -13,13 +13,13 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @namespace proto
|
|
16
|
-
* @typedef {import("@
|
|
17
|
-
* @typedef {import("@
|
|
18
|
-
* @typedef {import("@
|
|
19
|
-
* @typedef {import("@
|
|
20
|
-
* @typedef {import("@
|
|
21
|
-
* @typedef {import("@
|
|
22
|
-
* @typedef {import("@
|
|
16
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransaction} HieroProto.proto.ITransaction
|
|
17
|
+
* @typedef {import("@hiero-ledger/proto").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction
|
|
18
|
+
* @typedef {import("@hiero-ledger/proto").proto.TransactionBody} HieroProto.proto.TransactionBody
|
|
19
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionBody} HieroProto.proto.ITransactionBody
|
|
20
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionResponse} HieroProto.proto.ITransactionResponse
|
|
21
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITokenGrantKycTransactionBody} HieroProto.proto.ITokenGrantKycTransactionBody
|
|
22
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITokenID} HieroProto.proto.ITokenID
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @namespace proto
|
|
3
|
-
* @typedef {import("@
|
|
4
|
-
* @typedef {import("@
|
|
5
|
-
* @typedef {import("@
|
|
6
|
-
* @typedef {import("@
|
|
7
|
-
* @typedef {import("@
|
|
8
|
-
* @typedef {import("@
|
|
9
|
-
* @typedef {import("@
|
|
3
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransaction} HieroProto.proto.ITransaction
|
|
4
|
+
* @typedef {import("@hiero-ledger/proto").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction
|
|
5
|
+
* @typedef {import("@hiero-ledger/proto").proto.TransactionBody} HieroProto.proto.TransactionBody
|
|
6
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionBody} HieroProto.proto.ITransactionBody
|
|
7
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionResponse} HieroProto.proto.ITransactionResponse
|
|
8
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITokenGrantKycTransactionBody} HieroProto.proto.ITokenGrantKycTransactionBody
|
|
9
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITokenID} HieroProto.proto.ITokenID
|
|
10
10
|
*/
|
|
11
11
|
/**
|
|
12
12
|
* @typedef {import("../channel/Channel.js").default} Channel
|
|
@@ -73,13 +73,13 @@ export default class TokenGrantKycTransaction extends Transaction {
|
|
|
73
73
|
}
|
|
74
74
|
export namespace HieroProto {
|
|
75
75
|
namespace proto {
|
|
76
|
-
type ITransaction = import("@
|
|
77
|
-
type ISignedTransaction = import("@
|
|
78
|
-
type TransactionBody = import("@
|
|
79
|
-
type ITransactionBody = import("@
|
|
80
|
-
type ITransactionResponse = import("@
|
|
81
|
-
type ITokenGrantKycTransactionBody = import("@
|
|
82
|
-
type ITokenID = import("@
|
|
76
|
+
type ITransaction = import("@hiero-ledger/proto").proto.ITransaction;
|
|
77
|
+
type ISignedTransaction = import("@hiero-ledger/proto").proto.ISignedTransaction;
|
|
78
|
+
type TransactionBody = import("@hiero-ledger/proto").proto.TransactionBody;
|
|
79
|
+
type ITransactionBody = import("@hiero-ledger/proto").proto.ITransactionBody;
|
|
80
|
+
type ITransactionResponse = import("@hiero-ledger/proto").proto.ITransactionResponse;
|
|
81
|
+
type ITokenGrantKycTransactionBody = import("@hiero-ledger/proto").proto.ITokenGrantKycTransactionBody;
|
|
82
|
+
type ITokenID = import("@hiero-ledger/proto").proto.ITokenID;
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
export type Channel = import("../channel/Channel.js").default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenGrantKycTransaction.js","sources":["../../src/token/TokenGrantKycTransaction.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport TokenId from \"./TokenId.js\";\nimport AccountId from \"../account/AccountId.js\";\nimport Transaction, {\n TRANSACTION_REGISTRY,\n} from \"../transaction/Transaction.js\";\n\n/**\n * @namespace proto\n * @typedef {import(\"@
|
|
1
|
+
{"version":3,"file":"TokenGrantKycTransaction.js","sources":["../../src/token/TokenGrantKycTransaction.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport TokenId from \"./TokenId.js\";\nimport AccountId from \"../account/AccountId.js\";\nimport Transaction, {\n TRANSACTION_REGISTRY,\n} from \"../transaction/Transaction.js\";\n\n/**\n * @namespace proto\n * @typedef {import(\"@hiero-ledger/proto\").proto.ITransaction} HieroProto.proto.ITransaction\n * @typedef {import(\"@hiero-ledger/proto\").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction\n * @typedef {import(\"@hiero-ledger/proto\").proto.TransactionBody} HieroProto.proto.TransactionBody\n * @typedef {import(\"@hiero-ledger/proto\").proto.ITransactionBody} HieroProto.proto.ITransactionBody\n * @typedef {import(\"@hiero-ledger/proto\").proto.ITransactionResponse} HieroProto.proto.ITransactionResponse\n * @typedef {import(\"@hiero-ledger/proto\").proto.ITokenGrantKycTransactionBody} HieroProto.proto.ITokenGrantKycTransactionBody\n * @typedef {import(\"@hiero-ledger/proto\").proto.ITokenID} HieroProto.proto.ITokenID\n */\n\n/**\n * @typedef {import(\"../channel/Channel.js\").default} Channel\n * @typedef {import(\"../client/Client.js\").default<*, *>} Client\n * @typedef {import(\"../transaction/TransactionId.js\").default} TransactionId\n */\n\n/**\n * GrantKyc a new Hedera™ crypto-currency token.\n */\nexport default class TokenGrantKycTransaction extends Transaction {\n /**\n * @param {object} [props]\n * @param {TokenId | string} [props.tokenId]\n * @param {AccountId | string} [props.accountId]\n */\n constructor(props = {}) {\n super();\n\n /**\n * @private\n * @type {?TokenId}\n */\n this._tokenId = null;\n\n /**\n * @private\n * @type {?AccountId}\n */\n this._accountId = null;\n\n if (props.tokenId != null) {\n this.setTokenId(props.tokenId);\n }\n\n if (props.accountId != null) {\n this.setAccountId(props.accountId);\n }\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.ITransaction[]} transactions\n * @param {HieroProto.proto.ISignedTransaction[]} signedTransactions\n * @param {TransactionId[]} transactionIds\n * @param {AccountId[]} nodeIds\n * @param {HieroProto.proto.ITransactionBody[]} bodies\n * @returns {TokenGrantKycTransaction}\n */\n static _fromProtobuf(\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n ) {\n const body = bodies[0];\n const grantKycToken =\n /** @type {HieroProto.proto.ITokenGrantKycTransactionBody} */ (\n body.tokenGrantKyc\n );\n\n return Transaction._fromProtobufTransactions(\n new TokenGrantKycTransaction({\n tokenId:\n grantKycToken.token != null\n ? TokenId._fromProtobuf(grantKycToken.token)\n : undefined,\n accountId:\n grantKycToken.account != null\n ? AccountId._fromProtobuf(grantKycToken.account)\n : undefined,\n }),\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n );\n }\n\n /**\n * @returns {?TokenId}\n */\n get tokenId() {\n return this._tokenId;\n }\n\n /**\n * @param {TokenId | string} tokenId\n * @returns {this}\n */\n setTokenId(tokenId) {\n this._requireNotFrozen();\n this._tokenId =\n typeof tokenId === \"string\"\n ? TokenId.fromString(tokenId)\n : tokenId.clone();\n\n return this;\n }\n\n /**\n * @returns {?AccountId}\n */\n get accountId() {\n return this._accountId;\n }\n\n /**\n * @param {AccountId | string} accountId\n * @returns {this}\n */\n setAccountId(accountId) {\n this._requireNotFrozen();\n this._accountId =\n typeof accountId === \"string\"\n ? AccountId.fromString(accountId)\n : accountId.clone();\n\n return this;\n }\n\n /**\n * @param {Client} client\n */\n _validateChecksums(client) {\n if (this._tokenId != null) {\n this._tokenId.validateChecksum(client);\n }\n\n if (this._accountId != null) {\n this._accountId.validateChecksum(client);\n }\n }\n\n /**\n * @override\n * @internal\n * @param {Channel} channel\n * @param {HieroProto.proto.ITransaction} request\n * @returns {Promise<HieroProto.proto.ITransactionResponse>}\n */\n _execute(channel, request) {\n return channel.token.grantKycToTokenAccount(request);\n }\n\n /**\n * @override\n * @protected\n * @returns {NonNullable<HieroProto.proto.TransactionBody[\"data\"]>}\n */\n _getTransactionDataCase() {\n return \"tokenGrantKyc\";\n }\n\n /**\n * @override\n * @protected\n * @returns {HieroProto.proto.ITokenGrantKycTransactionBody}\n */\n _makeTransactionData() {\n return {\n token: this._tokenId != null ? this._tokenId._toProtobuf() : null,\n account:\n this._accountId != null ? this._accountId._toProtobuf() : null,\n };\n }\n\n /**\n * @returns {string}\n */\n _getLogId() {\n const timestamp = /** @type {import(\"../Timestamp.js\").default} */ (\n this._transactionIds.current.validStart\n );\n return `TokenGrantKycTransaction:${timestamp.toString()}`;\n }\n}\n\nTRANSACTION_REGISTRY.set(\n \"tokenGrantKyc\",\n // eslint-disable-next-line @typescript-eslint/unbound-method\n TokenGrantKycTransaction._fromProtobuf,\n);\n"],"names":["TokenGrantKycTransaction","Transaction","constructor","props","super","this","_tokenId","_accountId","tokenId","setTokenId","accountId","setAccountId","_fromProtobuf","transactions","signedTransactions","transactionIds","nodeIds","bodies","grantKycToken","_fromProtobufTransactions","token","TokenId","undefined","account","AccountId","_requireNotFrozen","fromString","clone","_validateChecksums","client","validateChecksum","_execute","channel","request","grantKycToTokenAccount","_getTransactionDataCase","_makeTransactionData","_toProtobuf","_getLogId","_transactionIds","current","toString","TRANSACTION_REGISTRY","set"],"mappings":"2IA4Be,MAAMA,UAAiCC,EAMlD,WAAAC,CAAYC,EAAQ,IAChBC,QAMAC,KAAKC,SAAW,KAMhBD,KAAKE,WAAa,KAEG,MAAjBJ,EAAMK,SACNH,KAAKI,WAAWN,EAAMK,SAGH,MAAnBL,EAAMO,WACNL,KAAKM,aAAaR,EAAMO,UAEpC,CAWI,oBAAOE,CACHC,EACAC,EACAC,EACAC,EACAC,GAEA,MACMC,EADOD,EAAO,GAIf,cAEL,OAAOhB,EAAYkB,0BACf,IAAInB,EAAyB,CACzBQ,QAC2B,MAAvBU,EAAcE,MACRC,EAAQT,cAAcM,EAAcE,YACpCE,EACVZ,UAC6B,MAAzBQ,EAAcK,QACRC,EAAUZ,cAAcM,EAAcK,cACtCD,IAEdT,EACAC,EACAC,EACAC,EACAC,EAEZ,CAKI,WAAIT,GACA,OAAOH,KAAKC,QACpB,CAMI,UAAAG,CAAWD,GAOP,OANAH,KAAKoB,oBACLpB,KAAKC,SACkB,iBAAZE,EACDa,EAAQK,WAAWlB,GACnBA,EAAQmB,QAEXtB,IACf,CAKI,aAAIK,GACA,OAAOL,KAAKE,UACpB,CAMI,YAAAI,CAAaD,GAOT,OANAL,KAAKoB,oBACLpB,KAAKE,WACoB,iBAAdG,EACDc,EAAUE,WAAWhB,GACrBA,EAAUiB,QAEbtB,IACf,CAKI,kBAAAuB,CAAmBC,GACM,MAAjBxB,KAAKC,UACLD,KAAKC,SAASwB,iBAAiBD,GAGZ,MAAnBxB,KAAKE,YACLF,KAAKE,WAAWuB,iBAAiBD,EAE7C,CASI,QAAAE,CAASC,EAASC,GACd,OAAOD,EAAQZ,MAAMc,uBAAuBD,EACpD,CAOI,uBAAAE,GACI,MAAO,eACf,CAOI,oBAAAC,GACI,MAAO,CACHhB,MAAwB,MAAjBf,KAAKC,SAAmBD,KAAKC,SAAS+B,cAAgB,KAC7Dd,QACuB,MAAnBlB,KAAKE,WAAqBF,KAAKE,WAAW8B,cAAgB,KAE1E,CAKI,SAAAC,GAII,MAAO,4BAFHjC,KAAKkC,gBAAgBC,QACxB,WAC4CC,YACrD,EAGAC,EAAqBC,IACjB,gBAEA3C,EAAyBY"}
|
package/lib/token/TokenId.cjs
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var EntityIdHelper = _interopRequireWildcard(require("../EntityIdHelper.cjs"));
|
|
8
|
-
var HieroProto = _interopRequireWildcard(require("@
|
|
8
|
+
var HieroProto = _interopRequireWildcard(require("@hiero-ledger/proto"));
|
|
9
9
|
var _EvmAddress = _interopRequireDefault(require("../EvmAddress.cjs"));
|
|
10
10
|
var util = _interopRequireWildcard(require("../util.cjs"));
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
package/lib/token/TokenId.d.ts
CHANGED
package/lib/token/TokenId.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{constructor as t,fromString as r,validateChecksum as s,fromSolidityAddress as e,fromEvmAddress as o,toSolidityAddress as n,toEvmAddress as m,toStringWithChecksum as i,compare as
|
|
1
|
+
import{constructor as t,fromString as r,validateChecksum as s,fromSolidityAddress as e,fromEvmAddress as o,toSolidityAddress as n,toEvmAddress as m,toStringWithChecksum as i,compare as u}from"../EntityIdHelper.js";import*as h from"@hiero-ledger/proto";import a from"../EvmAddress.js";import{isLongZeroAddress as d}from"../util.js";class c{constructor(r,s,e){const o=t(r,s,e);this.shard=o.shard,this.realm=o.realm,this.num=o.num,this._checksum=null}static fromString(t){const s=r(t),e=new c(s);return e._checksum=s.checksum,e}static _fromProtobuf(t){return new c(null!=t.shardNum?t.shardNum:0,null!=t.realmNum?t.realmNum:0,null!=t.tokenNum?t.tokenNum:0)}get checksum(){return this._checksum}validate(t){console.warn("Deprecated: Use `validateChecksum` instead"),this.validateChecksum(t)}validateChecksum(t){s(this.shard,this.realm,this.num,this._checksum,t)}static fromBytes(t){return c._fromProtobuf(h.proto.TokenID.decode(t))}static fromSolidityAddress(t){return new c(...e(t))}static fromEvmAddress(t,r,s){const e=a.fromString(s).toBytes();if(!d(e))throw new Error("TokenId.fromEvmAddress does not support non-long-zero addresses");const[n,m,i]=o(t,r,s);return new c(n,m,i)}toSolidityAddress(){return n([this.shard,this.realm,this.num])}toEvmAddress(){return m(this.num)}_toProtobuf(){return{tokenNum:this.num,shardNum:this.shard,realmNum:this.realm}}toString(){return`${this.shard.toString()}.${this.realm.toString()}.${this.num.toString()}`}toStringWithChecksum(t){return i(this.toString(),t)}toBytes(){return h.proto.TokenID.encode(this._toProtobuf()).finish()}clone(){const t=new c(this);return t._checksum=this._checksum,t}compare(t){return u([this.shard,this.realm,this.num],[t.shard,t.realm,t.num])}}export{c as default};
|
|
2
2
|
//# sourceMappingURL=TokenId.js.map
|
package/lib/token/TokenId.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenId.js","sources":["../../src/token/TokenId.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport * as EntityIdHelper from \"../EntityIdHelper.js\";\nimport * as HieroProto from \"@
|
|
1
|
+
{"version":3,"file":"TokenId.js","sources":["../../src/token/TokenId.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport * as EntityIdHelper from \"../EntityIdHelper.js\";\nimport * as HieroProto from \"@hiero-ledger/proto\";\nimport EvmAddress from \"../EvmAddress.js\";\nimport * as util from \"../util.js\";\n\n/**\n * @typedef {import(\"long\")} Long\n * @typedef {import(\"../client/Client.js\").default<*, *>} Client\n */\n\n/**\n * The ID for a crypto-currency token on Hedera.\n */\nexport default class TokenId {\n /**\n * @param {number | Long | import(\"../EntityIdHelper\").IEntityId} props\n * @param {(number | Long)=} realm\n * @param {(number | Long)=} num\n */\n constructor(props, realm, num) {\n const result = EntityIdHelper.constructor(props, realm, num);\n\n this.shard = result.shard;\n this.realm = result.realm;\n this.num = result.num;\n\n /**\n * @type {string | null}\n */\n this._checksum = null;\n }\n\n /**\n * @param {string} text\n * @returns {TokenId}\n */\n static fromString(text) {\n const result = EntityIdHelper.fromString(text);\n const id = new TokenId(result);\n id._checksum = result.checksum;\n return id;\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.ITokenID} id\n * @returns {TokenId}\n */\n static _fromProtobuf(id) {\n const tokenId = new TokenId(\n id.shardNum != null ? id.shardNum : 0,\n id.realmNum != null ? id.realmNum : 0,\n id.tokenNum != null ? id.tokenNum : 0,\n );\n\n return tokenId;\n }\n\n /**\n * @returns {string | null}\n */\n get checksum() {\n return this._checksum;\n }\n\n /**\n * @deprecated - Use `validateChecksum` instead\n * @param {Client} client\n */\n validate(client) {\n console.warn(\"Deprecated: Use `validateChecksum` instead\");\n this.validateChecksum(client);\n }\n\n /**\n * @param {Client} client\n */\n validateChecksum(client) {\n EntityIdHelper.validateChecksum(\n this.shard,\n this.realm,\n this.num,\n this._checksum,\n client,\n );\n }\n\n /**\n * @param {Uint8Array} bytes\n * @returns {TokenId}\n */\n static fromBytes(bytes) {\n return TokenId._fromProtobuf(HieroProto.proto.TokenID.decode(bytes));\n }\n\n /**\n * @param {string} address\n * @deprecated - Use `fromEvmAddress` instead\n * @returns {TokenId}\n */\n static fromSolidityAddress(address) {\n return new TokenId(...EntityIdHelper.fromSolidityAddress(address));\n }\n\n /**\n * @param {number} shard\n * @param {number} realm\n * @param {string} address\n * @returns {TokenId}\n */\n static fromEvmAddress(shard, realm, address) {\n const addressBytes = EvmAddress.fromString(address).toBytes();\n const isLongZero = util.isLongZeroAddress(addressBytes);\n\n if (!isLongZero) {\n throw new Error(\n \"TokenId.fromEvmAddress does not support non-long-zero addresses\",\n );\n }\n\n const [shardLong, realmLong, tokenLong] = EntityIdHelper.fromEvmAddress(\n shard,\n realm,\n address,\n );\n return new TokenId(shardLong, realmLong, tokenLong);\n }\n\n /**\n * @deprecated - Use `toEvmAddress` instead\n * @returns {string} solidity address\n */\n toSolidityAddress() {\n return EntityIdHelper.toSolidityAddress([\n this.shard,\n this.realm,\n this.num,\n ]);\n }\n\n /**\n * @returns {string}\n */\n toEvmAddress() {\n return EntityIdHelper.toEvmAddress(this.num);\n }\n\n /**\n * @internal\n * @returns {HieroProto.proto.ITokenID}\n */\n _toProtobuf() {\n return {\n tokenNum: this.num,\n shardNum: this.shard,\n realmNum: this.realm,\n };\n }\n\n /**\n * @returns {string}\n */\n toString() {\n return `${this.shard.toString()}.${this.realm.toString()}.${this.num.toString()}`;\n }\n\n /**\n * @param {Client} client\n * @returns {string}\n */\n toStringWithChecksum(client) {\n return EntityIdHelper.toStringWithChecksum(this.toString(), client);\n }\n\n /**\n * @returns {Uint8Array}\n */\n toBytes() {\n return HieroProto.proto.TokenID.encode(this._toProtobuf()).finish();\n }\n\n /**\n * @returns {TokenId}\n */\n clone() {\n const id = new TokenId(this);\n id._checksum = this._checksum;\n return id;\n }\n\n /**\n * @param {TokenId} other\n * @returns {number}\n */\n compare(other) {\n return EntityIdHelper.compare(\n [this.shard, this.realm, this.num],\n [other.shard, other.realm, other.num],\n );\n }\n}\n"],"names":["TokenId","constructor","props","realm","num","result","EntityIdHelper.constructor","this","shard","_checksum","fromString","text","EntityIdHelper.fromString","id","checksum","_fromProtobuf","shardNum","realmNum","tokenNum","validate","client","console","warn","validateChecksum","EntityIdHelper.validateChecksum","fromBytes","bytes","HieroProto","proto","TokenID","decode","fromSolidityAddress","address","EntityIdHelper.fromSolidityAddress","fromEvmAddress","addressBytes","EvmAddress","toBytes","util.isLongZeroAddress","Error","shardLong","realmLong","tokenLong","EntityIdHelper.fromEvmAddress","toSolidityAddress","EntityIdHelper.toSolidityAddress","toEvmAddress","EntityIdHelper.toEvmAddress","_toProtobuf","toString","toStringWithChecksum","EntityIdHelper.toStringWithChecksum","encode","finish","clone","compare","other","EntityIdHelper.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AA4BxC,KAAKH,IAChD,CAMI,WAAA4C,GACI,MAAO,CACH9B,SAAUX,KAAKH,IACfY,SAAUT,KAAKC,MACfS,SAAUV,KAAKJ,MAE3B,CAKI,QAAA8C,GACI,MAAO,GAAG1C,KAAKC,MAAMyC,cAAc1C,KAAKJ,MAAM8C,cAAc1C,KAAKH,IAAI6C,YAC7E,CAMI,oBAAAC,CAAqB9B,GACjB,OAAO+B,EAAoC5C,KAAK0C,WAAY7B,EACpE,CAKI,OAAAiB,GACI,OAAOV,EAAWC,MAAMC,QAAQuB,OAAO7C,KAAKyC,eAAeK,QACnE,CAKI,KAAAC,GACI,MAAMzC,EAAK,IAAIb,EAAQO,MAEvB,OADAM,EAAGJ,UAAYF,KAAKE,UACbI,CACf,CAMI,OAAA0C,CAAQC,GACJ,OAAOC,EACH,CAAClD,KAAKC,MAAOD,KAAKJ,MAAOI,KAAKH,KAC9B,CAACoD,EAAMhD,MAAOgD,EAAMrD,MAAOqD,EAAMpD,KAE7C"}
|
package/lib/token/TokenInfo.cjs
CHANGED
|
@@ -9,7 +9,7 @@ var _AccountId = _interopRequireDefault(require("../account/AccountId.cjs"));
|
|
|
9
9
|
var _Duration = _interopRequireDefault(require("../Duration.cjs"));
|
|
10
10
|
var _Timestamp = _interopRequireDefault(require("../Timestamp.cjs"));
|
|
11
11
|
var _long = _interopRequireDefault(require("long"));
|
|
12
|
-
var HieroProto = _interopRequireWildcard(require("@
|
|
12
|
+
var HieroProto = _interopRequireWildcard(require("@hiero-ledger/proto"));
|
|
13
13
|
var _TokenType = _interopRequireDefault(require("./TokenType.cjs"));
|
|
14
14
|
var _TokenSupplyType = _interopRequireDefault(require("./TokenSupplyType.cjs"));
|
|
15
15
|
var _CustomFixedFee = _interopRequireDefault(require("./CustomFixedFee.cjs"));
|
package/lib/token/TokenInfo.d.ts
CHANGED
|
@@ -221,4 +221,4 @@ import Timestamp from "../Timestamp.js";
|
|
|
221
221
|
import TokenType from "./TokenType.js";
|
|
222
222
|
import TokenSupplyType from "./TokenSupplyType.js";
|
|
223
223
|
import LedgerId from "../LedgerId.js";
|
|
224
|
-
import * as HieroProto from "@
|
|
224
|
+
import * as HieroProto from "@hiero-ledger/proto";
|
package/lib/token/TokenInfo.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"./TokenId.js";import t from"../account/AccountId.js";import o from"../Duration.js";import u from"../Timestamp.js";import l from"long";import*as s from"@
|
|
1
|
+
import e from"./TokenId.js";import t from"../account/AccountId.js";import o from"../Duration.js";import u from"../Timestamp.js";import l from"long";import*as s from"@hiero-ledger/proto";import a from"./TokenType.js";import n from"./TokenSupplyType.js";import y from"./CustomFixedFee.js";import r from"./CustomFractionalFee.js";import i from"./CustomRoyaltyFee.js";import m from"../Key.js";import p from"../LedgerId.js";class d{constructor(e){this.tokenId=e.tokenId,this.name=e.name,this.symbol=e.symbol,this.decimals=e.decimals,this.totalSupply=e.totalSupply,this.treasuryAccountId=e.treasuryAccountId,this.adminKey=e.adminKey,this.kycKey=e.kycKey,this.freezeKey=e.freezeKey,this.pauseKey=e.pauseKey,this.wipeKey=e.wipeKey,this.supplyKey=e.supplyKey,this.feeScheduleKey=e.feeScheduleKey,this.defaultFreezeStatus=e.defaultFreezeStatus,this.defaultKycStatus=e.defaultKycStatus,this.pauseStatus=e.pauseStatus,this.isDeleted=e.isDeleted,this.autoRenewAccountId=e.autoRenewAccountId,this.autoRenewPeriod=e.autoRenewPeriod,this.expirationTime=e.expirationTime,this.tokenMemo=e.tokenMemo,this.customFees=e.customFees,this.tokenType=e.tokenType,this.supplyType=e.supplyType,this.maxSupply=e.maxSupply,this.ledgerId=e.ledgerId,this.metadataKey=e.metadataKey,this.metadata=e.metadata}static _fromProtobuf(s){const f=s.defaultFreezeStatus,K=s.defaultKycStatus,h=s.pauseStatus,c=null!=s.autoRenewAccount?t._fromProtobuf(s.autoRenewAccount):new t(0);return new d({tokenId:e._fromProtobuf(s.tokenId),name:s.name,symbol:s.symbol,decimals:s.decimals,totalSupply:l.fromValue(s.totalSupply),treasuryAccountId:null!=s.treasury?t._fromProtobuf(s.treasury):null,adminKey:null!=s.adminKey?m._fromProtobufKey(s.adminKey):null,kycKey:null!=s.kycKey?m._fromProtobufKey(s.kycKey):null,freezeKey:null!=s.freezeKey?m._fromProtobufKey(s.freezeKey):null,pauseKey:null!=s.pauseKey?m._fromProtobufKey(s.pauseKey):null,wipeKey:null!=s.wipeKey?m._fromProtobufKey(s.wipeKey):null,supplyKey:null!=s.supplyKey?m._fromProtobufKey(s.supplyKey):null,feeScheduleKey:null!=s.feeScheduleKey?m._fromProtobufKey(s.feeScheduleKey):null,defaultFreezeStatus:0===f?null:1==f,defaultKycStatus:0===K?null:1==K,pauseStatus:0===h?null:1==h,isDeleted:s.deleted,autoRenewAccountId:0!=c.shard.toInt()||0!=c.realm.toInt()||0!=c.num.toInt()?c:null,autoRenewPeriod:null!=s.autoRenewPeriod?o._fromProtobuf(s.autoRenewPeriod):null,expirationTime:null!=s.expiry?u._fromProtobuf(s.expiry):null,tokenMemo:null!=s.memo?s.memo:"",customFees:null!=s.customFees?s.customFees.map(e=>null!=e.fixedFee?y._fromProtobuf(e):null!=e.fractionalFee?r._fromProtobuf(e):i._fromProtobuf(e)):[],tokenType:null!=s.tokenType?a._fromCode(s.tokenType):null,supplyType:null!=s.supplyType?n._fromCode(s.supplyType):null,maxSupply:null!=s.maxSupply?s.maxSupply:null,ledgerId:null!=s.ledgerId?p.fromBytes(s.ledgerId):null,metadataKey:null!=s.metadataKey?m._fromProtobufKey(s.metadataKey):null,metadata:null!=s.metadata?s.metadata:new Uint8Array})}_toProtobuf(){return{tokenId:this.tokenId._toProtobuf(),name:this.name,symbol:this.symbol,decimals:this.decimals,totalSupply:this.totalSupply,treasury:null!=this.treasuryAccountId?this.treasuryAccountId._toProtobuf():null,adminKey:null!=this.adminKey?this.adminKey._toProtobufKey():null,kycKey:null!=this.kycKey?this.kycKey._toProtobufKey():null,freezeKey:null!=this.freezeKey?this.freezeKey._toProtobufKey():null,pauseKey:null!=this.pauseKey?this.pauseKey._toProtobufKey():null,wipeKey:null!=this.wipeKey?this.wipeKey._toProtobufKey():null,supplyKey:null!=this.supplyKey?this.supplyKey._toProtobufKey():null,feeScheduleKey:null!=this.feeScheduleKey?this.feeScheduleKey._toProtobufKey():null,defaultFreezeStatus:null==this.defaultFreezeStatus?0:this.defaultFreezeStatus?1:2,defaultKycStatus:null==this.defaultKycStatus?0:this.defaultKycStatus?1:2,pauseStatus:null==this.pauseStatus?0:this.pauseStatus?1:2,deleted:this.isDeleted,autoRenewAccount:null!=this.autoRenewAccountId?this.autoRenewAccountId._toProtobuf():void 0,autoRenewPeriod:null!=this.autoRenewPeriod?this.autoRenewPeriod._toProtobuf():null,expiry:null!=this.expirationTime?this.expirationTime._toProtobuf():null,memo:this.tokenMemo,customFees:this.customFees.map(e=>e._toProtobuf()),tokenType:null!=this.tokenType?this.tokenType._code:null,supplyType:null!=this.supplyType?this.supplyType._code:null,maxSupply:this.maxSupply,ledgerId:null!=this.ledgerId?this.ledgerId.toBytes():null,metadataKey:null!=this.metadataKey?this.metadataKey._toProtobufKey():null,metadata:null!=this.metadata?this.metadata:null}}static fromBytes(e){return d._fromProtobuf(s.proto.TokenInfo.decode(e))}toBytes(){return s.proto.TokenInfo.encode(this._toProtobuf()).finish()}}export{d as default};
|
|
2
2
|
//# sourceMappingURL=TokenInfo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenInfo.js","sources":["../../src/token/TokenInfo.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport TokenId from \"./TokenId.js\";\nimport AccountId from \"../account/AccountId.js\";\nimport Duration from \"../Duration.js\";\nimport Timestamp from \"../Timestamp.js\";\nimport Long from \"long\";\nimport * as HieroProto from \"@hashgraph/proto\";\nimport TokenType from \"./TokenType.js\";\nimport TokenSupplyType from \"./TokenSupplyType.js\";\nimport CustomFixedFee from \"./CustomFixedFee.js\";\nimport CustomFractionalFee from \"./CustomFractionalFee.js\";\nimport CustomRoyaltyFee from \"./CustomRoyaltyFee.js\";\nimport Key from \"../Key.js\";\nimport LedgerId from \"../LedgerId.js\";\n\n/**\n * @typedef {import(\"./CustomFee.js\").default} CustomFee\n */\n\n/**\n * Response when the client sends the node TokenGetInfoQuery.\n */\nexport default class TokenInfo {\n /**\n * @private\n * @param {object} props\n * @param {TokenId} props.tokenId;\n * @param {string} props.name;\n * @param {string} props.symbol;\n * @param {number} props.decimals;\n * @param {Long} props.totalSupply;\n * @param {AccountId | null} props.treasuryAccountId;\n * @param {Key | null} props.adminKey;\n * @param {Key | null} props.kycKey;\n * @param {Key | null} props.freezeKey;\n * @param {Key | null} props.pauseKey;\n * @param {Key | null} props.wipeKey;\n * @param {Key | null} props.supplyKey;\n * @param {Key | null} props.feeScheduleKey;\n * @param {boolean | null} props.defaultFreezeStatus;\n * @param {boolean | null} props.defaultKycStatus;\n * @param {boolean | null} props.pauseStatus;\n * @param {boolean} props.isDeleted;\n * @param {AccountId | null} props.autoRenewAccountId;\n * @param {Duration | null} props.autoRenewPeriod;\n * @param {Timestamp | null} props.expirationTime;\n * @param {string} props.tokenMemo;\n * @param {CustomFee[]} props.customFees;\n * @param {TokenType | null} props.tokenType;\n * @param {TokenSupplyType | null} props.supplyType;\n * @param {Long | null} props.maxSupply;\n * @param {LedgerId|null} props.ledgerId;\n * @param {Key | null} props.metadataKey;\n * @param {Uint8Array | null} props.metadata;\n */\n constructor(props) {\n /**\n * ID of the token instance\n *\n * @readonly\n */\n this.tokenId = props.tokenId;\n\n /**\n * The name of the token. It is a string of ASCII only characters\n *\n * @readonly\n */\n this.name = props.name;\n\n /**\n * The symbol of the token. It is a UTF-8 capitalized alphabetical string\n *\n * @readonly\n */\n this.symbol = props.symbol;\n\n /**\n * The number of decimal places a token is divisible by\n *\n * @readonly\n */\n this.decimals = props.decimals;\n\n /**\n * The total supply of tokens that are currently in circulation\n *\n * @readonly\n */\n this.totalSupply = props.totalSupply;\n\n /**\n * The ID of the account which is set as treasuryAccountId\n *\n * @readonly\n */\n this.treasuryAccountId = props.treasuryAccountId;\n\n /**\n * The key which can perform update/delete operations on the token. If empty, the token can be perceived as\n * immutable (not being able to be updated/deleted)\n *\n * @readonly\n */\n this.adminKey = props.adminKey;\n\n /**\n * The key which can grant or revoke KYC of an account for the token's transactions. If empty, KYC is not required,\n * and KYC grant or revoke operations are not possible.\n *\n * @readonly\n */\n this.kycKey = props.kycKey;\n\n /**\n * The key which can freeze or unfreeze an account for token transactions. If empty, freezing is not possible\n *\n * @readonly\n */\n this.freezeKey = props.freezeKey;\n\n /**\n * The Key which can pause and unpause the Token.\n *\n * @readonly\n */\n this.pauseKey = props.pauseKey;\n\n /**\n * The key which can wipe token balance of an account. If empty, wipe is not possible\n *\n * @readonly\n */\n this.wipeKey = props.wipeKey;\n\n /**\n * The key which can change the supply of a token. The key is used to sign Token Mint/Burn operations\n *\n * @readonly\n */\n this.supplyKey = props.supplyKey;\n\n this.feeScheduleKey = props.feeScheduleKey;\n\n /**\n * The default Freeze status (not applicable = null, frozen = false, or unfrozen = true) of Hedera accounts relative to this token.\n * FreezeNotApplicable is returned if Token Freeze Key is empty. Frozen is returned if Token Freeze Key is set and\n * defaultFreeze is set to true. Unfrozen is returned if Token Freeze Key is set and defaultFreeze is set to false\n * FreezeNotApplicable = null;\n * Frozen = true;\n * Unfrozen = false;\n *\n * @readonly\n */\n this.defaultFreezeStatus = props.defaultFreezeStatus;\n\n /**\n * The default KYC status (KycNotApplicable or Revoked) of Hedera accounts relative to this token. KycNotApplicable\n * is returned if KYC key is not set, otherwise Revoked\n * KycNotApplicable = null;\n * Granted = true;\n * Revoked = false;\n *\n * @readonly\n */\n this.defaultKycStatus = props.defaultKycStatus;\n\n /**\n * The default pause status of Hedera accounts relative to this token.\n * PauseNotApplicable is returned if pauseKey is not set\n * PauseNotApplicable = null;\n * Paused = true;\n * Unpaused = false;\n *\n * @readonly\n */\n this.pauseStatus = props.pauseStatus;\n\n /**\n * Specifies whether the token was deleted or not\n *\n * @readonly\n */\n this.isDeleted = props.isDeleted;\n\n /**\n * An account which will be automatically charged to renew the token's expiration, at autoRenewPeriod interval\n *\n * @readonly\n */\n this.autoRenewAccountId = props.autoRenewAccountId;\n\n /**\n * The interval at which the auto-renew account will be charged to extend the token's expiry\n *\n * @readonly\n */\n this.autoRenewPeriod = props.autoRenewPeriod;\n\n /**\n * The epoch second at which the token expire: will; if an auto-renew account and period are specified,\n * this is coerced to the current epoch second plus the autoRenewPeriod\n *\n * @readonly\n */\n this.expirationTime = props.expirationTime;\n\n /**\n * The memo associated with the token.\n *\n * @readonly\n */\n this.tokenMemo = props.tokenMemo;\n\n this.customFees = props.customFees;\n\n this.tokenType = props.tokenType;\n\n this.supplyType = props.supplyType;\n\n this.maxSupply = props.maxSupply;\n\n this.ledgerId = props.ledgerId;\n\n /**\n * @description The key which can change the metadata of a token (token definition and individual NFTs).\n *\n * @readonly\n */\n this.metadataKey = props.metadataKey;\n\n /**\n * @description Metadata of the created token definition.\n * @readonly\n */\n this.metadata = props.metadata;\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.ITokenInfo} info\n * @returns {TokenInfo}\n */\n static _fromProtobuf(info) {\n const defaultFreezeStatus =\n /** @type {HieroProto.proto.TokenFreezeStatus} */ (\n info.defaultFreezeStatus\n );\n const defaultKycStatus =\n /** @type {HieroProto.proto.TokenKycStatus} */ (\n info.defaultKycStatus\n );\n const pauseStatus = /**@type {HieroProto.proto.TokenPauseStatus} */ (\n info.pauseStatus\n );\n\n const autoRenewAccountId =\n info.autoRenewAccount != null\n ? AccountId._fromProtobuf(info.autoRenewAccount)\n : new AccountId(0);\n\n return new TokenInfo({\n tokenId: TokenId._fromProtobuf(\n /** @type {HieroProto.proto.ITokenID} */ (info.tokenId),\n ),\n name: /** @type {string} */ (info.name),\n symbol: /** @type {string} */ (info.symbol),\n decimals: /** @type {number} */ (info.decimals),\n totalSupply: Long.fromValue(/** @type {Long} */ (info.totalSupply)),\n treasuryAccountId:\n info.treasury != null\n ? AccountId._fromProtobuf(\n /** @type {HieroProto.proto.IAccountID} */ (\n info.treasury\n ),\n )\n : null,\n adminKey:\n info.adminKey != null\n ? Key._fromProtobufKey(info.adminKey)\n : null,\n kycKey:\n info.kycKey != null ? Key._fromProtobufKey(info.kycKey) : null,\n freezeKey:\n info.freezeKey != null\n ? Key._fromProtobufKey(info.freezeKey)\n : null,\n pauseKey:\n info.pauseKey != null\n ? Key._fromProtobufKey(info.pauseKey)\n : null,\n wipeKey:\n info.wipeKey != null\n ? Key._fromProtobufKey(info.wipeKey)\n : null,\n supplyKey:\n info.supplyKey != null\n ? Key._fromProtobufKey(info.supplyKey)\n : null,\n feeScheduleKey:\n info.feeScheduleKey != null\n ? Key._fromProtobufKey(info.feeScheduleKey)\n : null,\n defaultFreezeStatus:\n defaultFreezeStatus === 0 ? null : defaultFreezeStatus == 1,\n defaultKycStatus:\n defaultKycStatus === 0 ? null : defaultKycStatus == 1,\n pauseStatus: pauseStatus === 0 ? null : pauseStatus == 1,\n isDeleted: /** @type {boolean} */ (info.deleted),\n autoRenewAccountId: !(\n autoRenewAccountId.shard.toInt() == 0 &&\n autoRenewAccountId.realm.toInt() == 0 &&\n autoRenewAccountId.num.toInt() == 0\n )\n ? autoRenewAccountId\n : null,\n autoRenewPeriod:\n info.autoRenewPeriod != null\n ? Duration._fromProtobuf(\n /** @type {HieroProto.proto.IDuration} */ (\n info.autoRenewPeriod\n ),\n )\n : null,\n expirationTime:\n info.expiry != null\n ? Timestamp._fromProtobuf(\n /** @type {HieroProto.proto.ITimestamp} */ (\n info.expiry\n ),\n )\n : null,\n tokenMemo: info.memo != null ? info.memo : \"\",\n customFees:\n info.customFees != null\n ? info.customFees.map((fee) => {\n if (fee.fixedFee != null) {\n return CustomFixedFee._fromProtobuf(fee);\n } else if (fee.fractionalFee != null) {\n return CustomFractionalFee._fromProtobuf(fee);\n } else {\n return CustomRoyaltyFee._fromProtobuf(fee);\n }\n })\n : [],\n tokenType:\n info.tokenType != null\n ? TokenType._fromCode(info.tokenType)\n : null,\n supplyType:\n info.supplyType != null\n ? TokenSupplyType._fromCode(info.supplyType)\n : null,\n maxSupply: info.maxSupply != null ? info.maxSupply : null,\n ledgerId:\n info.ledgerId != null\n ? LedgerId.fromBytes(info.ledgerId)\n : null,\n metadataKey:\n info.metadataKey != null\n ? Key._fromProtobufKey(info.metadataKey)\n : null,\n metadata: info.metadata != null ? info.metadata : new Uint8Array(),\n });\n }\n\n /**\n * @returns {HieroProto.proto.ITokenInfo}\n */\n _toProtobuf() {\n return {\n tokenId: this.tokenId._toProtobuf(),\n name: this.name,\n symbol: this.symbol,\n decimals: this.decimals,\n totalSupply: this.totalSupply,\n treasury:\n this.treasuryAccountId != null\n ? this.treasuryAccountId._toProtobuf()\n : null,\n adminKey:\n this.adminKey != null ? this.adminKey._toProtobufKey() : null,\n kycKey: this.kycKey != null ? this.kycKey._toProtobufKey() : null,\n freezeKey:\n this.freezeKey != null ? this.freezeKey._toProtobufKey() : null,\n pauseKey:\n this.pauseKey != null ? this.pauseKey._toProtobufKey() : null,\n wipeKey:\n this.wipeKey != null ? this.wipeKey._toProtobufKey() : null,\n supplyKey:\n this.supplyKey != null ? this.supplyKey._toProtobufKey() : null,\n feeScheduleKey:\n this.feeScheduleKey != null\n ? this.feeScheduleKey._toProtobufKey()\n : null,\n defaultFreezeStatus:\n this.defaultFreezeStatus == null\n ? 0\n : this.defaultFreezeStatus\n ? 1\n : 2,\n defaultKycStatus:\n this.defaultKycStatus == null\n ? 0\n : this.defaultKycStatus\n ? 1\n : 2,\n pauseStatus:\n this.pauseStatus == null ? 0 : this.pauseStatus ? 1 : 2,\n deleted: this.isDeleted,\n autoRenewAccount:\n this.autoRenewAccountId != null\n ? this.autoRenewAccountId._toProtobuf()\n : undefined,\n autoRenewPeriod:\n this.autoRenewPeriod != null\n ? this.autoRenewPeriod._toProtobuf()\n : null,\n expiry:\n this.expirationTime != null\n ? this.expirationTime._toProtobuf()\n : null,\n memo: this.tokenMemo,\n customFees: this.customFees.map((fee) => fee._toProtobuf()),\n tokenType: this.tokenType != null ? this.tokenType._code : null,\n supplyType: this.supplyType != null ? this.supplyType._code : null,\n maxSupply: this.maxSupply,\n ledgerId: this.ledgerId != null ? this.ledgerId.toBytes() : null,\n metadataKey:\n this.metadataKey != null\n ? this.metadataKey._toProtobufKey()\n : null,\n metadata: this.metadata != null ? this.metadata : null,\n };\n }\n\n /**\n * @param {Uint8Array} bytes\n * @returns {TokenInfo}\n */\n static fromBytes(bytes) {\n return TokenInfo._fromProtobuf(\n HieroProto.proto.TokenInfo.decode(bytes),\n );\n }\n\n /**\n * @returns {Uint8Array}\n */\n toBytes() {\n return HieroProto.proto.TokenInfo.encode(this._toProtobuf()).finish();\n }\n}\n"],"names":["TokenInfo","constructor","props","this","tokenId","name","symbol","decimals","totalSupply","treasuryAccountId","adminKey","kycKey","freezeKey","pauseKey","wipeKey","supplyKey","feeScheduleKey","defaultFreezeStatus","defaultKycStatus","pauseStatus","isDeleted","autoRenewAccountId","autoRenewPeriod","expirationTime","tokenMemo","customFees","tokenType","supplyType","maxSupply","ledgerId","metadataKey","metadata","_fromProtobuf","info","autoRenewAccount","AccountId","TokenId","Long","fromValue","treasury","Key","_fromProtobufKey","shard","toInt","realm","num","Duration","expiry","Timestamp","memo","map","fee","fixedFee","CustomFixedFee","fractionalFee","CustomFractionalFee","CustomRoyaltyFee","TokenType","_fromCode","TokenSupplyType","LedgerId","fromBytes","Uint8Array","_toProtobuf","_toProtobufKey","deleted","undefined","_code","toBytes","bytes","HieroProto","proto","decode","encode","finish"],"mappings":"gaAuBe,MAAMA,EAiCjB,WAAAC,CAAYC,GAMRC,KAAKC,QAAUF,EAAME,QAOrBD,KAAKE,KAAOH,EAAMG,KAOlBF,KAAKG,OAASJ,EAAMI,OAOpBH,KAAKI,SAAWL,EAAMK,SAOtBJ,KAAKK,YAAcN,EAAMM,YAOzBL,KAAKM,kBAAoBP,EAAMO,kBAQ/B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KoB,eAAewC,cACpB,KACVd,KAAM9C,KAAKqB,UACXC,WAAYtB,KAAKsB,WAAWyB,IAAKC,GAAQA,EAAIY,eAC7CrC,UAA6B,MAAlBvB,KAAKuB,UAAoBvB,KAAKuB,UAAUyC,MAAQ,KAC3DxC,WAA+B,MAAnBxB,KAAKwB,WAAqBxB,KAAKwB,WAAWwC,MAAQ,KAC9DvC,UAAWzB,KAAKyB,UAChBC,SAA2B,MAAjB1B,KAAK0B,SAAmB1B,KAAK0B,SAASuC,UAAY,KAC5DtC,YACwB,MAApB3B,KAAK2B,YACC3B,KAAK2B,YAAYkC,iBACjB,KACVjC,SAA2B,MAAjB5B,KAAK4B,SAAmB5B,KAAK4B,SAAW,KAE9D,CAMI,gBAAO8B,CAAUQ,GACb,OAAOrE,EAAUgC,cACbsC,EAAWC,MAAMvE,UAAUwE,OAAOH,GAE9C,CAKI,OAAAD,GACI,OAAOE,EAAWC,MAAMvE,UAAUyE,OAAOtE,KAAK4D,eAAeW,QACrE"}
|
|
1
|
+
{"version":3,"file":"TokenInfo.js","sources":["../../src/token/TokenInfo.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport TokenId from \"./TokenId.js\";\nimport AccountId from \"../account/AccountId.js\";\nimport Duration from \"../Duration.js\";\nimport Timestamp from \"../Timestamp.js\";\nimport Long from \"long\";\nimport * as HieroProto from \"@hiero-ledger/proto\";\nimport TokenType from \"./TokenType.js\";\nimport TokenSupplyType from \"./TokenSupplyType.js\";\nimport CustomFixedFee from \"./CustomFixedFee.js\";\nimport CustomFractionalFee from \"./CustomFractionalFee.js\";\nimport CustomRoyaltyFee from \"./CustomRoyaltyFee.js\";\nimport Key from \"../Key.js\";\nimport LedgerId from \"../LedgerId.js\";\n\n/**\n * @typedef {import(\"./CustomFee.js\").default} CustomFee\n */\n\n/**\n * Response when the client sends the node TokenGetInfoQuery.\n */\nexport default class TokenInfo {\n /**\n * @private\n * @param {object} props\n * @param {TokenId} props.tokenId;\n * @param {string} props.name;\n * @param {string} props.symbol;\n * @param {number} props.decimals;\n * @param {Long} props.totalSupply;\n * @param {AccountId | null} props.treasuryAccountId;\n * @param {Key | null} props.adminKey;\n * @param {Key | null} props.kycKey;\n * @param {Key | null} props.freezeKey;\n * @param {Key | null} props.pauseKey;\n * @param {Key | null} props.wipeKey;\n * @param {Key | null} props.supplyKey;\n * @param {Key | null} props.feeScheduleKey;\n * @param {boolean | null} props.defaultFreezeStatus;\n * @param {boolean | null} props.defaultKycStatus;\n * @param {boolean | null} props.pauseStatus;\n * @param {boolean} props.isDeleted;\n * @param {AccountId | null} props.autoRenewAccountId;\n * @param {Duration | null} props.autoRenewPeriod;\n * @param {Timestamp | null} props.expirationTime;\n * @param {string} props.tokenMemo;\n * @param {CustomFee[]} props.customFees;\n * @param {TokenType | null} props.tokenType;\n * @param {TokenSupplyType | null} props.supplyType;\n * @param {Long | null} props.maxSupply;\n * @param {LedgerId|null} props.ledgerId;\n * @param {Key | null} props.metadataKey;\n * @param {Uint8Array | null} props.metadata;\n */\n constructor(props) {\n /**\n * ID of the token instance\n *\n * @readonly\n */\n this.tokenId = props.tokenId;\n\n /**\n * The name of the token. It is a string of ASCII only characters\n *\n * @readonly\n */\n this.name = props.name;\n\n /**\n * The symbol of the token. It is a UTF-8 capitalized alphabetical string\n *\n * @readonly\n */\n this.symbol = props.symbol;\n\n /**\n * The number of decimal places a token is divisible by\n *\n * @readonly\n */\n this.decimals = props.decimals;\n\n /**\n * The total supply of tokens that are currently in circulation\n *\n * @readonly\n */\n this.totalSupply = props.totalSupply;\n\n /**\n * The ID of the account which is set as treasuryAccountId\n *\n * @readonly\n */\n this.treasuryAccountId = props.treasuryAccountId;\n\n /**\n * The key which can perform update/delete operations on the token. If empty, the token can be perceived as\n * immutable (not being able to be updated/deleted)\n *\n * @readonly\n */\n this.adminKey = props.adminKey;\n\n /**\n * The key which can grant or revoke KYC of an account for the token's transactions. If empty, KYC is not required,\n * and KYC grant or revoke operations are not possible.\n *\n * @readonly\n */\n this.kycKey = props.kycKey;\n\n /**\n * The key which can freeze or unfreeze an account for token transactions. If empty, freezing is not possible\n *\n * @readonly\n */\n this.freezeKey = props.freezeKey;\n\n /**\n * The Key which can pause and unpause the Token.\n *\n * @readonly\n */\n this.pauseKey = props.pauseKey;\n\n /**\n * The key which can wipe token balance of an account. If empty, wipe is not possible\n *\n * @readonly\n */\n this.wipeKey = props.wipeKey;\n\n /**\n * The key which can change the supply of a token. The key is used to sign Token Mint/Burn operations\n *\n * @readonly\n */\n this.supplyKey = props.supplyKey;\n\n this.feeScheduleKey = props.feeScheduleKey;\n\n /**\n * The default Freeze status (not applicable = null, frozen = false, or unfrozen = true) of Hedera accounts relative to this token.\n * FreezeNotApplicable is returned if Token Freeze Key is empty. Frozen is returned if Token Freeze Key is set and\n * defaultFreeze is set to true. Unfrozen is returned if Token Freeze Key is set and defaultFreeze is set to false\n * FreezeNotApplicable = null;\n * Frozen = true;\n * Unfrozen = false;\n *\n * @readonly\n */\n this.defaultFreezeStatus = props.defaultFreezeStatus;\n\n /**\n * The default KYC status (KycNotApplicable or Revoked) of Hedera accounts relative to this token. KycNotApplicable\n * is returned if KYC key is not set, otherwise Revoked\n * KycNotApplicable = null;\n * Granted = true;\n * Revoked = false;\n *\n * @readonly\n */\n this.defaultKycStatus = props.defaultKycStatus;\n\n /**\n * The default pause status of Hedera accounts relative to this token.\n * PauseNotApplicable is returned if pauseKey is not set\n * PauseNotApplicable = null;\n * Paused = true;\n * Unpaused = false;\n *\n * @readonly\n */\n this.pauseStatus = props.pauseStatus;\n\n /**\n * Specifies whether the token was deleted or not\n *\n * @readonly\n */\n this.isDeleted = props.isDeleted;\n\n /**\n * An account which will be automatically charged to renew the token's expiration, at autoRenewPeriod interval\n *\n * @readonly\n */\n this.autoRenewAccountId = props.autoRenewAccountId;\n\n /**\n * The interval at which the auto-renew account will be charged to extend the token's expiry\n *\n * @readonly\n */\n this.autoRenewPeriod = props.autoRenewPeriod;\n\n /**\n * The epoch second at which the token expire: will; if an auto-renew account and period are specified,\n * this is coerced to the current epoch second plus the autoRenewPeriod\n *\n * @readonly\n */\n this.expirationTime = props.expirationTime;\n\n /**\n * The memo associated with the token.\n *\n * @readonly\n */\n this.tokenMemo = props.tokenMemo;\n\n this.customFees = props.customFees;\n\n this.tokenType = props.tokenType;\n\n this.supplyType = props.supplyType;\n\n this.maxSupply = props.maxSupply;\n\n this.ledgerId = props.ledgerId;\n\n /**\n * @description The key which can change the metadata of a token (token definition and individual NFTs).\n *\n * @readonly\n */\n this.metadataKey = props.metadataKey;\n\n /**\n * @description Metadata of the created token definition.\n * @readonly\n */\n this.metadata = props.metadata;\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.ITokenInfo} info\n * @returns {TokenInfo}\n */\n static _fromProtobuf(info) {\n const defaultFreezeStatus =\n /** @type {HieroProto.proto.TokenFreezeStatus} */ (\n info.defaultFreezeStatus\n );\n const defaultKycStatus =\n /** @type {HieroProto.proto.TokenKycStatus} */ (\n info.defaultKycStatus\n );\n const pauseStatus = /**@type {HieroProto.proto.TokenPauseStatus} */ (\n info.pauseStatus\n );\n\n const autoRenewAccountId =\n info.autoRenewAccount != null\n ? AccountId._fromProtobuf(info.autoRenewAccount)\n : new AccountId(0);\n\n return new TokenInfo({\n tokenId: TokenId._fromProtobuf(\n /** @type {HieroProto.proto.ITokenID} */ (info.tokenId),\n ),\n name: /** @type {string} */ (info.name),\n symbol: /** @type {string} */ (info.symbol),\n decimals: /** @type {number} */ (info.decimals),\n totalSupply: Long.fromValue(/** @type {Long} */ (info.totalSupply)),\n treasuryAccountId:\n info.treasury != null\n ? AccountId._fromProtobuf(\n /** @type {HieroProto.proto.IAccountID} */ (\n info.treasury\n ),\n )\n : null,\n adminKey:\n info.adminKey != null\n ? Key._fromProtobufKey(info.adminKey)\n : null,\n kycKey:\n info.kycKey != null ? Key._fromProtobufKey(info.kycKey) : null,\n freezeKey:\n info.freezeKey != null\n ? Key._fromProtobufKey(info.freezeKey)\n : null,\n pauseKey:\n info.pauseKey != null\n ? Key._fromProtobufKey(info.pauseKey)\n : null,\n wipeKey:\n info.wipeKey != null\n ? Key._fromProtobufKey(info.wipeKey)\n : null,\n supplyKey:\n info.supplyKey != null\n ? Key._fromProtobufKey(info.supplyKey)\n : null,\n feeScheduleKey:\n info.feeScheduleKey != null\n ? Key._fromProtobufKey(info.feeScheduleKey)\n : null,\n defaultFreezeStatus:\n defaultFreezeStatus === 0 ? null : defaultFreezeStatus == 1,\n defaultKycStatus:\n defaultKycStatus === 0 ? null : defaultKycStatus == 1,\n pauseStatus: pauseStatus === 0 ? null : pauseStatus == 1,\n isDeleted: /** @type {boolean} */ (info.deleted),\n autoRenewAccountId: !(\n autoRenewAccountId.shard.toInt() == 0 &&\n autoRenewAccountId.realm.toInt() == 0 &&\n autoRenewAccountId.num.toInt() == 0\n )\n ? autoRenewAccountId\n : null,\n autoRenewPeriod:\n info.autoRenewPeriod != null\n ? Duration._fromProtobuf(\n /** @type {HieroProto.proto.IDuration} */ (\n info.autoRenewPeriod\n ),\n )\n : null,\n expirationTime:\n info.expiry != null\n ? Timestamp._fromProtobuf(\n /** @type {HieroProto.proto.ITimestamp} */ (\n info.expiry\n ),\n )\n : null,\n tokenMemo: info.memo != null ? info.memo : \"\",\n customFees:\n info.customFees != null\n ? info.customFees.map((fee) => {\n if (fee.fixedFee != null) {\n return CustomFixedFee._fromProtobuf(fee);\n } else if (fee.fractionalFee != null) {\n return CustomFractionalFee._fromProtobuf(fee);\n } else {\n return CustomRoyaltyFee._fromProtobuf(fee);\n }\n })\n : [],\n tokenType:\n info.tokenType != null\n ? TokenType._fromCode(info.tokenType)\n : null,\n supplyType:\n info.supplyType != null\n ? TokenSupplyType._fromCode(info.supplyType)\n : null,\n maxSupply: info.maxSupply != null ? info.maxSupply : null,\n ledgerId:\n info.ledgerId != null\n ? LedgerId.fromBytes(info.ledgerId)\n : null,\n metadataKey:\n info.metadataKey != null\n ? Key._fromProtobufKey(info.metadataKey)\n : null,\n metadata: info.metadata != null ? info.metadata : new Uint8Array(),\n });\n }\n\n /**\n * @returns {HieroProto.proto.ITokenInfo}\n */\n _toProtobuf() {\n return {\n tokenId: this.tokenId._toProtobuf(),\n name: this.name,\n symbol: this.symbol,\n decimals: this.decimals,\n totalSupply: this.totalSupply,\n treasury:\n this.treasuryAccountId != null\n ? this.treasuryAccountId._toProtobuf()\n : null,\n adminKey:\n this.adminKey != null ? this.adminKey._toProtobufKey() : null,\n kycKey: this.kycKey != null ? this.kycKey._toProtobufKey() : null,\n freezeKey:\n this.freezeKey != null ? this.freezeKey._toProtobufKey() : null,\n pauseKey:\n this.pauseKey != null ? this.pauseKey._toProtobufKey() : null,\n wipeKey:\n this.wipeKey != null ? this.wipeKey._toProtobufKey() : null,\n supplyKey:\n this.supplyKey != null ? this.supplyKey._toProtobufKey() : null,\n feeScheduleKey:\n this.feeScheduleKey != null\n ? this.feeScheduleKey._toProtobufKey()\n : null,\n defaultFreezeStatus:\n this.defaultFreezeStatus == null\n ? 0\n : this.defaultFreezeStatus\n ? 1\n : 2,\n defaultKycStatus:\n this.defaultKycStatus == null\n ? 0\n : this.defaultKycStatus\n ? 1\n : 2,\n pauseStatus:\n this.pauseStatus == null ? 0 : this.pauseStatus ? 1 : 2,\n deleted: this.isDeleted,\n autoRenewAccount:\n this.autoRenewAccountId != null\n ? this.autoRenewAccountId._toProtobuf()\n : undefined,\n autoRenewPeriod:\n this.autoRenewPeriod != null\n ? this.autoRenewPeriod._toProtobuf()\n : null,\n expiry:\n this.expirationTime != null\n ? this.expirationTime._toProtobuf()\n : null,\n memo: this.tokenMemo,\n customFees: this.customFees.map((fee) => fee._toProtobuf()),\n tokenType: this.tokenType != null ? this.tokenType._code : null,\n supplyType: this.supplyType != null ? this.supplyType._code : null,\n maxSupply: this.maxSupply,\n ledgerId: this.ledgerId != null ? this.ledgerId.toBytes() : null,\n metadataKey:\n this.metadataKey != null\n ? this.metadataKey._toProtobufKey()\n : null,\n metadata: this.metadata != null ? this.metadata : null,\n };\n }\n\n /**\n * @param {Uint8Array} bytes\n * @returns {TokenInfo}\n */\n static fromBytes(bytes) {\n return TokenInfo._fromProtobuf(\n HieroProto.proto.TokenInfo.decode(bytes),\n );\n }\n\n /**\n * @returns {Uint8Array}\n */\n toBytes() {\n return HieroProto.proto.TokenInfo.encode(this._toProtobuf()).finish();\n }\n}\n"],"names":["TokenInfo","constructor","props","this","tokenId","name","symbol","decimals","totalSupply","treasuryAccountId","adminKey","kycKey","freezeKey","pauseKey","wipeKey","supplyKey","feeScheduleKey","defaultFreezeStatus","defaultKycStatus","pauseStatus","isDeleted","autoRenewAccountId","autoRenewPeriod","expirationTime","tokenMemo","customFees","tokenType","supplyType","maxSupply","ledgerId","metadataKey","metadata","_fromProtobuf","info","autoRenewAccount","AccountId","TokenId","Long","fromValue","treasury","Key","_fromProtobufKey","shard","toInt","realm","num","Duration","expiry","Timestamp","memo","map","fee","fixedFee","CustomFixedFee","fractionalFee","CustomFractionalFee","CustomRoyaltyFee","TokenType","_fromCode","TokenSupplyType","LedgerId","fromBytes","Uint8Array","_toProtobuf","_toProtobufKey","deleted","undefined","_code","toBytes","bytes","HieroProto","proto","decode","encode","finish"],"mappings":"maAuBe,MAAMA,EAiCjB,WAAAC,CAAYC,GAMRC,KAAKC,QAAUF,EAAME,QAOrBD,KAAKE,KAAOH,EAAMG,KAOlBF,KAAKG,OAASJ,EAAMI,OAOpBH,KAAKI,SAAWL,EAAMK,SAOtBJ,KAAKK,YAAcN,EAAMM,YAOzBL,KAAKM,kBAAoBP,EAAMO,kBAQ/BN,KAAKO,SAAWR,EAAMQ,SAQtBP,KAAKQ,OAAST,EAAMS,OAOpBR,KAAKS,UAAYV,EAAMU,UAOvBT,KAAKU,SAAWX,EAAMW,SAOtBV,KAAKW,QAAUZ,EAAMY,QAOrBX,KAAKY,UAAYb,EAAMa,UAEvBZ,KAAKa,eAAiBd,EAAMc,eAY5Bb,KAAKc,oBAAsBf,EAAMe,oBAWjCd,KAAKe,iBAAmB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A2B,MAAjB1B,KAAK0B,SAAmB1B,KAAK0B,SAASuC,UAAY,KAC5DtC,YACwB,MAApB3B,KAAK2B,YACC3B,KAAK2B,YAAYkC,iBACjB,KACVjC,SAA2B,MAAjB5B,KAAK4B,SAAmB5B,KAAK4B,SAAW,KAE9D,CAMI,gBAAO8B,CAAUQ,GACb,OAAOrE,EAAUgC,cACbsC,EAAWC,MAAMvE,UAAUwE,OAAOH,GAE9C,CAKI,OAAAD,GACI,OAAOE,EAAWC,MAAMvE,UAAUyE,OAAOtE,KAAK4D,eAAeW,QACrE"}
|
|
@@ -16,13 +16,13 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* @namespace proto
|
|
19
|
-
* @typedef {import("@
|
|
20
|
-
* @typedef {import("@
|
|
21
|
-
* @typedef {import("@
|
|
22
|
-
* @typedef {import("@
|
|
23
|
-
* @typedef {import("@
|
|
24
|
-
* @typedef {import("@
|
|
25
|
-
* @typedef {import("@
|
|
19
|
+
* @typedef {import("@hiero-ledger/proto").proto.IQuery} HieroProto.proto.IQuery
|
|
20
|
+
* @typedef {import("@hiero-ledger/proto").proto.IQueryHeader} HieroProto.proto.IQueryHeader
|
|
21
|
+
* @typedef {import("@hiero-ledger/proto").proto.IResponse} HieroProto.proto.IResponse
|
|
22
|
+
* @typedef {import("@hiero-ledger/proto").proto.IResponseHeader} HieroProto.proto.IResponseHeader
|
|
23
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITokenInfo} HieroProto.proto.ITokenInfo
|
|
24
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITokenGetInfoQuery} HieroProto.proto.ITokenGetInfoQuery
|
|
25
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITokenGetInfoResponse} HieroProto.proto.ITokenGetInfoResponse
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
28
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @namespace proto
|
|
3
|
-
* @typedef {import("@
|
|
4
|
-
* @typedef {import("@
|
|
5
|
-
* @typedef {import("@
|
|
6
|
-
* @typedef {import("@
|
|
7
|
-
* @typedef {import("@
|
|
8
|
-
* @typedef {import("@
|
|
9
|
-
* @typedef {import("@
|
|
3
|
+
* @typedef {import("@hiero-ledger/proto").proto.IQuery} HieroProto.proto.IQuery
|
|
4
|
+
* @typedef {import("@hiero-ledger/proto").proto.IQueryHeader} HieroProto.proto.IQueryHeader
|
|
5
|
+
* @typedef {import("@hiero-ledger/proto").proto.IResponse} HieroProto.proto.IResponse
|
|
6
|
+
* @typedef {import("@hiero-ledger/proto").proto.IResponseHeader} HieroProto.proto.IResponseHeader
|
|
7
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITokenInfo} HieroProto.proto.ITokenInfo
|
|
8
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITokenGetInfoQuery} HieroProto.proto.ITokenGetInfoQuery
|
|
9
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITokenGetInfoResponse} HieroProto.proto.ITokenGetInfoResponse
|
|
10
10
|
*/
|
|
11
11
|
/**
|
|
12
12
|
* @typedef {import("../channel/Channel.js").default} Channel
|
|
@@ -50,13 +50,13 @@ export default class TokenInfoQuery extends Query<TokenInfo> {
|
|
|
50
50
|
}
|
|
51
51
|
export namespace HieroProto {
|
|
52
52
|
namespace proto {
|
|
53
|
-
type IQuery = import("@
|
|
54
|
-
type IQueryHeader = import("@
|
|
55
|
-
type IResponse = import("@
|
|
56
|
-
type IResponseHeader = import("@
|
|
57
|
-
type ITokenInfo = import("@
|
|
58
|
-
type ITokenGetInfoQuery = import("@
|
|
59
|
-
type ITokenGetInfoResponse = import("@
|
|
53
|
+
type IQuery = import("@hiero-ledger/proto").proto.IQuery;
|
|
54
|
+
type IQueryHeader = import("@hiero-ledger/proto").proto.IQueryHeader;
|
|
55
|
+
type IResponse = import("@hiero-ledger/proto").proto.IResponse;
|
|
56
|
+
type IResponseHeader = import("@hiero-ledger/proto").proto.IResponseHeader;
|
|
57
|
+
type ITokenInfo = import("@hiero-ledger/proto").proto.ITokenInfo;
|
|
58
|
+
type ITokenGetInfoQuery = import("@hiero-ledger/proto").proto.ITokenGetInfoQuery;
|
|
59
|
+
type ITokenGetInfoResponse = import("@hiero-ledger/proto").proto.ITokenGetInfoResponse;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
export type Channel = import("../channel/Channel.js").default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenInfoQuery.js","sources":["../../src/token/TokenInfoQuery.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Query, { QUERY_REGISTRY } from \"../query/Query.js\";\nimport TokenId from \"./TokenId.js\";\nimport TokenInfo from \"./TokenInfo.js\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport Hbar from \"../Hbar.js\";\n\n/**\n * @namespace proto\n * @typedef {import(\"@
|
|
1
|
+
{"version":3,"file":"TokenInfoQuery.js","sources":["../../src/token/TokenInfoQuery.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Query, { QUERY_REGISTRY } from \"../query/Query.js\";\nimport TokenId from \"./TokenId.js\";\nimport TokenInfo from \"./TokenInfo.js\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport Hbar from \"../Hbar.js\";\n\n/**\n * @namespace proto\n * @typedef {import(\"@hiero-ledger/proto\").proto.IQuery} HieroProto.proto.IQuery\n * @typedef {import(\"@hiero-ledger/proto\").proto.IQueryHeader} HieroProto.proto.IQueryHeader\n * @typedef {import(\"@hiero-ledger/proto\").proto.IResponse} HieroProto.proto.IResponse\n * @typedef {import(\"@hiero-ledger/proto\").proto.IResponseHeader} HieroProto.proto.IResponseHeader\n * @typedef {import(\"@hiero-ledger/proto\").proto.ITokenInfo} HieroProto.proto.ITokenInfo\n * @typedef {import(\"@hiero-ledger/proto\").proto.ITokenGetInfoQuery} HieroProto.proto.ITokenGetInfoQuery\n * @typedef {import(\"@hiero-ledger/proto\").proto.ITokenGetInfoResponse} HieroProto.proto.ITokenGetInfoResponse\n */\n\n/**\n * @typedef {import(\"../channel/Channel.js\").default} Channel\n * @typedef {import(\"../client/Client.js\").default<*, *>} Client\n * @typedef {import(\"../account/AccountId.js\").default} AccountId\n */\n\n/**\n * Retrieve the detail characteristics for a token.\n * @augments {Query<TokenInfo>}\n */\nexport default class TokenInfoQuery extends Query {\n /**\n * @param {object} properties\n * @param {TokenId | string} [properties.tokenId]\n */\n constructor(properties = {}) {\n super();\n\n /**\n * @private\n * @type {?TokenId}\n */\n this._tokenId = null;\n if (properties.tokenId != null) {\n this.setTokenId(properties.tokenId);\n }\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.IQuery} query\n * @returns {TokenInfoQuery}\n */\n static _fromProtobuf(query) {\n const info = /** @type {HieroProto.proto.ITokenGetInfoQuery} */ (\n query.tokenGetInfo\n );\n\n return new TokenInfoQuery({\n tokenId:\n info.token != null\n ? TokenId._fromProtobuf(info.token)\n : undefined,\n });\n }\n\n /**\n * @returns {?TokenId}\n */\n get tokenId() {\n return this._tokenId;\n }\n\n /**\n * Set the token ID for which the info is being requested.\n *\n * @param {TokenId | string} tokenId\n * @returns {TokenInfoQuery}\n */\n setTokenId(tokenId) {\n this._tokenId =\n typeof tokenId === \"string\"\n ? TokenId.fromString(tokenId)\n : tokenId.clone();\n\n return this;\n }\n\n /**\n * @override\n * @param {import(\"../client/Client.js\").default<Channel, *>} client\n * @returns {Promise<Hbar>}\n */\n async getCost(client) {\n return super.getCost(client);\n }\n\n /**\n * @param {Client} client\n */\n _validateChecksums(client) {\n if (this._tokenId != null) {\n this._tokenId.validateChecksum(client);\n }\n }\n\n /**\n * @override\n * @internal\n * @param {Channel} channel\n * @param {HieroProto.proto.IQuery} request\n * @returns {Promise<HieroProto.proto.IResponse>}\n */\n _execute(channel, request) {\n return channel.token.getTokenInfo(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 tokenGetInfo =\n /** @type {HieroProto.proto.ITokenGetInfoResponse} */ (\n response.tokenGetInfo\n );\n return /** @type {HieroProto.proto.IResponseHeader} */ (\n tokenGetInfo.header\n );\n }\n\n /**\n * @override\n * @internal\n * @param {HieroProto.proto.IResponse} response\n * @param {AccountId} nodeAccountId\n * @param {HieroProto.proto.IQuery} request\n * @returns {Promise<TokenInfo>}\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _mapResponse(response, nodeAccountId, request) {\n const info = /** @type {HieroProto.proto.ITokenGetInfoResponse} */ (\n response.tokenGetInfo\n );\n\n return Promise.resolve(\n TokenInfo._fromProtobuf(\n /** @type {HieroProto.proto.ITokenInfo} */ (info.tokenInfo),\n ),\n );\n }\n\n /**\n * @override\n * @internal\n * @param {HieroProto.proto.IQueryHeader} header\n * @returns {HieroProto.proto.IQuery}\n */\n _onMakeRequest(header) {\n return {\n tokenGetInfo: {\n header,\n token:\n this._tokenId != null ? this._tokenId._toProtobuf() : null,\n },\n };\n }\n\n /**\n * @returns {string}\n */\n _getLogId() {\n const timestamp =\n this._paymentTransactionId != null &&\n this._paymentTransactionId.validStart != null\n ? this._paymentTransactionId.validStart\n : this._timestamp;\n\n return `TokenInfoQuery:${timestamp.toString()}`;\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/unbound-method\nQUERY_REGISTRY.set(\"tokenGetInfo\", TokenInfoQuery._fromProtobuf);\n"],"names":["TokenInfoQuery","Query","constructor","properties","super","this","_tokenId","tokenId","setTokenId","_fromProtobuf","query","info","token","TokenId","undefined","fromString","clone","getCost","client","_validateChecksums","validateChecksum","_execute","channel","request","getTokenInfo","_mapResponseHeader","response","_mapResponse","nodeAccountId","Promise","resolve","TokenInfo","_onMakeRequest","header","tokenGetInfo","_toProtobuf","_getLogId","_paymentTransactionId","validStart","_timestamp","toString","QUERY_REGISTRY","set"],"mappings":"yKA6Be,MAAMA,UAAuBC,EAKxC,WAAAC,CAAYC,EAAa,IACrBC,QAMAC,KAAKC,SAAW,KACU,MAAtBH,EAAWI,SACXF,KAAKG,WAAWL,EAAWI,QAEvC,CAOI,oBAAOE,CAAcC,GACjB,MAAMC,EACFD,EACH,aAED,OAAO,IAAIV,EAAe,CACtBO,QACkB,MAAdI,EAAKC,MACCC,EAAQJ,cAAcE,EAAKC,YAC3BE,GAEtB,CAKI,WAAIP,GACA,OAAOF,KAAKC,QACpB,CAQI,UAAAE,CAAWD,GAMP,OALAF,KAAKC,SACkB,iBAAZC,EACDM,EAAQE,WAAWR,GACnBA,EAAQS,QAEXX,IACf,CAOI,aAAMY,CAAQC,GACV,OAAOd,MAAMa,QAAQC,EAC7B,CAKI,kBAAAC,CAAmBD,GACM,MAAjBb,KAAKC,UACLD,KAAKC,SAASc,iBAAiBF,EAE3C,CASI,QAAAG,CAASC,EAASC,GACd,OAAOD,EAAQV,MAAMY,aAAaD,EAC1C,CAQI,kBAAAE,CAAmBC,GAKf,OAFQA,EACH,aAGb,MACA,CAWI,YAAAC,CAAaD,EAAUE,EAAeL,GAClC,MAAMZ,EACFe,EACH,aAED,OAAOG,QAAQC,QACXC,EAAUtB,cACsCE,EAAc,WAG1E,CAQI,cAAAqB,CAAeC,GACX,MAAO,CACHC,aAAc,CACVD,SACArB,MACqB,MAAjBP,KAAKC,SAAmBD,KAAKC,SAAS6B,cAAgB,MAG1E,CAKI,SAAAC,GAOI,MAAO,mBAL2B,MAA9B/B,KAAKgC,uBACoC,MAAzChC,KAAKgC,sBAAsBC,WACrBjC,KAAKgC,sBAAsBC,WAC3BjC,KAAKkC,YAEoBC,YAC3C,EAIAC,EAAeC,IAAI,eAAgB1C,EAAeS"}
|
|
@@ -8,7 +8,7 @@ exports.default = void 0;
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @namespace proto
|
|
11
|
-
* @typedef {import("@
|
|
11
|
+
* @typedef {import("@hiero-ledger/proto").proto.TokenKeyValidation} HieroProto.proto.TokenKeyValidation
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
/** Types of validation strategies for token keys. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @namespace proto
|
|
3
|
-
* @typedef {import("@
|
|
3
|
+
* @typedef {import("@hiero-ledger/proto").proto.TokenKeyValidation} HieroProto.proto.TokenKeyValidation
|
|
4
4
|
*/
|
|
5
5
|
/** Types of validation strategies for token keys. */
|
|
6
6
|
declare class TokenKeyValidation {
|
|
@@ -34,6 +34,6 @@ declare namespace TokenKeyValidation {
|
|
|
34
34
|
export default TokenKeyValidation;
|
|
35
35
|
export namespace HieroProto {
|
|
36
36
|
namespace proto {
|
|
37
|
-
type TokenKeyValidation = import("@
|
|
37
|
+
type TokenKeyValidation = import("@hiero-ledger/proto").proto.TokenKeyValidation;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenKeyValidation.js","sources":["../../src/token/TokenKeyValidation.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\n/**\n * @namespace proto\n * @typedef {import(\"@
|
|
1
|
+
{"version":3,"file":"TokenKeyValidation.js","sources":["../../src/token/TokenKeyValidation.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\n/**\n * @namespace proto\n * @typedef {import(\"@hiero-ledger/proto\").proto.TokenKeyValidation} HieroProto.proto.TokenKeyValidation\n */\n\n/** Types of validation strategies for token keys. */\nexport default class TokenKeyValidation {\n /**\n * @hideconstructor\n * @internal\n * @param {number} code\n */\n constructor(code) {\n /** @readonly */\n this._code = code;\n\n Object.freeze(this);\n }\n\n /**\n * @returns {string}\n */\n toString() {\n switch (this) {\n case TokenKeyValidation.FullValidation:\n return \"FULL_VALIDATION\";\n case TokenKeyValidation.NoValidation:\n return \"NO_VALIDATION\";\n default:\n return `UNKNOWN (${this._code})`;\n }\n }\n\n /**\n * @internal\n * @param {number} code\n * @returns {TokenKeyValidation}\n */\n static _fromCode(code) {\n switch (code) {\n case 0:\n return TokenKeyValidation.FullValidation;\n case 1:\n return TokenKeyValidation.NoValidation;\n }\n\n throw new Error(\n `(BUG) TokenKeyValidation.fromCode() does not handle code: ${code}`,\n );\n }\n\n /**\n * @returns {HieroProto.proto.TokenKeyValidation}\n */\n valueOf() {\n return this._code;\n }\n}\n\n/**\n * Currently the default behaviour. It will perform all token key validations.\n */\nTokenKeyValidation.FullValidation = new TokenKeyValidation(0);\n\n/**\n * Perform no validations at all for all passed token keys.\n */\nTokenKeyValidation.NoValidation = new TokenKeyValidation(1);\n"],"names":["TokenKeyValidation","constructor","code","this","_code","Object","freeze","toString","FullValidation","NoValidation","_fromCode","Error","valueOf"],"mappings":"AAQe,MAAMA,EAMjB,WAAAC,CAAYC,GAERC,KAAKC,MAAQF,EAEbG,OAAOC,OAAOH,KACtB,CAKI,QAAAI,GACI,OAAQJ,MACJ,KAAKH,EAAmBQ,eACpB,MAAO,kBACX,KAAKR,EAAmBS,aACpB,MAAO,gBACX,QACI,MAAO,YAAYN,KAAKC,SAExC,CAOI,gBAAOM,CAAUR,GACb,OAAQA,GACJ,KAAK,EACD,OAAOF,EAAmBQ,eAC9B,KAAK,EACD,OAAOR,EAAmBS,aAGlC,MAAM,IAAIE,MACN,6DAA6DT,IAEzE,CAKI,OAAAU,GACI,OAAOT,KAAKC,KACpB,EAMAJ,EAAmBQ,eAAiB,IAAIR,EAAmB,GAK3DA,EAAmBS,aAAe,IAAIT,EAAmB"}
|
|
@@ -14,13 +14,13 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* @namespace proto
|
|
17
|
-
* @typedef {import("@
|
|
18
|
-
* @typedef {import("@
|
|
19
|
-
* @typedef {import("@
|
|
20
|
-
* @typedef {import("@
|
|
21
|
-
* @typedef {import("@
|
|
22
|
-
* @typedef {import("@
|
|
23
|
-
* @typedef {import("@
|
|
17
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransaction} HieroProto.proto.ITransaction
|
|
18
|
+
* @typedef {import("@hiero-ledger/proto").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction
|
|
19
|
+
* @typedef {import("@hiero-ledger/proto").proto.TransactionBody} HieroProto.proto.TransactionBody
|
|
20
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionBody} HieroProto.proto.ITransactionBody
|
|
21
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionResponse} HieroProto.proto.ITransactionResponse
|
|
22
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITokenMintTransactionBody} HieroProto.proto.ITokenMintTransactionBody
|
|
23
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITokenID} HieroProto.proto.ITokenID
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
26
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @namespace proto
|
|
3
|
-
* @typedef {import("@
|
|
4
|
-
* @typedef {import("@
|
|
5
|
-
* @typedef {import("@
|
|
6
|
-
* @typedef {import("@
|
|
7
|
-
* @typedef {import("@
|
|
8
|
-
* @typedef {import("@
|
|
9
|
-
* @typedef {import("@
|
|
3
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransaction} HieroProto.proto.ITransaction
|
|
4
|
+
* @typedef {import("@hiero-ledger/proto").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction
|
|
5
|
+
* @typedef {import("@hiero-ledger/proto").proto.TransactionBody} HieroProto.proto.TransactionBody
|
|
6
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionBody} HieroProto.proto.ITransactionBody
|
|
7
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionResponse} HieroProto.proto.ITransactionResponse
|
|
8
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITokenMintTransactionBody} HieroProto.proto.ITokenMintTransactionBody
|
|
9
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITokenID} HieroProto.proto.ITokenID
|
|
10
10
|
*/
|
|
11
11
|
/**
|
|
12
12
|
* @typedef {import("../channel/Channel.js").default} Channel
|
|
@@ -96,13 +96,13 @@ export default class TokenMintTransaction extends Transaction {
|
|
|
96
96
|
}
|
|
97
97
|
export namespace HieroProto {
|
|
98
98
|
namespace proto {
|
|
99
|
-
type ITransaction = import("@
|
|
100
|
-
type ISignedTransaction = import("@
|
|
101
|
-
type TransactionBody = import("@
|
|
102
|
-
type ITransactionBody = import("@
|
|
103
|
-
type ITransactionResponse = import("@
|
|
104
|
-
type ITokenMintTransactionBody = import("@
|
|
105
|
-
type ITokenID = import("@
|
|
99
|
+
type ITransaction = import("@hiero-ledger/proto").proto.ITransaction;
|
|
100
|
+
type ISignedTransaction = import("@hiero-ledger/proto").proto.ISignedTransaction;
|
|
101
|
+
type TransactionBody = import("@hiero-ledger/proto").proto.TransactionBody;
|
|
102
|
+
type ITransactionBody = import("@hiero-ledger/proto").proto.ITransactionBody;
|
|
103
|
+
type ITransactionResponse = import("@hiero-ledger/proto").proto.ITransactionResponse;
|
|
104
|
+
type ITokenMintTransactionBody = import("@hiero-ledger/proto").proto.ITokenMintTransactionBody;
|
|
105
|
+
type ITokenID = import("@hiero-ledger/proto").proto.ITokenID;
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
export type Channel = import("../channel/Channel.js").default;
|