@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":"TopicMessageQuery.js","sources":["../../src/topic/TopicMessageQuery.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport TransactionId from \"../transaction/TransactionId.js\";\nimport SubscriptionHandle from \"./SubscriptionHandle.js\";\nimport TopicMessage from \"./TopicMessage.js\";\nimport * as HieroProto from \"@hashgraph/proto\";\nimport TopicId from \"./TopicId.js\";\nimport Long from \"long\";\nimport Timestamp from \"../Timestamp.js\";\nimport { RST_STREAM } from \"../Executable.js\";\n\n/**\n * @typedef {import(\"../channel/Channel.js\").default} Channel\n * @typedef {import(\"../channel/MirrorChannel.js\").default} MirrorChannel\n * @typedef {import(\"../channel/MirrorChannel.js\").MirrorError} MirrorError\n */\n\n/**\n * @template {Channel} ChannelT\n * @typedef {import(\"../client/Client.js\").default<ChannelT, MirrorChannel>} Client<ChannelT, MirrorChannel>\n */\n\n/**\n * Represents a class that you can use to subscribe to\n * different topics on Hedera network.\n * @augments {Query<TopicMessageQuery>}\n */\nexport default class TopicMessageQuery {\n /**\n * @param {object} props\n * @param {TopicId | string} [props.topicId]\n * @param {Timestamp} [props.startTime]\n * @param {Timestamp} [props.endTime]\n * @param {(message: TopicMessage | null, error: Error)=> void} [props.errorHandler]\n * @param {() => void} [props.completionHandler]\n * @param {(error: MirrorError | Error | null) => boolean} [props.retryHandler]\n * @param {Long | number} [props.limit]\n */\n constructor(props = {}) {\n /**\n * @private\n * @type {?TopicId}\n */\n this._topicId = null;\n if (props.topicId != null) {\n this.setTopicId(props.topicId);\n }\n\n /**\n * @private\n * @type {?Timestamp}\n */\n this._startTime = null;\n if (props.startTime != null) {\n this.setStartTime(props.startTime);\n }\n\n /**\n * @private\n * @type {?Timestamp}\n */\n this._endTime = null;\n if (props.endTime != null) {\n this.setEndTime(props.endTime);\n }\n\n /**\n * @private\n * @type {?Long}\n */\n this._limit = null;\n if (props.limit != null) {\n this.setLimit(props.limit);\n }\n\n /**\n * @private\n * @type {(message: TopicMessage | null, error: Error) => void}\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n this._errorHandler = (message, error) => {\n console.error(\n `Error attempting to subscribe to topic: ${\n this._topicId != null ? this._topicId.toString() : \"\"\n }`,\n );\n };\n\n if (props.errorHandler != null) {\n this._errorHandler = props.errorHandler;\n }\n\n /*\n * @private\n * @type {((message: TopicMessage) => void) | null}\n */\n this._listener = null;\n\n /**\n * @private\n * @type {() => void}\n */\n this._completionHandler = () => {\n console.log(\n `Subscription to topic ${\n this._topicId != null ? this._topicId.toString() : \"\"\n } complete`,\n );\n };\n\n if (props.completionHandler != null) {\n this._completionHandler = props.completionHandler;\n }\n\n /* The number of times we can retry the grpc call\n *\n * @internal\n * @type {number}\n */\n this._maxAttempts = 20;\n\n /**\n * This is the request's max backoff\n *\n * @internal\n * @type {number}\n */\n this._maxBackoff = 8000;\n\n /**\n * @private\n * @type {(error: MirrorError | Error | null) => boolean}\n */\n this._retryHandler = (error) => {\n if (error != null) {\n if (error instanceof Error) {\n // Retry on all errors which are not `MirrorError` because they're\n // likely lower level HTTP/2 errors\n return true;\n } else {\n // Retry on `NOT_FOUND`, `RESOURCE_EXHAUSTED`, `UNAVAILABLE`, and conditionally on `INTERNAL`\n // if the message matches the right regex.\n switch (error.code) {\n // INTERNAL\n // eslint-disable-next-line no-fallthrough\n case 13:\n return RST_STREAM.test(error.details.toString());\n // NOT_FOUND\n // eslint-disable-next-line no-fallthrough\n case 5:\n // RESOURCE_EXHAUSTED\n // eslint-disable-next-line no-fallthrough\n case 8:\n // UNAVAILABLE\n // eslint-disable-next-line no-fallthrough\n case 14:\n case 17:\n return true;\n default:\n return false;\n }\n }\n }\n\n return false;\n };\n\n if (props.retryHandler != null) {\n this._retryHandler = props.retryHandler;\n }\n\n /**\n * @private\n * @type {number}\n */\n this._attempt = 0;\n\n /**\n * @private\n * @type {SubscriptionHandle | null}\n */\n this._handle = null;\n\n this.setMaxBackoff(8000);\n }\n\n /**\n * @returns {?TopicId}\n */\n get topicId() {\n return this._topicId;\n }\n\n /**\n * @param {TopicId | string} topicId\n * @returns {TopicMessageQuery}\n */\n setTopicId(topicId) {\n this.requireNotSubscribed();\n\n this._topicId =\n typeof topicId === \"string\"\n ? TopicId.fromString(topicId)\n : topicId.clone();\n\n return this;\n }\n\n /**\n * @returns {?Timestamp}\n */\n get startTime() {\n return this._startTime;\n }\n\n /**\n * @param {Timestamp | Date | number} startTime\n * @returns {TopicMessageQuery}\n */\n setStartTime(startTime) {\n this.requireNotSubscribed();\n\n this._startTime =\n startTime instanceof Timestamp\n ? startTime\n : startTime instanceof Date\n ? Timestamp.fromDate(startTime)\n : new Timestamp(startTime, 0);\n return this;\n }\n\n /**\n * @returns {?Timestamp}\n */\n get endTime() {\n return this._endTime;\n }\n\n /**\n * @param {Timestamp | Date | number} endTime\n * @returns {TopicMessageQuery}\n */\n setEndTime(endTime) {\n this.requireNotSubscribed();\n\n this._endTime =\n endTime instanceof Timestamp\n ? endTime\n : endTime instanceof Date\n ? Timestamp.fromDate(endTime)\n : new Timestamp(endTime, 0);\n return this;\n }\n\n /**\n * @returns {?Long}\n */\n get limit() {\n return this._limit;\n }\n\n /**\n * @param {Long | number} limit\n * @returns {TopicMessageQuery}\n */\n setLimit(limit) {\n this.requireNotSubscribed();\n\n this._limit = limit instanceof Long ? limit : Long.fromValue(limit);\n\n return this;\n }\n\n /**\n * @param {(message: TopicMessage | null, error: Error)=> void} errorHandler\n * @returns {TopicMessageQuery}\n */\n setErrorHandler(errorHandler) {\n this._errorHandler = errorHandler;\n\n return this;\n }\n\n /**\n * @param {() => void} completionHandler\n * @returns {TopicMessageQuery}\n */\n setCompletionHandler(completionHandler) {\n this.requireNotSubscribed();\n\n this._completionHandler = completionHandler;\n\n return this;\n }\n\n /**\n * @param {number} attempts\n * @returns {this}\n */\n setMaxAttempts(attempts) {\n this.requireNotSubscribed();\n this._maxAttempts = attempts;\n return this;\n }\n\n /**\n * @param {number} backoff\n * @returns {this}\n */\n setMaxBackoff(backoff) {\n this.requireNotSubscribed();\n this._maxBackoff = backoff;\n return this;\n }\n\n /**\n * @param {Client<Channel>} client\n * @param {((message: TopicMessage | null, error: Error) => void) | null} errorHandler\n * @param {(message: TopicMessage) => void} listener\n * @returns {SubscriptionHandle}\n */\n subscribe(client, errorHandler, listener) {\n this._handle = new SubscriptionHandle();\n this._listener = listener;\n\n if (errorHandler != null) {\n this._errorHandler = errorHandler;\n }\n\n this._makeServerStreamRequest(client);\n\n return this._handle;\n }\n\n /**\n * Makes a server stream request to subscribe to topic messages\n * @private\n * @param {Client<Channel>} client\n * @returns {void}\n */\n _makeServerStreamRequest(client) {\n const request = this._buildConsensusRequest();\n /** @type {Map<string, HieroProto.com.hedera.mirror.api.proto.ConsensusTopicResponse[]>} */\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const list = new Map();\n\n const streamHandler = client._mirrorNetwork\n .getNextMirrorNode()\n .getChannel()\n .makeServerStreamRequest(\n \"ConsensusService\",\n \"subscribeTopic\",\n request,\n (data) => this._handleMessage(data, list),\n (error) => this._handleError(error, client),\n this._completionHandler,\n );\n\n if (this._handle != null) {\n this._handle._setCall(() => streamHandler());\n }\n }\n\n requireNotSubscribed() {\n if (this._handle != null) {\n throw new Error(\n \"Cannot change fields on an already subscribed query\",\n );\n }\n }\n\n /**\n * @private\n * @param {TopicMessage} topicMessage\n */\n _passTopicMessage(topicMessage) {\n try {\n if (this._listener != null) {\n this._listener(topicMessage);\n } else {\n throw new Error(\"(BUG) listener is unexpectedly not set\");\n }\n } catch (error) {\n this._errorHandler(topicMessage, /** @type {Error} */ (error));\n }\n }\n\n /**\n * Builds the consensus topic query request\n * @private\n * @returns {Uint8Array} Encoded consensus topic query\n */\n _buildConsensusRequest() {\n return HieroProto.com.hedera.mirror.api.proto.ConsensusTopicQuery.encode(\n {\n topicID: this._topicId?._toProtobuf() ?? null,\n consensusStartTime: this._startTime?._toProtobuf() ?? null,\n consensusEndTime: this._endTime?._toProtobuf() ?? null,\n limit: this._limit,\n },\n ).finish();\n }\n\n /**\n * Handles an incoming message from the topic subscription\n * @private\n * @param {Uint8Array} data - Raw message data\n * @param {Map<string, HieroProto.com.hedera.mirror.api.proto.ConsensusTopicResponse[]>} list\n */\n _handleMessage(data, list) {\n const message =\n HieroProto.com.hedera.mirror.api.proto.ConsensusTopicResponse.decode(\n data,\n );\n\n if (this._limit?.gt(0)) {\n this._limit = this._limit.sub(1);\n }\n\n this._startTime = Timestamp._fromProtobuf(\n /** @type {HieroProto.proto.ITimestamp} */ (\n message.consensusTimestamp\n ),\n ).plusNanos(1);\n\n if (\n message.chunkInfo == null ||\n (message.chunkInfo != null && message.chunkInfo.total === 1)\n ) {\n this._passTopicMessage(TopicMessage._ofSingle(message));\n } else {\n this._handleChunkedMessage(message, list);\n }\n }\n\n /**\n * Handles a chunked message from the topic subscription\n * @private\n * @param {HieroProto.com.hedera.mirror.api.proto.ConsensusTopicResponse} message - The message response\n * @param {Map<string, HieroProto.com.hedera.mirror.api.proto.ConsensusTopicResponse[]>} list\n */\n _handleChunkedMessage(message, list) {\n const chunkInfo =\n /** @type {HieroProto.proto.IConsensusMessageChunkInfo} */ (\n message.chunkInfo\n );\n const initialTransactionID =\n /** @type {HieroProto.proto.ITransactionID} */ (\n chunkInfo.initialTransactionID\n );\n const total = /** @type {number} */ (chunkInfo.total);\n const transactionId =\n TransactionId._fromProtobuf(initialTransactionID).toString();\n\n /** @type {HieroProto.com.hedera.mirror.api.proto.ConsensusTopicResponse[]} */\n let responses = [];\n\n const temp = list.get(transactionId);\n if (temp == null) {\n list.set(transactionId, responses);\n } else {\n responses = temp;\n }\n\n responses.push(message);\n\n if (responses.length === total) {\n const topicMessage = TopicMessage._ofMany(responses);\n list.delete(transactionId);\n this._passTopicMessage(topicMessage);\n }\n }\n\n /**\n * Handles errors from the topic subscription\n * @private\n * @param {MirrorError | Error} error - The error that occurred\n * @param {Client<Channel>} client - The client to use for retries\n * @returns {void}\n */\n _handleError(error, client) {\n const message = error instanceof Error ? error.message : error.details;\n\n if (this._handle?._unsubscribed) {\n return;\n }\n\n if (this.shouldRetry(error)) {\n this._scheduleRetry(client, message);\n } else {\n this._errorHandler(null, new Error(message));\n }\n }\n\n /**\n * Determines if a retry should be attempted\n * @private\n * @param {MirrorError | Error} error - The error to check\n * @returns {boolean} - Whether to retry\n */\n shouldRetry(error) {\n return this._attempt < this._maxAttempts && this._retryHandler(error);\n }\n\n /**\n * Schedules a retry of the server stream request\n * @private\n * @param {Client<Channel>} client - The client to use for the retry\n * @param {string} errorMessage - The error message for logging\n * @returns {void}\n */\n _scheduleRetry(client, errorMessage) {\n const delay = Math.min(250 * 2 ** this._attempt, this._maxBackoff);\n\n console.warn(\n `Error subscribing to topic ${this._topicId?.toString() ?? \"UNKNOWN\"} ` +\n `during attempt ${this._attempt}. Waiting ${delay} ms before next attempt: ${errorMessage}`,\n );\n\n this._attempt += 1;\n setTimeout(() => this._makeServerStreamRequest(client), delay);\n }\n}\n"],"names":["TopicMessageQuery","constructor","props","this","_topicId","topicId","setTopicId","_startTime","startTime","setStartTime","_endTime","endTime","setEndTime","_limit","limit","setLimit","_errorHandler","message","error","console","toString","errorHandler","_listener","_completionHandler","log","completionHandler","_maxAttempts","_maxBackoff","_retryHandler","Error","code","RST_STREAM","test","details","retryHandler","_attempt","_handle","setMaxBackoff","requireNotSubscribed","TopicId","fromString","clone","Timestamp","Date","fromDate","Long","fromValue","setErrorHandler","setCompletionHandler","setMaxAttempts","attempts","backoff","subscribe","client","listener","SubscriptionHandle","_makeServerStreamRequest","request","_buildConsensusRequest","list","Map","streamHandler","_mirrorNetwork","getNextMirrorNode","getChannel","makeServerStreamRequest","data","_handleMessage","_handleError","_setCall","_passTopicMessage","topicMessage","HieroProto","com","hedera","mirror","api","proto","ConsensusTopicQuery","encode","topicID","_toProtobuf","consensusStartTime","consensusEndTime","finish","ConsensusTopicResponse","decode","gt","sub","_fromProtobuf","plusNanos","chunkInfo","total","TopicMessage","_ofSingle","_handleChunkedMessage","initialTransactionID","transactionId","TransactionId","responses","temp","get","set","push","length","_ofMany","delete","_unsubscribed","shouldRetry","_scheduleRetry","errorMessage","delay","Math","min","warn","setTimeout"],"mappings":"uRA2Be,MAAMA,EAWjB,WAAAC,CAAYC,EAAQ,IAKhBC,KAAKC,SAAW,KACK,MAAjBF,EAAMG,SACNF,KAAKG,WAAWJ,EAAMG,SAO1BF,KAAKI,WAAa,KACK,MAAnBL,EAAMM,WACNL,KAAKM,aAAaP,EAAMM,WAO5BL,KAAKO,SAAW,KACK,MAAjBR,EAAMS,SACNR,KAAKS,WAAWV,EAAMS,SAO1BR,KAAKU,OAAS,KACK,MAAfX,EAAMY,OACNX,KAAKY,SAASb,EAAMY,OAQxBX,KAAKa,cAAgB,CAACC,EAASC,KAC3BC,QAAQD,MACJ,2CACqB,MAAjBf,KAAKC,SAAmBD,KAAKC,SAASgB,WAAa,KAE1D,EAGqB,MAAtBlB,EAAMmB,eACNlB,KAAKa,cAAgBd,EAAMmB,cAO/BlB,KAAKmB,UAAY,KAMjBnB,KAAKoB,mBAAqB,KACtBJ,QAAQK,IACJ,yBACqB,MAAjBrB,KAAKC,SAAmBD,KAAKC,SAASgB,WAAa,cAE1D,EAG0B,MAA3BlB,EAAMuB,oBACNtB,KAAKoB,mBAAqBrB,EAAMuB,mBAQpCtB,KAAKuB,aAAe,GAQpBvB,KAAKwB,YAAc,IAMnBxB,KAAKyB,cAAiBV,IAClB,GAAa,MAATA,EAAe,CACf,GAAIA,aAAiBW,MAGjB,OAAO,EAIP,OAAQX,EAAMY,MAGV,KAAK,GACD,OAAOC,EAAWC,KAAKd,EAAMe,QAAQb,YAGzC,KAAK,EAGL,KAAK,EAGL,KAAK,GACL,KAAK,GACD,OAAO,EACX,QACI,OAAO,EAGnC,CAEY,OAAO,CAAK,EAGU,MAAtBlB,EAAMgC,eACN/B,KAAKyB,cAAgB1B,EAAMgC,cAO/B/B,KAAKgC,SAAW,EAMhBhC,KAAKiC,QAAU,KAEfjC,KAAKkC,cAAc,IAC3B,CAKI,WAAIhC,GACA,OAAOF,KAAKC,QACpB,CAMI,UAAAE,CAAWD,GAQP,OAPAF,KAAKmC,uBAELnC,KAAKC,SACkB,iBAAZC,EACDkC,EAAQC,WAAWnC,GACnBA,EAAQoC,QAEXtC,IACf,CAKI,aAAIK,GACA,OAAOL,KAAKI,UACpB,CAMI,YAAAE,CAAaD,GAST,OARAL,KAAKmC,uBAELnC,KAAKI,WACDC,aAAqBkC,EACflC,EACAA,aAAqBmC,KACnBD,EAAUE,SAASpC,GACnB,IAAIkC,EAAUlC,EAAW,GAC9BL,IACf,CAKI,WAAIQ,GACA,OAAOR,KAAKO,QACpB,CAMI,UAAAE,CAAWD,GASP,OARAR,KAAKmC,uBAELnC,KAAKO,SACDC,aAAmB+B,EACb/B,EACAA,aAAmBgC,KACjBD,EAAUE,SAASjC,GACnB,IAAI+B,EAAU/B,EAAS,GAC5BR,IACf,CAKI,SAAIW,GACA,OAAOX,KAAKU,MACpB,CAMI,QAAAE,CAASD,GAKL,OAJAX,KAAKmC,uBAELnC,KAAKU,OAASC,aAAiB+B,EAAO/B,EAAQ+B,EAAKC,UAAUhC,GAEtDX,IACf,CAMI,eAAA4C,CAAgB1B,GAGZ,OAFAlB,KAAKa,cAAgBK,EAEdlB,IACf,CAMI,oBAAA6C,CAAqBvB,GAKjB,OAJAtB,KAAKmC,uBAELnC,KAAKoB,mBAAqBE,EAEnBtB,IACf,CAMI,cAAA8C,CAAeC,GAGX,OAFA/C,KAAKmC,uBACLnC,KAAKuB,aAAewB,EACb/C,IACf,CAMI,aAAAkC,CAAcc,GAGV,OAFAhD,KAAKmC,uBACLnC,KAAKwB,YAAcwB,EACZhD,IACf,CAQI,SAAAiD,CAAUC,EAAQhC,EAAciC,GAU5B,OATAnD,KAAKiC,QAAU,IAAImB,EACnBpD,KAAKmB,UAAYgC,EAEG,MAAhBjC,IACAlB,KAAKa,cAAgBK,GAGzBlB,KAAKqD,yBAAyBH,GAEvBlD,KAAKiC,OACpB,CAQI,wBAAAoB,CAAyBH,GACrB,MAAMI,EAAUtD,KAAKuD,yBAGfC,EAAO,IAAIC,IAEXC,EAAgBR,EAAOS,eACxBC,oBACAC,aACAC,wBACG,mBACA,iBACAR,GACCS,GAAS/D,KAAKgE,eAAeD,EAAMP,KACnCzC,GAAUf,KAAKiE,aAAalD,EAAOmC,IACpClD,KAAKoB,oBAGO,MAAhBpB,KAAKiC,SACLjC,KAAKiC,QAAQiC,UAAS,IAAMR,KAExC,CAEI,oBAAAvB,GACI,GAAoB,MAAhBnC,KAAKiC,QACL,MAAM,IAAIP,MACN,sDAGhB,CAMI,iBAAAyC,CAAkBC,GACd,IACI,GAAsB,MAAlBpE,KAAKmB,UAGL,MAAM,IAAIO,MAAM,0CAFhB1B,KAAKmB,UAAUiD,EAItB,CAAC,MAAOrD,GACLf,KAAKa,cAAcuD,EAAY,EAC3C,CACA,CAOI,sBAAAb,GACI,OAAOc,EAAWC,IAAIC,OAAOC,OAAOC,IAAIC,MAAMC,oBAAoBC,OAC9D,CACIC,QAAS7E,KAAKC,UAAU6E,eAAiB,KACzCC,mBAAoB/E,KAAKI,YAAY0E,eAAiB,KACtDE,iBAAkBhF,KAAKO,UAAUuE,eAAiB,KAClDnE,MAAOX,KAAKU,SAElBuE,QACV,CAQI,cAAAjB,CAAeD,EAAMP,GACjB,MAAM1C,EACFuD,EAAWC,IAAIC,OAAOC,OAAOC,IAAIC,MAAMQ,uBAAuBC,OAC1DpB,GAGJ/D,KAAKU,QAAQ0E,GAAG,KAChBpF,KAAKU,OAASV,KAAKU,OAAO2E,IAAI,IAGlCrF,KAAKI,WAAamC,EAAU+C,cAEpBxE,EAChB,oBACUyE,UAAU,GAGa,MAArBzE,EAAQ0E,WACc,MAArB1E,EAAQ0E,WAAiD,IAA5B1E,EAAQ0E,UAAUC,MAEhDzF,KAAKmE,kBAAkBuB,EAAaC,UAAU7E,IAE9Cd,KAAK4F,sBAAsB9E,EAAS0C,EAEhD,CAQI,qBAAAoC,CAAsB9E,EAAS0C,GAC3B,MAAMgC,EAEE1E,EACH,UACC+E,EAEEL,EACH,qBACCC,EAA+BD,EAAe,MAC9CM,EACFC,EAAcT,cAAcO,GAAsB5E,WAGtD,IAAI+E,EAAY,GAEhB,MAAMC,EAAOzC,EAAK0C,IAAIJ,GAStB,GARY,MAARG,EACAzC,EAAK2C,IAAIL,EAAeE,GAExBA,EAAYC,EAGhBD,EAAUI,KAAKtF,GAEXkF,EAAUK,SAAWZ,EAAO,CAC5B,MAAMrB,EAAesB,EAAaY,QAAQN,GAC1CxC,EAAK+C,OAAOT,GACZ9F,KAAKmE,kBAAkBC,EACnC,CACA,CASI,YAAAH,CAAalD,EAAOmC,GAChB,MAAMpC,EAAUC,aAAiBW,MAAQX,EAAMD,QAAUC,EAAMe,QAE3D9B,KAAKiC,SAASuE,gBAIdxG,KAAKyG,YAAY1F,GACjBf,KAAK0G,eAAexD,EAAQpC,GAE5Bd,KAAKa,cAAc,KAAM,IAAIa,MAAMZ,IAE/C,CAQI,WAAA2F,CAAY1F,GACR,OAAOf,KAAKgC,SAAWhC,KAAKuB,cAAgBvB,KAAKyB,cAAcV,EACvE,CASI,cAAA2F,CAAexD,EAAQyD,GACnB,MAAMC,EAAQC,KAAKC,IAAI,IAAM,GAAK9G,KAAKgC,SAAUhC,KAAKwB,aAEtDR,QAAQ+F,KACJ,8BAA8B/G,KAAKC,UAAUgB,YAAc,4BACrCjB,KAAKgC,qBAAqB4E,6BAAiCD,KAGrF3G,KAAKgC,UAAY,EACjBgF,YAAW,IAAMhH,KAAKqD,yBAAyBH,IAAS0D,EAChE"}
|
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _Transaction = _interopRequireWildcard(require("../transaction/Transaction.cjs"));
|
|
8
|
+
var _TopicId = _interopRequireDefault(require("./TopicId.cjs"));
|
|
9
|
+
var utf8 = _interopRequireWildcard(require("../encoding/utf8.cjs"));
|
|
10
|
+
var _TransactionId = _interopRequireDefault(require("../transaction/TransactionId.cjs"));
|
|
11
|
+
var _Timestamp = _interopRequireDefault(require("../Timestamp.cjs"));
|
|
12
|
+
var util = _interopRequireWildcard(require("../util.cjs"));
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
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); }
|
|
15
|
+
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; }
|
|
16
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @namespace proto
|
|
20
|
+
* @typedef {import("@hashgraph/proto").proto.IConsensusSubmitMessageTransactionBody} HieroProto.proto.IConsensusSubmitMessageTransactionBody
|
|
21
|
+
* @typedef {import("@hashgraph/proto").proto.ITransaction} HieroProto.proto.ITransaction
|
|
22
|
+
* @typedef {import("@hashgraph/proto").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction
|
|
23
|
+
* @typedef {import("@hashgraph/proto").proto.TransactionBody} HieroProto.proto.TransactionBody
|
|
24
|
+
* @typedef {import("@hashgraph/proto").proto.ITransactionBody} HieroProto.proto.ITransactionBody
|
|
25
|
+
* @typedef {import("@hashgraph/proto").proto.ITransactionResponse} HieroProto.proto.ITransactionResponse
|
|
26
|
+
* @typedef {import("@hashgraph/proto").proto.IConsensusMessageChunkInfo} HieroProto.proto.IConsensusMessageChunkInfo
|
|
27
|
+
* @typedef {import("@hashgraph/proto").proto.IFixedFee} HieroProto.proto.IFixedFee
|
|
28
|
+
* @typedef {import("@hashgraph/proto").proto.ICustomFeeLimit} HieroProto.proto.ICustomFeeLimit
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @typedef {import("../channel/Channel.js").default} Channel
|
|
33
|
+
* @typedef {import("../token/CustomFixedFee.js").default} CustomFixedFee
|
|
34
|
+
* @typedef {import("../account/AccountId.js").default} AccountId
|
|
35
|
+
* @typedef {import("../transaction/TransactionResponse.js").default} TransactionResponse
|
|
36
|
+
* @typedef {import("../schedule/ScheduleCreateTransaction.js").default} ScheduleCreateTransaction
|
|
37
|
+
* @typedef {import("../transaction/CustomFeeLimit.js").default} CustomFeeLimit
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* <p>
|
|
42
|
+
* Valid and authorized messages on valid topics will be ordered by the
|
|
43
|
+
* consensus service, published in the block stream, and available to all
|
|
44
|
+
* subscribers on this topic via the mirror nodes.<br/>
|
|
45
|
+
* If this transaction succeeds the resulting TransactionReceipt SHALL
|
|
46
|
+
* contain the latest topicSequenceNumber and topicRunningHash for the
|
|
47
|
+
* topic.<br/>
|
|
48
|
+
* If the topic has a `submitKey` then that key MUST sign this
|
|
49
|
+
* transaction.<br/>
|
|
50
|
+
*/
|
|
51
|
+
class TopicMessageSubmitTransaction extends _Transaction.default {
|
|
52
|
+
/**
|
|
53
|
+
* @param {object} props
|
|
54
|
+
* @param {TopicId | string} [props.topicId]
|
|
55
|
+
* @param {Uint8Array | string} [props.message]
|
|
56
|
+
* @param {number} [props.maxChunks]
|
|
57
|
+
* @param {number} [props.chunkSize]
|
|
58
|
+
*/
|
|
59
|
+
constructor(props = {}) {
|
|
60
|
+
super();
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @private
|
|
64
|
+
* @type {?TopicId}
|
|
65
|
+
*/
|
|
66
|
+
this._topicId = null;
|
|
67
|
+
if (props.topicId != null) {
|
|
68
|
+
this.setTopicId(props.topicId);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* @private
|
|
73
|
+
* @type {?Uint8Array}
|
|
74
|
+
*/
|
|
75
|
+
this._message = null;
|
|
76
|
+
if (props.message != null) {
|
|
77
|
+
this.setMessage(props.message);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* @private
|
|
82
|
+
* @type {number}
|
|
83
|
+
* The maximum number of chunks a topic message can be split into.
|
|
84
|
+
* Default max chunk size: 20
|
|
85
|
+
* This value can be overridden with `setMaxChunks`
|
|
86
|
+
*/
|
|
87
|
+
this._maxChunks = 20;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* @private
|
|
91
|
+
* @type {number}
|
|
92
|
+
* The size of each chunk for a given topic message in bytes.
|
|
93
|
+
*/
|
|
94
|
+
this._chunkSize = _Transaction.CHUNK_SIZE;
|
|
95
|
+
if (props.maxChunks != null) {
|
|
96
|
+
this.setMaxChunks(props.maxChunks);
|
|
97
|
+
}
|
|
98
|
+
if (props.chunkSize != null) {
|
|
99
|
+
this.setChunkSize(props.chunkSize);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** @type {HieroProto.proto.IConsensusMessageChunkInfo | null} */
|
|
103
|
+
this._chunkInfo = null;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* @internal
|
|
108
|
+
* @param {HieroProto.proto.ITransaction[]} transactions
|
|
109
|
+
* @param {HieroProto.proto.ISignedTransaction[]} signedTransactions
|
|
110
|
+
* @param {TransactionId[]} transactionIds
|
|
111
|
+
* @param {AccountId[]} nodeIds
|
|
112
|
+
* @param {HieroProto.proto.ITransactionBody[]} bodies
|
|
113
|
+
* @returns {TopicMessageSubmitTransaction}
|
|
114
|
+
*/
|
|
115
|
+
static _fromProtobuf(transactions, signedTransactions, transactionIds, nodeIds, bodies) {
|
|
116
|
+
const body = bodies[0];
|
|
117
|
+
const message = /** @type {HieroProto.proto.IConsensusSubmitMessageTransactionBody} */
|
|
118
|
+
body.consensusSubmitMessage;
|
|
119
|
+
return _Transaction.default._fromProtobufTransactions(new TopicMessageSubmitTransaction({
|
|
120
|
+
topicId: message.topicID != null ? _TopicId.default._fromProtobuf(message.topicID) : undefined,
|
|
121
|
+
message: message.message != null ? message.message : undefined
|
|
122
|
+
}), transactions, signedTransactions, transactionIds, nodeIds, bodies);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* @returns {?TopicId}
|
|
127
|
+
*/
|
|
128
|
+
get topicId() {
|
|
129
|
+
return this._topicId;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* @param {TopicId | string} topicId
|
|
134
|
+
* @returns {this}
|
|
135
|
+
*/
|
|
136
|
+
setTopicId(topicId) {
|
|
137
|
+
this._requireNotFrozen();
|
|
138
|
+
this._topicId = typeof topicId === "string" ? _TopicId.default.fromString(topicId) : topicId.clone();
|
|
139
|
+
return this;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* @deprecated - Use `getMessage()` instead
|
|
144
|
+
* @returns {?Uint8Array}
|
|
145
|
+
*/
|
|
146
|
+
get message() {
|
|
147
|
+
return this._message;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* @returns {?Uint8Array}
|
|
152
|
+
*/
|
|
153
|
+
getMessage() {
|
|
154
|
+
return this._message;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* @param {string | Uint8Array} message
|
|
159
|
+
* @returns {this}
|
|
160
|
+
*/
|
|
161
|
+
setMessage(message) {
|
|
162
|
+
this._requireNotFrozen();
|
|
163
|
+
message = util.requireStringOrUint8Array(message);
|
|
164
|
+
this._message = message instanceof Uint8Array ? message : utf8.encode(message);
|
|
165
|
+
return this;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Gets the maximum custom fee that the user is willing to pay for the message.
|
|
170
|
+
* @returns {CustomFeeLimit[]}
|
|
171
|
+
*/
|
|
172
|
+
getCustomFeeLimits() {
|
|
173
|
+
return this._customFeeLimits;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Sets the maximum custom fee that the user is willing to pay for message submission.
|
|
178
|
+
* @param {CustomFeeLimit[]} customFeeLimits
|
|
179
|
+
* @returns {this}
|
|
180
|
+
*/
|
|
181
|
+
setCustomFeeLimits(customFeeLimits) {
|
|
182
|
+
this._requireNotFrozen();
|
|
183
|
+
this._customFeeLimits = customFeeLimits;
|
|
184
|
+
return this;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Adds a maximum custom fee that the user is willing to pay for message submission.
|
|
189
|
+
* @param {CustomFeeLimit} customFeeLimit
|
|
190
|
+
* @returns {this}
|
|
191
|
+
*/
|
|
192
|
+
addCustomFeeLimit(customFeeLimit) {
|
|
193
|
+
this._requireNotFrozen();
|
|
194
|
+
this._customFeeLimits.push(customFeeLimit);
|
|
195
|
+
return this;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* @deprecated - Use `getMaxChunks()` instead
|
|
200
|
+
* @returns {?number}
|
|
201
|
+
*/
|
|
202
|
+
get maxChunks() {
|
|
203
|
+
return this._maxChunks;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* @returns {?number}
|
|
208
|
+
*/
|
|
209
|
+
getMaxChunks() {
|
|
210
|
+
return this._maxChunks;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* @param {number} maxChunks
|
|
215
|
+
* @returns {this}
|
|
216
|
+
*/
|
|
217
|
+
setMaxChunks(maxChunks) {
|
|
218
|
+
this._requireNotFrozen();
|
|
219
|
+
this._maxChunks = maxChunks;
|
|
220
|
+
return this;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* @deprecated - Use `getChunkSize()` instead
|
|
225
|
+
* @returns {?number}
|
|
226
|
+
*/
|
|
227
|
+
get chunkSize() {
|
|
228
|
+
return this._chunkSize;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* @returns {?number}
|
|
233
|
+
*/
|
|
234
|
+
getChunkSize() {
|
|
235
|
+
return this._chunkSize;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* @param {number} chunkSize
|
|
240
|
+
* @returns {this}
|
|
241
|
+
*/
|
|
242
|
+
setChunkSize(chunkSize) {
|
|
243
|
+
this._chunkSize = chunkSize;
|
|
244
|
+
return this;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* @override
|
|
249
|
+
* @returns {number}
|
|
250
|
+
*/
|
|
251
|
+
getRequiredChunks() {
|
|
252
|
+
if (this._message == null) {
|
|
253
|
+
return 1;
|
|
254
|
+
}
|
|
255
|
+
const result = Math.ceil(this._message.length / this._chunkSize);
|
|
256
|
+
return result;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Freeze this transaction from further modification to prepare for
|
|
261
|
+
* signing or serialization.
|
|
262
|
+
*
|
|
263
|
+
* Will use the `Client`, if available, to generate a default Transaction ID and select 1/3
|
|
264
|
+
* nodes to prepare this transaction for.
|
|
265
|
+
*
|
|
266
|
+
* @param {?import("../client/Client.js").default<Channel, *>} client
|
|
267
|
+
* @returns {this}
|
|
268
|
+
*/
|
|
269
|
+
freezeWith(client) {
|
|
270
|
+
super.freezeWith(client);
|
|
271
|
+
if (this._message == null) {
|
|
272
|
+
return this;
|
|
273
|
+
}
|
|
274
|
+
const chunks = Math.floor((this._message.length + (this._chunkSize - 1)) / this._chunkSize);
|
|
275
|
+
if (chunks > this._maxChunks) {
|
|
276
|
+
throw new Error(`Message with size ${this._message.length} too long for ${this._maxChunks} chunks`);
|
|
277
|
+
}
|
|
278
|
+
const initialTransactionId = this._getTransactionId()._toProtobuf();
|
|
279
|
+
let nextTransactionId = this._getTransactionId();
|
|
280
|
+
|
|
281
|
+
// Hack around the locked list. Should refactor a bit to remove such code
|
|
282
|
+
this._transactionIds.locked = false;
|
|
283
|
+
this._transactions.clear();
|
|
284
|
+
this._transactionIds.clear();
|
|
285
|
+
this._signedTransactions.clear();
|
|
286
|
+
for (let chunk = 0; chunk < chunks; chunk++) {
|
|
287
|
+
this._chunkInfo = {
|
|
288
|
+
initialTransactionID: initialTransactionId,
|
|
289
|
+
total: chunks,
|
|
290
|
+
number: chunk + 1
|
|
291
|
+
};
|
|
292
|
+
this._transactionIds.push(nextTransactionId);
|
|
293
|
+
this._transactionIds.advance();
|
|
294
|
+
for (const nodeAccountId of this._nodeAccountIds.list) {
|
|
295
|
+
this._signedTransactions.push(this._makeSignedTransaction(nodeAccountId));
|
|
296
|
+
}
|
|
297
|
+
nextTransactionId = new _TransactionId.default(/** @type {AccountId} */nextTransactionId.accountId, new _Timestamp.default(/** @type {Timestamp} */nextTransactionId.validStart.seconds, /** @type {Timestamp} */nextTransactionId.validStart.nanos.add(1)));
|
|
298
|
+
}
|
|
299
|
+
this._transactionIds.advance();
|
|
300
|
+
this._chunkInfo = null;
|
|
301
|
+
return this;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* @returns {ScheduleCreateTransaction}
|
|
306
|
+
*/
|
|
307
|
+
schedule() {
|
|
308
|
+
this._requireNotFrozen();
|
|
309
|
+
if (this._message != null && this._message.length > this._chunkSize) {
|
|
310
|
+
throw new Error(`cannot schedule \`TopicMessageSubmitTransaction\` with message over ${this._chunkSize} bytes`);
|
|
311
|
+
}
|
|
312
|
+
return super.schedule();
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* @param {import("../client/Client.js").default<Channel, *>} client
|
|
317
|
+
* @param {number=} requestTimeout
|
|
318
|
+
* @returns {Promise<TransactionResponse>}
|
|
319
|
+
*/
|
|
320
|
+
async execute(client, requestTimeout) {
|
|
321
|
+
return (await this.executeAll(client, requestTimeout))[0];
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* @param {import("../client/Client.js").default<Channel, *>} client
|
|
326
|
+
* @param {number=} requestTimeout
|
|
327
|
+
* @returns {Promise<TransactionResponse[]>}
|
|
328
|
+
*/
|
|
329
|
+
async executeAll(client, requestTimeout) {
|
|
330
|
+
if (!super._isFrozen()) {
|
|
331
|
+
this.freezeWith(client);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
// on execute, sign each transaction with the operator, if present
|
|
335
|
+
// and we are signing a transaction that used the default transaction ID
|
|
336
|
+
|
|
337
|
+
const transactionId = this._getTransactionId();
|
|
338
|
+
const operatorAccountId = client.operatorAccountId;
|
|
339
|
+
if (operatorAccountId != null && operatorAccountId.equals(/** @type {AccountId} */transactionId.accountId)) {
|
|
340
|
+
await super.signWithOperator(client);
|
|
341
|
+
}
|
|
342
|
+
const responses = [];
|
|
343
|
+
let remainingTimeout = requestTimeout;
|
|
344
|
+
for (let i = 0; i < this._transactionIds.length; i++) {
|
|
345
|
+
const startTimestamp = Date.now();
|
|
346
|
+
responses.push(await super.execute(client, remainingTimeout));
|
|
347
|
+
if (remainingTimeout != null) {
|
|
348
|
+
remainingTimeout = Date.now() - startTimestamp;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
return responses;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* @override
|
|
356
|
+
* @internal
|
|
357
|
+
* @param {Channel} channel
|
|
358
|
+
* @param {HieroProto.proto.ITransaction} request
|
|
359
|
+
* @returns {Promise<HieroProto.proto.ITransactionResponse>}
|
|
360
|
+
*/
|
|
361
|
+
_execute(channel, request) {
|
|
362
|
+
return channel.consensus.submitMessage(request);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* @override
|
|
367
|
+
* @protected
|
|
368
|
+
* @returns {NonNullable<HieroProto.proto.TransactionBody["data"]>}
|
|
369
|
+
*/
|
|
370
|
+
_getTransactionDataCase() {
|
|
371
|
+
return "consensusSubmitMessage";
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* @override
|
|
376
|
+
* @protected
|
|
377
|
+
* @returns {HieroProto.proto.IConsensusSubmitMessageTransactionBody}
|
|
378
|
+
*/
|
|
379
|
+
_makeTransactionData() {
|
|
380
|
+
if (this._chunkInfo != null && this._message != null) {
|
|
381
|
+
const num = /** @type {number} */this._chunkInfo.number;
|
|
382
|
+
const startIndex = (num - 1) * this._chunkSize;
|
|
383
|
+
let endIndex = startIndex + this._chunkSize;
|
|
384
|
+
if (endIndex > this._message.length) {
|
|
385
|
+
endIndex = this._message.length;
|
|
386
|
+
}
|
|
387
|
+
return {
|
|
388
|
+
topicID: this._topicId != null ? this._topicId._toProtobuf() : null,
|
|
389
|
+
message: this._message.slice(startIndex, endIndex),
|
|
390
|
+
chunkInfo: this._chunkInfo
|
|
391
|
+
};
|
|
392
|
+
} else {
|
|
393
|
+
return {
|
|
394
|
+
topicID: this._topicId != null ? this._topicId._toProtobuf() : null,
|
|
395
|
+
message: this._message
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* @returns {string}
|
|
402
|
+
*/
|
|
403
|
+
_getLogId() {
|
|
404
|
+
const timestamp = /** @type {import("../Timestamp.js").default} */
|
|
405
|
+
this._transactionIds.current.validStart;
|
|
406
|
+
return `TopicMessageSubmitTransaction:${timestamp.toString()}`;
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
exports.default = TopicMessageSubmitTransaction;
|
|
410
|
+
_Transaction.TRANSACTION_REGISTRY.set("consensusSubmitMessage",
|
|
411
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
412
|
+
TopicMessageSubmitTransaction._fromProtobuf);
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @namespace proto
|
|
3
|
+
* @typedef {import("@hashgraph/proto").proto.IConsensusSubmitMessageTransactionBody} HieroProto.proto.IConsensusSubmitMessageTransactionBody
|
|
4
|
+
* @typedef {import("@hashgraph/proto").proto.ITransaction} HieroProto.proto.ITransaction
|
|
5
|
+
* @typedef {import("@hashgraph/proto").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction
|
|
6
|
+
* @typedef {import("@hashgraph/proto").proto.TransactionBody} HieroProto.proto.TransactionBody
|
|
7
|
+
* @typedef {import("@hashgraph/proto").proto.ITransactionBody} HieroProto.proto.ITransactionBody
|
|
8
|
+
* @typedef {import("@hashgraph/proto").proto.ITransactionResponse} HieroProto.proto.ITransactionResponse
|
|
9
|
+
* @typedef {import("@hashgraph/proto").proto.IConsensusMessageChunkInfo} HieroProto.proto.IConsensusMessageChunkInfo
|
|
10
|
+
* @typedef {import("@hashgraph/proto").proto.IFixedFee} HieroProto.proto.IFixedFee
|
|
11
|
+
* @typedef {import("@hashgraph/proto").proto.ICustomFeeLimit} HieroProto.proto.ICustomFeeLimit
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* @typedef {import("../channel/Channel.js").default} Channel
|
|
15
|
+
* @typedef {import("../token/CustomFixedFee.js").default} CustomFixedFee
|
|
16
|
+
* @typedef {import("../account/AccountId.js").default} AccountId
|
|
17
|
+
* @typedef {import("../transaction/TransactionResponse.js").default} TransactionResponse
|
|
18
|
+
* @typedef {import("../schedule/ScheduleCreateTransaction.js").default} ScheduleCreateTransaction
|
|
19
|
+
* @typedef {import("../transaction/CustomFeeLimit.js").default} CustomFeeLimit
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* <p>
|
|
23
|
+
* Valid and authorized messages on valid topics will be ordered by the
|
|
24
|
+
* consensus service, published in the block stream, and available to all
|
|
25
|
+
* subscribers on this topic via the mirror nodes.<br/>
|
|
26
|
+
* If this transaction succeeds the resulting TransactionReceipt SHALL
|
|
27
|
+
* contain the latest topicSequenceNumber and topicRunningHash for the
|
|
28
|
+
* topic.<br/>
|
|
29
|
+
* If the topic has a `submitKey` then that key MUST sign this
|
|
30
|
+
* transaction.<br/>
|
|
31
|
+
*/
|
|
32
|
+
export default class TopicMessageSubmitTransaction extends Transaction {
|
|
33
|
+
/**
|
|
34
|
+
* @internal
|
|
35
|
+
* @param {HieroProto.proto.ITransaction[]} transactions
|
|
36
|
+
* @param {HieroProto.proto.ISignedTransaction[]} signedTransactions
|
|
37
|
+
* @param {TransactionId[]} transactionIds
|
|
38
|
+
* @param {AccountId[]} nodeIds
|
|
39
|
+
* @param {HieroProto.proto.ITransactionBody[]} bodies
|
|
40
|
+
* @returns {TopicMessageSubmitTransaction}
|
|
41
|
+
*/
|
|
42
|
+
static _fromProtobuf(transactions: HieroProto.proto.ITransaction[], signedTransactions: HieroProto.proto.ISignedTransaction[], transactionIds: TransactionId[], nodeIds: AccountId[], bodies: HieroProto.proto.ITransactionBody[]): TopicMessageSubmitTransaction;
|
|
43
|
+
/**
|
|
44
|
+
* @param {object} props
|
|
45
|
+
* @param {TopicId | string} [props.topicId]
|
|
46
|
+
* @param {Uint8Array | string} [props.message]
|
|
47
|
+
* @param {number} [props.maxChunks]
|
|
48
|
+
* @param {number} [props.chunkSize]
|
|
49
|
+
*/
|
|
50
|
+
constructor(props?: {
|
|
51
|
+
topicId?: string | TopicId | undefined;
|
|
52
|
+
message?: string | Uint8Array<ArrayBufferLike> | undefined;
|
|
53
|
+
maxChunks?: number | undefined;
|
|
54
|
+
chunkSize?: number | undefined;
|
|
55
|
+
});
|
|
56
|
+
/**
|
|
57
|
+
* @private
|
|
58
|
+
* @type {?TopicId}
|
|
59
|
+
*/
|
|
60
|
+
private _topicId;
|
|
61
|
+
/**
|
|
62
|
+
* @private
|
|
63
|
+
* @type {?Uint8Array}
|
|
64
|
+
*/
|
|
65
|
+
private _message;
|
|
66
|
+
/**
|
|
67
|
+
* @private
|
|
68
|
+
* @type {number}
|
|
69
|
+
* The maximum number of chunks a topic message can be split into.
|
|
70
|
+
* Default max chunk size: 20
|
|
71
|
+
* This value can be overridden with `setMaxChunks`
|
|
72
|
+
*/
|
|
73
|
+
private _maxChunks;
|
|
74
|
+
/**
|
|
75
|
+
* @private
|
|
76
|
+
* @type {number}
|
|
77
|
+
* The size of each chunk for a given topic message in bytes.
|
|
78
|
+
*/
|
|
79
|
+
private _chunkSize;
|
|
80
|
+
/** @type {HieroProto.proto.IConsensusMessageChunkInfo | null} */
|
|
81
|
+
_chunkInfo: HieroProto.proto.IConsensusMessageChunkInfo | null;
|
|
82
|
+
/**
|
|
83
|
+
* @returns {?TopicId}
|
|
84
|
+
*/
|
|
85
|
+
get topicId(): TopicId | null;
|
|
86
|
+
/**
|
|
87
|
+
* @param {TopicId | string} topicId
|
|
88
|
+
* @returns {this}
|
|
89
|
+
*/
|
|
90
|
+
setTopicId(topicId: TopicId | string): this;
|
|
91
|
+
/**
|
|
92
|
+
* @deprecated - Use `getMessage()` instead
|
|
93
|
+
* @returns {?Uint8Array}
|
|
94
|
+
*/
|
|
95
|
+
get message(): Uint8Array | null;
|
|
96
|
+
/**
|
|
97
|
+
* @returns {?Uint8Array}
|
|
98
|
+
*/
|
|
99
|
+
getMessage(): Uint8Array | null;
|
|
100
|
+
/**
|
|
101
|
+
* @param {string | Uint8Array} message
|
|
102
|
+
* @returns {this}
|
|
103
|
+
*/
|
|
104
|
+
setMessage(message: string | Uint8Array): this;
|
|
105
|
+
/**
|
|
106
|
+
* Gets the maximum custom fee that the user is willing to pay for the message.
|
|
107
|
+
* @returns {CustomFeeLimit[]}
|
|
108
|
+
*/
|
|
109
|
+
getCustomFeeLimits(): CustomFeeLimit[];
|
|
110
|
+
/**
|
|
111
|
+
* Sets the maximum custom fee that the user is willing to pay for message submission.
|
|
112
|
+
* @param {CustomFeeLimit[]} customFeeLimits
|
|
113
|
+
* @returns {this}
|
|
114
|
+
*/
|
|
115
|
+
setCustomFeeLimits(customFeeLimits: CustomFeeLimit[]): this;
|
|
116
|
+
/**
|
|
117
|
+
* Adds a maximum custom fee that the user is willing to pay for message submission.
|
|
118
|
+
* @param {CustomFeeLimit} customFeeLimit
|
|
119
|
+
* @returns {this}
|
|
120
|
+
*/
|
|
121
|
+
addCustomFeeLimit(customFeeLimit: CustomFeeLimit): this;
|
|
122
|
+
/**
|
|
123
|
+
* @deprecated - Use `getMaxChunks()` instead
|
|
124
|
+
* @returns {?number}
|
|
125
|
+
*/
|
|
126
|
+
get maxChunks(): number | null;
|
|
127
|
+
/**
|
|
128
|
+
* @returns {?number}
|
|
129
|
+
*/
|
|
130
|
+
getMaxChunks(): number | null;
|
|
131
|
+
/**
|
|
132
|
+
* @param {number} maxChunks
|
|
133
|
+
* @returns {this}
|
|
134
|
+
*/
|
|
135
|
+
setMaxChunks(maxChunks: number): this;
|
|
136
|
+
/**
|
|
137
|
+
* @deprecated - Use `getChunkSize()` instead
|
|
138
|
+
* @returns {?number}
|
|
139
|
+
*/
|
|
140
|
+
get chunkSize(): number | null;
|
|
141
|
+
/**
|
|
142
|
+
* @returns {?number}
|
|
143
|
+
*/
|
|
144
|
+
getChunkSize(): number | null;
|
|
145
|
+
/**
|
|
146
|
+
* @param {number} chunkSize
|
|
147
|
+
* @returns {this}
|
|
148
|
+
*/
|
|
149
|
+
setChunkSize(chunkSize: number): this;
|
|
150
|
+
/**
|
|
151
|
+
* Freeze this transaction from further modification to prepare for
|
|
152
|
+
* signing or serialization.
|
|
153
|
+
*
|
|
154
|
+
* Will use the `Client`, if available, to generate a default Transaction ID and select 1/3
|
|
155
|
+
* nodes to prepare this transaction for.
|
|
156
|
+
*
|
|
157
|
+
* @param {?import("../client/Client.js").default<Channel, *>} client
|
|
158
|
+
* @returns {this}
|
|
159
|
+
*/
|
|
160
|
+
freezeWith(client: import("../client/Client.js").default<Channel, any> | null): this;
|
|
161
|
+
/**
|
|
162
|
+
* @param {import("../client/Client.js").default<Channel, *>} client
|
|
163
|
+
* @param {number=} requestTimeout
|
|
164
|
+
* @returns {Promise<TransactionResponse>}
|
|
165
|
+
*/
|
|
166
|
+
execute(client: import("../client/Client.js").default<Channel, any>, requestTimeout?: number | undefined): Promise<TransactionResponse>;
|
|
167
|
+
/**
|
|
168
|
+
* @param {import("../client/Client.js").default<Channel, *>} client
|
|
169
|
+
* @param {number=} requestTimeout
|
|
170
|
+
* @returns {Promise<TransactionResponse[]>}
|
|
171
|
+
*/
|
|
172
|
+
executeAll(client: import("../client/Client.js").default<Channel, any>, requestTimeout?: number | undefined): Promise<TransactionResponse[]>;
|
|
173
|
+
/**
|
|
174
|
+
* @override
|
|
175
|
+
* @protected
|
|
176
|
+
* @returns {HieroProto.proto.IConsensusSubmitMessageTransactionBody}
|
|
177
|
+
*/
|
|
178
|
+
protected override _makeTransactionData(): HieroProto.proto.IConsensusSubmitMessageTransactionBody;
|
|
179
|
+
}
|
|
180
|
+
export namespace HieroProto {
|
|
181
|
+
namespace proto {
|
|
182
|
+
type IConsensusSubmitMessageTransactionBody = import("@hashgraph/proto").proto.IConsensusSubmitMessageTransactionBody;
|
|
183
|
+
type ITransaction = import("@hashgraph/proto").proto.ITransaction;
|
|
184
|
+
type ISignedTransaction = import("@hashgraph/proto").proto.ISignedTransaction;
|
|
185
|
+
type TransactionBody = import("@hashgraph/proto").proto.TransactionBody;
|
|
186
|
+
type ITransactionBody = import("@hashgraph/proto").proto.ITransactionBody;
|
|
187
|
+
type ITransactionResponse = import("@hashgraph/proto").proto.ITransactionResponse;
|
|
188
|
+
type IConsensusMessageChunkInfo = import("@hashgraph/proto").proto.IConsensusMessageChunkInfo;
|
|
189
|
+
type IFixedFee = import("@hashgraph/proto").proto.IFixedFee;
|
|
190
|
+
type ICustomFeeLimit = import("@hashgraph/proto").proto.ICustomFeeLimit;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
export type Channel = import("../channel/Channel.js").default;
|
|
194
|
+
export type CustomFixedFee = import("../token/CustomFixedFee.js").default;
|
|
195
|
+
export type AccountId = import("../account/AccountId.js").default;
|
|
196
|
+
export type TransactionResponse = import("../transaction/TransactionResponse.js").default;
|
|
197
|
+
export type ScheduleCreateTransaction = import("../schedule/ScheduleCreateTransaction.js").default;
|
|
198
|
+
export type CustomFeeLimit = import("../transaction/CustomFeeLimit.js").default;
|
|
199
|
+
import Transaction from "../transaction/Transaction.js";
|
|
200
|
+
import TopicId from "./TopicId.js";
|
|
201
|
+
import TransactionId from "../transaction/TransactionId.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import t,{TRANSACTION_REGISTRY as s,CHUNK_SIZE as e}from"../transaction/Transaction.js";import i from"./TopicId.js";import{encode as n}from"../encoding/utf8.js";import r from"../transaction/TransactionId.js";import o from"../Timestamp.js";import{requireStringOrUint8Array as h}from"../util.js";class u extends t{constructor(t={}){super(),this._topicId=null,null!=t.topicId&&this.setTopicId(t.topicId),this._message=null,null!=t.message&&this.setMessage(t.message),this._maxChunks=20,this._chunkSize=e,null!=t.maxChunks&&this.setMaxChunks(t.maxChunks),null!=t.chunkSize&&this.setChunkSize(t.chunkSize),this._chunkInfo=null}static _fromProtobuf(s,e,n,r,o){const h=o[0].consensusSubmitMessage;return t._fromProtobufTransactions(new u({topicId:null!=h.topicID?i._fromProtobuf(h.topicID):void 0,message:null!=h.message?h.message:void 0}),s,e,n,r,o)}get topicId(){return this._topicId}setTopicId(t){return this._requireNotFrozen(),this._topicId="string"==typeof t?i.fromString(t):t.clone(),this}get message(){return this._message}getMessage(){return this._message}setMessage(t){return this._requireNotFrozen(),t=h(t),this._message=t instanceof Uint8Array?t:n(t),this}getCustomFeeLimits(){return this._customFeeLimits}setCustomFeeLimits(t){return this._requireNotFrozen(),this._customFeeLimits=t,this}addCustomFeeLimit(t){return this._requireNotFrozen(),this._customFeeLimits.push(t),this}get maxChunks(){return this._maxChunks}getMaxChunks(){return this._maxChunks}setMaxChunks(t){return this._requireNotFrozen(),this._maxChunks=t,this}get chunkSize(){return this._chunkSize}getChunkSize(){return this._chunkSize}setChunkSize(t){return this._chunkSize=t,this}getRequiredChunks(){if(null==this._message)return 1;return Math.ceil(this._message.length/this._chunkSize)}freezeWith(t){if(super.freezeWith(t),null==this._message)return this;const s=Math.floor((this._message.length+(this._chunkSize-1))/this._chunkSize);if(s>this._maxChunks)throw new Error(`Message with size ${this._message.length} too long for ${this._maxChunks} chunks`);const e=this._getTransactionId()._toProtobuf();let i=this._getTransactionId();this._transactionIds.locked=!1,this._transactions.clear(),this._transactionIds.clear(),this._signedTransactions.clear();for(let t=0;t<s;t++){this._chunkInfo={initialTransactionID:e,total:s,number:t+1},this._transactionIds.push(i),this._transactionIds.advance();for(const t of this._nodeAccountIds.list)this._signedTransactions.push(this._makeSignedTransaction(t));i=new r(i.accountId,new o(i.validStart.seconds,i.validStart.nanos.add(1)))}return this._transactionIds.advance(),this._chunkInfo=null,this}schedule(){if(this._requireNotFrozen(),null!=this._message&&this._message.length>this._chunkSize)throw new Error(`cannot schedule \`TopicMessageSubmitTransaction\` with message over ${this._chunkSize} bytes`);return super.schedule()}async execute(t,s){return(await this.executeAll(t,s))[0]}async executeAll(t,s){super._isFrozen()||this.freezeWith(t);const e=this._getTransactionId(),i=t.operatorAccountId;null!=i&&i.equals(e.accountId)&&await super.signWithOperator(t);const n=[];let r=s;for(let s=0;s<this._transactionIds.length;s++){const s=Date.now();n.push(await super.execute(t,r)),null!=r&&(r=Date.now()-s)}return n}_execute(t,s){return t.consensus.submitMessage(s)}_getTransactionDataCase(){return"consensusSubmitMessage"}_makeTransactionData(){if(null!=this._chunkInfo&&null!=this._message){const t=(this._chunkInfo.number-1)*this._chunkSize;let s=t+this._chunkSize;return s>this._message.length&&(s=this._message.length),{topicID:null!=this._topicId?this._topicId._toProtobuf():null,message:this._message.slice(t,s),chunkInfo:this._chunkInfo}}return{topicID:null!=this._topicId?this._topicId._toProtobuf():null,message:this._message}}_getLogId(){return`TopicMessageSubmitTransaction:${this._transactionIds.current.validStart.toString()}`}}s.set("consensusSubmitMessage",u._fromProtobuf);export{u as default};
|
|
2
|
+
//# sourceMappingURL=TopicMessageSubmitTransaction.js.map
|