@hiero-ledger/sdk 2.76.0 → 2.78.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (791) hide show
  1. package/README.md +6 -6
  2. package/dist/umd.js +1017 -673
  3. package/dist/umd.min.js +14 -14
  4. package/lib/Cache.cjs +6 -6
  5. package/lib/Cache.d.ts +12 -12
  6. package/lib/Cache.js.map +1 -1
  7. package/lib/Duration.cjs +1 -1
  8. package/lib/Duration.d.ts +2 -2
  9. package/lib/Duration.js.map +1 -1
  10. package/lib/EntityIdHelper.cjs +1 -1
  11. package/lib/EntityIdHelper.js +1 -1
  12. package/lib/EntityIdHelper.js.map +1 -1
  13. package/lib/EthereumFlow.cjs +7 -7
  14. package/lib/EthereumFlow.d.ts +14 -14
  15. package/lib/EthereumFlow.js.map +1 -1
  16. package/lib/EthereumTransaction.cjs +7 -7
  17. package/lib/EthereumTransaction.d.ts +14 -14
  18. package/lib/EthereumTransaction.js.map +1 -1
  19. package/lib/EvmAddress.cjs +1 -1
  20. package/lib/EvmAddress.d.ts +2 -2
  21. package/lib/EvmAddress.js.map +1 -1
  22. package/lib/ExchangeRate.cjs +2 -2
  23. package/lib/ExchangeRate.d.ts +4 -4
  24. package/lib/ExchangeRate.js.map +1 -1
  25. package/lib/ExchangeRates.cjs +1 -1
  26. package/lib/ExchangeRates.d.ts +1 -1
  27. package/lib/ExchangeRates.js +1 -1
  28. package/lib/ExchangeRates.js.map +1 -1
  29. package/lib/Executable.cjs +13 -3
  30. package/lib/Executable.js +1 -1
  31. package/lib/Executable.js.map +1 -1
  32. package/lib/FeeComponents.cjs +1 -1
  33. package/lib/FeeComponents.d.ts +1 -1
  34. package/lib/FeeComponents.js +1 -1
  35. package/lib/FeeComponents.js.map +1 -1
  36. package/lib/FeeData.cjs +1 -1
  37. package/lib/FeeData.d.ts +1 -1
  38. package/lib/FeeData.js +1 -1
  39. package/lib/FeeData.js.map +1 -1
  40. package/lib/FeeDataType.cjs +1 -1
  41. package/lib/FeeDataType.d.ts +2 -2
  42. package/lib/FeeDataType.js.map +1 -1
  43. package/lib/FeeSchedule.cjs +1 -1
  44. package/lib/FeeSchedule.d.ts +1 -1
  45. package/lib/FeeSchedule.js +1 -1
  46. package/lib/FeeSchedule.js.map +1 -1
  47. package/lib/FeeSchedules.cjs +1 -1
  48. package/lib/FeeSchedules.d.ts +1 -1
  49. package/lib/FeeSchedules.js +1 -1
  50. package/lib/FeeSchedules.js.map +1 -1
  51. package/lib/FreezeType.cjs +1 -1
  52. package/lib/FreezeType.d.ts +2 -2
  53. package/lib/FreezeType.js.map +1 -1
  54. package/lib/Key.cjs +1 -1
  55. package/lib/Key.d.ts +2 -2
  56. package/lib/Key.js.map +1 -1
  57. package/lib/KeyList.cjs +3 -3
  58. package/lib/KeyList.d.ts +6 -6
  59. package/lib/KeyList.js.map +1 -1
  60. package/lib/Mnemonic.cjs +1 -1
  61. package/lib/Mnemonic.d.ts +1 -1
  62. package/lib/Mnemonic.js +1 -1
  63. package/lib/Mnemonic.js.map +1 -1
  64. package/lib/PrivateKey.cjs +7 -7
  65. package/lib/PrivateKey.d.ts +11 -11
  66. package/lib/PrivateKey.js +1 -1
  67. package/lib/PrivateKey.js.map +1 -1
  68. package/lib/PrngTransaction.cjs +9 -9
  69. package/lib/PrngTransaction.d.ts +18 -18
  70. package/lib/PrngTransaction.js.map +1 -1
  71. package/lib/PublicKey.cjs +5 -5
  72. package/lib/PublicKey.d.ts +9 -9
  73. package/lib/PublicKey.js +1 -1
  74. package/lib/PublicKey.js.map +1 -1
  75. package/lib/RequestType.cjs +1 -1
  76. package/lib/RequestType.d.ts +2 -2
  77. package/lib/RequestType.js.map +1 -1
  78. package/lib/StakingInfo.cjs +1 -1
  79. package/lib/StakingInfo.d.ts +1 -1
  80. package/lib/StakingInfo.js +1 -1
  81. package/lib/StakingInfo.js.map +1 -1
  82. package/lib/Status.cjs +1 -1
  83. package/lib/Status.d.ts +2 -2
  84. package/lib/Status.js.map +1 -1
  85. package/lib/Timestamp.cjs +1 -1
  86. package/lib/Timestamp.d.ts +1 -1
  87. package/lib/Timestamp.js.map +1 -1
  88. package/lib/TransactionFeeSchedule.cjs +1 -1
  89. package/lib/TransactionFeeSchedule.d.ts +1 -1
  90. package/lib/TransactionFeeSchedule.js +1 -1
  91. package/lib/TransactionFeeSchedule.js.map +1 -1
  92. package/lib/Transfer.cjs +2 -2
  93. package/lib/Transfer.d.ts +4 -4
  94. package/lib/Transfer.js.map +1 -1
  95. package/lib/account/AccountAllowanceAdjustTransaction.cjs +7 -7
  96. package/lib/account/AccountAllowanceAdjustTransaction.d.ts +14 -14
  97. package/lib/account/AccountAllowanceAdjustTransaction.js.map +1 -1
  98. package/lib/account/AccountAllowanceApproveTransaction.cjs +8 -8
  99. package/lib/account/AccountAllowanceApproveTransaction.d.ts +16 -16
  100. package/lib/account/AccountAllowanceApproveTransaction.js.map +1 -1
  101. package/lib/account/AccountAllowanceDeleteTransaction.cjs +7 -7
  102. package/lib/account/AccountAllowanceDeleteTransaction.d.ts +14 -14
  103. package/lib/account/AccountAllowanceDeleteTransaction.js.map +1 -1
  104. package/lib/account/AccountBalance.cjs +1 -1
  105. package/lib/account/AccountBalance.d.ts +1 -1
  106. package/lib/account/AccountBalance.js +1 -1
  107. package/lib/account/AccountBalance.js.map +1 -1
  108. package/lib/account/AccountBalanceQuery.cjs +6 -6
  109. package/lib/account/AccountBalanceQuery.d.ts +12 -12
  110. package/lib/account/AccountBalanceQuery.js.map +1 -1
  111. package/lib/account/AccountCreateTransaction.cjs +1 -1
  112. package/lib/account/AccountCreateTransaction.d.ts +1 -1
  113. package/lib/account/AccountCreateTransaction.js +1 -1
  114. package/lib/account/AccountCreateTransaction.js.map +1 -1
  115. package/lib/account/AccountDeleteTransaction.cjs +7 -7
  116. package/lib/account/AccountDeleteTransaction.d.ts +14 -14
  117. package/lib/account/AccountDeleteTransaction.js.map +1 -1
  118. package/lib/account/AccountId.cjs +1 -1
  119. package/lib/account/AccountId.d.ts +1 -1
  120. package/lib/account/AccountId.js +1 -1
  121. package/lib/account/AccountId.js.map +1 -1
  122. package/lib/account/AccountInfo.cjs +1 -1
  123. package/lib/account/AccountInfo.d.ts +1 -1
  124. package/lib/account/AccountInfo.js +1 -1
  125. package/lib/account/AccountInfo.js.map +1 -1
  126. package/lib/account/AccountInfoQuery.cjs +7 -7
  127. package/lib/account/AccountInfoQuery.d.ts +14 -14
  128. package/lib/account/AccountInfoQuery.js.map +1 -1
  129. package/lib/account/AccountRecordsQuery.cjs +7 -7
  130. package/lib/account/AccountRecordsQuery.d.ts +14 -14
  131. package/lib/account/AccountRecordsQuery.js.map +1 -1
  132. package/lib/account/AccountUpdateTransaction.cjs +7 -7
  133. package/lib/account/AccountUpdateTransaction.d.ts +14 -14
  134. package/lib/account/AccountUpdateTransaction.js.map +1 -1
  135. package/lib/account/HbarAllowance.cjs +3 -3
  136. package/lib/account/HbarAllowance.d.ts +6 -6
  137. package/lib/account/HbarAllowance.js.map +1 -1
  138. package/lib/account/HbarTransferMap.cjs +2 -2
  139. package/lib/account/HbarTransferMap.d.ts +4 -4
  140. package/lib/account/HbarTransferMap.js.map +1 -1
  141. package/lib/account/LiveHash.cjs +3 -3
  142. package/lib/account/LiveHash.d.ts +6 -6
  143. package/lib/account/LiveHash.js.map +1 -1
  144. package/lib/account/LiveHashAddTransaction.cjs +7 -7
  145. package/lib/account/LiveHashAddTransaction.d.ts +14 -14
  146. package/lib/account/LiveHashAddTransaction.js.map +1 -1
  147. package/lib/account/LiveHashDeleteTransaction.cjs +6 -6
  148. package/lib/account/LiveHashDeleteTransaction.d.ts +12 -12
  149. package/lib/account/LiveHashDeleteTransaction.js.map +1 -1
  150. package/lib/account/LiveHashQuery.cjs +7 -7
  151. package/lib/account/LiveHashQuery.d.ts +14 -14
  152. package/lib/account/LiveHashQuery.js.map +1 -1
  153. package/lib/account/NullableTokenDecimalMap.cjs +2 -2
  154. package/lib/account/NullableTokenDecimalMap.d.ts +4 -4
  155. package/lib/account/NullableTokenDecimalMap.js.map +1 -1
  156. package/lib/account/ProxyStaker.cjs +2 -2
  157. package/lib/account/ProxyStaker.d.ts +4 -4
  158. package/lib/account/ProxyStaker.js.map +1 -1
  159. package/lib/account/TokenAllowance.cjs +4 -4
  160. package/lib/account/TokenAllowance.d.ts +8 -8
  161. package/lib/account/TokenAllowance.js.map +1 -1
  162. package/lib/account/TokenBalanceMap.cjs +2 -2
  163. package/lib/account/TokenBalanceMap.d.ts +4 -4
  164. package/lib/account/TokenBalanceMap.js.map +1 -1
  165. package/lib/account/TokenDecimalMap.cjs +2 -2
  166. package/lib/account/TokenDecimalMap.d.ts +4 -4
  167. package/lib/account/TokenDecimalMap.js.map +1 -1
  168. package/lib/account/TokenNftAllowance.cjs +5 -5
  169. package/lib/account/TokenNftAllowance.d.ts +10 -10
  170. package/lib/account/TokenNftAllowance.js.map +1 -1
  171. package/lib/account/TokenNftTransferMap.cjs +5 -5
  172. package/lib/account/TokenNftTransferMap.d.ts +10 -10
  173. package/lib/account/TokenNftTransferMap.js.map +1 -1
  174. package/lib/account/TokenRelationship.cjs +4 -4
  175. package/lib/account/TokenRelationship.d.ts +8 -8
  176. package/lib/account/TokenRelationship.js.map +1 -1
  177. package/lib/account/TokenRelationshipMap.cjs +2 -2
  178. package/lib/account/TokenRelationshipMap.d.ts +4 -4
  179. package/lib/account/TokenRelationshipMap.js.map +1 -1
  180. package/lib/account/TokenTransferMap.cjs +4 -4
  181. package/lib/account/TokenTransferMap.d.ts +8 -8
  182. package/lib/account/TokenTransferMap.js.map +1 -1
  183. package/lib/account/TransferTransaction.cjs +6 -6
  184. package/lib/account/TransferTransaction.d.ts +12 -12
  185. package/lib/account/TransferTransaction.js.map +1 -1
  186. package/lib/address_book/AddressBooks.cjs +1 -1
  187. package/lib/address_book/AddressBooks.js +1 -1
  188. package/lib/address_book/AddressBooks.js.map +1 -1
  189. package/lib/address_book/Endpoint.cjs +1 -1
  190. package/lib/address_book/Endpoint.d.ts +2 -2
  191. package/lib/address_book/Endpoint.js.map +1 -1
  192. package/lib/address_book/NodeAddress.cjs +1 -1
  193. package/lib/address_book/NodeAddress.d.ts +2 -2
  194. package/lib/address_book/NodeAddress.js.map +1 -1
  195. package/lib/address_book/NodeAddressBook.cjs +1 -1
  196. package/lib/address_book/NodeAddressBook.d.ts +1 -1
  197. package/lib/address_book/NodeAddressBook.js +1 -1
  198. package/lib/address_book/NodeAddressBook.js.map +1 -1
  199. package/lib/browser.js +1 -1
  200. package/lib/channel/Channel.cjs +26 -2
  201. package/lib/channel/Channel.d.ts +21 -1
  202. package/lib/channel/Channel.js +1 -1
  203. package/lib/channel/Channel.js.map +1 -1
  204. package/lib/channel/NativeChannel.cjs +96 -2
  205. package/lib/channel/NativeChannel.d.ts +21 -1
  206. package/lib/channel/NativeChannel.js +1 -1
  207. package/lib/channel/NativeChannel.js.map +1 -1
  208. package/lib/channel/NodeChannel.cjs +4 -5
  209. package/lib/channel/NodeChannel.d.ts +2 -3
  210. package/lib/channel/NodeChannel.js +1 -1
  211. package/lib/channel/NodeChannel.js.map +1 -1
  212. package/lib/channel/WebChannel.cjs +163 -13
  213. package/lib/channel/WebChannel.d.ts +51 -1
  214. package/lib/channel/WebChannel.js +1 -1
  215. package/lib/channel/WebChannel.js.map +1 -1
  216. package/lib/client/Client.cjs +62 -5
  217. package/lib/client/Client.d.ts +26 -3
  218. package/lib/client/Client.js +1 -1
  219. package/lib/client/Client.js.map +1 -1
  220. package/lib/client/NativeClient.cjs +1 -1
  221. package/lib/client/NativeClient.js +1 -1
  222. package/lib/client/NativeClient.js.map +1 -1
  223. package/lib/client/NodeClient.cjs +7 -6
  224. package/lib/client/NodeClient.d.ts +3 -3
  225. package/lib/client/NodeClient.js +1 -1
  226. package/lib/client/NodeClient.js.map +1 -1
  227. package/lib/client/WebClient.cjs +55 -27
  228. package/lib/client/WebClient.d.ts +6 -0
  229. package/lib/client/WebClient.js +1 -1
  230. package/lib/client/WebClient.js.map +1 -1
  231. package/lib/client/addressbooks/mainnet.cjs +1 -1
  232. package/lib/client/addressbooks/mainnet.d.ts +1 -1
  233. package/lib/client/addressbooks/mainnet.js +1 -1
  234. package/lib/client/addressbooks/mainnet.js.map +1 -1
  235. package/lib/client/addressbooks/previewnet.cjs +1 -1
  236. package/lib/client/addressbooks/previewnet.d.ts +1 -1
  237. package/lib/client/addressbooks/previewnet.js +1 -1
  238. package/lib/client/addressbooks/previewnet.js.map +1 -1
  239. package/lib/client/addressbooks/testnet.cjs +1 -1
  240. package/lib/client/addressbooks/testnet.d.ts +1 -1
  241. package/lib/client/addressbooks/testnet.js +1 -1
  242. package/lib/client/addressbooks/testnet.js.map +1 -1
  243. package/lib/constants/ClientConstants.cjs +17 -1
  244. package/lib/constants/ClientConstants.d.ts +14 -0
  245. package/lib/constants/ClientConstants.js +1 -1
  246. package/lib/constants/ClientConstants.js.map +1 -1
  247. package/lib/contract/ContractByteCodeQuery.cjs +6 -6
  248. package/lib/contract/ContractByteCodeQuery.d.ts +12 -12
  249. package/lib/contract/ContractByteCodeQuery.js.map +1 -1
  250. package/lib/contract/ContractCallQuery.cjs +1 -1
  251. package/lib/contract/ContractCallQuery.d.ts +1 -1
  252. package/lib/contract/ContractCallQuery.js +1 -1
  253. package/lib/contract/ContractCallQuery.js.map +1 -1
  254. package/lib/contract/ContractCreateTransaction.cjs +8 -8
  255. package/lib/contract/ContractCreateTransaction.d.ts +16 -16
  256. package/lib/contract/ContractCreateTransaction.js.map +1 -1
  257. package/lib/contract/ContractDeleteTransaction.cjs +8 -8
  258. package/lib/contract/ContractDeleteTransaction.d.ts +16 -16
  259. package/lib/contract/ContractDeleteTransaction.js.map +1 -1
  260. package/lib/contract/ContractExecuteTransaction.cjs +9 -9
  261. package/lib/contract/ContractExecuteTransaction.d.ts +18 -18
  262. package/lib/contract/ContractExecuteTransaction.js.map +1 -1
  263. package/lib/contract/ContractFunctionResult.cjs +2 -2
  264. package/lib/contract/ContractFunctionResult.d.ts +4 -4
  265. package/lib/contract/ContractFunctionResult.js.map +1 -1
  266. package/lib/contract/ContractId.cjs +1 -1
  267. package/lib/contract/ContractId.d.ts +1 -1
  268. package/lib/contract/ContractId.js +1 -1
  269. package/lib/contract/ContractId.js.map +1 -1
  270. package/lib/contract/ContractInfo.cjs +1 -1
  271. package/lib/contract/ContractInfo.d.ts +1 -1
  272. package/lib/contract/ContractInfo.js +1 -1
  273. package/lib/contract/ContractInfo.js.map +1 -1
  274. package/lib/contract/ContractInfoQuery.cjs +7 -7
  275. package/lib/contract/ContractInfoQuery.d.ts +14 -14
  276. package/lib/contract/ContractInfoQuery.js.map +1 -1
  277. package/lib/contract/ContractLogInfo.cjs +2 -2
  278. package/lib/contract/ContractLogInfo.d.ts +4 -4
  279. package/lib/contract/ContractLogInfo.js.map +1 -1
  280. package/lib/contract/ContractNonceInfo.cjs +3 -3
  281. package/lib/contract/ContractNonceInfo.d.ts +4 -4
  282. package/lib/contract/ContractNonceInfo.js +1 -1
  283. package/lib/contract/ContractNonceInfo.js.map +1 -1
  284. package/lib/contract/ContractStateChange.cjs +1 -1
  285. package/lib/contract/ContractStateChange.d.ts +1 -1
  286. package/lib/contract/ContractUpdateTransaction.cjs +10 -10
  287. package/lib/contract/ContractUpdateTransaction.d.ts +18 -18
  288. package/lib/contract/ContractUpdateTransaction.js +1 -1
  289. package/lib/contract/ContractUpdateTransaction.js.map +1 -1
  290. package/lib/contract/DelegateContractId.cjs +2 -2
  291. package/lib/contract/DelegateContractId.d.ts +4 -4
  292. package/lib/contract/DelegateContractId.js.map +1 -1
  293. package/lib/contract/StorageChange.cjs +1 -1
  294. package/lib/contract/StorageChange.d.ts +1 -1
  295. package/lib/exports.cjs +1 -1
  296. package/lib/exports.d.ts +1 -1
  297. package/lib/exports.js +1 -1
  298. package/lib/exports.js.map +1 -1
  299. package/lib/file/FileAppendTransaction.cjs +7 -7
  300. package/lib/file/FileAppendTransaction.d.ts +14 -14
  301. package/lib/file/FileAppendTransaction.js.map +1 -1
  302. package/lib/file/FileContentsQuery.cjs +7 -7
  303. package/lib/file/FileContentsQuery.d.ts +14 -14
  304. package/lib/file/FileContentsQuery.js.map +1 -1
  305. package/lib/file/FileCreateTransaction.cjs +6 -6
  306. package/lib/file/FileCreateTransaction.d.ts +12 -12
  307. package/lib/file/FileCreateTransaction.js.map +1 -1
  308. package/lib/file/FileDeleteTransaction.cjs +7 -7
  309. package/lib/file/FileDeleteTransaction.d.ts +14 -14
  310. package/lib/file/FileDeleteTransaction.js.map +1 -1
  311. package/lib/file/FileId.cjs +1 -1
  312. package/lib/file/FileId.d.ts +1 -1
  313. package/lib/file/FileId.js +1 -1
  314. package/lib/file/FileId.js.map +1 -1
  315. package/lib/file/FileInfo.cjs +1 -1
  316. package/lib/file/FileInfo.d.ts +1 -1
  317. package/lib/file/FileInfo.js +1 -1
  318. package/lib/file/FileInfo.js.map +1 -1
  319. package/lib/file/FileInfoQuery.cjs +7 -7
  320. package/lib/file/FileInfoQuery.d.ts +14 -14
  321. package/lib/file/FileInfoQuery.js.map +1 -1
  322. package/lib/file/FileUpdateTransaction.cjs +6 -6
  323. package/lib/file/FileUpdateTransaction.d.ts +12 -12
  324. package/lib/file/FileUpdateTransaction.js.map +1 -1
  325. package/lib/index.js +1 -1
  326. package/lib/native.js +1 -1
  327. package/lib/network/AddressBookQuery.cjs +1 -5
  328. package/lib/network/AddressBookQuery.js +1 -1
  329. package/lib/network/AddressBookQuery.js.map +1 -1
  330. package/lib/network/AddressBookQueryWeb.cjs +1 -5
  331. package/lib/network/AddressBookQueryWeb.js +1 -1
  332. package/lib/network/AddressBookQueryWeb.js.map +1 -1
  333. package/lib/network/NetworkVersionInfo.cjs +1 -1
  334. package/lib/network/NetworkVersionInfo.d.ts +1 -1
  335. package/lib/network/NetworkVersionInfo.js +1 -1
  336. package/lib/network/NetworkVersionInfo.js.map +1 -1
  337. package/lib/network/NetworkVersionInfoQuery.cjs +6 -6
  338. package/lib/network/NetworkVersionInfoQuery.d.ts +12 -12
  339. package/lib/network/NetworkVersionInfoQuery.js.map +1 -1
  340. package/lib/network/SemanticVersion.cjs +1 -1
  341. package/lib/network/SemanticVersion.d.ts +1 -1
  342. package/lib/network/SemanticVersion.js +1 -1
  343. package/lib/network/SemanticVersion.js.map +1 -1
  344. package/lib/node/NodeCreateTransaction.cjs +6 -6
  345. package/lib/node/NodeCreateTransaction.d.ts +12 -12
  346. package/lib/node/NodeCreateTransaction.js.map +1 -1
  347. package/lib/node/NodeDeleteTransaction.cjs +6 -6
  348. package/lib/node/NodeDeleteTransaction.d.ts +12 -12
  349. package/lib/node/NodeDeleteTransaction.js.map +1 -1
  350. package/lib/node/NodeUpdateTransaction.cjs +6 -6
  351. package/lib/node/NodeUpdateTransaction.d.ts +12 -12
  352. package/lib/node/NodeUpdateTransaction.js.map +1 -1
  353. package/lib/node/ServiceEndpoint.cjs +1 -1
  354. package/lib/node/ServiceEndpoint.d.ts +2 -2
  355. package/lib/node/ServiceEndpoint.js.map +1 -1
  356. package/lib/query/CostQuery.cjs +1 -1
  357. package/lib/query/CostQuery.d.ts +1 -1
  358. package/lib/query/CostQuery.js +1 -1
  359. package/lib/query/CostQuery.js.map +1 -1
  360. package/lib/query/Query.cjs +1 -1
  361. package/lib/query/Query.d.ts +1 -1
  362. package/lib/query/Query.js +1 -1
  363. package/lib/query/Query.js.map +1 -1
  364. package/lib/query/QueryBase.cjs +1 -1
  365. package/lib/query/QueryBase.d.ts +1 -1
  366. package/lib/query/QueryBase.js +1 -1
  367. package/lib/query/QueryBase.js.map +1 -1
  368. package/lib/schedule/ScheduleCreateTransaction.cjs +1 -1
  369. package/lib/schedule/ScheduleCreateTransaction.d.ts +1 -1
  370. package/lib/schedule/ScheduleCreateTransaction.js +1 -1
  371. package/lib/schedule/ScheduleCreateTransaction.js.map +1 -1
  372. package/lib/schedule/ScheduleDeleteTransaction.cjs +8 -8
  373. package/lib/schedule/ScheduleDeleteTransaction.d.ts +16 -16
  374. package/lib/schedule/ScheduleDeleteTransaction.js.map +1 -1
  375. package/lib/schedule/ScheduleId.cjs +1 -1
  376. package/lib/schedule/ScheduleId.d.ts +1 -1
  377. package/lib/schedule/ScheduleId.js +1 -1
  378. package/lib/schedule/ScheduleId.js.map +1 -1
  379. package/lib/schedule/ScheduleInfo.cjs +1 -1
  380. package/lib/schedule/ScheduleInfo.d.ts +1 -1
  381. package/lib/schedule/ScheduleInfo.js +1 -1
  382. package/lib/schedule/ScheduleInfo.js.map +1 -1
  383. package/lib/schedule/ScheduleInfoQuery.cjs +7 -7
  384. package/lib/schedule/ScheduleInfoQuery.d.ts +14 -14
  385. package/lib/schedule/ScheduleInfoQuery.js.map +1 -1
  386. package/lib/schedule/ScheduleSignTransaction.cjs +10 -10
  387. package/lib/schedule/ScheduleSignTransaction.d.ts +20 -20
  388. package/lib/schedule/ScheduleSignTransaction.js.map +1 -1
  389. package/lib/system/FreezeTransaction.cjs +6 -6
  390. package/lib/system/FreezeTransaction.d.ts +12 -12
  391. package/lib/system/FreezeTransaction.js.map +1 -1
  392. package/lib/system/SystemDeleteTransaction.cjs +8 -8
  393. package/lib/system/SystemDeleteTransaction.d.ts +16 -16
  394. package/lib/system/SystemDeleteTransaction.js.map +1 -1
  395. package/lib/system/SystemUndeleteTransaction.cjs +8 -8
  396. package/lib/system/SystemUndeleteTransaction.d.ts +16 -16
  397. package/lib/system/SystemUndeleteTransaction.js.map +1 -1
  398. package/lib/token/AbstractTokenTransferTransaction.cjs +1 -1
  399. package/lib/token/AbstractTokenTransferTransaction.d.ts +2 -2
  400. package/lib/token/AbstractTokenTransferTransaction.js.map +1 -1
  401. package/lib/token/AssessedCustomFee.cjs +1 -1
  402. package/lib/token/AssessedCustomFee.d.ts +2 -2
  403. package/lib/token/AssessedCustomFee.js.map +1 -1
  404. package/lib/token/CustomFee.cjs +1 -1
  405. package/lib/token/CustomFee.d.ts +2 -2
  406. package/lib/token/CustomFee.js.map +1 -1
  407. package/lib/token/CustomFixedFee.cjs +3 -3
  408. package/lib/token/CustomFixedFee.d.ts +6 -6
  409. package/lib/token/CustomFixedFee.js.map +1 -1
  410. package/lib/token/CustomFractionalFee.cjs +3 -3
  411. package/lib/token/CustomFractionalFee.d.ts +6 -6
  412. package/lib/token/CustomFractionalFee.js.map +1 -1
  413. package/lib/token/CustomRoyaltyFee.cjs +4 -4
  414. package/lib/token/CustomRoyaltyFee.d.ts +8 -8
  415. package/lib/token/CustomRoyaltyFee.js.map +1 -1
  416. package/lib/token/NftId.cjs +1 -1
  417. package/lib/token/NftId.d.ts +1 -1
  418. package/lib/token/NftId.js +1 -1
  419. package/lib/token/NftId.js.map +1 -1
  420. package/lib/token/PendingAirdropId.cjs +1 -1
  421. package/lib/token/PendingAirdropId.d.ts +1 -1
  422. package/lib/token/PendingAirdropId.js.map +1 -1
  423. package/lib/token/PendingAirdropRecord.cjs +1 -1
  424. package/lib/token/PendingAirdropRecord.d.ts +1 -1
  425. package/lib/token/PendingAirdropRecord.js.map +1 -1
  426. package/lib/token/TokenAirdropTransaction.cjs +8 -8
  427. package/lib/token/TokenAirdropTransaction.d.ts +16 -16
  428. package/lib/token/TokenAirdropTransaction.js.map +1 -1
  429. package/lib/token/TokenAssociateTransaction.cjs +7 -7
  430. package/lib/token/TokenAssociateTransaction.d.ts +14 -14
  431. package/lib/token/TokenAssociateTransaction.js.map +1 -1
  432. package/lib/token/TokenAssociation.cjs +1 -1
  433. package/lib/token/TokenAssociation.d.ts +2 -2
  434. package/lib/token/TokenAssociation.js.map +1 -1
  435. package/lib/token/TokenBurnTransaction.cjs +7 -7
  436. package/lib/token/TokenBurnTransaction.d.ts +14 -14
  437. package/lib/token/TokenBurnTransaction.js.map +1 -1
  438. package/lib/token/TokenCancelAirdropTransaction.cjs +6 -6
  439. package/lib/token/TokenCancelAirdropTransaction.d.ts +12 -12
  440. package/lib/token/TokenCancelAirdropTransaction.js.map +1 -1
  441. package/lib/token/TokenClaimAirdropTransaction.cjs +6 -6
  442. package/lib/token/TokenClaimAirdropTransaction.d.ts +12 -12
  443. package/lib/token/TokenClaimAirdropTransaction.js.map +1 -1
  444. package/lib/token/TokenCreateTransaction.cjs +7 -7
  445. package/lib/token/TokenCreateTransaction.d.ts +14 -14
  446. package/lib/token/TokenCreateTransaction.js.map +1 -1
  447. package/lib/token/TokenDeleteTransaction.cjs +7 -7
  448. package/lib/token/TokenDeleteTransaction.d.ts +14 -14
  449. package/lib/token/TokenDeleteTransaction.js.map +1 -1
  450. package/lib/token/TokenDissociateTransaction.cjs +7 -7
  451. package/lib/token/TokenDissociateTransaction.d.ts +14 -14
  452. package/lib/token/TokenDissociateTransaction.js.map +1 -1
  453. package/lib/token/TokenFeeScheduleUpdateTransaction.cjs +7 -7
  454. package/lib/token/TokenFeeScheduleUpdateTransaction.d.ts +14 -14
  455. package/lib/token/TokenFeeScheduleUpdateTransaction.js.map +1 -1
  456. package/lib/token/TokenFreezeTransaction.cjs +7 -7
  457. package/lib/token/TokenFreezeTransaction.d.ts +14 -14
  458. package/lib/token/TokenFreezeTransaction.js.map +1 -1
  459. package/lib/token/TokenGrantKycTransaction.cjs +7 -7
  460. package/lib/token/TokenGrantKycTransaction.d.ts +14 -14
  461. package/lib/token/TokenGrantKycTransaction.js.map +1 -1
  462. package/lib/token/TokenId.cjs +1 -1
  463. package/lib/token/TokenId.d.ts +1 -1
  464. package/lib/token/TokenId.js +1 -1
  465. package/lib/token/TokenId.js.map +1 -1
  466. package/lib/token/TokenInfo.cjs +1 -1
  467. package/lib/token/TokenInfo.d.ts +1 -1
  468. package/lib/token/TokenInfo.js +1 -1
  469. package/lib/token/TokenInfo.js.map +1 -1
  470. package/lib/token/TokenInfoQuery.cjs +7 -7
  471. package/lib/token/TokenInfoQuery.d.ts +14 -14
  472. package/lib/token/TokenInfoQuery.js.map +1 -1
  473. package/lib/token/TokenKeyValidation.cjs +1 -1
  474. package/lib/token/TokenKeyValidation.d.ts +2 -2
  475. package/lib/token/TokenKeyValidation.js.map +1 -1
  476. package/lib/token/TokenMintTransaction.cjs +7 -7
  477. package/lib/token/TokenMintTransaction.d.ts +14 -14
  478. package/lib/token/TokenMintTransaction.js.map +1 -1
  479. package/lib/token/TokenNftInfo.cjs +10 -10
  480. package/lib/token/TokenNftInfo.d.ts +20 -20
  481. package/lib/token/TokenNftInfo.js.map +1 -1
  482. package/lib/token/TokenNftInfoQuery.cjs +11 -11
  483. package/lib/token/TokenNftInfoQuery.d.ts +22 -22
  484. package/lib/token/TokenNftInfoQuery.js.map +1 -1
  485. package/lib/token/TokenNftTransfer.cjs +5 -5
  486. package/lib/token/TokenNftTransfer.d.ts +10 -10
  487. package/lib/token/TokenNftTransfer.js.map +1 -1
  488. package/lib/token/TokenNftsUpdateTransaction.cjs +7 -7
  489. package/lib/token/TokenNftsUpdateTransaction.d.ts +14 -14
  490. package/lib/token/TokenPauseTransaction.cjs +7 -7
  491. package/lib/token/TokenPauseTransaction.d.ts +14 -14
  492. package/lib/token/TokenPauseTransaction.js.map +1 -1
  493. package/lib/token/TokenReference.cjs +1 -1
  494. package/lib/token/TokenReference.d.ts +2 -2
  495. package/lib/token/TokenReference.js.map +1 -1
  496. package/lib/token/TokenRejectTransaction.cjs +7 -7
  497. package/lib/token/TokenRejectTransaction.d.ts +14 -14
  498. package/lib/token/TokenRejectTransaction.js.map +1 -1
  499. package/lib/token/TokenRevokeKycTransaction.cjs +7 -7
  500. package/lib/token/TokenRevokeKycTransaction.d.ts +14 -14
  501. package/lib/token/TokenRevokeKycTransaction.js.map +1 -1
  502. package/lib/token/TokenSupplyType.cjs +1 -1
  503. package/lib/token/TokenSupplyType.d.ts +2 -2
  504. package/lib/token/TokenSupplyType.js.map +1 -1
  505. package/lib/token/TokenTransfer.cjs +4 -4
  506. package/lib/token/TokenTransfer.d.ts +8 -8
  507. package/lib/token/TokenTransfer.js.map +1 -1
  508. package/lib/token/TokenType.cjs +1 -1
  509. package/lib/token/TokenType.d.ts +2 -2
  510. package/lib/token/TokenType.js.map +1 -1
  511. package/lib/token/TokenUnfreezeTransaction.cjs +7 -7
  512. package/lib/token/TokenUnfreezeTransaction.d.ts +14 -14
  513. package/lib/token/TokenUnfreezeTransaction.js.map +1 -1
  514. package/lib/token/TokenUnpauseTransaction.cjs +7 -7
  515. package/lib/token/TokenUnpauseTransaction.d.ts +14 -14
  516. package/lib/token/TokenUnpauseTransaction.js.map +1 -1
  517. package/lib/token/TokenUpdateNftsTransaction.cjs +7 -7
  518. package/lib/token/TokenUpdateNftsTransaction.d.ts +14 -14
  519. package/lib/token/TokenUpdateNftsTransaction.js.map +1 -1
  520. package/lib/token/TokenUpdateTransaction.cjs +7 -7
  521. package/lib/token/TokenUpdateTransaction.d.ts +14 -14
  522. package/lib/token/TokenUpdateTransaction.js.map +1 -1
  523. package/lib/token/TokenWipeTransaction.cjs +7 -7
  524. package/lib/token/TokenWipeTransaction.d.ts +14 -14
  525. package/lib/token/TokenWipeTransaction.js.map +1 -1
  526. package/lib/topic/TopicCreateTransaction.cjs +6 -6
  527. package/lib/topic/TopicCreateTransaction.d.ts +12 -12
  528. package/lib/topic/TopicCreateTransaction.js.map +1 -1
  529. package/lib/topic/TopicDeleteTransaction.cjs +6 -6
  530. package/lib/topic/TopicDeleteTransaction.d.ts +12 -12
  531. package/lib/topic/TopicDeleteTransaction.js.map +1 -1
  532. package/lib/topic/TopicId.cjs +1 -1
  533. package/lib/topic/TopicId.d.ts +1 -1
  534. package/lib/topic/TopicId.js +1 -1
  535. package/lib/topic/TopicId.js.map +1 -1
  536. package/lib/topic/TopicInfo.cjs +1 -1
  537. package/lib/topic/TopicInfo.d.ts +1 -1
  538. package/lib/topic/TopicInfo.js +1 -1
  539. package/lib/topic/TopicInfo.js.map +1 -1
  540. package/lib/topic/TopicInfoQuery.cjs +7 -7
  541. package/lib/topic/TopicInfoQuery.d.ts +14 -14
  542. package/lib/topic/TopicInfoQuery.js.map +1 -1
  543. package/lib/topic/TopicMessage.cjs +2 -2
  544. package/lib/topic/TopicMessage.d.ts +4 -4
  545. package/lib/topic/TopicMessage.js.map +1 -1
  546. package/lib/topic/TopicMessageChunk.cjs +2 -2
  547. package/lib/topic/TopicMessageChunk.d.ts +4 -4
  548. package/lib/topic/TopicMessageChunk.js.map +1 -1
  549. package/lib/topic/TopicMessageQuery.cjs +1 -1
  550. package/lib/topic/TopicMessageQuery.js +1 -1
  551. package/lib/topic/TopicMessageQuery.js.map +1 -1
  552. package/lib/topic/TopicMessageSubmitTransaction.cjs +9 -9
  553. package/lib/topic/TopicMessageSubmitTransaction.d.ts +18 -18
  554. package/lib/topic/TopicMessageSubmitTransaction.js.map +1 -1
  555. package/lib/topic/TopicUpdateTransaction.cjs +6 -6
  556. package/lib/topic/TopicUpdateTransaction.d.ts +12 -12
  557. package/lib/topic/TopicUpdateTransaction.js.map +1 -1
  558. package/lib/transaction/BatchTransaction.cjs +5 -5
  559. package/lib/transaction/BatchTransaction.d.ts +9 -9
  560. package/lib/transaction/BatchTransaction.js +1 -1
  561. package/lib/transaction/BatchTransaction.js.map +1 -1
  562. package/lib/transaction/CustomFeeLimit.cjs +2 -2
  563. package/lib/transaction/CustomFeeLimit.d.ts +4 -4
  564. package/lib/transaction/CustomFeeLimit.js.map +1 -1
  565. package/lib/transaction/NodeAccountIdSignatureMap.cjs +2 -2
  566. package/lib/transaction/NodeAccountIdSignatureMap.d.ts +2 -2
  567. package/lib/transaction/NodeAccountIdSignatureMap.js +1 -1
  568. package/lib/transaction/NodeAccountIdSignatureMap.js.map +1 -1
  569. package/lib/transaction/NodeAccountIdSignatureMapLegacy.cjs +1 -1
  570. package/lib/transaction/NodeAccountIdSignatureMapLegacy.d.ts +2 -2
  571. package/lib/transaction/NodeAccountIdSignatureMapLegacy.js.map +1 -1
  572. package/lib/transaction/SignatureMap.cjs +1 -1
  573. package/lib/transaction/SignatureMap.js.map +1 -1
  574. package/lib/transaction/SignaturePairMap.cjs +1 -1
  575. package/lib/transaction/SignaturePairMap.d.ts +2 -2
  576. package/lib/transaction/SignaturePairMap.js.map +1 -1
  577. package/lib/transaction/Transaction.cjs +1 -1
  578. package/lib/transaction/Transaction.d.ts +1 -1
  579. package/lib/transaction/Transaction.js +1 -1
  580. package/lib/transaction/Transaction.js.map +1 -1
  581. package/lib/transaction/TransactionHashMap.cjs +1 -1
  582. package/lib/transaction/TransactionHashMap.d.ts +2 -2
  583. package/lib/transaction/TransactionHashMap.js.map +1 -1
  584. package/lib/transaction/TransactionId.cjs +1 -1
  585. package/lib/transaction/TransactionId.d.ts +1 -1
  586. package/lib/transaction/TransactionId.js +1 -1
  587. package/lib/transaction/TransactionId.js.map +1 -1
  588. package/lib/transaction/TransactionReceipt.cjs +1 -1
  589. package/lib/transaction/TransactionReceipt.d.ts +1 -1
  590. package/lib/transaction/TransactionReceipt.js +1 -1
  591. package/lib/transaction/TransactionReceipt.js.map +1 -1
  592. package/lib/transaction/TransactionReceiptQuery.cjs +1 -1
  593. package/lib/transaction/TransactionReceiptQuery.d.ts +1 -1
  594. package/lib/transaction/TransactionReceiptQuery.js +1 -1
  595. package/lib/transaction/TransactionReceiptQuery.js.map +1 -1
  596. package/lib/transaction/TransactionRecord.cjs +1 -1
  597. package/lib/transaction/TransactionRecord.d.ts +1 -1
  598. package/lib/transaction/TransactionRecord.js +1 -1
  599. package/lib/transaction/TransactionRecord.js.map +1 -1
  600. package/lib/transaction/TransactionRecordQuery.cjs +1 -1
  601. package/lib/transaction/TransactionRecordQuery.d.ts +1 -1
  602. package/lib/transaction/TransactionRecordQuery.js +1 -1
  603. package/lib/transaction/TransactionRecordQuery.js.map +1 -1
  604. package/lib/util/ASN1-Decoder.cjs +1 -1
  605. package/lib/util/ASN1-Decoder.js +1 -1
  606. package/lib/util/ASN1-Decoder.js.map +1 -1
  607. package/lib/version.js +1 -1
  608. package/package.json +6 -8
  609. package/src/Cache.js +6 -6
  610. package/src/Duration.js +1 -1
  611. package/src/EntityIdHelper.js +1 -1
  612. package/src/EthereumFlow.js +7 -7
  613. package/src/EthereumTransaction.js +7 -7
  614. package/src/EvmAddress.js +1 -1
  615. package/src/ExchangeRate.js +2 -2
  616. package/src/ExchangeRates.js +1 -1
  617. package/src/Executable.js +18 -2
  618. package/src/FeeComponents.js +1 -1
  619. package/src/FeeData.js +1 -1
  620. package/src/FeeDataType.js +1 -1
  621. package/src/FeeSchedule.js +1 -1
  622. package/src/FeeSchedules.js +1 -1
  623. package/src/FreezeType.js +1 -1
  624. package/src/Key.js +1 -1
  625. package/src/KeyList.js +3 -3
  626. package/src/Mnemonic.js +1 -1
  627. package/src/PrivateKey.js +7 -7
  628. package/src/PrngTransaction.js +9 -9
  629. package/src/PublicKey.js +5 -5
  630. package/src/RequestType.js +1 -1
  631. package/src/StakingInfo.js +1 -1
  632. package/src/Status.js +1 -1
  633. package/src/Timestamp.js +1 -1
  634. package/src/TransactionFeeSchedule.js +1 -1
  635. package/src/Transfer.js +2 -2
  636. package/src/account/AccountAllowanceAdjustTransaction.js +7 -7
  637. package/src/account/AccountAllowanceApproveTransaction.js +8 -8
  638. package/src/account/AccountAllowanceDeleteTransaction.js +7 -7
  639. package/src/account/AccountBalance.js +1 -1
  640. package/src/account/AccountBalanceQuery.js +6 -6
  641. package/src/account/AccountCreateTransaction.js +1 -1
  642. package/src/account/AccountDeleteTransaction.js +7 -7
  643. package/src/account/AccountId.js +1 -1
  644. package/src/account/AccountInfo.js +1 -1
  645. package/src/account/AccountInfoQuery.js +7 -7
  646. package/src/account/AccountRecordsQuery.js +7 -7
  647. package/src/account/AccountUpdateTransaction.js +7 -7
  648. package/src/account/HbarAllowance.js +3 -3
  649. package/src/account/HbarTransferMap.js +2 -2
  650. package/src/account/LiveHash.js +3 -3
  651. package/src/account/LiveHashAddTransaction.js +7 -7
  652. package/src/account/LiveHashDeleteTransaction.js +6 -6
  653. package/src/account/LiveHashQuery.js +7 -7
  654. package/src/account/NullableTokenDecimalMap.js +2 -2
  655. package/src/account/ProxyStaker.js +2 -2
  656. package/src/account/TokenAllowance.js +4 -4
  657. package/src/account/TokenBalanceMap.js +2 -2
  658. package/src/account/TokenDecimalMap.js +2 -2
  659. package/src/account/TokenNftAllowance.js +5 -5
  660. package/src/account/TokenNftTransferMap.js +5 -5
  661. package/src/account/TokenRelationship.js +4 -4
  662. package/src/account/TokenRelationshipMap.js +2 -2
  663. package/src/account/TokenTransferMap.js +4 -4
  664. package/src/account/TransferTransaction.js +6 -6
  665. package/src/address_book/AddressBooks.js +1 -1
  666. package/src/address_book/Endpoint.js +1 -1
  667. package/src/address_book/NodeAddress.js +1 -1
  668. package/src/address_book/NodeAddressBook.js +1 -1
  669. package/src/channel/Channel.js +26 -2
  670. package/src/channel/NativeChannel.js +111 -2
  671. package/src/channel/NodeChannel.js +4 -7
  672. package/src/channel/WebChannel.js +189 -21
  673. package/src/client/Client.js +79 -5
  674. package/src/client/NativeClient.js +1 -1
  675. package/src/client/NodeClient.js +7 -6
  676. package/src/client/WebClient.js +64 -31
  677. package/src/client/addressbooks/mainnet.js +1 -1
  678. package/src/client/addressbooks/previewnet.js +1 -1
  679. package/src/client/addressbooks/testnet.js +1 -1
  680. package/src/constants/ClientConstants.js +16 -0
  681. package/src/contract/ContractByteCodeQuery.js +6 -6
  682. package/src/contract/ContractCallQuery.js +1 -1
  683. package/src/contract/ContractCreateTransaction.js +8 -8
  684. package/src/contract/ContractDeleteTransaction.js +8 -8
  685. package/src/contract/ContractExecuteTransaction.js +9 -9
  686. package/src/contract/ContractFunctionResult.js +2 -2
  687. package/src/contract/ContractId.js +1 -1
  688. package/src/contract/ContractInfo.js +1 -1
  689. package/src/contract/ContractInfoQuery.js +7 -7
  690. package/src/contract/ContractLogInfo.js +2 -2
  691. package/src/contract/ContractNonceInfo.js +3 -3
  692. package/src/contract/ContractStateChange.js +1 -1
  693. package/src/contract/ContractUpdateTransaction.js +10 -10
  694. package/src/contract/DelegateContractId.js +2 -2
  695. package/src/contract/StorageChange.js +1 -1
  696. package/src/exports.js +1 -1
  697. package/src/file/FileAppendTransaction.js +7 -7
  698. package/src/file/FileContentsQuery.js +7 -7
  699. package/src/file/FileCreateTransaction.js +6 -6
  700. package/src/file/FileDeleteTransaction.js +7 -7
  701. package/src/file/FileId.js +1 -1
  702. package/src/file/FileInfo.js +1 -1
  703. package/src/file/FileInfoQuery.js +7 -7
  704. package/src/file/FileUpdateTransaction.js +6 -6
  705. package/src/network/AddressBookQuery.js +1 -8
  706. package/src/network/AddressBookQueryWeb.js +1 -8
  707. package/src/network/NetworkVersionInfo.js +1 -1
  708. package/src/network/NetworkVersionInfoQuery.js +6 -6
  709. package/src/network/SemanticVersion.js +1 -1
  710. package/src/node/NodeCreateTransaction.js +6 -6
  711. package/src/node/NodeDeleteTransaction.js +6 -6
  712. package/src/node/NodeUpdateTransaction.js +6 -6
  713. package/src/node/ServiceEndpoint.js +1 -1
  714. package/src/query/CostQuery.js +1 -1
  715. package/src/query/Query.js +1 -1
  716. package/src/query/QueryBase.js +1 -1
  717. package/src/schedule/ScheduleCreateTransaction.js +1 -1
  718. package/src/schedule/ScheduleDeleteTransaction.js +8 -8
  719. package/src/schedule/ScheduleId.js +1 -1
  720. package/src/schedule/ScheduleInfo.js +1 -1
  721. package/src/schedule/ScheduleInfoQuery.js +7 -7
  722. package/src/schedule/ScheduleSignTransaction.js +10 -10
  723. package/src/system/FreezeTransaction.js +6 -6
  724. package/src/system/SystemDeleteTransaction.js +8 -8
  725. package/src/system/SystemUndeleteTransaction.js +8 -8
  726. package/src/token/AbstractTokenTransferTransaction.js +1 -1
  727. package/src/token/AssessedCustomFee.js +1 -1
  728. package/src/token/CustomFee.js +1 -1
  729. package/src/token/CustomFixedFee.js +3 -3
  730. package/src/token/CustomFractionalFee.js +3 -3
  731. package/src/token/CustomRoyaltyFee.js +4 -4
  732. package/src/token/NftId.js +1 -1
  733. package/src/token/PendingAirdropId.js +1 -1
  734. package/src/token/PendingAirdropRecord.js +1 -1
  735. package/src/token/TokenAirdropTransaction.js +8 -8
  736. package/src/token/TokenAssociateTransaction.js +7 -7
  737. package/src/token/TokenAssociation.js +1 -1
  738. package/src/token/TokenBurnTransaction.js +7 -7
  739. package/src/token/TokenCancelAirdropTransaction.js +6 -6
  740. package/src/token/TokenClaimAirdropTransaction.js +6 -6
  741. package/src/token/TokenCreateTransaction.js +7 -7
  742. package/src/token/TokenDeleteTransaction.js +7 -7
  743. package/src/token/TokenDissociateTransaction.js +7 -7
  744. package/src/token/TokenFeeScheduleUpdateTransaction.js +7 -7
  745. package/src/token/TokenFreezeTransaction.js +7 -7
  746. package/src/token/TokenGrantKycTransaction.js +7 -7
  747. package/src/token/TokenId.js +1 -1
  748. package/src/token/TokenInfo.js +1 -1
  749. package/src/token/TokenInfoQuery.js +7 -7
  750. package/src/token/TokenKeyValidation.js +1 -1
  751. package/src/token/TokenMintTransaction.js +7 -7
  752. package/src/token/TokenNftInfo.js +10 -10
  753. package/src/token/TokenNftInfoQuery.js +11 -11
  754. package/src/token/TokenNftTransfer.js +5 -5
  755. package/src/token/TokenNftsUpdateTransaction.js +7 -7
  756. package/src/token/TokenPauseTransaction.js +7 -7
  757. package/src/token/TokenReference.js +1 -1
  758. package/src/token/TokenRejectTransaction.js +7 -7
  759. package/src/token/TokenRevokeKycTransaction.js +7 -7
  760. package/src/token/TokenSupplyType.js +1 -1
  761. package/src/token/TokenTransfer.js +4 -4
  762. package/src/token/TokenType.js +1 -1
  763. package/src/token/TokenUnfreezeTransaction.js +7 -7
  764. package/src/token/TokenUnpauseTransaction.js +7 -7
  765. package/src/token/TokenUpdateNftsTransaction.js +7 -7
  766. package/src/token/TokenUpdateTransaction.js +7 -7
  767. package/src/token/TokenWipeTransaction.js +7 -7
  768. package/src/topic/TopicCreateTransaction.js +6 -6
  769. package/src/topic/TopicDeleteTransaction.js +6 -6
  770. package/src/topic/TopicId.js +1 -1
  771. package/src/topic/TopicInfo.js +1 -1
  772. package/src/topic/TopicInfoQuery.js +7 -7
  773. package/src/topic/TopicMessage.js +2 -2
  774. package/src/topic/TopicMessageChunk.js +2 -2
  775. package/src/topic/TopicMessageQuery.js +1 -1
  776. package/src/topic/TopicMessageSubmitTransaction.js +9 -9
  777. package/src/topic/TopicUpdateTransaction.js +6 -6
  778. package/src/transaction/BatchTransaction.js +5 -5
  779. package/src/transaction/CustomFeeLimit.js +2 -2
  780. package/src/transaction/NodeAccountIdSignatureMap.js +2 -2
  781. package/src/transaction/NodeAccountIdSignatureMapLegacy.js +1 -1
  782. package/src/transaction/SignatureMap.js +1 -1
  783. package/src/transaction/SignaturePairMap.js +1 -1
  784. package/src/transaction/Transaction.js +1 -1
  785. package/src/transaction/TransactionHashMap.js +1 -1
  786. package/src/transaction/TransactionId.js +1 -1
  787. package/src/transaction/TransactionReceipt.js +1 -1
  788. package/src/transaction/TransactionReceiptQuery.js +1 -1
  789. package/src/transaction/TransactionRecord.js +1 -1
  790. package/src/transaction/TransactionRecordQuery.js +1 -1
  791. package/src/util/ASN1-Decoder.js +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"PrivateKey.js","sources":["../src/PrivateKey.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\nimport { hexlify } from \"@ethersproject/bytes\";\nimport { PrivateKey as PrivateKeyCrypto } from \"@hashgraph/cryptography\";\nimport { proto } from \"@hashgraph/proto\";\nimport Mnemonic from \"./Mnemonic.js\";\nimport PublicKey from \"./PublicKey.js\";\nimport Key from \"./Key.js\";\nimport CACHE from \"./Cache.js\";\nimport SignatureMap from \"./transaction/SignatureMap.js\";\nimport AccountId from \"./account/AccountId.js\";\nimport TransactionId from \"./transaction/TransactionId.js\";\nimport { decode } from \"./encoding/hex.js\";\nimport { ASN1Decoder } from \"./util/ASN1-Decoder.js\";\n\n/**\n * @typedef {import(\"./transaction/Transaction.js\").default} Transaction\n */\n\n/**\n * @namespace proto\n * @typedef {import(\"@hashgraph/proto\").proto.IKey} HieroProto.proto.IKey\n * @typedef {import(\"@hashgraph/proto\").proto.ITransaction} HieroProto.proto.ITransaction\n * @typedef {import(\"@hashgraph/proto\").proto.ISignaturePair} HieroProto.proto.ISignaturePair\n * @typedef {import(\"@hashgraph/proto\").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction\n * @typedef {import(\"@hashgraph/proto\").proto.TransactionBody} HieroProto.proto.TransactionBody\n */\n\nexport default class PrivateKey extends Key {\n /**\n * @internal\n * @hideconstructor\n * @param {PrivateKeyCrypto} key\n */\n constructor(key) {\n super();\n\n this._key = key;\n }\n\n /**\n * Generate a random Ed25519 private key.\n *\n * @returns {PrivateKey}\n */\n static generateED25519() {\n return new PrivateKey(PrivateKeyCrypto.generateED25519());\n }\n\n /**\n * Generate a random EDSA private key.\n *\n * @returns {PrivateKey}\n */\n static generateECDSA() {\n return new PrivateKey(PrivateKeyCrypto.generateECDSA());\n }\n\n /**\n * Depredated - Use `generateED25519()` instead\n * Generate a random Ed25519 private key.\n *\n * @returns {PrivateKey}\n */\n static generate() {\n return PrivateKey.generateED25519();\n }\n\n /**\n * Depredated - Use `generateED25519Async()` instead\n * Generate a random Ed25519 private key.\n *\n * @returns {Promise<PrivateKey>}\n */\n static async generateAsync() {\n return new PrivateKey(await PrivateKeyCrypto.generateAsync());\n }\n\n /**\n * Generate a random Ed25519 private key.\n *\n * @returns {Promise<PrivateKey>}\n */\n static async generateED25519Async() {\n return new PrivateKey(await PrivateKeyCrypto.generateED25519Async());\n }\n\n /**\n * Generate a random ECDSA private key.\n *\n * @returns {Promise<PrivateKey>}\n */\n static async generateECDSAAsync() {\n return new PrivateKey(await PrivateKeyCrypto.generateECDSAAsync());\n }\n\n /**\n * Construct a private key from bytes. Requires DER header.\n *\n * @param {Uint8Array} data\n * @returns {PrivateKey}\n */\n static fromBytes(data) {\n const keyString = hexlify(data);\n if (PrivateKey.isDerKey(keyString)) {\n if (PrivateKey.getAlgorithm(keyString) === \"ecdsa\") {\n return new PrivateKey(PrivateKeyCrypto.fromBytesECDSA(data));\n } else {\n return new PrivateKey(PrivateKeyCrypto.fromBytesED25519(data));\n }\n }\n\n // If the key is not DER, we assume it's a raw private key\n // this will default to ED25519 as we dont have a way\n // to determine the type of the key based on the raw bytes\n return new PrivateKey(PrivateKeyCrypto.fromBytes(data));\n }\n\n /**\n * Construct a ECDSA private key from bytes.\n *\n * @param {Uint8Array} data\n * @returns {PrivateKey}\n */\n static fromBytesECDSA(data) {\n return new PrivateKey(PrivateKeyCrypto.fromBytesECDSA(data));\n }\n\n /**\n * Construct a ED25519 private key from bytes.\n *\n * @param {Uint8Array} data\n * @returns {PrivateKey}\n */\n static fromBytesED25519(data) {\n return new PrivateKey(PrivateKeyCrypto.fromBytesED25519(data));\n }\n\n /**\n * @deprecated - Use fromStringECDSA() or fromStringED2551() on a HEX-encoded string\n * and fromStringDer() on a HEX-encoded string with DER prefix instead.\n * Construct a private key from a hex-encoded string. Requires DER header.\n * @param {string} text\n * @returns {PrivateKey}\n */\n static fromString(text) {\n if (PrivateKey.isDerKey(text)) {\n return this.fromStringDer(text);\n }\n // If the key is not DER, we assume it's a raw private key\n // this will default to ED25519 as we dont have a way\n // to determine the type of the key based on the raw bytes\n return new PrivateKey(PrivateKeyCrypto.fromString(text));\n }\n\n /**\n * Construct a private key from a HEX-encoded string with a der prefix\n *\n * @param {string} text\n * @returns {PrivateKey}\n */\n static fromStringDer(text) {\n // previous versions of the library used to accept non-der encoded private keys here\n // and it fallbacked to PrivateKey.fromString() so we need to keep this behavior\n if (!PrivateKey.isDerKey(text)) {\n // eslint-disable-next-line deprecation/deprecation\n return PrivateKey.fromString(text);\n }\n\n if (PrivateKey.getAlgorithm(text) === \"ecdsa\") {\n return this.fromStringECDSA(text);\n } else {\n return this.fromStringED25519(text);\n }\n }\n\n /**\n * Construct a ECDSA private key from a hex-encoded string.\n *\n * @param {string} text\n * @returns {PrivateKey}\n */\n static fromStringECDSA(text) {\n return new PrivateKey(PrivateKeyCrypto.fromStringECDSA(text));\n }\n\n /**\n * Construct a Ed25519 private key from a hex-encoded string.\n *\n * @param {string} text\n * @returns {PrivateKey}\n */\n static fromStringED25519(text) {\n return new PrivateKey(PrivateKeyCrypto.fromStringED25519(text));\n }\n\n /**\n * Construct a Ed25519 private key from a Uint8Array seed.\n *\n * @param {Uint8Array} seed\n * @returns {Promise<PrivateKey>}\n */\n static async fromSeedED25519(seed) {\n return new PrivateKey(await PrivateKeyCrypto.fromSeedED25519(seed));\n }\n\n /**\n * Construct a Ed25519 private key from a Uint8Array seed.\n *\n * @param {Uint8Array} seed\n * @returns {Promise<PrivateKey>}\n */\n static async fromSeedECDSAsecp256k1(seed) {\n return new PrivateKey(\n await PrivateKeyCrypto.fromSeedECDSAsecp256k1(seed),\n );\n }\n\n /**\n * @deprecated - Use `Mnemonic.from[Words|String]().to[Ed25519|Ecdsa]PrivateKey()` instead\n *\n * Recover a private key from a mnemonic phrase (and optionally a password).\n * @param {Mnemonic | string} mnemonic\n * @param {string} [passphrase]\n * @returns {Promise<PrivateKey>}\n */\n static async fromMnemonic(mnemonic, passphrase = \"\") {\n if (mnemonic instanceof Mnemonic) {\n return new PrivateKey(\n // eslint-disable-next-line deprecation/deprecation\n await PrivateKeyCrypto.fromMnemonic(\n mnemonic._mnemonic,\n passphrase,\n ),\n );\n }\n\n return new PrivateKey(\n // eslint-disable-next-line deprecation/deprecation\n await PrivateKeyCrypto.fromMnemonic(mnemonic, passphrase),\n );\n }\n\n /**\n * Recover a private key from a keystore, previously created by `.toKeystore()`.\n *\n * This key will _not_ support child key derivation.\n *\n * @param {Uint8Array} data\n * @param {string} [passphrase]\n * @returns {Promise<PrivateKey>}\n * @throws {cryptography.BadKeyError} If the passphrase is incorrect or the hash fails to validate.\n */\n static async fromKeystore(data, passphrase = \"\") {\n return new PrivateKey(\n await PrivateKeyCrypto.fromKeystore(data, passphrase),\n );\n }\n\n /**\n * Recover a private key from a pem string; the private key may be encrypted.\n *\n * This method assumes the .pem file has been converted to a string already.\n *\n * If `passphrase` is not null or empty, this looks for the first `ENCRYPTED PRIVATE KEY`\n * section and uses `passphrase` to decrypt it; otherwise, it looks for the first `PRIVATE KEY`\n * section and decodes that as a DER-encoded private key.\n *\n * @param {string} data\n * @param {string} [passphrase]\n * @returns {Promise<PrivateKey>}\n */\n static async fromPem(data, passphrase = \"\") {\n return new PrivateKey(await PrivateKeyCrypto.fromPem(data, passphrase));\n }\n\n /**\n * Derive a new private key at the given wallet index.\n *\n * Only currently supported for keys created with `fromMnemonic()`; other keys will throw\n * an error.\n *\n * You can check if a key supports derivation with `.supportsDerivation()`\n *\n * @param {number} index\n * @returns {Promise<PrivateKey>}\n * @throws If this key does not support derivation.\n */\n async derive(index) {\n return new PrivateKey(await this._key.derive(index));\n }\n\n /**\n * @param {number} index\n * @returns {Promise<PrivateKey>}\n * @throws If this key does not support derivation.\n */\n async legacyDerive(index) {\n return new PrivateKey(await this._key.legacyDerive(index));\n }\n\n /**\n * Get the public key associated with this private key.\n *\n * The public key can be freely given and used by other parties to verify\n * the signatures generated by this private key.\n *\n * @returns {PublicKey}\n */\n get publicKey() {\n return new PublicKey(this._key.publicKey);\n }\n\n /**\n * Get the public key associated with this private key.\n *\n * The public key can be freely given and used by other parties to verify\n * the signatures generated by this private key.\n *\n * @returns {?Uint8Array}\n */\n get chainCode() {\n return this._key._chainCode;\n }\n\n /**\n * Sign a message with this private key.\n *\n * @param {Uint8Array} bytes\n * @returns {Uint8Array} - The signature bytes without the message\n */\n sign(bytes) {\n return this._key.sign(bytes);\n }\n\n /**\n * @deprecated - Use legacy=false flag to use the modern approach\n * or don't pass it at all.\n * @overload\n * @param {Transaction} transaction\n * @param {true} legacy\n * @returns {Uint8Array | Uint8Array[] }\n */\n\n /**\n * @overload\n * @param {Transaction} transaction\n * @param {false} [legacy]\n * @returns {SignatureMap}\n */\n\n /**\n * @param {Transaction} transaction\n * @param {boolean} [legacy]\n * @returns {Uint8Array | Uint8Array[] | SignatureMap}\n */\n signTransaction(transaction, legacy = false) {\n if (legacy) {\n return this._signTransactionLegacy(transaction);\n }\n\n const sigMap = new SignatureMap();\n\n for (const signedTx of transaction._signedTransactions.list) {\n const bodyBytes = signedTx.bodyBytes;\n if (!bodyBytes) throw new Error(\"Body bytes are missing\");\n\n const body = proto.TransactionBody.decode(bodyBytes);\n if (!body.transactionID || !body.nodeAccountID) {\n throw new Error(\n \"Transaction ID or Node Account ID not found in the signed transaction\",\n );\n }\n\n const nodeId = AccountId._fromProtobuf(body.nodeAccountID);\n const transactionId = TransactionId._fromProtobuf(\n body.transactionID,\n );\n const sig = this._key.sign(bodyBytes);\n sigMap.addSignature(nodeId, transactionId, this.publicKey, sig);\n }\n\n transaction.addSignature(this.publicKey, sigMap);\n return sigMap;\n }\n\n /**\n * deprecated - This method is deprecated and will be removed in future versions.\n * Use the `signTransaction` method with the `legacy=false` flag or don't\n * pass it all for the modern approach.\n * @param {Transaction} transaction\n * @returns {Uint8Array | Uint8Array[]}\n */\n _signTransactionLegacy(transaction) {\n const signatures = transaction._signedTransactions.list.map(\n (signedTransaction) => {\n const bodyBytes = signedTransaction.bodyBytes;\n if (!bodyBytes) {\n return new Uint8Array();\n }\n\n return this._key.sign(bodyBytes);\n },\n );\n transaction.addSignature(this.publicKey, signatures);\n // Return directly Uint8Array if there is only one signature\n return signatures.length === 1 ? signatures[0] : signatures;\n }\n\n /**\n * Check if `derive` can be called on this private key.\n *\n * This is only the case if the key was created from a mnemonic.\n *\n * @returns {boolean}\n */\n isDerivable() {\n return this._key.isDerivable();\n }\n\n /**\n * @returns {Uint8Array}\n */\n toBytes() {\n return this._key.toBytes();\n }\n\n /**\n * @returns {Uint8Array}\n */\n toBytesDer() {\n return this._key.toBytesDer();\n }\n\n /**\n * @returns {Uint8Array}\n */\n toBytesRaw() {\n return this._key.toBytesRaw();\n }\n\n /**\n * @returns {string}\n */\n toString() {\n return this._key.toStringDer();\n }\n\n /**\n * @returns {string}\n */\n toStringDer() {\n return this._key.toStringDer();\n }\n\n /**\n * @returns {string}\n */\n toStringRaw() {\n return this._key.toStringRaw();\n }\n\n /**\n * Create a keystore with a given passphrase.\n *\n * The key can be recovered later with `fromKeystore()`.\n *\n * Note that this will not retain the ancillary data used for\n * deriving child keys, thus `.derive()` on the restored key will\n * throw even if this instance supports derivation.\n *\n * @param {string} [passphrase]\n * @returns {Promise<Uint8Array>}\n */\n toKeystore(passphrase = \"\") {\n return this._key.toKeystore(passphrase);\n }\n\n /**\n * @returns {HieroProto.proto.IKey}\n */\n _toProtobufKey() {\n return this.publicKey._toProtobufKey();\n }\n\n /**\n * @param {Long | number} shard\n * @param {Long | number} realm\n * @returns {AccountId}\n */\n toAccountId(shard, realm) {\n return this.publicKey.toAccountId(shard, realm);\n }\n\n /**\n * @returns {string}\n */\n get type() {\n return this._key._type;\n }\n\n /**\n * Recover the recovery ID used in the signature for the given message.\n *\n * **Note:** This method only works for ECDSA secp256k1 keys.\n * @param {Uint8Array} r - 32-byte `r` component of the signature\n * @param {Uint8Array} s - 32-byte `s` component of the signature\n * @param {Uint8Array} message - The original (unhashed) message\n * @returns {number} Recovery ID (0–3), or -1 if not found or not applicable\n */\n getRecoveryId(r, s, message) {\n return this._key.getRecoveryId(r, s, message);\n }\n\n /**\n * @param {string} privateKey\n * @returns { \"ecdsa\" | \"ed25519\"}\n */\n static getAlgorithm(privateKey) {\n if (!PrivateKey.isDerKey(privateKey)) {\n throw new Error(\"Only der keys are supported\");\n }\n\n const decoder = new ASN1Decoder(Uint8Array.from(decode(privateKey)));\n decoder.read();\n const decodedKeyType = decoder.getOidKeyTypes()[0];\n // @ts-ignored\n return decodedKeyType;\n }\n\n /**\n * @internal\n * @param {string} key\n * @returns {boolean}\n */\n static isDerKey(key) {\n try {\n const data = Uint8Array.from(decode(key));\n const decoder = new ASN1Decoder(data);\n decoder.read(); // Attempt to read the ASN.1 structure\n return true;\n } catch (error) {\n return false;\n }\n }\n}\n\nCACHE.setPrivateKeyConstructor((key) => new PrivateKey(key));\n"],"names":["PrivateKey","Key","constructor","key","super","this","_key","generateED25519","PrivateKeyCrypto","generateECDSA","generate","generateAsync","generateED25519Async","generateECDSAAsync","fromBytes","data","keyString","hexlify","isDerKey","getAlgorithm","fromBytesECDSA","fromBytesED25519","fromString","text","fromStringDer","fromStringECDSA","fromStringED25519","fromSeedED25519","seed","fromSeedECDSAsecp256k1","fromMnemonic","mnemonic","passphrase","Mnemonic","_mnemonic","fromKeystore","fromPem","derive","index","legacyDerive","publicKey","PublicKey","chainCode","_chainCode","sign","bytes","signTransaction","transaction","legacy","_signTransactionLegacy","sigMap","SignatureMap","signedTx","_signedTransactions","list","bodyBytes","Error","body","proto","TransactionBody","decode","transactionID","nodeAccountID","nodeId","AccountId","_fromProtobuf","transactionId","TransactionId","sig","addSignature","signatures","map","signedTransaction","Uint8Array","length","isDerivable","toBytes","toBytesDer","toBytesRaw","toString","toStringDer","toStringRaw","toKeystore","_toProtobufKey","toAccountId","shard","realm","type","_type","getRecoveryId","r","s","message","privateKey","decoder","ASN1Decoder","from","read","getOidKeyTypes","error","CACHE","setPrivateKeyConstructor"],"mappings":"2dA2Be,MAAMA,UAAmBC,EAMpC,WAAAC,CAAYC,GACRC,QAEAC,KAAKC,KAAOH,CACpB,CAOI,sBAAOI,GACH,OAAO,IAAIP,EAAWQ,EAAiBD,kBAC/C,CAOI,oBAAOE,GACH,OAAO,IAAIT,EAAWQ,EAAiBC,gBAC/C,CAQI,eAAOC,GACH,OAAOV,EAAWO,iBAC1B,CAQI,0BAAaI,GACT,OAAO,IAAIX,QAAiBQ,EAAiBG,gBACrD,CAOI,iCAAaC,GACT,OAAO,IAAIZ,QAAiBQ,EAAiBI,uBACrD,CAOI,+BAAaC,GACT,OAAO,IAAIb,QAAiBQ,EAAiBK,qBACrD,CAQI,gBAAOC,CAAUC,GACb,MAAMC,EAAYC,EAAQF,GAC1B,OAAIf,EAAWkB,SAASF,GACuB,UAAvChB,EAAWmB,aAAaH,GACjB,IAAIhB,EAAWQ,EAAiBY,eAAeL,IAE/C,IAAIf,EAAWQ,EAAiBa,iBAAiBN,IAOzD,IAAIf,EAAWQ,EAAiBM,UAAUC,GACzD,CAQI,qBAAOK,CAAeL,GAClB,OAAO,IAAIf,EAAWQ,EAAiBY,eAAeL,GAC9D,CAQI,uBAAOM,C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ACI,OAAO5E,KAAKC,KAAK2E,aACzB,CAcI,UAAAC,CAAWlD,EAAa,IACpB,OAAO3B,KAAKC,KAAK4E,WAAWlD,EACpC,CAKI,cAAAmD,GACI,OAAO9E,KAAKmC,UAAU2C,gBAC9B,CAOI,WAAAC,CAAYC,EAAOC,GACf,OAAOjF,KAAKmC,UAAU4C,YAAYC,EAAOC,EACjD,CAKI,QAAIC,GACA,OAAOlF,KAAKC,KAAKkF,KACzB,CAWI,aAAAC,CAAcC,EAAGC,EAAGC,GAChB,OAAOvF,KAAKC,KAAKmF,cAAcC,EAAGC,EAAGC,EAC7C,CAMI,mBAAOzE,CAAa0E,GAChB,IAAK7F,EAAWkB,SAAS2E,GACrB,MAAM,IAAIrC,MAAM,+BAGpB,MAAMsC,EAAU,IAAIC,EAAYtB,WAAWuB,KAAKpC,EAAOiC,KACvDC,EAAQG,OAGR,OAFuBH,EAAQI,iBAAiB,EAGxD,CAOI,eAAOhF,CAASf,GACZ,IACI,MAAMY,EAAO0D,WAAWuB,KAAKpC,EAAOzD,IAGpC,OAFgB,IAAI4F,EAAYhF,GACxBkF,QACD,CACV,CAAC,MAAOE,GACL,OAAO,CACnB,CACA,EAGAC,EAAMC,yBAA0BlG,GAAQ,IAAIH,EAAWG"}
