@ozdao/prometheus-framework 0.2.47 → 0.2.50

Sign up to get free protection for your applications and to get access to all the features.
Files changed (492) hide show
  1. package/dist/auth.server.js +27 -25
  2. package/dist/auth.server.mjs +27 -25
  3. package/dist/community.server.js +1 -1
  4. package/dist/community.server.mjs +1 -1
  5. package/dist/events.server.js +1 -1
  6. package/dist/events.server.mjs +1 -1
  7. package/dist/files.server.js +1 -1
  8. package/dist/files.server.mjs +1 -1
  9. package/dist/gallery.server.js +1 -1
  10. package/dist/gallery.server.mjs +1 -1
  11. package/dist/index-3981e903.mjs +217 -0
  12. package/dist/index-4eecfdb9.js +216 -0
  13. package/dist/main-203b36b6.mjs +13628 -0
  14. package/dist/main-610fd21a.mjs +13628 -0
  15. package/dist/main-669fac33.js +91 -0
  16. package/dist/main-_b1_i8mt.mjs +13606 -0
  17. package/dist/main-a7ae4ce5.js +91 -0
  18. package/dist/main-uiQFxEks.js +91 -0
  19. package/dist/main.css +1 -1
  20. package/dist/middlewares.server.js +1 -1
  21. package/dist/middlewares.server.mjs +1 -1
  22. package/dist/node_modules/@noble/hashes/esm/_assert.cjs +1 -1
  23. package/dist/node_modules/@noble/hashes/esm/_assert.js +6 -6
  24. package/dist/node_modules/@noble/hashes/esm/_u64.cjs +1 -1
  25. package/dist/node_modules/@noble/hashes/esm/_u64.js +8 -8
  26. package/dist/node_modules/@noble/hashes/esm/sha512.cjs +1 -1
  27. package/dist/node_modules/@noble/hashes/esm/sha512.js +2 -2
  28. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/isURLSameOrigin.js +1 -1
  29. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/common/utils.cjs +1 -1
  30. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/common/utils.js +2 -2
  31. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/utils.cjs +1 -1
  32. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/utils.js +3 -3
  33. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework.es.cjs +1 -1
  34. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework.es.js +6 -6
  35. package/dist/node_modules/ethereum-cryptography/esm/utils.cjs +1 -1
  36. package/dist/node_modules/ethereum-cryptography/esm/utils.js +4 -3
  37. package/dist/node_modules/vue-select/dist/vue-select.es.cjs +1 -3
  38. package/dist/node_modules/vue-select/dist/vue-select.es.js +49 -645
  39. package/dist/node_modules/vue3-carousel/dist/carousel.css.cjs +1 -1
  40. package/dist/node_modules/vue3-carousel/dist/carousel.css.js +4 -1
  41. package/dist/node_modules/web3/lib/esm/accounts.cjs +1 -1
  42. package/dist/node_modules/web3/lib/esm/accounts.js +36 -36
  43. package/dist/node_modules/web3-core/lib/esm/web3_batch_request.cjs +1 -1
  44. package/dist/node_modules/web3-core/lib/esm/web3_batch_request.js +27 -27
  45. package/dist/node_modules/web3-core/lib/esm/web3_context.cjs +1 -1
  46. package/dist/node_modules/web3-core/lib/esm/web3_context.js +24 -24
  47. package/dist/node_modules/web3-core/lib/esm/web3_promi_event.cjs +1 -1
  48. package/dist/node_modules/web3-core/lib/esm/web3_promi_event.js +33 -33
  49. package/dist/node_modules/web3-core/lib/esm/web3_request_manager.cjs +1 -1
  50. package/dist/node_modules/web3-core/lib/esm/web3_request_manager.js +10 -10
  51. package/dist/node_modules/web3-core/lib/esm/web3_subscription_manager.cjs +1 -1
  52. package/dist/node_modules/web3-core/lib/esm/web3_subscription_manager.js +1 -1
  53. package/dist/node_modules/web3-core/lib/esm/web3_subscriptions.cjs +1 -1
  54. package/dist/node_modules/web3-core/lib/esm/web3_subscriptions.js +13 -13
  55. package/dist/node_modules/web3-eth/lib/esm/rpc_method_wrappers.cjs +1 -1
  56. package/dist/node_modules/web3-eth/lib/esm/rpc_method_wrappers.js +110 -110
  57. package/dist/node_modules/web3-eth/lib/esm/utils/get_revert_reason.cjs +1 -1
  58. package/dist/node_modules/web3-eth/lib/esm/utils/get_revert_reason.js +26 -26
  59. package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_error.cjs +1 -1
  60. package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_error.js +14 -14
  61. package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_gas_pricing.cjs +1 -1
  62. package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_gas_pricing.js +36 -36
  63. package/dist/node_modules/web3-eth/lib/esm/utils/prepare_transaction_for_signing.cjs +1 -1
  64. package/dist/node_modules/web3-eth/lib/esm/utils/prepare_transaction_for_signing.js +20 -20
  65. package/dist/node_modules/web3-eth/lib/esm/utils/reject_if_block_timeout.cjs +1 -1
  66. package/dist/node_modules/web3-eth/lib/esm/utils/reject_if_block_timeout.js +23 -23
  67. package/dist/node_modules/web3-eth/lib/esm/utils/send_tx_helper.cjs +1 -1
  68. package/dist/node_modules/web3-eth/lib/esm/utils/send_tx_helper.js +17 -17
  69. package/dist/node_modules/web3-eth/lib/esm/utils/transaction_builder.cjs +1 -1
  70. package/dist/node_modules/web3-eth/lib/esm/utils/transaction_builder.js +11 -11
  71. package/dist/node_modules/web3-eth/lib/esm/utils/try_send_transaction.cjs +1 -1
  72. package/dist/node_modules/web3-eth/lib/esm/utils/try_send_transaction.js +24 -24
  73. package/dist/node_modules/web3-eth/lib/esm/utils/wait_for_transaction_receipt.cjs +1 -1
  74. package/dist/node_modules/web3-eth/lib/esm/utils/wait_for_transaction_receipt.js +25 -25
  75. package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_polling.cjs +1 -1
  76. package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_polling.js +19 -19
  77. package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_subscription.cjs +1 -1
  78. package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_subscription.js +39 -39
  79. package/dist/node_modules/web3-eth/lib/esm/web3_eth.cjs +1 -1
  80. package/dist/node_modules/web3-eth/lib/esm/web3_eth.js +7 -7
  81. package/dist/node_modules/web3-eth-accounts/lib/esm/account.cjs +2 -2
  82. package/dist/node_modules/web3-eth-accounts/lib/esm/account.js +28 -28
  83. package/dist/node_modules/web3-eth-accounts/lib/esm/wallet.cjs +1 -1
  84. package/dist/node_modules/web3-eth-accounts/lib/esm/wallet.js +3 -3
  85. package/dist/node_modules/web3-eth-contract/lib/esm/contract.cjs +1 -1
  86. package/dist/node_modules/web3-eth-contract/lib/esm/contract.js +8 -8
  87. package/dist/node_modules/web3-eth-ens/lib/esm/ens.cjs +1 -1
  88. package/dist/node_modules/web3-eth-ens/lib/esm/ens.js +15 -15
  89. package/dist/node_modules/web3-eth-ens/lib/esm/registry.cjs +1 -1
  90. package/dist/node_modules/web3-eth-ens/lib/esm/registry.js +16 -16
  91. package/dist/node_modules/web3-eth-ens/lib/esm/resolver.cjs +1 -1
  92. package/dist/node_modules/web3-eth-ens/lib/esm/resolver.js +26 -26
  93. package/dist/node_modules/web3-eth-iban/lib/esm/iban.cjs +1 -1
  94. package/dist/node_modules/web3-eth-iban/lib/esm/iban.js +2 -2
  95. package/dist/node_modules/web3-eth-personal/lib/esm/personal.cjs +1 -1
  96. package/dist/node_modules/web3-eth-personal/lib/esm/personal.js +19 -19
  97. package/dist/node_modules/web3-eth-personal/lib/esm/rpc_method_wrappers.cjs +1 -1
  98. package/dist/node_modules/web3-eth-personal/lib/esm/rpc_method_wrappers.js +35 -35
  99. package/dist/node_modules/web3-net/lib/esm/net.cjs +1 -1
  100. package/dist/node_modules/web3-net/lib/esm/net.js +25 -25
  101. package/dist/node_modules/web3-net/lib/esm/rpc_method_wrappers.cjs +1 -1
  102. package/dist/node_modules/web3-net/lib/esm/rpc_method_wrappers.js +25 -25
  103. package/dist/node_modules/web3-providers-http/lib/esm/index.cjs +1 -1
  104. package/dist/node_modules/web3-providers-http/lib/esm/index.js +33 -33
  105. package/dist/node_modules/web3-rpc-methods/lib/esm/eth_rpc_methods.cjs +1 -1
  106. package/dist/node_modules/web3-rpc-methods/lib/esm/eth_rpc_methods.js +5 -5
  107. package/dist/node_modules/web3-rpc-methods/lib/esm/net_rpc_methods.cjs +1 -1
  108. package/dist/node_modules/web3-rpc-methods/lib/esm/net_rpc_methods.js +19 -19
  109. package/dist/node_modules/web3-rpc-methods/lib/esm/personal_rpc_methods.cjs +1 -1
  110. package/dist/node_modules/web3-rpc-methods/lib/esm/personal_rpc_methods.js +27 -27
  111. package/dist/node_modules/web3-types/lib/esm/web3_base_provider.cjs +1 -1
  112. package/dist/node_modules/web3-types/lib/esm/web3_base_provider.js +25 -25
  113. package/dist/node_modules/web3-utils/lib/esm/event_emitter.cjs +1 -1
  114. package/dist/node_modules/web3-utils/lib/esm/event_emitter.js +15 -15
  115. package/dist/node_modules/web3-utils/lib/esm/promise_helpers.cjs +1 -1
  116. package/dist/node_modules/web3-utils/lib/esm/promise_helpers.js +19 -19
  117. package/dist/node_modules/web3-utils/lib/esm/socket_provider.cjs +1 -1
  118. package/dist/node_modules/web3-utils/lib/esm/socket_provider.js +17 -17
  119. package/dist/node_modules/web3-utils/lib/esm/web3_deferred_promise.cjs +1 -1
  120. package/dist/node_modules/web3-utils/lib/esm/web3_deferred_promise.js +5 -5
  121. package/dist/node_modules/web3-utils/lib/esm/web3_eip1193_provider.cjs +1 -1
  122. package/dist/node_modules/web3-utils/lib/esm/web3_eip1193_provider.js +5 -5
  123. package/dist/organizations.server.js +13 -27
  124. package/dist/organizations.server.mjs +13 -27
  125. package/dist/products.server.js +95 -15
  126. package/dist/products.server.mjs +95 -15
  127. package/dist/prometheus-framework/src/components/Address/Address.vue.cjs +1 -1
  128. package/dist/prometheus-framework/src/components/Address/Address.vue.js +4 -1
  129. package/dist/prometheus-framework/src/components/Breadcrumbs/Breadcrumbs.vue.cjs +1 -1
  130. package/dist/prometheus-framework/src/components/Breadcrumbs/Breadcrumbs.vue.js +4 -1
  131. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  132. package/dist/prometheus-framework/src/components/Button/Button.vue.js +4 -1
  133. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue2.cjs +1 -1
  134. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue2.js +4 -1
  135. package/dist/prometheus-framework/src/components/Chips/Chips.vue2.cjs +1 -1
  136. package/dist/prometheus-framework/src/components/Chips/Chips.vue2.js +4 -1
  137. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
  138. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +4 -1
  139. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue2.cjs +1 -1
  140. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue2.js +4 -1
  141. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
  142. package/dist/prometheus-framework/src/components/Field/Field.vue.js +4 -1
  143. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
  144. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +1 -1
  145. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue2.cjs +1 -1
  146. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue2.js +4 -1
  147. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.cjs +1 -1
  148. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.js +1 -1
  149. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue2.cjs +1 -1
  150. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue2.js +4 -1
  151. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue2.cjs +1 -1
  152. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue2.js +4 -1
  153. package/dist/prometheus-framework/src/components/FieldTags/tag-input.vue.cjs +1 -1
  154. package/dist/prometheus-framework/src/components/FieldTags/tag-input.vue.js +4 -1
  155. package/dist/prometheus-framework/src/components/FieldTags/vue-tags-input.scss.cjs +1 -1
  156. package/dist/prometheus-framework/src/components/FieldTags/vue-tags-input.scss.js +4 -1
  157. package/dist/prometheus-framework/src/components/Loader/Loader.vue.cjs +1 -1
  158. package/dist/prometheus-framework/src/components/Loader/Loader.vue.js +4 -1
  159. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +1 -1
  160. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +4 -1
  161. package/dist/prometheus-framework/src/components/Magnifier/Magnifier.vue2.cjs +1 -1
  162. package/dist/prometheus-framework/src/components/Magnifier/Magnifier.vue2.js +4 -1
  163. package/dist/prometheus-framework/src/components/Map/Map.vue.cjs +1 -1
  164. package/dist/prometheus-framework/src/components/Map/Map.vue.js +4 -1
  165. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  166. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +2 -70
  167. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  168. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +72 -1
  169. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  170. package/dist/prometheus-framework/src/components/Select/Select.vue.js +2 -95
  171. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  172. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +97 -1
  173. package/dist/prometheus-framework/src/components/SelectMulti/SelectMulti.vue.cjs +1 -1
  174. package/dist/prometheus-framework/src/components/SelectMulti/SelectMulti.vue.js +6 -6
  175. package/dist/prometheus-framework/src/components/SelectMulti/SelectMulti.vue2.cjs +1 -1
  176. package/dist/prometheus-framework/src/components/SelectMulti/SelectMulti.vue2.js +4 -1
  177. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.cjs +1 -1
  178. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.js +4 -1
  179. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
  180. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +4 -1
  181. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
  182. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +4 -1
  183. package/dist/prometheus-framework/src/components/Upload/Upload.vue.cjs +1 -1
  184. package/dist/prometheus-framework/src/components/Upload/Upload.vue.js +1 -1
  185. package/dist/prometheus-framework/src/components/Upload/Upload.vue2.cjs +1 -1
  186. package/dist/prometheus-framework/src/components/Upload/Upload.vue2.js +4 -1
  187. package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs +1 -1
  188. package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js +1 -1
  189. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
  190. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
  191. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue2.cjs +1 -1
  192. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue2.js +4 -1
  193. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  194. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +42 -30
  195. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue2.cjs +1 -1
  196. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue2.js +4 -1
  197. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue2.cjs +1 -1
  198. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue2.js +4 -1
  199. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue2.cjs +1 -1
  200. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue2.js +4 -1
  201. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue2.cjs +1 -1
  202. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue2.js +4 -1
  203. package/dist/prometheus-framework/src/modules/auth/components/sections/SliderFeatures.vue2.cjs +1 -1
  204. package/dist/prometheus-framework/src/modules/auth/components/sections/SliderFeatures.vue2.js +4 -1
  205. package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
  206. package/dist/prometheus-framework/src/modules/auth/store/auth.js +47 -46
  207. package/dist/prometheus-framework/src/modules/auth/store/invites.cjs +1 -1
  208. package/dist/prometheus-framework/src/modules/auth/store/invites.js +5 -5
  209. package/dist/prometheus-framework/src/modules/auth/store/twofa.cjs +1 -1
  210. package/dist/prometheus-framework/src/modules/auth/store/twofa.js +1 -1
  211. package/dist/prometheus-framework/src/modules/backoffice/components/layouts/Backoffice.vue2.cjs +1 -1
  212. package/dist/prometheus-framework/src/modules/backoffice/components/layouts/Backoffice.vue2.js +4 -1
  213. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  214. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  215. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  216. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  217. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue2.cjs +1 -1
  218. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue2.js +4 -1
  219. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  220. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  221. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs +1 -1
  222. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js +1 -1
  223. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue2.cjs +1 -1
  224. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue2.js +4 -1
  225. package/dist/prometheus-framework/src/modules/community/components/sections/JoinUs.vue2.cjs +1 -1
  226. package/dist/prometheus-framework/src/modules/community/components/sections/JoinUs.vue2.js +4 -1
  227. package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs +1 -1
  228. package/dist/prometheus-framework/src/modules/community/store/blogposts.js +1 -1
  229. package/dist/prometheus-framework/src/modules/community/store/reactions.cjs +1 -1
  230. package/dist/prometheus-framework/src/modules/community/store/reactions.js +1 -1
  231. package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue2.cjs +1 -1
  232. package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue2.js +4 -1
  233. package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.cjs +1 -1
  234. package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.js +1 -1
  235. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -5
  236. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +2 -65
  237. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
  238. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +66 -0
  239. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  240. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  241. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue2.cjs +1 -1
  242. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue2.js +4 -1
  243. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  244. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  245. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  246. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +4 -4
  247. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue2.cjs +1 -1
  248. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue2.js +4 -1
  249. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  250. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +2 -2
  251. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue2.cjs +1 -1
  252. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue2.js +4 -1
  253. package/dist/prometheus-framework/src/modules/events/components/sections/List.vue2.cjs +1 -1
  254. package/dist/prometheus-framework/src/modules/events/components/sections/List.vue2.js +4 -1
  255. package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue2.cjs +1 -1
  256. package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue2.js +4 -1
  257. package/dist/prometheus-framework/src/modules/events/store/events.cjs +1 -1
  258. package/dist/prometheus-framework/src/modules/events/store/events.js +1 -1
  259. package/dist/prometheus-framework/src/modules/events/store/tickets.cjs +1 -1
  260. package/dist/prometheus-framework/src/modules/events/store/tickets.js +1 -1
  261. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  262. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  263. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue2.cjs +1 -1
  264. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue2.js +4 -1
  265. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  266. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
  267. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue2.cjs +1 -1
  268. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue2.js +4 -1
  269. package/dist/prometheus-framework/src/modules/gallery/store/gallery.cjs +1 -1
  270. package/dist/prometheus-framework/src/modules/gallery/store/gallery.js +1 -1
  271. package/dist/prometheus-framework/src/modules/globals/store/globals.cjs +1 -1
  272. package/dist/prometheus-framework/src/modules/globals/store/globals.js +22 -21
  273. package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue2.cjs +1 -1
  274. package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue2.js +4 -1
  275. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  276. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  277. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue2.cjs +1 -1
  278. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue2.js +4 -1
  279. package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.cjs +1 -1
  280. package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.js +1 -1
  281. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  282. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +13 -1
  283. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  284. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +2 -11
  285. package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrder.vue.cjs +1 -1
  286. package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrder.vue.js +4 -1
  287. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue2.cjs +1 -1
  288. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue2.js +4 -1
  289. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.cjs +1 -1
  290. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.js +1 -1
  291. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
  292. package/dist/prometheus-framework/src/modules/orders/store/orders.js +1 -1
  293. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  294. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +17 -17
  295. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue2.cjs +1 -1
  296. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue2.js +4 -1
  297. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  298. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  299. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  300. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +50 -43
  301. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue2.cjs +1 -1
  302. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue2.js +4 -1
  303. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentSub.vue2.cjs +1 -1
  304. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentSub.vue2.js +4 -1
  305. package/dist/prometheus-framework/src/modules/organizations/components/blocks/EditArray.vue2.cjs +1 -1
  306. package/dist/prometheus-framework/src/modules/organizations/components/blocks/EditArray.vue2.js +4 -1
  307. package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue.cjs +1 -1
  308. package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue.js +47 -15
  309. package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue2.cjs +1 -1
  310. package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue2.js +4 -1
  311. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  312. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +38 -37
  313. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  314. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +249 -61
  315. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue2.cjs +1 -1
  316. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue2.js +4 -1
  317. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  318. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +78 -45
  319. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  320. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +161 -86
  321. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue2.cjs +1 -1
  322. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue2.js +4 -1
  323. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  324. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  325. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  326. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  327. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue2.cjs +1 -1
  328. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue2.js +4 -1
  329. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.cjs +1 -1
  330. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.js +1 -1
  331. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  332. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +52 -54
  333. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.cjs +1 -1
  334. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.js +1 -1
  335. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  336. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +19 -25
  337. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue2.cjs +1 -1
  338. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue2.js +4 -1
  339. package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue2.cjs +1 -1
  340. package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue2.js +4 -1
  341. package/dist/prometheus-framework/src/modules/organizations/components/sections/Unit.vue.cjs +1 -1
  342. package/dist/prometheus-framework/src/modules/organizations/components/sections/Unit.vue.js +4 -1
  343. package/dist/prometheus-framework/src/modules/organizations/organizations.client.cjs +1 -1
  344. package/dist/prometheus-framework/src/modules/organizations/organizations.client.js +40 -46
  345. package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
  346. package/dist/prometheus-framework/src/modules/organizations/store/departments.js +35 -31
  347. package/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -1
  348. package/dist/prometheus-framework/src/modules/organizations/store/invites.js +1 -1
  349. package/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -1
  350. package/dist/prometheus-framework/src/modules/organizations/store/memberships.js +30 -28
  351. package/dist/prometheus-framework/src/modules/organizations/store/organizations.cjs +1 -1
  352. package/dist/prometheus-framework/src/modules/organizations/store/organizations.js +1 -1
  353. package/dist/prometheus-framework/src/modules/payments/components/pages/Payments.vue2.cjs +1 -1
  354. package/dist/prometheus-framework/src/modules/payments/components/pages/Payments.vue2.js +4 -1
  355. package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue2.cjs +1 -1
  356. package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue2.js +4 -1
  357. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  358. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +17 -17
  359. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
  360. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +50 -47
  361. package/dist/prometheus-framework/src/modules/products/components/blocks/CategoryCard.vue2.cjs +1 -1
  362. package/dist/prometheus-framework/src/modules/products/components/blocks/CategoryCard.vue2.js +4 -1
  363. package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue2.cjs +1 -1
  364. package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue2.js +4 -1
  365. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  366. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  367. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue2.cjs +1 -1
  368. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue2.js +4 -1
  369. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue2.cjs +1 -1
  370. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue2.js +4 -1
  371. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue2.cjs +1 -1
  372. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue2.js +4 -1
  373. package/dist/prometheus-framework/src/modules/products/components/elements/Price.vue2.cjs +1 -1
  374. package/dist/prometheus-framework/src/modules/products/components/elements/Price.vue2.js +4 -1
  375. package/dist/prometheus-framework/src/modules/products/components/elements/THC.vue2.cjs +1 -1
  376. package/dist/prometheus-framework/src/modules/products/components/elements/THC.vue2.js +4 -1
  377. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  378. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  379. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue2.cjs +1 -1
  380. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue2.js +4 -1
  381. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue2.cjs +1 -1
  382. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue2.js +4 -1
  383. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs +1 -1
  384. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js +33 -28
  385. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue2.cjs +1 -1
  386. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue2.js +4 -1
  387. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  388. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +123 -113
  389. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue2.cjs +1 -1
  390. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue2.js +4 -1
  391. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue2.cjs +1 -1
  392. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue2.js +4 -1
  393. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  394. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  395. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue2.cjs +1 -1
  396. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue2.js +4 -1
  397. package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue2.cjs +1 -1
  398. package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue2.js +4 -1
  399. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue2.cjs +1 -1
  400. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue2.js +4 -1
  401. package/dist/prometheus-framework/src/modules/products/store/categories.cjs +1 -1
  402. package/dist/prometheus-framework/src/modules/products/store/categories.js +1 -1
  403. package/dist/prometheus-framework/src/modules/products/store/leftovers.cjs +1 -1
  404. package/dist/prometheus-framework/src/modules/products/store/leftovers.js +1 -1
  405. package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
  406. package/dist/prometheus-framework/src/modules/products/store/products.js +2 -2
  407. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  408. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  409. package/dist/prometheus-framework/src/modules/reports/store/reports.cjs +1 -1
  410. package/dist/prometheus-framework/src/modules/reports/store/reports.js +1 -1
  411. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue2.cjs +1 -1
  412. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue2.js +4 -1
  413. package/dist/prometheus-framework/src/modules/spots/store/spots.cjs +1 -1
  414. package/dist/prometheus-framework/src/modules/spots/store/spots.js +1 -1
  415. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  416. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
  417. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue2.cjs +1 -1
  418. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue2.js +4 -1
  419. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue2.cjs +1 -1
  420. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue2.js +4 -1
  421. package/dist/prometheus-framework/src/modules/users/store/users.cjs +1 -1
  422. package/dist/prometheus-framework/src/modules/users/store/users.js +1 -1
  423. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
  424. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +2 -2
  425. package/dist/prometheus-framework/src/modules/wallet/store/wallet.cjs +1 -1
  426. package/dist/prometheus-framework/src/modules/wallet/store/wallet.js +2 -2
  427. package/dist/prometheus-framework.cjs.js +1 -1
  428. package/dist/prometheus-framework.es.js +1 -1
  429. package/dist/reports.server.js +1 -1
  430. package/dist/reports.server.mjs +1 -1
  431. package/dist/style.css +1 -1
  432. package/dist/web-0410cac1.js +1 -0
  433. package/dist/web-7p76PGnO.mjs +55 -0
  434. package/dist/web-c1619455.mjs +55 -0
  435. package/dist/web-c63f0ecc.js +1 -0
  436. package/dist/web-d8173758.mjs +55 -0
  437. package/dist/web-dn8vgptQ.js +1 -0
  438. package/package.json +1 -1
  439. package/src/components/SelectMulti/SelectMulti.vue +1 -1
  440. package/src/modules/auth/components/pages/Invite.vue +17 -6
  441. package/src/modules/auth/controllers/auth.controller.js +24 -16
  442. package/src/modules/auth/controllers/invites.controller.js +17 -8
  443. package/src/modules/auth/store/auth.js +8 -1
  444. package/src/modules/auth/store/invites.js +1 -0
  445. package/src/modules/globals/store/globals.js +5 -1
  446. package/src/modules/landing/components/blocks/MapBlock.vue +37 -0
  447. package/src/modules/landing/components/pages/404.vue +3 -0
  448. package/src/modules/landing/components/pages/Governance.vue +155 -0
  449. package/src/modules/landing/components/pages/Home.vue +52 -0
  450. package/src/modules/landing/components/pages/Hotel.vue +54 -0
  451. package/src/modules/landing/components/pages/Page.vue +184 -0
  452. package/src/modules/landing/components/sections/AboutSection.vue +69 -0
  453. package/src/modules/landing/components/sections/Examples.vue +90 -0
  454. package/src/modules/landing/components/sections/FeatureSection.vue +80 -0
  455. package/src/modules/landing/components/sections/GiftSection.vue +63 -0
  456. package/src/modules/landing/components/sections/HeroSection.vue +74 -0
  457. package/src/modules/landing/components/sections/HowItWorksSection.vue +88 -0
  458. package/src/modules/landing/components/sections/HowToBuyWDR.vue +131 -0
  459. package/src/modules/landing/components/sections/InstagramSection.vue +181 -0
  460. package/src/modules/landing/components/sections/MapSection.vue +91 -0
  461. package/src/modules/landing/components/sections/SectionsSection.vue +69 -0
  462. package/src/modules/landing/components/sections/SliderFeatures.vue +131 -0
  463. package/src/modules/landing/components/sections/WhatIsWDRSection.vue +116 -0
  464. package/src/modules/landing/router/landing.js +34 -0
  465. package/src/modules/middlewares/server/verifySignUp.js +4 -0
  466. package/src/modules/organizations/components/blocks/CardDepartment.vue +3 -3
  467. package/src/modules/organizations/components/blocks/DepartmentMemberModify.vue +52 -44
  468. package/src/modules/organizations/components/blocks/User.vue +42 -10
  469. package/src/modules/organizations/components/pages/Department.vue +7 -6
  470. package/src/modules/organizations/components/pages/DepartmentEdit.vue +110 -134
  471. package/src/modules/organizations/components/pages/Members.vue +85 -26
  472. package/src/modules/organizations/components/pages/Organization.vue +60 -4
  473. package/src/modules/organizations/components/sections/MembersAdd.vue +27 -34
  474. package/src/modules/organizations/components/sections/Organizations.vue +0 -1
  475. package/src/modules/organizations/controllers/memberships.controller.js +6 -2
  476. package/src/modules/organizations/controllers/organizations.controller.js +1 -1
  477. package/src/modules/organizations/models/department.model.js +0 -19
  478. package/src/modules/organizations/models/membership.model.js +4 -0
  479. package/src/modules/organizations/organizations.client.js +1 -6
  480. package/src/modules/organizations/store/departments.js +48 -44
  481. package/src/modules/organizations/store/memberships.js +11 -3
  482. package/src/modules/products/components/blocks/CardPosition.vue +2 -2
  483. package/src/modules/products/components/blocks/CardProduct.vue +1 -1
  484. package/src/modules/products/components/pages/Product.vue +6 -1
  485. package/src/modules/products/components/pages/ProductEdit.vue +48 -28
  486. package/src/modules/products/controllers/products.controller.js +87 -24
  487. package/src/modules/products/models/product.model.js +16 -1
  488. package/src/modules/products/store/products.js +1 -1
  489. package/src/modules/users/components/pages/ProfileOrganizations.vue +41 -7
  490. package/src/modules/organizations/components/sections/FeedDepartments.vue +0 -64
  491. package/src/modules/organizations/components/sections/MembersList.vue +0 -85
  492. package/src/modules/organizations/store/invites.js +0 -93
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../web3-types/lib/esm/data_format_types.cjs");require("../../../web3-types/lib/esm/eth_types.cjs");require("../../../web3-types/lib/esm/web3_base_provider.cjs");require("../../../web3-core/lib/esm/web3_config.cjs");require("../../../web3-core/lib/esm/web3_request_manager.cjs");require("../../../web3-core/lib/esm/web3_subscription_manager.cjs");require("../../../web3-core/lib/esm/web3_subscriptions.cjs");const F=require("../../../web3-core/lib/esm/web3_context.cjs");require("../../../web3-core/lib/esm/web3_batch_request.cjs");const U=require("../../../web3-core/lib/esm/utils.cjs"),v=require("../../../web3-errors/lib/esm/errors/transaction_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");require("../../../web3-eth-iban/lib/esm/iban.cjs");require("../../../web3-validator/lib/esm/formats.cjs");require("../../../web3-validator/lib/esm/default_validator.cjs");require("../../../web3-core/lib/esm/web3_promi_event.cjs");const c=require("../../../web3-rpc-methods/lib/esm/eth_rpc_methods.cjs");require("../../../web3-rpc-methods/lib/esm/net_rpc_methods.cjs");require("../../../web3-rpc-methods/lib/esm/personal_rpc_methods.cjs");const o=require("./rpc_method_wrappers.cjs"),d=require("./web3_subscriptions.cjs"),E=require("../../../web3-utils/lib/esm/converters.cjs"),b=require("../../../web3-utils/lib/esm/validation.cjs");var n=function(_,t,i,e){function s(u){return u instanceof i?u:new i(function(a){a(u)})}return new(i||(i=Promise))(function(u,a){function T(h){try{g(e.next(h))}catch(R){a(R)}}function A(h){try{g(e.throw(h))}catch(R){a(R)}}function g(h){h.done?u(h.value):s(h.value).then(T,A)}g((e=e.apply(_,t||[])).next())})};const f={logs:d.LogsSubscription,newPendingTransactions:d.NewPendingTransactionsSubscription,newHeads:d.NewHeadsSubscription,syncing:d.SyncingSubscription,pendingTransactions:d.NewPendingTransactionsSubscription,newBlockHeaders:d.NewHeadsSubscription};class l extends F.Web3Context{constructor(t){if(typeof t=="string"||U.isSupportedProvider(t)){super({provider:t,registeredSubscriptions:f});return}if(t.registeredSubscriptions){super(t);return}super(Object.assign(Object.assign({},t),{registeredSubscriptions:f}))}getProtocolVersion(){return n(this,void 0,void 0,function*(){return c.getProtocolVersion(this.requestManager)})}isSyncing(){return n(this,void 0,void 0,function*(){return c.getSyncing(this.requestManager)})}getCoinbase(){return n(this,void 0,void 0,function*(){return c.getCoinbase(this.requestManager)})}isMining(){return n(this,void 0,void 0,function*(){return c.getMining(this.requestManager)})}getHashrate(t=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return this.getHashRate(t)})}getHashRate(t=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getHashRate(this,t)})}getGasPrice(t=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getGasPrice(this,t)})}getAccounts(){var t;return n(this,void 0,void 0,function*(){return((t=yield c.getAccounts(this.requestManager))!==null&&t!==void 0?t:[]).map(e=>E.toChecksumAddress(e))})}getBlockNumber(t=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getBlockNumber(this,t)})}getBalance(t,i=this.defaultBlock,e=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getBalance(this,t,i,e)})}getStorageAt(t,i,e=this.defaultBlock,s=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getStorageAt(this,t,i,e,s)})}getCode(t,i=this.defaultBlock,e=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getCode(this,t,i,e)})}getBlock(t=this.defaultBlock,i=!1,e=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getBlock(this,t,i,e)})}getBlockTransactionCount(t=this.defaultBlock,i=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getBlockTransactionCount(this,t,i)})}getBlockUncleCount(t=this.defaultBlock,i=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getBlockUncleCount(this,t,i)})}getUncle(t=this.defaultBlock,i,e=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getUncle(this,t,i,e)})}getTransaction(t,i=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){const e=yield o.getTransaction(this,t,i);if(!e)throw new v.TransactionNotFound;return e})}getPendingTransactions(t=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getPendingTransactions(this,t)})}getTransactionFromBlock(t=this.defaultBlock,i,e=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getTransactionFromBlock(this,t,i,e)})}getTransactionReceipt(t,i=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){const e=yield o.getTransactionReceipt(this,t,i);if(!e)throw new v.TransactionNotFound;return e})}getTransactionCount(t,i=this.defaultBlock,e=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getTransactionCount(this,t,i,e)})}sendTransaction(t,i=r.DEFAULT_RETURN_FORMAT,e){return o.sendTransaction(this,t,i,e)}sendSignedTransaction(t,i=r.DEFAULT_RETURN_FORMAT,e){return o.sendSignedTransaction(this,t,i,e)}sign(t,i,e=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.sign(this,t,i,e)})}signTransaction(t,i=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.signTransaction(this,t,i)})}call(t,i=this.defaultBlock,e=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.call(this,t,i,e)})}estimateGas(t,i=this.defaultBlock,e=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.estimateGas(this,t,i,e)})}getPastLogs(t,i=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getLogs(this,t,i)})}getWork(){return n(this,void 0,void 0,function*(){return c.getWork(this.requestManager)})}submitWork(t,i,e){return n(this,void 0,void 0,function*(){return c.submitWork(this.requestManager,t,i,e)})}requestAccounts(){return n(this,void 0,void 0,function*(){return c.requestAccounts(this.requestManager)})}getChainId(t=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getChainId(this,t)})}getNodeInfo(){return n(this,void 0,void 0,function*(){return c.getNodeInfo(this.requestManager)})}getProof(t,i,e=this.defaultBlock,s=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getProof(this,t,i,e,s)})}getFeeHistory(t,i=this.defaultBlock,e,s=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getFeeHistory(this,t,i,e,s)})}createAccessList(t,i=this.defaultBlock,e=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.createAccessList(this,t,i,e)})}signTypedData(t,i,e=!1,s=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.signTypedData(this,t,i,e,s)})}subscribe(t,i,e=r.DEFAULT_RETURN_FORMAT){var s;return n(this,void 0,void 0,function*(){const u=yield(s=this.subscriptionManager)===null||s===void 0?void 0:s.subscribe(t,i,e);return u instanceof d.LogsSubscription&&t==="logs"&&typeof i=="object"&&!b.isNullish(i.fromBlock)&&Number.isFinite(Number(i.fromBlock))&&setImmediate(()=>{this.getPastLogs(i).then(a=>{for(const T of a)u._processSubscriptionResult(T)}).catch(a=>{u._processSubscriptionError(a)})}),u})}static shouldClearSubscription({sub:t}){return!(t instanceof d.SyncingSubscription)}clearSubscriptions(t=!1){var i;return(i=this.subscriptionManager)===null||i===void 0?void 0:i.unsubscribe(t?l.shouldClearSubscription:void 0)}}exports.Web3Eth=l;exports.registeredSubscriptions=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../web3-types/lib/esm/data_format_types.cjs");require("../../../web3-types/lib/esm/eth_types.cjs");require("../../../web3-types/lib/esm/web3_base_provider.cjs");require("../../../web3-core/lib/esm/web3_config.cjs");require("../../../web3-core/lib/esm/web3_request_manager.cjs");require("../../../web3-core/lib/esm/web3_subscription_manager.cjs");require("../../../web3-core/lib/esm/web3_subscriptions.cjs");const F=require("../../../web3-core/lib/esm/web3_context.cjs");require("../../../web3-core/lib/esm/web3_batch_request.cjs");const U=require("../../../web3-core/lib/esm/utils.cjs"),v=require("../../../web3-errors/lib/esm/errors/transaction_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");require("../../../web3-eth-iban/lib/esm/iban.cjs");require("../../../web3-validator/lib/esm/formats.cjs");require("../../../web3-validator/lib/esm/default_validator.cjs");require("../../../web3-core/lib/esm/web3_promi_event.cjs");const c=require("../../../web3-rpc-methods/lib/esm/eth_rpc_methods.cjs");require("../../../web3-rpc-methods/lib/esm/net_rpc_methods.cjs");require("../../../web3-rpc-methods/lib/esm/personal_rpc_methods.cjs");const o=require("./rpc_method_wrappers.cjs"),d=require("./web3_subscriptions.cjs"),E=require("../../../web3-utils/lib/esm/converters.cjs"),b=require("../../../web3-utils/lib/esm/validation.cjs");var n=globalThis&&globalThis.__awaiter||function(_,t,i,e){function s(u){return u instanceof i?u:new i(function(a){a(u)})}return new(i||(i=Promise))(function(u,a){function T(h){try{g(e.next(h))}catch(R){a(R)}}function A(h){try{g(e.throw(h))}catch(R){a(R)}}function g(h){h.done?u(h.value):s(h.value).then(T,A)}g((e=e.apply(_,t||[])).next())})};const l={logs:d.LogsSubscription,newPendingTransactions:d.NewPendingTransactionsSubscription,newHeads:d.NewHeadsSubscription,syncing:d.SyncingSubscription,pendingTransactions:d.NewPendingTransactionsSubscription,newBlockHeaders:d.NewHeadsSubscription};class f extends F.Web3Context{constructor(t){if(typeof t=="string"||U.isSupportedProvider(t)){super({provider:t,registeredSubscriptions:l});return}if(t.registeredSubscriptions){super(t);return}super(Object.assign(Object.assign({},t),{registeredSubscriptions:l}))}getProtocolVersion(){return n(this,void 0,void 0,function*(){return c.getProtocolVersion(this.requestManager)})}isSyncing(){return n(this,void 0,void 0,function*(){return c.getSyncing(this.requestManager)})}getCoinbase(){return n(this,void 0,void 0,function*(){return c.getCoinbase(this.requestManager)})}isMining(){return n(this,void 0,void 0,function*(){return c.getMining(this.requestManager)})}getHashrate(t=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return this.getHashRate(t)})}getHashRate(t=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getHashRate(this,t)})}getGasPrice(t=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getGasPrice(this,t)})}getAccounts(){var t;return n(this,void 0,void 0,function*(){return((t=yield c.getAccounts(this.requestManager))!==null&&t!==void 0?t:[]).map(e=>E.toChecksumAddress(e))})}getBlockNumber(t=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getBlockNumber(this,t)})}getBalance(t,i=this.defaultBlock,e=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getBalance(this,t,i,e)})}getStorageAt(t,i,e=this.defaultBlock,s=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getStorageAt(this,t,i,e,s)})}getCode(t,i=this.defaultBlock,e=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getCode(this,t,i,e)})}getBlock(t=this.defaultBlock,i=!1,e=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getBlock(this,t,i,e)})}getBlockTransactionCount(t=this.defaultBlock,i=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getBlockTransactionCount(this,t,i)})}getBlockUncleCount(t=this.defaultBlock,i=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getBlockUncleCount(this,t,i)})}getUncle(t=this.defaultBlock,i,e=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getUncle(this,t,i,e)})}getTransaction(t,i=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){const e=yield o.getTransaction(this,t,i);if(!e)throw new v.TransactionNotFound;return e})}getPendingTransactions(t=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getPendingTransactions(this,t)})}getTransactionFromBlock(t=this.defaultBlock,i,e=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getTransactionFromBlock(this,t,i,e)})}getTransactionReceipt(t,i=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){const e=yield o.getTransactionReceipt(this,t,i);if(!e)throw new v.TransactionNotFound;return e})}getTransactionCount(t,i=this.defaultBlock,e=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getTransactionCount(this,t,i,e)})}sendTransaction(t,i=r.DEFAULT_RETURN_FORMAT,e){return o.sendTransaction(this,t,i,e)}sendSignedTransaction(t,i=r.DEFAULT_RETURN_FORMAT,e){return o.sendSignedTransaction(this,t,i,e)}sign(t,i,e=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.sign(this,t,i,e)})}signTransaction(t,i=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.signTransaction(this,t,i)})}call(t,i=this.defaultBlock,e=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.call(this,t,i,e)})}estimateGas(t,i=this.defaultBlock,e=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.estimateGas(this,t,i,e)})}getPastLogs(t,i=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getLogs(this,t,i)})}getWork(){return n(this,void 0,void 0,function*(){return c.getWork(this.requestManager)})}submitWork(t,i,e){return n(this,void 0,void 0,function*(){return c.submitWork(this.requestManager,t,i,e)})}requestAccounts(){return n(this,void 0,void 0,function*(){return c.requestAccounts(this.requestManager)})}getChainId(t=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getChainId(this,t)})}getNodeInfo(){return n(this,void 0,void 0,function*(){return c.getNodeInfo(this.requestManager)})}getProof(t,i,e=this.defaultBlock,s=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getProof(this,t,i,e,s)})}getFeeHistory(t,i=this.defaultBlock,e,s=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.getFeeHistory(this,t,i,e,s)})}createAccessList(t,i=this.defaultBlock,e=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.createAccessList(this,t,i,e)})}signTypedData(t,i,e=!1,s=r.DEFAULT_RETURN_FORMAT){return n(this,void 0,void 0,function*(){return o.signTypedData(this,t,i,e,s)})}subscribe(t,i,e=r.DEFAULT_RETURN_FORMAT){var s;return n(this,void 0,void 0,function*(){const u=yield(s=this.subscriptionManager)===null||s===void 0?void 0:s.subscribe(t,i,e);return u instanceof d.LogsSubscription&&t==="logs"&&typeof i=="object"&&!b.isNullish(i.fromBlock)&&Number.isFinite(Number(i.fromBlock))&&setImmediate(()=>{this.getPastLogs(i).then(a=>{for(const T of a)u._processSubscriptionResult(T)}).catch(a=>{u._processSubscriptionError(a)})}),u})}static shouldClearSubscription({sub:t}){return!(t instanceof d.SyncingSubscription)}clearSubscriptions(t=!1){var i;return(i=this.subscriptionManager)===null||i===void 0?void 0:i.unsubscribe(t?f.shouldClearSubscription:void 0)}}exports.Web3Eth=f;exports.registeredSubscriptions=l;
@@ -8,7 +8,7 @@ import "../../../web3-core/lib/esm/web3_subscriptions.js";
8
8
  import { Web3Context as T } from "../../../web3-core/lib/esm/web3_context.js";
