@ozdao/prometheus-framework 0.2.88 → 0.2.90

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. package/dist/main-BV1Yv9Hy.js +92 -0
  2. package/dist/main-DmNP-t33.mjs +13625 -0
  3. package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.cjs +1 -1
  4. package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +748 -750
  5. package/dist/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.cjs +1 -1
  6. package/dist/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js +40 -39
  7. package/dist/node_modules/web3/lib/esm/index.cjs +1 -1
  8. package/dist/node_modules/web3/lib/esm/index.js +42 -41
  9. package/dist/node_modules/web3/lib/esm/version.cjs +1 -1
  10. package/dist/node_modules/web3/lib/esm/version.js +1 -1
  11. package/dist/node_modules/web3-eth/lib/esm/schemas.cjs +1 -1
  12. package/dist/node_modules/web3-eth/lib/esm/schemas.js +113 -88
  13. package/dist/node_modules/web3-eth-contract/lib/esm/contract.cjs +3 -1
  14. package/dist/node_modules/web3-eth-contract/lib/esm/contract.js +242 -217
  15. package/dist/node_modules/web3-eth-contract/lib/esm/encoding.cjs +1 -1
  16. package/dist/node_modules/web3-eth-contract/lib/esm/encoding.js +43 -37
  17. package/dist/node_modules/web3-eth-ens/lib/esm/config.cjs +1 -1
  18. package/dist/node_modules/web3-eth-ens/lib/esm/config.js +3 -1
  19. package/dist/node_modules/web3-eth-ens/lib/esm/ens.cjs +1 -1
  20. package/dist/node_modules/web3-eth-ens/lib/esm/ens.js +34 -13
  21. package/dist/node_modules/web3-eth-ens/lib/esm/resolver.cjs +1 -1
  22. package/dist/node_modules/web3-eth-ens/lib/esm/resolver.js +48 -36
  23. package/dist/node_modules/web3-utils/lib/esm/chunk_response_parser.cjs +1 -1
  24. package/dist/node_modules/web3-utils/lib/esm/chunk_response_parser.js +2 -2
  25. package/dist/node_modules/web3-utils/lib/esm/converters.cjs +1 -1
  26. package/dist/node_modules/web3-utils/lib/esm/converters.js +52 -50
  27. package/dist/node_modules/web3-utils/lib/esm/uint8array.cjs +1 -1
  28. package/dist/node_modules/web3-utils/lib/esm/uint8array.js +13 -13
  29. package/dist/node_modules/web3-validator/lib/esm/utils.cjs +1 -1
  30. package/dist/node_modules/web3-validator/lib/esm/utils.js +76 -87
  31. package/dist/node_modules/web3-validator/lib/esm/validator.cjs +1 -1
  32. package/dist/node_modules/web3-validator/lib/esm/validator.js +49 -47
  33. package/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.cjs +1 -1
  34. package/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.js +168 -158
  35. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +73 -1
  37. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  38. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +1 -73
  39. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/components/Select/Select.vue.js +103 -1
  41. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  42. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +1 -103
  43. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.js +36 -1
  45. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs +1 -1
  46. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.js +1 -36
  47. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  49. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  51. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
  53. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  55. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -1
  56. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +66 -0
  57. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -5
  58. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +0 -66
  59. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  61. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  63. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  65. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  67. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  69. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  71. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
  73. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  75. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +13 -1
  77. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +1 -13
  79. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
  81. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
  83. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  85. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  87. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +1 -1
  89. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
  91. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +1 -1
  93. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  95. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  96. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
  97. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  98. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  99. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  100. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  101. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  103. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  105. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
  107. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  108. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  109. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  110. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  111. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  112. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  113. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  114. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
  115. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs +1 -1
  116. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js +20 -25
  117. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  118. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  119. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  121. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  122. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
  123. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  125. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
  127. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  128. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
  129. package/dist/prometheus-framework.cjs.js +1 -1
  130. package/dist/prometheus-framework.es.js +1 -1
  131. package/dist/style.css +1 -1
  132. package/dist/web-Bk_OtXgv.js +1 -0
  133. package/dist/web-VFuzUsNl.mjs +54 -0
  134. package/package.json +19 -19
  135. package/src/modules/events/components/pages/Events.vue +0 -1
  136. package/src/modules/landing/components/pages/Governance.vue +0 -11
  137. package/src/modules/landing/components/pages/Hotel.vue +0 -9
  138. package/src/modules/landing/components/pages/Page.vue +0 -7
  139. package/src/modules/marketplace/components/layouts/Marketplace.vue +1 -8
  140. package/src/modules/products/components/pages/Product.vue +1 -13
  141. package/src/modules/spots/components/layouts/Spots.vue +0 -9
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=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 d=require("../../../web3-errors/lib/esm/errors/contract_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");const E=require("../../../web3-eth-abi/lib/esm/utils.cjs"),y=require("../../../web3-eth-abi/lib/esm/api/events_api.cjs"),A=require("../../../web3-eth-abi/lib/esm/api/functions_api.cjs"),l=require("../../../web3-eth-abi/lib/esm/api/parameters_api.cjs"),f=require("../../../web3-eth-abi/lib/esm/coders/encode.cjs");require("../../../setimmediate/setImmediate.cjs");require("../../../web3-eth/lib/esm/web3_eth.cjs");const m=require("../../../web3-eth/lib/esm/schemas.cjs"),p=require("../../../web3-eth/lib/esm/constants.cjs");require("../../../web3-validator/lib/esm/formats.cjs");require("../../../web3-validator/lib/esm/default_validator.cjs");require("../../../web3-eth/lib/esm/rpc_method_wrappers.cjs");require("../../../web3-eth/lib/esm/utils/prepare_transaction_for_signing.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");require("../../../web3-core/lib/esm/web3_context.cjs");require("../../../web3-core/lib/esm/web3_batch_request.cjs");require("../../../web3-eth-iban/lib/esm/iban.cjs");require("../../../web3-core/lib/esm/web3_promi_event.cjs");require("../../../web3-eth/lib/esm/utils/transaction_builder.cjs");const h=require("../../../web3-utils/lib/esm/validation.cjs"),q=require("../../../web3-utils/lib/esm/formatter.cjs"),g=require("../../../web3-utils/lib/esm/hash.cjs"),B=({address:t},r,e)=>{var i,o;const a=e==null?void 0:e.topics,v=(i=e==null?void 0:e.filter)!==null&&i!==void 0?i:{},n={};if(h.isNullish(e==null?void 0:e.fromBlock)||(n.fromBlock=q.format(m.blockSchema.properties.number,e==null?void 0:e.fromBlock,{number:c.FMT_NUMBER.HEX,bytes:c.FMT_BYTES.HEX})),h.isNullish(e==null?void 0:e.toBlock)||(n.toBlock=q.format(m.blockSchema.properties.number,e==null?void 0:e.toBlock,{number:c.FMT_NUMBER.HEX,bytes:c.FMT_BYTES.HEX})),a&&Array.isArray(a))n.topics=[...a];else if(n.topics=[],r&&!r.anonymous&&![p.ALL_EVENTS,"allEvents"].includes(r.name)&&n.topics.push((o=r.signature)!==null&&o!==void 0?o:y.encodeEventSignature(E.jsonInterfaceMethodToString(r))),![p.ALL_EVENTS,"allEvents"].includes(r.name)&&r.inputs)for(const u of r.inputs){if(!u.indexed)continue;const s=v[u.name];if(!s){n.topics.push(null);continue}Array.isArray(s)?n.topics.push(s.map(_=>l.encodeParameter(u.type,_))):u.type==="string"?n.topics.push(g.keccak256Wrapper(s)):n.topics.push(l.encodeParameter(u.type,s))}return n.topics.length||delete n.topics,t&&(n.address=t.toLowerCase()),n},T=(t,r,e)=>{const i=Array.isArray(t.inputs)?t.inputs.length:0;if(t.inputs&&i!==r.length)throw new d.Web3ContractError(`The number of arguments is not matching the methods required number. You need to pass ${i} arguments.`);let o;if(t.inputs?o=f.encodeParameters(Array.isArray(t.inputs)?t.inputs:[],r).replace("0x",""):o=f.inferTypesAndEncodeParameters(r).replace("0x",""),E.isAbiConstructorFragment(t)){if(!e)throw new d.Web3ContractError("The contract has no contract data option set. This is necessary to append the constructor parameters.");return e.startsWith("0x")?`${e}${o}`:`0x${e}${o}`}return`${A.encodeFunctionSignature(t)}${o}`},M=(t,r)=>{if(t.type==="constructor")return r;if(!r)return null;const e=r.length>=2?r.slice(2):r;if(!t.outputs)return null;const i=l.decodeParameters([...t.outputs],e);return i.__length__===1?i[0]:i};exports.decodeMethodReturn=M;exports.encodeEventABI=B;exports.encodeMethodABI=T;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=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 d=require("../../../web3-errors/lib/esm/errors/contract_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");const E=require("../../../web3-eth-abi/lib/esm/utils.cjs"),y=require("../../../web3-eth-abi/lib/esm/api/events_api.cjs"),A=require("../../../web3-eth-abi/lib/esm/api/functions_api.cjs"),l=require("../../../web3-eth-abi/lib/esm/api/parameters_api.cjs"),h=require("../../../web3-eth-abi/lib/esm/coders/encode.cjs");require("../../../setimmediate/setImmediate.cjs");require("../../../web3-eth/lib/esm/web3_eth.cjs");const f=require("../../../web3-eth/lib/esm/schemas.cjs"),m=require("../../../web3-eth/lib/esm/constants.cjs");require("../../../web3-validator/lib/esm/formats.cjs");require("../../../web3-validator/lib/esm/default_validator.cjs");require("../../../web3-eth/lib/esm/rpc_method_wrappers.cjs");require("../../../web3-eth/lib/esm/utils/prepare_transaction_for_signing.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");require("../../../web3-core/lib/esm/web3_context.cjs");require("../../../web3-core/lib/esm/web3_batch_request.cjs");require("../../../web3-eth-iban/lib/esm/iban.cjs");require("../../../web3-core/lib/esm/web3_promi_event.cjs");require("../../../web3-eth/lib/esm/utils/transaction_builder.cjs");const p=require("../../../web3-utils/lib/esm/validation.cjs"),q=require("../../../web3-utils/lib/esm/formatter.cjs"),g=require("../../../web3-utils/lib/esm/hash.cjs"),B=({address:t},r,e)=>{var i,o;const a=e==null?void 0:e.topics,v=(i=e==null?void 0:e.filter)!==null&&i!==void 0?i:{},n={};if(p.isNullish(e==null?void 0:e.fromBlock)||(n.fromBlock=q.format(f.blockSchema.properties.number,e==null?void 0:e.fromBlock,{number:c.FMT_NUMBER.HEX,bytes:c.FMT_BYTES.HEX})),p.isNullish(e==null?void 0:e.toBlock)||(n.toBlock=q.format(f.blockSchema.properties.number,e==null?void 0:e.toBlock,{number:c.FMT_NUMBER.HEX,bytes:c.FMT_BYTES.HEX})),a&&Array.isArray(a))n.topics=[...a];else if(n.topics=[],r&&!r.anonymous&&![m.ALL_EVENTS,"allEvents"].includes(r.name)&&n.topics.push((o=r.signature)!==null&&o!==void 0?o:y.encodeEventSignature(E.jsonInterfaceMethodToString(r))),![m.ALL_EVENTS,"allEvents"].includes(r.name)&&r.inputs)for(const s of r.inputs){if(!s.indexed)continue;const u=v[s.name];if(!u){n.topics.push(null);continue}Array.isArray(u)?n.topics.push(u.map(_=>l.encodeParameter(s.type,_))):s.type==="string"?n.topics.push(g.keccak256Wrapper(u)):n.topics.push(l.encodeParameter(s.type,u))}return n.topics.length||delete n.topics,t&&(n.address=t.toLowerCase()),n},M=(t,r,e)=>{const i=Array.isArray(t.inputs)?t.inputs.length:0;if(t.inputs&&i!==r.length)throw new d.Web3ContractError(`The number of arguments is not matching the methods required number. You need to pass ${i} arguments.`);let o;if(t.inputs?o=h.encodeParameters(Array.isArray(t.inputs)?t.inputs:[],r).replace("0x",""):o=h.inferTypesAndEncodeParameters(r).replace("0x",""),E.isAbiConstructorFragment(t)){if(!e)throw new d.Web3ContractError("The contract has no contract data option set. This is necessary to append the constructor parameters.");return e.startsWith("0x")?`${e}${o}`:`0x${e}${o}`}return`${A.encodeFunctionSignature(t)}${o}`},T=(t,r,e=!0)=>{const i=e&&r&&r.length>=10&&r.startsWith("0x")?r.slice(10):r;if(!t.inputs)throw new d.Web3ContractError("No inputs found in the ABI");return l.decodeParameters([...t.inputs],i)},S=(t,r)=>{if(t.type==="constructor")return r;if(!r)return null;const e=r.length>=2?r.slice(2):r;if(!t.outputs)return null;const i=l.decodeParameters([...t.outputs],e);return i.__length__===1?i[0]:i};exports.decodeMethodParams=T;exports.decodeMethodReturn=S;exports.encodeEventABI=B;exports.encodeMethodABI=M;
@@ -1,17 +1,17 @@
1
- import { FMT_NUMBER as p, FMT_BYTES as u } from "../../../web3-types/lib/esm/data_format_types.js";
1
+ import { FMT_NUMBER as p, FMT_BYTES as l } from "../../../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 { Web3ContractError as l } from "../../../web3-errors/lib/esm/errors/contract_errors.js";
4
+ import { Web3ContractError as u } from "../../../web3-errors/lib/esm/errors/contract_errors.js";
5
5
  import "../../../web3-errors/lib/esm/errors/rpc_errors.js";