1
+ {"version":3,"file":"PrivateKey.js","sources":["../src/PrivateKey.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\nimport { hexlify } from \"@ethersproject/bytes\";\nimport { PrivateKey as PrivateKeyCrypto } from \"@hiero-ledger/cryptography\";\nimport { proto } from \"@hiero-ledger/proto\";\nimport Mnemonic from \"./Mnemonic.js\";\nimport PublicKey from \"./PublicKey.js\";\nimport Key from \"./Key.js\";\nimport CACHE from \"./Cache.js\";\nimport SignatureMap from \"./transaction/SignatureMap.js\";\nimport AccountId from \"./account/AccountId.js\";\nimport TransactionId from \"./transaction/TransactionId.js\";\nimport { decode } from \"./encoding/hex.js\";\nimport { ASN1Decoder } from \"./util/ASN1-Decoder.js\";\n\n/**\n * @typedef {import(\"./transaction/Transaction.js\").default} Transaction\n */\n\n/**\n * @namespace proto\n * @typedef {import(\"@hiero-ledger/proto\").proto.IKey} HieroProto.proto.IKey\n * @typedef {import(\"@hiero-ledger/proto\").proto.ITransaction} HieroProto.proto.ITransaction\n * @typedef {import(\"@hiero-ledger/proto\").proto.ISignaturePair} HieroProto.proto.ISignaturePair\n * @typedef {import(\"@hiero-ledger/proto\").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction\n * @typedef {import(\"@hiero-ledger/proto\").proto.TransactionBody} HieroProto.proto.TransactionBody\n */\n\nexport default class PrivateKey extends Key {\n /**\n * @internal\n * @hideconstructor\n * @param {PrivateKeyCrypto} key\n */\n constructor(key) {\n super();\n\n this._key = key;\n }\n\n /**\n * Generate a random Ed25519 private key.\n *\n * @returns {PrivateKey}\n */\n static generateED25519() {\n return new PrivateKey(PrivateKeyCrypto.generateED25519());\n }\n\n /**\n * Generate a random EDSA private key.\n *\n * @returns {PrivateKey}\n */\n static generateECDSA() {\n return new PrivateKey(PrivateKeyCrypto.generateECDSA());\n }\n\n /**\n * Depredated - Use `generateED25519()` instead\n * Generate a random Ed25519 private key.\n *\n * @returns {PrivateKey}\n */\n static generate() {\n return PrivateKey.generateED25519();\n }\n\n /**\n * Depredated - Use `generateED25519Async()` instead\n * Generate a random Ed25519 private key.\n *\n * @returns {Promise<PrivateKey>}\n */\n static async generateAsync() {\n return new PrivateKey(await PrivateKeyCrypto.generateAsync());\n }\n\n /**\n * Generate a random Ed25519 private key.\n *\n * @returns {Promise<PrivateKey>}\n */\n static async generateED25519Async() {\n return new PrivateKey(await PrivateKeyCrypto.generateED25519Async());\n }\n\n /**\n * Generate a random ECDSA private key.\n *\n * @returns {Promise<PrivateKey>}\n */\n static async generateECDSAAsync() {\n return new PrivateKey(await PrivateKeyCrypto.generateECDSAAsync());\n }\n\n /**\n * Construct a private key from bytes. Requires DER header.\n *\n * @param {Uint8Array} data\n * @returns {PrivateKey}\n */\n static fromBytes(data) {\n const keyString = hexlify(data);\n if (PrivateKey.isDerKey(keyString)) {\n if (PrivateKey.getAlgorithm(keyString) === \"ecdsa\") {\n return new PrivateKey(PrivateKeyCrypto.fromBytesECDSA(data));\n } else {\n return new PrivateKey(PrivateKeyCrypto.fromBytesED25519(data));\n }\n }\n\n // If the key is not DER, we assume it's a raw private key\n // this will default to ED25519 as we dont have a way\n // to determine the type of the key based on the raw bytes\n return new PrivateKey(PrivateKeyCrypto.fromBytes(data));\n }\n\n /**\n * Construct a ECDSA private key from bytes.\n *\n * @param {Uint8Array} data\n * @returns {PrivateKey}\n */\n static fromBytesECDSA(data) {\n return new PrivateKey(PrivateKeyCrypto.fromBytesECDSA(data));\n }\n\n /**\n * Construct a ED25519 private key from bytes.\n *\n * @param {Uint8Array} data\n * @returns {PrivateKey}\n */\n static fromBytesED25519(data) {\n return new PrivateKey(PrivateKeyCrypto.fromBytesED25519(data));\n }\n\n /**\n * @deprecated - Use fromStringECDSA() or fromStringED2551() on a HEX-encoded string\n * and fromStringDer() on a HEX-encoded string with DER prefix instead.\n * Construct a private key from a hex-encoded string. Requires DER header.\n * @param {string} text\n * @returns {PrivateKey}\n */\n static fromString(text) {\n if (PrivateKey.isDerKey(text)) {\n return this.fromStringDer(text);\n }\n // If the key is not DER, we assume it's a raw private key\n // this will default to ED25519 as we dont have a way\n // to determine the type of the key based on the raw bytes\n return new PrivateKey(PrivateKeyCrypto.fromString(text));\n }\n\n /**\n * Construct a private key from a HEX-encoded string with a der prefix\n *\n * @param {string} text\n * @returns {PrivateKey}\n */\n static fromStringDer(text) {\n // previous versions of the library used to accept non-der encoded private keys here\n // and it fallbacked to PrivateKey.fromString() so we need to keep this behavior\n if (!PrivateKey.isDerKey(text)) {\n // eslint-disable-next-line deprecation/deprecation\n return PrivateKey.fromString(text);\n }\n\n if (PrivateKey.getAlgorithm(text) === \"ecdsa\") {\n return this.fromStringECDSA(text);\n } else {\n return this.fromStringED25519(text);\n }\n }\n\n /**\n * Construct a ECDSA private key from a hex-encoded string.\n *\n * @param {string} text\n * @returns {PrivateKey}\n */\n static fromStringECDSA(text) {\n return new PrivateKey(PrivateKeyCrypto.fromStringECDSA(text));\n }\n\n /**\n * Construct a Ed25519 private key from a hex-encoded string.\n *\n * @param {string} text\n * @returns {PrivateKey}\n */\n static fromStringED25519(text) {\n return new PrivateKey(PrivateKeyCrypto.fromStringED25519(text));\n }\n\n /**\n * Construct a Ed25519 private key from a Uint8Array seed.\n *\n * @param {Uint8Array} seed\n * @returns {Promise<PrivateKey>}\n */\n static async fromSeedED25519(seed) {\n return new PrivateKey(await PrivateKeyCrypto.fromSeedED25519(seed));\n }\n\n /**\n * Construct a Ed25519 private key from a Uint8Array seed.\n *\n * @param {Uint8Array} seed\n * @returns {Promise<PrivateKey>}\n */\n static async fromSeedECDSAsecp256k1(seed) {\n return new PrivateKey(\n await PrivateKeyCrypto.fromSeedECDSAsecp256k1(seed),\n );\n }\n\n /**\n * @deprecated - Use `Mnemonic.from[Words|String]().to[Ed25519|Ecdsa]PrivateKey()` instead\n *\n * Recover a private key from a mnemonic phrase (and optionally a password).\n * @param {Mnemonic | string} mnemonic\n * @param {string} [passphrase]\n * @returns {Promise<PrivateKey>}\n */\n static async fromMnemonic(mnemonic, passphrase = \"\") {\n if (mnemonic instanceof Mnemonic) {\n return new PrivateKey(\n // eslint-disable-next-line deprecation/deprecation\n await PrivateKeyCrypto.fromMnemonic(\n mnemonic._mnemonic,\n passphrase,\n ),\n );\n }\n\n return new PrivateKey(\n // eslint-disable-next-line deprecation/deprecation\n await PrivateKeyCrypto.fromMnemonic(mnemonic, passphrase),\n );\n }\n\n /**\n * Recover a private key from a keystore, previously created by `.toKeystore()`.\n *\n * This key will _not_ support child key derivation.\n *\n * @param {Uint8Array} data\n * @param {string} [passphrase]\n * @returns {Promise<PrivateKey>}\n * @throws {cryptography.BadKeyError} If the passphrase is incorrect or the hash fails to validate.\n */\n static async fromKeystore(data, passphrase = \"\") {\n return new PrivateKey(\n await PrivateKeyCrypto.fromKeystore(data, passphrase),\n );\n }\n\n /**\n * Recover a private key from a pem string; the private key may be encrypted.\n *\n * This method assumes the .pem file has been converted to a string already.\n *\n * If `passphrase` is not null or empty, this looks for the first `ENCRYPTED PRIVATE KEY`\n * section and uses `passphrase` to decrypt it; otherwise, it looks for the first `PRIVATE KEY`\n * section and decodes that as a DER-encoded private key.\n *\n * @param {string} data\n * @param {string} [passphrase]\n * @returns {Promise<PrivateKey>}\n */\n static async fromPem(data, passphrase = \"\") {\n return new PrivateKey(await PrivateKeyCrypto.fromPem(data, passphrase));\n }\n\n /**\n * Derive a new private key at the given wallet index.\n *\n * Only currently supported for keys created with `fromMnemonic()`; other keys will throw\n * an error.\n *\n * You can check if a key supports derivation with `.supportsDerivation()`\n *\n * @param {number} index\n * @returns {Promise<PrivateKey>}\n * @throws If this key does not support derivation.\n */\n async derive(index) {\n return new PrivateKey(await this._key.derive(index));\n }\n\n /**\n * @param {number} index\n * @returns {Promise<PrivateKey>}\n * @throws If this key does not support derivation.\n */\n async legacyDerive(index) {\n return new PrivateKey(await this._key.legacyDerive(index));\n }\n\n /**\n * Get the public key associated with this private key.\n *\n * The public key can be freely given and used by other parties to verify\n * the signatures generated by this private key.\n *\n * @returns {PublicKey}\n */\n get publicKey() {\n return new PublicKey(this._key.publicKey);\n }\n\n /**\n * Get the public key associated with this private key.\n *\n * The public key can be freely given and used by other parties to verify\n * the signatures generated by this private key.\n *\n * @returns {?Uint8Array}\n */\n get chainCode() {\n return this._key._chainCode;\n }\n\n /**\n * Sign a message with this private key.\n *\n * @param {Uint8Array} bytes\n * @returns {Uint8Array} - The signature bytes without the message\n */\n sign(bytes) {\n return this._key.sign(bytes);\n }\n\n /**\n * @deprecated - Use legacy=false flag to use the modern approach\n * or don't pass it at all.\n * @overload\n * @param {Transaction} transaction\n * @param {true} legacy\n * @returns {Uint8Array | Uint8Array[] }\n */\n\n /**\n * @overload\n * @param {Transaction} transaction\n * @param {false} [legacy]\n * @returns {SignatureMap}\n */\n\n /**\n * @param {Transaction} transaction\n * @param {boolean} [legacy]\n * @returns {Uint8Array | Uint8Array[] | SignatureMap}\n */\n signTransaction(transaction, legacy = false) {\n if (legacy) {\n return this._signTransactionLegacy(transaction);\n }\n\n const sigMap = new SignatureMap();\n\n for (const signedTx of transaction._signedTransactions.list) {\n const bodyBytes = signedTx.bodyBytes;\n if (!bodyBytes) throw new Error(\"Body bytes are missing\");\n\n const body = proto.TransactionBody.decode(bodyBytes);\n if (!body.transactionID || !body.nodeAccountID) {\n throw new Error(\n \"Transaction ID or Node Account ID not found in the signed transaction\",\n );\n }\n\n const nodeId = AccountId._fromProtobuf(body.nodeAccountID);\n const transactionId = TransactionId._fromProtobuf(\n body.transactionID,\n );\n const sig = this._key.sign(bodyBytes);\n sigMap.addSignature(nodeId, transactionId, this.publicKey, sig);\n }\n\n transaction.addSignature(this.publicKey, sigMap);\n return sigMap;\n }\n\n /**\n * deprecated - This method is deprecated and will be removed in future versions.\n * Use the `signTransaction` method with the `legacy=false` flag or don't\n * pass it all for the modern approach.\n * @param {Transaction} transaction\n * @returns {Uint8Array | Uint8Array[]}\n */\n _signTransactionLegacy(transaction) {\n const signatures = transaction._signedTransactions.list.map(\n (signedTransaction) => {\n const bodyBytes = signedTransaction.bodyBytes;\n if (!bodyBytes) {\n return new Uint8Array();\n }\n\n return this._key.sign(bodyBytes);\n },\n );\n transaction.addSignature(this.publicKey, signatures);\n // Return directly Uint8Array if there is only one signature\n return signatures.length === 1 ? signatures[0] : signatures;\n }\n\n /**\n * Check if `derive` can be called on this private key.\n *\n * This is only the case if the key was created from a mnemonic.\n *\n * @returns {boolean}\n */\n isDerivable() {\n return this._key.isDerivable();\n }\n\n /**\n * @returns {Uint8Array}\n */\n toBytes() {\n return this._key.toBytes();\n }\n\n /**\n * @returns {Uint8Array}\n */\n toBytesDer() {\n return this._key.toBytesDer();\n }\n\n /**\n * @returns {Uint8Array}\n */\n toBytesRaw() {\n return this._key.toBytesRaw();\n }\n\n /**\n * @returns {string}\n */\n toString() {\n return this._key.toStringDer();\n }\n\n /**\n * @returns {string}\n */\n toStringDer() {\n return this._key.toStringDer();\n }\n\n /**\n * @returns {string}\n */\n toStringRaw() {\n return this._key.toStringRaw();\n }\n\n /**\n * Create a keystore with a given passphrase.\n *\n * The key can be recovered later with `fromKeystore()`.\n *\n * Note that this will not retain the ancillary data used for\n * deriving child keys, thus `.derive()` on the restored key will\n * throw even if this instance supports derivation.\n *\n * @param {string} [passphrase]\n * @returns {Promise<Uint8Array>}\n */\n toKeystore(passphrase = \"\") {\n return this._key.toKeystore(passphrase);\n }\n\n /**\n * @returns {HieroProto.proto.IKey}\n */\n _toProtobufKey() {\n return this.publicKey._toProtobufKey();\n }\n\n /**\n * @param {Long | number} shard\n * @param {Long | number} realm\n * @returns {AccountId}\n */\n toAccountId(shard, realm) {\n return this.publicKey.toAccountId(shard, realm);\n }\n\n /**\n * @returns {string}\n */\n get type() {\n return this._key._type;\n }\n\n /**\n * Recover the recovery ID used in the signature for the given message.\n *\n * **Note:** This method only works for ECDSA secp256k1 keys.\n * @param {Uint8Array} r - 32-byte `r` component of the signature\n * @param {Uint8Array} s - 32-byte `s` component of the signature\n * @param {Uint8Array} message - The original (unhashed) message\n * @returns {number} Recovery ID (0–3), or -1 if not found or not applicable\n */\n getRecoveryId(r, s, message) {\n return this._key.getRecoveryId(r, s, message);\n }\n\n /**\n * @param {string} privateKey\n * @returns { \"ecdsa\" | \"ed25519\"}\n */\n static getAlgorithm(privateKey) {\n if (!PrivateKey.isDerKey(privateKey)) {\n throw new Error(\"Only der keys are supported\");\n }\n\n const decoder = new ASN1Decoder(Uint8Array.from(decode(privateKey)));\n decoder.read();\n const decodedKeyType = decoder.getOidKeyTypes()[0];\n // @ts-ignored\n return decodedKeyType;\n }\n\n /**\n * @internal\n * @param {string} key\n * @returns {boolean}\n */\n static isDerKey(key) {\n try {\n const data = Uint8Array.from(decode(key));\n const decoder = new ASN1Decoder(data);\n decoder.read(); // Attempt to read the ASN.1 structure\n return true;\n } catch (error) {\n return false;\n }\n }\n}\n\nCACHE.setPrivateKeyConstructor((key) => new PrivateKey(key));\n"],"names":["PrivateKey","Key","constructor","key","super","this","_key","generateED25519","PrivateKeyCrypto","generateECDSA","generate","generateAsync","generateED25519Async","generateECDSAAsync","fromBytes","data","keyString","hexlify","isDerKey","getAlgorithm","fromBytesECDSA","fromBytesED25519","fromString","text","fromStringDer","fromStringECDSA","fromStringED25519","fromSeedED25519","seed","fromSeedECDSAsecp256k1","fromMnemonic","mnemonic","passphrase","Mnemonic","_mnemonic","fromKeystore","fromPem","derive","index","legacyDerive","publicKey","PublicKey","chainCode","_chainCode","sign","bytes","signTransaction","transaction","legacy","_signTransactionLegacy","sigMap","SignatureMap","signedTx","_signedTransactions","list","bodyBytes","Error","body","proto","TransactionBody","decode","transactionID","nodeAccountID","nodeId","AccountId","_fromProtobuf","transactionId","TransactionId","sig","addSignature","signatures","map","signedTransaction","Uint8Array","length","isDerivable","toBytes","toBytesDer","toBytesRaw","toString","toStringDer","toStringRaw","toKeystore","_toProtobufKey","toAccountId","shard","realm","type","_type","getRecoveryId","r","s","message","privateKey","decoder","ASN1Decoder","from","read","getOidKeyTypes","error","CACHE","setPrivateKeyConstructor"],"mappings":"ieA2Be,MAAMA,UAAmBC,EAMpC,WAAAC,CAAYC,GACRC,QAEAC,KAAKC,KAAOH,CACpB,CAOI,sBAAOI,GACH,OAAO,IAAIP,EAAWQ,EAAiBD,kBAC/C,CAOI,oBAAOE,GACH,OAAO,IAAIT,EAAWQ,EAAiBC,gBAC/C,CAQI,eAAOC,GACH,OAAOV,EAAWO,iBAC1B,CAQI,0BAAaI,GACT,OAAO,IAAIX,QAAiBQ,EAAiBG,gBACrD,CAOI,iCAAaC,GACT,OAAO,IAAIZ,QAAiBQ,EAAiBI,uBACrD,CAOI,+BAAaC,GACT,OAAO,IAAIb,QAAiBQ,EAAiBK,qBACrD,CAQI,gBAAOC,CAAUC,GACb,MAAMC,EAAYC,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,KAAKC,KAAKqE,aACzB,CAKI,OAAAC,GACI,OAAOvE,KAAKC,KAAKsE,SACzB,CAKI,UAAAC,GACI,OAAOxE,KAAKC,KAAKuE,YACzB,CAKI,UAAAC,GACI,OAAOzE,KAAKC,KAAKwE,YACzB,CAKI,QAAAC,GACI,OAAO1E,KAAKC,KAAK0E,aACzB,CAKI,WAAAA,GACI,OAAO3E,KAAKC,KAAK0E,aACzB,CAKI,WAAAC,GACI,OAAO5E,KAAKC,KAAK2E,aACzB,CAcI,UAAAC,CAAWlD,EAAa,IACpB,OAAO3B,KAAKC,KAAK4E,WAAWlD,EACpC,CAKI,cAAAmD,GACI,OAAO9E,KAAKmC,UAAU2C,gBAC9B,CAOI,WAAAC,CAAYC,EAAOC,GACf,OAAOjF,KAAKmC,UAAU4C,YAAYC,EAAOC,EACjD,CAKI,QAAIC,GACA,OAAOlF,KAAKC,KAAKkF,KACzB,CAWI,aAAAC,CAAcC,EAAGC,EAAGC,GAChB,OAAOvF,KAAKC,KAAKmF,cAAcC,EAAGC,EAAGC,EAC7C,CAMI,mBAAOzE,CAAa0E,GAChB,IAAK7F,EAAWkB,SAAS2E,GACrB,MAAM,IAAIrC,MAAM,+BAGpB,MAAMsC,EAAU,IAAIC,EAAYtB,WAAWuB,KAAKpC,EAAOiC,KACvDC,EAAQG,OAGR,OAFuBH,EAAQI,iBAAiB,EAGxD,CAOI,eAAOhF,CAASf,GACZ,IACI,MAAMY,EAAO0D,WAAWuB,KAAKpC,EAAOzD,IAGpC,OAFgB,IAAI4F,EAAYhF,GACxBkF,QACD,CACV,CAAC,MAAOE,GACL,OAAO,CACnB,CACA,EAGAC,EAAMC,yBAA0BlG,GAAQ,IAAIH,EAAWG"}
@@ -10,15 +10,15 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
10
10
  // SPDX-License-Identifier: Apache-2.0
