@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":"FileAppendTransaction.js","sources":["../../src/file/FileAppendTransaction.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Hbar from \"../Hbar.js\";\nimport Transaction, {\n TRANSACTION_REGISTRY,\n} from \"../transaction/Transaction.js\";\nimport * as utf8 from \"../encoding/utf8.js\";\nimport FileId from \"./FileId.js\";\nimport TransactionId from \"../transaction/TransactionId.js\";\nimport Timestamp from \"../Timestamp.js\";\nimport List from \"../transaction/List.js\";\nimport AccountId from \"../account/AccountId.js\";\n\n/**\n * @namespace proto\n * @typedef {import(\"@hashgraph/proto\").proto.ITransaction} HieroProto.proto.ITransaction\n * @typedef {import(\"@hashgraph/proto\").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction\n * @typedef {import(\"@hashgraph/proto\").proto.TransactionBody} HieroProto.proto.TransactionBody\n * @typedef {import(\"@hashgraph/proto\").proto.ITransactionBody} HieroProto.proto.ITransactionBody\n * @typedef {import(\"@hashgraph/proto\").proto.ITransactionResponse} HieroProto.proto.ITransactionResponse\n * @typedef {import(\"@hashgraph/proto\").proto.IFileAppendTransactionBody} HieroProto.proto.IFileAppendTransactionBody\n * @typedef {import(\"@hashgraph/proto\").proto.IFileID} HieroProto.proto.IFileID\n */\n\n/**\n * @typedef {import(\"../PublicKey.js\").default} PublicKey\n * @typedef {import(\"../channel/Channel.js\").default} Channel\n * @typedef {import(\"../client/Client.js\").default<Channel, *>} Client\n * @typedef {import(\"../transaction/TransactionResponse.js\").default} TransactionResponse\n * @typedef {import(\"../schedule/ScheduleCreateTransaction.js\").default} ScheduleCreateTransaction\n */\n\n/**\n * A transaction specifically to append data to a file on the network.\n *\n * If a file has multiple keys, all keys must sign to modify its contents.\n */\nexport default class FileAppendTransaction extends Transaction {\n /**\n * @param {object} [props]\n * @param {FileId | string} [props.fileId]\n * @param {Uint8Array | string} [props.contents]\n * @param {number} [props.maxChunks]\n * @param {number} [props.chunkSize]\n * @param {number} [props.chunkInterval]\n */\n constructor(props = {}) {\n super();\n\n /**\n * @private\n * @type {?FileId}\n */\n this._fileId = null;\n\n /**\n * @private\n * @type {?Uint8Array}\n */\n this._contents = null;\n\n /**\n * @private\n * @type {number}\n */\n this._maxChunks = 20;\n\n /**\n * @private\n * @type {number}\n */\n this._chunkSize = 4096;\n\n /**\n * @private\n * @type {number}\n */\n this._chunkInterval = 10;\n\n this._defaultMaxTransactionFee = new Hbar(5);\n\n if (props.fileId != null) {\n this.setFileId(props.fileId);\n }\n\n if (props.contents != null) {\n this.setContents(props.contents);\n }\n\n if (props.maxChunks != null) {\n this.setMaxChunks(props.maxChunks);\n }\n\n if (props.chunkSize != null) {\n this.setChunkSize(props.chunkSize);\n }\n\n if (props.chunkInterval != null) {\n this.setChunkInterval(props.chunkInterval);\n }\n\n /** @type {List<TransactionId>} */\n this._transactionIds = new List();\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.ITransaction[]} transactions\n * @param {HieroProto.proto.ISignedTransaction[]} signedTransactions\n * @param {TransactionId[]} transactionIds\n * @param {AccountId[]} nodeIds\n * @param {HieroProto.proto.ITransactionBody[]} bodies\n * @returns {FileAppendTransaction}\n */\n static _fromProtobuf(\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n ) {\n const body = bodies[0];\n const append =\n /** @type {HieroProto.proto.IFileAppendTransactionBody} */ (\n body.fileAppend\n );\n\n let contents;\n\n // The increment value depends on whether the node IDs list is empty or not.\n // The node IDs list is not empty if the transaction has been frozen\n // before serialization and deserialization, otherwise, it's empty.\n const incrementValue = nodeIds.length > 0 ? nodeIds.length : 1;\n\n for (let i = 0; i < bodies.length; i += incrementValue) {\n const fileAppend =\n /** @type {HieroProto.proto.IFileAppendTransactionBody} */ (\n bodies[i].fileAppend\n );\n if (fileAppend.contents == null) {\n break;\n }\n\n if (contents == null) {\n contents = new Uint8Array(\n /** @type {Uint8Array} */ (fileAppend.contents),\n );\n continue;\n }\n\n /** @type {Uint8Array} */\n const concat = new Uint8Array(\n contents.length +\n /** @type {Uint8Array} */ (fileAppend.contents).length,\n );\n concat.set(contents, 0);\n concat.set(\n /** @type {Uint8Array} */ (fileAppend.contents),\n contents.length,\n );\n contents = concat;\n }\n const chunkSize = append.contents?.length || undefined;\n const maxChunks = bodies.length\n ? bodies.length / incrementValue\n : undefined;\n let chunkInterval;\n if (transactionIds.length > 1) {\n const firstValidStart = transactionIds[0].validStart;\n const secondValidStart = transactionIds[1].validStart;\n if (firstValidStart && secondValidStart) {\n chunkInterval = secondValidStart.nanos\n .sub(firstValidStart.nanos)\n .toNumber();\n }\n }\n\n return Transaction._fromProtobufTransactions(\n new FileAppendTransaction({\n fileId:\n append.fileID != null\n ? FileId._fromProtobuf(\n /** @type {HieroProto.proto.IFileID} */ (\n append.fileID\n ),\n )\n : undefined,\n contents,\n chunkSize,\n maxChunks,\n chunkInterval,\n }),\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n );\n }\n\n /**\n * @returns {?FileId}\n */\n get fileId() {\n return this._fileId;\n }\n\n /**\n * Set the keys which must sign any transactions modifying this file. Required.\n *\n * All keys must sign to modify the file's contents or keys. No key is required\n * to sign for extending the expiration time (except the one for the operator account\n * paying for the transaction). Only one key must sign to delete the file, however.\n *\n * To require more than one key to sign to delete a file, add them to a\n * KeyList and pass that here.\n *\n * The network currently requires a file to have at least one key (or key list or threshold key)\n * but this requirement may be lifted in the future.\n *\n * @param {FileId | string} fileId\n * @returns {this}\n */\n setFileId(fileId) {\n this._requireNotFrozen();\n this._fileId =\n typeof fileId === \"string\"\n ? FileId.fromString(fileId)\n : fileId.clone();\n\n return this;\n }\n\n /**\n * @override\n * @returns {number}\n */\n getRequiredChunks() {\n if (this._contents == null) {\n return 1;\n }\n\n const result = Math.ceil(this._contents.length / this._chunkSize);\n\n return result;\n }\n\n /**\n * @returns {?Uint8Array}\n */\n get contents() {\n return this._contents;\n }\n\n /**\n * Set the given byte array as the file's contents.\n *\n * This may be omitted to append an empty file.\n *\n * Note that total size for a given transaction is limited to 6KiB (as of March 2020) by the\n * network; if you exceed this you may receive a HederaPreCheckStatusException\n * with Status#TransactionOversize.\n *\n * In this case, you will need to break the data into chunks of less than ~6KiB and execute this\n * transaction with the first chunk and then use FileAppendTransaction with\n * FileAppendTransaction#setContents(Uint8Array) for the remaining chunks.\n *\n * @param {Uint8Array | string} contents\n * @returns {this}\n */\n setContents(contents) {\n this._requireNotFrozen();\n this._contents =\n contents instanceof Uint8Array ? contents : utf8.encode(contents);\n\n return this;\n }\n\n /**\n * @returns {?number}\n */\n get maxChunks() {\n return this._maxChunks;\n }\n\n /**\n * @param {number} maxChunks\n * @returns {this}\n */\n setMaxChunks(maxChunks) {\n if (maxChunks <= 0) {\n throw new Error(\"Max chunks must be greater than 0\");\n }\n this._requireNotFrozen();\n this._maxChunks = maxChunks;\n return this;\n }\n\n /**\n * @returns {?number}\n */\n get chunkSize() {\n return this._chunkSize;\n }\n\n /**\n * @param {number} chunkSize\n * @returns {this}\n */\n setChunkSize(chunkSize) {\n if (chunkSize <= 0) {\n throw new Error(\"Chunk size must be greater than 0\");\n }\n this._chunkSize = chunkSize;\n return this;\n }\n\n /**\n * @returns {number}\n */\n get chunkInterval() {\n return this._chunkInterval;\n }\n\n /**\n * @param {number} chunkInterval The valid start interval between chunks in nanoseconds\n * @returns {this}\n */\n setChunkInterval(chunkInterval) {\n this._chunkInterval = chunkInterval;\n return this;\n }\n\n /**\n * Freeze this transaction from further modification to prepare for\n * signing or serialization.\n *\n * Will use the `Client`, if available, to generate a default Transaction ID and select 1/3\n * nodes to prepare this transaction for.\n *\n * @param {?import(\"../client/Client.js\").default<Channel, *>} client\n * @returns {this}\n */\n freezeWith(client) {\n super.freezeWith(client);\n\n if (this._contents == null) {\n return this;\n }\n\n let nextTransactionId = this._getTransactionId();\n\n // Hack around the locked list. Should refactor a bit to remove such code\n this._transactionIds.locked = false;\n\n this._transactions.clear();\n this._transactionIds.clear();\n this._signedTransactions.clear();\n\n for (let chunk = 0; chunk < this.getRequiredChunks(); chunk++) {\n this._transactionIds.push(nextTransactionId);\n this._transactionIds.advance();\n\n for (const nodeAccountId of this._nodeAccountIds.list) {\n this._signedTransactions.push(\n this._makeSignedTransaction(nodeAccountId),\n );\n }\n\n nextTransactionId = new TransactionId(\n /** @type {AccountId} */ (nextTransactionId.accountId),\n new Timestamp(\n /** @type {Timestamp} */ (\n nextTransactionId.validStart\n ).seconds,\n /** @type {Timestamp} */ (\n nextTransactionId.validStart\n ).nanos.add(this._chunkInterval),\n ),\n );\n }\n\n this._transactionIds.advance();\n this._transactionIds.setLocked();\n\n return this;\n }\n\n /**\n * @returns {ScheduleCreateTransaction}\n */\n schedule() {\n this._requireNotFrozen();\n\n if (this._contents != null && this._contents.length > this._chunkSize) {\n throw new Error(\n `cannot schedule \\`FileAppendTransaction\\` with message over ${this._chunkSize} bytes`,\n );\n }\n\n return super.schedule();\n }\n\n /**\n * @param {import(\"../client/Client.js\").default<Channel, *>} client\n * @param {number=} requestTimeout\n * @returns {Promise<TransactionResponse>}\n */\n async execute(client, requestTimeout) {\n return (await this.executeAll(client, requestTimeout))[0];\n }\n\n /**\n * @param {import(\"../client/Client.js\").default<Channel, *>} client\n * @param {number=} requestTimeout\n * @returns {Promise<TransactionResponse[]>}\n */\n async executeAll(client, requestTimeout) {\n if (this.maxChunks && this.getRequiredChunks() > this.maxChunks) {\n throw new Error(\n `cannot execute \\`FileAppendTransaction\\` with more than ${this.maxChunks} chunks`,\n );\n }\n\n if (!super._isFrozen()) {\n this.freezeWith(client);\n }\n\n // on execute, sign each transaction with the operator, if present\n // and we are signing a transaction that used the default transaction ID\n\n const transactionId = this._getTransactionId();\n const operatorAccountId = client.operatorAccountId;\n\n if (\n operatorAccountId != null &&\n operatorAccountId.equals(\n /** @type {AccountId} */ (transactionId.accountId),\n )\n ) {\n await super.signWithOperator(client);\n }\n\n const responses = [];\n let remainingTimeout = requestTimeout;\n\n for (let i = 0; i < this._transactionIds.length; i++) {\n const startTimestamp = Date.now();\n const response = await super.execute(client, remainingTimeout);\n\n if (remainingTimeout != null) {\n remainingTimeout = Date.now() - startTimestamp;\n }\n\n await response.getReceipt(client);\n responses.push(response);\n }\n\n return responses;\n }\n\n /**\n * @param {Client} client\n */\n _validateChecksums(client) {\n if (this._fileId != null) {\n this._fileId.validateChecksum(client);\n }\n }\n\n /**\n * @override\n * @internal\n * @param {Channel} channel\n * @param {HieroProto.proto.ITransaction} request\n * @returns {Promise<HieroProto.proto.ITransactionResponse>}\n */\n _execute(channel, request) {\n return channel.file.appendContent(request);\n }\n\n /**\n * @override\n * @protected\n * @returns {NonNullable<HieroProto.proto.TransactionBody[\"data\"]>}\n */\n _getTransactionDataCase() {\n return \"fileAppend\";\n }\n\n /**\n * Build all the transactions\n * when transactions are not complete.\n * @override\n * @internal\n */\n _buildIncompleteTransactions() {\n const dummyAccountId = AccountId.fromString(\"0.0.0\");\n const accountId = this.transactionId?.accountId || dummyAccountId;\n const validStart =\n this.transactionId?.validStart || Timestamp.fromDate(new Date());\n\n if (this.maxChunks && this.getRequiredChunks() > this.maxChunks) {\n throw new Error(\n `cannot build \\`FileAppendTransaction\\` with more than ${this.maxChunks} chunks`,\n );\n }\n\n // Hack around the locked list. Should refactor a bit to remove such code\n this._transactionIds.locked = false;\n\n this._transactions.clear();\n this._transactionIds.clear();\n this._signedTransactions.clear();\n\n for (let chunk = 0; chunk < this.getRequiredChunks(); chunk++) {\n let nextTransactionId = TransactionId.withValidStart(\n accountId,\n validStart.plusNanos(this._chunkInterval * chunk),\n );\n this._transactionIds.push(nextTransactionId);\n this._transactionIds.advance();\n\n if (this._nodeAccountIds.list.length === 0) {\n this._transactions.push(this._makeSignedTransaction(null));\n } else {\n for (const nodeAccountId of this._nodeAccountIds.list) {\n this._transactions.push(\n this._makeSignedTransaction(nodeAccountId),\n );\n }\n }\n }\n\n this._transactionIds.advance();\n this._transactionIds.setLocked();\n }\n\n /**\n * Build all the signed transactions\n * @override\n * @internal\n */\n _buildAllTransactions() {\n if (this.maxChunks && this.getRequiredChunks() > this.maxChunks) {\n throw new Error(\n `cannot build \\`FileAppendTransaction\\` with more than ${this.maxChunks} chunks`,\n );\n }\n for (let i = 0; i < this._signedTransactions.length; i++) {\n this._buildTransaction(i);\n }\n }\n\n /**\n * @returns {string}\n */\n _getLogId() {\n const timestamp = /** @type {import(\"../Timestamp.js\").default} */ (\n this._transactionIds.current.validStart\n );\n return `FileAppendTransaction:${timestamp.toString()}`;\n }\n\n /**\n * @override\n * @protected\n * @returns {HieroProto.proto.IFileAppendTransactionBody}\n */\n _makeTransactionData() {\n const length = this._contents != null ? this._contents.length : 0;\n const startIndex = this._transactionIds.index * this._chunkSize;\n const endIndex = Math.min(startIndex + this._chunkSize, length);\n\n return {\n fileID: this._fileId != null ? this._fileId._toProtobuf() : null,\n contents:\n this._contents != null\n ? this._contents.slice(startIndex, endIndex)\n : null,\n };\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/unbound-method\nTRANSACTION_REGISTRY.set(\"fileAppend\", FileAppendTransaction._fromProtobuf);\n"],"names":["FileAppendTransaction","Transaction","constructor","props","super","this","_fileId","_contents","_maxChunks","_chunkSize","_chunkInterval","_defaultMaxTransactionFee","Hbar","fileId","setFileId","contents","setContents","maxChunks","setMaxChunks","chunkSize","setChunkSize","chunkInterval","setChunkInterval","_transactionIds","List","_fromProtobuf","transactions","signedTransactions","transactionIds","nodeIds","bodies","append","incrementValue","length","i","fileAppend","Uint8Array","concat","set","undefined","firstValidStart","validStart","secondValidStart","nanos","sub","toNumber","_fromProtobufTransactions","fileID","FileId","_requireNotFrozen","fromString","clone","getRequiredChunks","Math","ceil","utf8.encode","Error","freezeWith","client","nextTransactionId","_getTransactionId","locked","_transactions","clear","_signedTransactions","chunk","push","advance","nodeAccountId","_nodeAccountIds","list","_makeSignedTransaction","TransactionId","Timestamp","seconds","add","setLocked","schedule","execute","requestTimeout","executeAll","_isFrozen","transactionId","operatorAccountId","equals","signWithOperator","responses","remainingTimeout","startTimestamp","Date","now","response","getReceipt","_validateChecksums","validateChecksum","_execute","channel","request","file","appendContent","_getTransactionDataCase","_buildIncompleteTransactions","dummyAccountId","AccountId","accountId","fromDate","withValidStart","plusNanos","_buildAllTransactions","_buildTransaction","_getLogId","current","toString","_makeTransactionData","startIndex","index","endIndex","min","_toProtobuf","slice","TRANSACTION_REGISTRY"],"mappings":"qUAqCe,MAAMA,UAA8BC,EAS/C,WAAAC,CAAYC,EAAQ,IAChBC,QAMAC,KAAKC,QAAU,KAMfD,KAAKE,UAAY,KAMjBF,KAAKG,WAAa,GAMlBH,KAAKI,WAAa,KAMlBJ,KAAKK,eAAiB,GAEtBL,KAAKM,0BAA4B,IAAIC,EAAK,GAEtB,MAAhBT,EAAMU,QACNR,KAAKS,UAAUX,EAAMU,QAGH,MAAlBV,EAAMY,UACNV,KAAKW,YAAYb,EAAMY,UAGJ,MAAnBZ,EAAMc,WACNZ,KAAKa,aAAaf,EAAMc,WAGL,MAAnBd,EAAMgB,WACNd,KAAKe,aAAajB,EAAMgB,WAGD,MAAvBhB,EAAMkB,eACNhB,KAAKiB,iBAAiBnB,EAAMkB,eAIhChB,KAAKkB,gBAAkB,IAAIC,CACnC,CAWI,oBAAOC,CACHC,EACAC,EACAC,EACAC,EACAC,GAEA,MACMC,EADOD,EAAO,GAIf,WAEL,IAAIf,EAKJ,MAAMiB,EAAiBH,EAAQI,OAAS,EAAIJ,EAAQI,OAAS,EAE7D,IAAK,IAAIC,EAAI,EAAGA,EAAIJ,EAAOG,OAAQC,GAAKF,EAAgB,CACpD,MAAMG,EAEEL,EAAOI,GACV,WACL,GAA2B,MAAvBC,EAAWpB,SACX,MAGJ,GAAgB,MAAZA,EAAkB,CAClBA,EAAW,IAAIqB,WACgBD,EAAmB,UAElD,QAChB,CAGY,MAAME,EAAS,IAAID,WACfrB,EAASkB,OACsBE,EAAmB,SAAEF,QAExDI,EAAOC,IAAIvB,EAAU,GACrBsB,EAAOC,IACwBH,EAAmB,SAC9CpB,EAASkB,QAEblB,EAAWsB,CACvB,CACQ,MAAMlB,EAAYY,EAAOhB,UAAUkB,aAAUM,EACvCtB,EAAYa,EAAOG,OACnBH,EAAOG,OAASD,OAChBO,EACN,IAAIlB,EACJ,GAAIO,EAAeK,OAAS,EAAG,CAC3B,MAAMO,EAAkBZ,EAAe,GAAGa,WACpCC,EAAmBd,EAAe,GAAGa,WACvCD,GAAmBE,IACnBrB,EAAgBqB,EAAiBC,MAC5BC,IAAIJ,EAAgBG,OACpBE,WAErB,CAEQ,OAAO5C,EAAY6C,0BACf,IAAI9C,EAAsB,CACtBa,OACqB,MAAjBkB,EAAOgB,OACDC,EAAOvB,cAECM,EAClC,aAE0BQ,EACVxB,WACAI,YACAF,YACAI,kBAEJK,EACAC,EACAC,EACAC,EACAC,EAEZ,CAKI,UAAIjB,GACA,OAAOR,KAAKC,OACpB,CAkBI,SAAAQ,CAAUD,GAON,OANAR,KAAK4C,oBACL5C,KAAKC,QACiB,iBAAXO,EACDmC,EAAOE,WAAWrC,GAClBA,EAAOsC,QAEV9C,IACf,CAMI,iBAAA+C,GACI,GAAsB,MAAlB/C,KAAKE,UACL,OAAO,EAKX,OAFe8C,KAAKC,KAAKjD,KAAKE,UAAU0B,OAAS5B,KAAKI,WAG9D,CAKI,YAAIM,GACA,OAAOV,KAAKE,SACpB,CAkBI,WAAAS,CAAYD,GAKR,OAJAV,KAAK4C,oBACL5C,KAAKE,UACDQ,aAAoBqB,WAAarB,EAAWwC,EAAYxC,GAErDV,IACf,CAKI,aAAIY,GACA,OAAOZ,KAAKG,UACpB,CAMI,YAAAU,CAAaD,GACT,GAAIA,GAAa,EACb,MAAM,IAAIuC,MAAM,qCAIpB,OAFAnD,KAAK4C,oBACL5C,KAAKG,WAAaS,EACXZ,IACf,CAKI,aAAIc,GACA,OAAOd,KAAKI,UACpB,CAMI,YAAAW,CAAaD,GACT,GAAIA,GAAa,EACb,MAAM,IAAIqC,MAAM,qCAGpB,OADAnD,KAAKI,WAAaU,EACXd,IACf,CAKI,iBAAIgB,GACA,OAAOhB,KAAKK,cACpB,CAMI,gBAAAY,CAAiBD,GAEb,OADAhB,KAAKK,eAAiBW,EACfhB,IACf,CAYI,UAAAoD,CAAWC,GAGP,GAFAtD,MAAMqD,WAAWC,GAEK,MAAlBrD,KAAKE,UACL,OAAOF,KAGX,IAAIsD,EAAoBtD,KAAKuD,oBAG7BvD,KAAKkB,gBAAgBsC,QAAS,EAE9BxD,KAAKyD,cAAcC,QACnB1D,KAAKkB,gBAAgBwC,QACrB1D,KAAK2D,oBAAoBD,QAEzB,IAAK,IAAIE,EAAQ,EAAGA,EAAQ5D,KAAK+C,oBAAqBa,IAAS,CAC3D5D,KAAKkB,gBAAgB2C,KAAKP,GAC1BtD,KAAKkB,gBAAgB4C,UAErB,IAAK,MAAMC,KAAiB/D,KAAKgE,gBAAgBC,KAC7CjE,KAAK2D,oBAAoBE,KACrB7D,KAAKkE,uBAAuBH,IAIpCT,EAAoB,IAAIa,EACMb,EAA2B,UACrD,IAAIc,EAEId,EACxB,WAAsBe,QAEEf,EACxB,WAAsBhB,MAAMgC,IAAItE,KAAKK,iBAGrC,CAKQ,OAHAL,KAAKkB,gBAAgB4C,UACrB9D,KAAKkB,gBAAgBqD,YAEdvE,IACf,CAKI,QAAAwE,GAGI,GAFAxE,KAAK4C,oBAEiB,MAAlB5C,KAAKE,WAAqBF,KAAKE,UAAU0B,OAAS5B,KAAKI,WACvD,MAAM,IAAI+C,MACN,+DAA+DnD,KAAKI,oBAI5E,OAAOL,MAAMyE,UACrB,CAOI,aAAMC,CAAQpB,EAAQqB,GAClB,aAAc1E,KAAK2E,WAAWtB,EAAQqB,IAAiB,EAC/D,CAOI,gBAAMC,CAAWtB,EAAQqB,GACrB,GAAI1E,KAAKY,WAAaZ,KAAK+C,oBAAsB/C,KAAKY,UAClD,MAAM,IAAIuC,MACN,2DAA2DnD,KAAKY,oBAInEb,MAAM6E,aACP5E,KAAKoD,WAAWC,GAMpB,MAAMwB,EAAgB7E,KAAKuD,oBACrBuB,EAAoBzB,EAAOyB,kBAGR,MAArBA,GACAA,EAAkBC,OACYF,EAAuB,kBAG/C9E,MAAMiF,iBAAiB3B,GAGjC,MAAM4B,EAAY,GAClB,IAAIC,EAAmBR,EAEvB,IAAK,IAAI7C,EAAI,EAAGA,EAAI7B,KAAKkB,gBAAgBU,OAAQC,IAAK,CAClD,MAAMsD,EAAiBC,KAAKC,MACtBC,QAAiBvF,MAAM0E,QAAQpB,EAAQ6B,GAErB,MAApBA,IACAA,EAAmBE,KAAKC,MAAQF,SAG9BG,EAASC,WAAWlC,GAC1B4B,EAAUpB,KAAKyB,EAC3B,CAEQ,OAAOL,CACf,CAKI,kBAAAO,CAAmBnC,GACK,MAAhBrD,KAAKC,SACLD,KAAKC,QAAQwF,iBAAiBpC,EAE1C,CASI,QAAAqC,CAASC,EAASC,GACd,OAAOD,EAAQE,KAAKC,cAAcF,EAC1C,CAOI,uBAAAG,GACI,MAAO,YACf,CAQI,4BAAAC,GACI,MAAMC,EAAiBC,EAAUrD,WAAW,SACtCsD,EAAYnG,KAAK6E,eAAesB,WAAaF,EAC7C7D,EACFpC,KAAK6E,eAAezC,YAAcgC,EAAUgC,SAAS,IAAIhB,MAE7D,GAAIpF,KAAKY,WAAaZ,KAAK+C,oBAAsB/C,KAAKY,UAClD,MAAM,IAAIuC,MACN,yDAAyDnD,KAAKY,oBAKtEZ,KAAKkB,gBAAgBsC,QAAS,EAE9BxD,KAAKyD,cAAcC,QACnB1D,KAAKkB,gBAAgBwC,QACrB1D,KAAK2D,oBAAoBD,QAEzB,IAAK,IAAIE,EAAQ,EAAGA,EAAQ5D,KAAK+C,oBAAqBa,IAAS,CAC3D,IAAIN,EAAoBa,EAAckC,eAClCF,EACA/D,EAAWkE,UAAUtG,KAAKK,eAAiBuD,IAK/C,GAHA5D,KAAKkB,gBAAgB2C,KAAKP,GAC1BtD,KAAKkB,gBAAgB4C,UAEoB,IAArC9D,KAAKgE,gBAAgBC,KAAKrC,OAC1B5B,KAAKyD,cAAcI,KAAK7D,KAAKkE,uBAAuB,YAEpD,IAAK,MAAMH,KAAiB/D,KAAKgE,gBAAgBC,KAC7CjE,KAAKyD,cAAcI,KACf7D,KAAKkE,uBAAuBH,GAIpD,CAEQ/D,KAAKkB,gBAAgB4C,UACrB9D,KAAKkB,gBAAgBqD,WAC7B,CAOI,qBAAAgC,GACI,GAAIvG,KAAKY,WAAaZ,KAAK+C,oBAAsB/C,KAAKY,UAClD,MAAM,IAAIuC,MACN,yDAAyDnD,KAAKY,oBAGtE,IAAK,IAAIiB,EAAI,EAAGA,EAAI7B,KAAK2D,oBAAoB/B,OAAQC,IACjD7B,KAAKwG,kBAAkB3E,EAEnC,CAKI,SAAA4E,GAII,MAAO,yBAFHzG,KAAKkB,gBAAgBwF,QACxB,WACyCC,YAClD,CAOI,oBAAAC,GACI,MAAMhF,EAA2B,MAAlB5B,KAAKE,UAAoBF,KAAKE,UAAU0B,OAAS,EAC1DiF,EAAa7G,KAAKkB,gBAAgB4F,MAAQ9G,KAAKI,WAC/C2G,EAAW/D,KAAKgE,IAAIH,EAAa7G,KAAKI,WAAYwB,GAExD,MAAO,CACHc,OAAwB,MAAhB1C,KAAKC,QAAkBD,KAAKC,QAAQgH,cAAgB,KAC5DvG,SACsB,MAAlBV,KAAKE,UACCF,KAAKE,UAAUgH,MAAML,EAAYE,GACjC,KAEtB,EAIAI,EAAqBlF,IAAI,aAActC,EAAsByB"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _Query = _interopRequireWildcard(require("../query/Query.cjs"));
|
|
8
|
+
var _FileId = _interopRequireDefault(require("./FileId.cjs"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
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); }
|
|
11
|
+
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; }
|
|
12
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @namespace proto
|
|
16
|
+
* @typedef {import("@hashgraph/proto").proto.IQuery} HieroProto.proto.IQuery
|
|
17
|
+
* @typedef {import("@hashgraph/proto").proto.IQueryHeader} HieroProto.proto.IQueryHeader
|
|
18
|
+
* @typedef {import("@hashgraph/proto").proto.IResponse} HieroProto.proto.IResponse
|
|
19
|
+
* @typedef {import("@hashgraph/proto").proto.IResponseHeader} HieroProto.proto.IResponseHeader
|
|
20
|
+
* @typedef {import("@hashgraph/proto").proto.IFileGetContentsQuery} HieroProto.proto.IFileGetContentsQuery
|
|
21
|
+
* @typedef {import("@hashgraph/proto").proto.IFileGetContentsResponse} HieroProto.proto.IFileGetContentsResponse
|
|
22
|
+
* @typedef {import("@hashgraph/proto").proto.FileGetContentsResponse.IFileContents} HieroProto.proto.FileGetContentsResponse.IFileContents
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @typedef {import("../channel/Channel.js").default} Channel
|
|
27
|
+
* @typedef {import("../client/Client.js").default<*, *>} Client
|
|
28
|
+
* @typedef {import("../account/AccountId.js").default} AccountId
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @augments {Query<Uint8Array>}
|
|
33
|
+
* Retrieve the content of a file in HFS.<br/>
|
|
34
|
+
* Note that this query retrieves _only_ the file content, not any of
|
|
35
|
+
* the metadata for the file.
|
|
36
|
+
*/
|
|
37
|
+
class FileContentsQuery extends _Query.default {
|
|
38
|
+
/**
|
|
39
|
+
* @param {object} [props]
|
|
40
|
+
* @param {FileId | string} [props.fileId]
|
|
41
|
+
*/
|
|
42
|
+
constructor(props = {}) {
|
|
43
|
+
super();
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @type {?FileId}
|
|
47
|
+
* @private
|
|
48
|
+
*/
|
|
49
|
+
this._fileId = null;
|
|
50
|
+
if (props.fileId != null) {
|
|
51
|
+
this.setFileId(props.fileId);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @internal
|
|
57
|
+
* @param {HieroProto.proto.IQuery} query
|
|
58
|
+
* @returns {FileContentsQuery}
|
|
59
|
+
*/
|
|
60
|
+
static _fromProtobuf(query) {
|
|
61
|
+
const contents = /** @type {HieroProto.proto.IFileGetContentsQuery} */
|
|
62
|
+
query.fileGetContents;
|
|
63
|
+
return new FileContentsQuery({
|
|
64
|
+
fileId: contents.fileID != null ? _FileId.default._fromProtobuf(contents.fileID) : undefined
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @param {Client} client
|
|
70
|
+
*/
|
|
71
|
+
_validateChecksums(client) {
|
|
72
|
+
if (this._fileId != null) {
|
|
73
|
+
this._fileId.validateChecksum(client);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @override
|
|
79
|
+
* @internal
|
|
80
|
+
* @param {Channel} channel
|
|
81
|
+
* @param {HieroProto.proto.IQuery} request
|
|
82
|
+
* @returns {Promise<HieroProto.proto.IResponse>}
|
|
83
|
+
*/
|
|
84
|
+
_execute(channel, request) {
|
|
85
|
+
return channel.file.getFileContent(request);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* @returns {?FileId}
|
|
90
|
+
*/
|
|
91
|
+
get fileId() {
|
|
92
|
+
return this._fileId;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Set the file ID for which the info is being requested.
|
|
97
|
+
*
|
|
98
|
+
* @param {FileId | string} fileId
|
|
99
|
+
* @returns {FileContentsQuery}
|
|
100
|
+
*/
|
|
101
|
+
setFileId(fileId) {
|
|
102
|
+
this._fileId = typeof fileId === "string" ? _FileId.default.fromString(fileId) : fileId.clone();
|
|
103
|
+
return this;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* @override
|
|
108
|
+
* @internal
|
|
109
|
+
* @param {HieroProto.proto.IResponse} response
|
|
110
|
+
* @returns {HieroProto.proto.IResponseHeader}
|
|
111
|
+
*/
|
|
112
|
+
_mapResponseHeader(response) {
|
|
113
|
+
const fileGetContents = /** @type {HieroProto.proto.IFileGetContentsResponse} */
|
|
114
|
+
response.fileGetContents;
|
|
115
|
+
return /** @type {HieroProto.proto.IResponseHeader} */fileGetContents.header;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* @protected
|
|
120
|
+
* @override
|
|
121
|
+
* @param {HieroProto.proto.IResponse} response
|
|
122
|
+
* @returns {Promise<Uint8Array>}
|
|
123
|
+
*/
|
|
124
|
+
_mapResponse(response) {
|
|
125
|
+
const fileContentsResponse = /** @type {HieroProto.proto.IFileGetContentsResponse} */
|
|
126
|
+
response.fileGetContents;
|
|
127
|
+
const fileConents = /** @type {HieroProto.proto.FileGetContentsResponse.IFileContents} */
|
|
128
|
+
fileContentsResponse.fileContents;
|
|
129
|
+
const contents = /** @type {Uint8Array} */fileConents.contents;
|
|
130
|
+
return Promise.resolve(contents);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* @override
|
|
135
|
+
* @internal
|
|
136
|
+
* @param {HieroProto.proto.IQueryHeader} header
|
|
137
|
+
* @returns {HieroProto.proto.IQuery}
|
|
138
|
+
*/
|
|
139
|
+
_onMakeRequest(header) {
|
|
140
|
+
return {
|
|
141
|
+
fileGetContents: {
|
|
142
|
+
header,
|
|
143
|
+
fileID: this._fileId != null ? this._fileId._toProtobuf() : null
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* @returns {string}
|
|
150
|
+
*/
|
|
151
|
+
_getLogId() {
|
|
152
|
+
const timestamp = this._paymentTransactionId != null && this._paymentTransactionId.validStart != null ? this._paymentTransactionId.validStart : this._timestamp;
|
|
153
|
+
return `FileContentsQuery:${timestamp.toString()}`;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
158
|
+
exports.default = FileContentsQuery;
|
|
159
|
+
_Query.QUERY_REGISTRY.set("fileGetContents", FileContentsQuery._fromProtobuf);
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @namespace proto
|
|
3
|
+
* @typedef {import("@hashgraph/proto").proto.IQuery} HieroProto.proto.IQuery
|
|
4
|
+
* @typedef {import("@hashgraph/proto").proto.IQueryHeader} HieroProto.proto.IQueryHeader
|
|
5
|
+
* @typedef {import("@hashgraph/proto").proto.IResponse} HieroProto.proto.IResponse
|
|
6
|
+
* @typedef {import("@hashgraph/proto").proto.IResponseHeader} HieroProto.proto.IResponseHeader
|
|
7
|
+
* @typedef {import("@hashgraph/proto").proto.IFileGetContentsQuery} HieroProto.proto.IFileGetContentsQuery
|
|
8
|
+
* @typedef {import("@hashgraph/proto").proto.IFileGetContentsResponse} HieroProto.proto.IFileGetContentsResponse
|
|
9
|
+
* @typedef {import("@hashgraph/proto").proto.FileGetContentsResponse.IFileContents} HieroProto.proto.FileGetContentsResponse.IFileContents
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* @typedef {import("../channel/Channel.js").default} Channel
|
|
13
|
+
* @typedef {import("../client/Client.js").default<*, *>} Client
|
|
14
|
+
* @typedef {import("../account/AccountId.js").default} AccountId
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* @augments {Query<Uint8Array>}
|
|
18
|
+
* Retrieve the content of a file in HFS.<br/>
|
|
19
|
+
* Note that this query retrieves _only_ the file content, not any of
|
|
20
|
+
* the metadata for the file.
|
|
21
|
+
*/
|
|
22
|
+
export default class FileContentsQuery extends Query<Uint8Array<ArrayBufferLike>> {
|
|
23
|
+
/**
|
|
24
|
+
* @internal
|
|
25
|
+
* @param {HieroProto.proto.IQuery} query
|
|
26
|
+
* @returns {FileContentsQuery}
|
|
27
|
+
*/
|
|
28
|
+
static _fromProtobuf(query: HieroProto.proto.IQuery): FileContentsQuery;
|
|
29
|
+
/**
|
|
30
|
+
* @param {object} [props]
|
|
31
|
+
* @param {FileId | string} [props.fileId]
|
|
32
|
+
*/
|
|
33
|
+
constructor(props?: {
|
|
34
|
+
fileId?: string | FileId | undefined;
|
|
35
|
+
});
|
|
36
|
+
/**
|
|
37
|
+
* @type {?FileId}
|
|
38
|
+
* @private
|
|
39
|
+
*/
|
|
40
|
+
private _fileId;
|
|
41
|
+
/**
|
|
42
|
+
* @returns {?FileId}
|
|
43
|
+
*/
|
|
44
|
+
get fileId(): FileId | null;
|
|
45
|
+
/**
|
|
46
|
+
* Set the file ID for which the info is being requested.
|
|
47
|
+
*
|
|
48
|
+
* @param {FileId | string} fileId
|
|
49
|
+
* @returns {FileContentsQuery}
|
|
50
|
+
*/
|
|
51
|
+
setFileId(fileId: FileId | string): FileContentsQuery;
|
|
52
|
+
/**
|
|
53
|
+
* @protected
|
|
54
|
+
* @override
|
|
55
|
+
* @param {HieroProto.proto.IResponse} response
|
|
56
|
+
* @returns {Promise<Uint8Array>}
|
|
57
|
+
*/
|
|
58
|
+
protected override _mapResponse(response: HieroProto.proto.IResponse): Promise<Uint8Array>;
|
|
59
|
+
}
|
|
60
|
+
export namespace HieroProto {
|
|
61
|
+
namespace proto {
|
|
62
|
+
type IQuery = import("@hashgraph/proto").proto.IQuery;
|
|
63
|
+
type IQueryHeader = import("@hashgraph/proto").proto.IQueryHeader;
|
|
64
|
+
type IResponse = import("@hashgraph/proto").proto.IResponse;
|
|
65
|
+
type IResponseHeader = import("@hashgraph/proto").proto.IResponseHeader;
|
|
66
|
+
type IFileGetContentsQuery = import("@hashgraph/proto").proto.IFileGetContentsQuery;
|
|
67
|
+
type IFileGetContentsResponse = import("@hashgraph/proto").proto.IFileGetContentsResponse;
|
|
68
|
+
namespace FileGetContentsResponse {
|
|
69
|
+
type IFileContents = import("@hashgraph/proto").proto.FileGetContentsResponse.IFileContents;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
export type Channel = import("../channel/Channel.js").default;
|
|
74
|
+
export type Client = import("../client/Client.js").default<any, any>;
|
|
75
|
+
export type AccountId = import("../account/AccountId.js").default;
|
|
76
|
+
import Query from "../query/Query.js";
|
|
77
|
+
import FileId from "./FileId.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import e,{QUERY_REGISTRY as t}from"../query/Query.js";import i from"./FileId.js";class n extends e{constructor(e={}){super(),this._fileId=null,null!=e.fileId&&this.setFileId(e.fileId)}static _fromProtobuf(e){const t=e.fileGetContents;return new n({fileId:null!=t.fileID?i._fromProtobuf(t.fileID):void 0})}_validateChecksums(e){null!=this._fileId&&this._fileId.validateChecksum(e)}_execute(e,t){return e.file.getFileContent(t)}get fileId(){return this._fileId}setFileId(e){return this._fileId="string"==typeof e?i.fromString(e):e.clone(),this}_mapResponseHeader(e){return e.fileGetContents.header}_mapResponse(e){const t=e.fileGetContents.fileContents.contents;return Promise.resolve(t)}_onMakeRequest(e){return{fileGetContents:{header:e,fileID:null!=this._fileId?this._fileId._toProtobuf():null}}}_getLogId(){return`FileContentsQuery:${(null!=this._paymentTransactionId&&null!=this._paymentTransactionId.validStart?this._paymentTransactionId.validStart:this._timestamp).toString()}`}}t.set("fileGetContents",n._fromProtobuf);export{n as default};
|
|
2
|
+
//# sourceMappingURL=FileContentsQuery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileContentsQuery.js","sources":["../../src/file/FileContentsQuery.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Query, { QUERY_REGISTRY } from \"../query/Query.js\";\nimport FileId from \"./FileId.js\";\n\n/**\n * @namespace proto\n * @typedef {import(\"@hashgraph/proto\").proto.IQuery} HieroProto.proto.IQuery\n * @typedef {import(\"@hashgraph/proto\").proto.IQueryHeader} HieroProto.proto.IQueryHeader\n * @typedef {import(\"@hashgraph/proto\").proto.IResponse} HieroProto.proto.IResponse\n * @typedef {import(\"@hashgraph/proto\").proto.IResponseHeader} HieroProto.proto.IResponseHeader\n * @typedef {import(\"@hashgraph/proto\").proto.IFileGetContentsQuery} HieroProto.proto.IFileGetContentsQuery\n * @typedef {import(\"@hashgraph/proto\").proto.IFileGetContentsResponse} HieroProto.proto.IFileGetContentsResponse\n * @typedef {import(\"@hashgraph/proto\").proto.FileGetContentsResponse.IFileContents} HieroProto.proto.FileGetContentsResponse.IFileContents\n */\n\n/**\n * @typedef {import(\"../channel/Channel.js\").default} Channel\n * @typedef {import(\"../client/Client.js\").default<*, *>} Client\n * @typedef {import(\"../account/AccountId.js\").default} AccountId\n */\n\n/**\n * @augments {Query<Uint8Array>}\n * Retrieve the content of a file in HFS.<br/>\n * Note that this query retrieves _only_ the file content, not any of\n * the metadata for the file.\n */\nexport default class FileContentsQuery extends Query {\n /**\n * @param {object} [props]\n * @param {FileId | string} [props.fileId]\n */\n constructor(props = {}) {\n super();\n\n /**\n * @type {?FileId}\n * @private\n */\n this._fileId = null;\n if (props.fileId != null) {\n this.setFileId(props.fileId);\n }\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.IQuery} query\n * @returns {FileContentsQuery}\n */\n static _fromProtobuf(query) {\n const contents = /** @type {HieroProto.proto.IFileGetContentsQuery} */ (\n query.fileGetContents\n );\n\n return new FileContentsQuery({\n fileId:\n contents.fileID != null\n ? FileId._fromProtobuf(contents.fileID)\n : undefined,\n });\n }\n\n /**\n * @param {Client} client\n */\n _validateChecksums(client) {\n if (this._fileId != null) {\n this._fileId.validateChecksum(client);\n }\n }\n\n /**\n * @override\n * @internal\n * @param {Channel} channel\n * @param {HieroProto.proto.IQuery} request\n * @returns {Promise<HieroProto.proto.IResponse>}\n */\n _execute(channel, request) {\n return channel.file.getFileContent(request);\n }\n\n /**\n * @returns {?FileId}\n */\n get fileId() {\n return this._fileId;\n }\n\n /**\n * Set the file ID for which the info is being requested.\n *\n * @param {FileId | string} fileId\n * @returns {FileContentsQuery}\n */\n setFileId(fileId) {\n this._fileId =\n typeof fileId === \"string\"\n ? FileId.fromString(fileId)\n : fileId.clone();\n\n return this;\n }\n\n /**\n * @override\n * @internal\n * @param {HieroProto.proto.IResponse} response\n * @returns {HieroProto.proto.IResponseHeader}\n */\n _mapResponseHeader(response) {\n const fileGetContents =\n /** @type {HieroProto.proto.IFileGetContentsResponse} */ (\n response.fileGetContents\n );\n return /** @type {HieroProto.proto.IResponseHeader} */ (\n fileGetContents.header\n );\n }\n\n /**\n * @protected\n * @override\n * @param {HieroProto.proto.IResponse} response\n * @returns {Promise<Uint8Array>}\n */\n _mapResponse(response) {\n const fileContentsResponse =\n /** @type {HieroProto.proto.IFileGetContentsResponse} */ (\n response.fileGetContents\n );\n const fileConents =\n /** @type {HieroProto.proto.FileGetContentsResponse.IFileContents} */ (\n fileContentsResponse.fileContents\n );\n const contents = /** @type {Uint8Array} */ (fileConents.contents);\n\n return Promise.resolve(contents);\n }\n\n /**\n * @override\n * @internal\n * @param {HieroProto.proto.IQueryHeader} header\n * @returns {HieroProto.proto.IQuery}\n */\n _onMakeRequest(header) {\n return {\n fileGetContents: {\n header,\n fileID:\n this._fileId != null ? this._fileId._toProtobuf() : null,\n },\n };\n }\n\n /**\n * @returns {string}\n */\n _getLogId() {\n const timestamp =\n this._paymentTransactionId != null &&\n this._paymentTransactionId.validStart != null\n ? this._paymentTransactionId.validStart\n : this._timestamp;\n\n return `FileContentsQuery:${timestamp.toString()}`;\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/unbound-method\nQUERY_REGISTRY.set(\"fileGetContents\", FileContentsQuery._fromProtobuf);\n"],"names":["FileContentsQuery","Query","constructor","props","super","this","_fileId","fileId","setFileId","_fromProtobuf","query","contents","fileID","FileId","undefined","_validateChecksums","client","validateChecksum","_execute","channel","request","file","getFileContent","fromString","clone","_mapResponseHeader","response","_mapResponse","Promise","resolve","_onMakeRequest","header","fileGetContents","_toProtobuf","_getLogId","_paymentTransactionId","validStart","_timestamp","toString","QUERY_REGISTRY","set"],"mappings":"iFA4Be,MAAMA,UAA0BC,EAK3C,WAAAC,CAAYC,EAAQ,IAChBC,QAMAC,KAAKC,QAAU,KACK,MAAhBH,EAAMI,QACNF,KAAKG,UAAUL,EAAMI,OAEjC,CAOI,oBAAOE,CAAcC,GACjB,MAAMC,EACFD,EACH,gBAED,OAAO,IAAIV,EAAkB,CACzBO,OACuB,MAAnBI,EAASC,OACHC,EAAOJ,cAAcE,EAASC,aAC9BE,GAEtB,CAKI,kBAAAC,CAAmBC,GACK,MAAhBX,KAAKC,SACLD,KAAKC,QAAQW,iBAAiBD,EAE1C,CASI,QAAAE,CAASC,EAASC,GACd,OAAOD,EAAQE,KAAKC,eAAeF,EAC3C,CAKI,UAAIb,GACA,OAAOF,KAAKC,OACpB,CAQI,SAAAE,CAAUD,GAMN,OALAF,KAAKC,QACiB,iBAAXC,EACDM,EAAOU,WAAWhB,GAClBA,EAAOiB,QAEVnB,IACf,CAQI,kBAAAoB,CAAmBC,GAKf,OAFQA,EACH,gBAGb,MACA,CAQI,YAAAC,CAAaD,GACT,MAQMf,EANEe,EACH,gBAIA,aAC2D,SAEhE,OAAOE,QAAQC,QAAQlB,EAC/B,CAQI,cAAAmB,CAAeC,GACX,MAAO,CACHC,gBAAiB,CACbD,SACAnB,OACoB,MAAhBP,KAAKC,QAAkBD,KAAKC,QAAQ2B,cAAgB,MAGxE,CAKI,SAAAC,GAOI,MAAO,sBAL2B,MAA9B7B,KAAK8B,uBACoC,MAAzC9B,KAAK8B,sBAAsBC,WACrB/B,KAAK8B,sBAAsBC,WAC3B/B,KAAKgC,YAEuBC,YAC9C,EAIAC,EAAeC,IAAI,kBAAmBxC,EAAkBS"}
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _Hbar = _interopRequireDefault(require("../Hbar.cjs"));
|
|
8
|
+
var _Transaction = _interopRequireWildcard(require("../transaction/Transaction.cjs"));
|
|
9
|
+
var utf8 = _interopRequireWildcard(require("../encoding/utf8.cjs"));
|
|
10
|
+
var _Timestamp = _interopRequireDefault(require("../Timestamp.cjs"));
|
|
11
|
+
var _Key = _interopRequireDefault(require("../Key.cjs"));
|
|
12
|
+
var _KeyList = _interopRequireDefault(require("../KeyList.cjs"));
|
|
13
|
+
var _long = _interopRequireDefault(require("long"));
|
|
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
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @namespace proto
|
|
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.IFileCreateTransactionBody} HieroProto.proto.IFileCreateTransactionBody
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @typedef {import("../channel/Channel.js").default} Channel
|
|
31
|
+
* @typedef {import("../account/AccountId.js").default} AccountId
|
|
32
|
+
* @typedef {import("../transaction/TransactionId.js").default} TransactionId
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Create a new Hedera™ crypto-currency file.
|
|
37
|
+
*/
|
|
38
|
+
class FileCreateTransaction extends _Transaction.default {
|
|
39
|
+
/**
|
|
40
|
+
* @param {object} [props]
|
|
41
|
+
* @param {Key[] | KeyList} [props.keys]
|
|
42
|
+
* @param {Timestamp | Date} [props.expirationTime]
|
|
43
|
+
* @param {Uint8Array | string} [props.contents]
|
|
44
|
+
* @param {string} [props.fileMemo]
|
|
45
|
+
*/
|
|
46
|
+
constructor(props = {}) {
|
|
47
|
+
super();
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @private
|
|
51
|
+
* @type {?Key[]}
|
|
52
|
+
*/
|
|
53
|
+
this._keys = null;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @private
|
|
57
|
+
* @type {Timestamp}
|
|
58
|
+
*/
|
|
59
|
+
this._expirationTime = new _Timestamp.default(0, 0).plusNanos(_long.default.fromNumber(Date.now()).mul(1000000).add(_Transaction.DEFAULT_AUTO_RENEW_PERIOD.mul(1000000000)));
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @private
|
|
63
|
+
* @type {?Uint8Array}
|
|
64
|
+
*/
|
|
65
|
+
this._contents = null;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @private
|
|
69
|
+
* @type {?string}
|
|
70
|
+
*/
|
|
71
|
+
this._fileMemo = null;
|
|
72
|
+
this._defaultMaxTransactionFee = new _Hbar.default(5);
|
|
73
|
+
if (props.keys != null) {
|
|
74
|
+
this.setKeys(props.keys);
|
|
75
|
+
}
|
|
76
|
+
if (props.expirationTime != null) {
|
|
77
|
+
this.setExpirationTime(props.expirationTime);
|
|
78
|
+
}
|
|
79
|
+
if (props.contents != null) {
|
|
80
|
+
this.setContents(props.contents);
|
|
81
|
+
}
|
|
82
|
+
if (props.fileMemo && props.fileMemo != null) {
|
|
83
|
+
this.setFileMemo(props.fileMemo);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* @internal
|
|
89
|
+
* @param {HieroProto.proto.ITransaction[]} transactions
|
|
90
|
+
* @param {HieroProto.proto.ISignedTransaction[]} signedTransactions
|
|
91
|
+
* @param {TransactionId[]} transactionIds
|
|
92
|
+
* @param {AccountId[]} nodeIds
|
|
93
|
+
* @param {HieroProto.proto.ITransactionBody[]} bodies
|
|
94
|
+
* @returns {FileCreateTransaction}
|
|
95
|
+
*/
|
|
96
|
+
static _fromProtobuf(transactions, signedTransactions, transactionIds, nodeIds, bodies) {
|
|
97
|
+
const body = bodies[0];
|
|
98
|
+
const create = /** @type {HieroProto.proto.IFileCreateTransactionBody} */
|
|
99
|
+
body.fileCreate;
|
|
100
|
+
return _Transaction.default._fromProtobufTransactions(new FileCreateTransaction({
|
|
101
|
+
keys: create.keys != null ? create.keys.keys != null ? create.keys.keys.map(key => _Key.default._fromProtobufKey(key)) : undefined : undefined,
|
|
102
|
+
expirationTime: create.expirationTime != null ? _Timestamp.default._fromProtobuf(create.expirationTime) : undefined,
|
|
103
|
+
contents: create.contents != null ? create.contents : undefined,
|
|
104
|
+
fileMemo: create.memo != null ? create.memo : undefined
|
|
105
|
+
}), transactions, signedTransactions, transactionIds, nodeIds, bodies);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* @returns {?Key[]}
|
|
110
|
+
*/
|
|
111
|
+
get keys() {
|
|
112
|
+
return this._keys;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Set the keys which must sign any transactions modifying this file. Required.
|
|
117
|
+
*
|
|
118
|
+
* All keys must sign to modify the file's contents or keys. No key is required
|
|
119
|
+
* to sign for extending the expiration time (except the one for the operator account
|
|
120
|
+
* paying for the transaction). Only one key must sign to delete the file, however.
|
|
121
|
+
*
|
|
122
|
+
* To require more than one key to sign to delete a file, add them to a
|
|
123
|
+
* KeyList and pass that here.
|
|
124
|
+
*
|
|
125
|
+
* The network currently requires a file to have at least one key (or key list or threshold key)
|
|
126
|
+
* but this requirement may be lifted in the future.
|
|
127
|
+
*
|
|
128
|
+
* @param {Key[] | KeyList} keys
|
|
129
|
+
* @returns {this}
|
|
130
|
+
*/
|
|
131
|
+
setKeys(keys) {
|
|
132
|
+
this._requireNotFrozen();
|
|
133
|
+
if (keys instanceof _KeyList.default && keys.threshold != null) {
|
|
134
|
+
throw new Error("Cannot set threshold key as file key");
|
|
135
|
+
}
|
|
136
|
+
this._keys = keys instanceof _KeyList.default ? keys.toArray() : keys;
|
|
137
|
+
return this;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* @returns {Timestamp}
|
|
142
|
+
*/
|
|
143
|
+
get expirationTime() {
|
|
144
|
+
return this._expirationTime;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Set the instant at which this file will expire, after which its contents will no longer be
|
|
149
|
+
* available.
|
|
150
|
+
*
|
|
151
|
+
* Defaults to 1/4 of a Julian year from the instant FileCreateTransaction
|
|
152
|
+
* was invoked.
|
|
153
|
+
*
|
|
154
|
+
* May be extended using FileUpdateTransaction#setExpirationTime(Timestamp).
|
|
155
|
+
*
|
|
156
|
+
* @param {Timestamp | Date} expirationTime
|
|
157
|
+
* @returns {this}
|
|
158
|
+
*/
|
|
159
|
+
setExpirationTime(expirationTime) {
|
|
160
|
+
this._requireNotFrozen();
|
|
161
|
+
this._expirationTime = expirationTime instanceof _Timestamp.default ? expirationTime : _Timestamp.default.fromDate(expirationTime);
|
|
162
|
+
return this;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* @returns {?Uint8Array}
|
|
167
|
+
*/
|
|
168
|
+
get contents() {
|
|
169
|
+
return this._contents;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Set the given byte array as the file's contents.
|
|
174
|
+
*
|
|
175
|
+
* This may be omitted to create an empty file.
|
|
176
|
+
*
|
|
177
|
+
* Note that total size for a given transaction is limited to 6KiB (as of March 2020) by the
|
|
178
|
+
* network; if you exceed this you may receive a HederaPreCheckStatusException
|
|
179
|
+
* with Status#TransactionOversize.
|
|
180
|
+
*
|
|
181
|
+
* In this case, you will need to break the data into chunks of less than ~6KiB and execute this
|
|
182
|
+
* transaction with the first chunk and then use FileAppendTransaction with
|
|
183
|
+
* FileAppendTransaction#setContents(Uint8Array) for the remaining chunks.
|
|
184
|
+
*
|
|
185
|
+
* @param {Uint8Array | string} contents
|
|
186
|
+
* @returns {this}
|
|
187
|
+
*/
|
|
188
|
+
setContents(contents) {
|
|
189
|
+
this._requireNotFrozen();
|
|
190
|
+
this._contents = contents instanceof Uint8Array ? contents : utf8.encode(contents);
|
|
191
|
+
return this;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* @returns {?string}
|
|
196
|
+
*/
|
|
197
|
+
get fileMemo() {
|
|
198
|
+
return this._fileMemo;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* @param {string} memo
|
|
203
|
+
* @returns {this}
|
|
204
|
+
*/
|
|
205
|
+
setFileMemo(memo) {
|
|
206
|
+
this._requireNotFrozen();
|
|
207
|
+
this._fileMemo = memo;
|
|
208
|
+
return this;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* @override
|
|
213
|
+
* @internal
|
|
214
|
+
* @param {Channel} channel
|
|
215
|
+
* @param {HieroProto.proto.ITransaction} request
|
|
216
|
+
* @returns {Promise<HieroProto.proto.ITransactionResponse>}
|
|
217
|
+
*/
|
|
218
|
+
_execute(channel, request) {
|
|
219
|
+
return channel.file.createFile(request);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* @override
|
|
224
|
+
* @protected
|
|
225
|
+
* @returns {NonNullable<HieroProto.proto.TransactionBody["data"]>}
|
|
226
|
+
*/
|
|
227
|
+
_getTransactionDataCase() {
|
|
228
|
+
return "fileCreate";
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* @override
|
|
233
|
+
* @protected
|
|
234
|
+
* @returns {HieroProto.proto.IFileCreateTransactionBody}
|
|
235
|
+
*/
|
|
236
|
+
_makeTransactionData() {
|
|
237
|
+
return {
|
|
238
|
+
keys: this._keys != null ? {
|
|
239
|
+
keys: this._keys.map(key => key._toProtobufKey())
|
|
240
|
+
} : null,
|
|
241
|
+
expirationTime: this._expirationTime._toProtobuf(),
|
|
242
|
+
contents: this._contents,
|
|
243
|
+
memo: this._fileMemo
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* @returns {string}
|
|
249
|
+
*/
|
|
250
|
+
_getLogId() {
|
|
251
|
+
const timestamp = /** @type {import("../Timestamp.js").default} */
|
|
252
|
+
this._transactionIds.current.validStart;
|
|
253
|
+
return `FileCreateTransaction:${timestamp.toString()}`;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
258
|
+
exports.default = FileCreateTransaction;
|
|
259
|
+
_Transaction.TRANSACTION_REGISTRY.set("fileCreate", FileCreateTransaction._fromProtobuf);
|