6
- import { jsonInterfaceMethodToString as g, isAbiConstructorFragment as A } from "../../../web3-eth-abi/lib/esm/utils.js";
7
- import { encodeEventSignature as B } from "../../../web3-eth-abi/lib/esm/api/events_api.js";
8
- import { encodeFunctionSignature as k } from "../../../web3-eth-abi/lib/esm/api/functions_api.js";
9
- import { encodeParameter as f, decodeParameters as T } from "../../../web3-eth-abi/lib/esm/api/parameters_api.js";
10
- import { encodeParameters as _, inferTypesAndEncodeParameters as $ } from "../../../web3-eth-abi/lib/esm/coders/encode.js";
6
+ import { jsonInterfaceMethodToString as E, isAbiConstructorFragment as B } from "../../../web3-eth-abi/lib/esm/utils.js";
7
+ import { encodeEventSignature as k } from "../../../web3-eth-abi/lib/esm/api/events_api.js";
8
+ import { encodeFunctionSignature as T } from "../../../web3-eth-abi/lib/esm/api/functions_api.js";
9
+ import { encodeParameter as f, decodeParameters as g } from "../../../web3-eth-abi/lib/esm/api/parameters_api.js";
10
+ import { encodeParameters as _, inferTypesAndEncodeParameters as w } from "../../../web3-eth-abi/lib/esm/coders/encode.js";
11
11
  import "../../../setimmediate/setImmediate.js";