9
9
  import "../../../web3-core/lib/esm/web3_batch_request.js";
10
10
  import { isSupportedProvider as S } from "../../../web3-core/lib/esm/utils.js";
11
- import { TransactionNotFound as f } from "../../../web3-errors/lib/esm/errors/transaction_errors.js";
11
+ import { TransactionNotFound as g } from "../../../web3-errors/lib/esm/errors/transaction_errors.js";
12
12
  import "../../../web3-errors/lib/esm/errors/rpc_errors.js";
13
13
  import "../../../web3-eth-iban/lib/esm/iban.js";
14
14
  import "../../../web3-validator/lib/esm/formats.js";
@@ -18,10 +18,10 @@ import { getProtocolVersion as y, getSyncing as w, getCoinbase as M, getMining a
18
18
  import "../../../web3-rpc-methods/lib/esm/net_rpc_methods.js";
19
19
  import "../../../web3-rpc-methods/lib/esm/personal_rpc_methods.js";
20
20
  import { getHashRate as H, getGasPrice as R, getBlockNumber as F, getBalance as L, getStorageAt as U, getCode as I, getBlock as W, getBlockTransactionCount as G, getBlockUncleCount as j, getUncle as D, getTransaction as E, getPendingTransactions as x, getTransactionFromBlock as V, getTransactionReceipt as z, getTransactionCount as J, sendTransaction as K, sendSignedTransaction as Q, sign as X, signTransaction as Y, call as Z, estimateGas as $, getLogs as O, getChainId as tt, getProof as it, getFeeHistory as nt, createAccessList as et, signTypedData as rt } from "./rpc_method_wrappers.js";
21
- import { LogsSubscription as p, NewPendingTransactionsSubscription as g, NewHeadsSubscription as l, SyncingSubscription as m } from "./web3_subscriptions.js";
21
+ import { LogsSubscription as p, NewPendingTransactionsSubscription as f, NewHeadsSubscription as l, SyncingSubscription as m } from "./web3_subscriptions.js";
22
22
  import { toChecksumAddress as ot } from "../../../web3-utils/lib/esm/converters.js";
23
23
  import { isNullish as st } from "../../../web3-utils/lib/esm/validation.js";
24
- var e = function(k, t, i, n) {
24
+ var e = globalThis && globalThis.__awaiter || function(k, t, i, n) {
25
25
  function o(s) {
26
26
  return s instanceof i ? s : new i(function(u) {
27
27
  u(s);
@@ -50,10 +50,10 @@ var e = function(k, t, i, n) {
50
50
  };
51
51
  const v = {
52
52
  logs: p,
53
- newPendingTransactions: g,
53
+ newPendingTransactions: f,
54
54
  newHeads: l,
55
55
  syncing: m,
56
- pendingTransactions: g,
56
+ pendingTransactions: f,
57
57
  newBlockHeaders: l
58
58
  // the same as newHeads. just for support API like in version 1.x
59
59
  };
@@ -535,7 +535,7 @@ class b extends T {
535
535
  return e(this, void 0, void 0, function* () {
536
536
  const n = yield E(this, t, i);
537
537
  if (!n)
538
- throw new f();
538
+ throw new g();
539
539
  return n;
540
540
  });
541
541
  }
@@ -729,7 +729,7 @@ class b extends T {
729
729
  return e(this, void 0, void 0, function* () {
730
730
  const n = yield z(this, t, i);
731
731
  if (!n)
732
- throw new f();
732
+ throw new g();
733
733
  return n;
734
734
  });
735
735
  }
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const U=require("../../../ethereum-cryptography/esm/aes.cjs"),C=require("../../../ethereum-cryptography/esm/pbkdf2.cjs"),N=require("../../../ethereum-cryptography/esm/scrypt.cjs"),v=require("../../../web3-errors/lib/esm/errors/account_errors.cjs"),b=require("../../../web3-errors/lib/esm/errors/transaction_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");require("../../../web3-validator/lib/esm/formats.cjs");const A=require("../../../web3-validator/lib/esm/validation/string.cjs"),_=require("../../../web3-validator/lib/esm/default_validator.cjs");require("../../../web3-types/lib/esm/data_format_types.cjs");require("../../../web3-types/lib/esm/eth_types.cjs");require("../../../web3-types/lib/esm/web3_base_provider.cjs");const f=require("../../../web3-validator/lib/esm/validation/object.cjs"),w=require("./tx/constants.cjs"),j=require("./schemas.cjs"),D=require("./tx/transactionFactory.cjs"),s=require("../../../web3-utils/lib/esm/converters.cjs"),g=require("../../../web3-utils/lib/esm/hash.cjs"),P=require("../../../web3-utils/lib/esm/random.cjs"),z=require("../../../web3-utils/lib/esm/uuid.cjs"),T=require("../../../web3-utils/lib/esm/uint8array.cjs");var m=function(r,n,e,t){function i(c){return c instanceof e?c:new e(function(a){a(c)})}return new(e||(e=Promise))(function(c,a){function y(l){try{o(t.next(l))}catch(d){a(d)}}function u(l){try{o(t.throw(l))}catch(d){a(d)}}function o(l){l.done?c(l.value):i(l.value).then(y,u)}o((t=t.apply(r,n||[])).next())})};const p=(r,n)=>{let e;if(!n&&typeof r=="string"&&A.isHexStrict(r)&&r.length!==66)throw new v.PrivateKeyLengthError;try{e=T.isUint8Array(r)?r:s.bytesToUint8Array(r)}catch{throw new v.InvalidPrivateKeyError}if(!n&&e.byteLength!==32)throw new v.PrivateKeyLengthError;return e},H=r=>{const n=A.isHexStrict(r)?r:s.utf8ToHex(r),e=s.hexToBytes(n),t=s.hexToBytes(s.fromUtf8(`Ethereum Signed Message:
2
- ${e.byteLength}`)),i=T.uint8ArrayConcat(t,e);return g.sha3Raw(i)},I=(r,n)=>{const e=p(n),t=H(r),i=w.secp256k1.sign(t.substring(2),e),c=i.toCompactRawBytes(),a=i.r.toString(16).padStart(64,"0"),y=i.s.toString(16).padStart(64,"0"),u=i.recovery+27;return{message:r,messageHash:t,v:s.numberToHex(u),r:`0x${a}`,s:`0x${y}`,signature:`${s.bytesToHex(c)}${u.toString(16)}`}},F=(r,n)=>m(void 0,void 0,void 0,function*(){const e=r.sign(s.hexToBytes(n));if(f.isNullish(e.v)||f.isNullish(e.r)||f.isNullish(e.s))throw new b.TransactionSigningError("Signer Error");const t=e.validate(!0);if(t.length>0){let a="Signer Error ";for(const y of t)a+=`${a} ${y}.`;throw new b.TransactionSigningError(a)}const i=s.bytesToHex(e.serialize()),c=g.sha3Raw(i);return{messageHash:s.bytesToHex(e.getMessageToSign(!0)),v:`0x${e.v.toString(16)}`,r:`0x${e.r.toString(16).padStart(64,"0")}`,s:`0x${e.s.toString(16).padStart(64,"0")}`,rawTransaction:i,transactionHash:s.bytesToHex(c)}}),J=r=>{if(f.isNullish(r))throw new b.UndefinedRawTransactionError;const n=D.TransactionFactory.fromSerializedData(s.hexToBytes(r));return s.toChecksumAddress(n.getSenderAddress().toString())},k=(r,n,e,t,i)=>{if(typeof r=="object"){const d=`${r.r}${r.s.slice(2)}${r.v.slice(2)}`;return k(r.messageHash,d,e)}if(typeof n=="string"&&typeof e=="string"&&!f.isNullish(t)){const d=`${e}${t.slice(2)}${n.slice(2)}`;return k(r,d,i)}if(f.isNullish(n))throw new v.InvalidSignatureError("signature string undefined");const c=130,a=e?r:H(r);let y=parseInt(n.substring(c),16);y>26&&(y-=27);const u=w.secp256k1.Signature.fromCompact(n.slice(2,c)).addRecoveryBit(y).recoverPublicKey(a.replace("0x","")).toRawBytes(!1),o=g.sha3Raw(u.subarray(1));return s.toChecksumAddress(`0x${o.slice(-40)}`)},q=r=>{const n=p(r),e=w.secp256k1.getPublicKey(n,!1),i=g.sha3Raw(e.slice(1)).slice(-40);return s.toChecksumAddress(`0x${i}`)},V=(r,n)=>{const e=p(r);return`0x${s.bytesToHex(w.secp256k1.getPublicKey(e,n)).slice(4)}`},M=(r,n,e)=>m(void 0,void 0,void 0,function*(){var t,i,c,a,y,u,o;const l=p(r);let d;if(e!=null&&e.salt?d=typeof e.salt=="string"?s.hexToBytes(e.salt):e.salt:d=P.randomBytes(32),!(A.isString(n)||T.isUint8Array(n)))throw new v.InvalidPasswordError;const E=typeof n=="string"?s.hexToBytes(s.utf8ToHex(n)):n;let x;if(e!=null&&e.iv){if(x=typeof e.iv=="string"?s.hexToBytes(e.iv):e.iv,x.length!==16)throw new v.IVLengthError}else x=P.randomBytes(16);const K=(t=e==null?void 0:e.kdf)!==null&&t!==void 0?t:"scrypt";let S,h;if(K==="pbkdf2"){if(h={dklen:(i=e==null?void 0:e.dklen)!==null&&i!==void 0?i:32,salt:s.bytesToHex(d).replace("0x",""),c:(c=e==null?void 0:e.c)!==null&&c!==void 0?c:262144,prf:"hmac-sha256"},h.c<1e3)throw new v.PBKDF2IterationsError;S=C.pbkdf2Sync(E,d,h.c,h.dklen,"sha256")}else if(K==="scrypt")h={n:(a=e==null?void 0:e.n)!==null&&a!==void 0?a:8192,r:(y=e==null?void 0:e.r)!==null&&y!==void 0?y:8,p:(u=e==null?void 0:e.p)!==null&&u!==void 0?u:1,dklen:(o=e==null?void 0:e.dklen)!==null&&o!==void 0?o:32,salt:s.bytesToHex(d).replace("0x","")},S=N.scryptSync(E,d,h.n,h.p,h.r,h.dklen);else throw new v.InvalidKdfError;const $=yield U.encrypt(l,S.slice(0,16),x,"aes-128-ctr"),R=s.bytesToHex($).slice(2),L=g.sha3Raw(T.uint8ArrayConcat(S.slice(16,32),$)).replace("0x","");return{version:3,id:z.uuidV4(),address:q(l).toLowerCase().replace("0x",""),crypto:{ciphertext:R,cipherparams:{iv:s.bytesToHex(x).replace("0x","")},cipher:"aes-128-ctr",kdf:K,kdfparams:h,mac:L}}}),B=(r,n)=>{const e=p(r,n);return{address:q(e),privateKey:s.bytesToHex(e),signTransaction:t=>{throw new b.TransactionSigningError("Do not have network access to sign the transaction")},sign:t=>I(typeof t=="string"?t:JSON.stringify(t),e),encrypt:(t,i)=>m(void 0,void 0,void 0,function*(){return M(e,t,i)})}},X=()=>{const r=w.secp256k1.utils.randomPrivateKey();return B(`${s.bytesToHex(r)}`)},G=(r,n,e)=>m(void 0,void 0,void 0,function*(){const t=typeof r=="object"?r:JSON.parse(e?r.toLowerCase():r);if(_.validator.validateJSONSchema(j.keyStoreSchema,t),t.version!==3)throw new v.KeyStoreVersionError;const i=typeof n=="string"?s.hexToBytes(s.utf8ToHex(n)):n;_.validator.validate(["bytes"],[i]);let c;if(t.crypto.kdf==="scrypt"){const o=t.crypto.kdfparams,l=typeof o.salt=="string"?s.hexToBytes(o.salt):o.salt;c=N.scryptSync(i,l,o.n,o.p,o.r,o.dklen)}else if(t.crypto.kdf==="pbkdf2"){const o=t.crypto.kdfparams,l=typeof o.salt=="string"?s.hexToBytes(o.salt):o.salt;c=C.pbkdf2Sync(i,l,o.c,o.dklen,"sha256")}else throw new v.InvalidKdfError;const a=s.hexToBytes(t.crypto.ciphertext);if(g.sha3Raw(T.uint8ArrayConcat(c.slice(16,32),a)).replace("0x","")!==t.crypto.mac)throw new v.KeyDerivationError;const u=yield U.decrypt(s.hexToBytes(t.crypto.ciphertext),c.slice(0,16),s.hexToBytes(t.crypto.cipherparams.iv));return B(u)});exports.create=X;exports.decrypt=G;exports.encrypt=M;exports.hashMessage=H;exports.parseAndValidatePrivateKey=p;exports.privateKeyToAccount=B;exports.privateKeyToAddress=q;exports.privateKeyToPublicKey=V;exports.recover=k;exports.recoverTransaction=J;exports.sign=I;exports.signTransaction=F;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const U=require("../../../ethereum-cryptography/esm/aes.cjs"),C=require("../../../ethereum-cryptography/esm/pbkdf2.cjs"),N=require("../../../ethereum-cryptography/esm/scrypt.cjs"),v=require("../../../web3-errors/lib/esm/errors/account_errors.cjs"),S=require("../../../web3-errors/lib/esm/errors/transaction_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");require("../../../web3-validator/lib/esm/formats.cjs");const A=require("../../../web3-validator/lib/esm/validation/string.cjs"),_=require("../../../web3-validator/lib/esm/default_validator.cjs");require("../../../web3-types/lib/esm/data_format_types.cjs");require("../../../web3-types/lib/esm/eth_types.cjs");require("../../../web3-types/lib/esm/web3_base_provider.cjs");const f=require("../../../web3-validator/lib/esm/validation/object.cjs"),w=require("./tx/constants.cjs"),j=require("./schemas.cjs"),D=require("./tx/transactionFactory.cjs"),n=require("../../../web3-utils/lib/esm/converters.cjs"),g=require("../../../web3-utils/lib/esm/hash.cjs"),P=require("../../../web3-utils/lib/esm/random.cjs"),z=require("../../../web3-utils/lib/esm/uuid.cjs"),T=require("../../../web3-utils/lib/esm/uint8array.cjs");var m=globalThis&&globalThis.__awaiter||function(r,s,e,t){function i(c){return c instanceof e?c:new e(function(a){a(c)})}return new(e||(e=Promise))(function(c,a){function y(l){try{o(t.next(l))}catch(d){a(d)}}function u(l){try{o(t.throw(l))}catch(d){a(d)}}function o(l){l.done?c(l.value):i(l.value).then(y,u)}o((t=t.apply(r,s||[])).next())})};const p=(r,s)=>{let e;if(!s&&typeof r=="string"&&A.isHexStrict(r)&&r.length!==66)throw new v.PrivateKeyLengthError;try{e=T.isUint8Array(r)?r:n.bytesToUint8Array(r)}catch{throw new v.InvalidPrivateKeyError}if(!s&&e.byteLength!==32)throw new v.PrivateKeyLengthError;return e},H=r=>{const s=A.isHexStrict(r)?r:n.utf8ToHex(r),e=n.hexToBytes(s),t=n.hexToBytes(n.fromUtf8(`Ethereum Signed Message:
2
+ ${e.byteLength}`)),i=T.uint8ArrayConcat(t,e);return g.sha3Raw(i)},I=(r,s)=>{const e=p(s),t=H(r),i=w.secp256k1.sign(t.substring(2),e),c=i.toCompactRawBytes(),a=i.r.toString(16).padStart(64,"0"),y=i.s.toString(16).padStart(64,"0"),u=i.recovery+27;return{message:r,messageHash:t,v:n.numberToHex(u),r:`0x${a}`,s:`0x${y}`,signature:`${n.bytesToHex(c)}${u.toString(16)}`}},F=(r,s)=>m(void 0,void 0,void 0,function*(){const e=r.sign(n.hexToBytes(s));if(f.isNullish(e.v)||f.isNullish(e.r)||f.isNullish(e.s))throw new S.TransactionSigningError("Signer Error");const t=e.validate(!0);if(t.length>0){let a="Signer Error ";for(const y of t)a+=`${a} ${y}.`;throw new S.TransactionSigningError(a)}const i=n.bytesToHex(e.serialize()),c=g.sha3Raw(i);return{messageHash:n.bytesToHex(e.getMessageToSign(!0)),v:`0x${e.v.toString(16)}`,r:`0x${e.r.toString(16).padStart(64,"0")}`,s:`0x${e.s.toString(16).padStart(64,"0")}`,rawTransaction:i,transactionHash:n.bytesToHex(c)}}),J=r=>{if(f.isNullish(r))throw new S.UndefinedRawTransactionError;const s=D.TransactionFactory.fromSerializedData(n.hexToBytes(r));return n.toChecksumAddress(s.getSenderAddress().toString())},k=(r,s,e,t,i)=>{if(typeof r=="object"){const d=`${r.r}${r.s.slice(2)}${r.v.slice(2)}`;return k(r.messageHash,d,e)}if(typeof s=="string"&&typeof e=="string"&&!f.isNullish(t)){const d=`${e}${t.slice(2)}${s.slice(2)}`;return k(r,d,i)}if(f.isNullish(s))throw new v.InvalidSignatureError("signature string undefined");const c=130,a=e?r:H(r);let y=parseInt(s.substring(c),16);y>26&&(y-=27);const u=w.secp256k1.Signature.fromCompact(s.slice(2,c)).addRecoveryBit(y).recoverPublicKey(a.replace("0x","")).toRawBytes(!1),o=g.sha3Raw(u.subarray(1));return n.toChecksumAddress(`0x${o.slice(-40)}`)},q=r=>{const s=p(r),e=w.secp256k1.getPublicKey(s,!1),i=g.sha3Raw(e.slice(1)).slice(-40);return n.toChecksumAddress(`0x${i}`)},V=(r,s)=>{const e=p(r);return`0x${n.bytesToHex(w.secp256k1.getPublicKey(e,s)).slice(4)}`},M=(r,s,e)=>m(void 0,void 0,void 0,function*(){var t,i,c,a,y,u,o;const l=p(r);let d;if(e!=null&&e.salt?d=typeof e.salt=="string"?n.hexToBytes(e.salt):e.salt:d=P.randomBytes(32),!(A.isString(s)||T.isUint8Array(s)))throw new v.InvalidPasswordError;const E=typeof s=="string"?n.hexToBytes(n.utf8ToHex(s)):s;let x;if(e!=null&&e.iv){if(x=typeof e.iv=="string"?n.hexToBytes(e.iv):e.iv,x.length!==16)throw new v.IVLengthError}else x=P.randomBytes(16);const K=(t=e==null?void 0:e.kdf)!==null&&t!==void 0?t:"scrypt";let b,h;if(K==="pbkdf2"){if(h={dklen:(i=e==null?void 0:e.dklen)!==null&&i!==void 0?i:32,salt:n.bytesToHex(d).replace("0x",""),c:(c=e==null?void 0:e.c)!==null&&c!==void 0?c:262144,prf:"hmac-sha256"},h.c<1e3)throw new v.PBKDF2IterationsError;b=C.pbkdf2Sync(E,d,h.c,h.dklen,"sha256")}else if(K==="scrypt")h={n:(a=e==null?void 0:e.n)!==null&&a!==void 0?a:8192,r:(y=e==null?void 0:e.r)!==null&&y!==void 0?y:8,p:(u=e==null?void 0:e.p)!==null&&u!==void 0?u:1,dklen:(o=e==null?void 0:e.dklen)!==null&&o!==void 0?o:32,salt:n.bytesToHex(d).replace("0x","")},b=N.scryptSync(E,d,h.n,h.p,h.r,h.dklen);else throw new v.InvalidKdfError;const $=yield U.encrypt(l,b.slice(0,16),x,"aes-128-ctr"),R=n.bytesToHex($).slice(2),L=g.sha3Raw(T.uint8ArrayConcat(b.slice(16,32),$)).replace("0x","");return{version:3,id:z.uuidV4(),address:q(l).toLowerCase().replace("0x",""),crypto:{ciphertext:R,cipherparams:{iv:n.bytesToHex(x).replace("0x","")},cipher:"aes-128-ctr",kdf:K,kdfparams:h,mac:L}}}),B=(r,s)=>{const e=p(r,s);return{address:q(e),privateKey:n.bytesToHex(e),signTransaction:t=>{throw new S.TransactionSigningError("Do not have network access to sign the transaction")},sign:t=>I(typeof t=="string"?t:JSON.stringify(t),e),encrypt:(t,i)=>m(void 0,void 0,void 0,function*(){return M(e,t,i)})}},X=()=>{const r=w.secp256k1.utils.randomPrivateKey();return B(`${n.bytesToHex(r)}`)},G=(r,s,e)=>m(void 0,void 0,void 0,function*(){const t=typeof r=="object"?r:JSON.parse(e?r.toLowerCase():r);if(_.validator.validateJSONSchema(j.keyStoreSchema,t),t.version!==3)throw new v.KeyStoreVersionError;const i=typeof s=="string"?n.hexToBytes(n.utf8ToHex(s)):s;_.validator.validate(["bytes"],[i]);let c;if(t.crypto.kdf==="scrypt"){const o=t.crypto.kdfparams,l=typeof o.salt=="string"?n.hexToBytes(o.salt):o.salt;c=N.scryptSync(i,l,o.n,o.p,o.r,o.dklen)}else if(t.crypto.kdf==="pbkdf2"){const o=t.crypto.kdfparams,l=typeof o.salt=="string"?n.hexToBytes(o.salt):o.salt;c=C.pbkdf2Sync(i,l,o.c,o.dklen,"sha256")}else throw new v.InvalidKdfError;const a=n.hexToBytes(t.crypto.ciphertext);if(g.sha3Raw(T.uint8ArrayConcat(c.slice(16,32),a)).replace("0x","")!==t.crypto.mac)throw new v.KeyDerivationError;const u=yield U.decrypt(n.hexToBytes(t.crypto.ciphertext),c.slice(0,16),n.hexToBytes(t.crypto.cipherparams.iv));return B(u)});exports.create=X;exports.decrypt=G;exports.encrypt=M;exports.hashMessage=H;exports.parseAndValidatePrivateKey=p;exports.privateKeyToAccount=B;exports.privateKeyToAddress=q;exports.privateKeyToPublicKey=V;exports.recover=k;exports.recoverTransaction=J;exports.sign=I;exports.signTransaction=F;
@@ -14,12 +14,12 @@ import { isNullish as p } from "../../../web3-validator/lib/esm/validation/objec
14
14
  import { secp256k1 as g } from "./tx/constants.js";
15
15
  import { keyStoreSchema as rr } from "./schemas.js";
16
16
  import { TransactionFactory as tr } from "./tx/transactionFactory.js";
17
- import { bytesToUint8Array as er, utf8ToHex as $, hexToBytes as y, fromUtf8 as nr, numberToHex as ir, bytesToHex as v, toChecksumAddress as k } from "../../../web3-utils/lib/esm/converters.js";
17
+ import { bytesToUint8Array as er, utf8ToHex as $, hexToBytes as y, fromUtf8 as nr, numberToHex as ir, bytesToHex as f, toChecksumAddress as k } from "../../../web3-utils/lib/esm/converters.js";
18
18
  import { sha3Raw as m } from "../../../web3-utils/lib/esm/hash.js";
19
19
  import { randomBytes as P } from "../../../web3-utils/lib/esm/random.js";
20
20
  import { uuidV4 as or } from "../../../web3-utils/lib/esm/uuid.js";
21
- import { isUint8Array as L, uint8ArrayConcat as A } from "../../../web3-utils/lib/esm/uint8array.js";
22
- var x = function(t, n, r, e) {
21
+ import { isUint8Array as L, uint8ArrayConcat as T } from "../../../web3-utils/lib/esm/uint8array.js";
22
+ var x = globalThis && globalThis.__awaiter || function(t, n, r, e) {
23
23
  function i(s) {
24
24
  return s instanceof r ? s : new r(function(c) {
25
25
  c(s);
@@ -33,7 +33,7 @@ var x = function(t, n, r, e) {
33
33
  c(d);
34
34
  }
35
35
  }
36
- function f(a) {
36
+ function v(a) {
37
37
  try {
38
38
  o(e.throw(a));
39
39
  } catch (d) {
@@ -41,7 +41,7 @@ var x = function(t, n, r, e) {
41
41
  }
42
42
  }
43
43
  function o(a) {
44
- a.done ? s(a.value) : i(a.value).then(l, f);
44
+ a.done ? s(a.value) : i(a.value).then(l, v);
45
45
  }
46
46
  o((e = e.apply(t, n || [])).next());
47
47
  });
@@ -60,17 +60,17 @@ const w = (t, n) => {
60
60
  return r;
61
61
  }, M = (t) => {
62
62
  const n = D(t) ? t : $(t), r = y(n), e = y(nr(`Ethereum Signed Message:
63
- ${r.byteLength}`)), i = A(e, r);
63
+ ${r.byteLength}`)), i = T(e, r);
64
64
  return m(i);
65
65
  }, sr = (t, n) => {
66
- const r = w(n), e = M(t), i = g.sign(e.substring(2), r), s = i.toCompactRawBytes(), c = i.r.toString(16).padStart(64, "0"), l = i.s.toString(16).padStart(64, "0"), f = i.recovery + 27;
66
+ const r = w(n), e = M(t), i = g.sign(e.substring(2), r), s = i.toCompactRawBytes(), c = i.r.toString(16).padStart(64, "0"), l = i.s.toString(16).padStart(64, "0"), v = i.recovery + 27;
67
67
  return {
68
68
  message: t,
69
69
  messageHash: e,
70
- v: ir(f),
70
+ v: ir(v),
71
71
  r: `0x${c}`,
72
72
  s: `0x${l}`,
73
- signature: `${v(s)}${f.toString(16)}`
73
+ signature: `${f(s)}${v.toString(16)}`
74
74
  };
75
75
  }, _r = (t, n) => x(void 0, void 0, void 0, function* () {
76
76
  const r = t.sign(y(n));
@@ -83,14 +83,14 @@ ${r.byteLength}`)), i = A(e, r);
83
83
  c += `${c} ${l}.`;
84
84
  throw new b(c);
85
85
  }
86
- const i = v(r.serialize()), s = m(i);
86
+ const i = f(r.serialize()), s = m(i);
87
87
  return {
88
- messageHash: v(r.getMessageToSign(!0)),
88
+ messageHash: f(r.getMessageToSign(!0)),
89
89
  v: `0x${r.v.toString(16)}`,
90
90
  r: `0x${r.r.toString(16).padStart(64, "0")}`,
91
91
  s: `0x${r.s.toString(16).padStart(64, "0")}`,
92
92
  rawTransaction: i,
93
- transactionHash: v(s)
93
+ transactionHash: f(s)
94
94
  };
95
95
  }), Hr = (t) => {
96
96
  if (p(t))
@@ -111,21 +111,21 @@ ${r.byteLength}`)), i = A(e, r);
111
111
  const s = 130, c = r ? t : M(t);
112
112
  let l = parseInt(n.substring(s), 16);
113
113
  l > 26 && (l -= 27);
114
- const f = g.Signature.fromCompact(n.slice(2, s)).addRecoveryBit(l).recoverPublicKey(c.replace("0x", "")).toRawBytes(!1), o = m(f.subarray(1));
114
+ const v = g.Signature.fromCompact(n.slice(2, s)).addRecoveryBit(l).recoverPublicKey(c.replace("0x", "")).toRawBytes(!1), o = m(v.subarray(1));
115
115
  return k(`0x${o.slice(-40)}`);
116
116
  }, N = (t) => {
117
117
  const n = w(t), r = g.getPublicKey(n, !1), i = m(r.slice(1)).slice(-40);
118
118
  return k(`0x${i}`);
119
119
  }, Pr = (t, n) => {
120
120
  const r = w(t);
121
- return `0x${v(g.getPublicKey(r, n)).slice(4)}`;
121
+ return `0x${f(g.getPublicKey(r, n)).slice(4)}`;
122
122
  }, cr = (t, n, r) => x(void 0, void 0, void 0, function* () {
123
- var e, i, s, c, l, f, o;
123
+ var e, i, s, c, l, v, o;
124
124
  const a = w(t);
125
125
  let d;
126
126
  if (r != null && r.salt ? d = typeof r.salt == "string" ? y(r.salt) : r.salt : d = P(32), !(O(n) || L(n)))
127
127
  throw new q();
128
- const E = typeof n == "string" ? y($(n)) : n;
128
+ const A = typeof n == "string" ? y($(n)) : n;
129
129
  let h;
130
130
  if (r != null && r.iv) {
131
131
  if (h = typeof r.iv == "string" ? y(r.iv) : r.iv, h.length !== 16)
@@ -137,23 +137,23 @@ ${r.byteLength}`)), i = A(e, r);
137
137
  if (K === "pbkdf2") {
138
138
  if (u = {
139
139
  dklen: (i = r == null ? void 0 : r.dklen) !== null && i !== void 0 ? i : 32,
140
- salt: v(d).replace("0x", ""),
140
+ salt: f(d).replace("0x", ""),
141
141
  c: (s = r == null ? void 0 : r.c) !== null && s !== void 0 ? s : 262144,
142
142
  prf: "hmac-sha256"
143
143
  }, u.c < 1e3)
144
144
  throw new Q();
145
- S = B(E, d, u.c, u.dklen, "sha256");
145
+ S = B(A, d, u.c, u.dklen, "sha256");
146
146
  } else if (K === "scrypt")
147
147
  u = {
148
148
  n: (c = r == null ? void 0 : r.n) !== null && c !== void 0 ? c : 8192,
149
149
  r: (l = r == null ? void 0 : r.r) !== null && l !== void 0 ? l : 8,
150
- p: (f = r == null ? void 0 : r.p) !== null && f !== void 0 ? f : 1,
150
+ p: (v = r == null ? void 0 : r.p) !== null && v !== void 0 ? v : 1,
151
151
  dklen: (o = r == null ? void 0 : r.dklen) !== null && o !== void 0 ? o : 32,
152
- salt: v(d).replace("0x", "")
153
- }, S = I(E, d, u.n, u.p, u.r, u.dklen);
152
+ salt: f(d).replace("0x", "")
153
+ }, S = I(A, d, u.n, u.p, u.r, u.dklen);
154
154
  else
155
155
  throw new C();
156
- const T = yield F(a, S.slice(0, 16), h, "aes-128-ctr"), z = v(T).slice(2), J = m(A(S.slice(16, 32), T)).replace("0x", "");
156
+ const E = yield F(a, S.slice(0, 16), h, "aes-128-ctr"), z = f(E).slice(2), J = m(T(S.slice(16, 32), E)).replace("0x", "");
157
157
  return {
158
158
  version: 3,
159
159
  id: or(),
@@ -161,7 +161,7 @@ ${r.byteLength}`)), i = A(e, r);
161
161
  crypto: {
162
162
  ciphertext: z,
163
163
  cipherparams: {
164
- iv: v(h).replace("0x", "")
164
+ iv: f(h).replace("0x", "")
165
165
  },
166
166
  cipher: "aes-128-ctr",
167
167
  kdf: K,
@@ -173,7 +173,7 @@ ${r.byteLength}`)), i = A(e, r);
173
173
  const r = w(t, n);
174
174
  return {
175
175
  address: N(r),
176
- privateKey: v(r),
176
+ privateKey: f(r),
177
177
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
178
178
  signTransaction: (e) => {
179
179
  throw new b("Do not have network access to sign the transaction");
@@ -185,7 +185,7 @@ ${r.byteLength}`)), i = A(e, r);
185
185
  };
186
186
  }, Ur = () => {
187
187
  const t = g.utils.randomPrivateKey();
188
- return j(`${v(t)}`);
188
+ return j(`${f(t)}`);
189
189
  }, Br = (t, n, r) => x(void 0, void 0, void 0, function* () {
190
190
  const e = typeof t == "object" ? t : JSON.parse(r ? t.toLowerCase() : t);
191
191
  if (H.validateJSONSchema(rr, e), e.version !== 3)
@@ -202,10 +202,10 @@ ${r.byteLength}`)), i = A(e, r);
202
202
  } else
203
203
  throw new C();
204
204
  const c = y(e.crypto.ciphertext);
205
- if (m(A(s.slice(16, 32), c)).replace("0x", "") !== e.crypto.mac)
205
+ if (m(T(s.slice(16, 32), c)).replace("0x", "") !== e.crypto.mac)
206
206
  throw new Y();
207
- const f = yield R(y(e.crypto.ciphertext), s.slice(0, 16), y(e.crypto.cipherparams.iv));
208
- return j(f);
207
+ const v = yield R(y(e.crypto.ciphertext), s.slice(0, 16), y(e.crypto.cipherparams.iv));
208
+ return j(v);
209
209
  });