11
11
 
12
12
  /**
13
- * @typedef {import("@hashgraph/proto").proto.ITransaction} HieroProto.proto.ITransaction
14
- * @typedef {import("@hashgraph/proto").proto.Transaction} HieroProto.proto.Transaction
15
- * @typedef {import("@hashgraph/proto").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction
16
- * @typedef {import("@hashgraph/proto").proto.SignedTransaction} HieroProto.proto.SignedTransaction
17
- * @typedef {import("@hashgraph/proto").proto.IUtilPrngTransactionBody } HieroProto.proto.IUtilPrngTransactionBody
18
- * @typedef {import("@hashgraph/proto").proto.UtilPrngTransactionBody} HieroProto.proto.UtilPrngTransactionBody
19
- * @typedef {import("@hashgraph/proto").proto.ITransactionResponse} HieroProto.proto.TransactionResponse
20
- * @typedef {import("@hashgraph/proto").proto.TransactionBody} HieroProto.proto.TransactionBody
21
- * @typedef {import("@hashgraph/proto").proto.ITransactionBody} HieroProto.proto.ITransactionBody
13
+ * @typedef {import("@hiero-ledger/proto").proto.ITransaction} HieroProto.proto.ITransaction
14
+ * @typedef {import("@hiero-ledger/proto").proto.Transaction} HieroProto.proto.Transaction
15
+ * @typedef {import("@hiero-ledger/proto").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction
16
+ * @typedef {import("@hiero-ledger/proto").proto.SignedTransaction} HieroProto.proto.SignedTransaction
17
+ * @typedef {import("@hiero-ledger/proto").proto.IUtilPrngTransactionBody } HieroProto.proto.IUtilPrngTransactionBody
18
+ * @typedef {import("@hiero-ledger/proto").proto.UtilPrngTransactionBody} HieroProto.proto.UtilPrngTransactionBody
19
+ * @typedef {import("@hiero-ledger/proto").proto.ITransactionResponse} HieroProto.proto.TransactionResponse
20
+ * @typedef {import("@hiero-ledger/proto").proto.TransactionBody} HieroProto.proto.TransactionBody
21
+ * @typedef {import("@hiero-ledger/proto").proto.ITransactionBody} HieroProto.proto.ITransactionBody
22
22
  * @typedef {import("./account/AccountId.js").default} AccountId
23
23
  * @typedef {import("./transaction/TransactionId.js").default} TransactionId
24
24
  */