12
12
  import "../../../web3-eth/lib/esm/web3_eth.js";
13
13
  import { blockSchema as d } from "../../../web3-eth/lib/esm/schemas.js";
14
- import { ALL_EVENTS as a } from "../../../web3-eth/lib/esm/constants.js";
14
+ import { ALL_EVENTS as h } from "../../../web3-eth/lib/esm/constants.js";
15
15
  import "../../../web3-validator/lib/esm/formats.js";
16
16
  import "../../../web3-validator/lib/esm/default_validator.js";
17
17
  import "../../../web3-eth/lib/esm/rpc_method_wrappers.js";
@@ -25,56 +25,62 @@ import "../../../web3-core/lib/esm/web3_batch_request.js";
25
25
  import "../../../web3-eth-iban/lib/esm/iban.js";
26
26
  import "../../../web3-core/lib/esm/web3_promi_event.js";
27
27
  import "../../../web3-eth/lib/esm/utils/transaction_builder.js";
28
- import { isNullish as h } from "../../../web3-utils/lib/esm/validation.js";
28
+ import { isNullish as a } from "../../../web3-utils/lib/esm/validation.js";
29
29
  import { format as v } from "../../../web3-utils/lib/esm/formatter.js";
30
30
  import { keccak256Wrapper as x } from "../../../web3-utils/lib/esm/hash.js";
