@hiero-ledger/sdk 2.70.0
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/LICENSE +190 -0
- package/README.md +167 -0
- package/dist/umd.js +98781 -0
- package/dist/umd.min.js +122 -0
- package/lib/BadEntityIdError.cjs +27 -0
- package/lib/BadEntityIdError.d.ts +15 -0
- package/lib/BadEntityIdError.js +2 -0
- package/lib/BadEntityIdError.js.map +1 -0
- package/lib/Cache.cjs +376 -0
- package/lib/Cache.d.ts +228 -0
- package/lib/Cache.js +2 -0
- package/lib/Cache.js.map +1 -0
- package/lib/Duration.cjs +53 -0
- package/lib/Duration.d.ts +37 -0
- package/lib/Duration.js +2 -0
- package/lib/Duration.js.map +1 -0
- package/lib/EntityIdHelper.cjs +547 -0
- package/lib/EntityIdHelper.d.ts +203 -0
- package/lib/EntityIdHelper.js +2 -0
- package/lib/EntityIdHelper.js.map +1 -0
- package/lib/EthereumFlow.cjs +207 -0
- package/lib/EthereumFlow.d.ts +134 -0
- package/lib/EthereumFlow.js +2 -0
- package/lib/EthereumFlow.js.map +1 -0
- package/lib/EthereumTransaction.cjs +260 -0
- package/lib/EthereumTransaction.d.ts +161 -0
- package/lib/EthereumTransaction.js +2 -0
- package/lib/EthereumTransaction.js.map +1 -0
- package/lib/EthereumTransactionData.cjs +66 -0
- package/lib/EthereumTransactionData.d.ts +33 -0
- package/lib/EthereumTransactionData.js +2 -0
- package/lib/EthereumTransactionData.js.map +1 -0
- package/lib/EthereumTransactionDataEip1559.cjs +134 -0
- package/lib/EthereumTransactionDataEip1559.d.ts +64 -0
- package/lib/EthereumTransactionDataEip1559.js +2 -0
- package/lib/EthereumTransactionDataEip1559.js.map +1 -0
- package/lib/EthereumTransactionDataEip2930.cjs +129 -0
- package/lib/EthereumTransactionDataEip2930.d.ts +60 -0
- package/lib/EthereumTransactionDataEip2930.js +2 -0
- package/lib/EthereumTransactionDataEip2930.js.map +1 -0
- package/lib/EthereumTransactionDataLegacy.cjs +112 -0
- package/lib/EthereumTransactionDataLegacy.d.ts +52 -0
- package/lib/EthereumTransactionDataLegacy.js +2 -0
- package/lib/EthereumTransactionDataLegacy.js.map +1 -0
- package/lib/EvmAddress.cjs +84 -0
- package/lib/EvmAddress.d.ts +47 -0
- package/lib/EvmAddress.js +2 -0
- package/lib/EvmAddress.js.map +1 -0
- package/lib/ExchangeRate.cjs +113 -0
- package/lib/ExchangeRate.d.ts +75 -0
- package/lib/ExchangeRate.js +2 -0
- package/lib/ExchangeRate.js.map +1 -0
- package/lib/ExchangeRates.cjs +75 -0
- package/lib/ExchangeRates.d.ts +39 -0
- package/lib/ExchangeRates.js +2 -0
- package/lib/ExchangeRates.js.map +1 -0
- package/lib/Executable.cjs +760 -0
- package/lib/Executable.d.ts +365 -0
- package/lib/Executable.js +2 -0
- package/lib/Executable.js.map +1 -0
- package/lib/FeeComponents.cjs +170 -0
- package/lib/FeeComponents.d.ts +66 -0
- package/lib/FeeComponents.js +2 -0
- package/lib/FeeComponents.js.map +1 -0
- package/lib/FeeData.cjs +111 -0
- package/lib/FeeData.d.ts +58 -0
- package/lib/FeeData.js +2 -0
- package/lib/FeeData.js.map +1 -0
- package/lib/FeeDataType.cjs +128 -0
- package/lib/FeeDataType.d.ts +44 -0
- package/lib/FeeDataType.js +2 -0
- package/lib/FeeDataType.js.map +1 -0
- package/lib/FeeSchedule.cjs +79 -0
- package/lib/FeeSchedule.d.ts +40 -0
- package/lib/FeeSchedule.js +2 -0
- package/lib/FeeSchedule.js.map +1 -0
- package/lib/FeeSchedules.cjs +79 -0
- package/lib/FeeSchedules.d.ts +40 -0
- package/lib/FeeSchedules.js +2 -0
- package/lib/FeeSchedules.js.map +1 -0
- package/lib/FreezeType.cjs +117 -0
- package/lib/FreezeType.d.ts +42 -0
- package/lib/FreezeType.js +2 -0
- package/lib/FreezeType.js.map +1 -0
- package/lib/Hbar.cjs +139 -0
- package/lib/Hbar.d.ts +62 -0
- package/lib/Hbar.js +2 -0
- package/lib/Hbar.js.map +1 -0
- package/lib/HbarUnit.cjs +77 -0
- package/lib/HbarUnit.d.ts +46 -0
- package/lib/HbarUnit.js +2 -0
- package/lib/HbarUnit.js.map +1 -0
- package/lib/Key.cjs +62 -0
- package/lib/Key.d.ts +23 -0
- package/lib/Key.js +2 -0
- package/lib/Key.js.map +1 -0
- package/lib/KeyList.cjs +181 -0
- package/lib/KeyList.d.ts +87 -0
- package/lib/KeyList.js +2 -0
- package/lib/KeyList.js.map +1 -0
- package/lib/LedgerId.cjs +137 -0
- package/lib/LedgerId.d.ts +64 -0
- package/lib/LedgerId.js +2 -0
- package/lib/LedgerId.js.map +1 -0
- package/lib/LocalProvider.cjs +159 -0
- package/lib/LocalProvider.d.ts +120 -0
- package/lib/LocalProvider.js +2 -0
- package/lib/LocalProvider.js.map +1 -0
- package/lib/ManagedNode.cjs +245 -0
- package/lib/ManagedNode.d.ts +127 -0
- package/lib/ManagedNode.js +2 -0
- package/lib/ManagedNode.js.map +1 -0
- package/lib/ManagedNodeAddress.cjs +104 -0
- package/lib/ManagedNodeAddress.d.ts +51 -0
- package/lib/ManagedNodeAddress.js +2 -0
- package/lib/ManagedNodeAddress.js.map +1 -0
- package/lib/MaxAttemptsOrTimeoutError.cjs +48 -0
- package/lib/MaxAttemptsOrTimeoutError.d.ts +26 -0
- package/lib/MaxAttemptsOrTimeoutError.js +2 -0
- package/lib/MaxAttemptsOrTimeoutError.js.map +1 -0
- package/lib/MaxQueryPaymentExceeded.cjs +34 -0
- package/lib/MaxQueryPaymentExceeded.d.ts +21 -0
- package/lib/MaxQueryPaymentExceeded.js +2 -0
- package/lib/MaxQueryPaymentExceeded.js.map +1 -0
- package/lib/MirrorNode.cjs +48 -0
- package/lib/MirrorNode.d.ts +39 -0
- package/lib/MirrorNode.js +2 -0
- package/lib/MirrorNode.js.map +1 -0
- package/lib/Mnemonic.cjs +232 -0
- package/lib/Mnemonic.d.ts +145 -0
- package/lib/Mnemonic.js +2 -0
- package/lib/Mnemonic.js.map +1 -0
- package/lib/Node.cjs +114 -0
- package/lib/Node.d.ts +72 -0
- package/lib/Node.js +2 -0
- package/lib/Node.js.map +1 -0
- package/lib/ObjectMap.cjs +137 -0
- package/lib/ObjectMap.d.ts +88 -0
- package/lib/ObjectMap.js +2 -0
- package/lib/ObjectMap.js.map +1 -0
- package/lib/PrecheckStatusError.cjs +77 -0
- package/lib/PrecheckStatusError.d.ts +68 -0
- package/lib/PrecheckStatusError.js +2 -0
- package/lib/PrecheckStatusError.js.map +1 -0
- package/lib/PrivateKey.cjs +529 -0
- package/lib/PrivateKey.d.ts +312 -0
- package/lib/PrivateKey.js +2 -0
- package/lib/PrivateKey.js.map +1 -0
- package/lib/PrngTransaction.cjs +136 -0
- package/lib/PrngTransaction.d.ts +74 -0
- package/lib/PrngTransaction.js +2 -0
- package/lib/PrngTransaction.js.map +1 -0
- package/lib/Provider.cjs +41 -0
- package/lib/Provider.d.ts +32 -0
- package/lib/Provider.js +2 -0
- package/lib/Provider.js.map +1 -0
- package/lib/PublicKey.cjs +285 -0
- package/lib/PublicKey.d.ts +142 -0
- package/lib/PublicKey.js +2 -0
- package/lib/PublicKey.js.map +1 -0
- package/lib/ReceiptStatusError.cjs +45 -0
- package/lib/ReceiptStatusError.d.ts +38 -0
- package/lib/ReceiptStatusError.js +2 -0
- package/lib/ReceiptStatusError.js.map +1 -0
- package/lib/RecordStatusError.cjs +34 -0
- package/lib/RecordStatusError.d.ts +27 -0
- package/lib/RecordStatusError.js +2 -0
- package/lib/RecordStatusError.js.map +1 -0
- package/lib/RequestType.cjs +922 -0
- package/lib/RequestType.d.ts +131 -0
- package/lib/RequestType.js +2 -0
- package/lib/RequestType.js.map +1 -0
- package/lib/Signer.cjs +47 -0
- package/lib/Signer.d.ts +38 -0
- package/lib/Signer.js +2 -0
- package/lib/Signer.js.map +1 -0
- package/lib/SignerSignature.cjs +34 -0
- package/lib/SignerSignature.d.ts +29 -0
- package/lib/SignerSignature.js +2 -0
- package/lib/SignerSignature.js.map +1 -0
- package/lib/StakingInfo.cjs +160 -0
- package/lib/StakingInfo.d.ts +109 -0
- package/lib/StakingInfo.js +2 -0
- package/lib/StakingInfo.js.map +1 -0
- package/lib/Status.cjs +3353 -0
- package/lib/Status.d.ts +395 -0
- package/lib/Status.js +2 -0
- package/lib/Status.js.map +1 -0
- package/lib/StatusError.cjs +66 -0
- package/lib/StatusError.d.ts +41 -0
- package/lib/StatusError.js +2 -0
- package/lib/StatusError.js.map +1 -0
- package/lib/Timestamp.cjs +144 -0
- package/lib/Timestamp.d.ts +69 -0
- package/lib/Timestamp.js +2 -0
- package/lib/Timestamp.js.map +1 -0
- package/lib/TransactionFeeSchedule.cjs +85 -0
- package/lib/TransactionFeeSchedule.d.ts +39 -0
- package/lib/TransactionFeeSchedule.js +2 -0
- package/lib/TransactionFeeSchedule.js.map +1 -0
- package/lib/Transfer.cjs +104 -0
- package/lib/Transfer.d.ts +77 -0
- package/lib/Transfer.js +2 -0
- package/lib/Transfer.js.map +1 -0
- package/lib/Wallet.cjs +253 -0
- package/lib/Wallet.d.ts +147 -0
- package/lib/Wallet.js +2 -0
- package/lib/Wallet.js.map +1 -0
- package/lib/account/AccountAllowanceAdjustTransaction.cjs +366 -0
- package/lib/account/AccountAllowanceAdjustTransaction.d.ts +208 -0
- package/lib/account/AccountAllowanceAdjustTransaction.js +2 -0
- package/lib/account/AccountAllowanceAdjustTransaction.js.map +1 -0
- package/lib/account/AccountAllowanceApproveTransaction.cjs +353 -0
- package/lib/account/AccountAllowanceApproveTransaction.d.ts +194 -0
- package/lib/account/AccountAllowanceApproveTransaction.js +2 -0
- package/lib/account/AccountAllowanceApproveTransaction.js.map +1 -0
- package/lib/account/AccountAllowanceDeleteTransaction.cjs +166 -0
- package/lib/account/AccountAllowanceDeleteTransaction.d.ts +90 -0
- package/lib/account/AccountAllowanceDeleteTransaction.js +2 -0
- package/lib/account/AccountAllowanceDeleteTransaction.js.map +1 -0
- package/lib/account/AccountBalance.cjs +145 -0
- package/lib/account/AccountBalance.d.ts +72 -0
- package/lib/account/AccountBalance.js +2 -0
- package/lib/account/AccountBalance.js.map +1 -0
- package/lib/account/AccountBalanceQuery.cjs +210 -0
- package/lib/account/AccountBalanceQuery.d.ts +92 -0
- package/lib/account/AccountBalanceQuery.js +2 -0
- package/lib/account/AccountBalanceQuery.js.map +1 -0
- package/lib/account/AccountCreateTransaction.cjs +566 -0
- package/lib/account/AccountCreateTransaction.d.ts +309 -0
- package/lib/account/AccountCreateTransaction.js +2 -0
- package/lib/account/AccountCreateTransaction.js.map +1 -0
- package/lib/account/AccountDeleteTransaction.cjs +181 -0
- package/lib/account/AccountDeleteTransaction.d.ts +97 -0
- package/lib/account/AccountDeleteTransaction.js +2 -0
- package/lib/account/AccountDeleteTransaction.js.map +1 -0
- package/lib/account/AccountId.cjs +400 -0
- package/lib/account/AccountId.d.ts +149 -0
- package/lib/account/AccountId.js +2 -0
- package/lib/account/AccountId.js.map +1 -0
- package/lib/account/AccountInfo.cjs +356 -0
- package/lib/account/AccountInfo.d.ts +234 -0
- package/lib/account/AccountInfo.js +2 -0
- package/lib/account/AccountInfo.js.map +1 -0
- package/lib/account/AccountInfoFlow.cjs +88 -0
- package/lib/account/AccountInfoFlow.d.ts +53 -0
- package/lib/account/AccountInfoFlow.js +2 -0
- package/lib/account/AccountInfoFlow.js.map +1 -0
- package/lib/account/AccountInfoQuery.cjs +170 -0
- package/lib/account/AccountInfoQuery.d.ts +67 -0
- package/lib/account/AccountInfoQuery.js +2 -0
- package/lib/account/AccountInfoQuery.js.map +1 -0
- package/lib/account/AccountRecordsQuery.cjs +163 -0
- package/lib/account/AccountRecordsQuery.d.ts +67 -0
- package/lib/account/AccountRecordsQuery.js +2 -0
- package/lib/account/AccountRecordsQuery.js.map +1 -0
- package/lib/account/AccountUpdateTransaction.cjs +503 -0
- package/lib/account/AccountUpdateTransaction.d.ts +271 -0
- package/lib/account/AccountUpdateTransaction.js +2 -0
- package/lib/account/AccountUpdateTransaction.js.map +1 -0
- package/lib/account/HbarAllowance.cjs +126 -0
- package/lib/account/HbarAllowance.d.ts +85 -0
- package/lib/account/HbarAllowance.js +2 -0
- package/lib/account/HbarAllowance.js.map +1 -0
- package/lib/account/HbarTransferMap.cjs +45 -0
- package/lib/account/HbarTransferMap.d.ts +31 -0
- package/lib/account/HbarTransferMap.js +2 -0
- package/lib/account/HbarTransferMap.js.map +1 -0
- package/lib/account/LiveHash.cjs +76 -0
- package/lib/account/LiveHash.d.ts +49 -0
- package/lib/account/LiveHash.js +2 -0
- package/lib/account/LiveHash.js.map +1 -0
- package/lib/account/LiveHashAddTransaction.cjs +238 -0
- package/lib/account/LiveHashAddTransaction.d.ts +125 -0
- package/lib/account/LiveHashAddTransaction.js +2 -0
- package/lib/account/LiveHashAddTransaction.js.map +1 -0
- package/lib/account/LiveHashDeleteTransaction.cjs +170 -0
- package/lib/account/LiveHashDeleteTransaction.d.ts +88 -0
- package/lib/account/LiveHashDeleteTransaction.js +2 -0
- package/lib/account/LiveHashDeleteTransaction.js.map +1 -0
- package/lib/account/LiveHashQuery.cjs +188 -0
- package/lib/account/LiveHashQuery.d.ts +91 -0
- package/lib/account/LiveHashQuery.js +2 -0
- package/lib/account/LiveHashQuery.js.map +1 -0
- package/lib/account/NullableTokenDecimalMap.cjs +26 -0
- package/lib/account/NullableTokenDecimalMap.d.ts +19 -0
- package/lib/account/NullableTokenDecimalMap.js +2 -0
- package/lib/account/NullableTokenDecimalMap.js.map +1 -0
- package/lib/account/ProxyStaker.cjs +73 -0
- package/lib/account/ProxyStaker.d.ts +53 -0
- package/lib/account/ProxyStaker.js +2 -0
- package/lib/account/ProxyStaker.js.map +1 -0
- package/lib/account/TokenAllowance.cjs +130 -0
- package/lib/account/TokenAllowance.d.ts +93 -0
- package/lib/account/TokenAllowance.js +2 -0
- package/lib/account/TokenAllowance.js.map +1 -0
- package/lib/account/TokenBalanceMap.cjs +30 -0
- package/lib/account/TokenBalanceMap.d.ts +23 -0
- package/lib/account/TokenBalanceMap.js +2 -0
- package/lib/account/TokenBalanceMap.js.map +1 -0
- package/lib/account/TokenDecimalMap.cjs +26 -0
- package/lib/account/TokenDecimalMap.d.ts +19 -0
- package/lib/account/TokenDecimalMap.js +2 -0
- package/lib/account/TokenDecimalMap.js.map +1 -0
- package/lib/account/TokenNftAllowance.cjs +168 -0
- package/lib/account/TokenNftAllowance.d.ts +110 -0
- package/lib/account/TokenNftAllowance.js +2 -0
- package/lib/account/TokenNftAllowance.js.map +1 -0
- package/lib/account/TokenNftTransferMap.cjs +116 -0
- package/lib/account/TokenNftTransferMap.d.ts +55 -0
- package/lib/account/TokenNftTransferMap.js +2 -0
- package/lib/account/TokenNftTransferMap.js.map +1 -0
- package/lib/account/TokenRelationship.cjs +113 -0
- package/lib/account/TokenRelationship.d.ts +87 -0
- package/lib/account/TokenRelationship.js +2 -0
- package/lib/account/TokenRelationship.js.map +1 -0
- package/lib/account/TokenRelationshipMap.cjs +57 -0
- package/lib/account/TokenRelationshipMap.d.ts +33 -0
- package/lib/account/TokenRelationshipMap.js +2 -0
- package/lib/account/TokenRelationshipMap.js.map +1 -0
- package/lib/account/TokenTransferAccountMap.cjs +28 -0
- package/lib/account/TokenTransferAccountMap.d.ts +8 -0
- package/lib/account/TokenTransferAccountMap.js +2 -0
- package/lib/account/TokenTransferAccountMap.js.map +1 -0
- package/lib/account/TokenTransferMap.cjs +86 -0
- package/lib/account/TokenTransferMap.d.ts +41 -0
- package/lib/account/TokenTransferMap.js +2 -0
- package/lib/account/TokenTransferMap.js.map +1 -0
- package/lib/account/TransferTransaction.cjs +303 -0
- package/lib/account/TransferTransaction.d.ts +173 -0
- package/lib/account/TransferTransaction.js +2 -0
- package/lib/account/TransferTransaction.js.map +1 -0
- package/lib/address_book/AddressBooks.cjs +17 -0
- package/lib/address_book/AddressBooks.d.ts +4 -0
- package/lib/address_book/AddressBooks.js +2 -0
- package/lib/address_book/AddressBooks.js.map +1 -0
- package/lib/address_book/Endpoint.cjs +140 -0
- package/lib/address_book/Endpoint.d.ts +79 -0
- package/lib/address_book/Endpoint.js +2 -0
- package/lib/address_book/Endpoint.js.map +1 -0
- package/lib/address_book/IPv4Address.cjs +116 -0
- package/lib/address_book/IPv4Address.d.ts +59 -0
- package/lib/address_book/IPv4Address.js +2 -0
- package/lib/address_book/IPv4Address.js.map +1 -0
- package/lib/address_book/IPv4AddressPart.cjs +76 -0
- package/lib/address_book/IPv4AddressPart.d.ts +41 -0
- package/lib/address_book/IPv4AddressPart.js +2 -0
- package/lib/address_book/IPv4AddressPart.js.map +1 -0
- package/lib/address_book/NodeAddress.cjs +287 -0
- package/lib/address_book/NodeAddress.d.ts +170 -0
- package/lib/address_book/NodeAddress.js +2 -0
- package/lib/address_book/NodeAddress.js.map +1 -0
- package/lib/address_book/NodeAddressBook.cjs +108 -0
- package/lib/address_book/NodeAddressBook.d.ts +66 -0
- package/lib/address_book/NodeAddressBook.js +2 -0
- package/lib/address_book/NodeAddressBook.js.map +1 -0
- package/lib/array.cjs +51 -0
- package/lib/array.d.ts +14 -0
- package/lib/array.js +2 -0
- package/lib/array.js.map +1 -0
- package/lib/base32.cjs +38 -0
- package/lib/base32.d.ts +18 -0
- package/lib/base32.js +2 -0
- package/lib/base32.js.map +1 -0
- package/lib/browser.cjs +36 -0
- package/lib/browser.d.ts +3 -0
- package/lib/browser.js +2 -0
- package/lib/browser.js.map +1 -0
- package/lib/channel/Channel.cjs +293 -0
- package/lib/channel/Channel.d.ts +121 -0
- package/lib/channel/Channel.js +2 -0
- package/lib/channel/Channel.js.map +1 -0
- package/lib/channel/MirrorChannel.cjs +55 -0
- package/lib/channel/MirrorChannel.d.ts +32 -0
- package/lib/channel/MirrorChannel.js +2 -0
- package/lib/channel/MirrorChannel.js.map +1 -0
- package/lib/channel/NativeChannel.cjs +97 -0
- package/lib/channel/NativeChannel.d.ts +12 -0
- package/lib/channel/NativeChannel.js +2 -0
- package/lib/channel/NativeChannel.js.map +1 -0
- package/lib/channel/NodeChannel.cjs +173 -0
- package/lib/channel/NodeChannel.d.ts +41 -0
- package/lib/channel/NodeChannel.js +2 -0
- package/lib/channel/NodeChannel.js.map +1 -0
- package/lib/channel/NodeMirrorChannel.cjs +78 -0
- package/lib/channel/NodeMirrorChannel.d.ts +22 -0
- package/lib/channel/NodeMirrorChannel.js +2 -0
- package/lib/channel/NodeMirrorChannel.js.map +1 -0
- package/lib/channel/WebChannel.cjs +90 -0
- package/lib/channel/WebChannel.d.ts +12 -0
- package/lib/channel/WebChannel.js +2 -0
- package/lib/channel/WebChannel.js.map +1 -0
- package/lib/client/Client.cjs +818 -0
- package/lib/client/Client.d.ts +487 -0
- package/lib/client/Client.js +2 -0
- package/lib/client/Client.js.map +1 -0
- package/lib/client/ManagedNetwork.cjs +427 -0
- package/lib/client/ManagedNetwork.d.ts +175 -0
- package/lib/client/ManagedNetwork.js +2 -0
- package/lib/client/ManagedNetwork.js.map +1 -0
- package/lib/client/MirrorNetwork.cjs +89 -0
- package/lib/client/MirrorNetwork.d.ts +27 -0
- package/lib/client/MirrorNetwork.js +2 -0
- package/lib/client/MirrorNetwork.js.map +1 -0
- package/lib/client/NativeClient.cjs +210 -0
- package/lib/client/NativeClient.d.ts +72 -0
- package/lib/client/NativeClient.js +2 -0
- package/lib/client/NativeClient.js.map +1 -0
- package/lib/client/Network.cjs +257 -0
- package/lib/client/Network.d.ts +90 -0
- package/lib/client/Network.js +2 -0
- package/lib/client/Network.js.map +1 -0
- package/lib/client/NodeClient.cjs +316 -0
- package/lib/client/NodeClient.d.ts +129 -0
- package/lib/client/NodeClient.js +2 -0
- package/lib/client/NodeClient.js.map +1 -0
- package/lib/client/WebClient.cjs +280 -0
- package/lib/client/WebClient.d.ts +90 -0
- package/lib/client/WebClient.js +2 -0
- package/lib/client/WebClient.js.map +1 -0
- package/lib/client/addressbooks/mainnet.cjs +7 -0
- package/lib/client/addressbooks/mainnet.d.ts +1 -0
- package/lib/client/addressbooks/mainnet.js +2 -0
- package/lib/client/addressbooks/mainnet.js.map +1 -0
- package/lib/client/addressbooks/previewnet.cjs +7 -0
- package/lib/client/addressbooks/previewnet.d.ts +1 -0
- package/lib/client/addressbooks/previewnet.js +2 -0
- package/lib/client/addressbooks/previewnet.js.map +1 -0
- package/lib/client/addressbooks/testnet.cjs +7 -0
- package/lib/client/addressbooks/testnet.d.ts +1 -0
- package/lib/client/addressbooks/testnet.js +2 -0
- package/lib/client/addressbooks/testnet.js.map +1 -0
- package/lib/constants/ClientConstants.cjs +201 -0
- package/lib/constants/ClientConstants.d.ts +74 -0
- package/lib/constants/ClientConstants.js +2 -0
- package/lib/constants/ClientConstants.js.map +1 -0
- package/lib/contract/ContractByteCodeQuery.cjs +158 -0
- package/lib/contract/ContractByteCodeQuery.d.ts +76 -0
- package/lib/contract/ContractByteCodeQuery.js +2 -0
- package/lib/contract/ContractByteCodeQuery.js.map +1 -0
- package/lib/contract/ContractCallQuery.cjs +338 -0
- package/lib/contract/ContractCallQuery.d.ts +141 -0
- package/lib/contract/ContractCallQuery.js +2 -0
- package/lib/contract/ContractCallQuery.js.map +1 -0
- package/lib/contract/ContractCreateFlow.cjs +452 -0
- package/lib/contract/ContractCreateFlow.d.ts +243 -0
- package/lib/contract/ContractCreateFlow.js +2 -0
- package/lib/contract/ContractCreateFlow.js.map +1 -0
- package/lib/contract/ContractCreateTransaction.cjs +556 -0
- package/lib/contract/ContractCreateTransaction.d.ts +315 -0
- package/lib/contract/ContractCreateTransaction.js +2 -0
- package/lib/contract/ContractCreateTransaction.js.map +1 -0
- package/lib/contract/ContractDeleteTransaction.cjs +235 -0
- package/lib/contract/ContractDeleteTransaction.d.ts +135 -0
- package/lib/contract/ContractDeleteTransaction.js +2 -0
- package/lib/contract/ContractDeleteTransaction.js.map +1 -0
- package/lib/contract/ContractExecuteTransaction.cjs +269 -0
- package/lib/contract/ContractExecuteTransaction.d.ts +164 -0
- package/lib/contract/ContractExecuteTransaction.js +2 -0
- package/lib/contract/ContractExecuteTransaction.js.map +1 -0
- package/lib/contract/ContractFunctionParameters.cjs +1703 -0
- package/lib/contract/ContractFunctionParameters.d.ts +725 -0
- package/lib/contract/ContractFunctionParameters.js +2 -0
- package/lib/contract/ContractFunctionParameters.js.map +1 -0
- package/lib/contract/ContractFunctionResult.cjs +846 -0
- package/lib/contract/ContractFunctionResult.d.ts +510 -0
- package/lib/contract/ContractFunctionResult.js +2 -0
- package/lib/contract/ContractFunctionResult.js.map +1 -0
- package/lib/contract/ContractFunctionSelector.cjs +1775 -0
- package/lib/contract/ContractFunctionSelector.d.ts +688 -0
- package/lib/contract/ContractFunctionSelector.js +2 -0
- package/lib/contract/ContractFunctionSelector.js.map +1 -0
- package/lib/contract/ContractId.cjs +267 -0
- package/lib/contract/ContractId.d.ts +123 -0
- package/lib/contract/ContractId.js +2 -0
- package/lib/contract/ContractId.js.map +1 -0
- package/lib/contract/ContractInfo.cjs +227 -0
- package/lib/contract/ContractInfo.d.ts +151 -0
- package/lib/contract/ContractInfo.js +2 -0
- package/lib/contract/ContractInfo.js.map +1 -0
- package/lib/contract/ContractInfoQuery.cjs +172 -0
- package/lib/contract/ContractInfoQuery.d.ts +70 -0
- package/lib/contract/ContractInfoQuery.js +2 -0
- package/lib/contract/ContractInfoQuery.js.map +1 -0
- package/lib/contract/ContractLogInfo.cjs +87 -0
- package/lib/contract/ContractLogInfo.d.ts +66 -0
- package/lib/contract/ContractLogInfo.js +2 -0
- package/lib/contract/ContractLogInfo.js.map +1 -0
- package/lib/contract/ContractNonceInfo.cjs +129 -0
- package/lib/contract/ContractNonceInfo.d.ts +90 -0
- package/lib/contract/ContractNonceInfo.js +2 -0
- package/lib/contract/ContractNonceInfo.js.map +1 -0
- package/lib/contract/ContractStateChange.cjs +75 -0
- package/lib/contract/ContractStateChange.d.ts +37 -0
- package/lib/contract/ContractUpdateTransaction.cjs +525 -0
- package/lib/contract/ContractUpdateTransaction.d.ts +280 -0
- package/lib/contract/ContractUpdateTransaction.js +2 -0
- package/lib/contract/ContractUpdateTransaction.js.map +1 -0
- package/lib/contract/DelegateContractId.cjs +100 -0
- package/lib/contract/DelegateContractId.d.ts +24 -0
- package/lib/contract/DelegateContractId.js +2 -0
- package/lib/contract/DelegateContractId.js.map +1 -0
- package/lib/contract/StorageChange.cjs +73 -0
- package/lib/contract/StorageChange.d.ts +37 -0
- package/lib/cryptography/keccak.cjs +335 -0
- package/lib/cryptography/keccak.d.ts +14 -0
- package/lib/cryptography/keccak.js +2 -0
- package/lib/cryptography/keccak.js.map +1 -0
- package/lib/cryptography/sha384.browser.cjs +19 -0
- package/lib/cryptography/sha384.browser.d.ts +5 -0
- package/lib/cryptography/sha384.browser.js +2 -0
- package/lib/cryptography/sha384.browser.js.map +1 -0
- package/lib/cryptography/sha384.cjs +27 -0
- package/lib/cryptography/sha384.d.ts +10 -0
- package/lib/cryptography/sha384.js +2 -0
- package/lib/cryptography/sha384.js.map +1 -0
- package/lib/cryptography/sha384.native.cjs +21 -0
- package/lib/cryptography/sha384.native.d.ts +5 -0
- package/lib/encoding/base64.native.cjs +25 -0
- package/lib/encoding/base64.native.d.ts +10 -0
- package/lib/encoding/base64.native.js +2 -0
- package/lib/encoding/base64.native.js.map +1 -0
- package/lib/encoding/hex.browser.cjs +95 -0
- package/lib/encoding/hex.browser.d.ts +26 -0
- package/lib/encoding/hex.browser.js +2 -0
- package/lib/encoding/hex.browser.js.map +1 -0
- package/lib/encoding/hex.cjs +82 -0
- package/lib/encoding/hex.d.ts +26 -0
- package/lib/encoding/hex.js +2 -0
- package/lib/encoding/hex.js.map +1 -0
- package/lib/encoding/hex.native.cjs +127 -0
- package/lib/encoding/hex.native.d.ts +36 -0
- package/lib/encoding/utf8.browser.cjs +26 -0
- package/lib/encoding/utf8.browser.d.ts +10 -0
- package/lib/encoding/utf8.browser.js +2 -0
- package/lib/encoding/utf8.browser.js.map +1 -0
- package/lib/encoding/utf8.cjs +24 -0
- package/lib/encoding/utf8.d.ts +10 -0
- package/lib/encoding/utf8.js +2 -0
- package/lib/encoding/utf8.js.map +1 -0
- package/lib/encoding/utf8.native.cjs +29 -0
- package/lib/encoding/utf8.native.d.ts +10 -0
- package/lib/exports.cjs +1264 -0
- package/lib/exports.d.ts +200 -0
- package/lib/exports.js +2 -0
- package/lib/exports.js.map +1 -0
- package/lib/file/FileAppendTransaction.cjs +482 -0
- package/lib/file/FileAppendTransaction.d.ts +196 -0
- package/lib/file/FileAppendTransaction.js +2 -0
- package/lib/file/FileAppendTransaction.js.map +1 -0
- package/lib/file/FileContentsQuery.cjs +159 -0
- package/lib/file/FileContentsQuery.d.ts +77 -0
- package/lib/file/FileContentsQuery.js +2 -0
- package/lib/file/FileContentsQuery.js.map +1 -0
- package/lib/file/FileCreateTransaction.cjs +259 -0
- package/lib/file/FileCreateTransaction.d.ts +153 -0
- package/lib/file/FileCreateTransaction.js +2 -0
- package/lib/file/FileCreateTransaction.js.map +1 -0
- package/lib/file/FileDeleteTransaction.cjs +149 -0
- package/lib/file/FileDeleteTransaction.d.ts +84 -0
- package/lib/file/FileDeleteTransaction.js +2 -0
- package/lib/file/FileDeleteTransaction.js.map +1 -0
- package/lib/file/FileId.cjs +240 -0
- package/lib/file/FileId.d.ts +126 -0
- package/lib/file/FileId.js +2 -0
- package/lib/file/FileId.js.map +1 -0
- package/lib/file/FileInfo.cjs +128 -0
- package/lib/file/FileInfo.d.ts +76 -0
- package/lib/file/FileInfo.js +2 -0
- package/lib/file/FileInfo.js.map +1 -0
- package/lib/file/FileInfoQuery.cjs +171 -0
- package/lib/file/FileInfoQuery.d.ts +68 -0
- package/lib/file/FileInfoQuery.js +2 -0
- package/lib/file/FileInfoQuery.js.map +1 -0
- package/lib/file/FileUpdateTransaction.cjs +319 -0
- package/lib/file/FileUpdateTransaction.d.ts +188 -0
- package/lib/file/FileUpdateTransaction.js +2 -0
- package/lib/file/FileUpdateTransaction.js.map +1 -0
- package/lib/grpc/GrpcServiceError.cjs +65 -0
- package/lib/grpc/GrpcServiceError.d.ts +32 -0
- package/lib/grpc/GrpcServiceError.js +2 -0
- package/lib/grpc/GrpcServiceError.js.map +1 -0
- package/lib/grpc/GrpcStatus.cjs +145 -0
- package/lib/grpc/GrpcStatus.d.ts +46 -0
- package/lib/grpc/GrpcStatus.js +2 -0
- package/lib/grpc/GrpcStatus.js.map +1 -0
- package/lib/http/HttpError.cjs +32 -0
- package/lib/http/HttpError.d.ts +14 -0
- package/lib/http/HttpError.js +2 -0
- package/lib/http/HttpError.js.map +1 -0
- package/lib/http/HttpStatus.cjs +44 -0
- package/lib/http/HttpStatus.d.ts +24 -0
- package/lib/http/HttpStatus.js +2 -0
- package/lib/http/HttpStatus.js.map +1 -0
- package/lib/index.cjs +44 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -0
- package/lib/logger/LogLevel.cjs +77 -0
- package/lib/logger/LogLevel.d.ts +29 -0
- package/lib/logger/LogLevel.js +2 -0
- package/lib/logger/LogLevel.js.map +1 -0
- package/lib/logger/Logger.cjs +221 -0
- package/lib/logger/Logger.d.ts +132 -0
- package/lib/logger/Logger.js +2 -0
- package/lib/logger/Logger.js.map +1 -0
- package/lib/long.cjs +26 -0
- package/lib/long.d.ts +16 -0
- package/lib/long.js +2 -0
- package/lib/long.js.map +1 -0
- package/lib/native.cjs +36 -0
- package/lib/native.d.ts +3 -0
- package/lib/native.js +2 -0
- package/lib/native.js.map +1 -0
- package/lib/network/AddressBookQuery.cjs +218 -0
- package/lib/network/AddressBookQuery.d.ts +104 -0
- package/lib/network/AddressBookQuery.js +2 -0
- package/lib/network/AddressBookQuery.js.map +1 -0
- package/lib/network/AddressBookQueryWeb.cjs +326 -0
- package/lib/network/AddressBookQueryWeb.d.ts +165 -0
- package/lib/network/AddressBookQueryWeb.js +2 -0
- package/lib/network/AddressBookQueryWeb.js.map +1 -0
- package/lib/network/NetworkVersionInfo.cjs +81 -0
- package/lib/network/NetworkVersionInfo.d.ts +46 -0
- package/lib/network/NetworkVersionInfo.js +2 -0
- package/lib/network/NetworkVersionInfo.js.map +1 -0
- package/lib/network/NetworkVersionInfoQuery.cjs +112 -0
- package/lib/network/NetworkVersionInfoQuery.d.ts +50 -0
- package/lib/network/NetworkVersionInfoQuery.js +2 -0
- package/lib/network/NetworkVersionInfoQuery.js.map +1 -0
- package/lib/network/SemanticVersion.cjs +78 -0
- package/lib/network/SemanticVersion.d.ts +45 -0
- package/lib/network/SemanticVersion.js +2 -0
- package/lib/network/SemanticVersion.js.map +1 -0
- package/lib/node/NodeCreateTransaction.cjs +413 -0
- package/lib/node/NodeCreateTransaction.d.ts +239 -0
- package/lib/node/NodeCreateTransaction.js +2 -0
- package/lib/node/NodeCreateTransaction.js.map +1 -0
- package/lib/node/NodeDeleteTransaction.cjs +143 -0
- package/lib/node/NodeDeleteTransaction.d.ts +80 -0
- package/lib/node/NodeDeleteTransaction.js +2 -0
- package/lib/node/NodeDeleteTransaction.js.map +1 -0
- package/lib/node/NodeUpdateTransaction.cjs +481 -0
- package/lib/node/NodeUpdateTransaction.d.ts +274 -0
- package/lib/node/NodeUpdateTransaction.js +2 -0
- package/lib/node/NodeUpdateTransaction.js.map +1 -0
- package/lib/node/ServiceEndpoint.cjs +140 -0
- package/lib/node/ServiceEndpoint.d.ts +91 -0
- package/lib/node/ServiceEndpoint.js +2 -0
- package/lib/node/ServiceEndpoint.js.map +1 -0
- package/lib/query/CostQuery.cjs +171 -0
- package/lib/query/CostQuery.d.ts +43 -0
- package/lib/query/CostQuery.js +2 -0
- package/lib/query/CostQuery.js.map +1 -0
- package/lib/query/MirrorNodeContractCallQuery.cjs +53 -0
- package/lib/query/MirrorNodeContractCallQuery.d.ts +21 -0
- package/lib/query/MirrorNodeContractCallQuery.js +2 -0
- package/lib/query/MirrorNodeContractCallQuery.js.map +1 -0
- package/lib/query/MirrorNodeContractEstimateQuery.cjs +53 -0
- package/lib/query/MirrorNodeContractEstimateQuery.d.ts +21 -0
- package/lib/query/MirrorNodeContractEstimateQuery.js +2 -0
- package/lib/query/MirrorNodeContractEstimateQuery.js.map +1 -0
- package/lib/query/MirrorNodeContractQuery.cjs +260 -0
- package/lib/query/MirrorNodeContractQuery.d.ts +158 -0
- package/lib/query/MirrorNodeContractQuery.js +2 -0
- package/lib/query/MirrorNodeContractQuery.js.map +1 -0
- package/lib/query/Query.cjs +450 -0
- package/lib/query/Query.d.ts +173 -0
- package/lib/query/Query.js +2 -0
- package/lib/query/Query.js.map +1 -0
- package/lib/query/QueryBase.cjs +114 -0
- package/lib/query/QueryBase.d.ts +43 -0
- package/lib/query/QueryBase.js +2 -0
- package/lib/query/QueryBase.js.map +1 -0
- package/lib/schedule/ScheduleCreateTransaction.cjs +308 -0
- package/lib/schedule/ScheduleCreateTransaction.d.ts +153 -0
- package/lib/schedule/ScheduleCreateTransaction.js +2 -0
- package/lib/schedule/ScheduleCreateTransaction.js.map +1 -0
- package/lib/schedule/ScheduleDeleteTransaction.cjs +146 -0
- package/lib/schedule/ScheduleDeleteTransaction.d.ts +81 -0
- package/lib/schedule/ScheduleDeleteTransaction.js +2 -0
- package/lib/schedule/ScheduleDeleteTransaction.js.map +1 -0
- package/lib/schedule/ScheduleId.cjs +164 -0
- package/lib/schedule/ScheduleId.d.ts +96 -0
- package/lib/schedule/ScheduleId.js +2 -0
- package/lib/schedule/ScheduleId.js.map +1 -0
- package/lib/schedule/ScheduleInfo.cjs +176 -0
- package/lib/schedule/ScheduleInfo.d.ts +93 -0
- package/lib/schedule/ScheduleInfo.js +2 -0
- package/lib/schedule/ScheduleInfo.js.map +1 -0
- package/lib/schedule/ScheduleInfoQuery.cjs +170 -0
- package/lib/schedule/ScheduleInfoQuery.d.ts +66 -0
- package/lib/schedule/ScheduleInfoQuery.js +2 -0
- package/lib/schedule/ScheduleInfoQuery.js.map +1 -0
- package/lib/schedule/ScheduleSignTransaction.cjs +164 -0
- package/lib/schedule/ScheduleSignTransaction.d.ts +110 -0
- package/lib/schedule/ScheduleSignTransaction.js +2 -0
- package/lib/schedule/ScheduleSignTransaction.js.map +1 -0
- package/lib/system/FreezeTransaction.cjs +348 -0
- package/lib/system/FreezeTransaction.d.ts +188 -0
- package/lib/system/FreezeTransaction.js +2 -0
- package/lib/system/FreezeTransaction.js.map +1 -0
- package/lib/system/SystemDeleteTransaction.cjs +200 -0
- package/lib/system/SystemDeleteTransaction.d.ts +110 -0
- package/lib/system/SystemDeleteTransaction.js +2 -0
- package/lib/system/SystemDeleteTransaction.js.map +1 -0
- package/lib/system/SystemUndeleteTransaction.cjs +172 -0
- package/lib/system/SystemUndeleteTransaction.d.ts +97 -0
- package/lib/system/SystemUndeleteTransaction.js +2 -0
- package/lib/system/SystemUndeleteTransaction.js.map +1 -0
- package/lib/token/AbstractTokenTransferTransaction.cjs +406 -0
- package/lib/token/AbstractTokenTransferTransaction.d.ts +138 -0
- package/lib/token/AbstractTokenTransferTransaction.js +2 -0
- package/lib/token/AbstractTokenTransferTransaction.js.map +1 -0
- package/lib/token/AirdropPendingTransaction.cjs +65 -0
- package/lib/token/AirdropPendingTransaction.d.ts +35 -0
- package/lib/token/AirdropPendingTransaction.js +2 -0
- package/lib/token/AirdropPendingTransaction.js.map +1 -0
- package/lib/token/AssessedCustomFee.cjs +177 -0
- package/lib/token/AssessedCustomFee.d.ts +113 -0
- package/lib/token/AssessedCustomFee.js +2 -0
- package/lib/token/AssessedCustomFee.js.map +1 -0
- package/lib/token/CustomFee.cjs +88 -0
- package/lib/token/CustomFee.d.ts +57 -0
- package/lib/token/CustomFee.js +2 -0
- package/lib/token/CustomFee.js.map +1 -0
- package/lib/token/CustomFixedFee.cjs +155 -0
- package/lib/token/CustomFixedFee.d.ts +85 -0
- package/lib/token/CustomFixedFee.js +2 -0
- package/lib/token/CustomFixedFee.js.map +1 -0
- package/lib/token/CustomFractionalFee.cjs +200 -0
- package/lib/token/CustomFractionalFee.d.ts +103 -0
- package/lib/token/CustomFractionalFee.js +2 -0
- package/lib/token/CustomFractionalFee.js.map +1 -0
- package/lib/token/CustomRoyaltyFee.cjs +150 -0
- package/lib/token/CustomRoyaltyFee.d.ts +75 -0
- package/lib/token/CustomRoyaltyFee.js +2 -0
- package/lib/token/CustomRoyaltyFee.js.map +1 -0
- package/lib/token/FeeAssessmentMethod.cjs +58 -0
- package/lib/token/FeeAssessmentMethod.d.ts +29 -0
- package/lib/token/FeeAssessmentMethod.js +2 -0
- package/lib/token/FeeAssessmentMethod.js.map +1 -0
- package/lib/token/NftId.cjs +89 -0
- package/lib/token/NftId.d.ts +46 -0
- package/lib/token/NftId.js +2 -0
- package/lib/token/NftId.js.map +1 -0
- package/lib/token/PendingAirdropId.cjs +152 -0
- package/lib/token/PendingAirdropId.d.ts +81 -0
- package/lib/token/PendingAirdropId.js +2 -0
- package/lib/token/PendingAirdropId.js.map +1 -0
- package/lib/token/PendingAirdropRecord.cjs +55 -0
- package/lib/token/PendingAirdropRecord.d.ts +29 -0
- package/lib/token/PendingAirdropRecord.js +2 -0
- package/lib/token/PendingAirdropRecord.js.map +1 -0
- package/lib/token/TokenAirdropTransaction.cjs +179 -0
- package/lib/token/TokenAirdropTransaction.d.ts +119 -0
- package/lib/token/TokenAirdropTransaction.js +2 -0
- package/lib/token/TokenAirdropTransaction.js.map +1 -0
- package/lib/token/TokenAssociateTransaction.cjs +176 -0
- package/lib/token/TokenAssociateTransaction.d.ts +90 -0
- package/lib/token/TokenAssociateTransaction.js +2 -0
- package/lib/token/TokenAssociateTransaction.js.map +1 -0
- package/lib/token/TokenAssociation.cjs +117 -0
- package/lib/token/TokenAssociation.d.ts +76 -0
- package/lib/token/TokenAssociation.js +2 -0
- package/lib/token/TokenAssociation.js.map +1 -0
- package/lib/token/TokenBurnTransaction.cjs +199 -0
- package/lib/token/TokenBurnTransaction.d.ts +108 -0
- package/lib/token/TokenBurnTransaction.js +2 -0
- package/lib/token/TokenBurnTransaction.js.map +1 -0
- package/lib/token/TokenCancelAirdropTransaction.cjs +109 -0
- package/lib/token/TokenCancelAirdropTransaction.d.ts +50 -0
- package/lib/token/TokenCancelAirdropTransaction.js +2 -0
- package/lib/token/TokenCancelAirdropTransaction.js.map +1 -0
- package/lib/token/TokenClaimAirdropTransaction.cjs +109 -0
- package/lib/token/TokenClaimAirdropTransaction.d.ts +50 -0
- package/lib/token/TokenClaimAirdropTransaction.js +2 -0
- package/lib/token/TokenClaimAirdropTransaction.js.map +1 -0
- package/lib/token/TokenCreateTransaction.cjs +817 -0
- package/lib/token/TokenCreateTransaction.d.ts +446 -0
- package/lib/token/TokenCreateTransaction.js +2 -0
- package/lib/token/TokenCreateTransaction.js.map +1 -0
- package/lib/token/TokenDeleteTransaction.cjs +140 -0
- package/lib/token/TokenDeleteTransaction.d.ts +75 -0
- package/lib/token/TokenDeleteTransaction.js +2 -0
- package/lib/token/TokenDeleteTransaction.js.map +1 -0
- package/lib/token/TokenDissociateTransaction.cjs +176 -0
- package/lib/token/TokenDissociateTransaction.d.ts +90 -0
- package/lib/token/TokenDissociateTransaction.js +2 -0
- package/lib/token/TokenDissociateTransaction.js.map +1 -0
- package/lib/token/TokenFeeScheduleUpdateTransaction.cjs +172 -0
- package/lib/token/TokenFeeScheduleUpdateTransaction.d.ts +93 -0
- package/lib/token/TokenFeeScheduleUpdateTransaction.js +2 -0
- package/lib/token/TokenFeeScheduleUpdateTransaction.js.map +1 -0
- package/lib/token/TokenFreezeTransaction.cjs +172 -0
- package/lib/token/TokenFreezeTransaction.d.ts +90 -0
- package/lib/token/TokenFreezeTransaction.js +2 -0
- package/lib/token/TokenFreezeTransaction.js.map +1 -0
- package/lib/token/TokenGrantKycTransaction.cjs +172 -0
- package/lib/token/TokenGrantKycTransaction.d.ts +90 -0
- package/lib/token/TokenGrantKycTransaction.js +2 -0
- package/lib/token/TokenGrantKycTransaction.js.map +1 -0
- package/lib/token/TokenId.cjs +185 -0
- package/lib/token/TokenId.d.ts +103 -0
- package/lib/token/TokenId.js +2 -0
- package/lib/token/TokenId.js.map +1 -0
- package/lib/token/TokenInfo.cjs +349 -0
- package/lib/token/TokenInfo.d.ts +224 -0
- package/lib/token/TokenInfo.js +2 -0
- package/lib/token/TokenInfo.js.map +1 -0
- package/lib/token/TokenInfoQuery.cjs +170 -0
- package/lib/token/TokenInfoQuery.d.ts +67 -0
- package/lib/token/TokenInfoQuery.js +2 -0
- package/lib/token/TokenInfoQuery.js.map +1 -0
- package/lib/token/TokenKeyValidation.cjs +73 -0
- package/lib/token/TokenKeyValidation.d.ts +39 -0
- package/lib/token/TokenKeyValidation.js +2 -0
- package/lib/token/TokenKeyValidation.js.map +1 -0
- package/lib/token/TokenMintTransaction.cjs +219 -0
- package/lib/token/TokenMintTransaction.d.ts +113 -0
- package/lib/token/TokenMintTransaction.js +2 -0
- package/lib/token/TokenMintTransaction.js.map +1 -0
- package/lib/token/TokenNftInfo.cjs +127 -0
- package/lib/token/TokenNftInfo.d.ts +96 -0
- package/lib/token/TokenNftInfo.js +2 -0
- package/lib/token/TokenNftInfo.js.map +1 -0
- package/lib/token/TokenNftInfoQuery.cjs +312 -0
- package/lib/token/TokenNftInfoQuery.d.ts +149 -0
- package/lib/token/TokenNftInfoQuery.js +2 -0
- package/lib/token/TokenNftInfoQuery.js.map +1 -0
- package/lib/token/TokenNftTransfer.cjs +95 -0
- package/lib/token/TokenNftTransfer.d.ts +70 -0
- package/lib/token/TokenNftTransfer.js +2 -0
- package/lib/token/TokenNftTransfer.js.map +1 -0
- package/lib/token/TokenNftsUpdateTransaction.cjs +185 -0
- package/lib/token/TokenNftsUpdateTransaction.d.ts +97 -0
- package/lib/token/TokenPauseTransaction.cjs +140 -0
- package/lib/token/TokenPauseTransaction.d.ts +75 -0
- package/lib/token/TokenPauseTransaction.js +2 -0
- package/lib/token/TokenPauseTransaction.js.map +1 -0
- package/lib/token/TokenReference.cjs +41 -0
- package/lib/token/TokenReference.d.ts +29 -0
- package/lib/token/TokenReference.js +2 -0
- package/lib/token/TokenReference.js.map +1 -0
- package/lib/token/TokenRejectFlow.cjs +248 -0
- package/lib/token/TokenRejectFlow.d.ts +141 -0
- package/lib/token/TokenRejectFlow.js +2 -0
- package/lib/token/TokenRejectFlow.js.map +1 -0
- package/lib/token/TokenRejectTransaction.cjs +240 -0
- package/lib/token/TokenRejectTransaction.d.ts +120 -0
- package/lib/token/TokenRejectTransaction.js +2 -0
- package/lib/token/TokenRejectTransaction.js.map +1 -0
- package/lib/token/TokenRevokeKycTransaction.cjs +172 -0
- package/lib/token/TokenRevokeKycTransaction.d.ts +90 -0
- package/lib/token/TokenRevokeKycTransaction.js +2 -0
- package/lib/token/TokenRevokeKycTransaction.js.map +1 -0
- package/lib/token/TokenSupplyType.cjs +77 -0
- package/lib/token/TokenSupplyType.d.ts +38 -0
- package/lib/token/TokenSupplyType.js +2 -0
- package/lib/token/TokenSupplyType.js.map +1 -0
- package/lib/token/TokenTransfer.cjs +122 -0
- package/lib/token/TokenTransfer.d.ts +92 -0
- package/lib/token/TokenTransfer.js +2 -0
- package/lib/token/TokenTransfer.js.map +1 -0
- package/lib/token/TokenType.cjs +77 -0
- package/lib/token/TokenType.d.ts +38 -0
- package/lib/token/TokenType.js +2 -0
- package/lib/token/TokenType.js.map +1 -0
- package/lib/token/TokenUnfreezeTransaction.cjs +172 -0
- package/lib/token/TokenUnfreezeTransaction.d.ts +90 -0
- package/lib/token/TokenUnfreezeTransaction.js +2 -0
- package/lib/token/TokenUnfreezeTransaction.js.map +1 -0
- package/lib/token/TokenUnpauseTransaction.cjs +140 -0
- package/lib/token/TokenUnpauseTransaction.d.ts +75 -0
- package/lib/token/TokenUnpauseTransaction.js +2 -0
- package/lib/token/TokenUnpauseTransaction.js.map +1 -0
- package/lib/token/TokenUpdateNftsTransaction.cjs +189 -0
- package/lib/token/TokenUpdateNftsTransaction.d.ts +103 -0
- package/lib/token/TokenUpdateNftsTransaction.js +2 -0
- package/lib/token/TokenUpdateNftsTransaction.js.map +1 -0
- package/lib/token/TokenUpdateTransaction.cjs +672 -0
- package/lib/token/TokenUpdateTransaction.d.ts +366 -0
- package/lib/token/TokenUpdateTransaction.js +2 -0
- package/lib/token/TokenUpdateTransaction.js.map +1 -0
- package/lib/token/TokenWipeTransaction.cjs +231 -0
- package/lib/token/TokenWipeTransaction.d.ts +123 -0
- package/lib/token/TokenWipeTransaction.js +2 -0
- package/lib/token/TokenWipeTransaction.js.map +1 -0
- package/lib/topic/SubscriptionHandle.cjs +40 -0
- package/lib/topic/SubscriptionHandle.d.ts +22 -0
- package/lib/topic/SubscriptionHandle.js +2 -0
- package/lib/topic/SubscriptionHandle.js.map +1 -0
- package/lib/topic/TopicCreateTransaction.cjs +473 -0
- package/lib/topic/TopicCreateTransaction.d.ts +250 -0
- package/lib/topic/TopicCreateTransaction.js +2 -0
- package/lib/topic/TopicCreateTransaction.js.map +1 -0
- package/lib/topic/TopicDeleteTransaction.cjs +146 -0
- package/lib/topic/TopicDeleteTransaction.d.ts +80 -0
- package/lib/topic/TopicDeleteTransaction.js +2 -0
- package/lib/topic/TopicDeleteTransaction.js.map +1 -0
- package/lib/topic/TopicId.cjs +185 -0
- package/lib/topic/TopicId.d.ts +102 -0
- package/lib/topic/TopicId.js +2 -0
- package/lib/topic/TopicId.js.map +1 -0
- package/lib/topic/TopicInfo.cjs +187 -0
- package/lib/topic/TopicInfo.d.ts +119 -0
- package/lib/topic/TopicInfo.js +2 -0
- package/lib/topic/TopicInfo.js.map +1 -0
- package/lib/topic/TopicInfoQuery.cjs +174 -0
- package/lib/topic/TopicInfoQuery.d.ts +81 -0
- package/lib/topic/TopicInfoQuery.js +2 -0
- package/lib/topic/TopicInfoQuery.js.map +1 -0
- package/lib/topic/TopicMessage.cjs +116 -0
- package/lib/topic/TopicMessage.d.ts +65 -0
- package/lib/topic/TopicMessage.js +2 -0
- package/lib/topic/TopicMessage.js.map +1 -0
- package/lib/topic/TopicMessageChunk.cjs +71 -0
- package/lib/topic/TopicMessageChunk.d.ts +56 -0
- package/lib/topic/TopicMessageChunk.js +2 -0
- package/lib/topic/TopicMessageChunk.js.map +1 -0
- package/lib/topic/TopicMessageQuery.cjs +450 -0
- package/lib/topic/TopicMessageQuery.d.ts +220 -0
- package/lib/topic/TopicMessageQuery.js +2 -0
- package/lib/topic/TopicMessageQuery.js.map +1 -0
- package/lib/topic/TopicMessageSubmitTransaction.cjs +412 -0
- package/lib/topic/TopicMessageSubmitTransaction.d.ts +201 -0
- package/lib/topic/TopicMessageSubmitTransaction.js +2 -0
- package/lib/topic/TopicMessageSubmitTransaction.js.map +1 -0
- package/lib/topic/TopicUpdateTransaction.cjs +532 -0
- package/lib/topic/TopicUpdateTransaction.d.ts +284 -0
- package/lib/topic/TopicUpdateTransaction.js +2 -0
- package/lib/topic/TopicUpdateTransaction.js.map +1 -0
- package/lib/transaction/BatchTransaction.cjs +262 -0
- package/lib/transaction/BatchTransaction.d.ts +134 -0
- package/lib/transaction/BatchTransaction.js +2 -0
- package/lib/transaction/BatchTransaction.js.map +1 -0
- package/lib/transaction/CustomFeeLimit.cjs +116 -0
- package/lib/transaction/CustomFeeLimit.d.ts +64 -0
- package/lib/transaction/CustomFeeLimit.js +2 -0
- package/lib/transaction/CustomFeeLimit.js.map +1 -0
- package/lib/transaction/List.cjs +177 -0
- package/lib/transaction/List.d.ts +100 -0
- package/lib/transaction/List.js +2 -0
- package/lib/transaction/List.js.map +1 -0
- package/lib/transaction/NodeAccountIdSignatureMap.cjs +62 -0
- package/lib/transaction/NodeAccountIdSignatureMap.d.ts +23 -0
- package/lib/transaction/NodeAccountIdSignatureMap.js +2 -0
- package/lib/transaction/NodeAccountIdSignatureMap.js.map +1 -0
- package/lib/transaction/NodeAccountIdSignatureMapLegacy.cjs +39 -0
- package/lib/transaction/NodeAccountIdSignatureMapLegacy.d.ts +14 -0
- package/lib/transaction/NodeAccountIdSignatureMapLegacy.js +2 -0
- package/lib/transaction/NodeAccountIdSignatureMapLegacy.js.map +1 -0
- package/lib/transaction/SignableNodeTransactionBodyBytes.cjs +47 -0
- package/lib/transaction/SignableNodeTransactionBodyBytes.d.ts +38 -0
- package/lib/transaction/SignableNodeTransactionBodyBytes.js +2 -0
- package/lib/transaction/SignableNodeTransactionBodyBytes.js.map +1 -0
- package/lib/transaction/SignatureMap.cjs +95 -0
- package/lib/transaction/SignatureMap.d.ts +42 -0
- package/lib/transaction/SignatureMap.js +2 -0
- package/lib/transaction/SignatureMap.js.map +1 -0
- package/lib/transaction/SignatureMapLegacy.cjs +37 -0
- package/lib/transaction/SignatureMapLegacy.d.ts +15 -0
- package/lib/transaction/SignatureMapLegacy.js +2 -0
- package/lib/transaction/SignatureMapLegacy.js.map +1 -0
- package/lib/transaction/SignaturePairMap.cjs +50 -0
- package/lib/transaction/SignaturePairMap.d.ts +21 -0
- package/lib/transaction/SignaturePairMap.js +2 -0
- package/lib/transaction/SignaturePairMap.js.map +1 -0
- package/lib/transaction/TokenTransfer.cjs +2 -0
- package/lib/transaction/TokenTransfer.d.ts +0 -0
- package/lib/transaction/Transaction.cjs +1959 -0
- package/lib/transaction/Transaction.d.ts +698 -0
- package/lib/transaction/Transaction.js +2 -0
- package/lib/transaction/Transaction.js.map +1 -0
- package/lib/transaction/TransactionHashMap.cjs +44 -0
- package/lib/transaction/TransactionHashMap.d.ts +22 -0
- package/lib/transaction/TransactionHashMap.js +2 -0
- package/lib/transaction/TransactionHashMap.js.map +1 -0
- package/lib/transaction/TransactionId.cjs +224 -0
- package/lib/transaction/TransactionId.d.ts +122 -0
- package/lib/transaction/TransactionId.js +2 -0
- package/lib/transaction/TransactionId.js.map +1 -0
- package/lib/transaction/TransactionReceipt.cjs +303 -0
- package/lib/transaction/TransactionReceipt.d.ts +202 -0
- package/lib/transaction/TransactionReceipt.js +2 -0
- package/lib/transaction/TransactionReceipt.js.map +1 -0
- package/lib/transaction/TransactionReceiptQuery.cjs +347 -0
- package/lib/transaction/TransactionReceiptQuery.d.ts +96 -0
- package/lib/transaction/TransactionReceiptQuery.js +2 -0
- package/lib/transaction/TransactionReceiptQuery.js.map +1 -0
- package/lib/transaction/TransactionRecord.cjs +470 -0
- package/lib/transaction/TransactionRecord.d.ts +317 -0
- package/lib/transaction/TransactionRecord.js +2 -0
- package/lib/transaction/TransactionRecord.js.map +1 -0
- package/lib/transaction/TransactionRecordQuery.cjs +366 -0
- package/lib/transaction/TransactionRecordQuery.d.ts +99 -0
- package/lib/transaction/TransactionRecordQuery.js +2 -0
- package/lib/transaction/TransactionRecordQuery.js.map +1 -0
- package/lib/transaction/TransactionResponse.cjs +242 -0
- package/lib/transaction/TransactionResponse.d.ts +119 -0
- package/lib/transaction/TransactionResponse.js +2 -0
- package/lib/transaction/TransactionResponse.js.map +1 -0
- package/lib/util/ASN1-Decoder.cjs +276 -0
- package/lib/util/ASN1-Decoder.d.ts +104 -0
- package/lib/util/ASN1-Decoder.js +2 -0
- package/lib/util/ASN1-Decoder.js.map +1 -0
- package/lib/util.cjs +464 -0
- package/lib/util.d.ts +210 -0
- package/lib/util.js +2 -0
- package/lib/util.js.map +1 -0
- package/lib/version.cjs +8 -0
- package/lib/version.d.ts +2 -0
- package/lib/version.js +2 -0
- package/lib/version.js.map +1 -0
- package/package.json +139 -0
- package/src/BadEntityIdError.js +24 -0
- package/src/Cache.js +418 -0
- package/src/Duration.js +48 -0
- package/src/EntityIdHelper.js +620 -0
- package/src/EthereumFlow.js +244 -0
- package/src/EthereumTransaction.js +298 -0
- package/src/EthereumTransactionData.js +60 -0
- package/src/EthereumTransactionDataEip1559.js +146 -0
- package/src/EthereumTransactionDataEip2930.js +140 -0
- package/src/EthereumTransactionDataLegacy.js +121 -0
- package/src/EvmAddress.js +78 -0
- package/src/ExchangeRate.js +117 -0
- package/src/ExchangeRates.js +71 -0
- package/src/Executable.js +884 -0
- package/src/FeeComponents.js +199 -0
- package/src/FeeData.js +127 -0
- package/src/FeeDataType.js +125 -0
- package/src/FeeSchedule.js +88 -0
- package/src/FeeSchedules.js +82 -0
- package/src/FreezeType.js +113 -0
- package/src/Hbar.js +147 -0
- package/src/HbarUnit.js +90 -0
- package/src/Key.js +60 -0
- package/src/KeyList.js +179 -0
- package/src/LedgerId.js +134 -0
- package/src/LocalProvider.js +165 -0
- package/src/ManagedNode.js +269 -0
- package/src/ManagedNodeAddress.js +101 -0
- package/src/MaxAttemptsOrTimeoutError.js +42 -0
- package/src/MaxQueryPaymentExceeded.js +28 -0
- package/src/MirrorNode.js +41 -0
- package/src/Mnemonic.js +250 -0
- package/src/Node.js +106 -0
- package/src/ObjectMap.js +137 -0
- package/src/PrecheckStatusError.js +73 -0
- package/src/PrivateKey.js +547 -0
- package/src/PrngTransaction.js +152 -0
- package/src/Provider.js +40 -0
- package/src/PublicKey.js +294 -0
- package/src/ReceiptStatusError.js +41 -0
- package/src/RecordStatusError.js +30 -0
- package/src/RequestType.js +920 -0
- package/src/Signer.js +46 -0
- package/src/SignerSignature.js +27 -0
- package/src/StakingInfo.js +187 -0
- package/src/Status.js +3353 -0
- package/src/StatusError.js +64 -0
- package/src/Timestamp.js +160 -0
- package/src/TransactionFeeSchedule.js +100 -0
- package/src/Transfer.js +113 -0
- package/src/Wallet.js +300 -0
- package/src/account/AccountAllowanceAdjustTransaction.js +540 -0
- package/src/account/AccountAllowanceApproveTransaction.js +569 -0
- package/src/account/AccountAllowanceDeleteTransaction.js +199 -0
- package/src/account/AccountBalance.js +160 -0
- package/src/account/AccountBalanceQuery.js +238 -0
- package/src/account/AccountCreateTransaction.js +674 -0
- package/src/account/AccountDeleteTransaction.js +221 -0
- package/src/account/AccountId.js +486 -0
- package/src/account/AccountInfo.js +433 -0
- package/src/account/AccountInfoFlow.js +106 -0
- package/src/account/AccountInfoQuery.js +187 -0
- package/src/account/AccountRecordsQuery.js +186 -0
- package/src/account/AccountUpdateTransaction.js +634 -0
- package/src/account/HbarAllowance.js +147 -0
- package/src/account/HbarTransferMap.js +48 -0
- package/src/account/LiveHash.js +79 -0
- package/src/account/LiveHashAddTransaction.js +289 -0
- package/src/account/LiveHashDeleteTransaction.js +196 -0
- package/src/account/LiveHashQuery.js +209 -0
- package/src/account/NullableTokenDecimalMap.js +19 -0
- package/src/account/ProxyStaker.js +74 -0
- package/src/account/TokenAllowance.js +152 -0
- package/src/account/TokenBalanceMap.js +23 -0
- package/src/account/TokenDecimalMap.js +19 -0
- package/src/account/TokenNftAllowance.js +217 -0
- package/src/account/TokenNftTransferMap.js +134 -0
- package/src/account/TokenRelationship.js +125 -0
- package/src/account/TokenRelationshipMap.js +59 -0
- package/src/account/TokenTransferAccountMap.js +24 -0
- package/src/account/TokenTransferMap.js +99 -0
- package/src/account/TransferTransaction.js +372 -0
- package/src/address_book/AddressBooks.js +27 -0
- package/src/address_book/Endpoint.js +141 -0
- package/src/address_book/IPv4Address.js +125 -0
- package/src/address_book/IPv4AddressPart.js +71 -0
- package/src/address_book/NodeAddress.js +319 -0
- package/src/address_book/NodeAddressBook.js +114 -0
- package/src/array.js +60 -0
- package/src/base32.js +29 -0
- package/src/browser.js +10 -0
- package/src/channel/Channel.js +340 -0
- package/src/channel/MirrorChannel.js +49 -0
- package/src/channel/NativeChannel.js +120 -0
- package/src/channel/NodeChannel.js +196 -0
- package/src/channel/NodeMirrorChannel.js +91 -0
- package/src/channel/WebChannel.js +100 -0
- package/src/client/Client.js +871 -0
- package/src/client/ManagedNetwork.js +473 -0
- package/src/client/MirrorNetwork.js +87 -0
- package/src/client/NativeClient.js +218 -0
- package/src/client/Network.js +304 -0
- package/src/client/NodeClient.js +321 -0
- package/src/client/WebClient.js +302 -0
- package/src/client/addressbooks/mainnet.js +2 -0
- package/src/client/addressbooks/previewnet.js +2 -0
- package/src/client/addressbooks/testnet.js +2 -0
- package/src/constants/ClientConstants.js +204 -0
- package/src/contract/ContractByteCodeQuery.js +178 -0
- package/src/contract/ContractCallQuery.js +382 -0
- package/src/contract/ContractCreateFlow.js +551 -0
- package/src/contract/ContractCreateTransaction.js +677 -0
- package/src/contract/ContractDeleteTransaction.js +291 -0
- package/src/contract/ContractExecuteTransaction.js +313 -0
- package/src/contract/ContractFunctionParameters.js +1759 -0
- package/src/contract/ContractFunctionResult.js +1060 -0
- package/src/contract/ContractFunctionSelector.js +1360 -0
- package/src/contract/ContractId.js +316 -0
- package/src/contract/ContractInfo.js +264 -0
- package/src/contract/ContractInfoQuery.js +190 -0
- package/src/contract/ContractLogInfo.js +83 -0
- package/src/contract/ContractNonceInfo.js +129 -0
- package/src/contract/ContractStateChange.js +77 -0
- package/src/contract/ContractUpdateTransaction.js +665 -0
- package/src/contract/DelegateContractId.js +94 -0
- package/src/contract/StorageChange.js +71 -0
- package/src/cryptography/keccak.js +419 -0
- package/src/cryptography/sha384.browser.js +13 -0
- package/src/cryptography/sha384.js +20 -0
- package/src/cryptography/sha384.native.js +19 -0
- package/src/encoding/base64.native.js +19 -0
- package/src/encoding/hex.browser.js +95 -0
- package/src/encoding/hex.js +76 -0
- package/src/encoding/hex.native.js +386 -0
- package/src/encoding/utf8.browser.js +19 -0
- package/src/encoding/utf8.js +17 -0
- package/src/encoding/utf8.native.js +20 -0
- package/src/exports.js +213 -0
- package/src/file/FileAppendTransaction.js +586 -0
- package/src/file/FileContentsQuery.js +174 -0
- package/src/file/FileCreateTransaction.js +301 -0
- package/src/file/FileDeleteTransaction.js +167 -0
- package/src/file/FileId.js +247 -0
- package/src/file/FileInfo.js +136 -0
- package/src/file/FileInfoQuery.js +186 -0
- package/src/file/FileUpdateTransaction.js +375 -0
- package/src/grpc/GrpcServiceError.js +64 -0
- package/src/grpc/GrpcStatus.js +142 -0
- package/src/http/HttpError.js +26 -0
- package/src/http/HttpStatus.js +38 -0
- package/src/index.js +11 -0
- package/src/logger/LogLevel.js +72 -0
- package/src/logger/Logger.js +225 -0
- package/src/long.js +20 -0
- package/src/native.js +10 -0
- package/src/network/AddressBookQuery.js +272 -0
- package/src/network/AddressBookQueryWeb.js +388 -0
- package/src/network/NetworkVersionInfo.js +81 -0
- package/src/network/NetworkVersionInfoQuery.js +117 -0
- package/src/network/SemanticVersion.js +74 -0
- package/src/node/NodeCreateTransaction.js +513 -0
- package/src/node/NodeDeleteTransaction.js +161 -0
- package/src/node/NodeUpdateTransaction.js +592 -0
- package/src/node/ServiceEndpoint.js +145 -0
- package/src/query/CostQuery.js +187 -0
- package/src/query/MirrorNodeContractCallQuery.js +49 -0
- package/src/query/MirrorNodeContractEstimateQuery.js +48 -0
- package/src/query/MirrorNodeContractQuery.js +266 -0
- package/src/query/Query.js +527 -0
- package/src/query/QueryBase.js +116 -0
- package/src/schedule/ScheduleCreateTransaction.js +371 -0
- package/src/schedule/ScheduleDeleteTransaction.js +174 -0
- package/src/schedule/ScheduleId.js +173 -0
- package/src/schedule/ScheduleInfo.js +243 -0
- package/src/schedule/ScheduleInfoQuery.js +189 -0
- package/src/schedule/ScheduleSignTransaction.js +189 -0
- package/src/system/FreezeTransaction.js +390 -0
- package/src/system/SystemDeleteTransaction.js +239 -0
- package/src/system/SystemUndeleteTransaction.js +207 -0
- package/src/token/AbstractTokenTransferTransaction.js +589 -0
- package/src/token/AirdropPendingTransaction.js +58 -0
- package/src/token/AssessedCustomFee.js +198 -0
- package/src/token/CustomFee.js +87 -0
- package/src/token/CustomFixedFee.js +178 -0
- package/src/token/CustomFractionalFee.js +226 -0
- package/src/token/CustomRoyaltyFee.js +173 -0
- package/src/token/FeeAssessmentMethod.js +53 -0
- package/src/token/NftId.js +95 -0
- package/src/token/PendingAirdropId.js +157 -0
- package/src/token/PendingAirdropRecord.js +50 -0
- package/src/token/TokenAirdropTransaction.js +220 -0
- package/src/token/TokenAssociateTransaction.js +214 -0
- package/src/token/TokenAssociation.js +127 -0
- package/src/token/TokenBurnTransaction.js +229 -0
- package/src/token/TokenCancelAirdropTransaction.js +120 -0
- package/src/token/TokenClaimAirdropTransaction.js +121 -0
- package/src/token/TokenCreateTransaction.js +978 -0
- package/src/token/TokenDeleteTransaction.js +161 -0
- package/src/token/TokenDissociateTransaction.js +214 -0
- package/src/token/TokenFeeScheduleUpdateTransaction.js +198 -0
- package/src/token/TokenFreezeTransaction.js +203 -0
- package/src/token/TokenGrantKycTransaction.js +203 -0
- package/src/token/TokenId.js +203 -0
- package/src/token/TokenInfo.js +454 -0
- package/src/token/TokenInfoQuery.js +185 -0
- package/src/token/TokenKeyValidation.js +70 -0
- package/src/token/TokenMintTransaction.js +258 -0
- package/src/token/TokenNftInfo.js +135 -0
- package/src/token/TokenNftInfoQuery.js +369 -0
- package/src/token/TokenNftTransfer.js +115 -0
- package/src/token/TokenNftsUpdateTransaction.js +220 -0
- package/src/token/TokenPauseTransaction.js +161 -0
- package/src/token/TokenReference.js +40 -0
- package/src/token/TokenRejectFlow.js +261 -0
- package/src/token/TokenRejectTransaction.js +262 -0
- package/src/token/TokenRevokeKycTransaction.js +203 -0
- package/src/token/TokenSupplyType.js +74 -0
- package/src/token/TokenTransfer.js +142 -0
- package/src/token/TokenType.js +74 -0
- package/src/token/TokenUnfreezeTransaction.js +203 -0
- package/src/token/TokenUnpauseTransaction.js +161 -0
- package/src/token/TokenUpdateNftsTransaction.js +225 -0
- package/src/token/TokenUpdateTransaction.js +827 -0
- package/src/token/TokenWipeTransaction.js +271 -0
- package/src/topic/SubscriptionHandle.js +34 -0
- package/src/topic/TopicCreateTransaction.js +557 -0
- package/src/topic/TopicDeleteTransaction.js +167 -0
- package/src/topic/TopicId.js +204 -0
- package/src/topic/TopicInfo.js +254 -0
- package/src/topic/TopicInfoQuery.js +190 -0
- package/src/topic/TopicMessage.js +170 -0
- package/src/topic/TopicMessageChunk.js +76 -0
- package/src/topic/TopicMessageQuery.js +523 -0
- package/src/topic/TopicMessageSubmitTransaction.js +488 -0
- package/src/topic/TopicUpdateTransaction.js +659 -0
- package/src/transaction/BatchTransaction.js +293 -0
- package/src/transaction/CustomFeeLimit.js +121 -0
- package/src/transaction/List.js +175 -0
- package/src/transaction/NodeAccountIdSignatureMap.js +62 -0
- package/src/transaction/NodeAccountIdSignatureMapLegacy.js +41 -0
- package/src/transaction/SignableNodeTransactionBodyBytes.js +40 -0
- package/src/transaction/SignatureMap.js +104 -0
- package/src/transaction/SignatureMapLegacy.js +37 -0
- package/src/transaction/SignaturePairMap.js +53 -0
- package/src/transaction/TokenTransfer.js +1 -0
- package/src/transaction/Transaction.js +2295 -0
- package/src/transaction/TransactionHashMap.js +41 -0
- package/src/transaction/TransactionId.js +262 -0
- package/src/transaction/TransactionReceipt.js +414 -0
- package/src/transaction/TransactionReceiptQuery.js +418 -0
- package/src/transaction/TransactionRecord.js +638 -0
- package/src/transaction/TransactionRecordQuery.js +440 -0
- package/src/transaction/TransactionResponse.js +283 -0
- package/src/types.d.ts +5 -0
- package/src/util/ASN1-Decoder.js +256 -0
- package/src/util.js +479 -0
- package/src/version.js +3 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Query.js","sources":["../../src/query/Query.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Status from \"../Status.js\";\nimport AccountId from \"../account/AccountId.js\";\nimport Hbar from \"../Hbar.js\";\nimport { ExecutionState } from \"../Executable.js\";\nimport TransactionId from \"../transaction/TransactionId.js\";\nimport * as HieroProto from \"@hashgraph/proto\";\nimport PrecheckStatusError from \"../PrecheckStatusError.js\";\nimport MaxQueryPaymentExceeded from \"../MaxQueryPaymentExceeded.js\";\nimport QueryBase from \"./QueryBase.js\";\nimport CostQuery from \"./CostQuery.js\";\n\n/**\n * @typedef {import(\"../channel/Channel.js\").default} Channel\n * @typedef {import(\"../channel/MirrorChannel.js\").default} MirrorChannel\n * @typedef {import(\"../PublicKey.js\").default} PublicKey\n * @typedef {import(\"../client/Client.js\").ClientOperator} ClientOperator\n * @typedef {import(\"../client/Client.js\").default<*, *>} Client\n * @typedef {import(\"../logger/Logger.js\").default} Logger\n */\n\n/**\n * This registry holds a bunch of callbacks for `fromProtobuf()` implementations\n * Since this is essentially aa cache, perhaps we should move this variable into the `Cache`\n * type for consistency?\n *\n * @type {Map<HieroProto.proto.Query[\"query\"], (query: HieroProto.proto.IQuery) => Query<*>>}\n */\nexport const QUERY_REGISTRY = new Map();\n\n/**\n * Base class for all queries that can be submitted to Hedera.\n *\n * @abstract\n * @template OutputT\n * @augments {QueryBase<HieroProto.proto.IQuery, HieroProto.proto.IResponse, OutputT>}\n */\nexport default class Query extends QueryBase {\n constructor() {\n super();\n\n /**\n * The payment transaction ID\n *\n * @type {?TransactionId}\n */\n this._paymentTransactionId = null;\n\n /**\n * The payment transactions list where each index points to a different node\n *\n * @type {HieroProto.proto.ITransaction[]}\n */\n this._paymentTransactions = [];\n\n /**\n * The amount being paid to the node for this query.\n * A user can set this field explicitly, or we'll query the value during execution.\n *\n * @type {?Hbar}\n */\n this._queryPayment = null;\n\n /**\n * The maximum query payment a user is willing to pay. Unlike `Transaction.maxTransactionFee`\n * this field only exists in the SDK; there is no protobuf field equivalent. If and when\n * we query the actual cost of the query and the cost is greater than the max query payment\n * we'll throw a `MaxQueryPaymentExceeded` error.\n *\n * @type {?Hbar}\n */\n this._maxQueryPayment = null;\n\n /**\n * This is strictly used for `_getLogId()` which requires a timestamp. The timestamp it typically\n * uses comes from the payment transaction ID, but that field is not set if this query is free.\n * For those occasions we use this timestamp field generated at query construction instead.\n *\n * @type {number}\n */\n this._timestamp = Date.now();\n }\n\n /**\n * Deserialize a query from bytes. The bytes should be a `proto.Query`.\n *\n * @template T\n * @param {Uint8Array} bytes\n * @returns {Query<T>}\n */\n static fromBytes(bytes) {\n const query = HieroProto.proto.Query.decode(bytes);\n\n if (query.query == null) {\n throw new Error(\"(BUG) query.query was not set in the protobuf\");\n }\n\n const fromProtobuf =\n /** @type {(query: HieroProto.proto.IQuery) => Query<T>} */ (\n QUERY_REGISTRY.get(query.query)\n );\n\n if (fromProtobuf == null) {\n throw new Error(\n `(BUG) Query.fromBytes() not implemented for type ${query.query}`,\n );\n }\n\n return fromProtobuf(query);\n }\n\n /**\n * Serialize the query into bytes.\n *\n * **NOTE**: Does not preserve payment transactions\n *\n * @returns {Uint8Array}\n */\n toBytes() {\n return HieroProto.proto.Query.encode(this._makeRequest()).finish();\n }\n\n /**\n * Set an explicit payment amount for this query.\n *\n * The client will submit exactly this amount for the payment of this query. Hedera\n * will not return any remainder.\n *\n * @param {Hbar} queryPayment\n * @returns {this}\n */\n setQueryPayment(queryPayment) {\n this._queryPayment = queryPayment;\n\n return this;\n }\n\n /**\n * Set the maximum payment allowable for this query.\n *\n * @param {Hbar} maxQueryPayment\n * @returns {this}\n */\n setMaxQueryPayment(maxQueryPayment) {\n this._maxQueryPayment = maxQueryPayment;\n\n return this;\n }\n\n /**\n * Fetch the cost of this query from a consensus node\n *\n * @param {import(\"../client/Client.js\").default<Channel, *>} client\n * @returns {Promise<Hbar>}\n */\n async getCost(client) {\n // The node account IDs must be set to execute a cost query\n if (this._nodeAccountIds.isEmpty) {\n this._nodeAccountIds.setList(\n client._network.getNodeAccountIdsForExecute(),\n );\n }\n\n // Change the timestamp. Should we be doing this?\n this._timestamp = Date.now();\n const cost = await new CostQuery(this).execute(client);\n return Hbar.fromTinybars(\n cost._valueInTinybar.multipliedBy(1.1).toFixed(0),\n );\n }\n\n /**\n * Set he payment transaction explicitly\n *\n * @param {TransactionId} paymentTransactionId\n * @returns {this}\n */\n setPaymentTransactionId(paymentTransactionId) {\n this._paymentTransactionId = paymentTransactionId;\n return this;\n }\n\n /**\n * Get the payment transaction ID\n *\n * @returns {?TransactionId}\n */\n get paymentTransactionId() {\n return this._paymentTransactionId;\n }\n\n /**\n * Get the current transaction ID, and make sure it's not null\n *\n * @returns {TransactionId}\n */\n _getTransactionId() {\n if (this._paymentTransactionId == null) {\n throw new Error(\n \"Query.PaymentTransactionId was not set duration execution\",\n );\n }\n\n return this._paymentTransactionId;\n }\n\n /**\n * Is payment required for this query. By default most queries require payment\n * so the default implementation returns true.\n *\n * @protected\n * @returns {boolean}\n */\n _isPaymentRequired() {\n return true;\n }\n\n /**\n * Validate checksums of the query.\n *\n * @param {Client} client\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-function\n _validateChecksums(client) {\n // Shouldn't we be checking `paymentTransactionId` here sine it contains an `accountId`?\n // Do nothing\n }\n\n /**\n * Before we proceed exeuction, we need to do a couple checks\n *\n * @template {MirrorChannel} MirrorChannelT\n * @param {import(\"../client/Client.js\").default<Channel, MirrorChannelT>} client\n * @returns {Promise<void>}\n */\n async _beforeExecute(client) {\n // If we're executing this query multiple times the the payment transaction ID list\n // will already be set\n if (this._paymentTransactions.length > 0) {\n return;\n }\n\n // Check checksums if enabled\n if (client.isAutoValidateChecksumsEnabled()) {\n this._validateChecksums(client);\n }\n\n // If the nodes aren't set, set them.\n if (this._nodeAccountIds.isEmpty) {\n this._nodeAccountIds.setList(\n client._network.getNodeAccountIdsForExecute(),\n );\n }\n\n // Save the operator\n this._operator =\n this._operator != null ? this._operator : client._operator;\n\n // And payment is required\n if (this._isPaymentRequired()) {\n // Assign the account IDs to which the transaction should be sent.\n this.transactionNodeIds = Object.values(client.network).map(\n (accountNodeId) => accountNodeId.toString(),\n );\n\n // And the client has an operator\n if (this._operator != null) {\n // Generate the payment transaction ID\n this._paymentTransactionId = TransactionId.generate(\n this._operator.accountId,\n );\n } else {\n // If payment is required, but an operator did not exist, throw an error\n throw new Error(\n \"`client` must have an `operator` or an explicit payment transaction must be provided\",\n );\n }\n } else {\n // If the payment transaction ID is not set, but this query doesn't require a payment\n // set the payment transaction ID to an empty transaction ID.\n // FIXME: Should use `TransactionId.withValidStart()` instead\n this._paymentTransactionId = TransactionId.generate(\n new AccountId(0),\n );\n }\n\n let cost = new Hbar(0);\n\n const maxQueryPayment =\n this._maxQueryPayment != null\n ? this._maxQueryPayment\n : client.defaultMaxQueryPayment;\n\n if (this._queryPayment != null) {\n cost = this._queryPayment;\n } else if (\n this._paymentTransactions.length === 0 &&\n this._isPaymentRequired()\n ) {\n // If the query payment was not explictly set, fetch the actual cost.\n const actualCost = await this.getCost(client);\n\n // Confirm it's less than max query payment\n if (\n maxQueryPayment.toTinybars().toInt() <\n actualCost.toTinybars().toInt()\n ) {\n throw new MaxQueryPaymentExceeded(actualCost, maxQueryPayment);\n }\n\n cost = actualCost;\n if (this._logger) {\n this._logger.debug(\n `[${this._getLogId()}] received cost for query ${cost.toString()}`,\n );\n }\n }\n\n // Set the either queried cost, or the original value back into `queryPayment`\n // in case a user executes same query multiple times. However, users should\n // really not be executing the same query multiple times meaning this is\n // typically not needed.\n this._queryPayment = cost;\n\n // Not sure if we should be overwritting this field tbh.\n this._timestamp = Date.now();\n\n this._nodeAccountIds.setLocked();\n\n // Generate the payment transactions\n for (const nodeId of this._nodeAccountIds.list) {\n const logId = this._getLogId();\n const paymentTransactionId =\n /** @type {import(\"../transaction/TransactionId.js\").default} */ (\n this._paymentTransactionId\n );\n const paymentAmount = /** @type {Hbar} */ (this._queryPayment);\n\n if (this._logger) {\n this._logger.debug(\n `[${logId}] making a payment transaction for node ${nodeId.toString()} and transaction ID ${paymentTransactionId.toString()} with amount ${paymentAmount.toString()}`,\n );\n }\n\n this._paymentTransactions.push(\n await this._makePaymentTransaction(\n paymentTransactionId,\n nodeId,\n this._isPaymentRequired() ? this._operator : null,\n paymentAmount,\n ),\n );\n }\n }\n\n /**\n * @abstract\n * @internal\n * @param {HieroProto.proto.IResponse} response\n * @returns {HieroProto.proto.IResponseHeader}\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _mapResponseHeader(response) {\n throw new Error(\"not implemented\");\n }\n\n /**\n * @protected\n * @returns {HieroProto.proto.IQueryHeader}\n */\n _makeRequestHeader() {\n /** @type {HieroProto.proto.IQueryHeader} */\n let header = {};\n\n if (this._isPaymentRequired() && this._paymentTransactions.length > 0) {\n header = {\n responseType: HieroProto.proto.ResponseType.ANSWER_ONLY,\n payment: this._paymentTransactions[this._nodeAccountIds.index],\n };\n }\n\n return header;\n }\n\n /**\n * @abstract\n * @internal\n * @param {HieroProto.proto.IQueryHeader} header\n * @returns {HieroProto.proto.IQuery}\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _onMakeRequest(header) {\n throw new Error(\"not implemented\");\n }\n\n /**\n * @internal\n * @returns {HieroProto.proto.IQuery}\n */\n _makeRequest() {\n /** @type {HieroProto.proto.IQueryHeader} */\n let header = {};\n\n if (this._isPaymentRequired() && this._paymentTransactions != null) {\n header = {\n payment: this._paymentTransactions[this._nodeAccountIds.index],\n responseType: HieroProto.proto.ResponseType.ANSWER_ONLY,\n };\n }\n\n return this._onMakeRequest(header);\n }\n\n /**\n * @override\n * @internal\n * @returns {Promise<HieroProto.proto.IQuery>}\n */\n async _makeRequestAsync() {\n /** @type {HieroProto.proto.IQueryHeader} */\n let header = {\n responseType: HieroProto.proto.ResponseType.ANSWER_ONLY,\n };\n\n const logId = this._getLogId();\n const nodeId = this._nodeAccountIds.current;\n const paymentTransactionId = TransactionId.generate(\n this._operator ? this._operator.accountId : new AccountId(0),\n );\n const paymentAmount = /** @type {Hbar} */ (this._queryPayment);\n\n if (this._logger) {\n this._logger.debug(\n `[${logId}] making a payment transaction for node ${nodeId.toString()} and transaction ID ${paymentTransactionId.toString()} with amount ${paymentAmount.toString()}`,\n );\n }\n\n header.payment = await this._makePaymentTransaction(\n paymentTransactionId,\n nodeId,\n this._isPaymentRequired() ? this._operator : null,\n paymentAmount,\n );\n\n return this._onMakeRequest(header);\n }\n\n /**\n * @override\n * @internal\n * @param {HieroProto.proto.IQuery} request\n * @param {HieroProto.proto.IResponse} response\n * @returns {[Status, ExecutionState]}\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _shouldRetry(request, response) {\n const { nodeTransactionPrecheckCode } =\n this._mapResponseHeader(response);\n\n const status = Status._fromCode(\n nodeTransactionPrecheckCode != null\n ? nodeTransactionPrecheckCode\n : HieroProto.proto.ResponseCodeEnum.OK,\n );\n if (this._logger) {\n this._logger.debug(\n `[${this._getLogId()}] received status ${status.toString()}`,\n );\n }\n\n switch (status) {\n case Status.Busy:\n case Status.Unknown:\n case Status.PlatformTransactionNotCreated:\n case Status.PlatformNotActive:\n return [status, ExecutionState.Retry];\n case Status.Ok:\n return [status, ExecutionState.Finished];\n default:\n return [status, ExecutionState.Error];\n }\n }\n\n /**\n * @override\n * @internal\n * @param {HieroProto.proto.IQuery} request\n * @param {HieroProto.proto.IResponse} response\n * @param {AccountId} nodeId\n * @returns {Error}\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _mapStatusError(request, response, nodeId) {\n const { nodeTransactionPrecheckCode } =\n this._mapResponseHeader(response);\n\n const status = Status._fromCode(\n nodeTransactionPrecheckCode != null\n ? nodeTransactionPrecheckCode\n : HieroProto.proto.ResponseCodeEnum.OK,\n );\n\n return new PrecheckStatusError({\n nodeId,\n status,\n transactionId: this._getTransactionId(),\n contractFunctionResult: null,\n });\n }\n\n /**\n * @param {HieroProto.proto.Query} request\n * @returns {Uint8Array}\n */\n _requestToBytes(request) {\n return HieroProto.proto.Query.encode(request).finish();\n }\n\n /**\n * @param {HieroProto.proto.Response} response\n * @returns {Uint8Array}\n */\n _responseToBytes(response) {\n return HieroProto.proto.Response.encode(response).finish();\n }\n}\n"],"names":["QUERY_REGISTRY","Map","Query","QueryBase","constructor","super","this","_paymentTransactionId","_paymentTransactions","_queryPayment","_maxQueryPayment","_timestamp","Date","now","fromBytes","bytes","query","HieroProto","proto","decode","Error","fromProtobuf","get","toBytes","encode","_makeRequest","finish","setQueryPayment","queryPayment","setMaxQueryPayment","maxQueryPayment","getCost","client","_nodeAccountIds","isEmpty","setList","_network","getNodeAccountIdsForExecute","cost","CostQuery","execute","Hbar","fromTinybars","_valueInTinybar","multipliedBy","toFixed","setPaymentTransactionId","paymentTransactionId","_getTransactionId","_isPaymentRequired","_validateChecksums","_beforeExecute","length","isAutoValidateChecksumsEnabled","_operator","transactionNodeIds","Object","values","network","map","accountNodeId","toString","TransactionId","generate","accountId","AccountId","defaultMaxQueryPayment","actualCost","toTinybars","toInt","MaxQueryPaymentExceeded","_logger","debug","_getLogId","setLocked","nodeId","list","logId","paymentAmount","push","_makePaymentTransaction","_mapResponseHeader","response","_makeRequestHeader","header","responseType","ResponseType","ANSWER_ONLY","payment","index","_onMakeRequest","_makeRequestAsync","current","_shouldRetry","request","nodeTransactionPrecheckCode","status","Status","_fromCode","ResponseCodeEnum","OK","Busy","Unknown","PlatformTransactionNotCreated","PlatformNotActive","ExecutionState","Retry","Ok","Finished","_mapStatusError","PrecheckStatusError","transactionId","contractFunctionResult","_requestToBytes","_responseToBytes","Response"],"mappings":"mXA6BY,MAACA,EAAiB,IAAIC,IASnB,MAAMC,UAAcC,EAC/B,WAAAC,GACIC,QAOAC,KAAKC,sBAAwB,KAO7BD,KAAKE,qBAAuB,GAQ5BF,KAAKG,cAAgB,KAUrBH,KAAKI,iBAAmB,KASxBJ,KAAKK,WAAaC,KAAKC,KAC/B,CASI,gBAAOC,CAAUC,GACb,MAAMC,EAAQC,EAAWC,MAAMhB,MAAMiB,OAAOJ,GAE5C,GAAmB,MAAfC,EAAMA,MACN,MAAM,IAAII,MAAM,iDAGpB,MAAMC,EAEErB,EAAesB,IAAIN,EAAMA,OAGjC,GAAoB,MAAhBK,EACA,MAAM,IAAID,MACN,oDAAoDJ,EAAMA,SAIlE,OAAOK,EAAaL,EAC5B,CASI,OAAAO,GACI,OAAON,EAAWC,MAAMhB,MAAMsB,OAAOlB,KAAKmB,gBAAgBC,QAClE,CAWI,eAAAC,CAAgBC,GAGZ,OAFAtB,KAAKG,cAAgBmB,EAEdtB,IACf,CAQI,kBAAAuB,CAAmBC,GAGf,OAFAxB,KAAKI,iBAAmBoB,EAEjBxB,IACf,CAQI,aAAMyB,CAAQC,GAEN1B,KAAK2B,gBAAgBC,SACrB5B,KAAK2B,gBAAgBE,QACjBH,EAAOI,SAASC,+BAKxB/B,KAAKK,WAAaC,KAAKC,MACvB,MAAMyB,QAAa,IAAIC,EAAUjC,MAAMkC,QAAQR,GAC/C,OAAOS,EAAKC,aACRJ,EAAKK,gBAAgBC,aAAa,KAAKC,QAAQ,GAE3D,CAQI,uBAAAC,CAAwBC,GAEpB,OADAzC,KAAKC,sBAAwBwC,EACtBzC,IACf,CAOI,wBAAIyC,GACA,OAAOzC,KAAKC,qBACpB,CAOI,iBAAAyC,GACI,GAAkC,MAA9B1C,KAAKC,sBACL,MAAM,IAAIa,MACN,6DAIR,OAAOd,KAAKC,qBACpB,CASI,kBAAA0C,GACI,OAAO,CACf,CAQI,kBAAAC,CAAmBlB,GAGvB,CASI,oBAAMmB,CAAenB,GAGjB,GAAI1B,KAAKE,qBAAqB4C,OAAS,EACnC,OAoBJ,GAhBIpB,EAAOqB,kCACP/C,KAAK4C,mBAAmBlB,GAIxB1B,KAAK2B,gBAAgBC,SACrB5B,KAAK2B,gBAAgBE,QACjBH,EAAOI,SAASC,+BAKxB/B,KAAKgD,UACiB,MAAlBhD,KAAKgD,UAAoBhD,KAAKgD,UAAYtB,EAAOsB,UAGjDhD,KAAK2C,qBAAsB,CAO3B,GALA3C,KAAKiD,mBAAqBC,OAAOC,OAAOzB,EAAO0B,SAASC,KACnDC,GAAkBA,EAAcC,aAIf,MAAlBvD,KAAKgD,UAOL,MAAM,IAAIlC,MACN,wFANJd,KAAKC,sBAAwBuD,EAAcC,SACvCzD,KAAKgD,UAAUU,UAQnC,MAIY1D,KAAKC,sBAAwBuD,EAAcC,SACvC,IAAIE,EAAU,IAItB,IAAI3B,EAAO,IAAIG,EAAK,GAEpB,MAAMX,EACuB,MAAzBxB,KAAKI,iBACCJ,KAAKI,iBACLsB,EAAOkC,uBAEjB,GAA0B,MAAtB5D,KAAKG,cACL6B,EAAOhC,KAAKG,mBACT,GACkC,IAArCH,KAAKE,qBAAqB4C,QAC1B9C,KAAK2C,qBACP,CAEE,MAAMkB,QAAmB7D,KAAKyB,QAAQC,GAGtC,GACIF,EAAgBsC,aAAaC,QAC7BF,EAAWC,aAAaC,QAExB,MAAM,IAAIC,EAAwBH,EAAYrC,GAGlDQ,EAAO6B,EACH7D,KAAKiE,SACLjE,KAAKiE,QAAQC,MACT,IAAIlE,KAAKmE,wCAAwCnC,EAAKuB,aAG1E,CAMQvD,KAAKG,cAAgB6B,EAGrBhC,KAAKK,WAAaC,KAAKC,MAEvBP,KAAK2B,gBAAgByC,YAGrB,IAAK,MAAMC,KAAUrE,KAAK2B,gBAAgB2C,KAAM,CAC5C,MAAMC,EAAQvE,KAAKmE,YACb1B,EAEEzC,KACH,sBACCwE,EAAqCxE,KAAkB,cAEzDA,KAAKiE,SACLjE,KAAKiE,QAAQC,MACT,IAAIK,4CAAgDF,EAAOd,iCAAiCd,EAAqBc,0BAA0BiB,EAAcjB,cAIjKvD,KAAKE,qBAAqBuE,WAChBzE,KAAK0E,wBACPjC,EACA4B,EACArE,KAAK2C,qBAAuB3C,KAAKgD,UAAY,KAC7CwB,GAGpB,CACA,CASI,kBAAAG,CAAmBC,GACf,MAAM,IAAI9D,MAAM,kBACxB,CAMI,kBAAA+D,GAEI,IAAIC,EAAS,CAAE,EASf,OAPI9E,KAAK2C,sBAAwB3C,KAAKE,qBAAqB4C,OAAS,IAChEgC,EAAS,CACLC,aAAcpE,EAAWC,MAAMoE,aAAaC,YAC5CC,QAASlF,KAAKE,qBAAqBF,KAAK2B,gBAAgBwD,SAIzDL,CACf,CASI,cAAAM,CAAeN,GACX,MAAM,IAAIhE,MAAM,kBACxB,CAMI,YAAAK,GAEI,IAAI2D,EAAS,CAAE,EASf,OAPI9E,KAAK2C,sBAAqD,MAA7B3C,KAAKE,uBAClC4E,EAAS,CACLI,QAASlF,KAAKE,qBAAqBF,KAAK2B,gBAAgBwD,OACxDJ,aAAcpE,EAAWC,MAAMoE,aAAaC,cAI7CjF,KAAKoF,eAAeN,EACnC,CAOI,uBAAMO,GAEF,IAAIP,EAAS,CACTC,aAAcpE,EAAWC,MAAMoE,aAAaC,aAGhD,MAAMV,EAAQvE,KAAKmE,YACbE,EAASrE,KAAK2B,gBAAgB2D,QAC9B7C,EAAuBe,EAAcC,SACvCzD,KAAKgD,UAAYhD,KAAKgD,UAAUU,UAAY,IAAIC,EAAU,IAExDa,EAAqCxE,KAAkB,cAe7D,OAbIA,KAAKiE,SACLjE,KAAKiE,QAAQC,MACT,IAAIK,4CAAgDF,EAAOd,iCAAiCd,EAAqBc,0BAA0BiB,EAAcjB,cAIjKuB,EAAOI,cAAgBlF,KAAK0E,wBACxBjC,EACA4B,EACArE,KAAK2C,qBAAuB3C,KAAKgD,UAAY,KAC7CwB,GAGGxE,KAAKoF,eAAeN,EACnC,CAUI,YAAAS,CAAaC,EAASZ,GAClB,MAAMa,4BAAEA,GACJzF,KAAK2E,mBAAmBC,GAEtBc,EAASC,EAAOC,UACa,MAA/BH,EACMA,EACA9E,EAAWC,MAAMiF,iBAAiBC,IAQ5C,OANI9F,KAAKiE,SACLjE,KAAKiE,QAAQC,MACT,IAAIlE,KAAKmE,gCAAgCuB,EAAOnC,cAIhDmC,GACJ,KAAKC,EAAOI,KACZ,KAAKJ,EAAOK,QACZ,KAAKL,EAAOM,8BACZ,KAAKN,EAAOO,kBACR,MAAO,CAACR,EAAQS,EAAeC,OACnC,KAAKT,EAAOU,GACR,MAAO,CAACX,EAAQS,EAAeG,UACnC,QACI,MAAO,CAACZ,EAAQS,EAAerF,OAE/C,CAWI,eAAAyF,CAAgBf,EAASZ,EAAUP,GAC/B,MAAMoB,4BAAEA,GACJzF,KAAK2E,mBAAmBC,GAEtBc,EAASC,EAAOC,UACa,MAA/BH,EACMA,EACA9E,EAAWC,MAAMiF,iBAAiBC,IAG5C,OAAO,IAAIU,EAAoB,CAC3BnC,SACAqB,SACAe,cAAezG,KAAK0C,oBACpBgE,uBAAwB,MAEpC,CAMI,eAAAC,CAAgBnB,GACZ,OAAO7E,EAAWC,MAAMhB,MAAMsB,OAAOsE,GAASpE,QACtD,CAMI,gBAAAwF,CAAiBhC,GACb,OAAOjE,EAAWC,MAAMiG,SAAS3F,OAAO0D,GAAUxD,QAC1D"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _Executable = _interopRequireDefault(require("../Executable.cjs"));
|
|
8
|
+
var _Hbar = _interopRequireDefault(require("../Hbar.cjs"));
|
|
9
|
+
var _AccountId = _interopRequireDefault(require("../account/AccountId.cjs"));
|
|
10
|
+
var HieroProto = _interopRequireWildcard(require("@hashgraph/proto"));
|
|
11
|
+
var _long = _interopRequireDefault(require("long"));
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @typedef {import("../channel/Channel.js").default} Channel
|
|
19
|
+
* @typedef {import("../transaction/TransactionId.js").default} TransactionId
|
|
20
|
+
* @typedef {import("../Status.js").default} Status
|
|
21
|
+
* @typedef {import("../Executable.js").ExecutionState} ExecutionState
|
|
22
|
+
* @typedef {import("../client/Client.js").ClientOperator} ClientOperator
|
|
23
|
+
* @typedef {import("../PublicKey.js").default} PublicKey
|
|
24
|
+
* @typedef {import("../client/Client.js").default<*, *>} Client
|
|
25
|
+
* @typedef {import("../logger/Logger.js").default} Logger
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Base class for all query-related functionality that can be shared between Query and CostQuery.
|
|
30
|
+
*
|
|
31
|
+
* @abstract
|
|
32
|
+
* @template RequestT
|
|
33
|
+
* @template ResponseT
|
|
34
|
+
* @template OutputT
|
|
35
|
+
* @augments {Executable<RequestT, ResponseT, OutputT>}
|
|
36
|
+
*/
|
|
37
|
+
class QueryBase extends _Executable.default {
|
|
38
|
+
constructor() {
|
|
39
|
+
super();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Create a payment transaction for a query
|
|
44
|
+
*
|
|
45
|
+
* @param {TransactionId} paymentTransactionId
|
|
46
|
+
* @param {AccountId} nodeId
|
|
47
|
+
* @param {?ClientOperator} operator
|
|
48
|
+
* @param {Hbar} paymentAmount
|
|
49
|
+
* @returns {Promise<HieroProto.proto.ITransaction>}
|
|
50
|
+
*/
|
|
51
|
+
async _makePaymentTransaction(paymentTransactionId, nodeId, operator, paymentAmount) {
|
|
52
|
+
const accountAmounts = [];
|
|
53
|
+
|
|
54
|
+
// If an operator is provided then we should make sure we transfer
|
|
55
|
+
// from the operator to the node.
|
|
56
|
+
// If an operator is not provided we simply create an effectively
|
|
57
|
+
// empty account amounts
|
|
58
|
+
if (operator != null) {
|
|
59
|
+
accountAmounts.push({
|
|
60
|
+
accountID: operator.accountId._toProtobuf(),
|
|
61
|
+
amount: paymentAmount.negated().toTinybars()
|
|
62
|
+
});
|
|
63
|
+
accountAmounts.push({
|
|
64
|
+
accountID: nodeId._toProtobuf(),
|
|
65
|
+
amount: paymentAmount.toTinybars()
|
|
66
|
+
});
|
|
67
|
+
} else {
|
|
68
|
+
accountAmounts.push({
|
|
69
|
+
accountID: new _AccountId.default(0)._toProtobuf(),
|
|
70
|
+
amount: paymentAmount.negated().toTinybars()
|
|
71
|
+
});
|
|
72
|
+
accountAmounts.push({
|
|
73
|
+
accountID: nodeId._toProtobuf(),
|
|
74
|
+
amount: paymentAmount.toTinybars()
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* @type {HieroProto.proto.ITransactionBody}
|
|
80
|
+
*/
|
|
81
|
+
const body = {
|
|
82
|
+
transactionID: paymentTransactionId._toProtobuf(),
|
|
83
|
+
nodeAccountID: nodeId._toProtobuf(),
|
|
84
|
+
transactionFee: new _Hbar.default(1).toTinybars(),
|
|
85
|
+
transactionValidDuration: {
|
|
86
|
+
seconds: _long.default.fromNumber(120)
|
|
87
|
+
},
|
|
88
|
+
cryptoTransfer: {
|
|
89
|
+
transfers: {
|
|
90
|
+
accountAmounts
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
/** @type {HieroProto.proto.ISignedTransaction} */
|
|
96
|
+
const signedTransaction = {
|
|
97
|
+
bodyBytes: HieroProto.proto.TransactionBody.encode(body).finish()
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
// Sign the transaction if an operator is provided
|
|
101
|
+
if (operator != null) {
|
|
102
|
+
const signature = await operator.transactionSigner(/** @type {Uint8Array} */signedTransaction.bodyBytes);
|
|
103
|
+
signedTransaction.sigMap = {
|
|
104
|
+
sigPair: [operator.publicKey._toProtobufSignature(signature)]
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Create and return a `proto.Transaction`
|
|
109
|
+
return {
|
|
110
|
+
signedTransactionBytes: HieroProto.proto.SignedTransaction.encode(signedTransaction).finish()
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
exports.default = QueryBase;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {import("../channel/Channel.js").default} Channel
|
|
3
|
+
* @typedef {import("../transaction/TransactionId.js").default} TransactionId
|
|
4
|
+
* @typedef {import("../Status.js").default} Status
|
|
5
|
+
* @typedef {import("../Executable.js").ExecutionState} ExecutionState
|
|
6
|
+
* @typedef {import("../client/Client.js").ClientOperator} ClientOperator
|
|
7
|
+
* @typedef {import("../PublicKey.js").default} PublicKey
|
|
8
|
+
* @typedef {import("../client/Client.js").default<*, *>} Client
|
|
9
|
+
* @typedef {import("../logger/Logger.js").default} Logger
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Base class for all query-related functionality that can be shared between Query and CostQuery.
|
|
13
|
+
*
|
|
14
|
+
* @abstract
|
|
15
|
+
* @template RequestT
|
|
16
|
+
* @template ResponseT
|
|
17
|
+
* @template OutputT
|
|
18
|
+
* @augments {Executable<RequestT, ResponseT, OutputT>}
|
|
19
|
+
*/
|
|
20
|
+
export default class QueryBase<RequestT, ResponseT, OutputT> extends Executable<RequestT, ResponseT, OutputT> {
|
|
21
|
+
/**
|
|
22
|
+
* Create a payment transaction for a query
|
|
23
|
+
*
|
|
24
|
+
* @param {TransactionId} paymentTransactionId
|
|
25
|
+
* @param {AccountId} nodeId
|
|
26
|
+
* @param {?ClientOperator} operator
|
|
27
|
+
* @param {Hbar} paymentAmount
|
|
28
|
+
* @returns {Promise<HieroProto.proto.ITransaction>}
|
|
29
|
+
*/
|
|
30
|
+
_makePaymentTransaction(paymentTransactionId: TransactionId, nodeId: AccountId, operator: ClientOperator | null, paymentAmount: Hbar): Promise<HieroProto.proto.ITransaction>;
|
|
31
|
+
}
|
|
32
|
+
export type Channel = import("../channel/Channel.js").default;
|
|
33
|
+
export type TransactionId = import("../transaction/TransactionId.js").default;
|
|
34
|
+
export type Status = import("../Status.js").default;
|
|
35
|
+
export type ExecutionState = import("../Executable.js").ExecutionState;
|
|
36
|
+
export type ClientOperator = import("../client/Client.js").ClientOperator;
|
|
37
|
+
export type PublicKey = import("../PublicKey.js").default;
|
|
38
|
+
export type Client = import("../client/Client.js").default<any, any>;
|
|
39
|
+
export type Logger = import("../logger/Logger.js").default;
|
|
40
|
+
import Executable from "../Executable.js";
|
|
41
|
+
import AccountId from "../account/AccountId.js";
|
|
42
|
+
import Hbar from "../Hbar.js";
|
|
43
|
+
import * as HieroProto from "@hashgraph/proto";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import o from"../Executable.js";import t from"../Hbar.js";import n from"../account/AccountId.js";import*as a from"@hashgraph/proto";import r from"long";class s extends o{constructor(){super()}async _makePaymentTransaction(o,s,c,u){const e=[];null!=c?(e.push({accountID:c.accountId._toProtobuf(),amount:u.negated().toTinybars()}),e.push({accountID:s._toProtobuf(),amount:u.toTinybars()})):(e.push({accountID:new n(0)._toProtobuf(),amount:u.negated().toTinybars()}),e.push({accountID:s._toProtobuf(),amount:u.toTinybars()}));const i={transactionID:o._toProtobuf(),nodeAccountID:s._toProtobuf(),transactionFee:new t(1).toTinybars(),transactionValidDuration:{seconds:r.fromNumber(120)},cryptoTransfer:{transfers:{accountAmounts:e}}},f={bodyBytes:a.proto.TransactionBody.encode(i).finish()};if(null!=c){const o=await c.transactionSigner(f.bodyBytes);f.sigMap={sigPair:[c.publicKey._toProtobufSignature(o)]}}return{signedTransactionBytes:a.proto.SignedTransaction.encode(f).finish()}}}export{s as default};
|
|
2
|
+
//# sourceMappingURL=QueryBase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueryBase.js","sources":["../../src/query/QueryBase.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Executable from \"../Executable.js\";\nimport Hbar from \"../Hbar.js\";\nimport AccountId from \"../account/AccountId.js\";\nimport * as HieroProto from \"@hashgraph/proto\";\nimport Long from \"long\";\n\n/**\n * @typedef {import(\"../channel/Channel.js\").default} Channel\n * @typedef {import(\"../transaction/TransactionId.js\").default} TransactionId\n * @typedef {import(\"../Status.js\").default} Status\n * @typedef {import(\"../Executable.js\").ExecutionState} ExecutionState\n * @typedef {import(\"../client/Client.js\").ClientOperator} ClientOperator\n * @typedef {import(\"../PublicKey.js\").default} PublicKey\n * @typedef {import(\"../client/Client.js\").default<*, *>} Client\n * @typedef {import(\"../logger/Logger.js\").default} Logger\n */\n\n/**\n * Base class for all query-related functionality that can be shared between Query and CostQuery.\n *\n * @abstract\n * @template RequestT\n * @template ResponseT\n * @template OutputT\n * @augments {Executable<RequestT, ResponseT, OutputT>}\n */\nexport default class QueryBase extends Executable {\n constructor() {\n super();\n }\n\n /**\n * Create a payment transaction for a query\n *\n * @param {TransactionId} paymentTransactionId\n * @param {AccountId} nodeId\n * @param {?ClientOperator} operator\n * @param {Hbar} paymentAmount\n * @returns {Promise<HieroProto.proto.ITransaction>}\n */\n async _makePaymentTransaction(\n paymentTransactionId,\n nodeId,\n operator,\n paymentAmount,\n ) {\n const accountAmounts = [];\n\n // If an operator is provided then we should make sure we transfer\n // from the operator to the node.\n // If an operator is not provided we simply create an effectively\n // empty account amounts\n if (operator != null) {\n accountAmounts.push({\n accountID: operator.accountId._toProtobuf(),\n amount: paymentAmount.negated().toTinybars(),\n });\n accountAmounts.push({\n accountID: nodeId._toProtobuf(),\n amount: paymentAmount.toTinybars(),\n });\n } else {\n accountAmounts.push({\n accountID: new AccountId(0)._toProtobuf(),\n amount: paymentAmount.negated().toTinybars(),\n });\n accountAmounts.push({\n accountID: nodeId._toProtobuf(),\n amount: paymentAmount.toTinybars(),\n });\n }\n\n /**\n * @type {HieroProto.proto.ITransactionBody}\n */\n const body = {\n transactionID: paymentTransactionId._toProtobuf(),\n nodeAccountID: nodeId._toProtobuf(),\n transactionFee: new Hbar(1).toTinybars(),\n transactionValidDuration: {\n seconds: Long.fromNumber(120),\n },\n cryptoTransfer: {\n transfers: {\n accountAmounts,\n },\n },\n };\n\n /** @type {HieroProto.proto.ISignedTransaction} */\n const signedTransaction = {\n bodyBytes: HieroProto.proto.TransactionBody.encode(body).finish(),\n };\n\n // Sign the transaction if an operator is provided\n if (operator != null) {\n const signature = await operator.transactionSigner(\n /** @type {Uint8Array} */ (signedTransaction.bodyBytes),\n );\n\n signedTransaction.sigMap = {\n sigPair: [operator.publicKey._toProtobufSignature(signature)],\n };\n }\n\n // Create and return a `proto.Transaction`\n return {\n signedTransactionBytes:\n HieroProto.proto.SignedTransaction.encode(\n signedTransaction,\n ).finish(),\n };\n }\n}\n"],"names":["QueryBase","Executable","constructor","super","_makePaymentTransaction","paymentTransactionId","nodeId","operator","paymentAmount","accountAmounts","push","accountID","accountId","_toProtobuf","amount","negated","toTinybars","AccountId","body","transactionID","nodeAccountID","transactionFee","Hbar","transactionValidDuration","seconds","Long","fromNumber","cryptoTransfer","transfers","signedTransaction","bodyBytes","HieroProto","proto","TransactionBody","encode","finish","signature","transactionSigner","sigMap","sigPair","publicKey","_toProtobufSignature","signedTransactionBytes","SignedTransaction"],"mappings":"wJA4Be,MAAMA,UAAkBC,EACnC,WAAAC,GACIC,OACR,CAWI,6BAAMC,CACFC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAiB,GAMP,MAAZF,GACAE,EAAeC,KAAK,CAChBC,UAAWJ,EAASK,UAAUC,cAC9BC,OAAQN,EAAcO,UAAUC,eAEpCP,EAAeC,KAAK,CAChBC,UAAWL,EAAOO,cAClBC,OAAQN,EAAcQ,iBAG1BP,EAAeC,KAAK,CAChBC,UAAW,IAAIM,EAAU,GAAGJ,cAC5BC,OAAQN,EAAcO,UAAUC,eAEpCP,EAAeC,KAAK,CAChBC,UAAWL,EAAOO,cAClBC,OAAQN,EAAcQ,gBAO9B,MAAME,EAAO,CACTC,cAAed,EAAqBQ,cACpCO,cAAed,EAAOO,cACtBQ,eAAgB,IAAIC,EAAK,GAAGN,aAC5BO,yBAA0B,CACtBC,QAASC,EAAKC,WAAW,MAE7BC,eAAgB,CACZC,UAAW,CACPnB,oBAMNoB,EAAoB,CACtBC,UAAWC,EAAWC,MAAMC,gBAAgBC,OAAOhB,GAAMiB,UAI7D,GAAgB,MAAZ5B,EAAkB,CAClB,MAAM6B,QAAkB7B,EAAS8B,kBACFR,EAA2B,WAG1DA,EAAkBS,OAAS,CACvBC,QAAS,CAAChC,EAASiC,UAAUC,qBAAqBL,IAElE,CAGQ,MAAO,CACHM,uBACIX,EAAWC,MAAMW,kBAAkBT,OAC/BL,GACFM,SAElB"}
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _Timestamp = _interopRequireDefault(require("../Timestamp.cjs"));
|
|
8
|
+
var _AccountId = _interopRequireDefault(require("../account/AccountId.cjs"));
|
|
9
|
+
var _Transaction = _interopRequireWildcard(require("../transaction/Transaction.cjs"));
|
|
10
|
+
var _Key = _interopRequireDefault(require("../Key.cjs"));
|
|
11
|
+
var _Hbar = _interopRequireDefault(require("../Hbar.cjs"));
|
|
12
|
+
var HieroProto = _interopRequireWildcard(require("@hashgraph/proto"));
|
|
13
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
14
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @typedef {import("bignumber.js").default} BigNumber
|
|
20
|
+
* @typedef {import("../channel/Channel.js").default} Channel
|
|
21
|
+
* @typedef {import("../client/Client.js").default<*, *>} Client
|
|
22
|
+
* @typedef {import("../transaction/TransactionId.js").default} TransactionId
|
|
23
|
+
* @typedef {import("../PublicKey.js").default} PublicKey
|
|
24
|
+
* @typedef {import("../PrivateKey.js").default} PrivateKey
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Create a new Hedera™ crypto-currency account.
|
|
29
|
+
*/
|
|
30
|
+
class ScheduleCreateTransaction extends _Transaction.default {
|
|
31
|
+
/**
|
|
32
|
+
* @param {object} [props]
|
|
33
|
+
* @param {Key} [props.adminKey]
|
|
34
|
+
* @param {AccountId} [props.payerAccountID]
|
|
35
|
+
* @param {string} [props.scheduleMemo]
|
|
36
|
+
* @param {Timestamp} [props.expirationTime]
|
|
37
|
+
* @param {boolean} [props.waitForExpiry]
|
|
38
|
+
*/
|
|
39
|
+
constructor(props = {}) {
|
|
40
|
+
super();
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @private
|
|
44
|
+
* @type {?Key}
|
|
45
|
+
*/
|
|
46
|
+
this._adminKey = null;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @private
|
|
50
|
+
* @type {?Transaction}
|
|
51
|
+
*/
|
|
52
|
+
this._scheduledTransaction = null;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @private
|
|
56
|
+
* @type {?AccountId}
|
|
57
|
+
*/
|
|
58
|
+
this._payerAccountId = null;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @private
|
|
62
|
+
* @type {?string}
|
|
63
|
+
*/
|
|
64
|
+
this._scheduleMemo = null;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @private
|
|
68
|
+
* @type {Set<string>}
|
|
69
|
+
*/
|
|
70
|
+
this._scheduledSignerPublicKeys = new Set();
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @private
|
|
74
|
+
* @type {?Timestamp}
|
|
75
|
+
*/
|
|
76
|
+
this._expirationTime = null;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* @private
|
|
80
|
+
* @type {?boolean}
|
|
81
|
+
*/
|
|
82
|
+
this._waitForExpiry = null;
|
|
83
|
+
if (props.adminKey != null) {
|
|
84
|
+
this.setAdminKey(props.adminKey);
|
|
85
|
+
}
|
|
86
|
+
if (props.payerAccountID != null) {
|
|
87
|
+
this.setPayerAccountId(props.payerAccountID);
|
|
88
|
+
}
|
|
89
|
+
if (props.scheduleMemo != null) {
|
|
90
|
+
this.setScheduleMemo(props.scheduleMemo);
|
|
91
|
+
}
|
|
92
|
+
this._defaultMaxTransactionFee = new _Hbar.default(5);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* @internal
|
|
97
|
+
* @param {HieroProto.proto.ITransaction[]} transactions
|
|
98
|
+
* @param {HieroProto.proto.ISignedTransaction[]} signedTransactions
|
|
99
|
+
* @param {TransactionId[]} transactionIds
|
|
100
|
+
* @param {AccountId[]} nodeIds
|
|
101
|
+
* @param {HieroProto.proto.ITransactionBody[]} bodies
|
|
102
|
+
* @returns {ScheduleCreateTransaction}
|
|
103
|
+
*/
|
|
104
|
+
static _fromProtobuf(transactions, signedTransactions, transactionIds, nodeIds, bodies) {
|
|
105
|
+
const body = bodies[0];
|
|
106
|
+
const create = /** @type {HieroProto.proto.IScheduleCreateTransactionBody} */
|
|
107
|
+
body.scheduleCreate;
|
|
108
|
+
const scheduledTransaction = new ScheduleCreateTransaction({
|
|
109
|
+
adminKey: create.adminKey != null ? _Key.default._fromProtobufKey(create.adminKey) : undefined,
|
|
110
|
+
payerAccountID: create.payerAccountID != null ? _AccountId.default._fromProtobuf(/** @type {HieroProto.proto.IAccountID} */
|
|
111
|
+
create.payerAccountID) : undefined,
|
|
112
|
+
scheduleMemo: create.memo != null ? create.memo : undefined,
|
|
113
|
+
waitForExpiry: create.waitForExpiry != null ? create.waitForExpiry : undefined,
|
|
114
|
+
expirationTime: create.expirationTime != null ? _Timestamp.default._fromProtobuf(create.expirationTime) : undefined
|
|
115
|
+
});
|
|
116
|
+
if (body.scheduleCreate != null) {
|
|
117
|
+
const scheduleCreateBody = body.scheduleCreate.scheduledTransactionBody;
|
|
118
|
+
const scheduleCreateBodyBytes = HieroProto.proto.TransactionBody.encode(
|
|
119
|
+
// @ts-ignore
|
|
120
|
+
scheduleCreateBody).finish();
|
|
121
|
+
const signedScheduledCreateTransaction = HieroProto.proto.SignedTransaction.encode({
|
|
122
|
+
bodyBytes: scheduleCreateBodyBytes
|
|
123
|
+
}).finish();
|
|
124
|
+
const scheduleCreatetransaction = {
|
|
125
|
+
signedTransactionBytes: signedScheduledCreateTransaction
|
|
126
|
+
};
|
|
127
|
+
const txlist = HieroProto.proto.TransactionList.encode({
|
|
128
|
+
transactionList: [scheduleCreatetransaction]
|
|
129
|
+
}).finish();
|
|
130
|
+
const finalScheduledDecodedTx = _Transaction.default.fromBytes(txlist);
|
|
131
|
+
scheduledTransaction._setScheduledTransaction(finalScheduledDecodedTx);
|
|
132
|
+
}
|
|
133
|
+
return _Transaction.default._fromProtobufTransactions(scheduledTransaction, transactions, signedTransactions, transactionIds, nodeIds, bodies);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* @internal
|
|
138
|
+
* @param {Transaction} tx
|
|
139
|
+
* @returns {this}
|
|
140
|
+
*/
|
|
141
|
+
_setScheduledTransaction(tx) {
|
|
142
|
+
this._scheduledTransaction = tx;
|
|
143
|
+
return this;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* @returns {?Key}
|
|
148
|
+
*/
|
|
149
|
+
get adminKey() {
|
|
150
|
+
return this._adminKey;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Set the key for this account.
|
|
155
|
+
*
|
|
156
|
+
* This is the key that must sign each transfer out of the account.
|
|
157
|
+
*
|
|
158
|
+
* If `receiverSignatureRequired` is true, then the key must also sign
|
|
159
|
+
* any transfer into the account.
|
|
160
|
+
*
|
|
161
|
+
* @param {Key} key
|
|
162
|
+
* @returns {this}
|
|
163
|
+
*/
|
|
164
|
+
setAdminKey(key) {
|
|
165
|
+
this._requireNotFrozen();
|
|
166
|
+
this._adminKey = key;
|
|
167
|
+
return this;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* @returns {?AccountId}
|
|
172
|
+
*/
|
|
173
|
+
get payerAccountId() {
|
|
174
|
+
return this._payerAccountId;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* @param {AccountId} account
|
|
179
|
+
* @returns {this}
|
|
180
|
+
*/
|
|
181
|
+
setPayerAccountId(account) {
|
|
182
|
+
this._requireNotFrozen();
|
|
183
|
+
this._payerAccountId = account;
|
|
184
|
+
return this;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* @param {string} memo
|
|
189
|
+
* @returns {this}
|
|
190
|
+
*/
|
|
191
|
+
setScheduleMemo(memo) {
|
|
192
|
+
this._requireNotFrozen();
|
|
193
|
+
this._scheduleMemo = memo;
|
|
194
|
+
return this;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* @returns {?string}
|
|
199
|
+
*/
|
|
200
|
+
get getScheduleMemo() {
|
|
201
|
+
this._requireNotFrozen();
|
|
202
|
+
return this._scheduleMemo;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* @param {Transaction} transaction
|
|
207
|
+
* @returns {this}
|
|
208
|
+
*/
|
|
209
|
+
setScheduledTransaction(transaction) {
|
|
210
|
+
this._requireNotFrozen();
|
|
211
|
+
transaction._requireNotFrozen();
|
|
212
|
+
this._scheduledTransaction = transaction.schedule()._scheduledTransaction;
|
|
213
|
+
return this;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* @param {Client} client
|
|
218
|
+
*/
|
|
219
|
+
_validateChecksums(client) {
|
|
220
|
+
if (this._payerAccountId != null) {
|
|
221
|
+
this._payerAccountId.validateChecksum(client);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* @override
|
|
227
|
+
* @internal
|
|
228
|
+
* @param {Channel} channel
|
|
229
|
+
* @param {HieroProto.proto.ITransaction} request
|
|
230
|
+
* @returns {Promise<HieroProto.proto.ITransactionResponse>}
|
|
231
|
+
*/
|
|
232
|
+
_execute(channel, request) {
|
|
233
|
+
return channel.schedule.createSchedule(request);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* @override
|
|
238
|
+
* @protected
|
|
239
|
+
* @returns {NonNullable<HieroProto.proto.TransactionBody["data"]>}
|
|
240
|
+
*/
|
|
241
|
+
_getTransactionDataCase() {
|
|
242
|
+
return "scheduleCreate";
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* @override
|
|
247
|
+
* @protected
|
|
248
|
+
* @returns {HieroProto.proto.IScheduleCreateTransactionBody}
|
|
249
|
+
*/
|
|
250
|
+
_makeTransactionData() {
|
|
251
|
+
return {
|
|
252
|
+
adminKey: this._adminKey != null ? this._adminKey._toProtobufKey() : null,
|
|
253
|
+
payerAccountID: this._payerAccountId != null ? this._payerAccountId._toProtobuf() : null,
|
|
254
|
+
scheduledTransactionBody: this._scheduledTransaction != null ? this._scheduledTransaction._getScheduledTransactionBody() : null,
|
|
255
|
+
memo: this._scheduleMemo,
|
|
256
|
+
waitForExpiry: this._waitForExpiry,
|
|
257
|
+
expirationTime: this._expirationTime != null ? this._expirationTime._toProtobuf() : null
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* @returns {string}
|
|
263
|
+
*/
|
|
264
|
+
_getLogId() {
|
|
265
|
+
const timestamp = /** @type {import("../Timestamp.js").default} */
|
|
266
|
+
this._transactionIds.current.validStart;
|
|
267
|
+
return `ScheduleCreateTransaction:${timestamp.toString()}`;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* @param {?Timestamp} expirationTime
|
|
272
|
+
* @returns {this}
|
|
273
|
+
*/
|
|
274
|
+
setExpirationTime(expirationTime) {
|
|
275
|
+
this._expirationTime = expirationTime;
|
|
276
|
+
return this;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* @returns {?Timestamp}
|
|
281
|
+
*/
|
|
282
|
+
get expirationTime() {
|
|
283
|
+
this._requireNotFrozen();
|
|
284
|
+
return this._expirationTime;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* @param {boolean} waitForExpiry
|
|
289
|
+
* @returns {this}
|
|
290
|
+
*/
|
|
291
|
+
setWaitForExpiry(waitForExpiry) {
|
|
292
|
+
this._waitForExpiry = waitForExpiry;
|
|
293
|
+
return this;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* @returns {?boolean}
|
|
298
|
+
*/
|
|
299
|
+
get waitForExpiry() {
|
|
300
|
+
this._requireNotFrozen();
|
|
301
|
+
return this._waitForExpiry;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
exports.default = ScheduleCreateTransaction;
|
|
305
|
+
_Transaction.TRANSACTION_REGISTRY.set("scheduleCreate",
|
|
306
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
307
|
+
ScheduleCreateTransaction._fromProtobuf);
|
|
308
|
+
_Transaction.SCHEDULE_CREATE_TRANSACTION.push(() => new ScheduleCreateTransaction());
|