210
210
  export {
211
211
  Ur as create,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../../web3-types/lib/esm/data_format_types.cjs");require("../../../web3-types/lib/esm/eth_types.cjs");require("../../../web3-types/lib/esm/web3_base_provider.cjs");const _=require("../../../web3-types/lib/esm/web3_base_wallet.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");require("../../../web3-validator/lib/esm/formats.cjs");require("../../../web3-validator/lib/esm/default_validator.cjs");const l=require("../../../web3-validator/lib/esm/validation/object.cjs");var n=function(h,e,t,r){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function f(o){try{d(r.next(o))}catch(c){a(c)}}function p(o){try{d(r.throw(o))}catch(c){a(c)}}function d(o){o.done?i(o.value):s(o.value).then(f,p)}d((r=r.apply(h,e||[])).next())})};class u extends _.Web3BaseWallet{constructor(){super(...arguments),this._addressMap=new Map,this._defaultKeyName="web3js_wallet"}static getStorage(){let e;try{e=window.localStorage;const t="__storage_test__";return e.setItem(t,t),e.removeItem(t),e}catch(t){return t&&(t.code===22||t.code===1014||t.name==="QuotaExceededError"||t.name==="NS_ERROR_DOM_QUOTA_REACHED")&&!l.isNullish(e)&&e.length!==0?e:void 0}}create(e){for(let t=0;t<e;t+=1)this.add(this._accountProvider.create());return this}add(e){var t;if(typeof e=="string")return this.add(this._accountProvider.privateKeyToAccount(e));let r=this.length;return this.get(e.address)&&(console.warn(`Account ${e.address.toLowerCase()} already exists.`),r=(t=this._addressMap.get(e.address.toLowerCase()))!==null&&t!==void 0?t:r),this._addressMap.set(e.address.toLowerCase(),r),this[r]=e,this}get(e){if(typeof e=="string"){const t=this._addressMap.get(e.toLowerCase());return l.isNullish(t)?void 0:this[t]}return this[e]}remove(e){if(typeof e=="string"){const t=this._addressMap.get(e.toLowerCase());return l.isNullish(t)?!1:(this._addressMap.delete(e.toLowerCase()),this.splice(t,1),!0)}return this[e]?(this.splice(e,1),!0):!1}clear(){return this._addressMap.clear(),this.length=0,this}encrypt(e,t){return n(this,void 0,void 0,function*(){return Promise.all(this.map(r=>n(this,void 0,void 0,function*(){return r.encrypt(e,t)})))})}decrypt(e,t,r){return n(this,void 0,void 0,function*(){const s=yield Promise.all(e.map(i=>n(this,void 0,void 0,function*(){return this._accountProvider.decrypt(i,t,r)})));for(const i of s)this.add(i);return this})}save(e,t){return n(this,void 0,void 0,function*(){const r=u.getStorage();if(!r)throw new Error("Local storage not available.");return r.setItem(t??this._defaultKeyName,JSON.stringify(yield this.encrypt(e))),!0})}load(e,t){return n(this,void 0,void 0,function*(){const r=u.getStorage();if(!r)throw new Error("Local storage not available.");const s=r.getItem(t??this._defaultKeyName);return s&&(yield this.decrypt(JSON.parse(s)||[],e)),this})}}exports.Wallet=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../../web3-types/lib/esm/data_format_types.cjs");require("../../../web3-types/lib/esm/eth_types.cjs");require("../../../web3-types/lib/esm/web3_base_provider.cjs");const g=require("../../../web3-types/lib/esm/web3_base_wallet.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");require("../../../web3-validator/lib/esm/formats.cjs");require("../../../web3-validator/lib/esm/default_validator.cjs");const c=require("../../../web3-validator/lib/esm/validation/object.cjs");var n=globalThis&&globalThis.__awaiter||function(h,e,t,r){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function f(o){try{l(r.next(o))}catch(d){a(d)}}function p(o){try{l(r.throw(o))}catch(d){a(d)}}function l(o){o.done?i(o.value):s(o.value).then(f,p)}l((r=r.apply(h,e||[])).next())})};class u extends g.Web3BaseWallet{constructor(){super(...arguments),this._addressMap=new Map,this._defaultKeyName="web3js_wallet"}static getStorage(){let e;try{e=window.localStorage;const t="__storage_test__";return e.setItem(t,t),e.removeItem(t),e}catch(t){return t&&(t.code===22||t.code===1014||t.name==="QuotaExceededError"||t.name==="NS_ERROR_DOM_QUOTA_REACHED")&&!c.isNullish(e)&&e.length!==0?e:void 0}}create(e){for(let t=0;t<e;t+=1)this.add(this._accountProvider.create());return this}add(e){var t;if(typeof e=="string")return this.add(this._accountProvider.privateKeyToAccount(e));let r=this.length;return this.get(e.address)&&(console.warn(`Account ${e.address.toLowerCase()} already exists.`),r=(t=this._addressMap.get(e.address.toLowerCase()))!==null&&t!==void 0?t:r),this._addressMap.set(e.address.toLowerCase(),r),this[r]=e,this}get(e){if(typeof e=="string"){const t=this._addressMap.get(e.toLowerCase());return c.isNullish(t)?void 0:this[t]}return this[e]}remove(e){if(typeof e=="string"){const t=this._addressMap.get(e.toLowerCase());return c.isNullish(t)?!1:(this._addressMap.delete(e.toLowerCase()),this.splice(t,1),!0)}return this[e]?(this.splice(e,1),!0):!1}clear(){return this._addressMap.clear(),this.length=0,this}encrypt(e,t){return n(this,void 0,void 0,function*(){return Promise.all(this.map(r=>n(this,void 0,void 0,function*(){return r.encrypt(e,t)})))})}decrypt(e,t,r){return n(this,void 0,void 0,function*(){const s=yield Promise.all(e.map(i=>n(this,void 0,void 0,function*(){return this._accountProvider.decrypt(i,t,r)})));for(const i of s)this.add(i);return this})}save(e,t){return n(this,void 0,void 0,function*(){const r=u.getStorage();if(!r)throw new Error("Local storage not available.");return r.setItem(t??this._defaultKeyName,JSON.stringify(yield this.encrypt(e))),!0})}load(e,t){return n(this,void 0,void 0,function*(){const r=u.getStorage();if(!r)throw new Error("Local storage not available.");const s=r.getItem(t??this._defaultKeyName);return s&&(yield this.decrypt(JSON.parse(s)||[],e)),this})}}exports.Wallet=u;