@@ -1,13 +1,13 @@
1
1
  /**
2
- * @typedef {import("@hashgraph/proto").proto.ITransaction} HieroProto.proto.ITransaction
3
- * @typedef {import("@hashgraph/proto").proto.Transaction} HieroProto.proto.Transaction
4
- * @typedef {import("@hashgraph/proto").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction
5
- * @typedef {import("@hashgraph/proto").proto.SignedTransaction} HieroProto.proto.SignedTransaction
6
- * @typedef {import("@hashgraph/proto").proto.IUtilPrngTransactionBody } HieroProto.proto.IUtilPrngTransactionBody
7
- * @typedef {import("@hashgraph/proto").proto.UtilPrngTransactionBody} HieroProto.proto.UtilPrngTransactionBody
8
- * @typedef {import("@hashgraph/proto").proto.ITransactionResponse} HieroProto.proto.TransactionResponse
9
- * @typedef {import("@hashgraph/proto").proto.TransactionBody} HieroProto.proto.TransactionBody
10
- * @typedef {import("@hashgraph/proto").proto.ITransactionBody} HieroProto.proto.ITransactionBody
2
+ * @typedef {import("@hiero-ledger/proto").proto.ITransaction} HieroProto.proto.ITransaction
3
+ * @typedef {import("@hiero-ledger/proto").proto.Transaction} HieroProto.proto.Transaction
4
+ * @typedef {import("@hiero-ledger/proto").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction
5
+ * @typedef {import("@hiero-ledger/proto").proto.SignedTransaction} HieroProto.proto.SignedTransaction
6
+ * @typedef {import("@hiero-ledger/proto").proto.IUtilPrngTransactionBody } HieroProto.proto.IUtilPrngTransactionBody
7
+ * @typedef {import("@hiero-ledger/proto").proto.UtilPrngTransactionBody} HieroProto.proto.UtilPrngTransactionBody
8
+ * @typedef {import("@hiero-ledger/proto").proto.ITransactionResponse} HieroProto.proto.TransactionResponse
9
+ * @typedef {import("@hiero-ledger/proto").proto.TransactionBody} HieroProto.proto.TransactionBody
10
+ * @typedef {import("@hiero-ledger/proto").proto.ITransactionBody} HieroProto.proto.ITransactionBody
11
11
  * @typedef {import("./account/AccountId.js").default} AccountId
12
12
  * @typedef {import("./transaction/TransactionId.js").default} TransactionId
13
13
  */
@@ -56,15 +56,15 @@ export default class PrngTransaction extends Transaction {
56
56
  }
57
57
  export namespace HieroProto {
58
58
  namespace proto {
59
- type ITransaction = import("@hashgraph/proto").proto.ITransaction;
60
- type Transaction = import("@hashgraph/proto").proto.Transaction;
61
- type ISignedTransaction = import("@hashgraph/proto").proto.ISignedTransaction;
62
- type SignedTransaction = import("@hashgraph/proto").proto.SignedTransaction;
63
- type IUtilPrngTransactionBody = import("@hashgraph/proto").proto.IUtilPrngTransactionBody;
64
- type UtilPrngTransactionBody = import("@hashgraph/proto").proto.UtilPrngTransactionBody;
65
- type TransactionResponse = import("@hashgraph/proto").proto.ITransactionResponse;
66
- type TransactionBody = import("@hashgraph/proto").proto.TransactionBody;
67
- type ITransactionBody = import("@hashgraph/proto").proto.ITransactionBody;
59
+ type ITransaction = import("@hiero-ledger/proto").proto.ITransaction;
60
+ type Transaction = import("@hiero-ledger/proto").proto.Transaction;
61
+ type ISignedTransaction = import("@hiero-ledger/proto").proto.ISignedTransaction;
62
+ type SignedTransaction = import("@hiero-ledger/proto").proto.SignedTransaction;
63
+ type IUtilPrngTransactionBody = import("@hiero-ledger/proto").proto.IUtilPrngTransactionBody;
64
+ type UtilPrngTransactionBody = import("@hiero-ledger/proto").proto.UtilPrngTransactionBody;
65
+ type TransactionResponse = import("@hiero-ledger/proto").proto.ITransactionResponse;
66
+ type TransactionBody = import("@hiero-ledger/proto").proto.TransactionBody;
67
+ type ITransactionBody = import("@hiero-ledger/proto").proto.ITransactionBody;
68
68
  }
69
69
  }
70
70
  export type AccountId = import("./account/AccountId.js").default;
