@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
package/lib/Cache.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Cache.js","sources":["../src/Cache.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\n/**\n * @typedef {import(\"./contract/ContractId.js\").default} ContractId\n * @typedef {import(\"./account/AccountId.js\").default} AccountId\n * @typedef {import(\"./KeyList.js\").default} KeyList\n * @typedef {import(\"./PublicKey.js\").default} PublicKey\n * @typedef {import(\"./PrivateKey.js\").default} PrivateKey\n * @typedef {import(\"./Mnemonic.js\").default} Mnemonic\n * @typedef {import(\"./EvmAddress.js\").default} EvmAddress\n * @typedef {import(\"./EthereumTransactionData.js\").default} EthereumTransactionData\n * @typedef {import(\"./transaction/TransactionReceiptQuery.js\").default} TransactionReceiptQuery\n * @typedef {import(\"./transaction/TransactionRecordQuery.js\").default} TransactionRecordQuery\n * @typedef {import(\"./network/AddressBookQuery.js\").default} AddressBookQuery\n */\n\n/**\n * @namespace proto\n * @typedef {import(\"@hashgraph/proto\").proto.IKey} HieroProto.proto.IKey\n * @typedef {import(\"@hashgraph/proto\").proto.IKeyList} HieroProto.proto.IKeyList\n * @typedef {import(\"@hashgraph/proto\").proto.IThresholdKey} HieroProto.proto.IThresholdKey\n * @typedef {import(\"@hashgraph/proto\").proto.IContractID} HieroProto.proto.IContractID\n */\n\n/**\n * @namespace cryptography\n * @typedef {import(\"@hashgraph/cryptography\").PrivateKey} cryptography.PrivateKey\n * @typedef {import(\"@hashgraph/cryptography\").Mnemonic} cryptography.Mnemonic\n */\n\n/**\n * @template {object} ProtobufT\n * @template {object} SdkT\n * @typedef {{ (proto: ProtobufT): SdkT }} FromProtobufKeyFuncT\n */\n\n/**\n * Cache class is designed to prevent cyclic dependencies in the Hiero JavaScript SDK.\n * It stores various conversion functions and configuration values that are used across\n * different parts of the SDK.\n */\nclass Cache {\n constructor() {\n /** @type {number} */\n this._timeDrift = 0;\n\n /** @type {FromProtobufKeyFuncT<HieroProto.proto.IContractID, ContractId> | null} */\n this._contractId = null;\n\n /** @type {FromProtobufKeyFuncT<HieroProto.proto.IKeyList, KeyList> | null} */\n this._keyList = null;\n\n /** @type {FromProtobufKeyFuncT<HieroProto.proto.IThresholdKey, KeyList> | null} */\n this._thresholdKey = null;\n\n /** @type {FromProtobufKeyFuncT<Uint8Array, PublicKey> | null} */\n this._publicKeyED25519 = null;\n\n /** @type {FromProtobufKeyFuncT<Uint8Array, PublicKey> | null} */\n this._publicKeyECDSA = null;\n\n /** @type {((key: cryptography.PrivateKey) => PrivateKey) | null} */\n this._privateKeyConstructor = null;\n\n /** @type {((key: cryptography.Mnemonic) => Mnemonic) | null} */\n this._mnemonicFromString = null;\n\n /** @type {((shard: Long | number, realm: Long | number, key: PublicKey) => AccountId) | null} */\n this._accountIdConstructor = null;\n\n /** @type {FromProtobufKeyFuncT<HieroProto.proto.IContractID, ContractId> | null} */\n this._delegateContractId = null;\n\n /** @type {FromProtobufKeyFuncT<Uint8Array, EvmAddress> | null} */\n this._evmAddress = null;\n\n /** @type {((bytes: Uint8Array) => EthereumTransactionData) | null} */\n this._ethereumTransactionDataLegacyFromBytes = null;\n\n /** @type {((bytes: Uint8Array) => EthereumTransactionData) | null} */\n this._ethereumTransactionDataEip1559FromBytes = null;\n\n /** @type {((bytes: Uint8Array) => EthereumTransactionData) | null} */\n this._ethereumTransactionDataEip2930FromBytes = null;\n\n /** @type {(() => TransactionReceiptQuery) | null} */\n this._transactionReceiptQueryConstructor = null;\n\n /** @type {(() => TransactionRecordQuery) | null} */\n this._transactionRecordQueryConstructor = null;\n }\n\n /**\n * @param {number} timeDrift\n */\n setTimeDrift(timeDrift) {\n this._timeDrift = timeDrift;\n }\n\n /**\n * @returns {number}\n */\n get timeDrift() {\n if (this._timeDrift == null) {\n throw new Error(\"Cache.timeDrift was used before it was set\");\n }\n\n return this._timeDrift;\n }\n\n /**\n * @param {FromProtobufKeyFuncT<HieroProto.proto.IContractID, ContractId>} contractId\n */\n setContractId(contractId) {\n this._contractId = contractId;\n }\n\n /**\n * @returns {FromProtobufKeyFuncT<HieroProto.proto.IContractID, ContractId>}\n */\n get contractId() {\n if (this._contractId == null) {\n throw new Error(\"Cache.contractId was used before it was set\");\n }\n\n return this._contractId;\n }\n\n /**\n * @param {FromProtobufKeyFuncT<HieroProto.proto.IKeyList, KeyList>} keyList\n */\n setKeyList(keyList) {\n this._keyList = keyList;\n }\n\n /**\n * @returns {FromProtobufKeyFuncT<HieroProto.proto.IKeyList, KeyList>}\n */\n get keyList() {\n if (this._keyList == null) {\n throw new Error(\"Cache.keyList was used before it was set\");\n }\n\n return this._keyList;\n }\n\n /**\n * @param {FromProtobufKeyFuncT<HieroProto.proto.IThresholdKey, KeyList>} thresholdKey\n */\n setThresholdKey(thresholdKey) {\n this._thresholdKey = thresholdKey;\n }\n\n /**\n * @returns {FromProtobufKeyFuncT<HieroProto.proto.IThresholdKey, KeyList>}\n */\n get thresholdKey() {\n if (this._thresholdKey == null) {\n throw new Error(\"Cache.thresholdKey was used before it was set\");\n }\n\n return this._thresholdKey;\n }\n\n /**\n * @param {FromProtobufKeyFuncT<Uint8Array, PublicKey>} publicKeyED25519\n */\n setPublicKeyED25519(publicKeyED25519) {\n this._publicKeyED25519 = publicKeyED25519;\n }\n\n /**\n * @returns {FromProtobufKeyFuncT<Uint8Array, PublicKey>}\n */\n get publicKeyED25519() {\n if (this._publicKeyED25519 == null) {\n throw new Error(\n \"Cache.publicKeyED25519 was used before it was set\",\n );\n }\n\n return this._publicKeyED25519;\n }\n\n /**\n * @param {FromProtobufKeyFuncT<Uint8Array, PublicKey>} publicKeyECDSA\n */\n setPublicKeyECDSA(publicKeyECDSA) {\n this._publicKeyECDSA = publicKeyECDSA;\n }\n\n /**\n * @returns {FromProtobufKeyFuncT<Uint8Array, PublicKey>}\n */\n get publicKeyECDSA() {\n if (this._publicKeyECDSA == null) {\n throw new Error(\"Cache.publicKeyECDSA was used before it was set\");\n }\n\n return this._publicKeyECDSA;\n }\n\n /**\n * @param {((key: cryptography.PrivateKey) => PrivateKey)} privateKeyConstructor\n */\n setPrivateKeyConstructor(privateKeyConstructor) {\n this._privateKeyConstructor = privateKeyConstructor;\n }\n\n /**\n * @returns {((key: cryptography.PrivateKey) => PrivateKey)}\n */\n get privateKeyConstructor() {\n if (this._privateKeyConstructor == null) {\n throw new Error(\n \"Cache.privateKeyConstructor was used before it was set\",\n );\n }\n\n return this._privateKeyConstructor;\n }\n\n /**\n * @param {((key: cryptography.Mnemonic) => Mnemonic)} mnemonicFromString\n */\n setMnemonicFromString(mnemonicFromString) {\n this._mnemonicFromString = mnemonicFromString;\n }\n\n /**\n * @returns {((key: cryptography.PrivateKey) => PrivateKey)}\n */\n get mnemonicFromString() {\n if (this._mnemonicFromString == null) {\n throw new Error(\n \"Cache.mnemonicFromString was used before it was set\",\n );\n }\n\n return this.mnemonicFromString;\n }\n\n /**\n * @param {((shard: Long | number, realm: Long | number, key: PublicKey) => AccountId)} accountIdConstructor\n */\n setAccountIdConstructor(accountIdConstructor) {\n this._accountIdConstructor = accountIdConstructor;\n }\n\n /**\n * @returns {((shard: Long | number, realm: Long | number, key: PublicKey) => AccountId)}\n */\n get accountIdConstructor() {\n if (this._accountIdConstructor == null) {\n throw new Error(\n \"Cache.accountIdConstructor was used before it was set\",\n );\n }\n\n return this._accountIdConstructor;\n }\n\n /**\n * @param {FromProtobufKeyFuncT<HieroProto.proto.IContractID, ContractId>} delegateContractId\n */\n setDelegateContractId(delegateContractId) {\n this._delegateContractId = delegateContractId;\n }\n\n /**\n * @returns {FromProtobufKeyFuncT<HieroProto.proto.IContractID, ContractId>}\n */\n get delegateContractId() {\n if (this._delegateContractId == null) {\n throw new Error(\n \"Cache.delegateContractId was used before it was set\",\n );\n }\n\n return this._delegateContractId;\n }\n\n /**\n * @param {FromProtobufKeyFuncT<Uint8Array, EvmAddress>} evmAddress\n */\n setEvmAddress(evmAddress) {\n this._evmAddress = evmAddress;\n }\n\n /**\n * @returns {FromProtobufKeyFuncT<Uint8Array, EvmAddress>}\n */\n get evmAddress() {\n if (this._evmAddress == null) {\n throw new Error(\"Cache.evmAddress was used before it was set\");\n }\n\n return this._evmAddress;\n }\n\n /**\n * @param {((bytes: Uint8Array) => EthereumTransactionData)} ethereumTransactionDataLegacyFromBytes\n */\n setEthereumTransactionDataLegacyFromBytes(\n ethereumTransactionDataLegacyFromBytes,\n ) {\n this._ethereumTransactionDataLegacyFromBytes =\n ethereumTransactionDataLegacyFromBytes;\n }\n\n /**\n * @returns {((bytes: Uint8Array) => EthereumTransactionData)}\n */\n get ethereumTransactionDataLegacyFromBytes() {\n if (this._ethereumTransactionDataLegacyFromBytes == null) {\n throw new Error(\n \"Cache.ethereumTransactionDataLegacyFromBytes was used before it was set\",\n );\n }\n\n return this._ethereumTransactionDataLegacyFromBytes;\n }\n\n /**\n * @param {((bytes: Uint8Array) => EthereumTransactionData)} ethereumTransactionDataEip1559FromBytes\n */\n setEthereumTransactionDataEip1559FromBytes(\n ethereumTransactionDataEip1559FromBytes,\n ) {\n this._ethereumTransactionDataEip1559FromBytes =\n ethereumTransactionDataEip1559FromBytes;\n }\n\n /**\n * @returns {((bytes: Uint8Array) => EthereumTransactionData)}\n */\n get ethereumTransactionDataEip1559FromBytes() {\n if (this._ethereumTransactionDataEip1559FromBytes == null) {\n throw new Error(\n \"Cache.ethereumTransactionDataEip1559FromBytes was used before it was set\",\n );\n }\n\n return this._ethereumTransactionDataEip1559FromBytes;\n }\n\n /**\n * @param {((bytes: Uint8Array) => EthereumTransactionData)} ethereumTransactionDataEip2930FromBytes\n */\n setEthereumTransactionDataEip2930FromBytes(\n ethereumTransactionDataEip2930FromBytes,\n ) {\n this._ethereumTransactionDataEip2930FromBytes =\n ethereumTransactionDataEip2930FromBytes;\n }\n\n /**\n * @returns {((bytes: Uint8Array) => EthereumTransactionData)}\n */\n get ethereumTransactionDataEip2930FromBytes() {\n if (this._ethereumTransactionDataEip2930FromBytes == null) {\n throw new Error(\n \"Cache.ethereumTransactionDataEip2930FromBytes was used before it was set\",\n );\n }\n\n return this._ethereumTransactionDataEip2930FromBytes;\n }\n\n /**\n * @param {(() => TransactionReceiptQuery)} transactionReceiptQueryConstructor\n */\n setTransactionReceiptQueryConstructor(transactionReceiptQueryConstructor) {\n this._transactionReceiptQueryConstructor =\n transactionReceiptQueryConstructor;\n }\n\n /**\n * @returns {(() => TransactionReceiptQuery)}\n */\n get transactionReceiptQueryConstructor() {\n if (this._transactionReceiptQueryConstructor == null) {\n throw new Error(\n \"Cache.transactionReceiptQueryConstructor was used before it was set\",\n );\n }\n\n return this._transactionReceiptQueryConstructor;\n }\n\n /**\n * @param {(() => TransactionRecordQuery)} transactionRecordQueryConstructor\n */\n setTransactionRecordQueryConstructor(transactionRecordQueryConstructor) {\n this._transactionRecordQueryConstructor =\n transactionRecordQueryConstructor;\n }\n\n /**\n * @returns {(() => TransactionRecordQuery)}\n */\n get transactionRecordQueryConstructor() {\n if (this._transactionRecordQueryConstructor == null) {\n throw new Error(\n \"Cache.transactionRecordQueryConstructor was used before it was set\",\n );\n }\n\n return this._transactionRecordQueryConstructor;\n }\n}\n\n/**\n * This variable is strictly designed to prevent cyclic dependencies.\n */\nconst CACHE = new Cache();\n\nexport default CACHE;\n"],"names":["CACHE","constructor","this","_timeDrift","_contractId","_keyList","_thresholdKey","_publicKeyED25519","_publicKeyECDSA","_privateKeyConstructor","_mnemonicFromString","_accountIdConstructor","_delegateContractId","_evmAddress","_ethereumTransactionDataLegacyFromBytes","_ethereumTransactionDataEip1559FromBytes","_ethereumTransactionDataEip2930FromBytes","_transactionReceiptQueryConstructor","_transactionRecordQueryConstructor","setTimeDrift","timeDrift","Error","setContractId","contractId","setKeyList","keyList","setThresholdKey","thresholdKey","setPublicKeyED25519","publicKeyED25519","setPublicKeyECDSA","publicKeyECDSA","setPrivateKeyConstructor","privateKeyConstructor","setMnemonicFromString","mnemonicFromString","setAccountIdConstructor","accountIdConstructor","setDelegateContractId","delegateContractId","setEvmAddress","evmAddress","setEthereumTransactionDataLegacyFromBytes","ethereumTransactionDataLegacyFromBytes","setEthereumTransactionDataEip1559FromBytes","ethereumTransactionDataEip1559FromBytes","setEthereumTransactionDataEip2930FromBytes","ethereumTransactionDataEip2930FromBytes","setTransactionReceiptQueryConstructor","transactionReceiptQueryConstructor","setTransactionRecordQueryConstructor","transactionRecordQueryConstructor"],"mappings":"AA+ZK,MAACA,EAAQ,IAtXd,MACI,WAAAC,GAEIC,KAAKC,WAAa,EAGlBD,KAAKE,YAAc,KAGnBF,KAAKG,SAAW,KAGhBH,KAAKI,cAAgB,KAGrBJ,KAAKK,kBAAoB,KAGzBL,KAAKM,gBAAkB,KAGvBN,KAAKO,uBAAyB,KAG9BP,KAAKQ,oBAAsB,KAG3BR,KAAKS,sBAAwB,KAG7BT,KAAKU,oBAAsB,KAG3BV,KAAKW,YAAc,KAGnBX,KAAKY,wCAA0C,KAG/CZ,KAAKa,yCAA2C,KAGhDb,KAAKc,yCAA2C,KAGhDd,KAAKe,oCAAsC,KAG3Cf,KAAKgB,mCAAqC,IAClD,CAKI,YAAAC,CAAaC,GACTlB,KAAKC,WAAaiB,CAC1B,CAKI,aAAIA,GACA,GAAuB,MAAnBlB,KAAKC,WACL,MAAM,IAAIkB,MAAM,8CAGpB,OAAOnB,KAAKC,UACpB,CAKI,aAAAmB,CAAcC,GACVrB,KAAKE,YAAcmB,CAC3B,CAKI,cAAIA,GACA,GAAwB,MAApBrB,KAAKE,YACL,MAAM,IAAIiB,MAAM,+CAGpB,OAAOnB,KAAKE,WACpB,CAKI,UAAAoB,CAAWC,GACPvB,KAAKG,SAAWoB,CACxB,CAKI,WAAIA,GACA,GAAqB,MAAjBvB,KAAKG,SACL,MAAM,IAAIgB,MAAM,4CAGpB,OAAOnB,KAAKG,QACpB,CAKI,eAAAqB,CAAgBC,GACZzB,KAAKI,cAAgBqB,CAC7B,CAKI,gBAAIA,GACA,GAA0B,MAAtBzB,KAAKI,cACL,MAAM,IAAIe,MAAM,iDAGpB,OAAOnB,KAAKI,aACpB,CAKI,mBAAAsB,CAAoBC,GAChB3B,KAAKK,kBAAoBsB,CACjC,CAKI,oBAAIA,GACA,GAA8B,MAA1B3B,KAAKK,kBACL,MAAM,IAAIc,MACN,qDAIR,OAAOnB,KAAKK,iBACpB,CAKI,iBAAAuB,CAAkBC,GACd7B,KAAKM,gBAAkBuB,CAC/B,CAKI,kBAAIA,GACA,GAA4B,MAAxB7B,KAAKM,gBACL,MAAM,IAAIa,MAAM,mDAGpB,OAAOnB,KAAKM,eACpB,CAKI,wBAAAwB,CAAyBC,GACrB/B,KAAKO,uBAAyBwB,CACtC,CAKI,yBAAIA,GACA,GAAmC,MAA/B/B,KAAKO,uBACL,MAAM,IAAIY,MACN,0DAIR,OAAOnB,KAAKO,sBACpB,CAKI,qBAAAyB,CAAsBC,GAClBjC,KAAKQ,oBAAsByB,CACnC,CAKI,sBAAIA,GACA,GAAgC,MAA5BjC,KAAKQ,oBACL,MAAM,IAAIW,MACN,uDAIR,OAAOnB,KAAKiC,kBACpB,CAKI,uBAAAC,CAAwBC,GACpBnC,KAAKS,sBAAwB0B,CACrC,CAKI,wBAAIA,GACA,GAAkC,MAA9BnC,KAAKS,sBACL,MAAM,IAAIU,MACN,yDAIR,OAAOnB,KAAKS,qBACpB,CAKI,qBAAA2B,CAAsBC,GAClBrC,KAAKU,oBAAsB2B,CACnC,CAKI,sBAAIA,GACA,GAAgC,MAA5BrC,KAAKU,oBACL,MAAM,IAAIS,MACN,uDAIR,OAAOnB,KAAKU,mBACpB,CAKI,aAAA4B,CAAcC,GACVvC,KAAKW,YAAc4B,CAC3B,CAKI,cAAIA,GACA,GAAwB,MAApBvC,KAAKW,YACL,MAAM,IAAIQ,MAAM,+CAGpB,OAAOnB,KAAKW,WACpB,CAKI,yCAAA6B,CACIC,GAEAzC,KAAKY,wCACD6B,CACZ,CAKI,0CAAIA,GACA,GAAoD,MAAhDzC,KAAKY,wCACL,MAAM,IAAIO,MACN,2EAIR,OAAOnB,KAAKY,uCACpB,CAKI,0CAAA8B,CACIC,GAEA3C,KAAKa,yCACD8B,CACZ,CAKI,2CAAIA,GACA,GAAqD,MAAjD3C,KAAKa,yCACL,MAAM,IAAIM,MACN,4EAIR,OAAOnB,KAAKa,wCACpB,CAKI,0CAAA+B,CACIC,GAEA7C,KAAKc,yCACD+B,CACZ,CAKI,2CAAIA,GACA,GAAqD,MAAjD7C,KAAKc,yCACL,MAAM,IAAIK,MACN,4EAIR,OAAOnB,KAAKc,wCACpB,CAKI,qCAAAgC,CAAsCC,GAClC/C,KAAKe,oCACDgC,CACZ,CAKI,sCAAIA,GACA,GAAgD,MAA5C/C,KAAKe,oCACL,MAAM,IAAII,MACN,uEAIR,OAAOnB,KAAKe,mCACpB,CAKI,oCAAAiC,CAAqCC,GACjCjD,KAAKgB,mCACDiC,CACZ,CAKI,qCAAIA,GACA,GAA+C,MAA3CjD,KAAKgB,mCACL,MAAM,IAAIG,MACN,sEAIR,OAAOnB,KAAKgB,kCACpB"}
|
package/lib/Duration.cjs
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _long = _interopRequireDefault(require("long"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @namespace proto
|
|
13
|
+
* @typedef {import("@hashgraph/proto").proto.IDuration} HieroProto.proto.IDuration
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* A duration type.
|
|
18
|
+
*
|
|
19
|
+
* The main point of this tyope is for encapsulating the `[to|from]Protobuf()` implementations
|
|
20
|
+
*/
|
|
21
|
+
class Duration {
|
|
22
|
+
/**
|
|
23
|
+
* @param {Long | number} seconds
|
|
24
|
+
*/
|
|
25
|
+
constructor(seconds) {
|
|
26
|
+
/**
|
|
27
|
+
* @readonly
|
|
28
|
+
* @type {Long}
|
|
29
|
+
*/
|
|
30
|
+
this.seconds = seconds instanceof _long.default ? seconds : _long.default.fromNumber(seconds);
|
|
31
|
+
Object.freeze(this);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @internal
|
|
36
|
+
* @returns {HieroProto.proto.IDuration}
|
|
37
|
+
*/
|
|
38
|
+
_toProtobuf() {
|
|
39
|
+
return {
|
|
40
|
+
seconds: this.seconds
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @internal
|
|
46
|
+
* @param {HieroProto.proto.IDuration} duration
|
|
47
|
+
* @returns {Duration}
|
|
48
|
+
*/
|
|
49
|
+
static _fromProtobuf(duration) {
|
|
50
|
+
return new Duration(/** @type {Long} */duration.seconds);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.default = Duration;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @namespace proto
|
|
3
|
+
* @typedef {import("@hashgraph/proto").proto.IDuration} HieroProto.proto.IDuration
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* A duration type.
|
|
7
|
+
*
|
|
8
|
+
* The main point of this tyope is for encapsulating the `[to|from]Protobuf()` implementations
|
|
9
|
+
*/
|
|
10
|
+
export default class Duration {
|
|
11
|
+
/**
|
|
12
|
+
* @internal
|
|
13
|
+
* @param {HieroProto.proto.IDuration} duration
|
|
14
|
+
* @returns {Duration}
|
|
15
|
+
*/
|
|
16
|
+
static _fromProtobuf(duration: HieroProto.proto.IDuration): Duration;
|
|
17
|
+
/**
|
|
18
|
+
* @param {Long | number} seconds
|
|
19
|
+
*/
|
|
20
|
+
constructor(seconds: Long | number);
|
|
21
|
+
/**
|
|
22
|
+
* @readonly
|
|
23
|
+
* @type {Long}
|
|
24
|
+
*/
|
|
25
|
+
readonly seconds: Long;
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
* @returns {HieroProto.proto.IDuration}
|
|
29
|
+
*/
|
|
30
|
+
_toProtobuf(): HieroProto.proto.IDuration;
|
|
31
|
+
}
|
|
32
|
+
export namespace HieroProto {
|
|
33
|
+
namespace proto {
|
|
34
|
+
type IDuration = import("@hashgraph/proto").proto.IDuration;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
import Long from "long";
|
package/lib/Duration.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Duration.js","sources":["../src/Duration.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Long from \"long\";\n\n/**\n * @namespace proto\n * @typedef {import(\"@hashgraph/proto\").proto.IDuration} HieroProto.proto.IDuration\n */\n\n/**\n * A duration type.\n *\n * The main point of this tyope is for encapsulating the `[to|from]Protobuf()` implementations\n */\nexport default class Duration {\n /**\n * @param {Long | number} seconds\n */\n constructor(seconds) {\n /**\n * @readonly\n * @type {Long}\n */\n this.seconds =\n seconds instanceof Long ? seconds : Long.fromNumber(seconds);\n\n Object.freeze(this);\n }\n\n /**\n * @internal\n * @returns {HieroProto.proto.IDuration}\n */\n _toProtobuf() {\n return {\n seconds: this.seconds,\n };\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.IDuration} duration\n * @returns {Duration}\n */\n static _fromProtobuf(duration) {\n return new Duration(/** @type {Long} */ (duration.seconds));\n }\n}\n"],"names":["Duration","constructor","seconds","this","Long","fromNumber","Object","freeze","_toProtobuf","_fromProtobuf","duration"],"mappings":"oBAce,MAAMA,EAIjB,WAAAC,CAAYC,GAKRC,KAAKD,QACDA,aAAmBE,EAAOF,EAAUE,EAAKC,WAAWH,GAExDI,OAAOC,OAAOJ,KACtB,CAMI,WAAAK,GACI,MAAO,CACHN,QAASC,KAAKD,QAE1B,CAOI,oBAAOO,CAAcC,GACjB,OAAO,IAAIV,EAA8BU,EAAgB,QACjE"}
|
|
@@ -0,0 +1,547 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports._checksum = _checksum;
|
|
7
|
+
exports._parseAddress = _parseAddress;
|
|
8
|
+
exports.aliasToEvmAddress = aliasToEvmAddress;
|
|
9
|
+
exports.aliasToPublicKey = aliasToPublicKey;
|
|
10
|
+
exports.compare = compare;
|
|
11
|
+
exports.constructor = constructor;
|
|
12
|
+
exports.fromEvmAddress = fromEvmAddress;
|
|
13
|
+
exports.fromSolidityAddress = fromSolidityAddress;
|
|
14
|
+
exports.fromString = fromString;
|
|
15
|
+
exports.fromStringSplitter = fromStringSplitter;
|
|
16
|
+
exports.publicKeyToAlias = publicKeyToAlias;
|
|
17
|
+
exports.toEvmAddress = toEvmAddress;
|
|
18
|
+
exports.toSolidityAddress = toSolidityAddress;
|
|
19
|
+
exports.toStringWithChecksum = toStringWithChecksum;
|
|
20
|
+
exports.validateChecksum = validateChecksum;
|
|
21
|
+
var _long = _interopRequireDefault(require("long"));
|
|
22
|
+
var hex = _interopRequireWildcard(require("./encoding/hex.cjs"));
|
|
23
|
+
var _BadEntityIdError = _interopRequireDefault(require("./BadEntityIdError.cjs"));
|
|
24
|
+
var util = _interopRequireWildcard(require("./util.cjs"));
|
|
25
|
+
var _base = _interopRequireDefault(require("./base32.cjs"));
|
|
26
|
+
var HieroProto = _interopRequireWildcard(require("@hashgraph/proto"));
|
|
27
|
+
var _PublicKey = _interopRequireDefault(require("./PublicKey.cjs"));
|
|
28
|
+
var _bytes = require("@ethersproject/bytes");
|
|
29
|
+
var _EvmAddress = _interopRequireDefault(require("./EvmAddress.cjs"));
|
|
30
|
+
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); }
|
|
31
|
+
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; }
|
|
32
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
33
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @typedef {import("./client/Client.js").default<*, *>} Client
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @typedef {object} IEntityId
|
|
41
|
+
* @property {number | Long} num
|
|
42
|
+
* @property {(number | Long)=} shard
|
|
43
|
+
* @property {(number | Long)=} realm
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @typedef {object} IEntityIdResult
|
|
48
|
+
* @property {Long} shard
|
|
49
|
+
* @property {Long} realm
|
|
50
|
+
* @property {Long} num
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @typedef {object} IEntityIdParts
|
|
55
|
+
* @property {string?} shard
|
|
56
|
+
* @property {string?} realm
|
|
57
|
+
* @property {string} numOrHex
|
|
58
|
+
* @property {string?} checksum
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @typedef {object} IEntityIdResultWithChecksum
|
|
63
|
+
* @property {Long} shard
|
|
64
|
+
* @property {Long} realm
|
|
65
|
+
* @property {Long} num
|
|
66
|
+
* @property {string | null} checksum
|
|
67
|
+
*/
|
|
68
|
+
|
|
69
|
+
const regex = /"^(0|(?:[1-9]\\d*))\\.(0|(?:[1-9]\\d*))\\.(0|(?:[1-9]\\d*))(?:-([a-z]{5}))?$/;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* This regex supports entity IDs
|
|
73
|
+
* - as stand alone nubmers
|
|
74
|
+
* - as shard.realm.num
|
|
75
|
+
* - as shard.realm.hex
|
|
76
|
+
* - can optionally provide checksum for any of the above
|
|
77
|
+
*/
|
|
78
|
+
const ENTITY_ID_REGEX = /^(\d+)(?:\.(\d+)\.([a-fA-F0-9]+))?(?:-([a-z]{5}))?$/;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* @description The length of an EVM address in bytes.
|
|
82
|
+
*/
|
|
83
|
+
const EVM_ADDRESS_LENGTH = 20;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @description The length of the long-zero prefix in bytes.
|
|
87
|
+
*/
|
|
88
|
+
const LONG_ZERO_PREFIX_LENGTH = 12;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* @description The offset of the entity number in the EVM address.
|
|
92
|
+
*/
|
|
93
|
+
const ENTITY_NUM_OFFSET = 16;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* This method is called by most entity ID constructors. It's purpose is to
|
|
97
|
+
* deduplicate the constuctors.
|
|
98
|
+
*
|
|
99
|
+
* @param {number | Long | IEntityId} props
|
|
100
|
+
* @param {(number | null | Long)=} realmOrNull
|
|
101
|
+
* @param {(number | null | Long)=} numOrNull
|
|
102
|
+
* @returns {IEntityIdResult}
|
|
103
|
+
*/
|
|
104
|
+
function constructor(props, realmOrNull, numOrNull) {
|
|
105
|
+
// Make sure either both the second and third parameter are
|
|
106
|
+
// set or not set; we shouldn't have one set, but the other not set.
|
|
107
|
+
//
|
|
108
|
+
//NOSONAR
|
|
109
|
+
if (realmOrNull == null && numOrNull != null || realmOrNull != null && numOrNull == null) {
|
|
110
|
+
throw new Error("invalid entity ID");
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// If the first parameter is a number then we need to convert the
|
|
114
|
+
// first, second, and third parameters into numbers. Otherwise,
|
|
115
|
+
// we should look at the fields `shard`, `realm`, and `num` on
|
|
116
|
+
// `props`
|
|
117
|
+
const [shard, realm, num] = typeof props === "number" || _long.default.isLong(props) ? [numOrNull != null ? _long.default.fromValue(/** @type {Long | number} */props) : _long.default.ZERO, realmOrNull != null ? _long.default.fromValue(realmOrNull) : _long.default.ZERO, numOrNull != null ? _long.default.fromValue(numOrNull) : _long.default.fromValue(/** @type {Long | number} */props)] : [props.shard != null ? _long.default.fromValue(props.shard) : _long.default.ZERO, props.realm != null ? _long.default.fromValue(props.realm) : _long.default.ZERO, _long.default.fromValue(props.num)];
|
|
118
|
+
|
|
119
|
+
// Make sure none of the numbers are negative
|
|
120
|
+
if (shard.isNegative() || realm.isNegative() || num.isNegative()) {
|
|
121
|
+
throw new Error("negative numbers are not allowed in IDs");
|
|
122
|
+
}
|
|
123
|
+
return {
|
|
124
|
+
shard,
|
|
125
|
+
realm,
|
|
126
|
+
num
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* A simple comparison function for comparing entity IDs
|
|
132
|
+
*
|
|
133
|
+
* @param {[Long, Long, Long]} a
|
|
134
|
+
* @param {[Long, Long, Long]} b
|
|
135
|
+
* @returns {number}
|
|
136
|
+
*/
|
|
137
|
+
function compare(a, b) {
|
|
138
|
+
let comparison = a[0].compare(b[0]);
|
|
139
|
+
if (comparison != 0) {
|
|
140
|
+
return comparison;
|
|
141
|
+
}
|
|
142
|
+
comparison = a[1].compare(b[1]);
|
|
143
|
+
if (comparison != 0) {
|
|
144
|
+
return comparison;
|
|
145
|
+
}
|
|
146
|
+
return a[2].compare(b[2]);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* This type is part of the entity ID checksums feature which
|
|
151
|
+
* is responsible for checking if an entity ID was created on
|
|
152
|
+
* the same ledger ID as the client is currently using.
|
|
153
|
+
*
|
|
154
|
+
* @typedef {object} ParseAddressResult
|
|
155
|
+
* @property {number} status
|
|
156
|
+
* @property {Long} [num1]
|
|
157
|
+
* @property {Long} [num2]
|
|
158
|
+
* @property {Long} [num3]
|
|
159
|
+
* @property {string} [correctChecksum]
|
|
160
|
+
* @property {string} [givenChecksum]
|
|
161
|
+
* @property {string} [noChecksumFormat]
|
|
162
|
+
* @property {string} [withChecksumFormat]
|
|
163
|
+
*/
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* @param {string} text
|
|
167
|
+
* @returns {IEntityIdParts}
|
|
168
|
+
*/
|
|
169
|
+
function fromStringSplitter(text) {
|
|
170
|
+
const match = ENTITY_ID_REGEX.exec(text);
|
|
171
|
+
if (match == null) {
|
|
172
|
+
throw new Error(`failed to parse entity id: ${text}`);
|
|
173
|
+
}
|
|
174
|
+
if (match[2] == null && match[3] == null) {
|
|
175
|
+
return {
|
|
176
|
+
shard: "0",
|
|
177
|
+
realm: "0",
|
|
178
|
+
numOrHex: match[1],
|
|
179
|
+
checksum: match[4]
|
|
180
|
+
};
|
|
181
|
+
} else {
|
|
182
|
+
return {
|
|
183
|
+
shard: match[1],
|
|
184
|
+
realm: match[2],
|
|
185
|
+
numOrHex: match[3],
|
|
186
|
+
checksum: match[4]
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* @param {string} text
|
|
193
|
+
* @returns {IEntityIdResultWithChecksum}
|
|
194
|
+
*/
|
|
195
|
+
function fromString(text) {
|
|
196
|
+
const result = fromStringSplitter(text);
|
|
197
|
+
if (Number.isNaN(result.shard) || Number.isNaN(result.realm) || Number.isNaN(result.numOrHex)) {
|
|
198
|
+
throw new Error("invalid format for entity ID");
|
|
199
|
+
}
|
|
200
|
+
return {
|
|
201
|
+
shard: result.shard != null ? _long.default.fromString(result.shard) : _long.default.ZERO,
|
|
202
|
+
realm: result.realm != null ? _long.default.fromString(result.realm) : _long.default.ZERO,
|
|
203
|
+
num: _long.default.fromString(result.numOrHex),
|
|
204
|
+
checksum: result.checksum
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Return the shard, realm, and num from a solidity address.
|
|
210
|
+
*
|
|
211
|
+
* Solidity addresses are 20 bytes long and hex encoded, where the first 4
|
|
212
|
+
* bytes represent the shard, the next 8 bytes represent the realm, and
|
|
213
|
+
* the last 8 bytes represent the num. All in Big Endian format
|
|
214
|
+
*
|
|
215
|
+
* @param {string} address
|
|
216
|
+
* @returns {[Long, Long, Long]}
|
|
217
|
+
*/
|
|
218
|
+
function fromSolidityAddress(address) {
|
|
219
|
+
const addr = address.startsWith("0x") ? hex.decode(address.slice(2)) : hex.decode(address);
|
|
220
|
+
if (addr.length !== EVM_ADDRESS_LENGTH) {
|
|
221
|
+
throw new Error(`Invalid hex encoded solidity address length:
|
|
222
|
+
expected length 40, got length ${address.length}`);
|
|
223
|
+
}
|
|
224
|
+
const shard = _long.default.fromBytesBE([0, 0, 0, 0, ...addr.slice(0, 4)]);
|
|
225
|
+
const realm = _long.default.fromBytesBE(Array.from(addr.slice(4, 12)));
|
|
226
|
+
const num = _long.default.fromBytesBE(Array.from(addr.slice(12, 20)));
|
|
227
|
+
return [shard, realm, num];
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Parse an EVM address and return shard, realm, entity num, and optional EVM address.
|
|
232
|
+
*
|
|
233
|
+
* For long zero addresses (first 12 bytes are zeros): returns [shard, realm, entityNum, null]
|
|
234
|
+
* For regular EVM addresses: returns [shard, realm, 0, EvmAddress]
|
|
235
|
+
*
|
|
236
|
+
* @param {Long | number} shard - The shard number to use
|
|
237
|
+
* @param {Long | number} realm - The realm number to use
|
|
238
|
+
* @param {string} address - The EVM address to parse (with or without 0x prefix)
|
|
239
|
+
* @returns {[Long, Long, Long, EvmAddress | null]} - [shard, realm, entityNum, evmAddressOrNull]
|
|
240
|
+
*/
|
|
241
|
+
function fromEvmAddress(shard, realm, address) {
|
|
242
|
+
if (!hex.isHexString(address)) {
|
|
243
|
+
throw new Error(`Invalid EVM address hex string: ${address}`);
|
|
244
|
+
}
|
|
245
|
+
const addr = address.startsWith("0x") ? hex.decode(address.slice(2)) : hex.decode(address);
|
|
246
|
+
if (addr.length !== EVM_ADDRESS_LENGTH) {
|
|
247
|
+
throw new Error(`Invalid hex encoded evm address length:
|
|
248
|
+
expected length ${EVM_ADDRESS_LENGTH}, got length ${address.length}`);
|
|
249
|
+
}
|
|
250
|
+
let num = _long.default.ZERO;
|
|
251
|
+
if (util.isLongZeroAddress(addr)) {
|
|
252
|
+
num = _long.default.fromBytesBE(Array.from(addr.slice(LONG_ZERO_PREFIX_LENGTH, EVM_ADDRESS_LENGTH)));
|
|
253
|
+
}
|
|
254
|
+
let shardLong = shard instanceof _long.default ? shard : _long.default.fromNumber(shard);
|
|
255
|
+
let realmLong = realm instanceof _long.default ? realm : _long.default.fromNumber(realm);
|
|
256
|
+
return [shardLong, realmLong, num, num.isZero() ? _EvmAddress.default.fromBytes(addr) : null];
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Convert shard, realm, and num into a solidity address.
|
|
261
|
+
*
|
|
262
|
+
* See `fromSolidityAddress()` for more documentation.
|
|
263
|
+
*
|
|
264
|
+
* @param {[Long,Long,Long] | [number,number,number]} address
|
|
265
|
+
* @returns {string}
|
|
266
|
+
*/
|
|
267
|
+
function toSolidityAddress(address) {
|
|
268
|
+
const buffer = new Uint8Array(20);
|
|
269
|
+
const view = util.safeView(buffer);
|
|
270
|
+
const [shard, realm, num] = address;
|
|
271
|
+
view.setUint32(0, util.convertToNumber(shard));
|
|
272
|
+
view.setUint32(8, util.convertToNumber(realm));
|
|
273
|
+
view.setUint32(16, util.convertToNumber(num));
|
|
274
|
+
return hex.encode(buffer);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* @overload
|
|
279
|
+
* @param {Uint8Array} evmAddressBytes - EVM address bytes to convert to hex
|
|
280
|
+
* @returns {string}
|
|
281
|
+
*/
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* @overload
|
|
285
|
+
* @param {Long} accountNum - Account number to convert to long-zero EVM address
|
|
286
|
+
* @returns {string}
|
|
287
|
+
*/
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Convert EVM address bytes to hex string or account num to long-zero EVM address.
|
|
291
|
+
*
|
|
292
|
+
* @param {Uint8Array | Long} evmAddressBytesOrAccountNum
|
|
293
|
+
* @returns {string}
|
|
294
|
+
*/
|
|
295
|
+
function toEvmAddress(evmAddressBytesOrAccountNum) {
|
|
296
|
+
if (evmAddressBytesOrAccountNum instanceof Uint8Array) {
|
|
297
|
+
return hex.encode(evmAddressBytesOrAccountNum);
|
|
298
|
+
}
|
|
299
|
+
const accountNum = evmAddressBytesOrAccountNum;
|
|
300
|
+
const buffer = new Uint8Array(EVM_ADDRESS_LENGTH);
|
|
301
|
+
const view = util.safeView(buffer);
|
|
302
|
+
view.setUint32(ENTITY_NUM_OFFSET, util.convertToNumber(accountNum));
|
|
303
|
+
return hex.encode(buffer);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Parse the address string addr and return an object with the results (8 fields).
|
|
308
|
+
* The first four fields are numbers, which could be implemented as signed 32 bit
|
|
309
|
+
* integers, and the last four are strings.
|
|
310
|
+
*
|
|
311
|
+
* status; //the status of the parsed address
|
|
312
|
+
* // 0 = syntax error
|
|
313
|
+
* // 1 = an invalid with-checksum address (bad checksum)
|
|
314
|
+
* // 2 = a valid no-checksum address
|
|
315
|
+
* // 3 = a valid with-checksum address
|
|
316
|
+
* num1; //the 3 numbers in the address, such as 1.2.3, with leading zeros removed
|
|
317
|
+
* num2;
|
|
318
|
+
* num3;
|
|
319
|
+
* correctchecksum; //the correct checksum
|
|
320
|
+
* givenChecksum; //the checksum in the address that was parsed
|
|
321
|
+
* noChecksumFormat; //the address in no-checksum format
|
|
322
|
+
* withChecksumFormat; //the address in with-checksum format
|
|
323
|
+
*
|
|
324
|
+
* @param {Uint8Array} ledgerId
|
|
325
|
+
* @param {string} addr
|
|
326
|
+
* @returns {ParseAddressResult}
|
|
327
|
+
*/
|
|
328
|
+
function _parseAddress(ledgerId, addr) {
|
|
329
|
+
let match = regex.exec(addr);
|
|
330
|
+
if (match === null) {
|
|
331
|
+
let result = {
|
|
332
|
+
status: 0
|
|
333
|
+
}; // When status == 0, the rest of the fields should be ignored
|
|
334
|
+
return result;
|
|
335
|
+
}
|
|
336
|
+
let a = [_long.default.fromString(match[1]), _long.default.fromString(match[2]), _long.default.fromString(match[3])];
|
|
337
|
+
let ad = `${a[0].toString()}.${a[1].toString()}.${a[2].toString()}`;
|
|
338
|
+
let c = _checksum(ledgerId, ad);
|
|
339
|
+
let s = match[4] === undefined ? 2 : c == match[4] ? 3 : 1; //NOSONAR
|
|
340
|
+
return {
|
|
341
|
+
status: s,
|
|
342
|
+
num1: a[0],
|
|
343
|
+
num2: a[1],
|
|
344
|
+
num3: a[2],
|
|
345
|
+
givenChecksum: match[4],
|
|
346
|
+
correctChecksum: c,
|
|
347
|
+
noChecksumFormat: ad,
|
|
348
|
+
withChecksumFormat: `${ad}-${c}`
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Given an address like "0.0.123", return a checksum like "laujm"
|
|
354
|
+
*
|
|
355
|
+
* @param {Uint8Array} ledgerId
|
|
356
|
+
* @param {string} addr
|
|
357
|
+
* @returns {string}
|
|
358
|
+
*/
|
|
359
|
+
function _checksum(ledgerId, addr) {
|
|
360
|
+
let answer = "";
|
|
361
|
+
let d = []; // Digits with 10 for ".", so if addr == "0.0.123" then d == [0, 10, 0, 10, 1, 2, 3]
|
|
362
|
+
let s0 = 0; // Sum of even positions (mod 11)
|
|
363
|
+
let s1 = 0; // Sum of odd positions (mod 11)
|
|
364
|
+
let s = 0; // Weighted sum of all positions (mod p3)
|
|
365
|
+
let sh = 0; // Hash of the ledger ID
|
|
366
|
+
let c = 0; // The checksum, as a single number
|
|
367
|
+
const p3 = 26 * 26 * 26; // 3 digits in base 26
|
|
368
|
+
const p5 = 26 * 26 * 26 * 26 * 26; // 5 digits in base 26
|
|
369
|
+
const ascii_a = "a".charCodeAt(0); // 97
|
|
370
|
+
const m = 1000003; // Min prime greater than a million. Used for the final permutation.
|
|
371
|
+
const w = 31; // Sum s of digit values weights them by powers of w. Should be coprime to p5.
|
|
372
|
+
|
|
373
|
+
let h = new Uint8Array(ledgerId.length + 6);
|
|
374
|
+
h.set(ledgerId, 0);
|
|
375
|
+
h.set([0, 0, 0, 0, 0, 0], ledgerId.length);
|
|
376
|
+
for (let i = 0; i < addr.length; i++) {
|
|
377
|
+
//NOSONAR
|
|
378
|
+
d.push(addr[i] === "." ? 10 : parseInt(addr[i], 10));
|
|
379
|
+
}
|
|
380
|
+
for (let i = 0; i < d.length; i++) {
|
|
381
|
+
s = (w * s + d[i]) % p3;
|
|
382
|
+
if (i % 2 === 0) {
|
|
383
|
+
s0 = (s0 + d[i]) % 11;
|
|
384
|
+
} else {
|
|
385
|
+
s1 = (s1 + d[i]) % 11;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
for (let i = 0; i < h.length; i++) {
|
|
389
|
+
sh = (w * sh + h[i]) % p5;
|
|
390
|
+
}
|
|
391
|
+
c = (((addr.length % 5 * 11 + s0) * 11 + s1) * p3 + s + sh) % p5;
|
|
392
|
+
c = c * m % p5;
|
|
393
|
+
for (let i = 0; i < 5; i++) {
|
|
394
|
+
answer = String.fromCharCode(ascii_a + c % 26) + answer;
|
|
395
|
+
c /= 26;
|
|
396
|
+
}
|
|
397
|
+
return answer;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* Validate an entity ID checksum against a client
|
|
402
|
+
*
|
|
403
|
+
* @param {Long} shard
|
|
404
|
+
* @param {Long} realm
|
|
405
|
+
* @param {Long} num
|
|
406
|
+
* @param {string | null} checksum
|
|
407
|
+
* @param {Client} client
|
|
408
|
+
*/
|
|
409
|
+
function validateChecksum(shard, realm, num, checksum, client) {
|
|
410
|
+
if (client._network._ledgerId == null || checksum == null) {
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
413
|
+
const expectedChecksum = _checksum(client._network._ledgerId._ledgerId, `${shard.toString()}.${realm.toString()}.${num.toString()}`);
|
|
414
|
+
if (checksum != expectedChecksum) {
|
|
415
|
+
throw new _BadEntityIdError.default(shard, realm, num, checksum, expectedChecksum);
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* Stringify the entity ID with a checksum.
|
|
421
|
+
*
|
|
422
|
+
* @param {string} string
|
|
423
|
+
* @param {Client} client
|
|
424
|
+
* @returns {string}
|
|
425
|
+
*/
|
|
426
|
+
function toStringWithChecksum(string, client) {
|
|
427
|
+
if (client == null) {
|
|
428
|
+
throw new Error("client cannot be null");
|
|
429
|
+
}
|
|
430
|
+
if (client._network._ledgerId == null) {
|
|
431
|
+
throw new Error("cannot calculate checksum with a client that does not contain a recognzied ledger ID");
|
|
432
|
+
}
|
|
433
|
+
const checksum = _checksum(client._network._ledgerId._ledgerId, string);
|
|
434
|
+
return `${string}-${checksum}`;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* Append Buffers.
|
|
439
|
+
* @param {Uint8Array} buffer1
|
|
440
|
+
* @param {Uint8Array} buffer2
|
|
441
|
+
* @returns {Uint8Array}
|
|
442
|
+
*/
|
|
443
|
+
function appendBuffer(buffer1, buffer2) {
|
|
444
|
+
var tmp = new Uint8Array(buffer1.byteLength + buffer2.byteLength);
|
|
445
|
+
tmp.set(new Uint8Array(buffer1), 0);
|
|
446
|
+
tmp.set(new Uint8Array(buffer2), buffer1.byteLength);
|
|
447
|
+
return tmp;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Convert bytes to hex string.
|
|
452
|
+
* @param {Uint8Array} bytes
|
|
453
|
+
* @returns {string}
|
|
454
|
+
*/
|
|
455
|
+
function toHexString(bytes) {
|
|
456
|
+
var s = "0x";
|
|
457
|
+
bytes.forEach(function (byte) {
|
|
458
|
+
s += ("0" + (byte & 0xff).toString(16)).slice(-2);
|
|
459
|
+
});
|
|
460
|
+
return s;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Deserialize the alias to public key.
|
|
465
|
+
* Alias is created from ed25519 or ECDSASecp256k1 types of accounts. If hollow account is used, the alias is created from evm address.
|
|
466
|
+
* For hollow accounts, please use aliasToEvmAddress.
|
|
467
|
+
*
|
|
468
|
+
* @param {string} alias
|
|
469
|
+
* @returns {PublicKey | null}
|
|
470
|
+
*/
|
|
471
|
+
function aliasToPublicKey(alias) {
|
|
472
|
+
const bytes = _base.default.decode(alias);
|
|
473
|
+
if (!bytes) {
|
|
474
|
+
return null;
|
|
475
|
+
}
|
|
476
|
+
let key;
|
|
477
|
+
try {
|
|
478
|
+
key = HieroProto.proto.Key.decode(bytes);
|
|
479
|
+
} catch (e) {
|
|
480
|
+
throw new Error("The alias is created with hollow account. Please use aliasToEvmAddress!");
|
|
481
|
+
}
|
|
482
|
+
if (key.ed25519 != null && key.ed25519.byteLength > 0) {
|
|
483
|
+
return _PublicKey.default.fromBytes(key.ed25519);
|
|
484
|
+
}
|
|
485
|
+
if (key.ECDSASecp256k1 != null && key.ECDSASecp256k1.byteLength > 0) {
|
|
486
|
+
return _PublicKey.default.fromBytes(key.ECDSASecp256k1);
|
|
487
|
+
}
|
|
488
|
+
return null;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* Deserialize the alias to evm address.
|
|
493
|
+
* Alias is created from hollow account.
|
|
494
|
+
* For ed25519 or ECDSASecp256k1 accounts, please use aliasToPublicKey.
|
|
495
|
+
*
|
|
496
|
+
* @param {string} alias
|
|
497
|
+
* @returns {string | null}
|
|
498
|
+
*/
|
|
499
|
+
function aliasToEvmAddress(alias) {
|
|
500
|
+
const bytes = _base.default.decode(alias);
|
|
501
|
+
if (!bytes) {
|
|
502
|
+
return null;
|
|
503
|
+
}
|
|
504
|
+
try {
|
|
505
|
+
HieroProto.proto.Key.decode(bytes);
|
|
506
|
+
throw new Error("The alias is created with ed25519 or ECDSASecp256k1 account. Please use aliasToPublicKey!");
|
|
507
|
+
} catch (e) {
|
|
508
|
+
return toHexString(bytes);
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Serialize the public key to alias.
|
|
514
|
+
* Alias is created from ed25519 or ECDSASecp256k1 types of accounts. If hollow account is used, the alias is created from evm address.
|
|
515
|
+
*
|
|
516
|
+
* @param {string | PublicKey} publicKey
|
|
517
|
+
* @returns {string | null}
|
|
518
|
+
*/
|
|
519
|
+
function publicKeyToAlias(publicKey) {
|
|
520
|
+
if (typeof publicKey === "string" && (publicKey.startsWith("0x") && publicKey.length == 42 || publicKey.length == 40)) {
|
|
521
|
+
if (!publicKey.startsWith("0x")) {
|
|
522
|
+
publicKey = `0x${publicKey}`;
|
|
523
|
+
}
|
|
524
|
+
const bytes = (0, _bytes.arrayify)(publicKey);
|
|
525
|
+
if (!bytes) {
|
|
526
|
+
return null;
|
|
527
|
+
}
|
|
528
|
+
return _base.default.encode(bytes);
|
|
529
|
+
}
|
|
530
|
+
const publicKeyRaw = typeof publicKey === "string" ? _PublicKey.default.fromString(publicKey) : publicKey;
|
|
531
|
+
let publicKeyHex = publicKeyRaw.toStringRaw();
|
|
532
|
+
let leadingHex = "";
|
|
533
|
+
if (publicKeyRaw._key._type === "secp256k1") {
|
|
534
|
+
leadingHex = "0x3A21"; // LEADING BYTES FROM PROTOBUFS
|
|
535
|
+
}
|
|
536
|
+
if (publicKeyRaw._key._type === "ED25519") {
|
|
537
|
+
leadingHex = "0x1220"; // LEADING BYTES FROM PROTOBUFS
|
|
538
|
+
}
|
|
539
|
+
if (!publicKeyHex.startsWith("0x")) {
|
|
540
|
+
publicKeyHex = `0x${publicKeyHex}`;
|
|
541
|
+
}
|
|
542
|
+
const leadingBytes = (0, _bytes.arrayify)(leadingHex);
|
|
543
|
+
const publicKeyBytes = (0, _bytes.arrayify)(publicKeyHex);
|
|
544
|
+
const publicKeyInBytes = appendBuffer(leadingBytes, publicKeyBytes);
|
|
545
|
+
const alias = _base.default.encode(publicKeyInBytes);
|
|
546
|
+
return alias;
|
|
547
|
+
}
|