@@ -1,12 +1,12 @@
1
1
  import "../../../web3-types/lib/esm/data_format_types.js";
2
2
  import "../../../web3-types/lib/esm/eth_types.js";
3
3
  import "../../../web3-types/lib/esm/web3_base_provider.js";
4
- import { Web3BaseWallet as v } from "../../../web3-types/lib/esm/web3_base_wallet.js";
4
+ import { Web3BaseWallet as g } from "../../../web3-types/lib/esm/web3_base_wallet.js";
5
5
  import "../../../web3-errors/lib/esm/errors/rpc_errors.js";
6
6
  import "../../../web3-validator/lib/esm/formats.js";
7
7
  import "../../../web3-validator/lib/esm/default_validator.js";
8
8
  import { isNullish as c } from "../../../web3-validator/lib/esm/validation/object.js";
9
- var n = function(l, e, t, r) {
9
+ var n = globalThis && globalThis.__awaiter || function(l, e, t, r) {
10
10
  function o(i) {
11
11
  return i instanceof t ? i : new t(function(a) {
12
12
  a(i);
@@ -33,7 +33,7 @@ var n = function(l, e, t, r) {
33
33
  d((r = r.apply(l, e || [])).next());
34
34
  });
35
35
  };
36
- class h extends v {
36
+ class h extends g {
37
37
  constructor() {
38
38
  super(...arguments), this._addressMap = /* @__PURE__ */ new Map(), this._defaultKeyName = "web3js_wallet";
39
39
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("../../../web3-core/lib/esm/web3_config.cjs");require("../../../web3-core/lib/esm/web3_request_manager.cjs");require("../../../web3-core/lib/esm/web3_subscription_manager.cjs");require("../../../web3-core/lib/esm/web3_subscriptions.cjs");const D=require("../../../web3-core/lib/esm/web3_context.cjs");require("../../../web3-core/lib/esm/web3_batch_request.cjs");const v=require("../../../web3-types/lib/esm/data_format_types.cjs"),G=require("../../../web3-types/lib/esm/eth_types.cjs");require("../../../web3-types/lib/esm/web3_base_provider.cjs");const A=require("../../../web3-errors/lib/esm/errors/contract_errors.cjs"),N=require("../../../web3-errors/lib/esm/errors/provider_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");require("../../../web3-eth-iban/lib/esm/iban.cjs");const V=require("../../../web3-validator/lib/esm/errors.cjs");require("../../../web3-validator/lib/esm/formats.cjs");const H=require("../../../web3-validator/lib/esm/utils.cjs"),U=require("../../../web3-validator/lib/esm/default_validator.cjs"),I=require("../../../web3-validator/lib/esm/validation/object.cjs");require("../../../web3-core/lib/esm/web3_promi_event.cjs");require("../../../setimmediate/setImmediate.cjs");require("../../../web3-eth/lib/esm/web3_eth.cjs");const $=require("../../../web3-eth/lib/esm/utils/decoding.cjs");require("../../../web3-eth/lib/esm/schemas.cjs");const w=require("../../../web3-eth/lib/esm/constants.cjs"),T=require("../../../web3-eth/lib/esm/rpc_method_wrappers.cjs");require("../../../web3-eth/lib/esm/utils/prepare_transaction_for_signing.cjs");const P=require("../../../web3-eth/lib/esm/web3_subscriptions.cjs");require("../../../web3-eth/lib/esm/utils/transaction_builder.cjs");const j=require("../../../web3-eth-abi/lib/esm/utils.cjs"),k=require("../../../web3-eth-abi/lib/esm/api/events_api.cjs"),J=require("../../../web3-eth-abi/lib/esm/api/functions_api.cjs");require("../../../web3-eth-abi/lib/esm/coders/base/number.cjs");const L=require("../../../web3-eth-abi/lib/esm/decode_contract_error_data.cjs"),F=require("./encoding.cjs"),x=require("./log_subscription.cjs"),m=require("./utils.cjs"),b=require("../../../web3-utils/lib/esm/formatter.cjs"),W=require("../../../web3-utils/lib/esm/validation.cjs"),O=require("../../../web3-utils/lib/esm/hash.cjs"),K=require("../../../web3-utils/lib/esm/converters.cjs");var E=function(B,t,n,s){function c(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function r(d){try{e(s.next(d))}catch(h){i(h)}}function a(d){try{e(s.throw(d))}catch(h){i(h)}}function e(d){d.done?o(d.value):c(d.value).then(r,a)}e((s=s.apply(B,t||[])).next())})};const z={logs:x.LogsSubscription,newHeads:P.NewHeadsSubscription,newBlockHeaders:P.NewHeadsSubscription};class M extends D.Web3Context{constructor(t,n,s,c,o){var i,r,a;const e=W.isContractInitOptions(n)?n:W.isContractInitOptions(s)?s:void 0;let d;m.isWeb3ContractContext(n)?d=n:m.isWeb3ContractContext(s)?d=s:d=c;let h;if(typeof n=="object"&&"provider"in n?h=n.provider:typeof s=="object"&&"provider"in s?h=s.provider:typeof c=="object"&&"provider"in c?h=c.provider:h=M.givenProvider,super(Object.assign(Object.assign({},d),{provider:h,registeredSubscriptions:z})),this.syncWithContext=!1,this._functions={},d!=null&&d.wallet&&(this._wallet=d.wallet),d!=null&&d.accountProvider&&(this._accountProvider=d.accountProvider),!I.isNullish(e)&&!I.isNullish(e.data)&&!I.isNullish(e.input)&&this.config.contractDataInputFill!=="both")throw new A.ContractTransactionDataAndInputError({data:e.data,input:e.input});this._overloadedMethodAbis=new Map;const u=b.isDataFormat(c)?c:b.isDataFormat(s)?s:o??v.DEFAULT_RETURN_FORMAT,l=typeof n=="string"?n:void 0;this.config.contractDataInputFill=(i=e==null?void 0:e.dataInputFill)!==null&&i!==void 0?i:this.config.contractDataInputFill,this._parseAndSetJsonInterface(t,u),I.isNullish(l)||this._parseAndSetAddress(l,u),this.options={address:l,jsonInterface:this._jsonInterface,gas:(r=e==null?void 0:e.gas)!==null&&r!==void 0?r:e==null?void 0:e.gasLimit,gasPrice:e==null?void 0:e.gasPrice,from:e==null?void 0:e.from,input:e==null?void 0:e.input,data:e==null?void 0:e.data},this.syncWithContext=(a=e==null?void 0:e.syncWithContext)!==null&&a!==void 0?a:!1,d instanceof D.Web3Context&&this.subscribeToContextEvents(d),Object.defineProperty(this.options,"address",{set:f=>this._parseAndSetAddress(f,u),get:()=>this._address}),Object.defineProperty(this.options,"jsonInterface",{set:f=>this._parseAndSetJsonInterface(f,u),get:()=>this._jsonInterface}),d instanceof D.Web3Context&&d.on(R.Web3ConfigEvent.CONFIG_CHANGE,f=>{this.setConfig({[f.name]:f.newValue})})}get events(){return this._events}get methods(){return this._methods}clone(){let t;return this.options.address?t=new M([...this._jsonInterface,...this._errorsInterface],this.options.address,{gas:this.options.gas,gasPrice:this.options.gasPrice,from:this.options.from,input:this.options.input,data:this.options.data,provider:this.currentProvider,syncWithContext:this.syncWithContext,dataInputFill:this.config.contractDataInputFill},this.getContextObject()):t=new M([...this._jsonInterface,...this._errorsInterface],{gas:this.options.gas,gasPrice:this.options.gasPrice,from:this.options.from,input:this.options.input,data:this.options.data,provider:this.currentProvider,syncWithContext:this.syncWithContext,dataInputFill:this.config.contractDataInputFill},this.getContextObject()),this.context&&t.subscribeToContextEvents(this.context),t}deploy(t){var n,s,c;let o=this._jsonInterface.find(h=>h.type==="constructor");o||(o={type:"constructor",stateMutability:""});const i=b.format({format:"bytes"},(n=t==null?void 0:t.input)!==null&&n!==void 0?n:this.options.input,v.DEFAULT_RETURN_FORMAT),r=b.format({format:"bytes"},(s=t==null?void 0:t.data)!==null&&s!==void 0?s:this.options.data,v.DEFAULT_RETURN_FORMAT);if((!i||i.trim()==="0x")&&(!r||r.trim()==="0x"))throw new A.Web3ContractError("contract creation without any data provided.");const a=(c=t==null?void 0:t.arguments)!==null&&c!==void 0?c:[],e=Object.assign(Object.assign({},this.options),{input:i,data:r}),d=i??r;return{arguments:a,send:h=>{const u=Object.assign({},h);return this._contractMethodDeploySend(o,a,u,e)},estimateGas:(h,u=v.DEFAULT_RETURN_FORMAT)=>E(this,void 0,void 0,function*(){const l=Object.assign({},h);return this._contractMethodEstimateGas({abi:o,params:a,returnFormat:u,options:l,contractOptions:e})}),encodeABI:()=>F.encodeMethodABI(o,a,b.format({format:"bytes"},d,v.DEFAULT_RETURN_FORMAT))}}getPastEvents(t,n,s){var c;return E(this,void 0,void 0,function*(){const o=typeof t=="string"?t:w.ALL_EVENTS,i=typeof t!="string"&&!b.isDataFormat(t)?t:b.isDataFormat(n)?{}:n,r=b.isDataFormat(t)?t:b.isDataFormat(n)?n:s??v.DEFAULT_RETURN_FORMAT,a=o==="allEvents"||o===w.ALL_EVENTS?w.ALL_EVENTS_ABI:this._jsonInterface.find(g=>"name"in g&&g.name===o);if(!a)throw new A.Web3ContractError(`Event ${o} not found.`);const{fromBlock:e,toBlock:d,topics:h,address:u}=F.encodeEventABI(this.options,a,i??{}),l=yield T.getLogs(this,{fromBlock:e,toBlock:d,topics:h,address:u},r),f=l?l.map(g=>typeof g=="string"?g:$.decodeEventABI(a,g,this._jsonInterface,r)):[],_=(c=i==null?void 0:i.filter)!==null&&c!==void 0?c:{},C=Object.keys(_);return C.length>0?f.filter(g=>typeof g=="string"?!0:C.every(p=>{var q;if(Array.isArray(_[p]))return _[p].some(y=>String(g.returnValues[p]).toUpperCase()===String(y).toUpperCase());const S=(q=a.inputs)===null||q===void 0?void 0:q.filter(y=>y.name===p)[0];return S!=null&&S.indexed&&S.type==="string"&&O.keccak256Wrapper(_[p])===String(g.returnValues[p])?!0:String(g.returnValues[p]).toUpperCase()===String(_[p]).toUpperCase()})):f})}_parseAndSetAddress(t,n=v.DEFAULT_RETURN_FORMAT){this._address=t&&K.toChecksumAddress(b.format({format:"address"},t,n))}_parseAndSetJsonInterface(t,n=v.DEFAULT_RETURN_FORMAT){var s,c,o,i,r;this._functions={},this._methods={},this._events={};let a=[];const e=t.filter(h=>h.type!=="error"),d=t.filter(h=>j.isAbiErrorFragment(h));for(const h of e){const u=Object.assign(Object.assign({},h),{signature:""});if(j.isAbiFunctionFragment(u)){const l=j.jsonInterfaceMethodToString(u),f=J.encodeFunctionSignature(l);u.signature=f,u.constant=(c=(s=u.stateMutability==="view")!==null&&s!==void 0?s:u.stateMutability==="pure")!==null&&c!==void 0?c:u.constant,u.payable=(o=u.stateMutability==="payable")!==null&&o!==void 0?o:u.payable,this._overloadedMethodAbis.set(u.name,[...(i=this._overloadedMethodAbis.get(u.name))!==null&&i!==void 0?i:[],u]);const _=(r=this._overloadedMethodAbis.get(u.name))!==null&&r!==void 0?r:[],C=this._createContractMethod(_,d);this._functions[l]={signature:f,method:C},this._methods[u.name]=this._functions[l].method,this._methods[l]=this._functions[l].method,this._methods[f]=this._functions[l].method}else if(j.isAbiEventFragment(u)){const l=j.jsonInterfaceMethodToString(u),f=k.encodeEventSignature(l),_=this._createContractEvent(u,n);u.signature=f,(!(l in this._events)||u.name==="bound")&&(this._events[l]=_),this._events[u.name]=_,this._events[f]=_}a=[...a,u]}this._events.allEvents=this._createContractEvent(w.ALL_EVENTS_ABI,n),this._jsonInterface=[...a],this._errorsInterface=d}_getAbiParams(t,n){var s;try{return H.transformJsonDataToAbiFormat((s=t.inputs)!==null&&s!==void 0?s:[],n)}catch(c){throw new A.Web3ContractError(`Invalid parameters for method ${t.name}: ${c.message}`)}}_createContractMethod(t,n){const s=t[t.length-1];return(...c)=>{var o,i;let r;const a=(o=this._overloadedMethodAbis.get(s.name))!==null&&o!==void 0?o:[];let e=a[0];const d=n,h=a.filter(l=>{var f;return((f=l.inputs)!==null&&f!==void 0?f:[]).length===c.length});if(a.length===1||h.length===0)r=this._getAbiParams(e,c),U.validator.validate((i=s.inputs)!==null&&i!==void 0?i:[],r);else{const l=[];for(const f of h)try{r=this._getAbiParams(f,c),U.validator.validate(f.inputs,r),e=f;break}catch(_){l.push(_)}if(l.length===h.length)throw new V.Web3ValidatorError(l)}const u={arguments:r,call:(l,f)=>E(this,void 0,void 0,function*(){return this._contractMethodCall(e,r,d,l,f)}),send:l=>this._contractMethodSend(e,r,d,l),estimateGas:(l,f=v.DEFAULT_RETURN_FORMAT)=>E(this,void 0,void 0,function*(){return this._contractMethodEstimateGas({abi:e,params:r,returnFormat:f,options:l})}),encodeABI:()=>F.encodeMethodABI(e,r),createAccessList:(l,f)=>E(this,void 0,void 0,function*(){return this._contractMethodCreateAccessList(e,r,d,l,f)})};return e.stateMutability==="payable",u}}_contractMethodCall(t,n,s,c,o){var i;return E(this,void 0,void 0,function*(){const r=m.getEthTxCallParams({abi:t,params:n,options:Object.assign(Object.assign({},c),{dataInputFill:this.config.contractDataInputFill}),contractOptions:Object.assign(Object.assign({},this.options),{from:(i=this.options.from)!==null&&i!==void 0?i:this.config.defaultAccount})});try{const a=yield T.call(this,r,o,v.DEFAULT_RETURN_FORMAT);return F.decodeMethodReturn(t,a)}catch(a){throw a instanceof A.ContractExecutionError&&L.decodeContractErrorData(s,a.cause),a}})}_contractMethodCreateAccessList(t,n,s,c,o){var i;return E(this,void 0,void 0,function*(){const r=m.getCreateAccessListParams({abi:t,params:n,options:Object.assign(Object.assign({},c),{dataInputFill:this.config.contractDataInputFill}),contractOptions:Object.assign(Object.assign({},this.options),{from:(i=this.options.from)!==null&&i!==void 0?i:this.config.defaultAccount})});try{return T.createAccessList(this,r,o,v.DEFAULT_RETURN_FORMAT)}catch(a){throw a instanceof A.ContractExecutionError&&L.decodeContractErrorData(s,a.cause),a}})}_contractMethodSend(t,n,s,c,o){var i,r;let a=o??this.options;a=Object.assign(Object.assign({},a),{input:void 0,from:(r=(i=a.from)!==null&&i!==void 0?i:this.defaultAccount)!==null&&r!==void 0?r:void 0});const e=m.getSendTxParams({abi:t,params:n,options:Object.assign(Object.assign({},c),{dataInputFill:this.config.contractDataInputFill}),contractOptions:a}),d=T.sendTransaction(this,e,v.DEFAULT_RETURN_FORMAT,{checkRevertBeforeSending:!1,contractAbi:this._jsonInterface});return d.on("error",h=>{h instanceof A.ContractExecutionError&&L.decodeContractErrorData(s,h.cause)}),d}_contractMethodDeploySend(t,n,s,c){var o,i;let r=c??this.options;r=Object.assign(Object.assign({},r),{from:(i=(o=r.from)!==null&&o!==void 0?o:this.defaultAccount)!==null&&i!==void 0?i:void 0});const a=m.getSendTxParams({abi:t,params:n,options:Object.assign(Object.assign({},s),{dataInputFill:this.config.contractDataInputFill}),contractOptions:r});return T.sendTransaction(this,a,v.DEFAULT_RETURN_FORMAT,{transactionResolver:e=>{if(e.status===BigInt(0))throw new A.Web3ContractError("code couldn't be stored",e);const d=this.clone();return d.options.address=e.contractAddress,d},contractAbi:this._jsonInterface,checkRevertBeforeSending:!1})}_contractMethodEstimateGas({abi:t,params:n,returnFormat:s,options:c,contractOptions:o}){return E(this,void 0,void 0,function*(){const i=m.getEstimateGasParams({abi:t,params:n,options:Object.assign(Object.assign({},c),{dataInputFill:this.config.contractDataInputFill}),contractOptions:o??this.options});return T.estimateGas(this,i,G.BlockTags.LATEST,s)})}_createContractEvent(t,n=v.DEFAULT_RETURN_FORMAT){return(...s)=>{var c;const{topics:o,fromBlock:i}=F.encodeEventABI(this.options,t,s[0]),r=new x.LogsSubscription({address:this.options.address,topics:o,abi:t,jsonInterface:this._jsonInterface},{subscriptionManager:this.subscriptionManager,returnFormat:n});return I.isNullish(i)||this.getPastEvents(t.name,{fromBlock:i,topics:o},n).then(a=>{a&&a.forEach(e=>r.emit("data",e))}).catch(a=>{r.emit("error",new N.SubscriptionError("Failed to get past events.",a))}),(c=this.subscriptionManager)===null||c===void 0||c.addSubscription(r).catch(a=>{r.emit("error",new N.SubscriptionError("Failed to subscribe.",a))}),r}}subscribeToContextEvents(t){const n=this;this.context=t,n.syncWithContext&&t.on(R.Web3ConfigEvent.CONFIG_CHANGE,s=>{n.setConfig({[s.name]:s.newValue})})}}exports.Contract=M;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("../../../web3-core/lib/esm/web3_config.cjs");require("../../../web3-core/lib/esm/web3_request_manager.cjs");require("../../../web3-core/lib/esm/web3_subscription_manager.cjs");require("../../../web3-core/lib/esm/web3_subscriptions.cjs");const D=require("../../../web3-core/lib/esm/web3_context.cjs");require("../../../web3-core/lib/esm/web3_batch_request.cjs");const v=require("../../../web3-types/lib/esm/data_format_types.cjs"),G=require("../../../web3-types/lib/esm/eth_types.cjs");require("../../../web3-types/lib/esm/web3_base_provider.cjs");const A=require("../../../web3-errors/lib/esm/errors/contract_errors.cjs"),N=require("../../../web3-errors/lib/esm/errors/provider_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");require("../../../web3-eth-iban/lib/esm/iban.cjs");const V=require("../../../web3-validator/lib/esm/errors.cjs");require("../../../web3-validator/lib/esm/formats.cjs");const H=require("../../../web3-validator/lib/esm/utils.cjs"),U=require("../../../web3-validator/lib/esm/default_validator.cjs"),I=require("../../../web3-validator/lib/esm/validation/object.cjs");require("../../../web3-core/lib/esm/web3_promi_event.cjs");require("../../../setimmediate/setImmediate.cjs");require("../../../web3-eth/lib/esm/web3_eth.cjs");const $=require("../../../web3-eth/lib/esm/utils/decoding.cjs");require("../../../web3-eth/lib/esm/schemas.cjs");const w=require("../../../web3-eth/lib/esm/constants.cjs"),T=require("../../../web3-eth/lib/esm/rpc_method_wrappers.cjs");require("../../../web3-eth/lib/esm/utils/prepare_transaction_for_signing.cjs");const P=require("../../../web3-eth/lib/esm/web3_subscriptions.cjs");require("../../../web3-eth/lib/esm/utils/transaction_builder.cjs");const j=require("../../../web3-eth-abi/lib/esm/utils.cjs"),k=require("../../../web3-eth-abi/lib/esm/api/events_api.cjs"),J=require("../../../web3-eth-abi/lib/esm/api/functions_api.cjs");require("../../../web3-eth-abi/lib/esm/coders/base/number.cjs");const L=require("../../../web3-eth-abi/lib/esm/decode_contract_error_data.cjs"),F=require("./encoding.cjs"),x=require("./log_subscription.cjs"),m=require("./utils.cjs"),b=require("../../../web3-utils/lib/esm/formatter.cjs"),W=require("../../../web3-utils/lib/esm/validation.cjs"),O=require("../../../web3-utils/lib/esm/hash.cjs"),K=require("../../../web3-utils/lib/esm/converters.cjs");var E=globalThis&&globalThis.__awaiter||function(B,t,n,s){function c(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function r(d){try{e(s.next(d))}catch(h){i(h)}}function a(d){try{e(s.throw(d))}catch(h){i(h)}}function e(d){d.done?o(d.value):c(d.value).then(r,a)}e((s=s.apply(B,t||[])).next())})};const z={logs:x.LogsSubscription,newHeads:P.NewHeadsSubscription,newBlockHeaders:P.NewHeadsSubscription};class M extends D.Web3Context{constructor(t,n,s,c,o){var i,r,a;const e=W.isContractInitOptions(n)?n:W.isContractInitOptions(s)?s:void 0;let d;m.isWeb3ContractContext(n)?d=n:m.isWeb3ContractContext(s)?d=s:d=c;let h;if(typeof n=="object"&&"provider"in n?h=n.provider:typeof s=="object"&&"provider"in s?h=s.provider:typeof c=="object"&&"provider"in c?h=c.provider:h=M.givenProvider,super(Object.assign(Object.assign({},d),{provider:h,registeredSubscriptions:z})),this.syncWithContext=!1,this._functions={},d!=null&&d.wallet&&(this._wallet=d.wallet),d!=null&&d.accountProvider&&(this._accountProvider=d.accountProvider),!I.isNullish(e)&&!I.isNullish(e.data)&&!I.isNullish(e.input)&&this.config.contractDataInputFill!=="both")throw new A.ContractTransactionDataAndInputError({data:e.data,input:e.input});this._overloadedMethodAbis=new Map;const u=b.isDataFormat(c)?c:b.isDataFormat(s)?s:o??v.DEFAULT_RETURN_FORMAT,l=typeof n=="string"?n:void 0;this.config.contractDataInputFill=(i=e==null?void 0:e.dataInputFill)!==null&&i!==void 0?i:this.config.contractDataInputFill,this._parseAndSetJsonInterface(t,u),I.isNullish(l)||this._parseAndSetAddress(l,u),this.options={address:l,jsonInterface:this._jsonInterface,gas:(r=e==null?void 0:e.gas)!==null&&r!==void 0?r:e==null?void 0:e.gasLimit,gasPrice:e==null?void 0:e.gasPrice,from:e==null?void 0:e.from,input:e==null?void 0:e.input,data:e==null?void 0:e.data},this.syncWithContext=(a=e==null?void 0:e.syncWithContext)!==null&&a!==void 0?a:!1,d instanceof D.Web3Context&&this.subscribeToContextEvents(d),Object.defineProperty(this.options,"address",{set:f=>this._parseAndSetAddress(f,u),get:()=>this._address}),Object.defineProperty(this.options,"jsonInterface",{set:f=>this._parseAndSetJsonInterface(f,u),get:()=>this._jsonInterface}),d instanceof D.Web3Context&&d.on(R.Web3ConfigEvent.CONFIG_CHANGE,f=>{this.setConfig({[f.name]:f.newValue})})}get events(){return this._events}get methods(){return this._methods}clone(){let t;return this.options.address?t=new M([...this._jsonInterface,...this._errorsInterface],this.options.address,{gas:this.options.gas,gasPrice:this.options.gasPrice,from:this.options.from,input:this.options.input,data:this.options.data,provider:this.currentProvider,syncWithContext:this.syncWithContext,dataInputFill:this.config.contractDataInputFill},this.getContextObject()):t=new M([...this._jsonInterface,...this._errorsInterface],{gas:this.options.gas,gasPrice:this.options.gasPrice,from:this.options.from,input:this.options.input,data:this.options.data,provider:this.currentProvider,syncWithContext:this.syncWithContext,dataInputFill:this.config.contractDataInputFill},this.getContextObject()),this.context&&t.subscribeToContextEvents(this.context),t}deploy(t){var n,s,c;let o=this._jsonInterface.find(h=>h.type==="constructor");o||(o={type:"constructor",stateMutability:""});const i=b.format({format:"bytes"},(n=t==null?void 0:t.input)!==null&&n!==void 0?n:this.options.input,v.DEFAULT_RETURN_FORMAT),r=b.format({format:"bytes"},(s=t==null?void 0:t.data)!==null&&s!==void 0?s:this.options.data,v.DEFAULT_RETURN_FORMAT);if((!i||i.trim()==="0x")&&(!r||r.trim()==="0x"))throw new A.Web3ContractError("contract creation without any data provided.");const a=(c=t==null?void 0:t.arguments)!==null&&c!==void 0?c:[],e=Object.assign(Object.assign({},this.options),{input:i,data:r}),d=i??r;return{arguments:a,send:h=>{const u=Object.assign({},h);return this._contractMethodDeploySend(o,a,u,e)},estimateGas:(h,u=v.DEFAULT_RETURN_FORMAT)=>E(this,void 0,void 0,function*(){const l=Object.assign({},h);return this._contractMethodEstimateGas({abi:o,params:a,returnFormat:u,options:l,contractOptions:e})}),encodeABI:()=>F.encodeMethodABI(o,a,b.format({format:"bytes"},d,v.DEFAULT_RETURN_FORMAT))}}getPastEvents(t,n,s){var c;return E(this,void 0,void 0,function*(){const o=typeof t=="string"?t:w.ALL_EVENTS,i=typeof t!="string"&&!b.isDataFormat(t)?t:b.isDataFormat(n)?{}:n,r=b.isDataFormat(t)?t:b.isDataFormat(n)?n:s??v.DEFAULT_RETURN_FORMAT,a=o==="allEvents"||o===w.ALL_EVENTS?w.ALL_EVENTS_ABI:this._jsonInterface.find(g=>"name"in g&&g.name===o);if(!a)throw new A.Web3ContractError(`Event ${o} not found.`);const{fromBlock:e,toBlock:d,topics:h,address:u}=F.encodeEventABI(this.options,a,i??{}),l=yield T.getLogs(this,{fromBlock:e,toBlock:d,topics:h,address:u},r),f=l?l.map(g=>typeof g=="string"?g:$.decodeEventABI(a,g,this._jsonInterface,r)):[],_=(c=i==null?void 0:i.filter)!==null&&c!==void 0?c:{},C=Object.keys(_);return C.length>0?f.filter(g=>typeof g=="string"?!0:C.every(p=>{var q;if(Array.isArray(_[p]))return _[p].some(y=>String(g.returnValues[p]).toUpperCase()===String(y).toUpperCase());const S=(q=a.inputs)===null||q===void 0?void 0:q.filter(y=>y.name===p)[0];return S!=null&&S.indexed&&S.type==="string"&&O.keccak256Wrapper(_[p])===String(g.returnValues[p])?!0:String(g.returnValues[p]).toUpperCase()===String(_[p]).toUpperCase()})):f})}_parseAndSetAddress(t,n=v.DEFAULT_RETURN_FORMAT){this._address=t&&K.toChecksumAddress(b.format({format:"address"},t,n))}_parseAndSetJsonInterface(t,n=v.DEFAULT_RETURN_FORMAT){var s,c,o,i,r;this._functions={},this._methods={},this._events={};let a=[];const e=t.filter(h=>h.type!=="error"),d=t.filter(h=>j.isAbiErrorFragment(h));for(const h of e){const u=Object.assign(Object.assign({},h),{signature:""});if(j.isAbiFunctionFragment(u)){const l=j.jsonInterfaceMethodToString(u),f=J.encodeFunctionSignature(l);u.signature=f,u.constant=(c=(s=u.stateMutability==="view")!==null&&s!==void 0?s:u.stateMutability==="pure")!==null&&c!==void 0?c:u.constant,u.payable=(o=u.stateMutability==="payable")!==null&&o!==void 0?o:u.payable,this._overloadedMethodAbis.set(u.name,[...(i=this._overloadedMethodAbis.get(u.name))!==null&&i!==void 0?i:[],u]);const _=(r=this._overloadedMethodAbis.get(u.name))!==null&&r!==void 0?r:[],C=this._createContractMethod(_,d);this._functions[l]={signature:f,method:C},this._methods[u.name]=this._functions[l].method,this._methods[l]=this._functions[l].method,this._methods[f]=this._functions[l].method}else if(j.isAbiEventFragment(u)){const l=j.jsonInterfaceMethodToString(u),f=k.encodeEventSignature(l),_=this._createContractEvent(u,n);u.signature=f,(!(l in this._events)||u.name==="bound")&&(this._events[l]=_),this._events[u.name]=_,this._events[f]=_}a=[...a,u]}this._events.allEvents=this._createContractEvent(w.ALL_EVENTS_ABI,n),this._jsonInterface=[...a],this._errorsInterface=d}_getAbiParams(t,n){var s;try{return H.transformJsonDataToAbiFormat((s=t.inputs)!==null&&s!==void 0?s:[],n)}catch(c){throw new A.Web3ContractError(`Invalid parameters for method ${t.name}: ${c.message}`)}}_createContractMethod(t,n){const s=t[t.length-1];return(...c)=>{var o,i;let r;const a=(o=this._overloadedMethodAbis.get(s.name))!==null&&o!==void 0?o:[];let e=a[0];const d=n,h=a.filter(l=>{var f;return((f=l.inputs)!==null&&f!==void 0?f:[]).length===c.length});if(a.length===1||h.length===0)r=this._getAbiParams(e,c),U.validator.validate((i=s.inputs)!==null&&i!==void 0?i:[],r);else{const l=[];for(const f of h)try{r=this._getAbiParams(f,c),U.validator.validate(f.inputs,r),e=f;break}catch(_){l.push(_)}if(l.length===h.length)throw new V.Web3ValidatorError(l)}const u={arguments:r,call:(l,f)=>E(this,void 0,void 0,function*(){return this._contractMethodCall(e,r,d,l,f)}),send:l=>this._contractMethodSend(e,r,d,l),estimateGas:(l,f=v.DEFAULT_RETURN_FORMAT)=>E(this,void 0,void 0,function*(){return this._contractMethodEstimateGas({abi:e,params:r,returnFormat:f,options:l})}),encodeABI:()=>F.encodeMethodABI(e,r),createAccessList:(l,f)=>E(this,void 0,void 0,function*(){return this._contractMethodCreateAccessList(e,r,d,l,f)})};return e.stateMutability==="payable",u}}_contractMethodCall(t,n,s,c,o){var i;return E(this,void 0,void 0,function*(){const r=m.getEthTxCallParams({abi:t,params:n,options:Object.assign(Object.assign({},c),{dataInputFill:this.config.contractDataInputFill}),contractOptions:Object.assign(Object.assign({},this.options),{from:(i=this.options.from)!==null&&i!==void 0?i:this.config.defaultAccount})});try{const a=yield T.call(this,r,o,v.DEFAULT_RETURN_FORMAT);return F.decodeMethodReturn(t,a)}catch(a){throw a instanceof A.ContractExecutionError&&L.decodeContractErrorData(s,a.cause),a}})}_contractMethodCreateAccessList(t,n,s,c,o){var i;return E(this,void 0,void 0,function*(){const r=m.getCreateAccessListParams({abi:t,params:n,options:Object.assign(Object.assign({},c),{dataInputFill:this.config.contractDataInputFill}),contractOptions:Object.assign(Object.assign({},this.options),{from:(i=this.options.from)!==null&&i!==void 0?i:this.config.defaultAccount})});try{return T.createAccessList(this,r,o,v.DEFAULT_RETURN_FORMAT)}catch(a){throw a instanceof A.ContractExecutionError&&L.decodeContractErrorData(s,a.cause),a}})}_contractMethodSend(t,n,s,c,o){var i,r;let a=o??this.options;a=Object.assign(Object.assign({},a),{input:void 0,from:(r=(i=a.from)!==null&&i!==void 0?i:this.defaultAccount)!==null&&r!==void 0?r:void 0});const e=m.getSendTxParams({abi:t,params:n,options:Object.assign(Object.assign({},c),{dataInputFill:this.config.contractDataInputFill}),contractOptions:a}),d=T.sendTransaction(this,e,v.DEFAULT_RETURN_FORMAT,{checkRevertBeforeSending:!1,contractAbi:this._jsonInterface});return d.on("error",h=>{h instanceof A.ContractExecutionError&&L.decodeContractErrorData(s,h.cause)}),d}_contractMethodDeploySend(t,n,s,c){var o,i;let r=c??this.options;r=Object.assign(Object.assign({},r),{from:(i=(o=r.from)!==null&&o!==void 0?o:this.defaultAccount)!==null&&i!==void 0?i:void 0});const a=m.getSendTxParams({abi:t,params:n,options:Object.assign(Object.assign({},s),{dataInputFill:this.config.contractDataInputFill}),contractOptions:r});return T.sendTransaction(this,a,v.DEFAULT_RETURN_FORMAT,{transactionResolver:e=>{if(e.status===BigInt(0))throw new A.Web3ContractError("code couldn't be stored",e);const d=this.clone();return d.options.address=e.contractAddress,d},contractAbi:this._jsonInterface,checkRevertBeforeSending:!1})}_contractMethodEstimateGas({abi:t,params:n,returnFormat:s,options:c,contractOptions:o}){return E(this,void 0,void 0,function*(){const i=m.getEstimateGasParams({abi:t,params:n,options:Object.assign(Object.assign({},c),{dataInputFill:this.config.contractDataInputFill}),contractOptions:o??this.options});return T.estimateGas(this,i,G.BlockTags.LATEST,s)})}_createContractEvent(t,n=v.DEFAULT_RETURN_FORMAT){return(...s)=>{var c;const{topics:o,fromBlock:i}=F.encodeEventABI(this.options,t,s[0]),r=new x.LogsSubscription({address:this.options.address,topics:o,abi:t,jsonInterface:this._jsonInterface},{subscriptionManager:this.subscriptionManager,returnFormat:n});return I.isNullish(i)||this.getPastEvents(t.name,{fromBlock:i,topics:o},n).then(a=>{a&&a.forEach(e=>r.emit("data",e))}).catch(a=>{r.emit("error",new N.SubscriptionError("Failed to get past events.",a))}),(c=this.subscriptionManager)===null||c===void 0||c.addSubscription(r).catch(a=>{r.emit("error",new N.SubscriptionError("Failed to subscribe.",a))}),r}}subscribeToContextEvents(t){const n=this;this.context=t,n.syncWithContext&&t.on(R.Web3ConfigEvent.CONFIG_CHANGE,s=>{n.setConfig({[s.name]:s.newValue})})}}exports.Contract=M;
@@ -1,4 +1,4 @@
1
- import { Web3ConfigEvent as T } from "../../../web3-core/lib/esm/web3_config.js";
1
+ import { Web3ConfigEvent as D } from "../../../web3-core/lib/esm/web3_config.js";
2
2
  import "../../../web3-core/lib/esm/web3_request_manager.js";
3
3
  import "../../../web3-core/lib/esm/web3_subscription_manager.js";
4
4
  import "../../../web3-core/lib/esm/web3_subscriptions.js";
@@ -30,7 +30,7 @@ import { isAbiErrorFragment as it, isAbiFunctionFragment as nt, jsonInterfaceMet
30
30
  import { encodeEventSignature as ot } from "../../../web3-eth-abi/lib/esm/api/events_api.js";
31
31
  import { encodeFunctionSignature as st } from "../../../web3-eth-abi/lib/esm/api/functions_api.js";
32
32
  import "../../../web3-eth-abi/lib/esm/coders/base/number.js";
33
- import { decodeContractErrorData as D } from "../../../web3-eth-abi/lib/esm/decode_contract_error_data.js";
33
+ import { decodeContractErrorData as T } from "../../../web3-eth-abi/lib/esm/decode_contract_error_data.js";
34
34
  import { encodeMethodABI as V, encodeEventABI as U, decodeMethodReturn as rt } from "./encoding.js";
35
35
  import { LogsSubscription as $ } from "./log_subscription.js";
36
36
  import { isWeb3ContractContext as k, getEthTxCallParams as at, getCreateAccessListParams as ct, getSendTxParams as H, getEstimateGasParams as dt } from "./utils.js";
@@ -38,7 +38,7 @@ import { format as w, isDataFormat as _ } from "../../../web3-utils/lib/esm/form
38
38
  import { isContractInitOptions as J } from "../../../web3-utils/lib/esm/validation.js";
39
39
  import { keccak256Wrapper as lt } from "../../../web3-utils/lib/esm/hash.js";
40
40
  import { toChecksumAddress as ht } from "../../../web3-utils/lib/esm/converters.js";
41
- var b = function(K, t, e, o) {
41
+ var b = globalThis && globalThis.__awaiter || function(K, t, e, o) {
42
42
  function c(s) {
43
43
  return s instanceof e ? s : new e(function(n) {
44
44
  n(s);
@@ -98,7 +98,7 @@ class S extends C {
98
98
  }), Object.defineProperty(this.options, "jsonInterface", {
99
99
  set: (f) => this._parseAndSetJsonInterface(f, l),
100
100
  get: () => this._jsonInterface
101
- }), d instanceof C && d.on(T.CONFIG_CHANGE, (f) => {
101
+ }), d instanceof C && d.on(D.CONFIG_CHANGE, (f) => {
102
102
  this.setConfig({ [f.name]: f.newValue });
103
103
  });
104
104
  }
@@ -406,7 +406,7 @@ class S extends C {
406
406
  const a = yield R(this, r, s, v);
407
407
  return rt(t, a);
408
408
  } catch (a) {
409
- throw a instanceof P && D(o, a.cause), a;
409
+ throw a instanceof P && T(o, a.cause), a;
410
410
  }
411
411
  });
412
412
  }
@@ -422,7 +422,7 @@ class S extends C {
422
422
  try {
423
423
  return O(this, r, s, v);
424
424
  } catch (a) {
425
- throw a instanceof P && D(o, a.cause), a;
425
+ throw a instanceof P && T(o, a.cause), a;
426
426
  }
427
427
  });
428
428
  }
@@ -441,7 +441,7 @@ class S extends C {
441
441
  contractAbi: this._jsonInterface
442
442
  });
443
443
  return d.on("error", (u) => {
444
- u instanceof P && D(o, u.cause);
444
+ u instanceof P && T(o, u.cause);
445
445
  }), d;
446
446
  }
447
447
  _contractMethodDeploySend(t, e, o, c) {
@@ -502,7 +502,7 @@ class S extends C {
502
502
  }
503
503
  subscribeToContextEvents(t) {
504
504
  const e = this;
505
- this.context = t, e.syncWithContext && t.on(T.CONFIG_CHANGE, (o) => {
505
+ this.context = t, e.syncWithContext && t.on(D.CONFIG_CHANGE, (o) => {
506
506
  e.setConfig({ [o.name]: o.newValue });
507
507
  });
508
508
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../../web3-core/lib/esm/web3_config.cjs");require("../../../web3-core/lib/esm/web3_request_manager.cjs");require("../../../web3-core/lib/esm/web3_subscription_manager.cjs");require("../../../web3-core/lib/esm/web3_subscriptions.cjs");const y=require("../../../web3-core/lib/esm/web3_context.cjs");require("../../../web3-core/lib/esm/web3_batch_request.cjs");const _=require("../../../web3-types/lib/esm/data_format_types.cjs");require("../../../web3-types/lib/esm/eth_types.cjs");require("../../../web3-types/lib/esm/web3_base_provider.cjs");const v=require("../../../web3-errors/lib/esm/errors/ens_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");require("../../../web3-eth-iban/lib/esm/iban.cjs");require("../../../web3-validator/lib/esm/formats.cjs");require("../../../web3-validator/lib/esm/default_validator.cjs");require("../../../web3-core/lib/esm/web3_promi_event.cjs");require("../../../setimmediate/setImmediate.cjs");require("../../../web3-eth/lib/esm/web3_eth.cjs");require("../../../web3-eth-abi/lib/esm/coders/base/number.cjs");require("../../../web3-eth/lib/esm/schemas.cjs");require("../../../web3-eth/lib/esm/constants.cjs");const g=require("../../../web3-eth/lib/esm/rpc_method_wrappers.cjs");require("../../../web3-eth/lib/esm/utils/prepare_transaction_for_signing.cjs");require("../../../web3-eth/lib/esm/utils/transaction_builder.cjs");require("../../../web3-net/lib/esm/net.cjs");const l=require("../../../web3-net/lib/esm/rpc_method_wrappers.cjs"),h=require("./config.cjs"),w=require("./registry.cjs"),p=require("./resolver.cjs");var t=function(f,e,r,i){function o(s){return s instanceof r?s:new r(function(u){u(s)})}return new(r||(r=Promise))(function(s,u){function a(n){try{c(i.next(n))}catch(d){u(d)}}function q(n){try{c(i.throw(n))}catch(d){u(d)}}function c(n){n.done?s(n.value):o(n.value).then(a,q)}c((i=i.apply(f,e||[])).next())})};class E extends y.Web3Context{constructor(e,r){super(r??""),this.registryAddress=e??h.registryAddresses.main,this._registry=new w.Registry(this.getContextObject(),e),this._resolver=new p.Resolver(this._registry)}getResolver(e){return t(this,void 0,void 0,function*(){return this._registry.getResolver(e)})}recordExists(e){return t(this,void 0,void 0,function*(){return this._registry.recordExists(e)})}getTTL(e){return t(this,void 0,void 0,function*(){return this._registry.getTTL(e)})}getOwner(e){return t(this,void 0,void 0,function*(){return this._registry.getOwner(e)})}getAddress(e,r=60){return t(this,void 0,void 0,function*(){return this._resolver.getAddress(e,r)})}getPubkey(e){return t(this,void 0,void 0,function*(){return this._resolver.getPubkey(e)})}getContenthash(e){return t(this,void 0,void 0,function*(){return this._resolver.getContenthash(e)})}checkNetwork(){return t(this,void 0,void 0,function*(){const e=Date.now()/1e3;if(!this._lastSyncCheck||e-this._lastSyncCheck>3600){const o=yield g.isSyncing(this);if(!(typeof o=="boolean"&&!o))throw new v.ENSNetworkNotSyncedError;this._lastSyncCheck=e}if(this._detectedAddress)return this._detectedAddress;const r=yield l.getId(this,Object.assign(Object.assign({},_.DEFAULT_RETURN_FORMAT),{number:_.FMT_NUMBER.HEX})),i=h.registryAddresses[h.networkIds[r]];if(typeof i>"u")throw new v.ENSUnsupportedNetworkError(r);return this._detectedAddress=i,this._detectedAddress})}supportsInterface(e,r){return t(this,void 0,void 0,function*(){return this._resolver.supportsInterface(e,r)})}get events(){return this._registry.events}}exports.ENS=E;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../../web3-core/lib/esm/web3_config.cjs");require("../../../web3-core/lib/esm/web3_request_manager.cjs");require("../../../web3-core/lib/esm/web3_subscription_manager.cjs");require("../../../web3-core/lib/esm/web3_subscriptions.cjs");const l=require("../../../web3-core/lib/esm/web3_context.cjs");require("../../../web3-core/lib/esm/web3_batch_request.cjs");const f=require("../../../web3-types/lib/esm/data_format_types.cjs");require("../../../web3-types/lib/esm/eth_types.cjs");require("../../../web3-types/lib/esm/web3_base_provider.cjs");const v=require("../../../web3-errors/lib/esm/errors/ens_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");require("../../../web3-eth-iban/lib/esm/iban.cjs");require("../../../web3-validator/lib/esm/formats.cjs");require("../../../web3-validator/lib/esm/default_validator.cjs");require("../../../web3-core/lib/esm/web3_promi_event.cjs");require("../../../setimmediate/setImmediate.cjs");require("../../../web3-eth/lib/esm/web3_eth.cjs");require("../../../web3-eth-abi/lib/esm/coders/base/number.cjs");require("../../../web3-eth/lib/esm/schemas.cjs");require("../../../web3-eth/lib/esm/constants.cjs");const q=require("../../../web3-eth/lib/esm/rpc_method_wrappers.cjs");require("../../../web3-eth/lib/esm/utils/prepare_transaction_for_signing.cjs");require("../../../web3-eth/lib/esm/utils/transaction_builder.cjs");require("../../../web3-net/lib/esm/net.cjs");const y=require("../../../web3-net/lib/esm/rpc_method_wrappers.cjs"),h=require("./config.cjs"),w=require("./registry.cjs"),p=require("./resolver.cjs");var t=globalThis&&globalThis.__awaiter||function(_,e,r,i){function o(n){return n instanceof r?n:new r(function(u){u(n)})}return new(r||(r=Promise))(function(n,u){function a(s){try{c(i.next(s))}catch(d){u(d)}}function g(s){try{c(i.throw(s))}catch(d){u(d)}}function c(s){s.done?n(s.value):o(s.value).then(a,g)}c((i=i.apply(_,e||[])).next())})};class b extends l.Web3Context{constructor(e,r){super(r??""),this.registryAddress=e??h.registryAddresses.main,this._registry=new w.Registry(this.getContextObject(),e),this._resolver=new p.Resolver(this._registry)}getResolver(e){return t(this,void 0,void 0,function*(){return this._registry.getResolver(e)})}recordExists(e){return t(this,void 0,void 0,function*(){return this._registry.recordExists(e)})}getTTL(e){return t(this,void 0,void 0,function*(){return this._registry.getTTL(e)})}getOwner(e){return t(this,void 0,void 0,function*(){return this._registry.getOwner(e)})}getAddress(e,r=60){return t(this,void 0,void 0,function*(){return this._resolver.getAddress(e,r)})}getPubkey(e){return t(this,void 0,void 0,function*(){return this._resolver.getPubkey(e)})}getContenthash(e){return t(this,void 0,void 0,function*(){return this._resolver.getContenthash(e)})}checkNetwork(){return t(this,void 0,void 0,function*(){const e=Date.now()/1e3;if(!this._lastSyncCheck||e-this._lastSyncCheck>3600){const o=yield q.isSyncing(this);if(!(typeof o=="boolean"&&!o))throw new v.ENSNetworkNotSyncedError;this._lastSyncCheck=e}if(this._detectedAddress)return this._detectedAddress;const r=yield y.getId(this,Object.assign(Object.assign({},f.DEFAULT_RETURN_FORMAT),{number:f.FMT_NUMBER.HEX})),i=h.registryAddresses[h.networkIds[r]];if(typeof i>"u")throw new v.ENSUnsupportedNetworkError(r);return this._detectedAddress=i,this._detectedAddress})}supportsInterface(e,r){return t(this,void 0,void 0,function*(){return this._resolver.supportsInterface(e,r)})}get events(){return this._registry.events}}exports.ENS=b;
@@ -4,7 +4,7 @@ import "../../../web3-core/lib/esm/web3_subscription_manager.js";
4
4
  import "../../../web3-core/lib/esm/web3_subscriptions.js";
5
5
  import { Web3Context as v } from "../../../web3-core/lib/esm/web3_context.js";
6
6
  import "../../../web3-core/lib/esm/web3_batch_request.js";
7
- import { DEFAULT_RETURN_FORMAT as _, FMT_NUMBER as y } from "../../../web3-types/lib/esm/data_format_types.js";
7
+ import { DEFAULT_RETURN_FORMAT as _, FMT_NUMBER as l } from "../../../web3-types/lib/esm/data_format_types.js";
8
8
  import "../../../web3-types/lib/esm/eth_types.js";
9
9
  import "../../../web3-types/lib/esm/web3_base_provider.js";
10
10
  import { ENSNetworkNotSyncedError as g, ENSUnsupportedNetworkError as a } from "../../../web3-errors/lib/esm/errors/ens_errors.js";
@@ -18,39 +18,39 @@ import "../../../web3-eth/lib/esm/web3_eth.js";
18
18
  import "../../../web3-eth-abi/lib/esm/coders/base/number.js";
19
19
  import "../../../web3-eth/lib/esm/schemas.js";
20
20
  import "../../../web3-eth/lib/esm/constants.js";
21
- import { isSyncing as l } from "../../../web3-eth/lib/esm/rpc_method_wrappers.js";
21
+ import { isSyncing as y } from "../../../web3-eth/lib/esm/rpc_method_wrappers.js";
22
22
  import "../../../web3-eth/lib/esm/utils/prepare_transaction_for_signing.js";
23
23
  import "../../../web3-eth/lib/esm/utils/transaction_builder.js";
24
24
  import "../../../web3-net/lib/esm/net.js";
25
25
  import { getId as w } from "../../../web3-net/lib/esm/rpc_method_wrappers.js";
26
26
  import { registryAddresses as p, networkIds as k } from "./config.js";
27
27
  import { Registry as E } from "./registry.js";
28
- import { Resolver as N } from "./resolver.js";
29
- var r = function(h, t, e, i) {
28
+ import { Resolver as T } from "./resolver.js";
29
+ var r = globalThis && globalThis.__awaiter || function(u, t, e, i) {
30
30
  function s(n) {
31
31
  return n instanceof e ? n : new e(function(d) {
32
32
  d(n);
33
33
  });
34
34
  }
35
35
  return new (e || (e = Promise))(function(n, d) {
36
- function f(o) {
36
+ function m(o) {
37
37
  try {
38
38
  c(i.next(o));
39
- } catch (u) {
40
- d(u);
39
+ } catch (h) {
40
+ d(h);
41
41
  }
42
42
  }
43
- function m(o) {
43
+ function f(o) {
44
44
  try {
45
45
  c(i.throw(o));
46
- } catch (u) {
47
- d(u);
46
+ } catch (h) {
47
+ d(h);
48
48
  }
49
49
  }
50
50
  function c(o) {
51
- o.done ? n(o.value) : s(o.value).then(f, m);
51
+ o.done ? n(o.value) : s(o.value).then(m, f);
52
52
  }
53
- c((i = i.apply(h, t || [])).next());
53
+ c((i = i.apply(u, t || [])).next());
54
54
  });
55
55
  };
56
56
  class Z extends v {
@@ -70,7 +70,7 @@ class Z extends v {
70
70
  * ```
71
71
  */
72
72
  constructor(t, e) {
73
- super(e ?? ""), this.registryAddress = t ?? p.main, this._registry = new E(this.getContextObject(), t), this._resolver = new N(this._registry);
73
+ super(e ?? ""), this.registryAddress = t ?? p.main, this._registry = new E(this.getContextObject(), t), this._resolver = new T(this._registry);
74
74
  }
75
75
  /**
76
76
  * Returns the Resolver by the given address
@@ -199,14 +199,14 @@ class Z extends v {
199
199
  return r(this, void 0, void 0, function* () {
200
200
  const t = Date.now() / 1e3;
201
201
  if (!this._lastSyncCheck || t - this._lastSyncCheck > 3600) {
202
- const s = yield l(this);
202
+ const s = yield y(this);
203
203
  if (!(typeof s == "boolean" && !s))
204
204
  throw new g();
205
205
  this._lastSyncCheck = t;
206
206
  }
207
207
  if (this._detectedAddress)
208
208
  return this._detectedAddress;
209
- const e = yield w(this, Object.assign(Object.assign({}, _), { number: y.HEX })), i = p[k[e]];
209
+ const e = yield w(this, Object.assign(Object.assign({}, _), { number: l.HEX })), i = p[k[e]];
210
210
  if (typeof i > "u")
211
211
  throw new a(e);
212
212
  return this._detectedAddress = i, this._detectedAddress;