@@ -1 +1 @@
1
- {"version":3,"file":"PrngTransaction.js","sources":["../src/PrngTransaction.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Transaction, {\n TRANSACTION_REGISTRY,\n} from \"./transaction/Transaction.js\";\nimport { isNumber } from \"./util.js\";\n\n/**\n * @typedef {import(\"@hashgraph/proto\").proto.ITransaction} HieroProto.proto.ITransaction\n * @typedef {import(\"@hashgraph/proto\").proto.Transaction} HieroProto.proto.Transaction\n * @typedef {import(\"@hashgraph/proto\").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction\n * @typedef {import(\"@hashgraph/proto\").proto.SignedTransaction} HieroProto.proto.SignedTransaction\n * @typedef {import(\"@hashgraph/proto\").proto.IUtilPrngTransactionBody } HieroProto.proto.IUtilPrngTransactionBody\n * @typedef {import(\"@hashgraph/proto\").proto.UtilPrngTransactionBody} HieroProto.proto.UtilPrngTransactionBody\n * @typedef {import(\"@hashgraph/proto\").proto.ITransactionResponse} HieroProto.proto.TransactionResponse\n * @typedef {import(\"@hashgraph/proto\").proto.TransactionBody} HieroProto.proto.TransactionBody\n * @typedef {import(\"@hashgraph/proto\").proto.ITransactionBody} HieroProto.proto.ITransactionBody\n * @typedef {import(\"./account/AccountId.js\").default} AccountId\n * @typedef {import(\"./transaction/TransactionId.js\").default} TransactionId\n */\n\n/**\n * @typedef {import(\"./client/Client.js\").default<*, *>} Client\n * @typedef {import(\"./channel/Channel.js\").default} Channel\n */\n\n/**\n * Gets a pseudorandom 32-bit number. Not cryptographically secure. See HIP-351 https://hips.hedera.com/hip/hip-351\n */\nexport default class PrngTransaction extends Transaction {\n /**\n * @param {object} props\n * @param {?number } [props.range]\n */\n constructor(props = {}) {\n super();\n\n /**\n * @private\n * @type {?number}\n */\n this._range = null;\n\n if (props.range != null) {\n this.setRange(props.range);\n }\n }\n\n /**\n * @param {number} newRange\n * @returns {this}\n */\n setRange(newRange) {\n this._range = newRange;\n return this;\n }\n\n get range() {\n return this._range;\n }\n\n /**\n * @param {Client} client\n */\n _validateChecksums(client) {\n if (this._range != null && isNumber(this._range)) {\n this._validateChecksums(client);\n }\n }\n\n /**\n * @override\n * @internal\n * @param {Channel} channel\n * @param {HieroProto.proto.ITransaction} request\n * @returns {Promise<HieroProto.proto.TransactionResponse>}\n */\n _execute(channel, request) {\n return channel.util.prng(request);\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.ITransaction[]} transactions\n * @param {HieroProto.proto.ISignedTransaction[]} signedTransactions\n * @param {TransactionId[]} transactionIds\n * @param {AccountId[]} nodeIds\n * @param {HieroProto.proto.ITransactionBody[]} bodies\n * @returns {PrngTransaction}\n */\n static _fromProtobuf(\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n ) {\n const body = /** @type {HieroProto.proto.ITransactionBody} */ (\n bodies[0]\n );\n const transactionRange =\n /** @type {HieroProto.proto.IUtilPrngTransactionBody} */ (\n body.utilPrng\n );\n return Transaction._fromProtobufTransactions(\n new PrngTransaction({\n range: transactionRange.range,\n }),\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n );\n }\n\n /**\n * @override\n * @protected\n * @returns {NonNullable<HieroProto.proto.TransactionBody[\"data\"]>}\n */\n _getTransactionDataCase() {\n return \"utilPrng\";\n }\n\n /**\n * @override\n * @protected\n * @returns {HieroProto.proto.IUtilPrngTransactionBody}\n */\n _makeTransactionData() {\n return {\n range: this.range,\n };\n }\n\n /**\n * @returns {string}\n */\n _getLogId() {\n const timestamp = /** @type {import(\"./Timestamp.js\").default} */ (\n this._transactionIds.current.validStart\n );\n return `RandomGenerate:${timestamp.toString()}`;\n }\n}\n\nTRANSACTION_REGISTRY.set(\n \"utilPrng\",\n // eslint-disable-next-line @typescript-eslint/unbound-method\n PrngTransaction._fromProtobuf,\n);\n"],"names":["PrngTransaction","Transaction","constructor","props","super","this","_range","range","setRange","newRange","_validateChecksums","client","isNumber","_execute","channel","request","util","prng","_fromProtobuf","transactions","signedTransactions","transactionIds","nodeIds","bodies","transactionRange","_fromProtobufTransactions","_getTransactionDataCase","_makeTransactionData","_getLogId","_transactionIds","current","toString","TRANSACTION_REGISTRY","set"],"mappings":"4GA6Be,MAAMA,UAAwBC,EAKzC,WAAAC,CAAYC,EAAQ,IAChBC,QAMAC,KAAKC,OAAS,KAEK,MAAfH,EAAMI,OACNF,KAAKG,SAASL,EAAMI,MAEhC,CAMI,QAAAC,CAASC,GAEL,OADAJ,KAAKC,OAASG,EACPJ,IACf,CAEI,SAAIE,GACA,OAAOF,KAAKC,MACpB,CAKI,kBAAAI,CAAmBC,GACI,MAAfN,KAAKC,QAAkBM,EAASP,KAAKC,SACrCD,KAAKK,mBAAmBC,EAEpC,CASI,QAAAE,CAASC,EAASC,GACd,OAAOD,EAAQE,KAAKC,KAAKF,EACjC,CAWI,oBAAOG,CACHC,EACAC,EACAC,EACAC,EACAC,GAEA,MAGMC,EAFFD,EAAO,GAKN,SACL,OAAOtB,EAAYwB,0BACf,IAAIzB,EAAgB,CAChBO,MAAOiB,EAAiBjB,QAE5BY,EACAC,EACAC,EACAC,EACAC,EAEZ,CAOI,uBAAAG,GACI,MAAO,UACf,CAOI,oBAAAC,GACI,MAAO,CACHpB,MAAOF,KAAKE,MAExB,CAKI,SAAAqB,GAII,MAAO,kBAFHvB,KAAKwB,gBAAgBC,QACxB,WACkCC,YAC3C,EAGAC,EAAqBC,IACjB,WAEAjC,EAAgBkB"}
1
+ {"version":3,"file":"PrngTransaction.js","sources":["../src/PrngTransaction.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport Transaction, {\n TRANSACTION_REGISTRY,\n} from \"./transaction/Transaction.js\";\nimport { isNumber } from \"./util.js\";\n\n/**\n * @typedef {import(\"@hiero-ledger/proto\").proto.ITransaction} HieroProto.proto.ITransaction\n * @typedef {import(\"@hiero-ledger/proto\").proto.Transaction} HieroProto.proto.Transaction\n * @typedef {import(\"@hiero-ledger/proto\").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction\n * @typedef {import(\"@hiero-ledger/proto\").proto.SignedTransaction} HieroProto.proto.SignedTransaction\n * @typedef {import(\"@hiero-ledger/proto\").proto.IUtilPrngTransactionBody } HieroProto.proto.IUtilPrngTransactionBody\n * @typedef {import(\"@hiero-ledger/proto\").proto.UtilPrngTransactionBody} HieroProto.proto.UtilPrngTransactionBody\n * @typedef {import(\"@hiero-ledger/proto\").proto.ITransactionResponse} HieroProto.proto.TransactionResponse\n * @typedef {import(\"@hiero-ledger/proto\").proto.TransactionBody} HieroProto.proto.TransactionBody\n * @typedef {import(\"@hiero-ledger/proto\").proto.ITransactionBody} HieroProto.proto.ITransactionBody\n * @typedef {import(\"./account/AccountId.js\").default} AccountId\n * @typedef {import(\"./transaction/TransactionId.js\").default} TransactionId\n */\n\n/**\n * @typedef {import(\"./client/Client.js\").default<*, *>} Client\n * @typedef {import(\"./channel/Channel.js\").default} Channel\n */\n\n/**\n * Gets a pseudorandom 32-bit number. Not cryptographically secure. See HIP-351 https://hips.hedera.com/hip/hip-351\n */\nexport default class PrngTransaction extends Transaction {\n /**\n * @param {object} props\n * @param {?number } [props.range]\n */\n constructor(props = {}) {\n super();\n\n /**\n * @private\n * @type {?number}\n */\n this._range = null;\n\n if (props.range != null) {\n this.setRange(props.range);\n }\n }\n\n /**\n * @param {number} newRange\n * @returns {this}\n */\n setRange(newRange) {\n this._range = newRange;\n return this;\n }\n\n get range() {\n return this._range;\n }\n\n /**\n * @param {Client} client\n */\n _validateChecksums(client) {\n if (this._range != null && isNumber(this._range)) {\n this._validateChecksums(client);\n }\n }\n\n /**\n * @override\n * @internal\n * @param {Channel} channel\n * @param {HieroProto.proto.ITransaction} request\n * @returns {Promise<HieroProto.proto.TransactionResponse>}\n */\n _execute(channel, request) {\n return channel.util.prng(request);\n }\n\n /**\n * @internal\n * @param {HieroProto.proto.ITransaction[]} transactions\n * @param {HieroProto.proto.ISignedTransaction[]} signedTransactions\n * @param {TransactionId[]} transactionIds\n * @param {AccountId[]} nodeIds\n * @param {HieroProto.proto.ITransactionBody[]} bodies\n * @returns {PrngTransaction}\n */\n static _fromProtobuf(\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n ) {\n const body = /** @type {HieroProto.proto.ITransactionBody} */ (\n bodies[0]\n );\n const transactionRange =\n /** @type {HieroProto.proto.IUtilPrngTransactionBody} */ (\n body.utilPrng\n );\n return Transaction._fromProtobufTransactions(\n new PrngTransaction({\n range: transactionRange.range,\n }),\n transactions,\n signedTransactions,\n transactionIds,\n nodeIds,\n bodies,\n );\n }\n\n /**\n * @override\n * @protected\n * @returns {NonNullable<HieroProto.proto.TransactionBody[\"data\"]>}\n */\n _getTransactionDataCase() {\n return \"utilPrng\";\n }\n\n /**\n * @override\n * @protected\n * @returns {HieroProto.proto.IUtilPrngTransactionBody}\n */\n _makeTransactionData() {\n return {\n range: this.range,\n };\n }\n\n /**\n * @returns {string}\n */\n _getLogId() {\n const timestamp = /** @type {import(\"./Timestamp.js\").default} */ (\n this._transactionIds.current.validStart\n );\n return `RandomGenerate:${timestamp.toString()}`;\n }\n}\n\nTRANSACTION_REGISTRY.set(\n \"utilPrng\",\n // eslint-disable-next-line @typescript-eslint/unbound-method\n PrngTransaction._fromProtobuf,\n);\n"],"names":["PrngTransaction","Transaction","constructor","props","super","this","_range","range","setRange","newRange","_validateChecksums","client","isNumber","_execute","channel","request","util","prng","_fromProtobuf","transactions","signedTransactions","transactionIds","nodeIds","bodies","transactionRange","_fromProtobufTransactions","_getTransactionDataCase","_makeTransactionData","_getLogId","_transactionIds","current","toString","TRANSACTION_REGISTRY","set"],"mappings":"4GA6Be,MAAMA,UAAwBC,EAKzC,WAAAC,CAAYC,EAAQ,IAChBC,QAMAC,KAAKC,OAAS,KAEK,MAAfH,EAAMI,OACNF,KAAKG,SAASL,EAAMI,MAEhC,CAMI,QAAAC,CAASC,GAEL,OADAJ,KAAKC,OAASG,EACPJ,IACf,CAEI,SAAIE,GACA,OAAOF,KAAKC,MACpB,CAKI,kBAAAI,CAAmBC,GACI,MAAfN,KAAKC,QAAkBM,EAASP,KAAKC,SACrCD,KAAKK,mBAAmBC,EAEpC,CASI,QAAAE,CAASC,EAASC,GACd,OAAOD,EAAQE,KAAKC,KAAKF,EACjC,CAWI,oBAAOG,CACHC,EACAC,EACAC,EACAC,EACAC,GAEA,MAGMC,EAFFD,EAAO,GAKN,SACL,OAAOtB,EAAYwB,0BACf,IAAIzB,EAAgB,CAChBO,MAAOiB,EAAiBjB,QAE5BY,EACAC,EACAC,EACAC,EACAC,EAEZ,CAOI,uBAAAG,GACI,MAAO,UACf,CAOI,oBAAAC,GACI,MAAO,CACHpB,MAAOF,KAAKE,MAExB,CAKI,SAAAqB,GAII,MAAO,kBAFHvB,KAAKwB,gBAAgBC,QACxB,WACkCC,YAC3C,EAGAC,EAAqBC,IACjB,WAEAjC,EAAgBkB"}
package/lib/PublicKey.cjs CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _cryptography = require("@hashgraph/cryptography");
7
+ var _cryptography = require("@hiero-ledger/cryptography");
8
8
  var _array = require("./array.cjs");
9
9
  var _Key = _interopRequireDefault(require("./Key.cjs"));
10
10
  var _Cache = _interopRequireDefault(require("./Cache.cjs"));
@@ -18,10 +18,10 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
18
18
 
19
19
  /**
20
20
  * @namespace proto
21
- * @typedef {import("@hashgraph/proto").proto.IKey} HieroProto.proto.IKey
22
- * @typedef {import("@hashgraph/proto").proto.ITransaction} HieroProto.proto.ITransaction
23
- * @typedef {import("@hashgraph/proto").proto.ISignaturePair} HieroProto.proto.ISignaturePair
24
- * @typedef {import("@hashgraph/proto").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction
21
+ * @typedef {import("@hiero-ledger/proto").proto.IKey} HieroProto.proto.IKey
22
+ * @typedef {import("@hiero-ledger/proto").proto.ITransaction} HieroProto.proto.ITransaction
23
+ * @typedef {import("@hiero-ledger/proto").proto.ISignaturePair} HieroProto.proto.ISignaturePair
24
+ * @typedef {import("@hiero-ledger/proto").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction
25
25
  */
26
26
 
