@hiero-ledger/sdk 2.77.0 → 2.78.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/dist/umd.js +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 +1 -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,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.ICryptoDeleteAllowanceTransactionBody} HieroProto.proto.ICryptoDeleteAllowanceTransactionBody
|
|
9
|
+
* @typedef {import("@hiero-ledger/proto").proto.IAccountID} HieroProto.proto.IAccountID
|
|
10
10
|
*/
|
|
11
11
|
/**
|
|
12
12
|
* @typedef {import("./HbarAllowance.js").default} HbarAllowance
|
|
@@ -68,13 +68,13 @@ export default class AccountAllowanceDeleteTransaction extends Transaction {
|
|
|
68
68
|
}
|
|
69
69
|
export namespace HieroProto {
|
|
70
70
|
namespace proto {
|
|
71
|
-
type ITransaction = import("@
|
|
72
|
-
type ISignedTransaction = import("@
|
|
73
|
-
type TransactionBody = import("@
|
|
74
|
-
type ITransactionBody = import("@
|
|
75
|
-
type ITransactionResponse = import("@
|
|
76
|
-
type ICryptoDeleteAllowanceTransactionBody = import("@
|
|
77
|
-
type IAccountID = import("@
|
|
71
|
+
type ITransaction = import("@hiero-ledger/proto").proto.ITransaction;
|
|
72
|
+
type ISignedTransaction = import("@hiero-ledger/proto").proto.ISignedTransaction;
|
|
73
|
+
type TransactionBody = import("@hiero-ledger/proto").proto.TransactionBody;
|
|
74
|
+
type ITransactionBody = import("@hiero-ledger/proto").proto.ITransactionBody;
|
|
75
|
+
type ITransactionResponse = import("@hiero-ledger/proto").proto.ITransactionResponse;
|
|
76
|
+
type ICryptoDeleteAllowanceTransactionBody = import("@hiero-ledger/proto").proto.ICryptoDeleteAllowanceTransactionBody;
|
|
77
|
+
type IAccountID = import("@hiero-ledger/proto").proto.IAccountID;
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
export type HbarAllowance = import("./HbarAllowance.js").default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountAllowanceDeleteTransaction.js","sources":["../../src/account/AccountAllowanceDeleteTransaction.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Transaction, {\n TRANSACTION_REGISTRY,\n} from \"../transaction/Transaction.js\";\nimport AccountId from \"./AccountId.js\";\nimport NftId from \"../token/NftId.js\";\nimport TokenNftAllowance from \"./TokenNftAllowance.js\";\n\n/**\n * @namespace proto\n * @typedef {import(\"@
|
|
1
|
+
{"version":3,"file":"AccountAllowanceDeleteTransaction.js","sources":["../../src/account/AccountAllowanceDeleteTransaction.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Transaction, {\n TRANSACTION_REGISTRY,\n} from \"../transaction/Transaction.js\";\nimport AccountId from \"./AccountId.js\";\nimport NftId from \"../token/NftId.js\";\nimport TokenNftAllowance from \"./TokenNftAllowance.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.ICryptoDeleteAllowanceTransactionBody} HieroProto.proto.ICryptoDeleteAllowanceTransactionBody\n * @typedef {import(\"@hiero-ledger/proto\").proto.IAccountID} HieroProto.proto.IAccountID\n */\n\n/**\n * @typedef {import(\"./HbarAllowance.js\").default} HbarAllowance\n * @typedef {import(\"./TokenAllowance.js\").default} TokenAllowance\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 * @typedef {import(\"bignumber.js\").default} BigNumber\n * @typedef {import(\"../long.js\").LongObject} LongObject\n */\n\n/**\n * Change properties for the given account.\n */\nexport default class AccountAllowanceDeleteTransaction extends Transaction {\n /**\n * @param {object} [props]\n * @param {HbarAllowance[]} [props.hbarAllowances]\n * @param {TokenAllowance[]} [props.tokenAllowances]\n * @param {TokenNftAllowance[]} [props.nftAllowances]\n */\n constructor(props = {}) {\n super();\n\n /**\n * @private\n * @type {TokenNftAllowance[]}\n */\n this._nftAllowances =\n props.nftAllowances != null ? props.nftAllowances : [];\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 {AccountAllowanceDeleteTransaction}\n */\n static _fromProtobuf(\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n ) {\n const body = bodies[0];\n const allowance =\n /** @type {HieroProto.proto.ICryptoDeleteAllowanceTransactionBody} */ (\n body.cryptoDeleteAllowance\n );\n\n return Transaction._fromProtobufTransactions(\n new AccountAllowanceDeleteTransaction({\n nftAllowances: (allowance.nftAllowances != null\n ? allowance.nftAllowances\n : []\n ).map((allowance) =>\n TokenNftAllowance._fromProtobuf(allowance),\n ),\n }),\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n );\n }\n\n /**\n * @returns {TokenNftAllowance[]}\n */\n get tokenNftAllowanceDeletions() {\n return this._nftAllowances;\n }\n\n /**\n * @description If you want to remove allowance for all serials of a NFT\n * - use AccountAllowanceApproveTransaction().deleteTokenNftAllowanceAllSerials()\n * @param {NftId | string} nftId\n * @param {AccountId | string} ownerAccountId\n * @returns {AccountAllowanceDeleteTransaction}\n */\n deleteAllTokenNftAllowances(nftId, ownerAccountId) {\n this._requireNotFrozen();\n\n const id = typeof nftId === \"string\" ? NftId.fromString(nftId) : nftId;\n\n const owner =\n typeof ownerAccountId === \"string\"\n ? AccountId.fromString(ownerAccountId)\n : ownerAccountId;\n let found = false;\n\n for (const allowance of this._nftAllowances) {\n if (allowance.tokenId.compare(id.tokenId) === 0) {\n if (allowance.serialNumbers != null) {\n allowance.serialNumbers.push(id.serial);\n }\n found = true;\n break;\n }\n }\n\n if (!found) {\n this._nftAllowances.push(\n new TokenNftAllowance({\n tokenId: id.tokenId,\n spenderAccountId: null,\n serialNumbers: [id.serial],\n ownerAccountId: owner,\n allSerials: false,\n delegatingSpender: null,\n }),\n );\n }\n\n return this;\n }\n\n /**\n * @param {Client} client\n */\n _validateChecksums(client) {\n this._nftAllowances.map((allowance) =>\n allowance._validateChecksums(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.crypto.deleteAllowances(request);\n }\n\n /**\n * @override\n * @protected\n * @returns {NonNullable<HieroProto.proto.TransactionBody[\"data\"]>}\n */\n _getTransactionDataCase() {\n return \"cryptoDeleteAllowance\";\n }\n\n /**\n * @override\n * @protected\n * @returns {HieroProto.proto.ICryptoDeleteAllowanceTransactionBody}\n */\n _makeTransactionData() {\n return {\n nftAllowances: this._nftAllowances.map((allowance) =>\n allowance._toProtobuf(),\n ),\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 `AccountAllowanceDeleteTransaction:${timestamp.toString()}`;\n }\n}\n\nTRANSACTION_REGISTRY.set(\n \"cryptoDeleteAllowance\",\n // eslint-disable-next-line @typescript-eslint/unbound-method\n AccountAllowanceDeleteTransaction._fromProtobuf,\n);\n"],"names":["AccountAllowanceDeleteTransaction","Transaction","constructor","props","super","this","_nftAllowances","nftAllowances","_fromProtobuf","transactions","signedTransactions","transactionIds","nodeIds","bodies","allowance","_fromProtobufTransactions","map","TokenNftAllowance","tokenNftAllowanceDeletions","deleteAllTokenNftAllowances","nftId","ownerAccountId","_requireNotFrozen","id","NftId","fromString","owner","AccountId","found","tokenId","compare","serialNumbers","push","serial","spenderAccountId","allSerials","delegatingSpender","_validateChecksums","client","_execute","channel","request","crypto","deleteAllowances","_getTransactionDataCase","_makeTransactionData","_toProtobuf","_getLogId","_transactionIds","current","toString","TRANSACTION_REGISTRY","set"],"mappings":"6KAiCe,MAA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1C,KAAK2C,gBAAgBC,QACxB,WACqDC,YAC9D,EAGAC,EAAqBC,IACjB,wBAEApD,EAAkCQ"}
|
|
@@ -9,7 +9,7 @@ var _Hbar = _interopRequireDefault(require("../Hbar.cjs"));
|
|
|
9
9
|
var _TokenId = _interopRequireDefault(require("../token/TokenId.cjs"));
|
|
10
10
|
var _TokenBalanceMap = _interopRequireDefault(require("./TokenBalanceMap.cjs"));
|
|
11
11
|
var _TokenDecimalMap = _interopRequireDefault(require("./TokenDecimalMap.cjs"));
|
|
12
|
-
var HieroProto = _interopRequireWildcard(require("@
|
|
12
|
+
var HieroProto = _interopRequireWildcard(require("@hiero-ledger/proto"));
|
|
13
13
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
14
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
15
|
// SPDX-License-Identifier: Apache-2.0
|
|
@@ -69,4 +69,4 @@ export type AccountBalanceJson = {
|
|
|
69
69
|
import Hbar from "../Hbar.js";
|
|
70
70
|
import TokenBalanceMap from "./TokenBalanceMap.js";
|
|
71
71
|
import TokenDecimalMap from "./TokenDecimalMap.js";
|
|
72
|
-
import * as HieroProto from "@
|
|
72
|
+
import * as HieroProto from "@hiero-ledger/proto";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import t from"long";import o from"../Hbar.js";import e from"../token/TokenId.js";import
|
|
1
|
+
import t from"long";import o from"../Hbar.js";import e from"../token/TokenId.js";import n from"./TokenBalanceMap.js";import s from"./TokenDecimalMap.js";import*as r from"@hiero-ledger/proto";class a{constructor(t){this.hbars=t.hbars,this.tokens=t.tokens,this.tokenDecimals=t.tokenDecimals,Object.freeze(this)}static fromBytes(t){return a._fromProtobuf(r.proto.CryptoGetAccountBalanceResponse.decode(t))}static _fromProtobuf(r){const i=new n,l=new s;if(null!=r.tokenBalances)for(const o of r.tokenBalances){const n=e._fromProtobuf(o.tokenId);l._set(n,null!=o.decimals?o.decimals:0),i._set(n,t.fromValue(o.balance))}return new a({hbars:o.fromTinybars(r.balance),tokens:i,tokenDecimals:l})}_toProtobuf(){const t=[];for(const[o,e]of null!=this.tokens?this.tokens:[])t.push({tokenId:o._toProtobuf(),balance:e,decimals:null!=this.tokenDecimals?this.tokenDecimals.get(o):null});return{balance:this.hbars.toTinybars(),tokenBalances:t}}toBytes(){return r.proto.CryptoGetAccountBalanceResponse.encode(this._toProtobuf()).finish()}toString(){return JSON.stringify(this.toJSON())}toJSON(){const t=[];for(const[o,e]of null!=this.tokens?this.tokens:[]){const n=null!=this.tokenDecimals?this.tokenDecimals.get(o):null;t.push({tokenId:o.toString(),balance:e.toString(),decimals:null!=n?n:0})}return{hbars:this.hbars.toString(),tokens:t}}}export{a as default};
|
|
2
2
|
//# sourceMappingURL=AccountBalance.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountBalance.js","sources":["../../src/account/AccountBalance.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Long from \"long\";\nimport Hbar from \"../Hbar.js\";\nimport TokenId from \"../token/TokenId.js\";\nimport TokenBalanceMap from \"./TokenBalanceMap.js\";\nimport TokenDecimalMap from \"./TokenDecimalMap.js\";\nimport * as HieroProto from \"@
|
|
1
|
+
{"version":3,"file":"AccountBalance.js","sources":["../../src/account/AccountBalance.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Long from \"long\";\nimport Hbar from \"../Hbar.js\";\nimport TokenId from \"../token/TokenId.js\";\nimport TokenBalanceMap from \"./TokenBalanceMap.js\";\nimport TokenDecimalMap from \"./TokenDecimalMap.js\";\nimport * as HieroProto from \"@hiero-ledger/proto\";\n\n/**\n * @typedef {object} TokenBalanceJson\n * @property {string} tokenId\n * @property {string} balance\n * @property {number} decimals\n */\n\n/**\n * @typedef {object} AccountBalanceJson\n * @property {string} hbars\n * @property {TokenBalanceJson[]} tokens\n */\n\n/**\n * Represents the balance of an account on the Hedera network, including both HBAR and token balances.\n */\nexport default class AccountBalance {\n /**\n * @private\n * @param {object} props\n * @param {Hbar} props.hbars\n * @param {?TokenBalanceMap} props.tokens\n * @param {?TokenDecimalMap} props.tokenDecimals\n */\n constructor(props) {\n /**\n * The Hbar balance of the account\n *\n * @readonly\n */\n this.hbars = props.hbars;\n\n this.tokens = props.tokens;\n\n this.tokenDecimals = props.tokenDecimals;\n\n Object.freeze(this);\n }\n\n /**\n * @param {Uint8Array} bytes\n * @returns {AccountBalance}\n */\n static fromBytes(bytes) {\n return AccountBalance._fromProtobuf(\n HieroProto.proto.CryptoGetAccountBalanceResponse.decode(bytes),\n );\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.ICryptoGetAccountBalanceResponse} accountBalance\n * @returns {AccountBalance}\n */\n static _fromProtobuf(accountBalance) {\n const tokenBalances = new TokenBalanceMap();\n const tokenDecimals = new TokenDecimalMap();\n\n if (accountBalance.tokenBalances != null) {\n for (const balance of accountBalance.tokenBalances) {\n const tokenId = TokenId._fromProtobuf(\n /** @type {HieroProto.proto.ITokenID} */ (balance.tokenId),\n );\n\n tokenDecimals._set(\n tokenId,\n balance.decimals != null ? balance.decimals : 0,\n );\n tokenBalances._set(\n tokenId,\n Long.fromValue(/** @type {Long} */ (balance.balance)),\n );\n }\n }\n\n return new AccountBalance({\n hbars: Hbar.fromTinybars(\n /** @type {Long} */ (accountBalance.balance),\n ),\n tokens: tokenBalances,\n tokenDecimals,\n });\n }\n\n /**\n * @returns {HieroProto.proto.ICryptoGetAccountBalanceResponse}\n */\n _toProtobuf() {\n /** @type {HieroProto.proto.ITokenBalance[]} */\n const list = [];\n\n // eslint-disable-next-line deprecation/deprecation\n for (const [key, value] of this.tokens != null ? this.tokens : []) {\n list.push({\n tokenId: key._toProtobuf(),\n balance: value,\n decimals:\n // eslint-disable-next-line deprecation/deprecation\n this.tokenDecimals != null\n ? // eslint-disable-next-line deprecation/deprecation\n this.tokenDecimals.get(key)\n : null,\n });\n }\n\n return {\n balance: this.hbars.toTinybars(),\n tokenBalances: list,\n };\n }\n\n /**\n * @returns {Uint8Array}\n */\n toBytes() {\n return HieroProto.proto.CryptoGetAccountBalanceResponse.encode(\n this._toProtobuf(),\n ).finish();\n }\n\n /**\n * @returns {string}\n */\n toString() {\n return JSON.stringify(this.toJSON());\n }\n\n /**\n * @returns {AccountBalanceJson}\n */\n toJSON() {\n const tokens = [];\n // eslint-disable-next-line deprecation/deprecation\n for (const [key, value] of this.tokens != null ? this.tokens : []) {\n const decimals =\n // eslint-disable-next-line deprecation/deprecation\n this.tokenDecimals != null ? this.tokenDecimals.get(key) : null;\n\n tokens.push({\n tokenId: key.toString(),\n balance: value.toString(),\n decimals: decimals != null ? decimals : 0,\n });\n }\n\n return {\n hbars: this.hbars.toString(),\n tokens,\n };\n }\n}\n"],"names":["AccountBalance","constructor","props","this","hbars","tokens","tokenDecimals","Object","freeze","fromBytes","bytes","_fromProtobuf","HieroProto","proto","CryptoGetAccountBalanceResponse","decode","accountBalance","tokenBalances","TokenBalanceMap","TokenDecimalMap","balance","tokenId","TokenId","_set","decimals","Long","fromValue","Hbar","fromTinybars","_toProtobuf","list","key","value","push","get","toTinybars","toBytes","encode","finish","toString","JSON","stringify","toJSON"],"mappings":"+LAyBe,MAAMA,EAQjB,WAAAC,CAAYC,GAMRC,KAAKC,MAAQF,EAAME,MAEnBD,KAAKE,OAASH,EAAMG,OAEpBF,KAAKG,cAAgBJ,EAAMI,cAE3BC,OAAOC,OAAOL,KACtB,CAMI,gBAAOM,CAAUC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C,SAEZ"}
|
|
@@ -14,12 +14,12 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
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("@
|
|
17
|
+
* @typedef {import("@hiero-ledger/proto").proto.IQuery} HieroProto.proto.IQuery
|
|
18
|
+
* @typedef {import("@hiero-ledger/proto").proto.IQueryHeader} HieroProto.proto.IQueryHeader
|
|
19
|
+
* @typedef {import("@hiero-ledger/proto").proto.IResponse} HieroProto.proto.IResponse
|
|
20
|
+
* @typedef {import("@hiero-ledger/proto").proto.IResponseHeader} HieroProto.proto.IResponseHeader
|
|
21
|
+
* @typedef {import("@hiero-ledger/proto").proto.ICryptoGetAccountBalanceQuery} HieroProto.proto.ICryptoGetAccountBalanceQuery
|
|
22
|
+
* @typedef {import("@hiero-ledger/proto").proto.ICryptoGetAccountBalanceResponse} HieroProto.proto.ICryptoGetAccountBalanceResponse
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @namespace proto
|
|
3
|
-
* @typedef {import("@
|
|
4
|
-
* @typedef {import("@
|
|
5
|
-
* @typedef {import("@
|
|
6
|
-
* @typedef {import("@
|
|
7
|
-
* @typedef {import("@
|
|
8
|
-
* @typedef {import("@
|
|
3
|
+
* @typedef {import("@hiero-ledger/proto").proto.IQuery} HieroProto.proto.IQuery
|
|
4
|
+
* @typedef {import("@hiero-ledger/proto").proto.IQueryHeader} HieroProto.proto.IQueryHeader
|
|
5
|
+
* @typedef {import("@hiero-ledger/proto").proto.IResponse} HieroProto.proto.IResponse
|
|
6
|
+
* @typedef {import("@hiero-ledger/proto").proto.IResponseHeader} HieroProto.proto.IResponseHeader
|
|
7
|
+
* @typedef {import("@hiero-ledger/proto").proto.ICryptoGetAccountBalanceQuery} HieroProto.proto.ICryptoGetAccountBalanceQuery
|
|
8
|
+
* @typedef {import("@hiero-ledger/proto").proto.ICryptoGetAccountBalanceResponse} HieroProto.proto.ICryptoGetAccountBalanceResponse
|
|
9
9
|
*/
|
|
10
10
|
/**
|
|
11
11
|
* @typedef {import("../channel/Channel.js").default} Channel
|
|
@@ -76,12 +76,12 @@ export default class AccountBalanceQuery extends Query<AccountBalance> {
|
|
|
76
76
|
}
|
|
77
77
|
export namespace HieroProto {
|
|
78
78
|
namespace proto {
|
|
79
|
-
type IQuery = import("@
|
|
80
|
-
type IQueryHeader = import("@
|
|
81
|
-
type IResponse = import("@
|
|
82
|
-
type IResponseHeader = import("@
|
|
83
|
-
type ICryptoGetAccountBalanceQuery = import("@
|
|
84
|
-
type ICryptoGetAccountBalanceResponse = import("@
|
|
79
|
+
type IQuery = import("@hiero-ledger/proto").proto.IQuery;
|
|
80
|
+
type IQueryHeader = import("@hiero-ledger/proto").proto.IQueryHeader;
|
|
81
|
+
type IResponse = import("@hiero-ledger/proto").proto.IResponse;
|
|
82
|
+
type IResponseHeader = import("@hiero-ledger/proto").proto.IResponseHeader;
|
|
83
|
+
type ICryptoGetAccountBalanceQuery = import("@hiero-ledger/proto").proto.ICryptoGetAccountBalanceQuery;
|
|
84
|
+
type ICryptoGetAccountBalanceResponse = import("@hiero-ledger/proto").proto.ICryptoGetAccountBalanceResponse;
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
export type Channel = import("../channel/Channel.js").default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountBalanceQuery.js","sources":["../../src/account/AccountBalanceQuery.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Query, { QUERY_REGISTRY } from \"../query/Query.js\";\nimport AccountId from \"./AccountId.js\";\nimport ContractId from \"../contract/ContractId.js\";\nimport AccountBalance from \"./AccountBalance.js\";\n\n/**\n * @namespace proto\n * @typedef {import(\"@
|
|
1
|
+
{"version":3,"file":"AccountBalanceQuery.js","sources":["../../src/account/AccountBalanceQuery.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Query, { QUERY_REGISTRY } from \"../query/Query.js\";\nimport AccountId from \"./AccountId.js\";\nimport ContractId from \"../contract/ContractId.js\";\nimport AccountBalance from \"./AccountBalance.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.ICryptoGetAccountBalanceQuery} HieroProto.proto.ICryptoGetAccountBalanceQuery\n * @typedef {import(\"@hiero-ledger/proto\").proto.ICryptoGetAccountBalanceResponse} HieroProto.proto.ICryptoGetAccountBalanceResponse\n */\n\n/**\n * @typedef {import(\"../channel/Channel.js\").default} Channel\n * @typedef {import(\"../client/Client.js\").default<*, *>} Client\n */\n\n/**\n * Get the balance of a Hedera™ crypto-currency account.\n *\n * This returns only the balance, so its a smaller and faster reply\n * than AccountInfoQuery.\n *\n * This query is free.\n *\n * @augments {Query<AccountBalance>}\n */\nexport default class AccountBalanceQuery extends Query {\n /**\n * @param {object} [props]\n * @param {AccountId | string} [props.accountId]\n * @param {ContractId | string} [props.contractId]\n */\n constructor(props = {}) {\n super();\n\n /**\n * @type {?AccountId}\n * @private\n */\n this._accountId = null;\n\n /**\n * @type {?ContractId}\n * @private\n */\n this._contractId = null;\n\n if (props.accountId != null) {\n this.setAccountId(props.accountId);\n }\n\n if (props.contractId != null) {\n this.setContractId(props.contractId);\n }\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.IQuery} query\n * @returns {AccountBalanceQuery}\n */\n static _fromProtobuf(query) {\n const balance =\n /** @type {HieroProto.proto.ICryptoGetAccountBalanceQuery} */ (\n query.cryptogetAccountBalance\n );\n\n return new AccountBalanceQuery({\n accountId:\n balance.accountID != null\n ? AccountId._fromProtobuf(balance.accountID)\n : undefined,\n contractId:\n balance.contractID != null\n ? ContractId._fromProtobuf(balance.contractID)\n : undefined,\n });\n }\n\n /**\n * @returns {?AccountId}\n */\n get accountId() {\n return this._accountId;\n }\n\n /**\n * Set the account ID for which the balance is being requested.\n *\n * This is mutually exclusive with `setContractId`.\n *\n * @param {AccountId | string} accountId\n * @returns {this}\n */\n setAccountId(accountId) {\n this._accountId =\n typeof accountId === \"string\"\n ? AccountId.fromString(accountId)\n : accountId.clone();\n\n return this;\n }\n\n /**\n * @returns {?ContractId}\n */\n get contractId() {\n return this._contractId;\n }\n\n /**\n * Set the contract ID for which the balance is being requested.\n *\n * This is mutually exclusive with `setAccountId`.\n *\n * @param {ContractId | string} contractId\n * @returns {this}\n */\n setContractId(contractId) {\n this._contractId =\n typeof contractId === \"string\"\n ? ContractId.fromString(contractId)\n : contractId.clone();\n\n return this;\n }\n\n /**\n * @protected\n * @override\n * @returns {boolean}\n */\n _isPaymentRequired() {\n return false;\n }\n\n /**\n * @param {Client} client\n */\n _validateChecksums(client) {\n if (this._accountId != null) {\n this._accountId.validateChecksum(client);\n }\n\n if (this._contractId != null) {\n this._contractId.validateChecksum(client);\n }\n }\n\n /**\n * @override\n * @internal\n * @param {Channel} channel\n * @param {HieroProto.proto.IQuery} request\n * @returns {Promise<HieroProto.proto.IResponse>}\n */\n _execute(channel, request) {\n return channel.crypto.cryptoGetBalance(request);\n }\n\n /**\n * @override\n * @override\n * @internal\n * @param {HieroProto.proto.IResponse} response\n * @returns {HieroProto.proto.IResponseHeader}\n */\n _mapResponseHeader(response) {\n const cryptogetAccountBalance =\n /** @type {HieroProto.proto.ICryptoGetAccountBalanceResponse} */ (\n response.cryptogetAccountBalance\n );\n return /** @type {HieroProto.proto.IResponseHeader} */ (\n cryptogetAccountBalance.header\n );\n }\n\n /**\n * @override\n * @override\n * @internal\n * @param {HieroProto.proto.IResponse} response\n * @param {AccountId} nodeAccountId\n * @param {HieroProto.proto.IQuery} request\n * @returns {Promise<AccountBalance>}\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _mapResponse(response, nodeAccountId, request) {\n const cryptogetAccountBalance =\n /** @type {HieroProto.proto.ICryptoGetAccountBalanceResponse} */ (\n response.cryptogetAccountBalance\n );\n return Promise.resolve(\n AccountBalance._fromProtobuf(cryptogetAccountBalance),\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 cryptogetAccountBalance: {\n header,\n accountID:\n this._accountId != null\n ? this._accountId._toProtobuf()\n : null,\n contractID:\n this._contractId != null\n ? this._contractId._toProtobuf()\n : null,\n },\n };\n }\n\n /**\n * @returns {string}\n */\n _getLogId() {\n return `AccountBalanceQuery:${this._timestamp.toString()}`;\n }\n}\n\nQUERY_REGISTRY.set(\n \"cryptogetAccountBalance\",\n // eslint-disable-next-line @typescript-eslint/unbound-method\n AccountBalanceQuery._fromProtobuf,\n);\n"],"names":["AccountBalanceQuery","Query","constructor","props","super","this","_accountId","_contractId","accountId","setAccountId","contractId","setContractId","_fromProtobuf","query","balance","accountID","AccountId","undefined","contractID","ContractId","fromString","clone","_isPaymentRequired","_validateChecksums","client","validateChecksum","_execute","channel","request","crypto","cryptoGetBalance","_mapResponseHeader","response","_mapResponse","nodeAccountId","cryptogetAccountBalance","Promise","resolve","AccountBalance","_onMakeRequest","header","_toProtobuf","_getLogId","_timestamp","toString","QUERY_REGISTRY","set"],"mappings":"gKAgCe,MAAMA,UAA4BC,EAM7C,WAAAC,CAAYC,EAAQ,IAChBC,QAMAC,KAAKC,WAAa,KAMlBD,KAAKE,YAAc,KAEI,MAAnBJ,EAAMK,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9C,EAAoBY"}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var HieroProto = _interopRequireWildcard(require("@
|
|
7
|
+
var HieroProto = _interopRequireWildcard(require("@hiero-ledger/proto"));
|
|
8
8
|
var _Hbar = _interopRequireDefault(require("../Hbar.cjs"));
|
|
9
9
|
var _AccountId = _interopRequireDefault(require("./AccountId.cjs"));
|
|
10
10
|
var _Transaction = _interopRequireWildcard(require("../transaction/Transaction.cjs"));
|
|
@@ -306,4 +306,4 @@ import Long from "long";
|
|
|
306
306
|
import AccountId from "./AccountId.js";
|
|
307
307
|
import Duration from "../Duration.js";
|
|
308
308
|
import EvmAddress from "../EvmAddress.js";
|
|
309
|
-
import * as HieroProto from "@
|
|
309
|
+
import * as HieroProto from "@hiero-ledger/proto";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"@
|
|
1
|
+
import"@hiero-ledger/proto";import e from"../Hbar.js";import t from"./AccountId.js";import i,{TRANSACTION_REGISTRY as o,DEFAULT_RECORD_THRESHOLD as r,DEFAULT_AUTO_RENEW_PERIOD as s}from"../transaction/Transaction.js";import n from"../Duration.js";import a from"long";import u from"../Key.js";import c from"../PrivateKey.js";import d from"../EvmAddress.js";import l from"../PublicKey.js";class h extends i{constructor(e={}){super(),this._key=null,this._initialBalance=null,this._sendRecordThreshold=r,this._receiveRecordThreshold=r,this._receiverSignatureRequired=!1,this._proxyAccountId=null,this._autoRenewPeriod=new n(s),this._accountMemo=null,this._maxAutomaticTokenAssociations=null,this._stakedAccountId=null,this._stakedNodeId=null,this._declineStakingReward=!1,this._alias=null,null!=e.key&&this.setKeyWithoutAlias(e.key),null!=e.receiverSignatureRequired&&this.setReceiverSignatureRequired(e.receiverSignatureRequired),null!=e.initialBalance&&this.setInitialBalance(e.initialBalance),null!=e.proxyAccountId&&this.setProxyAccountId(e.proxyAccountId),null!=e.autoRenewPeriod&&this.setAutoRenewPeriod(e.autoRenewPeriod),null!=e.accountMemo&&this.setAccountMemo(e.accountMemo),null!=e.maxAutomaticTokenAssociations&&this.setMaxAutomaticTokenAssociations(e.maxAutomaticTokenAssociations),null!=e.stakedAccountId&&this.setStakedAccountId(e.stakedAccountId),null!=e.stakedNodeId&&this.setStakedNodeId(e.stakedNodeId),null!=e.declineStakingReward&&this.setDeclineStakingReward(e.declineStakingReward),null!=e.alias&&this.setAlias(e.alias)}static _fromProtobuf(o,r,s,n,a){const c=a[0].cryptoCreateAccount;let l;return null!=c.alias&&c.alias.length>0&&20===c.alias.length&&(l=d.fromBytes(c.alias)),i._fromProtobufTransactions(new h({key:null!=c.key?u._fromProtobufKey(c.key):void 0,initialBalance:null!=c.initialBalance?e.fromTinybars(c.initialBalance):void 0,receiverSignatureRequired:null!=c.receiverSigRequired?c.receiverSigRequired:void 0,proxyAccountId:null!=c.proxyAccountID?t._fromProtobuf(c.proxyAccountID):void 0,autoRenewPeriod:null!=c.autoRenewPeriod&&null!=c.autoRenewPeriod.seconds?c.autoRenewPeriod.seconds:void 0,accountMemo:null!=c.memo?c.memo:void 0,maxAutomaticTokenAssociations:null!=c.maxAutomaticTokenAssociations?c.maxAutomaticTokenAssociations:void 0,stakedAccountId:null!=c.stakedAccountId?t._fromProtobuf(c.stakedAccountId):void 0,stakedNodeId:null!=c.stakedNodeId?c.stakedNodeId:void 0,declineStakingReward:1==c.declineReward,alias:l}),o,r,s,n,a)}get key(){return this._key}setKey(e){return this._requireNotFrozen(),this._key=e,this}setECDSAKeyWithAlias(e){this.setKeyWithoutAlias(e);const t=this._deriveECDSAKeyAlias(e);return this.setAlias(t),this}setKeyWithAlias(e,t){this.setKeyWithoutAlias(e);const i=this._deriveECDSAKeyAlias(t);return this.setAlias(i),this}setKeyWithoutAlias(e){return this._requireNotFrozen(),this._key=e,this}get initialBalance(){return this._initialBalance}setInitialBalance(t){return this._requireNotFrozen(),this._initialBalance=t instanceof e?t:new e(t),this}get receiverSignatureRequired(){return this._receiverSignatureRequired}setReceiverSignatureRequired(e){return this._requireNotFrozen(),this._receiverSignatureRequired=e,this}get proxyAccountId(){return this._proxyAccountId}setProxyAccountId(e){return this._requireNotFrozen(),this._proxyAccountId=e,this}get autoRenewPeriod(){return this._autoRenewPeriod}setAutoRenewPeriod(e){return this._requireNotFrozen(),this._autoRenewPeriod=e instanceof n?e:new n(e),this}get accountMemo(){return this._accountMemo}setAccountMemo(e){return this._requireNotFrozen(),this._accountMemo=e,this}get maxAutomaticTokenAssociations(){return this._maxAutomaticTokenAssociations}setMaxAutomaticTokenAssociations(e){return this._requireNotFrozen(),this._maxAutomaticTokenAssociations="number"==typeof e?a.fromNumber(e):e,this}get stakedAccountId(){return this._stakedAccountId}setStakedAccountId(e){return this._requireNotFrozen(),this._stakedAccountId="string"==typeof e?t.fromString(e):e,this}get stakedNodeId(){return this._stakedNodeId}setStakedNodeId(e){return this._requireNotFrozen(),this._stakedNodeId=a.fromValue(e),this}get declineStakingRewards(){return this._declineStakingReward}setDeclineStakingReward(e){return this._requireNotFrozen(),this._declineStakingReward=e,this}get alias(){return this._alias}setAlias(e){if("string"==typeof e){if(!(e.startsWith("0x")&&42==e.length||40==e.length))throw new Error('evmAddress must be a valid EVM address with or without "0x" prefix');this._alias=d.fromString(e)}else this._alias=e;return this}_validateChecksums(e){null!=this._proxyAccountId&&this._proxyAccountId.validateChecksum(e)}_deriveECDSAKeyAlias(e){const t=e instanceof c&&"secp256k1"===e.type,i=e instanceof l&&"secp256k1"===e.type;if(t)return e.publicKey.toEvmAddress();if(i)return e.toEvmAddress();throw new Error("Invalid key for alias derivation provided: expected an ECDSA (secp256k1) PrivateKey or PublicKey.")}_execute(e,t){return e.crypto.createAccount(t)}_getTransactionDataCase(){return"cryptoCreateAccount"}_makeTransactionData(){let e=null;return null!=this._alias&&(e=this._alias.toBytes()),{key:null!=this._key?this._key._toProtobufKey():null,initialBalance:null!=this._initialBalance?this._initialBalance.toTinybars():null,autoRenewPeriod:this._autoRenewPeriod._toProtobuf(),proxyAccountID:null!=this._proxyAccountId?this._proxyAccountId._toProtobuf():null,receiveRecordThreshold:this._receiveRecordThreshold.toTinybars(),sendRecordThreshold:this._sendRecordThreshold.toTinybars(),receiverSigRequired:this._receiverSignatureRequired,memo:this._accountMemo,maxAutomaticTokenAssociations:null!=this._maxAutomaticTokenAssociations?this._maxAutomaticTokenAssociations.toInt():null,stakedAccountId:null!=this.stakedAccountId?this.stakedAccountId._toProtobuf():null,stakedNodeId:this.stakedNodeId,declineReward:this.declineStakingRewards,alias:e}}_getLogId(){return`AccountCreateTransaction:${this._transactionIds.current.validStart.toString()}`}}o.set("cryptoCreateAccount",h._fromProtobuf);export{h as default};
|
|
2
2
|
//# sourceMappingURL=AccountCreateTransaction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountCreateTransaction.js","sources":["../../src/account/AccountCreateTransaction.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport * as HieroProto from \"@hashgraph/proto\";\nimport Hbar from \"../Hbar.js\";\nimport AccountId from \"./AccountId.js\";\nimport Transaction, {\n DEFAULT_AUTO_RENEW_PERIOD,\n DEFAULT_RECORD_THRESHOLD,\n TRANSACTION_REGISTRY,\n} from \"../transaction/Transaction.js\";\nimport Duration from \"../Duration.js\";\nimport Long from \"long\";\nimport Key from \"../Key.js\";\nimport PrivateKey from \"../PrivateKey.js\";\nimport EvmAddress from \"../EvmAddress.js\";\nimport PublicKey from \"../PublicKey.js\";\n/**\n * @typedef {import(\"bignumber.js\").default} BigNumber\n * @typedef {import(\"../channel/Channel.js\").default} Channel\n * @typedef {import(\"../client/Client.js\").default<*, *>} Client\n * @typedef {import(\"../Timestamp.js\").default} Timestamp\n * @typedef {import(\"../transaction/TransactionId.js\").default} TransactionId\n */\n\n/**\n * Create a new Hedera™ crypto-currency account.\n */\nexport default class AccountCreateTransaction extends Transaction {\n /**\n * @param {object} [props]\n * @param {Key} [props.key]\n * @param {number | string | Long | BigNumber | Hbar} [props.initialBalance]\n * @param {boolean} [props.receiverSignatureRequired]\n * @param {AccountId} [props.proxyAccountId]\n * @param {Duration | Long | number} [props.autoRenewPeriod]\n * @param {string} [props.accountMemo]\n * @param {Long | number} [props.maxAutomaticTokenAssociations]\n * @param {AccountId | string} [props.stakedAccountId]\n * @param {Long | number} [props.stakedNodeId]\n * @param {boolean} [props.declineStakingReward]\n * @param {EvmAddress} [props.alias]\n */\n constructor(props = {}) {\n super();\n\n /**\n * @private\n * @type {?Key}\n */\n this._key = null;\n\n /**\n * @private\n * @type {?Hbar}\n */\n this._initialBalance = null;\n\n /**\n * @private\n * @type {Hbar}\n */\n this._sendRecordThreshold = DEFAULT_RECORD_THRESHOLD;\n\n /**\n * @private\n * @type {Hbar}\n */\n this._receiveRecordThreshold = DEFAULT_RECORD_THRESHOLD;\n\n /**\n * @private\n * @type {boolean}\n */\n this._receiverSignatureRequired = false;\n\n /**\n * @private\n * @type {?AccountId}\n */\n this._proxyAccountId = null;\n\n /**\n * @private\n * @type {Duration}\n */\n this._autoRenewPeriod = new Duration(DEFAULT_AUTO_RENEW_PERIOD);\n\n /**\n * @private\n * @type {?string}\n */\n this._accountMemo = null;\n\n /**\n * @private\n * @type {?Long}\n */\n this._maxAutomaticTokenAssociations = null;\n\n /**\n * @private\n * @type {?AccountId}\n */\n this._stakedAccountId = null;\n\n /**\n * @private\n * @type {?Long}\n */\n this._stakedNodeId = null;\n\n /**\n * @private\n * @type {boolean}\n */\n this._declineStakingReward = false;\n\n /**\n * @private\n * @type {?EvmAddress}\n */\n this._alias = null;\n\n if (props.key != null) {\n this.setKeyWithoutAlias(props.key);\n }\n\n if (props.receiverSignatureRequired != null) {\n this.setReceiverSignatureRequired(props.receiverSignatureRequired);\n }\n\n if (props.initialBalance != null) {\n this.setInitialBalance(props.initialBalance);\n }\n\n if (props.proxyAccountId != null) {\n // eslint-disable-next-line deprecation/deprecation\n this.setProxyAccountId(props.proxyAccountId);\n }\n\n if (props.autoRenewPeriod != null) {\n this.setAutoRenewPeriod(props.autoRenewPeriod);\n }\n\n if (props.accountMemo != null) {\n this.setAccountMemo(props.accountMemo);\n }\n\n if (props.maxAutomaticTokenAssociations != null) {\n this.setMaxAutomaticTokenAssociations(\n props.maxAutomaticTokenAssociations,\n );\n }\n\n if (props.stakedAccountId != null) {\n this.setStakedAccountId(props.stakedAccountId);\n }\n\n if (props.stakedNodeId != null) {\n this.setStakedNodeId(props.stakedNodeId);\n }\n\n if (props.declineStakingReward != null) {\n this.setDeclineStakingReward(props.declineStakingReward);\n }\n\n if (props.alias != null) {\n this.setAlias(props.alias);\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 {AccountCreateTransaction}\n */\n static _fromProtobuf(\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n ) {\n const body = bodies[0];\n const create =\n /** @type {HieroProto.proto.ICryptoCreateTransactionBody} */ (\n body.cryptoCreateAccount\n );\n\n let alias = undefined;\n if (create.alias != null && create.alias.length > 0) {\n if (create.alias.length === 20) {\n alias = EvmAddress.fromBytes(create.alias);\n }\n }\n\n return Transaction._fromProtobufTransactions(\n new AccountCreateTransaction({\n key:\n create.key != null\n ? Key._fromProtobufKey(create.key)\n : undefined,\n initialBalance:\n create.initialBalance != null\n ? Hbar.fromTinybars(create.initialBalance)\n : undefined,\n receiverSignatureRequired:\n create.receiverSigRequired != null\n ? create.receiverSigRequired\n : undefined,\n proxyAccountId:\n create.proxyAccountID != null\n ? AccountId._fromProtobuf(\n /** @type {HieroProto.proto.IAccountID} */ (\n create.proxyAccountID\n ),\n )\n : undefined,\n autoRenewPeriod:\n create.autoRenewPeriod != null\n ? create.autoRenewPeriod.seconds != null\n ? create.autoRenewPeriod.seconds\n : undefined\n : undefined,\n accountMemo: create.memo != null ? create.memo : undefined,\n maxAutomaticTokenAssociations:\n create.maxAutomaticTokenAssociations != null\n ? create.maxAutomaticTokenAssociations\n : undefined,\n stakedAccountId:\n create.stakedAccountId != null\n ? AccountId._fromProtobuf(create.stakedAccountId)\n : undefined,\n stakedNodeId:\n create.stakedNodeId != null\n ? create.stakedNodeId\n : undefined,\n declineStakingReward: create.declineReward == true,\n alias,\n }),\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n );\n }\n\n /**\n * @returns {?Key}\n */\n get key() {\n return this._key;\n }\n\n /**\n * Set the key for this account.\n *\n * This is the key that must sign each transfer out of the account.\n *\n * If `receiverSignatureRequired` is true, then the key must also sign\n * any transfer into the account.\n *\n * @deprecated Use `setKeyWithoutAlias` instead.\n * @param {Key} key\n * @returns {this}\n */\n setKey(key) {\n this._requireNotFrozen();\n this._key = key;\n\n return this;\n }\n\n /**\n * Sets an ECDSA key (private or public) and a derived alias from this key in the background.\n * @param {Key} key - An ECDSA key (private or public) used for signing transactions and alias derivation.\n * @returns {this}\n * @throws {Error} If the key is not an ECDSA key.\n */\n setECDSAKeyWithAlias(key) {\n this.setKeyWithoutAlias(key);\n\n const alias = this._deriveECDSAKeyAlias(key);\n\n this.setAlias(alias);\n return this;\n }\n\n /**\n * Sets an account key and an alias derived from a separate ECDSA key.\n * The transaction must be signed by both keys.\n * @param {Key} key - The primary account key used for signing transactions.\n * @param {Key} aliasKey - The ECDSA key (private or public) used to derive the EVM address.\n * @returns {this}\n * @throws {Error} If the aliasKey is not an ECDSA key.\n */\n setKeyWithAlias(key, aliasKey) {\n this.setKeyWithoutAlias(key);\n\n const alias = this._deriveECDSAKeyAlias(aliasKey);\n\n this.setAlias(alias);\n return this;\n }\n\n /**\n * Set the key for this account without an alias.\n *\n * This is the key that must sign each transfer out of the account.\n *\n * If `receiverSignatureRequired` is true, then the key must also sign\n * any transfer into the account.\n *\n *\n * @param {Key} key\n * @returns {this}\n */\n setKeyWithoutAlias(key) {\n this._requireNotFrozen();\n this._key = key;\n\n return this;\n }\n\n /**\n * @returns {?Hbar}\n */\n get initialBalance() {\n return this._initialBalance;\n }\n\n /**\n * Set the initial amount to transfer into this account.\n *\n * @param {number | string | Long | BigNumber | Hbar} initialBalance\n * @returns {this}\n */\n setInitialBalance(initialBalance) {\n this._requireNotFrozen();\n this._initialBalance =\n initialBalance instanceof Hbar\n ? initialBalance\n : new Hbar(initialBalance);\n\n return this;\n }\n\n /**\n * @returns {boolean}\n */\n get receiverSignatureRequired() {\n return this._receiverSignatureRequired;\n }\n\n /**\n * Set to true to require the key for this account to sign any transfer of\n * hbars to this account.\n *\n * @param {boolean} receiverSignatureRequired\n * @returns {this}\n */\n setReceiverSignatureRequired(receiverSignatureRequired) {\n this._requireNotFrozen();\n this._receiverSignatureRequired = receiverSignatureRequired;\n\n return this;\n }\n\n /**\n * @deprecated\n * @returns {?AccountId}\n */\n get proxyAccountId() {\n return this._proxyAccountId;\n }\n\n /**\n * @deprecated\n *\n * Set the ID of the account to which this account is proxy staked.\n * @param {AccountId} proxyAccountId\n * @returns {this}\n */\n setProxyAccountId(proxyAccountId) {\n this._requireNotFrozen();\n this._proxyAccountId = proxyAccountId;\n\n return this;\n }\n\n /**\n * @returns {Duration}\n */\n get autoRenewPeriod() {\n return this._autoRenewPeriod;\n }\n\n /**\n * Set the auto renew period for this account.\n *\n * @param {Duration | Long | number} autoRenewPeriod\n * @returns {this}\n */\n setAutoRenewPeriod(autoRenewPeriod) {\n this._requireNotFrozen();\n this._autoRenewPeriod =\n autoRenewPeriod instanceof Duration\n ? autoRenewPeriod\n : new Duration(autoRenewPeriod);\n\n return this;\n }\n\n /**\n * @returns {?string}\n */\n get accountMemo() {\n return this._accountMemo;\n }\n\n /**\n * @param {string} memo\n * @returns {this}\n */\n setAccountMemo(memo) {\n this._requireNotFrozen();\n this._accountMemo = memo;\n\n return this;\n }\n\n /**\n * @returns {?Long}\n */\n get maxAutomaticTokenAssociations() {\n return this._maxAutomaticTokenAssociations;\n }\n\n /**\n * @param {Long | number} maxAutomaticTokenAssociations\n * @returns {this}\n */\n setMaxAutomaticTokenAssociations(maxAutomaticTokenAssociations) {\n this._requireNotFrozen();\n this._maxAutomaticTokenAssociations =\n typeof maxAutomaticTokenAssociations === \"number\"\n ? Long.fromNumber(maxAutomaticTokenAssociations)\n : maxAutomaticTokenAssociations;\n\n return this;\n }\n\n /**\n * @returns {?AccountId}\n */\n get stakedAccountId() {\n return this._stakedAccountId;\n }\n\n /**\n * @param {AccountId | string} stakedAccountId\n * @returns {this}\n */\n setStakedAccountId(stakedAccountId) {\n this._requireNotFrozen();\n this._stakedAccountId =\n typeof stakedAccountId === \"string\"\n ? AccountId.fromString(stakedAccountId)\n : stakedAccountId;\n\n return this;\n }\n\n /**\n * @returns {?Long}\n */\n get stakedNodeId() {\n return this._stakedNodeId;\n }\n\n /**\n * @param {Long | number} stakedNodeId\n * @returns {this}\n */\n setStakedNodeId(stakedNodeId) {\n this._requireNotFrozen();\n this._stakedNodeId = Long.fromValue(stakedNodeId);\n\n return this;\n }\n\n /**\n * @returns {boolean}\n */\n get declineStakingRewards() {\n return this._declineStakingReward;\n }\n\n /**\n * @param {boolean} declineStakingReward\n * @returns {this}\n */\n setDeclineStakingReward(declineStakingReward) {\n this._requireNotFrozen();\n this._declineStakingReward = declineStakingReward;\n\n return this;\n }\n\n /**\n * The bytes to be used as the account's alias.\n *\n * The bytes must be formatted as the calcluated last 20 bytes of the\n * keccak-256 of the ECDSA primitive key.\n *\n * All other types of keys, including but not limited to ED25519, ThresholdKey, KeyList, ContractID, and\n * delegatable_contract_id, are not supported.\n *\n * At most only one account can ever have a given alias on the network.\n *\n * @returns {?EvmAddress}\n */\n get alias() {\n return this._alias;\n }\n\n /**\n * The bytes to be used as the account's alias.\n *\n * The bytes must be formatted as the calcluated last 20 bytes of the\n * keccak-256 of the ECDSA primitive key.\n *\n * All other types of keys, including but not limited to ED25519, ThresholdKey, KeyList, ContractID, and\n * delegatable_contract_id, are not supported.\n *\n * At most only one account can ever have a given alias on the network.\n *\n * @param {string | EvmAddress} alias\n * @returns {this}\n */\n setAlias(alias) {\n if (typeof alias === \"string\") {\n if (\n (alias.startsWith(\"0x\") && alias.length == 42) ||\n alias.length == 40\n ) {\n this._alias = EvmAddress.fromString(alias);\n } else {\n throw new Error(\n 'evmAddress must be a valid EVM address with or without \"0x\" prefix',\n );\n }\n } else {\n this._alias = alias;\n }\n\n return this;\n }\n\n /**\n * @param {Client} client\n */\n _validateChecksums(client) {\n if (this._proxyAccountId != null) {\n this._proxyAccountId.validateChecksum(client);\n }\n }\n\n /**\n * Derives an EVM alias from an ECDSA key.\n * @private\n * @internal\n * @param {Key} key\n * @returns {string}\n * @throws {Error} If the key is not a ECDSA (secp256k1) PrivateKey or PublicKey.\n */\n _deriveECDSAKeyAlias(key) {\n const isPrivateECDSAKey =\n key instanceof PrivateKey && key.type === \"secp256k1\";\n const isPublicECDSAKey =\n key instanceof PublicKey && key.type === \"secp256k1\";\n\n if (isPrivateECDSAKey) {\n return key.publicKey.toEvmAddress();\n } else if (isPublicECDSAKey) {\n return key.toEvmAddress();\n }\n\n throw new Error(\n \"Invalid key for alias derivation provided: expected an ECDSA (secp256k1) PrivateKey or PublicKey.\",\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.crypto.createAccount(request);\n }\n\n /**\n * @override\n * @protected\n * @returns {NonNullable<HieroProto.proto.TransactionBody[\"data\"]>}\n */\n _getTransactionDataCase() {\n return \"cryptoCreateAccount\";\n }\n\n /**\n * @override\n * @protected\n * @returns {HieroProto.proto.ICryptoCreateTransactionBody}\n */\n _makeTransactionData() {\n let alias = null;\n if (this._alias != null) {\n alias = this._alias.toBytes();\n }\n\n return {\n key: this._key != null ? this._key._toProtobufKey() : null,\n initialBalance:\n this._initialBalance != null\n ? this._initialBalance.toTinybars()\n : null,\n autoRenewPeriod: this._autoRenewPeriod._toProtobuf(),\n proxyAccountID:\n this._proxyAccountId != null\n ? this._proxyAccountId._toProtobuf()\n : null,\n receiveRecordThreshold: this._receiveRecordThreshold.toTinybars(),\n sendRecordThreshold: this._sendRecordThreshold.toTinybars(),\n receiverSigRequired: this._receiverSignatureRequired,\n memo: this._accountMemo,\n maxAutomaticTokenAssociations:\n this._maxAutomaticTokenAssociations != null\n ? this._maxAutomaticTokenAssociations.toInt()\n : null,\n stakedAccountId:\n this.stakedAccountId != null\n ? this.stakedAccountId._toProtobuf()\n : null,\n stakedNodeId: this.stakedNodeId,\n declineReward: this.declineStakingRewards,\n alias,\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 `AccountCreateTransaction:${timestamp.toString()}`;\n }\n}\n\nTRANSACTION_REGISTRY.set(\n \"cryptoCreateAccount\",\n // eslint-disable-next-line @typescript-eslint/unbound-method\n AccountCreateTransaction._fromProtobuf,\n);\n"],"names":["AccountCreateTransaction","Transaction","constructor","props","super","this","_key","_initialBalance","_sendRecordThreshold","DEFAULT_RECORD_THRESHOLD","_receiveRecordThreshold","_receiverSignatureRequired","_proxyAccountId","_autoRenewPeriod","Duration","DEFAULT_AUTO_RENEW_PERIOD","_accountMemo","_maxAutomaticTokenAssociations","_stakedAccountId","_stakedNodeId","_declineStakingReward","_alias","key","setKeyWithoutAlias","receiverSignatureRequired","setReceiverSignatureRequired","initialBalance","setInitialBalance","proxyAccountId","setProxyAccountId","autoRenewPeriod","setAutoRenewPeriod","accountMemo","setAccountMemo","maxAutomaticTokenAssociations","setMaxAutomaticTokenAssociations","stakedAccountId","setStakedAccountId","stakedNodeId","setStakedNodeId","declineStakingReward","setDeclineStakingReward","alias","setAlias","_fromProtobuf","transactions","signedTransactions","transactionIds","nodeIds","bodies","create","length","EvmAddress","fromBytes","_fromProtobufTransactions","Key","_fromProtobufKey","undefined","Hbar","fromTinybars","receiverSigRequired","proxyAccountID","AccountId","seconds","memo","declineReward","setKey","_requireNotFrozen","setECDSAKeyWithAlias","_deriveECDSAKeyAlias","setKeyWithAlias","aliasKey","Long","fromNumber","fromString","fromValue","declineStakingRewards","startsWith","Error","_validateChecksums","client","validateChecksum","isPrivateECDSAKey","PrivateKey","type","isPublicECDSAKey","PublicKey","publicKey","toEvmAddress","_execute","channel","request","crypto","createAccount","_getTransactionDataCase","_makeTransactionData","toBytes","_toProtobufKey","toTinybars","_toProtobuf","receiveRecordThreshold","sendRecordThreshold","toInt","_getLogId","_transactionIds","current","toString","TRANSACTION_REGISTRY","set"],"mappings":"gYA2Be,MAAMA,UAAiCC,EAelD,WAAAC,CAAYC,EAAQ,IAChBC,QAMAC,KAAKC,KAAO,KAMZD,KAAKE,gBAAkB,KAMvBF,KAAKG,qBAAuBC,EAM5BJ,KAAKK,wBAA0BD,EAM/BJ,KAAKM,4BAA6B,EAMlCN,KAAKO,gBAAkB,KAMvBP,KAAKQ,iBAAmB,IAAIC,EAASC,GAMrCV,KAAKW,aAAe,KAMpBX,KAAKY,+BAAiC,KAMtCZ,KAAKa,iBAAmB,KAMxBb,KAAKc,cAAgB,KAMrBd,KAAKe,uBAAwB,EAM7Bf,KAAKgB,OAAS,KAEG,MAAblB,EAAMmB,KACNjB,KAAKkB,mBAAmBpB,EAAMmB,KAGK,MAAnCnB,EAAMqB,2BACNnB,KAAKoB,6BAA6BtB,EAAMqB,2BAGhB,MAAxBrB,EAAMuB,gBACNrB,KAAKsB,kBAAkBxB,EAAMuB,gBAGL,MAAxBvB,EAAMyB,gBAENvB,KAAKwB,kBAAkB1B,EAAMyB,gBAGJ,MAAzBzB,EAAM2B,iBACNzB,KAAK0B,mBAAmB5B,EAAM2B,iBAGT,MAArB3B,EAAM6B,aACN3B,KAAK4B,eAAe9B,EAAM6B,aAGa,MAAvC7B,EAA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5C,CAOI,uBAAAG,GACI,MAAO,qBACf,CAOI,oBAAAC,GACI,IAAIrD,EAAQ,KAKZ,OAJmB,MAAfrC,KAAKgB,SACLqB,EAAQrC,KAAKgB,OAAO2E,WAGjB,CACH1E,IAAkB,MAAbjB,KAAKC,KAAeD,KAAKC,KAAK2F,iBAAmB,KACtDvE,eAC4B,MAAxBrB,KAAKE,gBACCF,KAAKE,gBAAgB2F,aACrB,KACVpE,gBAAiBzB,KAAKQ,iBAAiBsF,cACvCtC,eAC4B,MAAxBxD,KAAKO,gBACCP,KAAKO,gBAAgBuF,cACrB,KACVC,uBAAwB/F,KAAKK,wBAAwBwF,aACrDG,oBAAqBhG,KAAKG,qBAAqB0F,aAC/CtC,oBAAqBvD,KAAKM,2BAC1BqD,KAAM3D,KAAKW,aACXkB,8BAC2C,MAAvC7B,KAAKY,+BACCZ,KAAKY,+BAA+BqF,QACpC,KACVlE,gBAC4B,MAAxB/B,KAAK+B,gBACC/B,KAAK+B,gBAAgB+D,cACrB,KACV7D,aAAcjC,KAAKiC,aACnB2B,cAAe5D,KAAKuE,sBACpBlC,QAEZ,CAKI,SAAA6D,GAII,MAAO,4BAFHlG,KAAKmG,gBAAgBC,QACxB,WAC4CC,YACrD,EAGAC,EAAqBC,IACjB,sBAEA5G,EAAyB4C"}
|
|
1
|
+
{"version":3,"file":"AccountCreateTransaction.js","sources":["../../src/account/AccountCreateTransaction.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport * as HieroProto from \"@hiero-ledger/proto\";\nimport Hbar from \"../Hbar.js\";\nimport AccountId from \"./AccountId.js\";\nimport Transaction, {\n DEFAULT_AUTO_RENEW_PERIOD,\n DEFAULT_RECORD_THRESHOLD,\n TRANSACTION_REGISTRY,\n} from \"../transaction/Transaction.js\";\nimport Duration from \"../Duration.js\";\nimport Long from \"long\";\nimport Key from \"../Key.js\";\nimport PrivateKey from \"../PrivateKey.js\";\nimport EvmAddress from \"../EvmAddress.js\";\nimport PublicKey from \"../PublicKey.js\";\n/**\n * @typedef {import(\"bignumber.js\").default} BigNumber\n * @typedef {import(\"../channel/Channel.js\").default} Channel\n * @typedef {import(\"../client/Client.js\").default<*, *>} Client\n * @typedef {import(\"../Timestamp.js\").default} Timestamp\n * @typedef {import(\"../transaction/TransactionId.js\").default} TransactionId\n */\n\n/**\n * Create a new Hedera™ crypto-currency account.\n */\nexport default class AccountCreateTransaction extends Transaction {\n /**\n * @param {object} [props]\n * @param {Key} [props.key]\n * @param {number | string | Long | BigNumber | Hbar} [props.initialBalance]\n * @param {boolean} [props.receiverSignatureRequired]\n * @param {AccountId} [props.proxyAccountId]\n * @param {Duration | Long | number} [props.autoRenewPeriod]\n * @param {string} [props.accountMemo]\n * @param {Long | number} [props.maxAutomaticTokenAssociations]\n * @param {AccountId | string} [props.stakedAccountId]\n * @param {Long | number} [props.stakedNodeId]\n * @param {boolean} [props.declineStakingReward]\n * @param {EvmAddress} [props.alias]\n */\n constructor(props = {}) {\n super();\n\n /**\n * @private\n * @type {?Key}\n */\n this._key = null;\n\n /**\n * @private\n * @type {?Hbar}\n */\n this._initialBalance = null;\n\n /**\n * @private\n * @type {Hbar}\n */\n this._sendRecordThreshold = DEFAULT_RECORD_THRESHOLD;\n\n /**\n * @private\n * @type {Hbar}\n */\n this._receiveRecordThreshold = DEFAULT_RECORD_THRESHOLD;\n\n /**\n * @private\n * @type {boolean}\n */\n this._receiverSignatureRequired = false;\n\n /**\n * @private\n * @type {?AccountId}\n */\n this._proxyAccountId = null;\n\n /**\n * @private\n * @type {Duration}\n */\n this._autoRenewPeriod = new Duration(DEFAULT_AUTO_RENEW_PERIOD);\n\n /**\n * @private\n * @type {?string}\n */\n this._accountMemo = null;\n\n /**\n * @private\n * @type {?Long}\n */\n this._maxAutomaticTokenAssociations = null;\n\n /**\n * @private\n * @type {?AccountId}\n */\n this._stakedAccountId = null;\n\n /**\n * @private\n * @type {?Long}\n */\n this._stakedNodeId = null;\n\n /**\n * @private\n * @type {boolean}\n */\n this._declineStakingReward = false;\n\n /**\n * @private\n * @type {?EvmAddress}\n */\n this._alias = null;\n\n if (props.key != null) {\n this.setKeyWithoutAlias(props.key);\n }\n\n if (props.receiverSignatureRequired != null) {\n this.setReceiverSignatureRequired(props.receiverSignatureRequired);\n }\n\n if (props.initialBalance != null) {\n this.setInitialBalance(props.initialBalance);\n }\n\n if (props.proxyAccountId != null) {\n // eslint-disable-next-line deprecation/deprecation\n this.setProxyAccountId(props.proxyAccountId);\n }\n\n if (props.autoRenewPeriod != null) {\n this.setAutoRenewPeriod(props.autoRenewPeriod);\n }\n\n if (props.accountMemo != null) {\n this.setAccountMemo(props.accountMemo);\n }\n\n if (props.maxAutomaticTokenAssociations != null) {\n this.setMaxAutomaticTokenAssociations(\n props.maxAutomaticTokenAssociations,\n );\n }\n\n if (props.stakedAccountId != null) {\n this.setStakedAccountId(props.stakedAccountId);\n }\n\n if (props.stakedNodeId != null) {\n this.setStakedNodeId(props.stakedNodeId);\n }\n\n if (props.declineStakingReward != null) {\n this.setDeclineStakingReward(props.declineStakingReward);\n }\n\n if (props.alias != null) {\n this.setAlias(props.alias);\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 {AccountCreateTransaction}\n */\n static _fromProtobuf(\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n ) {\n const body = bodies[0];\n const create =\n /** @type {HieroProto.proto.ICryptoCreateTransactionBody} */ (\n body.cryptoCreateAccount\n );\n\n let alias = undefined;\n if (create.alias != null && create.alias.length > 0) {\n if (create.alias.length === 20) {\n alias = EvmAddress.fromBytes(create.alias);\n }\n }\n\n return Transaction._fromProtobufTransactions(\n new AccountCreateTransaction({\n key:\n create.key != null\n ? Key._fromProtobufKey(create.key)\n : undefined,\n initialBalance:\n create.initialBalance != null\n ? Hbar.fromTinybars(create.initialBalance)\n : undefined,\n receiverSignatureRequired:\n create.receiverSigRequired != null\n ? create.receiverSigRequired\n : undefined,\n proxyAccountId:\n create.proxyAccountID != null\n ? AccountId._fromProtobuf(\n /** @type {HieroProto.proto.IAccountID} */ (\n create.proxyAccountID\n ),\n )\n : undefined,\n autoRenewPeriod:\n create.autoRenewPeriod != null\n ? create.autoRenewPeriod.seconds != null\n ? create.autoRenewPeriod.seconds\n : undefined\n : undefined,\n accountMemo: create.memo != null ? create.memo : undefined,\n maxAutomaticTokenAssociations:\n create.maxAutomaticTokenAssociations != null\n ? create.maxAutomaticTokenAssociations\n : undefined,\n stakedAccountId:\n create.stakedAccountId != null\n ? AccountId._fromProtobuf(create.stakedAccountId)\n : undefined,\n stakedNodeId:\n create.stakedNodeId != null\n ? create.stakedNodeId\n : undefined,\n declineStakingReward: create.declineReward == true,\n alias,\n }),\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n );\n }\n\n /**\n * @returns {?Key}\n */\n get key() {\n return this._key;\n }\n\n /**\n * Set the key for this account.\n *\n * This is the key that must sign each transfer out of the account.\n *\n * If `receiverSignatureRequired` is true, then the key must also sign\n * any transfer into the account.\n *\n * @deprecated Use `setKeyWithoutAlias` instead.\n * @param {Key} key\n * @returns {this}\n */\n setKey(key) {\n this._requireNotFrozen();\n this._key = key;\n\n return this;\n }\n\n /**\n * Sets an ECDSA key (private or public) and a derived alias from this key in the background.\n * @param {Key} key - An ECDSA key (private or public) used for signing transactions and alias derivation.\n * @returns {this}\n * @throws {Error} If the key is not an ECDSA key.\n */\n setECDSAKeyWithAlias(key) {\n this.setKeyWithoutAlias(key);\n\n const alias = this._deriveECDSAKeyAlias(key);\n\n this.setAlias(alias);\n return this;\n }\n\n /**\n * Sets an account key and an alias derived from a separate ECDSA key.\n * The transaction must be signed by both keys.\n * @param {Key} key - The primary account key used for signing transactions.\n * @param {Key} aliasKey - The ECDSA key (private or public) used to derive the EVM address.\n * @returns {this}\n * @throws {Error} If the aliasKey is not an ECDSA key.\n */\n setKeyWithAlias(key, aliasKey) {\n this.setKeyWithoutAlias(key);\n\n const alias = this._deriveECDSAKeyAlias(aliasKey);\n\n this.setAlias(alias);\n return this;\n }\n\n /**\n * Set the key for this account without an alias.\n *\n * This is the key that must sign each transfer out of the account.\n *\n * If `receiverSignatureRequired` is true, then the key must also sign\n * any transfer into the account.\n *\n *\n * @param {Key} key\n * @returns {this}\n */\n setKeyWithoutAlias(key) {\n this._requireNotFrozen();\n this._key = key;\n\n return this;\n }\n\n /**\n * @returns {?Hbar}\n */\n get initialBalance() {\n return this._initialBalance;\n }\n\n /**\n * Set the initial amount to transfer into this account.\n *\n * @param {number | string | Long | BigNumber | Hbar} initialBalance\n * @returns {this}\n */\n setInitialBalance(initialBalance) {\n this._requireNotFrozen();\n this._initialBalance =\n initialBalance instanceof Hbar\n ? initialBalance\n : new Hbar(initialBalance);\n\n return this;\n }\n\n /**\n * @returns {boolean}\n */\n get receiverSignatureRequired() {\n return this._receiverSignatureRequired;\n }\n\n /**\n * Set to true to require the key for this account to sign any transfer of\n * hbars to this account.\n *\n * @param {boolean} receiverSignatureRequired\n * @returns {this}\n */\n setReceiverSignatureRequired(receiverSignatureRequired) {\n this._requireNotFrozen();\n this._receiverSignatureRequired = receiverSignatureRequired;\n\n return this;\n }\n\n /**\n * @deprecated\n * @returns {?AccountId}\n */\n get proxyAccountId() {\n return this._proxyAccountId;\n }\n\n /**\n * @deprecated\n *\n * Set the ID of the account to which this account is proxy staked.\n * @param {AccountId} proxyAccountId\n * @returns {this}\n */\n setProxyAccountId(proxyAccountId) {\n this._requireNotFrozen();\n this._proxyAccountId = proxyAccountId;\n\n return this;\n }\n\n /**\n * @returns {Duration}\n */\n get autoRenewPeriod() {\n return this._autoRenewPeriod;\n }\n\n /**\n * Set the auto renew period for this account.\n *\n * @param {Duration | Long | number} autoRenewPeriod\n * @returns {this}\n */\n setAutoRenewPeriod(autoRenewPeriod) {\n this._requireNotFrozen();\n this._autoRenewPeriod =\n autoRenewPeriod instanceof Duration\n ? autoRenewPeriod\n : new Duration(autoRenewPeriod);\n\n return this;\n }\n\n /**\n * @returns {?string}\n */\n get accountMemo() {\n return this._accountMemo;\n }\n\n /**\n * @param {string} memo\n * @returns {this}\n */\n setAccountMemo(memo) {\n this._requireNotFrozen();\n this._accountMemo = memo;\n\n return this;\n }\n\n /**\n * @returns {?Long}\n */\n get maxAutomaticTokenAssociations() {\n return this._maxAutomaticTokenAssociations;\n }\n\n /**\n * @param {Long | number} maxAutomaticTokenAssociations\n * @returns {this}\n */\n setMaxAutomaticTokenAssociations(maxAutomaticTokenAssociations) {\n this._requireNotFrozen();\n this._maxAutomaticTokenAssociations =\n typeof maxAutomaticTokenAssociations === \"number\"\n ? Long.fromNumber(maxAutomaticTokenAssociations)\n : maxAutomaticTokenAssociations;\n\n return this;\n }\n\n /**\n * @returns {?AccountId}\n */\n get stakedAccountId() {\n return this._stakedAccountId;\n }\n\n /**\n * @param {AccountId | string} stakedAccountId\n * @returns {this}\n */\n setStakedAccountId(stakedAccountId) {\n this._requireNotFrozen();\n this._stakedAccountId =\n typeof stakedAccountId === \"string\"\n ? AccountId.fromString(stakedAccountId)\n : stakedAccountId;\n\n return this;\n }\n\n /**\n * @returns {?Long}\n */\n get stakedNodeId() {\n return this._stakedNodeId;\n }\n\n /**\n * @param {Long | number} stakedNodeId\n * @returns {this}\n */\n setStakedNodeId(stakedNodeId) {\n this._requireNotFrozen();\n this._stakedNodeId = Long.fromValue(stakedNodeId);\n\n return this;\n }\n\n /**\n * @returns {boolean}\n */\n get declineStakingRewards() {\n return this._declineStakingReward;\n }\n\n /**\n * @param {boolean} declineStakingReward\n * @returns {this}\n */\n setDeclineStakingReward(declineStakingReward) {\n this._requireNotFrozen();\n this._declineStakingReward = declineStakingReward;\n\n return this;\n }\n\n /**\n * The bytes to be used as the account's alias.\n *\n * The bytes must be formatted as the calcluated last 20 bytes of the\n * keccak-256 of the ECDSA primitive key.\n *\n * All other types of keys, including but not limited to ED25519, ThresholdKey, KeyList, ContractID, and\n * delegatable_contract_id, are not supported.\n *\n * At most only one account can ever have a given alias on the network.\n *\n * @returns {?EvmAddress}\n */\n get alias() {\n return this._alias;\n }\n\n /**\n * The bytes to be used as the account's alias.\n *\n * The bytes must be formatted as the calcluated last 20 bytes of the\n * keccak-256 of the ECDSA primitive key.\n *\n * All other types of keys, including but not limited to ED25519, ThresholdKey, KeyList, ContractID, and\n * delegatable_contract_id, are not supported.\n *\n * At most only one account can ever have a given alias on the network.\n *\n * @param {string | EvmAddress} alias\n * @returns {this}\n */\n setAlias(alias) {\n if (typeof alias === \"string\") {\n if (\n (alias.startsWith(\"0x\") && alias.length == 42) ||\n alias.length == 40\n ) {\n this._alias = EvmAddress.fromString(alias);\n } else {\n throw new Error(\n 'evmAddress must be a valid EVM address with or without \"0x\" prefix',\n );\n }\n } else {\n this._alias = alias;\n }\n\n return this;\n }\n\n /**\n * @param {Client} client\n */\n _validateChecksums(client) {\n if (this._proxyAccountId != null) {\n this._proxyAccountId.validateChecksum(client);\n }\n }\n\n /**\n * Derives an EVM alias from an ECDSA key.\n * @private\n * @internal\n * @param {Key} key\n * @returns {string}\n * @throws {Error} If the key is not a ECDSA (secp256k1) PrivateKey or PublicKey.\n */\n _deriveECDSAKeyAlias(key) {\n const isPrivateECDSAKey =\n key instanceof PrivateKey && key.type === \"secp256k1\";\n const isPublicECDSAKey =\n key instanceof PublicKey && key.type === \"secp256k1\";\n\n if (isPrivateECDSAKey) {\n return key.publicKey.toEvmAddress();\n } else if (isPublicECDSAKey) {\n return key.toEvmAddress();\n }\n\n throw new Error(\n \"Invalid key for alias derivation provided: expected an ECDSA (secp256k1) PrivateKey or PublicKey.\",\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.crypto.createAccount(request);\n }\n\n /**\n * @override\n * @protected\n * @returns {NonNullable<HieroProto.proto.TransactionBody[\"data\"]>}\n */\n _getTransactionDataCase() {\n return \"cryptoCreateAccount\";\n }\n\n /**\n * @override\n * @protected\n * @returns {HieroProto.proto.ICryptoCreateTransactionBody}\n */\n _makeTransactionData() {\n let alias = null;\n if (this._alias != null) {\n alias = this._alias.toBytes();\n }\n\n return {\n key: this._key != null ? this._key._toProtobufKey() : null,\n initialBalance:\n this._initialBalance != null\n ? this._initialBalance.toTinybars()\n : null,\n autoRenewPeriod: this._autoRenewPeriod._toProtobuf(),\n proxyAccountID:\n this._proxyAccountId != null\n ? this._proxyAccountId._toProtobuf()\n : null,\n receiveRecordThreshold: this._receiveRecordThreshold.toTinybars(),\n sendRecordThreshold: this._sendRecordThreshold.toTinybars(),\n receiverSigRequired: this._receiverSignatureRequired,\n memo: this._accountMemo,\n maxAutomaticTokenAssociations:\n this._maxAutomaticTokenAssociations != null\n ? this._maxAutomaticTokenAssociations.toInt()\n : null,\n stakedAccountId:\n this.stakedAccountId != null\n ? this.stakedAccountId._toProtobuf()\n : null,\n stakedNodeId: this.stakedNodeId,\n declineReward: this.declineStakingRewards,\n alias,\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 `AccountCreateTransaction:${timestamp.toString()}`;\n }\n}\n\nTRANSACTION_REGISTRY.set(\n \"cryptoCreateAccount\",\n // eslint-disable-next-line @typescript-eslint/unbound-method\n AccountCreateTransaction._fromProtobuf,\n);\n"],"names":["AccountCreateTransaction","Transaction","constructor","props","super","this","_key","_initialBalance","_sendRecordThreshold","DEFAULT_RECORD_THRESHOLD","_receiveRecordThreshold","_receiverSignatureRequired","_proxyAccountId","_autoRenewPeriod","Duration","DEFAULT_AUTO_RENEW_PERIOD","_accountMemo","_maxAutomaticTokenAssociations","_stakedAccountId","_stakedNodeId","_declineStakingReward","_alias","key","setKeyWithoutAlias","receiverSignatureRequired","setReceiverSignatureRequired","initialBalance","setInitialBalance","proxyAccountId","setProxyAccountId","autoRenewPeriod","setAutoRenewPeriod","accountMemo","setAccountMemo","maxAutomaticTokenAssociations","setMaxAutomaticTokenAssociations","stakedAccountId","setStakedAccountId","stakedNodeId","setStakedNodeId","declineStakingReward","setDeclineStakingReward","alias","setAlias","_fromProtobuf","transactions","signedTransactions","transactionIds","nodeIds","bodies","create","length","EvmAddress","fromBytes","_fromProtobufTransactions","Key","_fromProtobufKey","undefined","Hbar","fromTinybars","receiverSigRequired","proxyAccountID","AccountId","seconds","memo","declineReward","setKey","_requireNotFrozen","setECDSAKeyWithAlias","_deriveECDSAKeyAlias","setKeyWithAlias","aliasKey","Long","fromNumber","fromString","fromValue","declineStakingRewards","startsWith","Error","_validateChecksums","client","validateChecksum","isPrivateECDSAKey","PrivateKey","type","isPublicECDSAKey","PublicKey","publicKey","toEvmAddress","_execute","channel","request","crypto","createAccount","_getTransactionDataCase","_makeTransactionData","toBytes","_toProtobufKey","toTinybars","_toProtobuf","receiveRecordThreshold","sendRecordThreshold","toInt","_getLogId","_transactionIds","current","toString","TRANSACTION_REGISTRY","set"],"mappings":"mYA2Be,MAAMA,UAAiCC,EAelD,WAAAC,CAAYC,EAAQ,IAChBC,QAMAC,KAAKC,KAAO,KAMZD,KAAKE,gBAAkB,KAMvBF,KAAKG,qBAAuBC,EAM5BJ,KAAKK,wBAA0BD,EAM/BJ,KAAKM,4BAA6B,EAMlCN,KAAKO,gBAAkB,KAMvBP,KAAKQ,iBAAmB,IAAIC,EAASC,GAMrCV,KAAKW,aAAe,KAMpBX,KAAKY,+BAAiC,KAMtCZ,KAAKa,iBAAmB,KAMxBb,KAAKc,cAAgB,KAMrBd,KAAKe,uBAAwB,EAM7Bf,KAAKgB,OAAS,KAEG,MAAblB,EAAMmB,KACNjB,KAAKkB,mBAAmBpB,EAAMmB,KAGK,MAAnCnB,EAAMqB,2BACNn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,oBAAAX,CAAqB/C,GACjB,MAAM4D,EACF5D,aAAe6D,GAA2B,cAAb7D,EAAI8D,KAC/BC,EACF/D,aAAegE,GAA0B,cAAbhE,EAAI8D,KAEpC,GAAIF,EACA,OAAO5D,EAAIiE,UAAUC,eAClB,GAAIH,EACP,OAAO/D,EAAIkE,eAGf,MAAM,IAAIV,MACN,oGAEZ,CASI,QAAAW,CAASC,EAASC,GACd,OAAOD,EAAQE,OAAOC,cAAcF,EAC5C,CAOI,uBAAAG,GACI,MAAO,qBACf,CAOI,oBAAAC,GACI,IAAIrD,EAAQ,KAKZ,OAJmB,MAAfrC,KAAKgB,SACLqB,EAAQrC,KAAKgB,OAAO2E,WAGjB,CACH1E,IAAkB,MAAbjB,KAAKC,KAAeD,KAAKC,KAAK2F,iBAAmB,KACtDvE,eAC4B,MAAxBrB,KAAKE,gBACCF,KAAKE,gBAAgB2F,aACrB,KACVpE,gBAAiBzB,KAAKQ,iBAAiBsF,cACvCtC,eAC4B,MAAxBxD,KAAKO,gBACCP,KAAKO,gBAAgBuF,cACrB,KACVC,uBAAwB/F,KAAKK,wBAAwBwF,aACrDG,oBAAqBhG,KAAKG,qBAAqB0F,aAC/CtC,oBAAqBvD,KAAKM,2BAC1BqD,KAAM3D,KAAKW,aACXkB,8BAC2C,MAAvC7B,KAAKY,+BACCZ,KAAKY,+BAA+BqF,QACpC,KACVlE,gBAC4B,MAAxB/B,KAAK+B,gBACC/B,KAAK+B,gBAAgB+D,cACrB,KACV7D,aAAcjC,KAAKiC,aACnB2B,cAAe5D,KAAKuE,sBACpBlC,QAEZ,CAKI,SAAA6D,GAII,MAAO,4BAFHlG,KAAKmG,gBAAgBC,QACxB,WAC4CC,YACrD,EAGAC,EAAqBC,IACjB,sBAEA5G,EAAyB4C"}
|
|
@@ -12,13 +12,13 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* @namespace proto
|
|
15
|
-
* @typedef {import("@
|
|
16
|
-
* @typedef {import("@
|
|
17
|
-
* @typedef {import("@
|
|
18
|
-
* @typedef {import("@
|
|
19
|
-
* @typedef {import("@
|
|
20
|
-
* @typedef {import("@
|
|
21
|
-
* @typedef {import("@
|
|
15
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransaction} HieroProto.proto.ITransaction
|
|
16
|
+
* @typedef {import("@hiero-ledger/proto").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction
|
|
17
|
+
* @typedef {import("@hiero-ledger/proto").proto.TransactionBody} HieroProto.proto.TransactionBody
|
|
18
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionBody} HieroProto.proto.ITransactionBody
|
|
19
|
+
* @typedef {import("@hiero-ledger/proto").proto.ITransactionResponse} HieroProto.proto.ITransactionResponse
|
|
20
|
+
* @typedef {import("@hiero-ledger/proto").proto.ICryptoDeleteTransactionBody} HieroProto.proto.ICryptoDeleteTransactionBody
|
|
21
|
+
* @typedef {import("@hiero-ledger/proto").proto.IAccountID} HieroProto.proto.IAccountID
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
/**
|
|
@@ -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.ICryptoDeleteTransactionBody} HieroProto.proto.ICryptoDeleteTransactionBody
|
|
9
|
+
* @typedef {import("@hiero-ledger/proto").proto.IAccountID} HieroProto.proto.IAccountID
|
|
10
10
|
*/
|
|
11
11
|
/**
|
|
12
12
|
* @typedef {import("../channel/Channel.js").default} Channel
|
|
@@ -81,13 +81,13 @@ export default class AccountDeleteTransaction extends Transaction {
|
|
|
81
81
|
}
|
|
82
82
|
export namespace HieroProto {
|
|
83
83
|
namespace proto {
|
|
84
|
-
type ITransaction = import("@
|
|
85
|
-
type ISignedTransaction = import("@
|
|
86
|
-
type TransactionBody = import("@
|
|
87
|
-
type ITransactionBody = import("@
|
|
88
|
-
type ITransactionResponse = import("@
|
|
89
|
-
type ICryptoDeleteTransactionBody = import("@
|
|
90
|
-
type IAccountID = import("@
|
|
84
|
+
type ITransaction = import("@hiero-ledger/proto").proto.ITransaction;
|
|
85
|
+
type ISignedTransaction = import("@hiero-ledger/proto").proto.ISignedTransaction;
|
|
86
|
+
type TransactionBody = import("@hiero-ledger/proto").proto.TransactionBody;
|
|
87
|
+
type ITransactionBody = import("@hiero-ledger/proto").proto.ITransactionBody;
|
|
88
|
+
type ITransactionResponse = import("@hiero-ledger/proto").proto.ITransactionResponse;
|
|
89
|
+
type ICryptoDeleteTransactionBody = import("@hiero-ledger/proto").proto.ICryptoDeleteTransactionBody;
|
|
90
|
+
type IAccountID = import("@hiero-ledger/proto").proto.IAccountID;
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
export type Channel = import("../channel/Channel.js").default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountDeleteTransaction.js","sources":["../../src/account/AccountDeleteTransaction.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport AccountId from \"./AccountId.js\";\nimport Transaction, {\n TRANSACTION_REGISTRY,\n} from \"../transaction/Transaction.js\";\n\n/**\n * @namespace proto\n * @typedef {import(\"@
|
|
1
|
+
{"version":3,"file":"AccountDeleteTransaction.js","sources":["../../src/account/AccountDeleteTransaction.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport AccountId from \"./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.ICryptoDeleteTransactionBody} HieroProto.proto.ICryptoDeleteTransactionBody\n * @typedef {import(\"@hiero-ledger/proto\").proto.IAccountID} HieroProto.proto.IAccountID\n */\n\n/**\n * @typedef {import(\"../channel/Channel.js\").default} Channel\n * @typedef {import(\"../client/Client.js\").default<*, *>} Client\n * @typedef {import(\"../transaction/TransactionId.js\").default} TransactionId\n */\n\n/**\n * Marks an account as deleted, moving all its current hbars to another account.\n *\n * It will remain in the ledger, marked as deleted, until it expires.\n * Transfers into it a deleted account fail. But a deleted account can still have its\n * expiration extended in the normal way.\n */\nexport default class AccountDeleteTransaction extends Transaction {\n /**\n * @param {object} props\n * @param {AccountId} [props.accountId]\n * @param {AccountId} [props.transferAccountId]\n */\n constructor(props = {}) {\n super();\n\n /**\n * @private\n * @type {?AccountId}\n */\n this._accountId = null;\n\n /**\n * @private\n * @type {?AccountId}\n */\n this._transferAccountId = null;\n\n if (props.accountId != null) {\n this.setAccountId(props.accountId);\n }\n\n if (props.transferAccountId != null) {\n this.setTransferAccountId(props.transferAccountId);\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 {AccountDeleteTransaction}\n */\n static _fromProtobuf(\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n ) {\n const body = bodies[0];\n const accountDelete =\n /** @type {HieroProto.proto.ICryptoDeleteTransactionBody} */ (\n body.cryptoDelete\n );\n\n return Transaction._fromProtobufTransactions(\n new AccountDeleteTransaction({\n accountId:\n accountDelete.deleteAccountID != null\n ? AccountId._fromProtobuf(\n /** @type {HieroProto.proto.IAccountID} */ (\n accountDelete.deleteAccountID\n ),\n )\n : undefined,\n transferAccountId:\n accountDelete.transferAccountID != null\n ? AccountId._fromProtobuf(\n /** @type {HieroProto.proto.IAccountID} */ (\n accountDelete.transferAccountID\n ),\n )\n : undefined,\n }),\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n );\n }\n\n /**\n * @returns {?AccountId}\n */\n get accountId() {\n return this._accountId;\n }\n\n /**\n * Set the account ID which is being deleted in this transaction.\n *\n * @param {AccountId | string} accountId\n * @returns {AccountDeleteTransaction}\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 * @returns {?AccountId}\n */\n get transferAccountId() {\n return this._transferAccountId;\n }\n\n /**\n * Set the account ID which will receive all remaining hbars.\n *\n * @param {AccountId | string} transferAccountId\n * @returns {AccountDeleteTransaction}\n */\n setTransferAccountId(transferAccountId) {\n this._requireNotFrozen();\n this._transferAccountId =\n typeof transferAccountId === \"string\"\n ? AccountId.fromString(transferAccountId)\n : transferAccountId.clone();\n\n return this;\n }\n\n /**\n * @param {Client} client\n */\n _validateChecksums(client) {\n if (this._accountId != null) {\n this._accountId.validateChecksum(client);\n }\n\n if (this._transferAccountId != null) {\n this._transferAccountId.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.crypto.cryptoDelete(request);\n }\n\n /**\n * @override\n * @protected\n * @returns {NonNullable<HieroProto.proto.TransactionBody[\"data\"]>}\n */\n _getTransactionDataCase() {\n return \"cryptoDelete\";\n }\n\n /**\n * @override\n * @protected\n * @returns {HieroProto.proto.ICryptoDeleteTransactionBody}\n */\n _makeTransactionData() {\n return {\n deleteAccountID:\n this._accountId != null ? this._accountId._toProtobuf() : null,\n transferAccountID:\n this._transferAccountId != null\n ? this._transferAccountId._toProtobuf()\n : null,\n };\n }\n\n /**\n * @returns {string}\n */\n _getLogId() {\n const timestamp = /** @type {import(\"../Timestamp.js\").default} */ (\n this._transactionIds.current.validStart\n );\n return `AccountDeleteTransaction:${timestamp.toString()}`;\n }\n}\n\nTRANSACTION_REGISTRY.set(\n \"cryptoDelete\",\n // eslint-disable-next-line @typescript-eslint/unbound-method\n AccountDeleteTransaction._fromProtobuf,\n);\n"],"names":["AccountDeleteTransaction","Transaction","constructor","props","super","this","_accountId","_transferAccountId","accountId","setAccountId","transferAccountId","setTransferAccountId","_fromProtobuf","transactions","signedTransactions","transactionIds","nodeIds","bodies","accountDelete","_fromProtobufTransactions","deleteAccountID","AccountId","undefined","transferAccountID","_requireNotFrozen","fromString","clone","_validateChecksums","client","validateChecksum","_execute","channel","request","crypto","cryptoDelete","_getTransactionDataCase","_makeTransactionData","_toProtobuf","_getLogId","_transactionIds","current","toString","TRANSACTION_REGISTRY","set"],"mappings":"sGA+Be,MAAMA,UAAiCC,EAMlD,WAAAC,CAAYC,EAAQ,IAChBC,QAMAC,KAAKC,WAAa,KAMlBD,KAAKE,mBAAqB,KAEH,MAAnBJ,EAAMK,WACNH,KAA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@@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _long = _interopRequireDefault(require("long"));
|
|
8
8
|
var EntityIdHelper = _interopRequireWildcard(require("../EntityIdHelper.cjs"));
|
|
9
|
-
var HieroProto = _interopRequireWildcard(require("@
|
|
9
|
+
var HieroProto = _interopRequireWildcard(require("@hiero-ledger/proto"));
|
|
10
10
|
var _Key = _interopRequireDefault(require("../Key.cjs"));
|
|
11
11
|
var _PublicKey = _interopRequireDefault(require("../PublicKey.cjs"));
|
|
12
12
|
var _Cache = _interopRequireDefault(require("../Cache.cjs"));
|
|
@@ -146,4 +146,4 @@ export type Client = import("../client/Client.js").default<any, any>;
|
|
|
146
146
|
import Long from "long";
|
|
147
147
|
import PublicKey from "../PublicKey.js";
|
|
148
148
|
import EvmAddress from "../EvmAddress.js";
|
|
149
|
-
import * as HieroProto from "@
|
|
149
|
+
import * as HieroProto from "@hiero-ledger/proto";
|