31
- const er = ({ address: o }, t, r) => {
31
+ const or = ({ address: e }, t, r) => {
32
32
  var i, n;
33
- const c = r == null ? void 0 : r.topics, y = (i = r == null ? void 0 : r.filter) !== null && i !== void 0 ? i : {}, e = {};
34
- if (h(r == null ? void 0 : r.fromBlock) || (e.fromBlock = v(d.properties.number, r == null ? void 0 : r.fromBlock, {
33
+ const c = r == null ? void 0 : r.topics, y = (i = r == null ? void 0 : r.filter) !== null && i !== void 0 ? i : {}, o = {};
34
+ if (a(r == null ? void 0 : r.fromBlock) || (o.fromBlock = v(d.properties.number, r == null ? void 0 : r.fromBlock, {
35
35
  number: p.HEX,
36
- bytes: u.HEX
37
- })), h(r == null ? void 0 : r.toBlock) || (e.toBlock = v(d.properties.number, r == null ? void 0 : r.toBlock, {
36
+ bytes: l.HEX
37
+ })), a(r == null ? void 0 : r.toBlock) || (o.toBlock = v(d.properties.number, r == null ? void 0 : r.toBlock, {
38
38
  number: p.HEX,
39
- bytes: u.HEX
39
+ bytes: l.HEX
40
40
  })), c && Array.isArray(c))
41
- e.topics = [...c];
42
- else if (e.topics = [], t && !t.anonymous && ![a, "allEvents"].includes(t.name) && e.topics.push((n = t.signature) !== null && n !== void 0 ? n : B(g(t))), ![a, "allEvents"].includes(t.name) && t.inputs)
43
- for (const m of t.inputs) {
44
- if (!m.indexed)
41
+ o.topics = [...c];
42
+ else if (o.topics = [], t && !t.anonymous && ![h, "allEvents"].includes(t.name) && o.topics.push((n = t.signature) !== null && n !== void 0 ? n : k(E(t))), ![h, "allEvents"].includes(t.name) && t.inputs)
43
+ for (const s of t.inputs) {
44
+ if (!s.indexed)
45
45
  continue;
46
- const s = y[m.name];
47
- if (!s) {
48
- e.topics.push(null);
46
+ const m = y[s.name];
47
+ if (!m) {
48
+ o.topics.push(null);
49
49
  continue;
50
50
  }
51
- Array.isArray(s) ? e.topics.push(s.map((E) => f(m.type, E))) : m.type === "string" ? e.topics.push(x(s)) : e.topics.push(f(m.type, s));
51
+ Array.isArray(m) ? o.topics.push(m.map((A) => f(s.type, A))) : s.type === "string" ? o.topics.push(x(m)) : o.topics.push(f(s.type, m));
52
52
  }
53
- return e.topics.length || delete e.topics, o && (e.address = o.toLowerCase()), e;
54
- }, ir = (o, t, r) => {
55
- const i = Array.isArray(o.inputs) ? o.inputs.length : 0;
56
- if (o.inputs && i !== t.length)
57
- throw new l(`The number of arguments is not matching the methods required number. You need to pass ${i} arguments.`);
53
+ return o.topics.length || delete o.topics, e && (o.address = e.toLowerCase()), o;
54
+ }, ir = (e, t, r) => {
55
+ const i = Array.isArray(e.inputs) ? e.inputs.length : 0;
56
+ if (e.inputs && i !== t.length)
57
+ throw new u(`The number of arguments is not matching the methods required number. You need to pass ${i} arguments.`);
58
58
  let n;
59
- if (o.inputs ? n = _(Array.isArray(o.inputs) ? o.inputs : [], t).replace("0x", "") : n = $(t).replace("0x", ""), A(o)) {
59
+ if (e.inputs ? n = _(Array.isArray(e.inputs) ? e.inputs : [], t).replace("0x", "") : n = w(t).replace("0x", ""), B(e)) {
60
60
  if (!r)
61
- throw new l("The contract has no contract data option set. This is necessary to append the constructor parameters.");
61
+ throw new u("The contract has no contract data option set. This is necessary to append the constructor parameters.");
62
62
  return r.startsWith("0x") ? `${r}${n}` : `0x${r}${n}`;
63
63
  }
64
- return `${k(o)}${n}`;
65
- }, nr = (o, t) => {
66
- if (o.type === "constructor")
64
+ return `${T(e)}${n}`;
65
+ }, nr = (e, t, r = !0) => {
66
+ const i = r && t && t.length >= 10 && t.startsWith("0x") ? t.slice(10) : t;
67
+ if (!e.inputs)
68
+ throw new u("No inputs found in the ABI");
69
+ return g([...e.inputs], i);
70
+ }, sr = (e, t) => {
71
+ if (e.type === "constructor")
67
72
  return t;
68
73
  if (!t)
69
74
  return null;
70
75
  const r = t.length >= 2 ? t.slice(2) : t;
71
- if (!o.outputs)
76
+ if (!e.outputs)
72
77
  return null;
73
- const i = T([...o.outputs], r);
78
+ const i = g([...e.outputs], r);
74
79
  return i.__length__ === 1 ? i[0] : i;
75
80
  };
76
81
  export {
77
- nr as decodeMethodReturn,
78
- er as encodeEventABI,
82
+ nr as decodeMethodParams,
83
+ sr as decodeMethodReturn,
84
+ or as encodeEventABI,
79
85
  ir as encodeMethodABI
80
86
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={addr:"0x3b3b57de",name:"0x691f3431",abi:"0x2203ab56",pubkey:"0xc8690233",text:"0x59d1d43c",contenthash:"0xbc1c58d1"},t={setAddr:"addr",addr:"addr",setPubkey:"pubkey",pubkey:"pubkey",setContenthash:"contenthash",contenthash:"contenthash"},d={main:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",goerli:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},s={"0x1":"main","0x5":"goerli"};exports.interfaceIds=e;exports.methodsInInterface=t;exports.networkIds=s;exports.registryAddresses=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={addr:"0x3b3b57de",name:"0x691f3431",abi:"0x2203ab56",pubkey:"0xc8690233",text:"0x59d1d43c",contenthash:"0xbc1c58d1"},t={setAddr:"addr",addr:"addr",setPubkey:"pubkey",pubkey:"pubkey",setContenthash:"contenthash",contenthash:"contenthash",text:"text",name:"name"},d={main:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",goerli:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},n={"0x1":"main","0x5":"goerli"};exports.interfaceIds=e;exports.methodsInInterface=t;exports.networkIds=n;exports.registryAddresses=d;
@@ -11,7 +11,9 @@ const e = {
11
11
  setPubkey: "pubkey",
12
12
  pubkey: "pubkey",
13
13
  setContenthash: "contenthash",
14
- contenthash: "contenthash"
14
+ contenthash: "contenthash",
15
+ text: "text",
16
+ name: "name"
15
17
  }, d = {
16
18
  main: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
17
19
  goerli: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"
@@ -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(n){return n instanceof r?n:new r(function(u){u(n)})}return new(r||(r=Promise))(function(n,u){function a(s){try{d(i.next(s))}catch(c){u(c)}}function q(s){try{d(i.throw(s))}catch(c){u(c)}}function d(s){s.done?n(s.value):o(s.value).then(a,q)}d((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}setAddress(e,r,i){return t(this,void 0,void 0,function*(){return this._resolver.setAddress(e,r,i)})}}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 _=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=function(v,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 g(s){try{d(i.next(s))}catch(c){u(c)}}function a(s){try{d(i.throw(s))}catch(c){u(c)}}function d(s){s.done?n(s.value):o(s.value).then(g,a)}d((i=i.apply(v,e||[])).next())})};class E 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)})}getText(e,r){return t(this,void 0,void 0,function*(){return this._resolver.getText(e,r)})}getName(e){return t(this,void 0,void 0,function*(){return this._resolver.getName(e)})}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 _.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 _.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}setAddress(e,r,i){return t(this,void 0,void 0,function*(){return this._resolver.setAddress(e,r,i)})}}exports.ENS=E;
@@ -4,10 +4,10 @@ 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 g } 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
- import { ENSNetworkNotSyncedError as g, ENSUnsupportedNetworkError as l } from "../../../web3-errors/lib/esm/errors/ens_errors.js";
10
+ import { ENSNetworkNotSyncedError as l, ENSUnsupportedNetworkError as a } from "../../../web3-errors/lib/esm/errors/ens_errors.js";
11
11
  import "../../../web3-errors/lib/esm/errors/rpc_errors.js";
12
12
  import "../../../web3-eth-iban/lib/esm/iban.js";
13
13
  import "../../../web3-validator/lib/esm/formats.js";
@@ -18,14 +18,14 @@ 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 a } 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
- import { registryAddresses as p, networkIds as k } from "./config.js";
26
+ import { registryAddresses as f, networkIds as k } from "./config.js";
27
27
  import { Registry as E } from "./registry.js";
28
- import { Resolver as A } from "./resolver.js";
28
+ import { Resolver as N } from "./resolver.js";
29
29
  var r = function(h, t, e, i) {
30
30
  function s(n) {
31
31
  return n instanceof e ? n : new e(function(d) {
@@ -33,14 +33,14 @@ var r = function(h, t, e, i) {
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
  u(i.next(o));
39
39
  } catch (c) {
40
40
  d(c);
41
41
  }
42
42
  }
43
- function m(o) {
43
+ function p(o) {
44
44
  try {
45
45
  u(i.throw(o));
46
46
  } catch (c) {
@@ -48,7 +48,7 @@ var r = function(h, t, e, i) {
48
48
  }
49
49
  }
50
50
  function u(o) {
51
- o.done ? n(o.value) : s(o.value).then(f, m);
51
+ o.done ? n(o.value) : s(o.value).then(m, p);
52
52
  }
53
53
  u((i = i.apply(h, t || [])).next());
54
54
  });
@@ -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 A(this._registry);
73
+ super(e ?? ""), this.registryAddress = t ?? f.main, this._registry = new E(this.getContextObject(), t), this._resolver = new N(this._registry);
74
74
  }
75
75
  /**
76
76
  * Returns the Resolver by the given address
@@ -148,6 +148,27 @@ class Z extends v {
148
148
  return this._resolver.getAddress(t, e);
149
149
  });
150
150
  }
151
+ /**
152
+ * ERC-634 - Returns the text content stored in the resolver for the specified key.
153
+ * @param ENSName - The ENS name to resolve
154
+ * @param key - The key to resolve https://github.com/ethereum/ercs/blob/master/ERCS/erc-634.md#global-keys
155
+ * @returns - The value content stored in the resolver for the specified key
156
+ */
157
+ getText(t, e) {
158
+ return r(this, void 0, void 0, function* () {
159
+ return this._resolver.getText(t, e);
160
+ });
161
+ }
162
+ /**
163
+ * Resolves the name of an ENS node.
164
+ * @param ENSName - The node to resolve
165
+ * @returns - The name
166
+ */
167
+ getName(t) {
168
+ return r(this, void 0, void 0, function* () {
169
+ return this._resolver.getName(t);
170
+ });
171
+ }
151
172
  /**
152
173
  * Returns the X and Y coordinates of the curve point for the public key.
153
174
  * @param ENSName - The ENS name
@@ -199,16 +220,16 @@ class Z extends v {
199
220
  return r(this, void 0, void 0, function* () {
200
221
  const t = Date.now() / 1e3;
201
222
  if (!this._lastSyncCheck || t - this._lastSyncCheck > 3600) {
202
- const s = yield a(this);
223
+ const s = yield y(this);
203
224
  if (!(typeof s == "boolean" && !s))
204
- throw new g();
225
+ throw new l();
205
226
  this._lastSyncCheck = t;
206
227
  }
207
228
  if (this._detectedAddress)
208
229
  return this._detectedAddress;
209
- const e = yield w(this, Object.assign(Object.assign({}, _), { number: y.HEX })), i = p[k[e]];
230
+ const e = yield w(this, Object.assign(Object.assign({}, _), { number: g.HEX })), i = f[k[e]];
210
231
  if (typeof i > "u")
211
- throw new l(e);
232
+ throw new a(e);
212
233
  return this._detectedAddress = i, this._detectedAddress;
213
234
  });
214
235
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../../../web3-errors/lib/esm/errors/contract_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");require("../../../web3-validator/lib/esm/formats.cjs");const y=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 c=require("./config.cjs"),a=require("./utils.cjs"),I=require("../../../web3-utils/lib/esm/hash.cjs"),g=require("../../../web3-utils/lib/esm/validation.cjs");var s=function(l,e,t,r){function o(n){return n instanceof t?n:new t(function(d){d(n)})}return new(t||(t=Promise))(function(n,d){function v(i){try{u(r.next(i))}catch(h){d(h)}}function p(i){try{u(r.throw(i))}catch(h){d(h)}}function u(i){i.done?n(i.value):o(i.value).then(v,p)}u((r=r.apply(l,e||[])).next())})};class q{constructor(e){this.registry=e}getResolverContractAdapter(e){return s(this,void 0,void 0,function*(){return this.registry.getResolver(e)})}checkInterfaceSupport(e,t){var r,o;return s(this,void 0,void 0,function*(){if(g.isNullish(c.interfaceIds[t]))throw new f.ResolverMethodMissingError((r=e.options.address)!==null&&r!==void 0?r:"",t);if(!(yield e.methods.supportsInterface(c.interfaceIds[t]).call()))throw new f.ResolverMethodMissingError((o=e.options.address)!==null&&o!==void 0?o:"",t)})}supportsInterface(e,t){var r;return s(this,void 0,void 0,function*(){const o=yield this.getResolverContractAdapter(e);let n=t;if(!y.isHexStrict(n)){if(n=(r=I.sha3(t))!==null&&r!==void 0?r:"",t==="")throw new Error("Invalid interface Id");n=n.slice(0,10)}return o.methods.supportsInterface(n).call()})}getAddress(e,t=60){return s(this,void 0,void 0,function*(){const r=yield this.getResolverContractAdapter(e);return yield this.checkInterfaceSupport(r,c.methodsInInterface.addr),r.methods.addr(a.namehash(e),t).call()})}getPubkey(e){return s(this,void 0,void 0,function*(){const t=yield this.getResolverContractAdapter(e);return yield this.checkInterfaceSupport(t,c.methodsInInterface.pubkey),t.methods.pubkey(a.namehash(e)).call()})}getContenthash(e){return s(this,void 0,void 0,function*(){const t=yield this.getResolverContractAdapter(e);return yield this.checkInterfaceSupport(t,c.methodsInInterface.contenthash),t.methods.contenthash(a.namehash(e)).call()})}setAddress(e,t,r){return s(this,void 0,void 0,function*(){const o=yield this.getResolverContractAdapter(e);return yield this.checkInterfaceSupport(o,c.methodsInInterface.setAddr),o.methods.setAddr(a.namehash(e),t).send(r)})}}exports.Resolver=q;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../../../web3-errors/lib/esm/errors/contract_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");require("../../../web3-validator/lib/esm/formats.cjs");const I=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 s=require("./config.cjs"),d=require("./utils.cjs"),y=require("../../../web3-utils/lib/esm/hash.cjs"),g=require("../../../web3-utils/lib/esm/validation.cjs");var i=function(l,e,t,r){function o(n){return n instanceof t?n:new t(function(a){a(n)})}return new(t||(t=Promise))(function(n,a){function v(c){try{h(r.next(c))}catch(u){a(u)}}function p(c){try{h(r.throw(c))}catch(u){a(u)}}function h(c){c.done?n(c.value):o(c.value).then(v,p)}h((r=r.apply(l,e||[])).next())})};class m{constructor(e){this.registry=e}getResolverContractAdapter(e){return i(this,void 0,void 0,function*(){return this.registry.getResolver(e)})}checkInterfaceSupport(e,t){var r,o;return i(this,void 0,void 0,function*(){if(g.isNullish(s.interfaceIds[t]))throw new f.ResolverMethodMissingError((r=e.options.address)!==null&&r!==void 0?r:"",t);if(!(yield e.methods.supportsInterface(s.interfaceIds[t]).call()))throw new f.ResolverMethodMissingError((o=e.options.address)!==null&&o!==void 0?o:"",t)})}supportsInterface(e,t){var r;return i(this,void 0,void 0,function*(){const o=yield this.getResolverContractAdapter(e);let n=t;if(!I.isHexStrict(n)){if(n=(r=y.sha3(t))!==null&&r!==void 0?r:"",t==="")throw new Error("Invalid interface Id");n=n.slice(0,10)}return o.methods.supportsInterface(n).call()})}getAddress(e,t=60){return i(this,void 0,void 0,function*(){const r=yield this.getResolverContractAdapter(e);return yield this.checkInterfaceSupport(r,s.methodsInInterface.addr),r.methods.addr(d.namehash(e),t).call()})}getPubkey(e){return i(this,void 0,void 0,function*(){const t=yield this.getResolverContractAdapter(e);return yield this.checkInterfaceSupport(t,s.methodsInInterface.pubkey),t.methods.pubkey(d.namehash(e)).call()})}getContenthash(e){return i(this,void 0,void 0,function*(){const t=yield this.getResolverContractAdapter(e);return yield this.checkInterfaceSupport(t,s.methodsInInterface.contenthash),t.methods.contenthash(d.namehash(e)).call()})}setAddress(e,t,r){return i(this,void 0,void 0,function*(){const o=yield this.getResolverContractAdapter(e);return yield this.checkInterfaceSupport(o,s.methodsInInterface.setAddr),o.methods.setAddr(d.namehash(e),t).send(r)})}getText(e,t){return i(this,void 0,void 0,function*(){const r=yield this.getResolverContractAdapter(e);return yield this.checkInterfaceSupport(r,s.methodsInInterface.text),r.methods.text(d.namehash(e),t).call()})}getName(e){return i(this,void 0,void 0,function*(){const t=yield this.getResolverContractAdapter(e);return yield this.checkInterfaceSupport(t,s.methodsInInterface.name),t.methods.name(d.namehash(e)).call()})}}exports.Resolver=m;
@@ -1,4 +1,4 @@
1
- import { ResolverMethodMissingError as h } from "../../../web3-errors/lib/esm/errors/contract_errors.js";
1
+ import { ResolverMethodMissingError as p } from "../../../web3-errors/lib/esm/errors/contract_errors.js";
2
2
  import "../../../web3-errors/lib/esm/errors/rpc_errors.js";
3
3
  import "../../../web3-validator/lib/esm/formats.js";
4
4
  import { isHexStrict as y } from "../../../web3-validator/lib/esm/validation/string.js";
@@ -7,42 +7,42 @@ import "../../../web3-types/lib/esm/data_format_types.js";
7
7
  import "../../../web3-types/lib/esm/eth_types.js";
8
8
  import "../../../web3-types/lib/esm/web3_base_provider.js";
9
9
  import { interfaceIds as f, methodsInInterface as c } from "./config.js";
10
- import { namehash as a } from "./utils.js";
11
- import { sha3 as I } from "../../../web3-utils/lib/esm/hash.js";
12
- import { isNullish as w } from "../../../web3-utils/lib/esm/validation.js";
13
- var s = function(l, t, e, r) {
10
+ import { namehash as d } from "./utils.js";
11
+ import { sha3 as g } from "../../../web3-utils/lib/esm/hash.js";
12
+ import { isNullish as C } from "../../../web3-utils/lib/esm/validation.js";
13
+ var i = function(h, t, e, r) {
14
14
  function n(o) {
15
- return o instanceof e ? o : new e(function(d) {
16
- d(o);
15
+ return o instanceof e ? o : new e(function(a) {
16
+ a(o);
17
17
  });
18
18
  }
19
- return new (e || (e = Promise))(function(o, d) {
20
- function v(i) {
19
+ return new (e || (e = Promise))(function(o, a) {
20
+ function v(s) {
21
21
  try {
22
- u(r.next(i));
23
- } catch (p) {
24
- d(p);
22
+ l(r.next(s));
23
+ } catch (u) {
24
+ a(u);
25
25
  }
26
26
  }
27
- function m(i) {
27
+ function m(s) {
28
28
  try {
29
- u(r.throw(i));
30
- } catch (p) {
31
- d(p);
29
+ l(r.throw(s));
30
+ } catch (u) {
31
+ a(u);
32
32
  }
33
33
  }
34
- function u(i) {
35
- i.done ? o(i.value) : n(i.value).then(v, m);
34
+ function l(s) {
35
+ s.done ? o(s.value) : n(s.value).then(v, m);
36
36
  }
37
- u((r = r.apply(l, t || [])).next());
37
+ l((r = r.apply(h, t || [])).next());
38
38
  });
39
39
  };
40
- class q {
40
+ class j {
41
41
  constructor(t) {
42
42
  this.registry = t;
43
43
  }
44
44
  getResolverContractAdapter(t) {
45
- return s(this, void 0, void 0, function* () {
45
+ return i(this, void 0, void 0, function* () {
46
46
  return this.registry.getResolver(t);
47
47
  });
48
48
  }
@@ -50,20 +50,20 @@ class q {
50
50
  // eslint-disable-next-line class-methods-use-this
51
51
  checkInterfaceSupport(t, e) {
52
52
  var r, n;
53
- return s(this, void 0, void 0, function* () {
54
- if (w(f[e]))
55
- throw new h((r = t.options.address) !== null && r !== void 0 ? r : "", e);
53
+ return i(this, void 0, void 0, function* () {
54
+ if (C(f[e]))
55
+ throw new p((r = t.options.address) !== null && r !== void 0 ? r : "", e);
56
56
  if (!(yield t.methods.supportsInterface(f[e]).call()))
57
- throw new h((n = t.options.address) !== null && n !== void 0 ? n : "", e);
57
+ throw new p((n = t.options.address) !== null && n !== void 0 ? n : "", e);
58
58
  });
59
59
  }
60
60
  supportsInterface(t, e) {
61
61
  var r;
62
- return s(this, void 0, void 0, function* () {
62
+ return i(this, void 0, void 0, function* () {
63
63
  const n = yield this.getResolverContractAdapter(t);
64
64
  let o = e;
65
65
  if (!y(o)) {
66
- if (o = (r = I(e)) !== null && r !== void 0 ? r : "", e === "")
66
+ if (o = (r = g(e)) !== null && r !== void 0 ? r : "", e === "")
67
67
  throw new Error("Invalid interface Id");
68
68
  o = o.slice(0, 10);
69
69
  }
@@ -72,30 +72,42 @@ class q {
72
72
  }
73
73
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
74
74
  getAddress(t, e = 60) {
75
- return s(this, void 0, void 0, function* () {
75
+ return i(this, void 0, void 0, function* () {
76
76
  const r = yield this.getResolverContractAdapter(t);
77
- return yield this.checkInterfaceSupport(r, c.addr), r.methods.addr(a(t), e).call();
77
+ return yield this.checkInterfaceSupport(r, c.addr), r.methods.addr(d(t), e).call();
78
78
  });
79
79
  }
80
80
  getPubkey(t) {
81
- return s(this, void 0, void 0, function* () {
81
+ return i(this, void 0, void 0, function* () {
82
82
  const e = yield this.getResolverContractAdapter(t);
83
- return yield this.checkInterfaceSupport(e, c.pubkey), e.methods.pubkey(a(t)).call();
83
+ return yield this.checkInterfaceSupport(e, c.pubkey), e.methods.pubkey(d(t)).call();
84
84
  });
85
85
  }
86
86
  getContenthash(t) {
87
- return s(this, void 0, void 0, function* () {
87
+ return i(this, void 0, void 0, function* () {
88
88
  const e = yield this.getResolverContractAdapter(t);
89
- return yield this.checkInterfaceSupport(e, c.contenthash), e.methods.contenthash(a(t)).call();
89
+ return yield this.checkInterfaceSupport(e, c.contenthash), e.methods.contenthash(d(t)).call();
90
90
  });
91
91
  }
92
92
  setAddress(t, e, r) {
93
- return s(this, void 0, void 0, function* () {
93
+ return i(this, void 0, void 0, function* () {
94
94
  const n = yield this.getResolverContractAdapter(t);
95
- return yield this.checkInterfaceSupport(n, c.setAddr), n.methods.setAddr(a(t), e).send(r);
95
+ return yield this.checkInterfaceSupport(n, c.setAddr), n.methods.setAddr(d(t), e).send(r);
96
+ });
97
+ }
98
+ getText(t, e) {
99
+ return i(this, void 0, void 0, function* () {
100
+ const r = yield this.getResolverContractAdapter(t);
101
+ return yield this.checkInterfaceSupport(r, c.text), r.methods.text(d(t), e).call();
102
+ });
103
+ }
104
+ getName(t) {
105
+ return i(this, void 0, void 0, function* () {
106
+ const e = yield this.getResolverContractAdapter(t);
107
+ return yield this.checkInterfaceSupport(e, c.name), e.methods.name(d(t)).call();
96
108
  });
97
109
  }
98
110
  }
99
111
  export {
100
- q as Resolver
112
+ j as Resolver
101
113
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../../../web3-errors/lib/esm/errors/response_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");class i{constructor(e,t){this.eventEmitter=e,this.autoReconnect=t,this.chunkTimout=1e3*15}clearQueues(){typeof this._clearQueues=="function"&&this._clearQueues()}onError(e){this._clearQueues=e}parseResponse(e){const t=[];return e.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach(u=>{let s=u;this.lastChunk&&(s=this.lastChunk+s);let r;try{r=JSON.parse(s)}catch{this.lastChunk=s,this.lastChunkTimeout&&clearTimeout(this.lastChunkTimeout),this.lastChunkTimeout=setTimeout(()=>{this.autoReconnect||(this.clearQueues(),this.eventEmitter.emit("error",new n.InvalidResponseError({id:1,jsonrpc:"2.0",error:{code:2,message:"Chunk timeout"}})))},this.chunkTimout);return}clearTimeout(this.lastChunkTimeout),this.lastChunk=void 0,r&&t.push(r)}),t}}exports.ChunkResponseParser=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../../../web3-errors/lib/esm/errors/response_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");class i{constructor(e,t){this.eventEmitter=e,this.autoReconnect=t,this.chunkTimeout=1e3*15}clearQueues(){typeof this._clearQueues=="function"&&this._clearQueues()}onError(e){this._clearQueues=e}parseResponse(e){const t=[];return e.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach(u=>{let s=u;this.lastChunk&&(s=this.lastChunk+s);let r;try{r=JSON.parse(s)}catch{this.lastChunk=s,this.lastChunkTimeout&&clearTimeout(this.lastChunkTimeout),this.lastChunkTimeout=setTimeout(()=>{this.autoReconnect||(this.clearQueues(),this.eventEmitter.emit("error",new n.InvalidResponseError({id:1,jsonrpc:"2.0",error:{code:2,message:"Chunk timeout"}})))},this.chunkTimeout);return}clearTimeout(this.lastChunkTimeout),this.lastChunk=void 0,r&&t.push(r)}),t}}exports.ChunkResponseParser=i;
@@ -2,7 +2,7 @@ import { InvalidResponseError as i } from "../../../web3-errors/lib/esm/errors/r
2
2
  import "../../../web3-errors/lib/esm/errors/rpc_errors.js";
3
3
  class l {
4
4
  constructor(e, t) {
5
- this.eventEmitter = e, this.autoReconnect = t, this.chunkTimout = 1e3 * 15;
5
+ this.eventEmitter = e, this.autoReconnect = t, this.chunkTimeout = 1e3 * 15;
6
6
  }
7
7
  clearQueues() {
8
8
  typeof this._clearQueues == "function" && this._clearQueues();
@@ -25,7 +25,7 @@ class l {
25
25
  jsonrpc: "2.0",
26
26
  error: { code: 2, message: "Chunk timeout" }
27
27
  })));
28
- }, this.chunkTimout);
28
+ }, this.chunkTimeout);
29
29
  return;
30
30
  }
31
31
  clearTimeout(this.lastChunkTimeout), this.lastChunk = void 0, r && t.push(r);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../../../ethereum-cryptography/esm/keccak.cjs"),p=require("../../../ethereum-cryptography/esm/utils.cjs"),c=require("../../../web3-errors/lib/esm/errors/utils_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");require("../../../web3-validator/lib/esm/formats.cjs");const d=require("../../../web3-validator/lib/esm/utils.cjs"),f=require("../../../web3-validator/lib/esm/default_validator.cjs"),S=require("../../../web3-validator/lib/esm/validation/address.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 m=require("../../../web3-validator/lib/esm/validation/numbers.cjs"),s=require("../../../web3-validator/lib/esm/validation/string.cjs"),q=require("../../../web3-validator/lib/esm/validation/object.cjs"),E=require("./uint8array.cjs"),$=require("../../../@noble/hashes/esm/utils.cjs"),u={noether:BigInt(0),wei:BigInt(1),kwei:BigInt(1e3),Kwei:BigInt(1e3),babbage:BigInt(1e3),femtoether:BigInt(1e3),mwei:BigInt(1e6),Mwei:BigInt(1e6),lovelace:BigInt(1e6),picoether:BigInt(1e6),gwei:BigInt(1e9),Gwei:BigInt(1e9),shannon:BigInt(1e9),nanoether:BigInt(1e9),nano:BigInt(1e9),szabo:BigInt(1e12),microether:BigInt(1e12),micro:BigInt(1e12),finney:BigInt(1e15),milliether:BigInt(1e15),milli:BigInt(1e15),ether:BigInt("1000000000000000000"),kether:BigInt("1000000000000000000000"),grand:BigInt("1000000000000000000000"),mether:BigInt("1000000000000000000000000"),gether:BigInt("1000000000000000000000000000"),tether:BigInt("1000000000000000000000000000000")},B=t=>{if(f.validator.validate(["bytes"],[t]),E.isUint8Array(t))return t;if(Array.isArray(t))return new Uint8Array(t);if(typeof t=="string")return d.hexToUint8Array(t);throw new c.InvalidBytesError(t)},{uint8ArrayToHexString:C}=d,A=t=>C(B(t)),w=t=>typeof t=="string"&&t.slice(0,2).toLowerCase()!=="0x"?B(`0x${t}`):B(t),a=t=>(f.validator.validate(["hex"],[t]),d.hexToNumber(t)),W=a,h=(t,r)=>{typeof t!="bigint"&&f.validator.validate(["int"],[t]);let i=d.numberToHex(t);return r&&(!i.startsWith("-")&&i.length%2===1?i="0x0".concat(i.slice(2)):i.length%2===0&&i.startsWith("-")&&(i="-0x0".concat(i.slice(3)))),i},k=h,D=t=>a(t).toString(),I=t=>{f.validator.validate(["string"],[t]);let r=t.replace(/^(?:\u0000)/,"");return r=r.replace(/(?:\u0000)$/,""),A(new TextEncoder().encode(r))},M=I,_=I,T=t=>p.bytesToUtf8(w(t)),O=t=>typeof t=="string"?T(t):(f.validator.validate(["bytes"],[t]),p.bytesToUtf8(t)),H=$.utf8ToBytes,j=T,U=t=>{f.validator.validate(["string"],[t]);let r="";for(let i=0;i<t.length;i+=1){const e=t.charCodeAt(i).toString(16);r+=e.length%2!==0?`0${e}`:e}return`0x${r}`},F=U,N=t=>new TextDecoder("ascii").decode(w(t)),G=N,L=(t,r)=>{if(typeof t=="string"&&S.isAddress(t))return r?"address":`0x${t.toLowerCase().replace(/^0x/i,"")}`;if(typeof t=="boolean")return r?"bool":t?"0x01":"0x00";if(typeof t=="number")return r?t<0?"int256":"uint256":h(t);if(typeof t=="bigint")return r?"bigint":h(t);if(typeof t=="object"&&t)return r?"string":I(JSON.stringify(t));if(typeof t=="string"){if(t.startsWith("-0x")||t.startsWith("-0X"))return r?"int256":h(t);if(s.isHexStrict(t))return r?"bytes":t;if(s.isHex(t)&&!m.isInt(t)&&!m.isUInt(t))return r?"bytes":`0x${t}`;if(s.isHex(t)&&!m.isInt(t)&&m.isUInt(t))return r?"uint":h(t);if(!Number.isFinite(t))return r?"string":I(t)}throw new c.HexProcessingError(t)},b=t=>{if(typeof t=="number")return t;if(typeof t=="bigint")return t>=Number.MIN_SAFE_INTEGER&&t<=Number.MAX_SAFE_INTEGER?Number(t):t;if(typeof t=="string"&&s.isHexStrict(t))return a(t);try{return b(BigInt(t))}catch{throw new c.InvalidNumberError(t)}},P=t=>{if(typeof t=="number")return BigInt(t);if(typeof t=="bigint")return t;if(typeof t=="string"&&s.isHex(t))return t.startsWith("-")?-BigInt(t.substring(1)):BigInt(t);throw new c.InvalidNumberError(t)},V=(t,r)=>{const i=u[r];if(!i)throw new c.InvalidUnitError(r);const e=String(b(t)),n=i.toString().length-1;if(n<=0)return e.toString();const o=e.padStart(n,"0"),g=o.slice(0,-n),x=o.slice(-n).replace(/\.?0+$/,"");return g===""?`0.${x}`:x===""?g:`${g}.${x}`},z=(t,r)=>{f.validator.validate(["number"],[t]);const i=u[r];if(!i)throw new c.InvalidUnitError(r);const[e,n]=String(typeof t=="string"&&!s.isHexStrict(t)?t:b(t)).split(".").concat(""),g=BigInt(`${e}${n}`)*i,x=i.toString().length-1,y=Math.min(n.length,x);return y===0?g.toString():g.toString().padStart(y,"0").slice(0,-y)},R=t=>{if(!S.isAddress(t,!1))throw new c.InvalidAddressError(t);const r=t.toLowerCase().replace(/^0x/i,""),i=d.uint8ArrayToHexString(l.keccak256(d.ensureIfUint8Array(H(r))));if(q.isNullish(i)||i==="0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470")return"";let e="0x";const n=i.replace(/^0x/i,"");for(let o=0;o<r.length;o+=1)parseInt(n[o],16)>7?e+=r[o].toUpperCase():e+=r[o];return e},X=t=>{if(typeof t=="boolean")return t;if(typeof t=="number"&&(t===0||t===1)||typeof t=="bigint"&&(t===BigInt(0)||t===BigInt(1)))return!!t;if(typeof t=="string"&&!s.isHexStrict(t)&&(t==="1"||t==="0"||t==="false"||t==="true"))return t==="true"?!0:t==="false"?!1:!!Number(t);if(typeof t=="string"&&s.isHexStrict(t)&&(t==="0x1"||t==="0x0"))return!!b(t);throw new c.InvalidBooleanError(t)};exports.asciiToHex=U;exports.bytesToHex=A;exports.bytesToUint8Array=B;exports.ethUnitMap=u;exports.fromAscii=F;exports.fromDecimal=k;exports.fromUtf8=M;exports.fromWei=V;exports.hexToAscii=N;exports.hexToBytes=w;exports.hexToNumber=a;exports.hexToNumberString=D;exports.hexToString=j;exports.hexToUtf8=T;exports.numberToHex=h;exports.stringToHex=_;exports.toAscii=G;exports.toBigInt=P;exports.toBool=X;exports.toChecksumAddress=R;exports.toDecimal=W;exports.toHex=L;exports.toNumber=b;exports.toUtf8=O;exports.toWei=z;exports.utf8ToBytes=H;exports.utf8ToHex=I;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../../../ethereum-cryptography/esm/keccak.cjs"),S=require("../../../ethereum-cryptography/esm/utils.cjs"),c=require("../../../web3-errors/lib/esm/errors/utils_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");require("../../../web3-validator/lib/esm/formats.cjs");const d=require("../../../web3-validator/lib/esm/utils.cjs"),f=require("../../../web3-validator/lib/esm/default_validator.cjs"),p=require("../../../web3-validator/lib/esm/validation/address.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 m=require("../../../web3-validator/lib/esm/validation/numbers.cjs"),s=require("../../../web3-validator/lib/esm/validation/string.cjs"),E=require("../../../web3-validator/lib/esm/validation/object.cjs"),H=require("./uint8array.cjs"),$=require("../../../@noble/hashes/esm/utils.cjs"),w={noether:BigInt(0),wei:BigInt(1),kwei:BigInt(1e3),Kwei:BigInt(1e3),babbage:BigInt(1e3),femtoether:BigInt(1e3),mwei:BigInt(1e6),Mwei:BigInt(1e6),lovelace:BigInt(1e6),picoether:BigInt(1e6),gwei:BigInt(1e9),Gwei:BigInt(1e9),shannon:BigInt(1e9),nanoether:BigInt(1e9),nano:BigInt(1e9),szabo:BigInt(1e12),microether:BigInt(1e12),micro:BigInt(1e12),finney:BigInt(1e15),milliether:BigInt(1e15),milli:BigInt(1e15),ether:BigInt("1000000000000000000"),kether:BigInt("1000000000000000000000"),grand:BigInt("1000000000000000000000"),mether:BigInt("1000000000000000000000000"),gether:BigInt("1000000000000000000000000000"),tether:BigInt("1000000000000000000000000000000")},B=t=>{if(f.validator.validate(["bytes"],[t]),H.isUint8Array(t))return t;if(Array.isArray(t))return new Uint8Array(t);if(typeof t=="string")return d.hexToUint8Array(t);throw new c.InvalidBytesError(t)},{uint8ArrayToHexString:C}=d,T=t=>C(B(t)),u=t=>typeof t=="string"&&t.slice(0,2).toLowerCase()!=="0x"?B(`0x${t}`):B(t),y=t=>(f.validator.validate(["hex"],[t]),d.hexToNumber(t)),W=y,h=(t,r)=>{typeof t!="bigint"&&f.validator.validate(["int"],[t]);let i=d.numberToHex(t);return r&&(!i.startsWith("-")&&i.length%2===1?i="0x0".concat(i.slice(2)):i.length%2===0&&i.startsWith("-")&&(i="-0x0".concat(i.slice(3)))),i},k=h,D=t=>y(t).toString(),I=t=>{f.validator.validate(["string"],[t]);let r=t.replace(/^(?:\u0000)/,"");return r=r.replace(/(?:\u0000)$/,""),T(new TextEncoder().encode(r))},M=I,_=I,A=t=>S.bytesToUtf8(u(t)),O=t=>typeof t=="string"?A(t):(f.validator.validate(["bytes"],[t]),S.bytesToUtf8(t)),U=$.utf8ToBytes,j=A,N=t=>{f.validator.validate(["string"],[t]);let r="";for(let i=0;i<t.length;i+=1){const n=t.charCodeAt(i).toString(16);r+=n.length%2!==0?`0${n}`:n}return`0x${r}`},F=N,q=t=>new TextDecoder("ascii").decode(u(t)),G=q,L=(t,r)=>{if(typeof t=="string"&&p.isAddress(t))return r?"address":`0x${t.toLowerCase().replace(/^0x/i,"")}`;if(typeof t=="boolean")return r?"bool":t?"0x01":"0x00";if(typeof t=="number")return r?t<0?"int256":"uint256":h(t);if(typeof t=="bigint")return r?"bigint":h(t);if(H.isUint8Array(t))return r?"bytes":T(t);if(typeof t=="object"&&t)return r?"string":I(JSON.stringify(t));if(typeof t=="string"){if(t.startsWith("-0x")||t.startsWith("-0X"))return r?"int256":h(t);if(s.isHexStrict(t))return r?"bytes":t;if(s.isHex(t)&&!m.isInt(t)&&!m.isUInt(t))return r?"bytes":`0x${t}`;if(s.isHex(t)&&!m.isInt(t)&&m.isUInt(t))return r?"uint":h(t);if(!Number.isFinite(t))return r?"string":I(t)}throw new c.HexProcessingError(t)},b=t=>{if(typeof t=="number")return t>1e20?BigInt(t):t;if(typeof t=="bigint")return t>=Number.MIN_SAFE_INTEGER&&t<=Number.MAX_SAFE_INTEGER?Number(t):t;if(typeof t=="string"&&s.isHexStrict(t))return y(t);try{return b(BigInt(t))}catch{throw new c.InvalidNumberError(t)}},P=t=>{if(typeof t=="number")return BigInt(t);if(typeof t=="bigint")return t;if(typeof t=="string"&&s.isHex(t))return t.startsWith("-")?-BigInt(t.substring(1)):BigInt(t);throw new c.InvalidNumberError(t)},V=(t,r)=>{const i=w[r];if(!i)throw new c.InvalidUnitError(r);const n=String(b(t)),e=i.toString().length-1;if(e<=0)return n.toString();const o=n.padStart(e,"0"),g=o.slice(0,-e),x=o.slice(-e).replace(/\.?0+$/,"");return g===""?`0.${x}`:x===""?g:`${g}.${x}`},z=(t,r)=>{f.validator.validate(["number"],[t]);const i=w[r];if(!i)throw new c.InvalidUnitError(r);const[n,e]=String(typeof t=="string"&&!s.isHexStrict(t)?t:b(t)).split(".").concat(""),g=BigInt(`${n}${e}`)*i,x=i.toString().length-1,a=Math.min(e.length,x);return a===0?g.toString():g.toString().padStart(a,"0").slice(0,-a)},R=t=>{if(!p.isAddress(t,!1))throw new c.InvalidAddressError(t);const r=t.toLowerCase().replace(/^0x/i,""),i=d.uint8ArrayToHexString(l.keccak256(d.ensureIfUint8Array(U(r))));if(E.isNullish(i)||i==="0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470")return"";let n="0x";const e=i.replace(/^0x/i,"");for(let o=0;o<r.length;o+=1)parseInt(e[o],16)>7?n+=r[o].toUpperCase():n+=r[o];return n},X=t=>{if(typeof t=="boolean")return t;if(typeof t=="number"&&(t===0||t===1)||typeof t=="bigint"&&(t===BigInt(0)||t===BigInt(1)))return!!t;if(typeof t=="string"&&!s.isHexStrict(t)&&(t==="1"||t==="0"||t==="false"||t==="true"))return t==="true"?!0:t==="false"?!1:!!Number(t);if(typeof t=="string"&&s.isHexStrict(t)&&(t==="0x1"||t==="0x0"))return!!b(t);throw new c.InvalidBooleanError(t)};exports.asciiToHex=N;exports.bytesToHex=T;exports.bytesToUint8Array=B;exports.ethUnitMap=w;exports.fromAscii=F;exports.fromDecimal=k;exports.fromUtf8=M;exports.fromWei=V;exports.hexToAscii=q;exports.hexToBytes=u;exports.hexToNumber=y;exports.hexToNumberString=D;exports.hexToString=j;exports.hexToUtf8=A;exports.numberToHex=h;exports.stringToHex=_;exports.toAscii=G;exports.toBigInt=P;exports.toBool=X;exports.toChecksumAddress=R;exports.toDecimal=W;exports.toHex=L;exports.toNumber=b;exports.toUtf8=O;exports.toWei=z;exports.utf8ToBytes=U;exports.utf8ToHex=I;