@ozdao/prometheus-framework 0.2.89 → 0.2.91
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.server.js +1 -0
- package/dist/auth.server.mjs +1 -0
- package/dist/main-BQisDfLk.js +92 -0
- package/dist/main-BV1Yv9Hy.js +92 -0
- package/dist/main-DTlUA63C.mjs +13617 -0
- package/dist/main-DmNP-t33.mjs +13625 -0
- package/dist/main.css +1 -1
- package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.cjs +1 -1
- package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +748 -750
- package/dist/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.cjs +1 -1
- package/dist/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js +40 -39
- package/dist/node_modules/web3/lib/esm/index.cjs +1 -1
- package/dist/node_modules/web3/lib/esm/index.js +42 -41
- package/dist/node_modules/web3/lib/esm/version.cjs +1 -1
- package/dist/node_modules/web3/lib/esm/version.js +1 -1
- package/dist/node_modules/web3-eth/lib/esm/schemas.cjs +1 -1
- package/dist/node_modules/web3-eth/lib/esm/schemas.js +113 -88
- package/dist/node_modules/web3-eth-contract/lib/esm/contract.cjs +3 -1
- package/dist/node_modules/web3-eth-contract/lib/esm/contract.js +242 -217
- package/dist/node_modules/web3-eth-contract/lib/esm/encoding.cjs +1 -1
- package/dist/node_modules/web3-eth-contract/lib/esm/encoding.js +43 -37
- package/dist/node_modules/web3-eth-ens/lib/esm/config.cjs +1 -1
- package/dist/node_modules/web3-eth-ens/lib/esm/config.js +3 -1
- package/dist/node_modules/web3-eth-ens/lib/esm/ens.cjs +1 -1
- package/dist/node_modules/web3-eth-ens/lib/esm/ens.js +34 -13
- package/dist/node_modules/web3-eth-ens/lib/esm/resolver.cjs +1 -1
- package/dist/node_modules/web3-eth-ens/lib/esm/resolver.js +48 -36
- package/dist/node_modules/web3-utils/lib/esm/chunk_response_parser.cjs +1 -1
- package/dist/node_modules/web3-utils/lib/esm/chunk_response_parser.js +2 -2
- package/dist/node_modules/web3-utils/lib/esm/converters.cjs +1 -1
- package/dist/node_modules/web3-utils/lib/esm/converters.js +52 -50
- package/dist/node_modules/web3-utils/lib/esm/uint8array.cjs +1 -1
- package/dist/node_modules/web3-utils/lib/esm/uint8array.js +13 -13
- package/dist/node_modules/web3-validator/lib/esm/utils.cjs +1 -1
- package/dist/node_modules/web3-validator/lib/esm/utils.js +76 -87
- package/dist/node_modules/web3-validator/lib/esm/validator.cjs +1 -1
- package/dist/node_modules/web3-validator/lib/esm/validator.js +49 -47
- package/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.cjs +1 -1
- package/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.js +168 -158
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +94 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +1 -102
- package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue.js +84 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js +1 -84
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +17 -16
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +73 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +1 -73
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +9 -8
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +28 -29
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +65 -65
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +38 -39
- package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.js +35 -37
- package/dist/prometheus-framework/src/modules/auth/store/twofa.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/twofa.js +3 -3
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +11 -10
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +4 -3
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +6 -5
- package/dist/prometheus-framework/src/modules/middlewares/client/inputs.validation.cjs +1 -1
- package/dist/prometheus-framework/src/modules/middlewares/client/inputs.validation.js +10 -13
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +13 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +1 -13
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +6 -5
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +6 -5
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js +20 -25
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +8 -7
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +6 -5
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +5 -4
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/web-Bk_OtXgv.js +1 -0
- package/dist/web-CXzcKdk4.mjs +54 -0
- package/dist/web-D9Cfcy5k.js +1 -0
- package/dist/web-VFuzUsNl.mjs +54 -0
- package/package.json +1 -1
- package/src/components/Button/Button.vue +5 -8
- package/src/components/FieldPhone/FieldPhone.vue +4 -0
- package/src/modules/auth/components/pages/ResetPassword.vue +1 -1
- package/src/modules/auth/components/pages/SignIn.vue +3 -3
- package/src/modules/auth/components/pages/SignUp.vue +1 -1
- package/src/modules/auth/controllers/auth.controller.js +1 -0
- package/src/modules/auth/store/auth.js +3 -5
- package/src/modules/auth/store/twofa.js +1 -1
- package/src/modules/middlewares/client/inputs.validation.js +0 -13
@@ -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"),
|
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
|
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
|
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
|
7
|
-
import { encodeEventSignature as
|
8
|
-
import { encodeFunctionSignature as
|
9
|
-
import { encodeParameter as f, decodeParameters as
|
10
|
-
import { encodeParameters as _, inferTypesAndEncodeParameters as
|
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
|
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
|
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
|
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 : {},
|
34
|
-
if (
|
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:
|
37
|
-
})),
|
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:
|
39
|
+
bytes: l.HEX
|
40
40
|
})), c && Array.isArray(c))
|
41
|
-
|
42
|
-
else if (
|
43
|
-
for (const
|
44
|
-
if (!
|
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
|
47
|
-
if (!
|
48
|
-
|
46
|
+
const m = y[s.name];
|
47
|
+
if (!m) {
|
48
|
+
o.topics.push(null);
|
49
49
|
continue;
|
50
50
|
}
|
51
|
-
Array.isArray(
|
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
|
54
|
-
}, ir = (
|
55
|
-
const i = Array.isArray(
|
56
|
-
if (
|
57
|
-
throw new
|
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 (
|
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
|
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 `${
|
65
|
-
}, nr = (
|
66
|
-
|
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 (!
|
76
|
+
if (!e.outputs)
|
72
77
|
return null;
|
73
|
-
const i =
|
78
|
+
const i = g([...e.outputs], r);
|
74
79
|
return i.__length__ === 1 ? i[0] : i;
|
75
80
|
};
|
76
81
|
export {
|
77
|
-
nr as
|
78
|
-
|
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"},
|
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
|
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
|
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
|
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
|
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
|
26
|
+
import { registryAddresses as f, networkIds as k } from "./config.js";
|
27
27
|
import { Registry as E } from "./registry.js";
|
28
|
-
import { Resolver as
|
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
|
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
|
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(
|
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 ??
|
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
|
223
|
+
const s = yield y(this);
|
203
224
|
if (!(typeof s == "boolean" && !s))
|
204
|
-
throw new
|
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:
|
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
|
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
|
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
|
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
|
11
|
-
import { sha3 as
|
12
|
-
import { isNullish as
|
13
|
-
var
|
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(
|
16
|
-
|
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,
|
20
|
-
function v(
|
19
|
+
return new (e || (e = Promise))(function(o, a) {
|
20
|
+
function v(s) {
|
21
21
|
try {
|
22
|
-
|
23
|
-
} catch (
|
24
|
-
|
22
|
+
l(r.next(s));
|
23
|
+
} catch (u) {
|
24
|
+
a(u);
|
25
25
|
}
|
26
26
|
}
|
27
|
-
function m(
|
27
|
+
function m(s) {
|
28
28
|
try {
|
29
|
-
|
30
|
-
} catch (
|
31
|
-
|
29
|
+
l(r.throw(s));
|
30
|
+
} catch (u) {
|
31
|
+
a(u);
|
32
32
|
}
|
33
33
|
}
|
34
|
-
function
|
35
|
-
|
34
|
+
function l(s) {
|
35
|
+
s.done ? o(s.value) : n(s.value).then(v, m);
|
36
36
|
}
|
37
|
-
|
37
|
+
l((r = r.apply(h, t || [])).next());
|
38
38
|
});
|
39
39
|
};
|
40
|
-
class
|
40
|
+
class j {
|
41
41
|
constructor(t) {
|
42
42
|
this.registry = t;
|
43
43
|
}
|
44
44
|
getResolverContractAdapter(t) {
|
45
|
-
return
|
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
|
54
|
-
if (
|
55
|
-
throw new
|
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
|
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
|
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 =
|
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
|
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(
|
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
|
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(
|
83
|
+
return yield this.checkInterfaceSupport(e, c.pubkey), e.methods.pubkey(d(t)).call();
|
84
84
|
});
|
85
85
|
}
|
86
86
|
getContenthash(t) {
|
87
|
-
return
|
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(
|
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
|
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(
|
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
|
-
|
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.
|
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.
|
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.
|
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"),
|
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;
|