27
27
  class PublicKey extends _Key.default {
@@ -4,10 +4,10 @@
4
4
  */
5
5
  /**
6
6
  * @namespace proto
7
- * @typedef {import("@hashgraph/proto").proto.IKey} HieroProto.proto.IKey
8
- * @typedef {import("@hashgraph/proto").proto.ITransaction} HieroProto.proto.ITransaction
9
- * @typedef {import("@hashgraph/proto").proto.ISignaturePair} HieroProto.proto.ISignaturePair
10
- * @typedef {import("@hashgraph/proto").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction
7
+ * @typedef {import("@hiero-ledger/proto").proto.IKey} HieroProto.proto.IKey
8
+ * @typedef {import("@hiero-ledger/proto").proto.ITransaction} HieroProto.proto.ITransaction
9
+ * @typedef {import("@hiero-ledger/proto").proto.ISignaturePair} HieroProto.proto.ISignaturePair
10
+ * @typedef {import("@hiero-ledger/proto").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction
11
11
  */
12
12
  export default class PublicKey extends Key {
13
13
  /**
@@ -132,11 +132,11 @@ export type Transaction = import("./transaction/Transaction.js").default;
132
132
  export type AccountId = import("./account/AccountId.js").default;
133
133
  export namespace HieroProto {
134
134
  namespace proto {
135
- type IKey = import("@hashgraph/proto").proto.IKey;
136
- type ITransaction = import("@hashgraph/proto").proto.ITransaction;
137
- type ISignaturePair = import("@hashgraph/proto").proto.ISignaturePair;
138
- type ISignedTransaction = import("@hashgraph/proto").proto.ISignedTransaction;
135
+ type IKey = import("@hiero-ledger/proto").proto.IKey;
136
+ type ITransaction = import("@hiero-ledger/proto").proto.ITransaction;
137
+ type ISignaturePair = import("@hiero-ledger/proto").proto.ISignaturePair;
138
+ type ISignedTransaction = import("@hiero-ledger/proto").proto.ISignedTransaction;
139
139
  }
140
140
  }
141
141
  import Key from "./Key.js";
142
- import { PublicKey as PublicKeyCrypto } from "@hashgraph/cryptography";
142
+ import { PublicKey as PublicKeyCrypto } from "@hiero-ledger/cryptography";
package/lib/PublicKey.js CHANGED
@@ -1,2 +1,2 @@
1
- import{PublicKey as t}from"@hashgraph/cryptography";import{arrayEqual as e}from"./array.js";import r from"./Key.js";import s from"./Cache.js";class i extends r{constructor(t){super(),this._key=t}static fromBytes(e){return new i(t.fromBytes(e))}static fromBytesED25519(e){return new i(t.fromBytesED25519(e))}static fromBytesECDSA(e){return new i(t.fromBytesECDSA(e))}static fromString(e){return new i(t.fromString(e))}static fromStringECDSA(e){return new i(t.fromStringECDSA(e))}static fromStringED25519(e){return new i(t.fromStringED25519(e))}verify(t,e){return this._key.verify(t,e)}verifyTransaction(t){t._requireFrozen(),t.isFrozen()||t.freeze();for(const r of t._signedTransactions.list)if(null!=r.sigMap&&null!=r.sigMap.sigPair){let t=!1;for(const s of r.sigMap.sigPair){const i=s.pubKeyPrefix;if(e(i,this.toBytesRaw())){t=!0;const e=r.bodyBytes;let i=null;if(null!=s.ed25519?i=s.ed25519:null!=s.ECDSASecp256k1&&(i=s.ECDSASecp256k1),null==i)continue;if(!this.verify(e,i))return!1}}if(!t)return!1}return!0}toBytes(){return this._key.toBytes()}toBytesDer(){return this._key.toBytesDer()}toBytesRaw(){return this._key.toBytesRaw()}toEthereumAddress(){return this._key.toEthereumAddress()}toEvmAddress(){return this._key.toEthereumAddress()}toString(){return this._key.toString()}toStringDer(){return this._key.toStringDer()}toStringRaw(){return this._key.toStringRaw()}equals(t){return this._key.equals(t._key)}_toProtobufKey(){switch(this._key._type){case"ED25519":return{ed25519:this._key.toBytesRaw()};case"secp256k1":return{ECDSASecp256k1:this._key.toBytesRaw()};default:throw new Error(`unrecognized key type ${this._key._type}`)}}_toProtobufSignature(t){switch(this._key._type){case"ED25519":return{pubKeyPrefix:this._key.toBytesRaw(),ed25519:t};case"secp256k1":return{pubKeyPrefix:this._key.toBytesRaw(),ECDSASecp256k1:t};default:throw new Error(`unrecognized key type ${this._key._type}`)}}get type(){return this._key._type}toAccountId(t,e){return s.accountIdConstructor(t,e,this)}static unusableKey(){return i.fromStringED25519("0000000000000000000000000000000000000000000000000000000000000000")}}s.setPublicKeyED25519(t=>i.fromBytesED25519(t)),s.setPublicKeyECDSA(t=>i.fromBytesECDSA(t));export{i as default};
1
+ import{PublicKey as t}from"@hiero-ledger/cryptography";import{arrayEqual as e}from"./array.js";import r from"./Key.js";import s from"./Cache.js";class i extends r{constructor(t){super(),this._key=t}static fromBytes(e){return new i(t.fromBytes(e))}static fromBytesED25519(e){return new i(t.fromBytesED25519(e))}static fromBytesECDSA(e){return new i(t.fromBytesECDSA(e))}static fromString(e){return new i(t.fromString(e))}static fromStringECDSA(e){return new i(t.fromStringECDSA(e))}static fromStringED25519(e){return new i(t.fromStringED25519(e))}verify(t,e){return this._key.verify(t,e)}verifyTransaction(t){t._requireFrozen(),t.isFrozen()||t.freeze();for(const r of t._signedTransactions.list)if(null!=r.sigMap&&null!=r.sigMap.sigPair){let t=!1;for(const s of r.sigMap.sigPair){const i=s.pubKeyPrefix;if(e(i,this.toBytesRaw())){t=!0;const e=r.bodyBytes;let i=null;if(null!=s.ed25519?i=s.ed25519:null!=s.ECDSASecp256k1&&(i=s.ECDSASecp256k1),null==i)continue;if(!this.verify(e,i))return!1}}if(!t)return!1}return!0}toBytes(){return this._key.toBytes()}toBytesDer(){return this._key.toBytesDer()}toBytesRaw(){return this._key.toBytesRaw()}toEthereumAddress(){return this._key.toEthereumAddress()}toEvmAddress(){return this._key.toEthereumAddress()}toString(){return this._key.toString()}toStringDer(){return this._key.toStringDer()}toStringRaw(){return this._key.toStringRaw()}equals(t){return this._key.equals(t._key)}_toProtobufKey(){switch(this._key._type){case"ED25519":return{ed25519:this._key.toBytesRaw()};case"secp256k1":return{ECDSASecp256k1:this._key.toBytesRaw()};default:throw new Error(`unrecognized key type ${this._key._type}`)}}_toProtobufSignature(t){switch(this._key._type){case"ED25519":return{pubKeyPrefix:this._key.toBytesRaw(),ed25519:t};case"secp256k1":return{pubKeyPrefix:this._key.toBytesRaw(),ECDSASecp256k1:t};default:throw new Error(`unrecognized key type ${this._key._type}`)}}get type(){return this._key._type}toAccountId(t,e){return s.accountIdConstructor(t,e,this)}static unusableKey(){return i.fromStringED25519("0000000000000000000000000000000000000000000000000000000000000000")}}s.setPublicKeyED25519(t=>i.fromBytesED25519(t)),s.setPublicKeyECDSA(t=>i.fromBytesECDSA(t));export{i as default};
2
2
  //# sourceMappingURL=PublicKey.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PublicKey.js","sources":["../src/PublicKey.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport { PublicKey as PublicKeyCrypto } from \"@hashgraph/cryptography\";\nimport { arrayEqual } from \"./array.js\";\nimport Key from \"./Key.js\";\nimport CACHE from \"./Cache.js\";\n\n/**\n * @typedef {import(\"./transaction/Transaction.js\").default} Transaction\n * @typedef {import(\"./account/AccountId.js\").default} AccountId\n */\n\n/**\n * @namespace proto\n * @typedef {import(\"@hashgraph/proto\").proto.IKey} HieroProto.proto.IKey\n * @typedef {import(\"@hashgraph/proto\").proto.ITransaction} HieroProto.proto.ITransaction\n * @typedef {import(\"@hashgraph/proto\").proto.ISignaturePair} HieroProto.proto.ISignaturePair\n * @typedef {import(\"@hashgraph/proto\").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction\n */\n\nexport default class PublicKey extends Key {\n /**\n * @internal\n * @hideconstructor\n * @param {PublicKeyCrypto} key\n */\n constructor(key) {\n super();\n\n this._key = key;\n }\n\n /**\n * @param {Uint8Array} data\n * @returns {PublicKey}\n */\n static fromBytes(data) {\n return new PublicKey(PublicKeyCrypto.fromBytes(data));\n }\n\n /**\n * @param {Uint8Array} data\n * @returns {PublicKey}\n */\n static fromBytesED25519(data) {\n return new PublicKey(PublicKeyCrypto.fromBytesED25519(data));\n }\n\n /**\n * @param {Uint8Array} data\n * @returns {PublicKey}\n */\n static fromBytesECDSA(data) {\n return new PublicKey(PublicKeyCrypto.fromBytesECDSA(data));\n }\n\n /**\n * Parse a public key from a string of hexadecimal digits.\n *\n * The public key may optionally be prefixed with\n * the DER header.\n *\n * @param {string} text\n * @returns {PublicKey}\n */\n static fromString(text) {\n return new PublicKey(PublicKeyCrypto.fromString(text));\n }\n\n /**\n * Parse an ECDSA public key from a string of hexadecimal digits.\n *\n * @param {string} text\n * @returns {PublicKey}\n */\n static fromStringECDSA(text) {\n return new PublicKey(PublicKeyCrypto.fromStringECDSA(text));\n }\n\n /**\n * Parse an ED25519 public key from a string of hexadecimal digits.\n *\n * @param {string} text\n * @returns {PublicKey}\n */\n static fromStringED25519(text) {\n return new PublicKey(PublicKeyCrypto.fromStringED25519(text));\n }\n\n /**\n * Verify a signature on a message with this public key.\n *\n * @param {Uint8Array} message\n * @param {Uint8Array} signature\n * @returns {boolean}\n */\n verify(message, signature) {\n return this._key.verify(message, signature);\n }\n\n /**\n * Reports whether this key signed the given transaction.\n * @param {Transaction} transaction\n * @returns {boolean}\n */\n verifyTransaction(transaction) {\n transaction._requireFrozen();\n\n if (!transaction.isFrozen()) {\n transaction.freeze();\n }\n\n // Note: in other SDKs, we need to check the transaction's `_signerPublicKeys` since we don't build the `_signedTransactions` list\n // before we execute the transaction (execute -> makeRequest -> buildTransaction -> signTransaction).\n // However, in JavaScript, we build the `_signedTransactions` list while signing the transaction.\n for (const signedTransaction of transaction._signedTransactions.list) {\n if (\n signedTransaction.sigMap != null &&\n signedTransaction.sigMap.sigPair != null\n ) {\n let found = false;\n for (const sigPair of signedTransaction.sigMap.sigPair) {\n const pubKeyPrefix = /** @type {Uint8Array} */ (\n sigPair.pubKeyPrefix\n );\n if (arrayEqual(pubKeyPrefix, this.toBytesRaw())) {\n found = true;\n\n const bodyBytes = /** @type {Uint8Array} */ (\n signedTransaction.bodyBytes\n );\n\n let signature = null;\n if (sigPair.ed25519 != null) {\n signature = sigPair.ed25519;\n } else if (sigPair.ECDSASecp256k1 != null) {\n signature = sigPair.ECDSASecp256k1;\n }\n\n if (signature == null) {\n continue;\n }\n\n if (!this.verify(bodyBytes, signature)) {\n return false;\n }\n }\n }\n\n if (!found) {\n return false;\n }\n }\n }\n\n return true;\n }\n\n /**\n * @returns {Uint8Array}\n */\n toBytes() {\n return this._key.toBytes();\n }\n\n /**\n * @returns {Uint8Array}\n */\n toBytesDer() {\n return this._key.toBytesDer();\n }\n\n /**\n * @returns {Uint8Array}\n */\n toBytesRaw() {\n return this._key.toBytesRaw();\n }\n\n /**\n * @deprecated Use `toEvmAddress()` instead.\n * @returns {string}\n */\n toEthereumAddress() {\n return this._key.toEthereumAddress();\n }\n\n /**\n * @returns {string}\n */\n toEvmAddress() {\n return this._key.toEthereumAddress();\n }\n\n /**\n * @returns {string}\n */\n toString() {\n return this._key.toString();\n }\n\n /**\n * @returns {string}\n */\n toStringDer() {\n return this._key.toStringDer();\n }\n\n /**\n * @returns {string}\n */\n toStringRaw() {\n return this._key.toStringRaw();\n }\n\n /**\n * @param {PublicKey} other\n * @returns {boolean}\n */\n equals(other) {\n return this._key.equals(other._key);\n }\n\n /**\n * @returns {HieroProto.proto.IKey}\n */\n _toProtobufKey() {\n switch (this._key._type) {\n case \"ED25519\":\n return {\n ed25519: this._key.toBytesRaw(),\n };\n case \"secp256k1\":\n return {\n ECDSASecp256k1: this._key.toBytesRaw(),\n };\n default:\n throw new Error(`unrecognized key type ${this._key._type}`);\n }\n }\n\n /**\n * @param {Uint8Array} signature\n * @returns {HieroProto.proto.ISignaturePair}\n */\n _toProtobufSignature(signature) {\n switch (this._key._type) {\n case \"ED25519\":\n return {\n pubKeyPrefix: this._key.toBytesRaw(),\n ed25519: signature,\n };\n case \"secp256k1\":\n return {\n pubKeyPrefix: this._key.toBytesRaw(),\n ECDSASecp256k1: signature,\n };\n default:\n throw new Error(`unrecognized key type ${this._key._type}`);\n }\n }\n\n /**\n * @returns {string}\n */\n get type() {\n return this._key._type;\n }\n\n /**\n * @param {Long | number} shard\n * @param {Long | number} realm\n * @returns {AccountId}\n */\n toAccountId(shard, realm) {\n return CACHE.accountIdConstructor(shard, realm, this);\n }\n\n /**\n * Returns an \"unusable\" public key.\n * “Unusable” refers to a key such as an Ed25519 0x00000... public key,\n * since it is (presumably) impossible to find the 32-byte string whose SHA-512 hash begins with 32 bytes of zeros.\n *\n * @returns {PublicKey}\n */\n static unusableKey() {\n return PublicKey.fromStringED25519(\n \"0000000000000000000000000000000000000000000000000000000000000000\",\n );\n }\n}\n\nCACHE.setPublicKeyED25519((key) => PublicKey.fromBytesED25519(key));\nCACHE.setPublicKeyECDSA((key) => PublicKey.fromBytesECDSA(key));\n"],"names":["PublicKey","Key","constructor","key","super","this","_key","fromBytes","data","PublicKeyCrypto","fromBytesED25519","fromBytesECDSA","fromString","text","fromStringECDSA","fromStringED25519","verify","message","signature","verifyTransaction","transaction","_requireFrozen","isFrozen","freeze","signedTransaction","_signedTransactions","list","sigMap","sigPair","found","pubKeyPrefix","arrayEqual","toBytesRaw","bodyBytes","ed25519","ECDSASecp256k1","toBytes","toBytesDer","toEthereumAddress","toEvmAddress","toString","toStringDer","toStringRaw","equals","other","_toProtobufKey","_type","Error","_toProtobufSignature","type","toAccountId","shard","realm","CACHE","accountIdConstructor","unusableKey","setPublicKeyED25519","setPublicKeyECDSA"],"mappings":"8IAoBe,MAAMA,UAAkBC,EAMnC,WAAAC,CAAYC,GACRC,QAEAC,KAAKC,KAAOH,CACpB,CAMI,gBAAOI,CAAUC,GACb,OAAO,IAAIR,EAAUS,EAAgBF,UAAUC,GACvD,CAMI,uBAAOE,CAAiBF,GACpB,OAAO,IAAIR,EAAUS,EAAgBC,iBAAiBF,GAC9D,CAMI,qBAAOG,CAAeH,GAClB,OAAO,IAAIR,EAAUS,EAAgBE,eAAeH,GAC5D,CAWI,iBAAOI,CAAWC,GACd,OAAO,IAAIb,EAAUS,EAAgBG,WAAWC,GACxD,CAQI,sBAAOC,CAAgBD,GACnB,OAAO,IAAIb,EAAUS,EAAgBK,gBAAgBD,GAC7D,CAQI,wBAAOE,CAAkBF,GACrB,OAAO,IAAIb,EAAUS,EAAgBM,kBAAkBF,GAC/D,CASI,MAAAG,CAAOC,EAASC,GACZ,OAAOb,KAAKC,KAAKU,OAAOC,EAASC,EACzC,CAOI,iBAAAC,CAAkBC,GACdA,EAAYC,iBAEPD,EAAYE,YACbF,EAAYG,SAMhB,IAAK,MAAMC,KAAqBJ,EAAYK,oBAAoBC,KAC5D,GACgC,MAA5BF,EAAkBG,QACkB,MAApCH,EAAkBG,OAAOC,QAC3B,CACE,IAAIC,GAAQ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AKC,KAAK0B,aACxBG,eAAgBjB,GAExB,QACI,MAAM,IAAI6B,MAAM,yBAAyB1C,KAAKC,KAAKwC,SAEnE,CAKI,QAAIG,GACA,OAAO5C,KAAKC,KAAKwC,KACzB,CAOI,WAAAI,CAAYC,EAAOC,GACf,OAAOC,EAAMC,qBAAqBH,EAAOC,EAAO/C,KACxD,CASI,kBAAOkD,GACH,OAAOvD,EAAUe,kBACb,mEAEZ,EAGAsC,EAAMG,oBAAqBrD,GAAQH,EAAUU,iBAAiBP,IAC9DkD,EAAMI,kBAAmBtD,GAAQH,EAAUW,eAAeR"}
1
+ {"version":3,"file":"PublicKey.js","sources":["../src/PublicKey.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\nimport { PublicKey as PublicKeyCrypto } from \"@hiero-ledger/cryptography\";\nimport { arrayEqual } from \"./array.js\";\nimport Key from \"./Key.js\";\nimport CACHE from \"./Cache.js\";\n\n/**\n * @typedef {import(\"./transaction/Transaction.js\").default} Transaction\n * @typedef {import(\"./account/AccountId.js\").default} AccountId\n */\n\n/**\n * @namespace proto\n * @typedef {import(\"@hiero-ledger/proto\").proto.IKey} HieroProto.proto.IKey\n * @typedef {import(\"@hiero-ledger/proto\").proto.ITransaction} HieroProto.proto.ITransaction\n * @typedef {import(\"@hiero-ledger/proto\").proto.ISignaturePair} HieroProto.proto.ISignaturePair\n * @typedef {import(\"@hiero-ledger/proto\").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction\n */\n\nexport default class PublicKey extends Key {\n /**\n * @internal\n * @hideconstructor\n * @param {PublicKeyCrypto} key\n */\n constructor(key) {\n super();\n\n this._key = key;\n }\n\n /**\n * @param {Uint8Array} data\n * @returns {PublicKey}\n */\n static fromBytes(data) {\n return new PublicKey(PublicKeyCrypto.fromBytes(data));\n }\n\n /**\n * @param {Uint8Array} data\n * @returns {PublicKey}\n */\n static fromBytesED25519(data) {\n return new PublicKey(PublicKeyCrypto.fromBytesED25519(data));\n }\n\n /**\n * @param {Uint8Array} data\n * @returns {PublicKey}\n */\n static fromBytesECDSA(data) {\n return new PublicKey(PublicKeyCrypto.fromBytesECDSA(data));\n }\n\n /**\n * Parse a public key from a string of hexadecimal digits.\n *\n * The public key may optionally be prefixed with\n * the DER header.\n *\n * @param {string} text\n * @returns {PublicKey}\n */\n static fromString(text) {\n return new PublicKey(PublicKeyCrypto.fromString(text));\n }\n\n /**\n * Parse an ECDSA public key from a string of hexadecimal digits.\n *\n * @param {string} text\n * @returns {PublicKey}\n */\n static fromStringECDSA(text) {\n return new PublicKey(PublicKeyCrypto.fromStringECDSA(text));\n }\n\n /**\n * Parse an ED25519 public key from a string of hexadecimal digits.\n *\n * @param {string} text\n * @returns {PublicKey}\n */\n static fromStringED25519(text) {\n return new PublicKey(PublicKeyCrypto.fromStringED25519(text));\n }\n\n /**\n * Verify a signature on a message with this public key.\n *\n * @param {Uint8Array} message\n * @param {Uint8Array} signature\n * @returns {boolean}\n */\n verify(message, signature) {\n return this._key.verify(message, signature);\n }\n\n /**\n * Reports whether this key signed the given transaction.\n * @param {Transaction} transaction\n * @returns {boolean}\n */\n verifyTransaction(transaction) {\n transaction._requireFrozen();\n\n if (!transaction.isFrozen()) {\n transaction.freeze();\n }\n\n // Note: in other SDKs, we need to check the transaction's `_signerPublicKeys` since we don't build the `_signedTransactions` list\n // before we execute the transaction (execute -> makeRequest -> buildTransaction -> signTransaction).\n // However, in JavaScript, we build the `_signedTransactions` list while signing the transaction.\n for (const signedTransaction of transaction._signedTransactions.list) {\n if (\n signedTransaction.sigMap != null &&\n signedTransaction.sigMap.sigPair != null\n ) {\n let found = false;\n for (const sigPair of signedTransaction.sigMap.sigPair) {\n const pubKeyPrefix = /** @type {Uint8Array} */ (\n sigPair.pubKeyPrefix\n );\n if (arrayEqual(pubKeyPrefix, this.toBytesRaw())) {\n found = true;\n\n const bodyBytes = /** @type {Uint8Array} */ (\n signedTransaction.bodyBytes\n );\n\n let signature = null;\n if (sigPair.ed25519 != null) {\n signature = sigPair.ed25519;\n } else if (sigPair.ECDSASecp256k1 != null) {\n signature = sigPair.ECDSASecp256k1;\n }\n\n if (signature == null) {\n continue;\n }\n\n if (!this.verify(bodyBytes, signature)) {\n return false;\n }\n }\n }\n\n if (!found) {\n return false;\n }\n }\n }\n\n return true;\n }\n\n /**\n * @returns {Uint8Array}\n */\n toBytes() {\n return this._key.toBytes();\n }\n\n /**\n * @returns {Uint8Array}\n */\n toBytesDer() {\n return this._key.toBytesDer();\n }\n\n /**\n * @returns {Uint8Array}\n */\n toBytesRaw() {\n return this._key.toBytesRaw();\n }\n\n /**\n * @deprecated Use `toEvmAddress()` instead.\n * @returns {string}\n */\n toEthereumAddress() {\n return this._key.toEthereumAddress();\n }\n\n /**\n * @returns {string}\n */\n toEvmAddress() {\n return this._key.toEthereumAddress();\n }\n\n /**\n * @returns {string}\n */\n toString() {\n return this._key.toString();\n }\n\n /**\n * @returns {string}\n */\n toStringDer() {\n return this._key.toStringDer();\n }\n\n /**\n * @returns {string}\n */\n toStringRaw() {\n return this._key.toStringRaw();\n }\n\n /**\n * @param {PublicKey} other\n * @returns {boolean}\n */\n equals(other) {\n return this._key.equals(other._key);\n }\n\n /**\n * @returns {HieroProto.proto.IKey}\n */\n _toProtobufKey() {\n switch (this._key._type) {\n case \"ED25519\":\n return {\n ed25519: this._key.toBytesRaw(),\n };\n case \"secp256k1\":\n return {\n ECDSASecp256k1: this._key.toBytesRaw(),\n };\n default:\n throw new Error(`unrecognized key type ${this._key._type}`);\n }\n }\n\n /**\n * @param {Uint8Array} signature\n * @returns {HieroProto.proto.ISignaturePair}\n */\n _toProtobufSignature(signature) {\n switch (this._key._type) {\n case \"ED25519\":\n return {\n pubKeyPrefix: this._key.toBytesRaw(),\n ed25519: signature,\n };\n case \"secp256k1\":\n return {\n pubKeyPrefix: this._key.toBytesRaw(),\n ECDSASecp256k1: signature,\n };\n default:\n throw new Error(`unrecognized key type ${this._key._type}`);\n }\n }\n\n /**\n * @returns {string}\n */\n get type() {\n return this._key._type;\n }\n\n /**\n * @param {Long | number} shard\n * @param {Long | number} realm\n * @returns {AccountId}\n */\n toAccountId(shard, realm) {\n return CACHE.accountIdConstructor(shard, realm, this);\n }\n\n /**\n * Returns an \"unusable\" public key.\n * “Unusable” refers to a key such as an Ed25519 0x00000... public key,\n * since it is (presumably) impossible to find the 32-byte string whose SHA-512 hash begins with 32 bytes of zeros.\n *\n * @returns {PublicKey}\n */\n static unusableKey() {\n return PublicKey.fromStringED25519(\n \"0000000000000000000000000000000000000000000000000000000000000000\",\n );\n }\n}\n\nCACHE.setPublicKeyED25519((key) => PublicKey.fromBytesED25519(key));\nCACHE.setPublicKeyECDSA((key) => PublicKey.fromBytesECDSA(key));\n"],"names":["PublicKey","Key","constructor","key","super","this","_key","fromBytes","data","PublicKeyCrypto","fromBytesED25519","fromBytesECDSA","fromString","text","fromStringECDSA","fromStringED25519","verify","message","signature","verifyTransaction","transaction","_requireFrozen","isFrozen","freeze","signedTransaction","_signedTransactions","list","sigMap","sigPair","found","pubKeyPrefix","arrayEqual","toBytesRaw","bodyBytes","ed25519","ECDSASecp256k1","toBytes","toBytesDer","toEthereumAddress","toEvmAddress","toString","toStringDer","toStringRaw","equals","other","_toProtobufKey","_type","Error","_toProtobufSignature","type","toAccountId","shard","realm","CACHE","accountIdConstructor","unusableKey","setPublicKeyED25519","setPublicKeyECDSA"],"mappings":"iJAoBe,MAAMA,UAAkBC,EAMnC,WAAAC,CAAYC,GACRC,QAEAC,KAAKC,KAAOH,CACpB,CAMI,gBAAOI,CAAUC,GACb,OAAO,IAAIR,EAAUS,EAAgBF,UAAUC,GACvD,CAMI,uBAAOE,CAAiBF,GACpB,OAAO,IAAIR,EAAUS,EAAgBC,iBAAiBF,GAC9D,CAMI,qBAAOG,CAAeH,GAClB,OAAO,IAAIR,EAAUS,EAAgBE,eAAeH,GAC5D,CAWI,iBAAOI,CAAWC,GACd,OAAO,IAAIb,EAAUS,EAAgBG,WAAWC,GACxD,CAQI,sBAAOC,CAAg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,OAAOC,EAAMtC,KACtC,CAKI,cAAAuC,GACI,OAAQxC,KAAKC,KAAKwC,OACd,IAAK,UACD,MAAO,CACHZ,QAAS7B,KAAKC,KAAK0B,cAE3B,IAAK,YACD,MAAO,CACHG,eAAgB9B,KAAKC,KAAK0B,cAElC,QACI,MAAM,IAAIe,MAAM,yBAAyB1C,KAAKC,KAAKwC,SAEnE,CAMI,oBAAAE,CAAqB9B,GACjB,OAAQb,KAAKC,KAAKwC,OACd,IAAK,UACD,MAAO,CACHhB,aAAczB,KAAKC,KAAK0B,aACxBE,QAAShB,GAEjB,IAAK,YACD,MAAO,CACHY,aAAczB,KAAKC,KAAK0B,aACxBG,eAAgBjB,GAExB,QACI,MAAM,IAAI6B,MAAM,yBAAyB1C,KAAKC,KAAKwC,SAEnE,CAKI,QAAIG,GACA,OAAO5C,KAAKC,KAAKwC,KACzB,CAOI,WAAAI,CAAYC,EAAOC,GACf,OAAOC,EAAMC,qBAAqBH,EAAOC,EAAO/C,KACxD,CASI,kBAAOkD,GACH,OAAOvD,EAAUe,kBACb,mEAEZ,EAGAsC,EAAMG,oBAAqBrD,GAAQH,EAAUU,iBAAiBP,IAC9DkD,EAAMI,kBAAmBtD,GAAQH,EAAUW,eAAeR"}
@@ -8,7 +8,7 @@ exports.default = void 0;
8
8
 
9
9
  /**
10
10
  * @namespace proto
11
- * @typedef {import("@hashgraph/proto").proto.HederaFunctionality} HieroProto.proto.HederaFunctionality
11
+ * @typedef {import("@hiero-ledger/proto").proto.HederaFunctionality} HieroProto.proto.HederaFunctionality
12
12
  */
13
13
 
14
14
  class RequestType {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @namespace proto
3
- * @typedef {import("@hashgraph/proto").proto.HederaFunctionality} HieroProto.proto.HederaFunctionality
3
+ * @typedef {import("@hiero-ledger/proto").proto.HederaFunctionality} HieroProto.proto.HederaFunctionality
4
4
  */
5
5
  declare class RequestType {
6
6
  /**
@@ -126,6 +126,6 @@ declare namespace RequestType {
126
126
  export default RequestType;
127
127
  export namespace HieroProto {
128
128
  namespace proto {
129
- type HederaFunctionality = import("@hashgraph/proto").proto.HederaFunctionality;
129
+ type HederaFunctionality = import("@hiero-ledger/proto").proto.HederaFunctionality;
130
130
  }
131
131
  }
@@ -1 +1 @@
1
- {"version":3,"file":"RequestType.js","sources":["../src/RequestType.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\n/**\n * @namespace proto\n * @typedef {import(\"@hashgraph/proto\").proto.HederaFunctionality} HieroProto.proto.HederaFunctionality\n */\n\nexport default class RequestType {\n /**\n * @hideconstructor\n * @internal\n * @param {number} code\n */\n constructor(code) {\n /** @readonly */\n this._code = code;\n\n Object.freeze(this);\n }\n\n /**\n * @returns {string}\n */\n toString() {\n switch (this) {\n case RequestType.None:\n return \"NONE\";\n case RequestType.CryptoTransfer:\n return \"CryptoTransfer\";\n case RequestType.CryptoUpdate:\n return \"CryptoUpdate\";\n case RequestType.CryptoDelete:\n return \"CryptoDelete\";\n case RequestType.CryptoAddLiveHash:\n return \"CryptoAddLiveHash\";\n case RequestType.CryptoDeleteLiveHash:\n return \"CryptoDeleteLiveHash\";\n case RequestType.ContractCall:\n return \"ContractCall\";\n case RequestType.ContractCreate:\n return \"ContractCreate\";\n case RequestType.ContractUpdate:\n return \"ContractUpdate\";\n case RequestType.FileCreate:\n return \"FileCreate\";\n case RequestType.FileAppend:\n return \"FileAppend\";\n case RequestType.FileUpdate:\n return \"FileUpdate\";\n case RequestType.FileDelete:\n return \"FileDelete\";\n case RequestType.CryptoGetAccountBalance:\n return \"CryptoGetAccountBalance\";\n case RequestType.CryptoGetAccountRecords:\n return \"CryptoGetAccountRecords\";\n case RequestType.CryptoGetInfo:\n return \"CryptoGetInfo\";\n case RequestType.ContractCallLocal:\n return \"ContractCallLocal\";\n case RequestType.ContractGetInfo:\n return \"ContractGetInfo\";\n case RequestType.ContractGetBytecode:\n return \"ContractGetBytecode\";\n case RequestType.GetBySolidityID:\n return \"GetBySolidityID\";\n case RequestType.GetByKey:\n return \"GetByKey\";\n case RequestType.CryptoGetLiveHash:\n return \"CryptoGetLiveHash\";\n case RequestType.CryptoGetStakers:\n return \"CryptoGetStakers\";\n case RequestType.FileGetContents:\n return \"FileGetContents\";\n case RequestType.FileGetInfo:\n return \"FileGetInfo\";\n case RequestType.TransactionGetRecord:\n return \"TransactionGetRecord\";\n case RequestType.ContractGetRecords:\n return \"ContractGetRecords\";\n case RequestType.CryptoCreate:\n return \"CryptoCreate\";\n case RequestType.SystemDelete:\n return \"SystemDelete\";\n case RequestType.SystemUndelete:\n return \"SystemUndelete\";\n case RequestType.ContractDelete:\n return \"ContractDelete\";\n case RequestType.Freeze:\n return \"Freeze\";\n case RequestType.CreateTransactionRecord:\n return \"CreateTransactionRecord\";\n case RequestType.CryptoAccountAutoRenew:\n return \"CryptoAccountAutoRenew\";\n case RequestType.ContractAutoRenew:\n return \"ContractAutoRenew\";\n case RequestType.GetVersionInfo:\n return \"GetVersionInfo\";\n case RequestType.TransactionGetReceipt:\n return \"TransactionGetReceipt\";\n case RequestType.ConsensusCreateTopic:\n return \"ConsensusCreateTopic\";\n case RequestType.ConsensusUpdateTopic:\n return \"ConsensusUpdateTopic\";\n case RequestType.ConsensusDeleteTopic:\n return \"ConsensusDeleteTopic\";\n case RequestType.ConsensusGetTopicInfo:\n return \"ConsensusGetTopicInfo\";\n case RequestType.ConsensusSubmitMessage:\n return \"ConsensusSubmitMessage\";\n case RequestType.UncheckedSubmit:\n return \"UncheckedSubmit\";\n case RequestType.TokenCreate:\n return \"TokenCreate\";\n case RequestType.TokenGetInfo:\n return \"TokenGetInfo\";\n case RequestType.TokenFreezeAccount:\n return \"TokenFreezeAccount\";\n case RequestType.TokenUnfreezeAccount:\n return \"TokenUnfreezeAccount\";\n case RequestType.TokenGrantKycToAccount:\n return \"TokenGrantKycToAccount\";\n case RequestType.TokenRevokeKycFromAccount:\n return \"TokenRevokeKycFromAccount\";\n case RequestType.TokenDelete:\n return \"TokenDelete\";\n case RequestType.TokenUpdate:\n return \"TokenUpdate\";\n case RequestType.TokenMint:\n return \"TokenMint\";\n case RequestType.TokenBurn:\n return \"TokenBurn\";\n case RequestType.TokenAccountWipe:\n return \"TokenAccountWipe\";\n case RequestType.TokenAssociateToAccount:\n return \"TokenAssociateToAccount\";\n case RequestType.TokenDissociateFromAccount:\n return \"TokenDissociateFromAccount\";\n case RequestType.ScheduleCreate:\n return \"ScheduleCreate\";\n case RequestType.ScheduleDelete:\n return \"ScheduleDelete\";\n case RequestType.ScheduleSign:\n return \"ScheduleSign\";\n case RequestType.ScheduleGetInfo:\n return \"ScheduleGetInfo\";\n case RequestType.TokenGetAccountNftInfos:\n return \"TokenGetAccountNftInfos\";\n case RequestType.TokenGetNftInfo:\n return \"TokenGetNftInfo\";\n case RequestType.TokenGetNftInfos:\n return \"TokenGetNftInfos\";\n case RequestType.TokenFeeScheduleUpdate:\n return \"TokenFeeScheduleUpdate\";\n case RequestType.NetworkGetExecutionTime:\n return \"NetworkGetExecutionTime\";\n case RequestType.TokenPause:\n return \"TokenPause\";\n case RequestType.TokenUnpause:\n return \"TokenUnpause\";\n case RequestType.CryptoApproveAllowance:\n return \"CryptoApproveAllowance\";\n case RequestType.CryptoDeleteAllowance:\n return \"CryptoDeleteAllowance\";\n case RequestType.GetAccountDetails:\n return \"GetAccountDetails\";\n case RequestType.EthereumTransaction:\n return \"EthereumTransaction\";\n case RequestType.NodeStakeUpdate:\n return \"NodeStakeUpdate\";\n case RequestType.Prng:\n return \"UtilPrng\";\n case RequestType.TransactionGetFastRecord:\n return \"TransactionGetFastRecord\";\n case RequestType.TokenUpdateNfts:\n return \"TokenUpdateNfts\";\n case RequestType.NodeCreate:\n return \"NodeCreate\";\n case RequestType.NodeUpdate:\n return \"NodeUpdate\";\n case RequestType.NodeDelete:\n return \"NodeDelete\";\n case RequestType.TokenReject:\n return \"TokenReject\";\n case RequestType.TokenAirdrop:\n return \"TokenAirdrop\";\n case RequestType.TokenCancelAirdrop:\n return \"TokenCancelAirdrop\";\n case RequestType.TokenClaimAirdrop:\n return \"TokenClaimAirdrop\";\n case RequestType.TssMessage:\n return \"TssMessage\";\n case RequestType.TssVote:\n return \"TssVote\";\n case RequestType.TssShareSignature:\n return \"TssShareSignature\";\n case RequestType.TssEncryptionKey:\n return \"TssEncryptionKey\";\n case RequestType.StateSignatureTransaction:\n return \"StateSignatureTransaction\";\n case RequestType.HistoryAssemblySignature:\n return \"HistoryAssemblySignature\";\n case RequestType.HistoryProofKeyPublication:\n return \"HistoryProofKeyPublication\";\n case RequestType.HistoryProofVote:\n return \"HistoryProofVote\";\n case RequestType.HintsKeyPublication:\n return \"HintsKeyPublication\";\n case RequestType.HintsPreprocessingVote:\n return \"HintsPreprocessingVote\";\n case RequestType.HintsPartialSignature:\n return \"HintsPartialSignature\";\n case RequestType.CrsPublication:\n return \"CrsPublication\";\n case RequestType.AtomicBatch:\n return \"AtomicBatch\";\n default:\n return `UNKNOWN (${this._code})`;\n }\n }\n\n /**\n * @internal\n * @param {number} code\n * @returns {RequestType}\n */\n static _fromCode(code) {\n switch (code) {\n case 0:\n return RequestType.None;\n case 1:\n return RequestType.CryptoTransfer;\n case 2:\n return RequestType.CryptoUpdate;\n case 3:\n return RequestType.CryptoDelete;\n case 4:\n return RequestType.CryptoAddLiveHash;\n case 5:\n return RequestType.CryptoDeleteLiveHash;\n case 6:\n return RequestType.ContractCall;\n case 7:\n return RequestType.ContractCreate;\n case 8:\n return RequestType.ContractUpdate;\n case 9:\n return RequestType.FileCreate;\n case 10:\n return RequestType.FileAppend;\n case 11:\n return RequestType.FileUpdate;\n case 12:\n return RequestType.FileDelete;\n case 13:\n return RequestType.CryptoGetAccountBalance;\n case 14:\n return RequestType.CryptoGetAccountRecords;\n case 15:\n return RequestType.CryptoGetInfo;\n case 16:\n return RequestType.ContractCallLocal;\n case 17:\n return RequestType.ContractGetInfo;\n case 18:\n return RequestType.ContractGetBytecode;\n case 19:\n return RequestType.GetBySolidityID;\n case 20:\n return RequestType.GetByKey;\n case 21:\n return RequestType.CryptoGetLiveHash;\n case 22:\n return RequestType.CryptoGetStakers;\n case 23:\n return RequestType.FileGetContents;\n case 24:\n return RequestType.FileGetInfo;\n case 25:\n return RequestType.TransactionGetRecord;\n case 26:\n return RequestType.ContractGetRecords;\n case 27:\n return RequestType.CryptoCreate;\n case 28:\n return RequestType.SystemDelete;\n case 29:\n return RequestType.SystemUndelete;\n case 30:\n return RequestType.ContractDelete;\n case 31:\n return RequestType.Freeze;\n case 32:\n return RequestType.CreateTransactionRecord;\n case 33:\n return RequestType.CryptoAccountAutoRenew;\n case 34:\n return RequestType.ContractAutoRenew;\n case 35:\n return RequestType.GetVersionInfo;\n case 36:\n return RequestType.TransactionGetReceipt;\n case 50:\n return RequestType.ConsensusCreateTopic;\n case 51:\n return RequestType.ConsensusUpdateTopic;\n case 52:\n return RequestType.ConsensusDeleteTopic;\n case 53:\n return RequestType.ConsensusGetTopicInfo;\n case 54:\n return RequestType.ConsensusSubmitMessage;\n case 55:\n return RequestType.UncheckedSubmit;\n case 56:\n return RequestType.TokenCreate;\n case 58:\n return RequestType.TokenGetInfo;\n case 59:\n return RequestType.TokenFreezeAccount;\n case 60:\n return RequestType.TokenUnfreezeAccount;\n case 61:\n return RequestType.TokenGrantKycToAccount;\n case 62:\n return RequestType.TokenRevokeKycFromAccount;\n case 63:\n return RequestType.TokenDelete;\n case 64:\n return RequestType.TokenUpdate;\n case 65:\n return RequestType.TokenMint;\n case 66:\n return RequestType.TokenBurn;\n case 67:\n return RequestType.TokenAccountWipe;\n case 68:\n return RequestType.TokenAssociateToAccount;\n case 69:\n return RequestType.TokenDissociateFromAccount;\n case 70:\n return RequestType.ScheduleCreate;\n case 71:\n return RequestType.ScheduleDelete;\n case 72:\n return RequestType.ScheduleSign;\n case 73:\n return RequestType.ScheduleGetInfo;\n case 74:\n return RequestType.TokenGetAccountNftInfos;\n case 75:\n return RequestType.TokenGetNftInfo;\n case 76:\n return RequestType.TokenGetNftInfos;\n case 77:\n return RequestType.TokenFeeScheduleUpdate;\n case 78:\n return RequestType.NetworkGetExecutionTime;\n case 79:\n return RequestType.TokenPause;\n case 80:\n return RequestType.TokenUnpause;\n case 81:\n return RequestType.CryptoApproveAllowance;\n case 82:\n return RequestType.CryptoDeleteAllowance;\n case 83:\n return RequestType.GetAccountDetails;\n case 84:\n return RequestType.EthereumTransaction;\n case 85:\n return RequestType.NodeStakeUpdate;\n case 86:\n return RequestType.Prng;\n case 87:\n return RequestType.TransactionGetFastRecord;\n case 88:\n return RequestType.TokenUpdateNfts;\n case 89:\n return RequestType.NodeCreate;\n case 90:\n return RequestType.NodeUpdate;\n case 91:\n return RequestType.NodeDelete;\n case 92:\n return RequestType.TokenReject;\n case 93:\n return RequestType.TokenAirdrop;\n case 94:\n return RequestType.TokenCancelAirdrop;\n case 95:\n return RequestType.TokenClaimAirdrop;\n case 96:\n return RequestType.TssMessage;\n case 97:\n return RequestType.TssVote;\n case 98:\n return RequestType.TssShareSignature;\n case 99:\n return RequestType.TssEncryptionKey;\n case 100:\n return RequestType.StateSignatureTransaction;\n case 101:\n return RequestType.HintsKeyPublication;\n case 102:\n return RequestType.HintsPreprocessingVote;\n case 103:\n return RequestType.HintsPartialSignature;\n case 104:\n return RequestType.HistoryAssemblySignature;\n case 105:\n return RequestType.HistoryProofKeyPublication;\n case 106:\n return RequestType.HistoryProofVote;\n case 107:\n return RequestType.CrsPublication;\n case 108:\n return RequestType.AtomicBatch;\n }\n\n throw new Error(\n `(BUG) RequestType.fromCode() does not handle code: ${code}`,\n );\n }\n\n /**\n * @returns {HieroProto.proto.HederaFunctionality}\n */\n valueOf() {\n return this._code;\n }\n}\n\n/**\n * UNSPECIFIED - Need to keep first value as unspecified because first element is ignored and\n * not parsed (0 is ignored by parser)\n */\nRequestType.None = new RequestType(0);\n\n/**\n * crypto transfer\n */\nRequestType.CryptoTransfer = new RequestType(1);\n\n/**\n * crypto update account\n */\nRequestType.CryptoUpdate = new RequestType(2);\n\n/**\n * crypto delete account\n */\nRequestType.CryptoDelete = new RequestType(3);\n\n/**\n * Add a livehash to a crypto account\n */\nRequestType.CryptoAddLiveHash = new RequestType(4);\n\n/**\n * Delete a livehash from a crypto account\n */\nRequestType.CryptoDeleteLiveHash = new RequestType(5);\n\n/**\n * Smart Contract Call\n */\nRequestType.ContractCall = new RequestType(6);\n\n/**\n * Smart Contract Create Contract\n */\nRequestType.ContractCreate = new RequestType(7);\n\n/**\n * Smart Contract update contract\n */\nRequestType.ContractUpdate = new RequestType(8);\n\n/**\n * File Operation create file\n */\nRequestType.FileCreate = new RequestType(9);\n\n/**\n * File Operation append file\n */\nRequestType.FileAppend = new RequestType(10);\n\n/**\n * File Operation update file\n */\nRequestType.FileUpdate = new RequestType(11);\n\n/**\n * File Operation delete file\n */\nRequestType.FileDelete = new RequestType(12);\n\n/**\n * crypto get account balance\n */\nRequestType.CryptoGetAccountBalance = new RequestType(13);\n\n/**\n * crypto get account record\n */\nRequestType.CryptoGetAccountRecords = new RequestType(14);\n\n/**\n * Crypto get info\n */\nRequestType.CryptoGetInfo = new RequestType(15);\n\n/**\n * Smart Contract Call\n */\nRequestType.ContractCallLocal = new RequestType(16);\n\n/**\n * Smart Contract get info\n */\nRequestType.ContractGetInfo = new RequestType(17);\n\n/**\n * Smart Contract, get the runtime code\n */\nRequestType.ContractGetBytecode = new RequestType(18);\n\n/**\n * Smart Contract, get by solidity ID\n */\nRequestType.GetBySolidityID = new RequestType(19);\n\n/**\n * Smart Contract, get by key\n */\nRequestType.GetByKey = new RequestType(20);\n\n/**\n * Get a live hash from a crypto account\n */\nRequestType.CryptoGetLiveHash = new RequestType(21);\n\n/**\n * Crypto, get the stakers for the node\n */\nRequestType.CryptoGetStakers = new RequestType(22);\n\n/**\n * File Operations get file contents\n */\nRequestType.FileGetContents = new RequestType(23);\n\n/**\n * File Operations get the info of the file\n */\nRequestType.FileGetInfo = new RequestType(24);\n\n/**\n * Crypto get the transaction records\n */\nRequestType.TransactionGetRecord = new RequestType(25);\n\n/**\n * Contract get the transaction records\n */\nRequestType.ContractGetRecords = new RequestType(26);\n\n/**\n * crypto create account\n */\nRequestType.CryptoCreate = new RequestType(27);\n\n/**\n * system delete file\n */\nRequestType.SystemDelete = new RequestType(28);\n\n/**\n * system undelete file\n */\nRequestType.SystemUndelete = new RequestType(29);\n\n/**\n * delete contract\n */\nRequestType.ContractDelete = new RequestType(30);\n\n/**\n * freeze\n */\nRequestType.Freeze = new RequestType(31);\n\n/**\n * Create Tx Record\n */\nRequestType.CreateTransactionRecord = new RequestType(32);\n\n/**\n * Crypto Auto Renew\n */\nRequestType.CryptoAccountAutoRenew = new RequestType(33);\n\n/**\n * Contract Auto Renew\n */\nRequestType.ContractAutoRenew = new RequestType(34);\n\n/**\n * Get Version\n */\nRequestType.GetVersionInfo = new RequestType(35);\n\n/**\n * Transaction Get Receipt\n */\nRequestType.TransactionGetReceipt = new RequestType(36);\n\n/**\n * Create Topic\n */\nRequestType.ConsensusCreateTopic = new RequestType(50);\n\n/**\n * Update Topic\n */\nRequestType.ConsensusUpdateTopic = new RequestType(51);\n\n/**\n * Delete Topic\n */\nRequestType.ConsensusDeleteTopic = new RequestType(52);\n\n/**\n * Get Topic information\n */\nRequestType.ConsensusGetTopicInfo = new RequestType(53);\n\n/**\n * Submit message to topic\n */\nRequestType.ConsensusSubmitMessage = new RequestType(54);\n\nRequestType.UncheckedSubmit = new RequestType(55);\n/**\n * Create Token\n */\nRequestType.TokenCreate = new RequestType(56);\n\n/**\n * Get Token information\n */\nRequestType.TokenGetInfo = new RequestType(58);\n\n/**\n * Freeze Account\n */\nRequestType.TokenFreezeAccount = new RequestType(59);\n\n/**\n * Unfreeze Account\n */\nRequestType.TokenUnfreezeAccount = new RequestType(60);\n\n/**\n * Grant KYC to Account\n */\nRequestType.TokenGrantKycToAccount = new RequestType(61);\n\n/**\n * Revoke KYC from Account\n */\nRequestType.TokenRevokeKycFromAccount = new RequestType(62);\n\n/**\n * Delete Token\n */\nRequestType.TokenDelete = new RequestType(63);\n\n/**\n * Update Token\n */\nRequestType.TokenUpdate = new RequestType(64);\n\n/**\n * Mint tokens to treasury\n */\nRequestType.TokenMint = new RequestType(65);\n\n/**\n * Burn tokens from treasury\n */\nRequestType.TokenBurn = new RequestType(66);\n\n/**\n * Wipe token amount from Account holder\n */\nRequestType.TokenAccountWipe = new RequestType(67);\n\n/**\n * Associate tokens to an account\n */\nRequestType.TokenAssociateToAccount = new RequestType(68);\n\n/**\n * Dissociate tokens from an account\n */\nRequestType.TokenDissociateFromAccount = new RequestType(69);\n\n/**\n * Create Scheduled Transaction\n */\nRequestType.ScheduleCreate = new RequestType(70);\n\n/**\n * Delete Scheduled Transaction\n */\nRequestType.ScheduleDelete = new RequestType(71);\n\n/**\n * Sign Scheduled Transaction\n */\nRequestType.ScheduleSign = new RequestType(72);\n\n/**\n * Get Scheduled Transaction Information\n */\nRequestType.ScheduleGetInfo = new RequestType(73);\n\n/**\n * Get Token Account Nft Information\n */\nRequestType.TokenGetAccountNftInfos = new RequestType(74);\n\n/**\n * Get Token Nft Information\n */\nRequestType.TokenGetNftInfo = new RequestType(75);\n\n/**\n * Get Token Nft List Information\n */\nRequestType.TokenGetNftInfos = new RequestType(76);\n\n/**\n * Update a token's custom fee schedule, if permissible\n */\nRequestType.TokenFeeScheduleUpdate = new RequestType(77);\n\n/**\n * Get execution time(s) by TransactionID, if available\n */\nRequestType.NetworkGetExecutionTime = new RequestType(78);\n\n/**\n * Pause the Token\n */\nRequestType.TokenPause = new RequestType(79);\n\n/**\n * Unpause the Token\n */\nRequestType.TokenUnpause = new RequestType(80);\n\n/**\n * Approve allowance for a spender relative to the owner account\n */\nRequestType.CryptoApproveAllowance = new RequestType(81);\n\n/**\n * Deletes granted allowances on owner account\n */\nRequestType.CryptoDeleteAllowance = new RequestType(82);\n\n/**\n * Gets all the information about an account, including balance and allowances. This does not get the list of\n * account records.\n */\nRequestType.GetAccountDetails = new RequestType(83);\n\n/**\n * Ethereum Transaction\n */\nRequestType.EthereumTransaction = new RequestType(84);\n\n/**\n * Updates the staking info at the end of staking period to indicate new staking period has started.\n */\nRequestType.NodeStakeUpdate = new RequestType(85);\n\n/**\n * Generates a pseudorandom number.\n */\nRequestType.Prng = new RequestType(86);\n\n/**\n * Get a record for a transaction (lasts 180 seconds)\n */\nRequestType.TransactionGetFastRecord = new RequestType(87);\n\n/**\n * Update the metadata of one or more NFT's of a specific token type.\n */\nRequestType.TokenUpdateNfts = new RequestType(88);\n\n/**\n * A transaction body for a `createNode` request.\n */\nRequestType.NodeCreate = new RequestType(89);\n\n/**\n * A transaction body for an `updateNode` request.\n */\nRequestType.NodeUpdate = new RequestType(90);\n\n/**\n * A transaction body for a `deleteNode` request.\n */\nRequestType.NodeDelete = new RequestType(91);\n\n/**\n * Transfer one or more token balances held by the requesting account to the treasury for each token type.\n */\nRequestType.TokenReject = new RequestType(92);\n\n/**\n * Airdrop one or more tokens to one or more accounts.\n */\nRequestType.TokenAirdrop = new RequestType(93);\n\n/**\n * Remove one or more pending airdrops from state on behalf of the sender(s) for each airdrop.\n */\nRequestType.TokenCancelAirdrop = new RequestType(94);\n\n/**\n * Claim one or more pending airdrops\n */\nRequestType.TokenClaimAirdrop = new RequestType(95);\n\n/**\n * (TSS) Messages for a candidate roster.\n */\nRequestType.TssMessage = new RequestType(96);\n\n/**\n * Vote on the validity of Threshold Signature Scheme (TSS)\n */\nRequestType.TssVote = new RequestType(97);\n\n/**\n * Communicates a node's signature of a block hash\n * using its private share within the TSS process\n */\nRequestType.TssShareSignature = new RequestType(98);\n\n/**\n * Submit a node public tss encryption key as part of the Threshold Signature Scheme (TSS).\n */\nRequestType.TssEncryptionKey = new RequestType(99);\n\n/**\n * Submit a signature of a state root hash gossiped to other nodes\n */\nRequestType.StateSignatureTransaction = new RequestType(100);\n\n/**\n * Publish a hinTS key to the network.\n */\nRequestType.HintsKeyPublication = new RequestType(101);\n\n/**\n * Vote for a particular preprocessing output of a hinTS construction.\n */\nRequestType.HintsPreprocessingVote = new RequestType(102);\n\n/**\n * Sign a partial signature for the active hinTS construction.\n */\nRequestType.HintsPartialSignature = new RequestType(103);\n\n/**\n * Sign a particular history assembly.\n */\nRequestType.HistoryAssemblySignature = new RequestType(104);\n\n/**\n * Publish a roster history proof key to the network.\n */\nRequestType.HistoryProofKeyPublication = new RequestType(105);\n\n/**\n * Vote for a particular history proof.\n */\nRequestType.HistoryProofVote = new RequestType(106);\n\n/**\n * Sign a particular CRS publication.\n */\nRequestType.CrsPublication = new RequestType(107);\n\n/**\n * Sign a particular history assembly.\n */\nRequestType.HistoryAssemblySignature = new RequestType(104);\n\n/**\n * Publish a roster history proof key to the network.\n */\nRequestType.HistoryProofKeyPublication = new RequestType(105);\n\n/**\n * Vote for a particular history proof.\n */\nRequestType.HistoryProofVote = new RequestType(106);\n\n/**\n * Sign a particular atomic batch.\n */\nRequestType.AtomicBatch = new RequestType(108);\n"],"names":["RequestType","constructor","code","this","_code","Object","freeze","toString","None","CryptoTransfer","CryptoUpdate","CryptoDelete","CryptoAddLiveHash","CryptoDeleteLiveHash","ContractCall","ContractCreate","ContractUpdate","FileCreate","FileAppend","FileUpdate","FileDelete","CryptoGetAccountBalance","CryptoGetAccountRecords","CryptoGetInfo","ContractCallLocal","ContractGetInfo","ContractGetBytecode","GetBySolidityID","GetByKey","CryptoGetLiveHash","CryptoGetStakers","FileGetContents","FileGetInfo","TransactionGetRecord","ContractGetRecords","CryptoCreate","SystemDelete","SystemUndelete","ContractDelete","Freeze","CreateTransactionRecord","CryptoAccountAutoRenew","ContractAutoRenew","GetVersionInfo","TransactionGetReceipt","ConsensusCreateTopic","ConsensusUpdateTopic","ConsensusDeleteTopic","ConsensusGetTopicInfo","ConsensusSubmitMessage","UncheckedSubmit","TokenCreate","TokenGetInfo","TokenFreezeAccount","TokenUnfreezeAccount","TokenGrantKycToAccount","TokenRevokeKycFromAccount","TokenDelete","TokenUpdate","TokenMint","TokenBurn","TokenAccountWipe","TokenAssociateToAccount","TokenDissociateFromAccount","ScheduleCreate","ScheduleDelete","ScheduleSign","ScheduleGetInfo","TokenGetAccountNftInfos","TokenGetNftInfo","TokenGetNftInfos","TokenFeeScheduleUpdate","NetworkGetExecutionTime","TokenPause","TokenUnpause","CryptoApproveAllowance","CryptoDeleteAllowance","GetAccountDetails","EthereumTransaction","NodeStakeUpdate","Prng","TransactionGetFastRecord","TokenUpdateNfts","NodeCreate","NodeUpdate","NodeDelete","TokenReject","TokenAirdrop","TokenCancelAirdrop","TokenClaimAirdrop","TssMessage","TssVote","TssShareSignature","TssEncryptionKey","StateSignatureTransaction","HistoryAssemblySignature","HistoryProofKeyPublication","HistoryProofVote","HintsKeyPublication","HintsPreprocessingVote","HintsPartialSignature","CrsPublication","AtomicBatch","_fromCode","Error","valueOf"],"mappings":"AAOe,MAAMA,EAMjB,WAAAC,CAAYC,GAERC,KAAKC,MAAQF,EAEbG,OAAOC,OAAOH,KACtB,CAKI,QAAAI,GACI,OAAQJ,MACJ,KAAKH,EAAYQ,KACb,MAAO,OACX,KAAKR,EAAYS,eACb,MAAO,iBACX,KAAKT,EAAYU,aACb,MAAO,eACX,KAAKV,EAAYW,aACb,MAAO,eACX,KAAKX,EAAYY,kBACb,MAAO,oBACX,KAAKZ,EAAYa,qBACb,MAAO,uBACX,KAAKb,EAAYc,aACb,MAAO,eACX,KAAKd,EAAYe,eACb,MAAO,iBACX,KAAKf,EAAYgB,eACb,MAAO,iBACX,KAAKhB,EAAYiB,WACb,MAAO,aACX,KAAKjB,EAAYkB,WACb,MAAO,aACX,KAAKlB,EAAYmB,WACb,MAAO,aACX,KAAKnB,EAAYoB,WACb,MAAO,aACX,KAAKpB,EAAYqB,wBACb,MAAO,0BACX,KAAKrB,EAAYsB,wBACb,MAAO,0BACX,KAAKtB,EAAYuB,cACb,MAAO,gBACX,KAAKvB,EAAYwB,kBACb,MAAO,oBACX,KAAKxB,EAAYyB,gBACb,MAAO,kBACX,KAAKzB,EAAY0B,oBACb,MAAO,sBACX,KAAK1B,EAAY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\"@hiero-ledger/proto\").proto.HederaFunctionality} HieroProto.proto.HederaFunctionality\n */\n\nexport default class RequestType {\n /**\n * @hideconstructor\n * @internal\n * @param {number} code\n */\n constructor(code) {\n /** @readonly */\n this._code = code;\n\n Object.freeze(this);\n }\n\n /**\n * @returns {string}\n */\n toString() {\n switch (this) {\n case RequestType.None:\n return \"NONE\";\n case RequestType.CryptoTransfer:\n return \"CryptoTransfer\";\n case RequestType.CryptoUpdate:\n return \"CryptoUpdate\";\n case RequestType.CryptoDelete:\n return \"CryptoDelete\";\n case RequestType.CryptoAddLiveHash:\n return \"CryptoAddLiveHash\";\n case RequestType.CryptoDeleteLiveHash:\n return \"CryptoDeleteLiveHash\";\n case RequestType.ContractCall:\n return \"ContractCall\";\n case RequestType.ContractCreate:\n return \"ContractCreate\";\n case RequestType.ContractUpdate:\n return \"ContractUpdate\";\n case RequestType.FileCreate:\n return \"FileCreate\";\n case RequestType.FileAppend:\n return \"FileAppend\";\n case RequestType.FileUpdate:\n return \"FileUpdate\";\n case RequestType.FileDelete:\n return \"FileDelete\";\n case RequestType.CryptoGetAccountBalance:\n return \"CryptoGetAccountBalance\";\n case RequestType.CryptoGetAccountRecords:\n return \"CryptoGetAccountRecords\";\n case RequestType.CryptoGetInfo:\n return \"CryptoGetInfo\";\n case RequestType.ContractCallLocal:\n return \"ContractCallLocal\";\n case RequestType.ContractGetInfo:\n return \"ContractGetInfo\";\n case RequestType.ContractGetBytecode:\n return \"ContractGetBytecode\";\n case RequestType.GetBySolidityID:\n return \"GetBySolidityID\";\n case RequestType.GetByKey:\n return \"GetByKey\";\n case RequestType.CryptoGetLiveHash:\n return \"CryptoGetLiveHash\";\n case RequestType.CryptoGetStakers:\n return \"CryptoGetStakers\";\n case RequestType.FileGetContents:\n return \"FileGetContents\";\n case RequestType.FileGetInfo:\n return \"FileGetInfo\";\n case RequestType.TransactionGetRecord:\n return \"TransactionGetRecord\";\n case RequestType.ContractGetRecords:\n return \"ContractGetRecords\";\n case RequestType.CryptoCreate:\n return \"CryptoCreate\";\n case RequestType.SystemDelete:\n return \"SystemDelete\";\n case RequestType.SystemUndelete:\n return \"SystemUndelete\";\n case RequestType.ContractDelete:\n return \"ContractDelete\";\n case RequestType.Freeze:\n return \"Freeze\";\n case RequestType.CreateTransactionRecord:\n return \"CreateTransactionRecord\";\n case RequestType.CryptoAccountAutoRenew:\n return \"CryptoAccountAutoRenew\";\n case RequestType.ContractAutoRenew:\n return \"ContractAutoRenew\";\n case RequestType.GetVersionInfo:\n return \"GetVersionInfo\";\n case RequestType.TransactionGetReceipt:\n return \"TransactionGetReceipt\";\n case RequestType.ConsensusCreateTopic:\n return \"ConsensusCreateTopic\";\n case RequestType.ConsensusUpdateTopic:\n return \"ConsensusUpdateTopic\";\n case RequestType.ConsensusDeleteTopic:\n return \"ConsensusDeleteTopic\";\n case RequestType.ConsensusGetTopicInfo:\n return \"ConsensusGetTopicInfo\";\n case RequestType.ConsensusSubmitMessage:\n return \"ConsensusSubmitMessage\";\n case RequestType.UncheckedSubmit:\n return \"UncheckedSubmit\";\n case RequestType.TokenCreate:\n return \"TokenCreate\";\n case RequestType.TokenGetInfo:\n return \"TokenGetInfo\";\n case RequestType.TokenFreezeAccount:\n return \"TokenFreezeAccount\";\n case RequestType.TokenUnfreezeAccount:\n return \"TokenUnfreezeAccount\";\n case RequestType.TokenGrantKycToAccount:\n return \"TokenGrantKycToAccount\";\n case RequestType.TokenRevokeKycFromAccount:\n return \"TokenRevokeKycFromAccount\";\n case RequestType.TokenDelete:\n return \"TokenDelete\";\n case RequestType.TokenUpdate:\n return \"TokenUpdate\";\n case RequestType.TokenMint:\n return \"TokenMint\";\n case RequestType.TokenBurn:\n return \"TokenBurn\";\n case RequestType.TokenAccountWipe:\n return \"TokenAccountWipe\";\n case RequestType.TokenAssociateToAccount:\n return \"TokenAssociateToAccount\";\n case RequestType.TokenDissociateFromAccount:\n return \"TokenDissociateFromAccount\";\n case RequestType.ScheduleCreate:\n return \"ScheduleCreate\";\n case RequestType.ScheduleDelete:\n return \"ScheduleDelete\";\n case RequestType.ScheduleSign:\n return \"ScheduleSign\";\n case RequestType.ScheduleGetInfo:\n return \"ScheduleGetInfo\";\n case RequestType.TokenGetAccountNftInfos:\n return \"TokenGetAccountNftInfos\";\n case RequestType.TokenGetNftInfo:\n return \"TokenGetNftInfo\";\n case RequestType.TokenGetNftInfos:\n return \"TokenGetNftInfos\";\n case RequestType.TokenFeeScheduleUpdate:\n return \"TokenFeeScheduleUpdate\";\n case RequestType.NetworkGetExecutionTime:\n return \"NetworkGetExecutionTime\";\n case RequestType.TokenPause:\n return \"TokenPause\";\n case RequestType.TokenUnpause:\n return \"TokenUnpause\";\n case RequestType.CryptoApproveAllowance:\n return \"CryptoApproveAllowance\";\n case RequestType.CryptoDeleteAllowance:\n return \"CryptoDeleteAllowance\";\n case RequestType.GetAccountDetails:\n return \"GetAccountDetails\";\n case RequestType.EthereumTransaction:\n return \"EthereumTransaction\";\n case RequestType.NodeStakeUpdate:\n return \"NodeStakeUpdate\";\n case RequestType.Prng:\n return \"UtilPrng\";\n case RequestType.TransactionGetFastRecord:\n return \"TransactionGetFastRecord\";\n case RequestType.TokenUpdateNfts:\n return \"TokenUpdateNfts\";\n case RequestType.NodeCreate:\n return \"NodeCreate\";\n case RequestType.NodeUpdate:\n return \"NodeUpdate\";\n case RequestType.NodeDelete:\n return \"NodeDelete\";\n case RequestType.TokenReject:\n return \"TokenReject\";\n case RequestType.TokenAirdrop:\n return \"TokenAirdrop\";\n case RequestType.TokenCancelAirdrop:\n return \"TokenCancelAirdrop\";\n case RequestType.TokenClaimAirdrop:\n return \"TokenClaimAirdrop\";\n case RequestType.TssMessage:\n return \"TssMessage\";\n case RequestType.TssVote:\n return \"TssVote\";\n case RequestType.TssShareSignature:\n return \"TssShareSignature\";\n case RequestType.TssEncryptionKey:\n return \"TssEncryptionKey\";\n case RequestType.StateSignatureTransaction:\n return \"StateSignatureTransaction\";\n case RequestType.HistoryAssemblySignature:\n return \"HistoryAssemblySignature\";\n case RequestType.HistoryProofKeyPublication:\n return \"HistoryProofKeyPublication\";\n case RequestType.HistoryProofVote:\n return \"HistoryProofVote\";\n case RequestType.HintsKeyPublication:\n return \"HintsKeyPublication\";\n case RequestType.HintsPreprocessingVote:\n return \"HintsPreprocessingVote\";\n case RequestType.HintsPartialSignature:\n return \"HintsPartialSignature\";\n case RequestType.CrsPublication:\n return \"CrsPublication\";\n case RequestType.AtomicBatch:\n return \"AtomicBatch\";\n default:\n return `UNKNOWN (${this._code})`;\n }\n }\n\n /**\n * @internal\n * @param {number} code\n * @returns {RequestType}\n */\n static _fromCode(code) {\n switch (code) {\n case 0:\n return RequestType.None;\n case 1:\n return RequestType.CryptoTransfer;\n case 2:\n return RequestType.CryptoUpdate;\n case 3:\n return RequestType.CryptoDelete;\n case 4:\n return RequestType.CryptoAddLiveHash;\n case 5:\n return RequestType.CryptoDeleteLiveHash;\n case 6:\n return RequestType.ContractCall;\n case 7:\n return RequestType.ContractCreate;\n case 8:\n return RequestType.ContractUpdate;\n case 9:\n return RequestType.FileCreate;\n case 10:\n return RequestType.FileAppend;\n case 11:\n return RequestType.FileUpdate;\n case 12:\n return RequestType.FileDelete;\n case 13:\n return RequestType.CryptoGetAccountBalance;\n case 14:\n return RequestType.CryptoGetAccountRecords;\n case 15:\n return RequestType.CryptoGetInfo;\n case 16:\n return RequestType.ContractCallLocal;\n case 17:\n return RequestType.ContractGetInfo;\n case 18:\n return RequestType.ContractGetBytecode;\n case 19:\n return RequestType.GetBySolidityID;\n case 20:\n return RequestType.GetByKey;\n case 21:\n return RequestType.CryptoGetLiveHash;\n case 22:\n return RequestType.CryptoGetStakers;\n case 23:\n return RequestType.FileGetContents;\n case 24:\n return RequestType.FileGetInfo;\n case 25:\n return RequestType.TransactionGetRecord;\n case 26:\n return RequestType.ContractGetRecords;\n case 27:\n return RequestType.CryptoCreate;\n case 28:\n return RequestType.SystemDelete;\n case 29:\n return RequestType.SystemUndelete;\n case 30:\n return RequestType.ContractDelete;\n case 31:\n return RequestType.Freeze;\n case 32:\n return RequestType.CreateTransactionRecord;\n case 33:\n return RequestType.CryptoAccountAutoRenew;\n case 34:\n return RequestType.ContractAutoRenew;\n case 35:\n return RequestType.GetVersionInfo;\n case 36:\n return RequestType.TransactionGetReceipt;\n case 50:\n return RequestType.ConsensusCreateTopic;\n case 51:\n return RequestType.ConsensusUpdateTopic;\n case 52:\n return RequestType.ConsensusDeleteTopic;\n case 53:\n return RequestType.ConsensusGetTopicInfo;\n case 54:\n return RequestType.ConsensusSubmitMessage;\n case 55:\n return RequestType.UncheckedSubmit;\n case 56:\n return RequestType.TokenCreate;\n case 58:\n return RequestType.TokenGetInfo;\n case 59:\n return RequestType.TokenFreezeAccount;\n case 60:\n return RequestType.TokenUnfreezeAccount;\n case 61:\n return RequestType.TokenGrantKycToAccount;\n case 62:\n return RequestType.TokenRevokeKycFromAccount;\n case 63:\n return RequestType.TokenDelete;\n case 64:\n return RequestType.TokenUpdate;\n case 65:\n return RequestType.TokenMint;\n case 66:\n return RequestType.TokenBurn;\n case 67:\n return RequestType.TokenAccountWipe;\n case 68:\n return RequestType.TokenAssociateToAccount;\n case 69:\n return RequestType.TokenDissociateFromAccount;\n case 70:\n return RequestType.ScheduleCreate;\n case 71:\n return RequestType.ScheduleDelete;\n case 72:\n return RequestType.ScheduleSign;\n case 73:\n return RequestType.ScheduleGetInfo;\n case 74:\n return RequestType.TokenGetAccountNftInfos;\n case 75:\n return RequestType.TokenGetNftInfo;\n case 76:\n return RequestType.TokenGetNftInfos;\n case 77:\n return RequestType.TokenFeeScheduleUpdate;\n case 78:\n return RequestType.NetworkGetExecutionTime;\n case 79:\n return RequestType.TokenPause;\n case 80:\n return RequestType.TokenUnpause;\n case 81:\n return RequestType.CryptoApproveAllowance;\n case 82:\n return RequestType.CryptoDeleteAllowance;\n case 83:\n return RequestType.GetAccountDetails;\n case 84:\n return RequestType.EthereumTransaction;\n case 85:\n return RequestType.NodeStakeUpdate;\n case 86:\n return RequestType.Prng;\n case 87:\n return RequestType.TransactionGetFastRecord;\n case 88:\n return RequestType.TokenUpdateNfts;\n case 89:\n return RequestType.NodeCreate;\n case 90:\n return RequestType.NodeUpdate;\n case 91:\n return RequestType.NodeDelete;\n case 92:\n return RequestType.TokenReject;\n case 93:\n return RequestType.TokenAirdrop;\n case 94:\n return RequestType.TokenCancelAirdrop;\n case 95:\n return RequestType.TokenClaimAirdrop;\n case 96:\n return RequestType.TssMessage;\n case 97:\n return RequestType.TssVote;\n case 98:\n return RequestType.TssShareSignature;\n case 99:\n return RequestType.TssEncryptionKey;\n case 100:\n return RequestType.StateSignatureTransaction;\n case 101:\n return RequestType.HintsKeyPublication;\n case 102:\n return RequestType.HintsPreprocessingVote;\n case 103:\n return RequestType.HintsPartialSignature;\n case 104:\n return RequestType.HistoryAssemblySignature;\n case 105:\n return RequestType.HistoryProofKeyPublication;\n case 106:\n return RequestType.HistoryProofVote;\n case 107:\n return RequestType.CrsPublication;\n case 108:\n return RequestType.AtomicBatch;\n }\n\n throw new Error(\n `(BUG) RequestType.fromCode() does not handle code: ${code}`,\n );\n }\n\n /**\n * @returns {HieroProto.proto.HederaFunctionality}\n */\n valueOf() {\n return this._code;\n }\n}\n\n/**\n * UNSPECIFIED - Need to keep first value as unspecified because first element is ignored and\n * not parsed (0 is ignored by parser)\n */\nRequestType.None = new RequestType(0);\n\n/**\n * crypto transfer\n */\nRequestType.CryptoTransfer = new RequestType(1);\n\n/**\n * crypto update account\n */\nRequestType.CryptoUpdate = new RequestType(2);\n\n/**\n * crypto delete account\n */\nRequestType.CryptoDelete = new RequestType(3);\n\n/**\n * Add a livehash to a crypto account\n */\nRequestType.CryptoAddLiveHash = new RequestType(4);\n\n/**\n * Delete a livehash from a crypto account\n */\nRequestType.CryptoDeleteLiveHash = new RequestType(5);\n\n/**\n * Smart Contract Call\n */\nRequestType.ContractCall = new RequestType(6);\n\n/**\n * Smart Contract Create Contract\n */\nRequestType.ContractCreate = new RequestType(7);\n\n/**\n * Smart Contract update contract\n */\nRequestType.ContractUpdate = new RequestType(8);\n\n/**\n * File Operation create file\n */\nRequestType.FileCreate = new RequestType(9);\n\n/**\n * File Operation append file\n */\nRequestType.FileAppend = new RequestType(10);\n\n/**\n * File Operation update file\n */\nRequestType.FileUpdate = new RequestType(11);\n\n/**\n * File Operation delete file\n */\nRequestType.FileDelete = new RequestType(12);\n\n/**\n * crypto get account balance\n */\nRequestType.CryptoGetAccountBalance = new RequestType(13);\n\n/**\n * crypto get account record\n */\nRequestType.CryptoGetAccountRecords = new RequestType(14);\n\n/**\n * Crypto get info\n */\nRequestType.CryptoGetInfo = new RequestType(15);\n\n/**\n * Smart Contract Call\n */\nRequestType.ContractCallLocal = new RequestType(16);\n\n/**\n * Smart Contract get info\n */\nRequestType.ContractGetInfo = new RequestType(17);\n\n/**\n * Smart Contract, get the runtime code\n */\nRequestType.ContractGetBytecode = new RequestType(18);\n\n/**\n * Smart Contract, get by solidity ID\n */\nRequestType.GetBySolidityID = new RequestType(19);\n\n/**\n * Smart Contract, get by key\n */\nRequestType.GetByKey = new RequestType(20);\n\n/**\n * Get a live hash from a crypto account\n */\nRequestType.CryptoGetLiveHash = new RequestType(21);\n\n/**\n * Crypto, get the stakers for the node\n */\nRequestType.CryptoGetStakers = new RequestType(22);\n\n/**\n * File Operations get file contents\n */\nRequestType.FileGetContents = new RequestType(23);\n\n/**\n * File Operations get the info of the file\n */\nRequestType.FileGetInfo = new RequestType(24);\n\n/**\n * Crypto get the transaction records\n */\nRequestType.TransactionGetRecord = new RequestType(25);\n\n/**\n * Contract get the transaction records\n */\nRequestType.ContractGetRecords = new RequestType(26);\n\n/**\n * crypto create account\n */\nRequestType.CryptoCreate = new RequestType(27);\n\n/**\n * system delete file\n */\nRequestType.SystemDelete = new RequestType(28);\n\n/**\n * system undelete file\n */\nRequestType.SystemUndelete = new RequestType(29);\n\n/**\n * delete contract\n */\nRequestType.ContractDelete = new RequestType(30);\n\n/**\n * freeze\n */\nRequestType.Freeze = new RequestType(31);\n\n/**\n * Create Tx Record\n */\nRequestType.CreateTransactionRecord = new RequestType(32);\n\n/**\n * Crypto Auto Renew\n */\nRequestType.CryptoAccountAutoRenew = new RequestType(33);\n\n/**\n * Contract Auto Renew\n */\nRequestType.ContractAutoRenew = new RequestType(34);\n\n/**\n * Get Version\n */\nRequestType.GetVersionInfo = new RequestType(35);\n\n/**\n * Transaction Get Receipt\n */\nRequestType.TransactionGetReceipt = new RequestType(36);\n\n/**\n * Create Topic\n */\nRequestType.ConsensusCreateTopic = new RequestType(50);\n\n/**\n * Update Topic\n */\nRequestType.ConsensusUpdateTopic = new RequestType(51);\n\n/**\n * Delete Topic\n */\nRequestType.ConsensusDeleteTopic = new RequestType(52);\n\n/**\n * Get Topic information\n */\nRequestType.ConsensusGetTopicInfo = new RequestType(53);\n\n/**\n * Submit message to topic\n */\nRequestType.ConsensusSubmitMessage = new RequestType(54);\n\nRequestType.UncheckedSubmit = new RequestType(55);\n/**\n * Create Token\n */\nRequestType.TokenCreate = new RequestType(56);\n\n/**\n * Get Token information\n */\nRequestType.TokenGetInfo = new RequestType(58);\n\n/**\n * Freeze Account\n */\nRequestType.TokenFreezeAccount = new RequestType(59);\n\n/**\n * Unfreeze Account\n */\nRequestType.TokenUnfreezeAccount = new RequestType(60);\n\n/**\n * Grant KYC to Account\n */\nRequestType.TokenGrantKycToAccount = new RequestType(61);\n\n/**\n * Revoke KYC from Account\n */\nRequestType.TokenRevokeKycFromAccount = new RequestType(62);\n\n/**\n * Delete Token\n */\nRequestType.TokenDelete = new RequestType(63);\n\n/**\n * Update Token\n */\nRequestType.TokenUpdate = new RequestType(64);\n\n/**\n * Mint tokens to treasury\n */\nRequestType.TokenMint = new RequestType(65);\n\n/**\n * Burn tokens from treasury\n */\nRequestType.TokenBurn = new RequestType(66);\n\n/**\n * Wipe token amount from Account holder\n */\nRequestType.TokenAccountWipe = new RequestType(67);\n\n/**\n * Associate tokens to an account\n */\nRequestType.TokenAssociateToAccount = new RequestType(68);\n\n/**\n * Dissociate tokens from an account\n */\nRequestType.TokenDissociateFromAccount = new RequestType(69);\n\n/**\n * Create Scheduled Transaction\n */\nRequestType.ScheduleCreate = new RequestType(70);\n\n/**\n * Delete Scheduled Transaction\n */\nRequestType.ScheduleDelete = new RequestType(71);\n\n/**\n * Sign Scheduled Transaction\n */\nRequestType.ScheduleSign = new RequestType(72);\n\n/**\n * Get Scheduled Transaction Information\n */\nRequestType.ScheduleGetInfo = new RequestType(73);\n\n/**\n * Get Token Account Nft Information\n */\nRequestType.TokenGetAccountNftInfos = new RequestType(74);\n\n/**\n * Get Token Nft Information\n */\nRequestType.TokenGetNftInfo = new RequestType(75);\n\n/**\n * Get Token Nft List Information\n */\nRequestType.TokenGetNftInfos = new RequestType(76);\n\n/**\n * Update a token's custom fee schedule, if permissible\n */\nRequestType.TokenFeeScheduleUpdate = new RequestType(77);\n\n/**\n * Get execution time(s) by TransactionID, if available\n */\nRequestType.NetworkGetExecutionTime = new RequestType(78);\n\n/**\n * Pause the Token\n */\nRequestType.TokenPause = new RequestType(79);\n\n/**\n * Unpause the Token\n */\nRequestType.TokenUnpause = new RequestType(80);\n\n/**\n * Approve allowance for a spender relative to the owner account\n */\nRequestType.CryptoApproveAllowance = new RequestType(81);\n\n/**\n * Deletes granted allowances on owner account\n */\nRequestType.CryptoDeleteAllowance = new RequestType(82);\n\n/**\n * Gets all the information about an account, including balance and allowances. This does not get the list of\n * account records.\n */\nRequestType.GetAccountDetails = new RequestType(83);\n\n/**\n * Ethereum Transaction\n */\nRequestType.EthereumTransaction = new RequestType(84);\n\n/**\n * Updates the staking info at the end of staking period to indicate new staking period has started.\n */\nRequestType.NodeStakeUpdate = new RequestType(85);\n\n/**\n * Generates a pseudorandom number.\n */\nRequestType.Prng = new RequestType(86);\n\n/**\n * Get a record for a transaction (lasts 180 seconds)\n */\nRequestType.TransactionGetFastRecord = new RequestType(87);\n\n/**\n * Update the metadata of one or more NFT's of a specific token type.\n */\nRequestType.TokenUpdateNfts = new RequestType(88);\n\n/**\n * A transaction body for a `createNode` request.\n */\nRequestType.NodeCreate = new RequestType(89);\n\n/**\n * A transaction body for an `updateNode` request.\n */\nRequestType.NodeUpdate = new RequestType(90);\n\n/**\n * A transaction body for a `deleteNode` request.\n */\nRequestType.NodeDelete = new RequestType(91);\n\n/**\n * Transfer one or more token balances held by the requesting account to the treasury for each token type.\n */\nRequestType.TokenReject = new RequestType(92);\n\n/**\n * Airdrop one or more tokens to one or more accounts.\n */\nRequestType.TokenAirdrop = new RequestType(93);\n\n/**\n * Remove one or more pending airdrops from state on behalf of the sender(s) for each airdrop.\n */\nRequestType.TokenCancelAirdrop = new RequestType(94);\n\n/**\n * Claim one or more pending airdrops\n */\nRequestType.TokenClaimAirdrop = new RequestType(95);\n\n/**\n * (TSS) Messages for a candidate roster.\n */\nRequestType.TssMessage = new RequestType(96);\n\n/**\n * Vote on the validity of Threshold Signature Scheme (TSS)\n */\nRequestType.TssVote = new RequestType(97);\n\n/**\n * Communicates a node's signature of a block hash\n * using its private share within the TSS process\n */\nRequestType.TssShareSignature = new RequestType(98);\n\n/**\n * Submit a node public tss encryption key as part of the Threshold Signature Scheme (TSS).\n */\nRequestType.TssEncryptionKey = new RequestType(99);\n\n/**\n * Submit a signature of a state root hash gossiped to other nodes\n */\nRequestType.StateSignatureTransaction = new RequestType(100);\n\n/**\n * Publish a hinTS key to the network.\n */\nRequestType.HintsKeyPublication = new RequestType(101);\n\n/**\n * Vote for a particular preprocessing output of a hinTS construction.\n */\nRequestType.HintsPreprocessingVote = new RequestType(102);\n\n/**\n * Sign a partial signature for the active hinTS construction.\n */\nRequestType.HintsPartialSignature = new RequestType(103);\n\n/**\n * Sign a particular history assembly.\n */\nRequestType.HistoryAssemblySignature = new RequestType(104);\n\n/**\n * Publish a roster history proof key to the network.\n */\nRequestType.HistoryProofKeyPublication = new RequestType(105);\n\n/**\n * Vote for a particular history proof.\n */\nRequestType.HistoryProofVote = new RequestType(106);\n\n/**\n * Sign a particular CRS publication.\n */\nRequestType.CrsPublication = new RequestType(107);\n\n/**\n * Sign a particular history assembly.\n */\nRequestType.HistoryAssemblySignature = new RequestType(104);\n\n/**\n * Publish a roster history proof key to the network.\n */\nRequestType.HistoryProofKeyPublication = new RequestType(105);\n\n/**\n * Vote for a particular history proof.\n */\nRequestType.HistoryProofVote = new RequestType(106);\n\n/**\n * Sign a particular atomic batch.\n */\nRequestType.AtomicBatch = new RequestType(108);\n"],"names":["RequestType","constructor","code","this","_code","Object","freeze","toString","None","CryptoTransfer","CryptoUpdate","CryptoDelete","CryptoAddLiveHash","CryptoDeleteLiveHash","ContractCall","ContractCreate","ContractUpdate","FileCreate","FileAppend","FileUpdate","FileDelete","CryptoGetAccountBalance","CryptoGetAccountRecords","CryptoGetInfo","ContractCallLocal","ContractGetInfo","ContractGetBytecode","GetBySolidityID","GetByKey","CryptoGetLiveHash","CryptoGetStakers","FileGetContents","FileGetInfo","TransactionGetRecord","ContractGetRecords","CryptoCreate","SystemDelete","SystemUndelete","ContractDelete","Freeze","CreateTransactionRecord","CryptoAccountAutoRenew","ContractAutoRenew","GetVersionInfo","TransactionGetReceipt","ConsensusCreateTopic","ConsensusUpdateTopic","ConsensusDeleteTopic","ConsensusGetTopicInfo","ConsensusSubmitMessage","UncheckedSubmit","TokenCreate","TokenGetInfo","TokenFreezeAccount","TokenUnfreezeAccount","TokenGrantKycToAccount","TokenRevokeKycFromAccount","TokenDelete","TokenUpdate","TokenMint","TokenBurn","TokenAccountWipe","TokenAssociateToAccount","TokenDissociateFromAccount","ScheduleCreate","ScheduleDelete","ScheduleSign","ScheduleGetInfo","TokenGetAccountNftInfos","TokenGetNftInfo","TokenGetNftInfos","TokenFeeScheduleUpdate","NetworkGetExecutionTime","TokenPause","TokenUnpause","CryptoApproveAllowance","CryptoDeleteAllowance","GetAccountDetails","EthereumTransaction","NodeStakeUpdate","Prng","TransactionGetFastRecord","TokenUpdateNfts","NodeCreate","NodeUpdate","NodeDelete","TokenReject","TokenAirdrop","TokenCancelAirdrop","TokenClaimAirdrop","TssMessage","TssVote","TssShareSignature","TssEncryptionKey","StateSignatureTransaction","HistoryAssemblySignature","HistoryProofKeyPublication","HistoryProofVote","HintsKeyPublication","HintsPreprocessingVote","HintsPartialSignature","CrsPublication","AtomicBatch","_fromCode","Error","valueOf"],"mappings":"AAOe,MAAMA,EAMjB,WAAAC,CAAYC,GAERC,KAAKC,MAAQF,EAEbG,OAAOC,OAAOH,KACtB,CAKI,QAAAI,GACI,OAAQJ,MACJ,KAAKH,EAAYQ,KACb,MAAO,OACX,KAAKR,EAAYS,eACb,MAAO,iBACX,KAAKT,EAAYU,aACb,MAAO,eACX,KAAKV,EAAYW,aACb,MAAO,eACX,KAAKX,EAAYY,kBACb,MAAO,oBACX,KAAKZ,EAAYa,qBACb,MAAO,uBACX,KAAKb,EAAYc,aACb,MAAO,eACX,KAAKd,EAAYe,eACb,MAAO,iBACX,KAAKf,EAAYgB,eACb,MAAO,iBACX,KAAKhB,EAAYiB,WACb,MAAO,aACX,KAAKjB,EAAYkB,WACb,MAAO,aACX,KAAKlB,EAAYmB,WACb,MAAO,aACX,KAAKnB,EAAYoB,WACb,MAAO,aACX,KAAKpB,EAAYqB,wBACb,MAAO,0BACX,KAAKrB,EAAYsB,wBACb,MAAO,0BACX,KAAKtB,EAAYuB,cACb,MAAO,gBACX,KAAKvB,EAAYwB,kBACb,MAAO,oBACX,KAAKxB,EAAYyB,gBACb,MAAO,kBACX,KAAKzB,EAAY0B,oBACb,MAAO,sBACX,KAAK1B,EAAY2B,gBACb,MAAO,kBACX,KAAK3B,EAAY4B,SACb,MAAO,WACX,KAAK5B,EAAY6B,kBACb,MAAO,oBACX,KAAK7B,EAAY8B,iBACb,MAAO,mBACX,KAAK9B,EAAY+B,gBACb,MAAO,kBACX,KAAK/B,EAAYgC,YACb,MAAO,cACX,KAAKhC,EAAYiC,qBACb,MAAO,uBACX,KAAKjC,EAAYkC,mBACb,MAAO,qBACX,KAAKlC,EAAYmC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,EAAYoF,WAAa,IAAIpF,EAAY,IAKzCA,EAAYqF,WAAa,IAAIrF,EAAY,IAKzCA,EAAYsF,YAAc,IAAItF,EAAY,IAK1CA,EAAYuF,aAAe,IAAIvF,EAAY,IAK3CA,EAAYwF,mBAAqB,IAAIxF,EAAY,IAKjDA,EAAYyF,kBAAoB,IAAIzF,EAAY,IAKhDA,EAAY0F,WAAa,IAAI1F,EAAY,IAKzCA,EAAY2F,QAAU,IAAI3F,EAAY,IAMtCA,EAAY4F,kBAAoB,IAAI5F,EAAY,IAKhDA,EAAY6F,iBAAmB,IAAI7F,EAAY,IAK/CA,EAAY8F,0BAA4B,IAAI9F,EAAY,KAKxDA,EAAYkG,oBAAsB,IAAIlG,EAAY,KAKlDA,EAAYmG,uBAAyB,IAAInG,EAAY,KAKrDA,EAAYoG,sBAAwB,IAAIpG,EAAY,KAKpDA,EAAY+F,yBAA2B,IAAI/F,EAAY,KAKvDA,EAAYgG,2BAA6B,IAAIhG,EAAY,KAKzDA,EAAYiG,iBAAmB,IAAIjG,EAAY,KAK/CA,EAAYqG,eAAiB,IAAIrG,EAAY,KAK7CA,EAAY+F,yBAA2B,IAAI/F,EAAY,KAKvDA,EAAYgG,2BAA6B,IAAIhG,EAAY,KAKzDA,EAAYiG,iBAAmB,IAAIjG,EAAY,KAK/CA,EAAYsG,YAAc,IAAItG,EAAY"}
@@ -7,7 +7,7 @@ exports.default = void 0;
7
7
  var _AccountId = _interopRequireDefault(require("./account/AccountId.cjs"));
8
8
  var _Hbar = _interopRequireDefault(require("./Hbar.cjs"));
9
9
  var _Timestamp = _interopRequireDefault(require("./Timestamp.cjs"));
10
- var HieroProto = _interopRequireWildcard(require("@hashgraph/proto"));
10
+ var HieroProto = _interopRequireWildcard(require("@hiero-ledger/proto"));
11
11
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
12
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
13
  // SPDX-License-Identifier: Apache-2.0
@@ -106,4 +106,4 @@ export type StakingInfoJson = {
106
106
  import Timestamp from "./Timestamp.js";
107
107
  import Hbar from "./Hbar.js";
108
108
  import AccountId from "./account/AccountId.js";
109
- import * as HieroProto from "@hashgraph/proto";
109
+ import * as HieroProto from "@hiero-ledger/proto";