@ensdomains/ensjs 4.1.2 → 5.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/dns/getDnsImportData.d.ts +38 -0
- package/dist/actions/dns/getDnsImportData.d.ts.map +1 -0
- package/dist/actions/dns/getDnsImportData.js +60 -0
- package/dist/actions/dns/getDnsImportData.js.map +1 -0
- package/dist/actions/dns/getDnsOffchainData.d.ts +40 -0
- package/dist/actions/dns/getDnsOffchainData.d.ts.map +1 -0
- package/dist/actions/dns/getDnsOffchainData.js +104 -0
- package/dist/actions/dns/getDnsOffchainData.js.map +1 -0
- package/dist/actions/dns/getDnsOwner.d.ts +27 -0
- package/dist/actions/dns/getDnsOwner.d.ts.map +1 -0
- package/dist/actions/dns/getDnsOwner.js +53 -0
- package/dist/actions/dns/getDnsOwner.js.map +1 -0
- package/dist/actions/dns/importDnsName.d.ts +64 -0
- package/dist/actions/dns/importDnsName.d.ts.map +1 -0
- package/dist/actions/dns/importDnsName.js +85 -0
- package/dist/actions/dns/importDnsName.js.map +1 -0
- package/dist/actions/dns/types.d.ts +2 -0
- package/dist/actions/dns/types.d.ts.map +1 -0
- package/dist/actions/dns/types.js.map +1 -0
- package/dist/actions/public/findResolver.d.ts +7 -0
- package/dist/actions/public/findResolver.d.ts.map +1 -0
- package/dist/actions/public/findResolver.js +5 -0
- package/dist/actions/public/findResolver.js.map +1 -0
- package/dist/actions/public/getAbiRecord.d.ts +32 -0
- package/dist/actions/public/getAbiRecord.d.ts.map +1 -0
- package/dist/actions/public/getAbiRecord.js +35 -0
- package/dist/actions/public/getAbiRecord.js.map +1 -0
- package/dist/actions/public/getAddressRecord.d.ts +32 -0
- package/dist/actions/public/getAddressRecord.d.ts.map +1 -0
- package/dist/actions/public/getAddressRecord.js +35 -0
- package/dist/actions/public/getAddressRecord.js.map +1 -0
- package/dist/actions/public/getAvailable.d.ts +31 -0
- package/dist/actions/public/getAvailable.d.ts.map +1 -0
- package/dist/actions/public/getAvailable.js +49 -0
- package/dist/actions/public/getAvailable.js.map +1 -0
- package/dist/actions/public/getContentHashRecord.d.ts +32 -0
- package/dist/actions/public/getContentHashRecord.d.ts.map +1 -0
- package/dist/actions/public/getContentHashRecord.js +35 -0
- package/dist/actions/public/getContentHashRecord.js.map +1 -0
- package/dist/actions/public/getCredentials.d.ts +32 -0
- package/dist/actions/public/getCredentials.d.ts.map +1 -0
- package/dist/actions/public/getCredentials.js +41 -0
- package/dist/actions/public/getCredentials.js.map +1 -0
- package/dist/actions/public/getExpiry.d.ts +45 -0
- package/dist/actions/public/getExpiry.d.ts.map +1 -0
- package/dist/actions/public/getExpiry.js +156 -0
- package/dist/actions/public/getExpiry.js.map +1 -0
- package/dist/actions/public/getName.d.ts +62 -0
- package/dist/actions/public/getName.d.ts.map +1 -0
- package/dist/actions/public/getName.js +90 -0
- package/dist/actions/public/getName.js.map +1 -0
- package/dist/actions/public/getOwner.d.ts +61 -0
- package/dist/actions/public/getOwner.d.ts.map +1 -0
- package/dist/actions/public/getOwner.js +163 -0
- package/dist/actions/public/getOwner.js.map +1 -0
- package/dist/actions/public/getPrice.d.ts +37 -0
- package/dist/actions/public/getPrice.d.ts.map +1 -0
- package/dist/actions/public/getPrice.js +61 -0
- package/dist/actions/public/getPrice.js.map +1 -0
- package/dist/actions/public/getRecords.d.ts +79 -0
- package/dist/actions/public/getRecords.d.ts.map +1 -0
- package/dist/actions/public/getRecords.js +160 -0
- package/dist/actions/public/getRecords.js.map +1 -0
- package/dist/actions/public/getResolver.d.ts +30 -0
- package/dist/actions/public/getResolver.d.ts.map +1 -0
- package/dist/actions/public/getResolver.js +43 -0
- package/dist/actions/public/getResolver.js.map +1 -0
- package/dist/actions/public/getResolverName.d.ts +30 -0
- package/dist/actions/public/getResolverName.d.ts.map +1 -0
- package/dist/actions/public/getResolverName.js +35 -0
- package/dist/actions/public/getResolverName.js.map +1 -0
- package/dist/actions/public/getSupportedInterfaces.d.ts +34 -0
- package/dist/actions/public/getSupportedInterfaces.d.ts.map +1 -0
- package/dist/actions/public/getSupportedInterfaces.js +40 -0
- package/dist/actions/public/getSupportedInterfaces.js.map +1 -0
- package/dist/actions/public/getTextRecord.d.ts +32 -0
- package/dist/actions/public/getTextRecord.d.ts.map +1 -0
- package/dist/actions/public/getTextRecord.js +37 -0
- package/dist/actions/public/getTextRecord.js.map +1 -0
- package/dist/actions/public/getWrapperData.d.ts +39 -0
- package/dist/actions/public/getWrapperData.d.ts.map +1 -0
- package/dist/actions/public/getWrapperData.js +50 -0
- package/dist/actions/public/getWrapperData.js.map +1 -0
- package/dist/actions/public/getWrapperName.d.ts +30 -0
- package/dist/actions/public/getWrapperName.d.ts.map +1 -0
- package/dist/actions/public/getWrapperName.js +43 -0
- package/dist/actions/public/getWrapperName.js.map +1 -0
- package/dist/actions/public/resolveNameData.d.ts +30 -0
- package/dist/actions/public/resolveNameData.d.ts.map +1 -0
- package/dist/actions/public/resolveNameData.js +91 -0
- package/dist/actions/public/resolveNameData.js.map +1 -0
- package/dist/actions/public/v2/getResolverName.d.ts +29 -0
- package/dist/actions/public/v2/getResolverName.d.ts.map +1 -0
- package/dist/actions/public/v2/getResolverName.js +35 -0
- package/dist/actions/public/v2/getResolverName.js.map +1 -0
- package/dist/actions/public/v2/getUnderlyingResolver.d.ts +30 -0
- package/dist/actions/public/v2/getUnderlyingResolver.d.ts.map +1 -0
- package/dist/actions/public/v2/getUnderlyingResolver.js +35 -0
- package/dist/actions/public/v2/getUnderlyingResolver.js.map +1 -0
- package/dist/actions/subgraph/client.d.ts +9 -0
- package/dist/actions/subgraph/client.d.ts.map +1 -0
- package/dist/actions/subgraph/client.js +88 -0
- package/dist/actions/subgraph/client.js.map +1 -0
- package/dist/actions/subgraph/events.d.ts +140 -0
- package/dist/actions/subgraph/events.d.ts.map +1 -0
- package/dist/actions/subgraph/events.js.map +1 -0
- package/dist/actions/subgraph/filters.d.ts +702 -0
- package/dist/actions/subgraph/filters.d.ts.map +1 -0
- package/dist/actions/subgraph/filters.js +108 -0
- package/dist/actions/subgraph/filters.js.map +1 -0
- package/dist/actions/subgraph/fragments.d.ts +41 -0
- package/dist/actions/subgraph/fragments.d.ts.map +1 -0
- package/dist/actions/subgraph/fragments.js.map +1 -0
- package/dist/actions/subgraph/getDecodedName.d.ts +33 -0
- package/dist/actions/subgraph/getDecodedName.d.ts.map +1 -0
- package/dist/actions/subgraph/getDecodedName.js +84 -0
- package/dist/actions/subgraph/getDecodedName.js.map +1 -0
- package/dist/actions/subgraph/getNameHistory.d.ts +61 -0
- package/dist/actions/subgraph/getNameHistory.d.ts.map +1 -0
- package/dist/actions/subgraph/getNameHistory.js +202 -0
- package/dist/actions/subgraph/getNameHistory.js.map +1 -0
- package/dist/actions/subgraph/getNamesForAddress.d.ts +69 -0
- package/dist/actions/subgraph/getNamesForAddress.d.ts.map +1 -0
- package/dist/actions/subgraph/getNamesForAddress.js +214 -0
- package/dist/actions/subgraph/getNamesForAddress.js.map +1 -0
- package/dist/actions/subgraph/getRecordHistory.d.ts +13 -0
- package/dist/actions/subgraph/getRecordHistory.d.ts.map +1 -0
- package/dist/actions/subgraph/getRecordHistory.js +76 -0
- package/dist/actions/subgraph/getRecordHistory.js.map +1 -0
- package/dist/actions/subgraph/getResolvedNamesForAddress.d.ts +26 -0
- package/dist/actions/subgraph/getResolvedNamesForAddress.d.ts.map +1 -0
- package/dist/actions/subgraph/getResolvedNamesForAddress.js +29 -0
- package/dist/actions/subgraph/getResolvedNamesForAddress.js.map +1 -0
- package/dist/actions/subgraph/getSubgraphRecords.d.ts +49 -0
- package/dist/actions/subgraph/getSubgraphRecords.d.ts.map +1 -0
- package/dist/actions/subgraph/getSubgraphRecords.js +103 -0
- package/dist/actions/subgraph/getSubgraphRecords.js.map +1 -0
- package/dist/actions/subgraph/getSubgraphRegistrant.d.ts +33 -0
- package/dist/actions/subgraph/getSubgraphRegistrant.d.ts.map +1 -0
- package/dist/actions/subgraph/getSubgraphRegistrant.js +52 -0
- package/dist/actions/subgraph/getSubgraphRegistrant.js.map +1 -0
- package/dist/actions/subgraph/getSubnames.d.ts +47 -0
- package/dist/actions/subgraph/getSubnames.d.ts.map +1 -0
- package/dist/actions/subgraph/getSubnames.js +159 -0
- package/dist/actions/subgraph/getSubnames.js.map +1 -0
- package/dist/actions/subgraph/types.d.ts +13 -0
- package/dist/actions/subgraph/types.d.ts.map +1 -0
- package/dist/actions/subgraph/types.js.map +1 -0
- package/dist/actions/subgraph/utils.d.ts +42 -0
- package/dist/actions/subgraph/utils.d.ts.map +1 -0
- package/dist/actions/subgraph/utils.js +119 -0
- package/dist/actions/subgraph/utils.js.map +1 -0
- package/dist/actions/wallet/clearRecords.d.ts +70 -0
- package/dist/actions/wallet/clearRecords.d.ts.map +1 -0
- package/dist/actions/wallet/clearRecords.js +55 -0
- package/dist/actions/wallet/clearRecords.js.map +1 -0
- package/dist/actions/wallet/commitName.d.ts +171 -0
- package/dist/actions/wallet/commitName.d.ts.map +1 -0
- package/dist/actions/wallet/commitName.js +76 -0
- package/dist/actions/wallet/commitName.js.map +1 -0
- package/dist/actions/wallet/createSubname.d.ts +83 -0
- package/dist/actions/wallet/createSubname.d.ts.map +1 -0
- package/dist/actions/wallet/createSubname.js +173 -0
- package/dist/actions/wallet/createSubname.js.map +1 -0
- package/dist/actions/wallet/deleteSubname.d.ts +481 -0
- package/dist/actions/wallet/deleteSubname.d.ts.map +1 -0
- package/dist/actions/wallet/deleteSubname.js +120 -0
- package/dist/actions/wallet/deleteSubname.js.map +1 -0
- package/dist/actions/wallet/registerName.d.ts +207 -0
- package/dist/actions/wallet/registerName.d.ts.map +1 -0
- package/dist/actions/wallet/registerName.js +94 -0
- package/dist/actions/wallet/registerName.js.map +1 -0
- package/dist/actions/wallet/renewNames.d.ts +131 -0
- package/dist/actions/wallet/renewNames.d.ts.map +1 -0
- package/dist/actions/wallet/renewNames.js +79 -0
- package/dist/actions/wallet/renewNames.js.map +1 -0
- package/dist/actions/wallet/setAbiRecord.d.ts +78 -0
- package/dist/actions/wallet/setAbiRecord.d.ts.map +1 -0
- package/dist/actions/wallet/setAbiRecord.js +58 -0
- package/dist/actions/wallet/setAbiRecord.js.map +1 -0
- package/dist/actions/wallet/setAddressRecord.d.ts +90 -0
- package/dist/actions/wallet/setAddressRecord.d.ts.map +1 -0
- package/dist/actions/wallet/setAddressRecord.js +57 -0
- package/dist/actions/wallet/setAddressRecord.js.map +1 -0
- package/dist/actions/wallet/setChildFuses.d.ts +183 -0
- package/dist/actions/wallet/setChildFuses.d.ts.map +1 -0
- package/dist/actions/wallet/setChildFuses.js +63 -0
- package/dist/actions/wallet/setChildFuses.js.map +1 -0
- package/dist/actions/wallet/setContentHashRecord.d.ts +78 -0
- package/dist/actions/wallet/setContentHashRecord.d.ts.map +1 -0
- package/dist/actions/wallet/setContentHashRecord.js +50 -0
- package/dist/actions/wallet/setContentHashRecord.js.map +1 -0
- package/dist/actions/wallet/setFuses.d.ts +175 -0
- package/dist/actions/wallet/setFuses.d.ts.map +1 -0
- package/dist/actions/wallet/setFuses.js +59 -0
- package/dist/actions/wallet/setFuses.js.map +1 -0
- package/dist/actions/wallet/setPrimaryName.d.ts +197 -0
- package/dist/actions/wallet/setPrimaryName.d.ts.map +1 -0
- package/dist/actions/wallet/setPrimaryName.js +69 -0
- package/dist/actions/wallet/setPrimaryName.js.map +1 -0
- package/dist/actions/wallet/setRecords.d.ts +225 -0
- package/dist/actions/wallet/setRecords.d.ts.map +1 -0
- package/dist/actions/wallet/setRecords.js +81 -0
- package/dist/actions/wallet/setRecords.js.map +1 -0
- package/dist/actions/wallet/setResolver.d.ts +244 -0
- package/dist/actions/wallet/setResolver.d.ts.map +1 -0
- package/dist/actions/wallet/setResolver.js +75 -0
- package/dist/actions/wallet/setResolver.js.map +1 -0
- package/dist/actions/wallet/setTextRecord.d.ts +88 -0
- package/dist/actions/wallet/setTextRecord.d.ts.map +1 -0
- package/dist/actions/wallet/setTextRecord.js +53 -0
- package/dist/actions/wallet/setTextRecord.js.map +1 -0
- package/dist/actions/wallet/transferName.d.ts +622 -0
- package/dist/actions/wallet/transferName.d.ts.map +1 -0
- package/dist/actions/wallet/transferName.js +161 -0
- package/dist/actions/wallet/transferName.js.map +1 -0
- package/dist/actions/wallet/unwrapName.d.ts +313 -0
- package/dist/actions/wallet/unwrapName.d.ts.map +1 -0
- package/dist/actions/wallet/unwrapName.js +84 -0
- package/dist/actions/wallet/unwrapName.js.map +1 -0
- package/dist/actions/wallet/wrapName.d.ts +257 -0
- package/dist/actions/wallet/wrapName.d.ts.map +1 -0
- package/dist/actions/wallet/wrapName.js +101 -0
- package/dist/actions/wallet/wrapName.js.map +1 -0
- package/dist/clients/chain.d.ts +287 -0
- package/dist/clients/chain.d.ts.map +1 -0
- package/dist/clients/chain.js +232 -0
- package/dist/clients/chain.js.map +1 -0
- package/dist/clients/decorators/public.d.ts +38 -40
- package/dist/clients/decorators/public.d.ts.map +1 -0
- package/dist/clients/decorators/public.js +33 -30
- package/dist/clients/decorators/public.js.map +1 -1
- package/dist/clients/decorators/subgraph.d.ts +8 -7
- package/dist/clients/decorators/subgraph.d.ts.map +1 -0
- package/dist/clients/decorators/subgraph.js +6 -6
- package/dist/clients/decorators/subgraph.js.map +1 -1
- package/dist/clients/decorators/wallet.d.ts +45 -41
- package/dist/clients/decorators/wallet.d.ts.map +1 -0
- package/dist/clients/decorators/wallet.js +41 -38
- package/dist/clients/decorators/wallet.js.map +1 -1
- package/dist/contracts/addEnsContracts.d.ts +3 -3
- package/dist/contracts/addEnsContracts.d.ts.map +1 -0
- package/dist/contracts/addEnsContracts.js +5 -5
- package/dist/contracts/addEnsContracts.js.map +1 -1
- package/dist/contracts/baseRegistrar.d.ts +1 -0
- package/dist/contracts/baseRegistrar.d.ts.map +1 -0
- package/dist/contracts/bulkRenewal.d.ts +1 -0
- package/dist/contracts/bulkRenewal.d.ts.map +1 -0
- package/dist/contracts/compositeResolver.d.ts +17 -0
- package/dist/contracts/compositeResolver.d.ts.map +1 -0
- package/dist/contracts/compositeResolver.js +24 -0
- package/dist/contracts/compositeResolver.js.map +1 -0
- package/dist/contracts/consts.d.ts +17 -40
- package/dist/contracts/consts.d.ts.map +1 -0
- package/dist/contracts/consts.js +19 -41
- package/dist/contracts/consts.js.map +1 -1
- package/dist/contracts/dedicatedResolver.d.ts +55 -0
- package/dist/contracts/dedicatedResolver.d.ts.map +1 -0
- package/dist/contracts/dedicatedResolver.js +75 -0
- package/dist/contracts/dedicatedResolver.js.map +1 -0
- package/dist/contracts/dnsRegistrar.d.ts +1 -0
- package/dist/contracts/dnsRegistrar.d.ts.map +1 -0
- package/dist/contracts/dnssecImpl.d.ts +1 -0
- package/dist/contracts/dnssecImpl.d.ts.map +1 -0
- package/dist/contracts/erc1155.d.ts +1 -0
- package/dist/contracts/erc1155.d.ts.map +1 -0
- package/dist/contracts/erc165.d.ts +1 -0
- package/dist/contracts/erc165.d.ts.map +1 -0
- package/dist/contracts/erc721.d.ts +1 -0
- package/dist/contracts/erc721.d.ts.map +1 -0
- package/dist/contracts/ethRegistrarController.d.ts +1 -31
- package/dist/contracts/ethRegistrarController.d.ts.map +1 -0
- package/dist/contracts/ethRegistrarController.js +0 -40
- package/dist/contracts/ethRegistrarController.js.map +1 -1
- package/dist/contracts/getChainContractAddress.d.ts +16 -15
- package/dist/contracts/getChainContractAddress.d.ts.map +1 -0
- package/dist/contracts/getChainContractAddress.js +3 -2
- package/dist/contracts/getChainContractAddress.js.map +1 -1
- package/dist/contracts/index.d.ts +3 -4
- package/dist/contracts/index.d.ts.map +1 -0
- package/dist/contracts/index.js +2 -4
- package/dist/contracts/index.js.map +1 -1
- package/dist/contracts/l2EthRegistrar.d.ts +599 -0
- package/dist/contracts/l2EthRegistrar.d.ts.map +1 -0
- package/dist/contracts/l2EthRegistrar.js +296 -0
- package/dist/contracts/l2EthRegistrar.js.map +1 -0
- package/dist/contracts/multicall.d.ts +11 -10
- package/dist/contracts/multicall.d.ts.map +1 -0
- package/dist/contracts/multicall.js +14 -14
- package/dist/contracts/multicall.js.map +1 -1
- package/dist/contracts/nameWrapper.d.ts +1 -0
- package/dist/contracts/nameWrapper.d.ts.map +1 -0
- package/dist/contracts/publicResolver.d.ts +8 -3
- package/dist/contracts/publicResolver.d.ts.map +1 -0
- package/dist/contracts/publicResolver.js +9 -3
- package/dist/contracts/publicResolver.js.map +1 -1
- package/dist/contracts/registry.d.ts +1 -0
- package/dist/contracts/registry.d.ts.map +1 -0
- package/dist/contracts/reverseRegistrar.d.ts +1 -0
- package/dist/contracts/reverseRegistrar.d.ts.map +1 -0
- package/dist/contracts/universalResolver.d.ts +1 -0
- package/dist/contracts/universalResolver.d.ts.map +1 -0
- package/dist/dns.d.ts +6 -5
- package/dist/dns.d.ts.map +1 -0
- package/dist/dns.js +4 -4
- package/dist/dns.js.map +1 -1
- package/dist/errors/base.d.ts +1 -0
- package/dist/errors/base.d.ts.map +1 -0
- package/dist/errors/base.js +36 -6
- package/dist/errors/base.js.map +1 -1
- package/dist/errors/contracts.d.ts +1 -0
- package/dist/errors/contracts.d.ts.map +1 -0
- package/dist/errors/contracts.js +24 -4
- package/dist/errors/contracts.js.map +1 -1
- package/dist/errors/dns.d.ts +1 -0
- package/dist/errors/dns.d.ts.map +1 -0
- package/dist/errors/dns.js +90 -15
- package/dist/errors/dns.js.map +1 -1
- package/dist/errors/error-utils.d.ts +1 -0
- package/dist/errors/error-utils.d.ts.map +1 -0
- package/dist/errors/general.d.ts +2 -1
- package/dist/errors/general.d.ts.map +1 -0
- package/dist/errors/general.js +66 -11
- package/dist/errors/general.js.map +1 -1
- package/dist/errors/public.d.ts +1 -0
- package/dist/errors/public.d.ts.map +1 -0
- package/dist/errors/public.js +30 -5
- package/dist/errors/public.js.map +1 -1
- package/dist/errors/subgraph.d.ts +1 -0
- package/dist/errors/subgraph.d.ts.map +1 -0
- package/dist/errors/subgraph.js +48 -8
- package/dist/errors/subgraph.js.map +1 -1
- package/dist/errors/utils.d.ts +4 -0
- package/dist/errors/utils.d.ts.map +1 -0
- package/dist/errors/utils.js +96 -16
- package/dist/errors/utils.js.map +1 -1
- package/dist/errors/version.d.ts +2 -1
- package/dist/errors/version.d.ts.map +1 -0
- package/dist/errors/version.js +1 -1
- package/dist/errors/version.js.map +1 -1
- package/dist/errors/wallet.d.ts +1 -0
- package/dist/errors/wallet.d.ts.map +1 -0
- package/dist/exports/chain.d.ts +2 -0
- package/dist/exports/chain.d.ts.map +1 -0
- package/dist/exports/chain.js +2 -0
- package/dist/exports/chain.js.map +1 -0
- package/dist/exports/internal.d.ts +2 -0
- package/dist/exports/internal.d.ts.map +1 -0
- package/dist/exports/internal.js +2 -0
- package/dist/exports/internal.js.map +1 -0
- package/dist/exports/public/v2.d.ts +3 -0
- package/dist/exports/public/v2.d.ts.map +1 -0
- package/dist/exports/public/v2.js +3 -0
- package/dist/exports/public/v2.js.map +1 -0
- package/dist/exports/public.d.ts +17 -0
- package/dist/exports/public.d.ts.map +1 -0
- package/dist/exports/public.js +17 -0
- package/dist/exports/public.js.map +1 -0
- package/dist/exports/wallet.d.ts +19 -0
- package/dist/exports/wallet.d.ts.map +1 -0
- package/dist/exports/wallet.js +19 -0
- package/dist/exports/wallet.js.map +1 -0
- package/dist/index.d.ts +1 -6
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +0 -6
- package/dist/index.js.map +1 -1
- package/dist/subgraph.d.ts +12 -9
- package/dist/subgraph.d.ts.map +1 -0
- package/dist/subgraph.js +10 -8
- package/dist/subgraph.js.map +1 -1
- package/dist/test/addTestContracts.d.ts +87 -0
- package/dist/test/addTestContracts.d.ts.map +1 -0
- package/dist/test/addTestContracts.js +89 -0
- package/dist/test/addTestContracts.js.map +1 -0
- package/dist/test/createHttpServer.d.ts +6 -0
- package/dist/test/createHttpServer.d.ts.map +1 -0
- package/dist/test/createHttpServer.js +25 -0
- package/dist/test/createHttpServer.js.map +1 -0
- package/dist/test/dns.d.ts +6 -0
- package/dist/test/dns.d.ts.map +1 -0
- package/dist/test/dns.js +8 -0
- package/dist/test/dns.js.map +1 -0
- package/dist/test/setup.d.ts +2 -0
- package/dist/test/setup.d.ts.map +1 -0
- package/dist/test/setup.js +7 -0
- package/dist/test/setup.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/types/index.d.ts +60 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/internal.d.ts +25 -0
- package/dist/types/internal.d.ts.map +1 -0
- package/dist/types/internal.js +18 -0
- package/dist/types/internal.js.map +1 -0
- package/dist/utils/ccipBatchRequest.d.ts +3 -0
- package/dist/utils/ccipBatchRequest.d.ts.map +1 -0
- package/dist/utils/ccipBatchRequest.js +4 -1
- package/dist/utils/ccipBatchRequest.js.map +1 -1
- package/dist/utils/ccipRequest.d.ts +4 -1
- package/dist/utils/ccipRequest.d.ts.map +1 -0
- package/dist/utils/ccipRequest.js +4 -3
- package/dist/utils/ccipRequest.js.map +1 -1
- package/dist/utils/clientWithOverrides.d.ts +8 -0
- package/dist/utils/clientWithOverrides.d.ts.map +1 -0
- package/dist/utils/clientWithOverrides.js +9 -0
- package/dist/utils/clientWithOverrides.js.map +1 -0
- package/dist/utils/coders/clearRecords.d.ts +29 -0
- package/dist/utils/coders/clearRecords.d.ts.map +1 -0
- package/dist/utils/coders/clearRecords.js +12 -0
- package/dist/utils/coders/clearRecords.js.map +1 -0
- package/dist/utils/coders/encodeAbi.d.ts +39 -0
- package/dist/utils/coders/encodeAbi.d.ts.map +1 -0
- package/dist/utils/coders/encodeAbi.js +75 -0
- package/dist/utils/coders/encodeAbi.js.map +1 -0
- package/dist/utils/coders/getAbi.d.ts +65 -0
- package/dist/utils/coders/getAbi.d.ts.map +1 -0
- package/dist/utils/coders/getAbi.js +102 -0
- package/dist/utils/coders/getAbi.js.map +1 -0
- package/dist/utils/coders/getAddress.d.ts +116 -0
- package/dist/utils/coders/getAddress.d.ts.map +1 -0
- package/dist/utils/coders/getAddress.js +85 -0
- package/dist/utils/coders/getAddress.js.map +1 -0
- package/dist/utils/coders/getContentHash.d.ts +35 -0
- package/dist/utils/coders/getContentHash.d.ts.map +1 -0
- package/dist/utils/coders/getContentHash.js +31 -0
- package/dist/utils/coders/getContentHash.js.map +1 -0
- package/dist/utils/coders/getText.d.ts +60 -0
- package/dist/utils/coders/getText.d.ts.map +1 -0
- package/dist/utils/coders/getText.js +32 -0
- package/dist/utils/coders/getText.js.map +1 -0
- package/dist/utils/coders/resolverMulticallParameters.d.ts +27 -0
- package/dist/utils/coders/resolverMulticallParameters.d.ts.map +1 -0
- package/dist/utils/coders/resolverMulticallParameters.js +34 -0
- package/dist/utils/coders/resolverMulticallParameters.js.map +1 -0
- package/dist/utils/coders/setAbi.d.ts +31 -0
- package/dist/utils/coders/setAbi.d.ts.map +1 -0
- package/dist/utils/coders/setAbi.js +14 -0
- package/dist/utils/coders/setAbi.js.map +1 -0
- package/dist/utils/coders/setAddr.d.ts +49 -0
- package/dist/utils/coders/setAddr.d.ts.map +1 -0
- package/dist/utils/coders/setAddr.js +27 -0
- package/dist/utils/coders/setAddr.js.map +1 -0
- package/dist/utils/coders/setContentHash.d.ts +40 -0
- package/dist/utils/coders/setContentHash.d.ts.map +1 -0
- package/dist/utils/coders/setContentHash.js +19 -0
- package/dist/utils/coders/setContentHash.js.map +1 -0
- package/dist/utils/coders/setText.d.ts +45 -0
- package/dist/utils/coders/setText.d.ts.map +1 -0
- package/dist/utils/coders/setText.js +17 -0
- package/dist/utils/coders/setText.js.map +1 -0
- package/dist/utils/consts.d.ts +1 -0
- package/dist/utils/consts.d.ts.map +1 -0
- package/dist/utils/contentHash.d.ts +8 -0
- package/dist/utils/contentHash.d.ts.map +1 -0
- package/dist/utils/contentHash.js +1 -0
- package/dist/utils/contentHash.js.map +1 -1
- package/dist/utils/dns/getDnsTxtRecords.d.ts +4 -1
- package/dist/utils/dns/getDnsTxtRecords.d.ts.map +1 -0
- package/dist/utils/dns/getDnsTxtRecords.js.map +1 -1
- package/dist/utils/dns/misc.d.ts +1 -0
- package/dist/utils/dns/misc.d.ts.map +1 -0
- package/dist/utils/errors/isNullRegistrarOwnerOfError.d.ts +6 -0
- package/dist/utils/errors/isNullRegistrarOwnerOfError.d.ts.map +1 -0
- package/dist/utils/errors/isNullRegistrarOwnerOfError.js +14 -0
- package/dist/utils/errors/isNullRegistrarOwnerOfError.js.map +1 -0
- package/dist/utils/errors/isNullUniversalResolverError.d.ts +6 -0
- package/dist/utils/errors/isNullUniversalResolverError.d.ts.map +1 -0
- package/dist/utils/errors/isNullUniversalResolverError.js +24 -0
- package/dist/utils/errors/isNullUniversalResolverError.js.map +1 -0
- package/dist/utils/errors/isReverseAddressMismatch.d.ts +6 -0
- package/dist/utils/errors/isReverseAddressMismatch.d.ts.map +1 -0
- package/dist/utils/errors/isReverseAddressMismatch.js +16 -0
- package/dist/utils/errors/isReverseAddressMismatch.js.map +1 -0
- package/dist/utils/errors/parseReverseAddressMismatchError.d.ts +5 -0
- package/dist/utils/errors/parseReverseAddressMismatchError.d.ts.map +1 -0
- package/dist/utils/errors/parseReverseAddressMismatchError.js +15 -0
- package/dist/utils/errors/parseReverseAddressMismatchError.js.map +1 -0
- package/dist/utils/format.d.ts +1 -0
- package/dist/utils/format.d.ts.map +1 -0
- package/dist/utils/fuses.d.ts +6 -1
- package/dist/utils/fuses.d.ts.map +1 -0
- package/dist/utils/fuses.js.map +1 -1
- package/dist/utils/generateSupportedContentTypes.d.ts +2 -1
- package/dist/utils/generateSupportedContentTypes.d.ts.map +1 -0
- package/dist/utils/index.d.ts +37 -23
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +36 -23
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/l2RegisterHelpers.d.ts +37 -0
- package/dist/utils/l2RegisterHelpers.d.ts.map +1 -0
- package/dist/utils/l2RegisterHelpers.js +48 -0
- package/dist/utils/l2RegisterHelpers.js.map +1 -0
- package/dist/utils/name/getNameType.d.ts +3 -0
- package/dist/utils/name/getNameType.d.ts.map +1 -0
- package/dist/utils/name/getNameType.js.map +1 -0
- package/dist/utils/name/getNameWithSizedLabels.d.ts +8 -0
- package/dist/utils/name/getNameWithSizedLabels.d.ts.map +1 -0
- package/dist/utils/name/getNameWithSizedLabels.js +18 -0
- package/dist/utils/name/getNameWithSizedLabels.js.map +1 -0
- package/dist/utils/name/hexEncodedName.d.ts +7 -0
- package/dist/utils/name/hexEncodedName.d.ts.map +1 -0
- package/dist/utils/name/hexEncodedName.js +20 -0
- package/dist/utils/name/hexEncodedName.js.map +1 -0
- package/dist/utils/name/labels.d.ts +55 -0
- package/dist/utils/name/labels.d.ts.map +1 -0
- package/dist/utils/name/labels.js +123 -0
- package/dist/utils/name/labels.js.map +1 -0
- package/dist/utils/name/makeLabelNodeAndParent.d.ts +14 -0
- package/dist/utils/name/makeLabelNodeAndParent.d.ts.map +1 -0
- package/dist/utils/name/makeLabelNodeAndParent.js +18 -0
- package/dist/utils/name/makeLabelNodeAndParent.js.map +1 -0
- package/dist/utils/name/normalize.d.ts +25 -0
- package/dist/utils/name/normalize.d.ts.map +1 -0
- package/dist/utils/name/normalize.js +27 -0
- package/dist/utils/name/normalize.js.map +1 -0
- package/dist/utils/name/validation.d.ts +20 -0
- package/dist/utils/name/validation.d.ts.map +1 -0
- package/dist/utils/name/validation.js +70 -0
- package/dist/utils/name/validation.js.map +1 -0
- package/dist/utils/normalizeCoinId.d.ts +15 -0
- package/dist/utils/normalizeCoinId.d.ts.map +1 -0
- package/dist/utils/normalizeCoinId.js +32 -0
- package/dist/utils/normalizeCoinId.js.map +1 -0
- package/dist/utils/nullableAddress.d.ts +3 -0
- package/dist/utils/nullableAddress.d.ts.map +1 -0
- package/dist/utils/nullableAddress.js +3 -0
- package/dist/utils/nullableAddress.js.map +1 -0
- package/dist/utils/ownerFromContract.d.ts +187 -8
- package/dist/utils/ownerFromContract.d.ts.map +1 -0
- package/dist/utils/ownerFromContract.js +20 -22
- package/dist/utils/ownerFromContract.js.map +1 -1
- package/dist/utils/registerHelpers.d.ts +14 -6
- package/dist/utils/registerHelpers.d.ts.map +1 -0
- package/dist/utils/registerHelpers.js +13 -12
- package/dist/utils/registerHelpers.js.map +1 -1
- package/dist/utils/wrapper.d.ts +7 -1
- package/dist/utils/wrapper.d.ts.map +1 -0
- package/dist/utils/wrapper.js +4 -1
- package/dist/utils/wrapper.js.map +1 -1
- package/package.json +29 -14
- package/src/actions/dns/getDnsImportData.ts +109 -0
- package/src/actions/dns/getDnsOffchainData.ts +169 -0
- package/src/actions/dns/getDnsOwner.ts +96 -0
- package/src/actions/dns/importDnsName.ts +175 -0
- package/src/actions/public/getAbiRecord.ts +72 -0
- package/src/actions/public/getAddressRecord.ts +87 -0
- package/src/actions/public/getAvailable.ts +76 -0
- package/src/actions/public/getContentHashRecord.ts +70 -0
- package/src/actions/public/getCredentials.ts +65 -0
- package/src/actions/public/getExpiry.ts +220 -0
- package/src/actions/public/getName.ts +164 -0
- package/src/actions/public/getOwner.ts +278 -0
- package/src/actions/public/getPrice.ts +100 -0
- package/src/actions/public/getRecords.ts +398 -0
- package/src/actions/public/getResolver.ts +71 -0
- package/src/actions/public/getSupportedInterfaces.ts +68 -0
- package/src/actions/public/getTextRecord.ts +74 -0
- package/src/actions/public/getWrapperData.ts +88 -0
- package/src/actions/public/getWrapperName.ts +76 -0
- package/src/actions/public/resolveNameData.ts +143 -0
- package/src/actions/public/v2/getResolverName.ts +50 -0
- package/src/actions/public/v2/getUnderlyingResolver.ts +53 -0
- package/src/actions/subgraph/client.ts +105 -0
- package/src/actions/subgraph/filters.ts +848 -0
- package/src/actions/subgraph/getDecodedName.ts +123 -0
- package/src/actions/subgraph/getNameHistory.ts +286 -0
- package/src/actions/subgraph/getNamesForAddress.ts +353 -0
- package/src/actions/subgraph/getRecordHistory.ts +126 -0
- package/src/actions/subgraph/getResolvedNamesForAddress.ts +60 -0
- package/src/actions/subgraph/getSubgraphRecords.ts +185 -0
- package/src/actions/subgraph/getSubgraphRegistrant.ts +78 -0
- package/src/actions/subgraph/getSubnames.ts +238 -0
- package/src/actions/subgraph/utils.ts +164 -0
- package/src/actions/wallet/clearRecords.ts +135 -0
- package/src/actions/wallet/commitName.ts +191 -0
- package/src/actions/wallet/createSubname.ts +354 -0
- package/src/actions/wallet/deleteSubname.ts +241 -0
- package/src/actions/wallet/registerName.ts +190 -0
- package/src/actions/wallet/renewNames.ts +167 -0
- package/src/actions/wallet/setAbiRecord.ts +176 -0
- package/src/actions/wallet/setAddressRecord.ts +174 -0
- package/src/actions/wallet/setChildFuses.ts +152 -0
- package/src/actions/wallet/setContentHashRecord.ts +134 -0
- package/src/actions/wallet/setFuses.ts +127 -0
- package/src/actions/wallet/setPrimaryName.ts +189 -0
- package/src/actions/wallet/setRecords.ts +174 -0
- package/src/actions/wallet/setResolver.ts +173 -0
- package/src/actions/wallet/setTextRecord.ts +137 -0
- package/src/actions/wallet/transferName.ts +314 -0
- package/src/actions/wallet/unwrapName.ts +194 -0
- package/src/actions/wallet/wrapName.ts +235 -0
- package/src/clients/chain.ts +426 -0
- package/src/contracts/addEnsContracts.ts +14 -12
- package/src/contracts/compositeResolver.ts +23 -0
- package/src/contracts/dedicatedResolver.ts +77 -0
- package/src/contracts/ethRegistrarController.ts +0 -41
- package/src/contracts/getChainContractAddress.ts +25 -18
- package/src/contracts/index.ts +4 -28
- package/src/contracts/l2EthRegistrar.ts +303 -0
- package/src/contracts/multicall.ts +15 -15
- package/src/contracts/publicResolver.ts +10 -3
- package/src/dns.ts +13 -9
- package/src/errors/base.ts +1 -1
- package/src/errors/general.ts +1 -1
- package/src/errors/utils.ts +2 -0
- package/src/errors/version.ts +1 -1
- package/src/exports/chain.ts +1 -0
- package/src/exports/internal.ts +1 -0
- package/src/exports/public/v2.ts +2 -0
- package/src/exports/public.ts +16 -0
- package/src/exports/wallet.ts +18 -0
- package/src/index.ts +0 -28
- package/src/subgraph.ts +28 -9
- package/src/types/index.ts +137 -0
- package/src/types/internal.ts +62 -0
- package/src/utils/ccipBatchRequest.ts +14 -2
- package/src/utils/ccipRequest.ts +24 -3
- package/src/utils/clientWithOverrides.ts +27 -0
- package/src/utils/coders/clearRecords.ts +33 -0
- package/src/utils/coders/encodeAbi.ts +144 -0
- package/src/utils/coders/getAbi.ts +211 -0
- package/src/utils/coders/getAddress.ts +239 -0
- package/src/utils/coders/getContentHash.ts +81 -0
- package/src/utils/coders/getText.ts +104 -0
- package/src/utils/coders/resolverMulticallParameters.ts +109 -0
- package/src/utils/coders/setAbi.ts +44 -0
- package/src/utils/coders/setAddr.ts +64 -0
- package/src/utils/coders/setContentHash.ts +45 -0
- package/src/utils/coders/setText.ts +40 -0
- package/src/utils/contentHash.ts +39 -2
- package/src/utils/dns/getDnsTxtRecords.ts +4 -1
- package/src/utils/errors/isNullRegistrarOwnerOfError.ts +12 -0
- package/src/utils/errors/isNullUniversalResolverError.ts +19 -0
- package/src/utils/errors/parseReverseAddressMismatchError.ts +14 -0
- package/src/utils/fuses.ts +30 -1
- package/src/utils/generateSupportedContentTypes.ts +1 -1
- package/src/utils/index.ts +36 -164
- package/src/utils/l2RegisterHelpers.ts +147 -0
- package/src/utils/name/getNameType.ts +18 -0
- package/src/utils/name/getNameWithSizedLabels.ts +28 -0
- package/src/utils/name/hexEncodedName.ts +33 -0
- package/src/utils/name/labels.ts +178 -0
- package/src/utils/name/makeLabelNodeAndParent.ts +27 -0
- package/src/utils/name/normalize.ts +70 -0
- package/src/utils/name/validation.ts +119 -0
- package/src/utils/normalizeCoinId.ts +65 -0
- package/src/utils/nullableAddress.ts +4 -0
- package/src/utils/ownerFromContract.ts +49 -34
- package/src/utils/registerHelpers.ts +76 -17
- package/src/utils/wrapper.ts +27 -4
- package/dist/clients/public.d.ts +0 -26
- package/dist/clients/public.js +0 -34
- package/dist/clients/public.js.map +0 -1
- package/dist/clients/subgraph.d.ts +0 -25
- package/dist/clients/subgraph.js +0 -31
- package/dist/clients/subgraph.js.map +0 -1
- package/dist/clients/wallet.d.ts +0 -25
- package/dist/clients/wallet.js +0 -30
- package/dist/clients/wallet.js.map +0 -1
- package/dist/contracts/legacyEthRegistrarController.d.ts +0 -262
- package/dist/contracts/legacyEthRegistrarController.js +0 -184
- package/dist/contracts/legacyEthRegistrarController.js.map +0 -1
- package/dist/errors/register.d.ts +0 -9
- package/dist/errors/register.js +0 -14
- package/dist/errors/register.js.map +0 -1
- package/dist/functions/dns/getDnsImportData.d.ts +0 -36
- package/dist/functions/dns/getDnsImportData.js +0 -60
- package/dist/functions/dns/getDnsImportData.js.map +0 -1
- package/dist/functions/dns/getDnsOffchainData.d.ts +0 -27
- package/dist/functions/dns/getDnsOffchainData.js +0 -95
- package/dist/functions/dns/getDnsOffchainData.js.map +0 -1
- package/dist/functions/dns/getDnsOwner.d.ts +0 -24
- package/dist/functions/dns/getDnsOwner.js +0 -54
- package/dist/functions/dns/getDnsOwner.js.map +0 -1
- package/dist/functions/dns/importDnsName.d.ts +0 -61
- package/dist/functions/dns/importDnsName.js +0 -84
- package/dist/functions/dns/importDnsName.js.map +0 -1
- package/dist/functions/dns/types.d.ts +0 -1
- package/dist/functions/dns/types.js.map +0 -1
- package/dist/functions/public/_getAbi.d.ts +0 -19
- package/dist/functions/public/_getAbi.js +0 -82
- package/dist/functions/public/_getAbi.js.map +0 -1
- package/dist/functions/public/_getAddr.d.ts +0 -16
- package/dist/functions/public/_getAddr.js +0 -78
- package/dist/functions/public/_getAddr.js.map +0 -1
- package/dist/functions/public/_getContentHash.d.ts +0 -13
- package/dist/functions/public/_getContentHash.js +0 -36
- package/dist/functions/public/_getContentHash.js.map +0 -1
- package/dist/functions/public/_getText.d.ts +0 -14
- package/dist/functions/public/_getText.js +0 -37
- package/dist/functions/public/_getText.js.map +0 -1
- package/dist/functions/public/batch.d.ts +0 -39
- package/dist/functions/public/batch.js +0 -54
- package/dist/functions/public/batch.js.map +0 -1
- package/dist/functions/public/getAbiRecord.d.ts +0 -34
- package/dist/functions/public/getAbiRecord.js +0 -42
- package/dist/functions/public/getAbiRecord.js.map +0 -1
- package/dist/functions/public/getAddressRecord.d.ts +0 -34
- package/dist/functions/public/getAddressRecord.js +0 -42
- package/dist/functions/public/getAddressRecord.js.map +0 -1
- package/dist/functions/public/getAvailable.d.ts +0 -33
- package/dist/functions/public/getAvailable.js +0 -59
- package/dist/functions/public/getAvailable.js.map +0 -1
- package/dist/functions/public/getContentHashRecord.d.ts +0 -34
- package/dist/functions/public/getContentHashRecord.js +0 -42
- package/dist/functions/public/getContentHashRecord.js.map +0 -1
- package/dist/functions/public/getExpiry.d.ts +0 -44
- package/dist/functions/public/getExpiry.js +0 -137
- package/dist/functions/public/getExpiry.js.map +0 -1
- package/dist/functions/public/getName.d.ts +0 -60
- package/dist/functions/public/getName.js +0 -122
- package/dist/functions/public/getName.js.map +0 -1
- package/dist/functions/public/getOwner.d.ts +0 -73
- package/dist/functions/public/getOwner.js +0 -156
- package/dist/functions/public/getOwner.js.map +0 -1
- package/dist/functions/public/getPrice.d.ts +0 -40
- package/dist/functions/public/getPrice.js +0 -105
- package/dist/functions/public/getPrice.js.map +0 -1
- package/dist/functions/public/getRecords.d.ts +0 -107
- package/dist/functions/public/getRecords.js +0 -252
- package/dist/functions/public/getRecords.js.map +0 -1
- package/dist/functions/public/getResolver.d.ts +0 -33
- package/dist/functions/public/getResolver.js +0 -61
- package/dist/functions/public/getResolver.js.map +0 -1
- package/dist/functions/public/getSupportedInterfaces.d.ts +0 -47
- package/dist/functions/public/getSupportedInterfaces.js +0 -53
- package/dist/functions/public/getSupportedInterfaces.js.map +0 -1
- package/dist/functions/public/getTextRecord.d.ts +0 -34
- package/dist/functions/public/getTextRecord.js +0 -42
- package/dist/functions/public/getTextRecord.js.map +0 -1
- package/dist/functions/public/getWrapperData.d.ts +0 -42
- package/dist/functions/public/getWrapperData.js +0 -77
- package/dist/functions/public/getWrapperData.js.map +0 -1
- package/dist/functions/public/getWrapperName.d.ts +0 -33
- package/dist/functions/public/getWrapperName.js +0 -61
- package/dist/functions/public/getWrapperName.js.map +0 -1
- package/dist/functions/public/multicallWrapper.d.ts +0 -13
- package/dist/functions/public/multicallWrapper.js +0 -55
- package/dist/functions/public/multicallWrapper.js.map +0 -1
- package/dist/functions/public/universalWrapper.d.ts +0 -15
- package/dist/functions/public/universalWrapper.js +0 -79
- package/dist/functions/public/universalWrapper.js.map +0 -1
- package/dist/functions/subgraph/client.d.ts +0 -8
- package/dist/functions/subgraph/client.js +0 -88
- package/dist/functions/subgraph/client.js.map +0 -1
- package/dist/functions/subgraph/events.d.ts +0 -139
- package/dist/functions/subgraph/events.js.map +0 -1
- package/dist/functions/subgraph/filters.d.ts +0 -701
- package/dist/functions/subgraph/filters.js +0 -108
- package/dist/functions/subgraph/filters.js.map +0 -1
- package/dist/functions/subgraph/fragments.d.ts +0 -40
- package/dist/functions/subgraph/fragments.js.map +0 -1
- package/dist/functions/subgraph/getDecodedName.d.ts +0 -29
- package/dist/functions/subgraph/getDecodedName.js +0 -84
- package/dist/functions/subgraph/getDecodedName.js.map +0 -1
- package/dist/functions/subgraph/getNameHistory.d.ts +0 -53
- package/dist/functions/subgraph/getNameHistory.js +0 -248
- package/dist/functions/subgraph/getNameHistory.js.map +0 -1
- package/dist/functions/subgraph/getNamesForAddress.d.ts +0 -64
- package/dist/functions/subgraph/getNamesForAddress.js +0 -214
- package/dist/functions/subgraph/getNamesForAddress.js.map +0 -1
- package/dist/functions/subgraph/getSubgraphRecords.d.ts +0 -45
- package/dist/functions/subgraph/getSubgraphRecords.js +0 -103
- package/dist/functions/subgraph/getSubgraphRecords.js.map +0 -1
- package/dist/functions/subgraph/getSubgraphRegistrant.d.ts +0 -28
- package/dist/functions/subgraph/getSubgraphRegistrant.js +0 -52
- package/dist/functions/subgraph/getSubgraphRegistrant.js.map +0 -1
- package/dist/functions/subgraph/getSubnames.d.ts +0 -42
- package/dist/functions/subgraph/getSubnames.js +0 -159
- package/dist/functions/subgraph/getSubnames.js.map +0 -1
- package/dist/functions/subgraph/types.d.ts +0 -12
- package/dist/functions/subgraph/types.js.map +0 -1
- package/dist/functions/subgraph/utils.d.ts +0 -38
- package/dist/functions/subgraph/utils.js +0 -53
- package/dist/functions/subgraph/utils.js.map +0 -1
- package/dist/functions/wallet/clearRecords.d.ts +0 -40
- package/dist/functions/wallet/clearRecords.js +0 -45
- package/dist/functions/wallet/clearRecords.js.map +0 -1
- package/dist/functions/wallet/commitName.d.ts +0 -40
- package/dist/functions/wallet/commitName.js +0 -76
- package/dist/functions/wallet/commitName.js.map +0 -1
- package/dist/functions/wallet/createSubname.d.ts +0 -61
- package/dist/functions/wallet/createSubname.js +0 -148
- package/dist/functions/wallet/createSubname.js.map +0 -1
- package/dist/functions/wallet/deleteSubname.d.ts +0 -42
- package/dist/functions/wallet/deleteSubname.js +0 -125
- package/dist/functions/wallet/deleteSubname.js.map +0 -1
- package/dist/functions/wallet/legacyCommitName.d.ts +0 -40
- package/dist/functions/wallet/legacyCommitName.js +0 -72
- package/dist/functions/wallet/legacyCommitName.js.map +0 -1
- package/dist/functions/wallet/legacyRegisterName.d.ts +0 -59
- package/dist/functions/wallet/legacyRegisterName.js +0 -93
- package/dist/functions/wallet/legacyRegisterName.js.map +0 -1
- package/dist/functions/wallet/registerName.d.ts +0 -59
- package/dist/functions/wallet/registerName.js +0 -92
- package/dist/functions/wallet/registerName.js.map +0 -1
- package/dist/functions/wallet/renewNames.d.ts +0 -58
- package/dist/functions/wallet/renewNames.js +0 -94
- package/dist/functions/wallet/renewNames.js.map +0 -1
- package/dist/functions/wallet/setAbiRecord.d.ts +0 -48
- package/dist/functions/wallet/setAbiRecord.js +0 -54
- package/dist/functions/wallet/setAbiRecord.js.map +0 -1
- package/dist/functions/wallet/setAddressRecord.d.ts +0 -46
- package/dist/functions/wallet/setAddressRecord.js +0 -49
- package/dist/functions/wallet/setAddressRecord.js.map +0 -1
- package/dist/functions/wallet/setChildFuses.d.ts +0 -47
- package/dist/functions/wallet/setChildFuses.js +0 -57
- package/dist/functions/wallet/setChildFuses.js.map +0 -1
- package/dist/functions/wallet/setContentHashRecord.d.ts +0 -43
- package/dist/functions/wallet/setContentHashRecord.js +0 -47
- package/dist/functions/wallet/setContentHashRecord.js.map +0 -1
- package/dist/functions/wallet/setFuses.d.ts +0 -43
- package/dist/functions/wallet/setFuses.js +0 -52
- package/dist/functions/wallet/setFuses.js.map +0 -1
- package/dist/functions/wallet/setPrimaryName.d.ts +0 -50
- package/dist/functions/wallet/setPrimaryName.js +0 -76
- package/dist/functions/wallet/setPrimaryName.js.map +0 -1
- package/dist/functions/wallet/setRecords.d.ts +0 -48
- package/dist/functions/wallet/setRecords.js +0 -75
- package/dist/functions/wallet/setRecords.js.map +0 -1
- package/dist/functions/wallet/setResolver.d.ts +0 -43
- package/dist/functions/wallet/setResolver.js +0 -67
- package/dist/functions/wallet/setResolver.js.map +0 -1
- package/dist/functions/wallet/setTextRecord.d.ts +0 -46
- package/dist/functions/wallet/setTextRecord.js +0 -49
- package/dist/functions/wallet/setTextRecord.js.map +0 -1
- package/dist/functions/wallet/transferName.d.ts +0 -57
- package/dist/functions/wallet/transferName.js +0 -159
- package/dist/functions/wallet/transferName.js.map +0 -1
- package/dist/functions/wallet/unwrapName.d.ts +0 -52
- package/dist/functions/wallet/unwrapName.js +0 -82
- package/dist/functions/wallet/unwrapName.js.map +0 -1
- package/dist/functions/wallet/wrapName.d.ts +0 -45
- package/dist/functions/wallet/wrapName.js +0 -97
- package/dist/functions/wallet/wrapName.js.map +0 -1
- package/dist/public.d.ts +0 -20
- package/dist/public.js +0 -21
- package/dist/public.js.map +0 -1
- package/dist/types.d.ts +0 -66
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- package/dist/utils/checkSafeUniversalResolverData.d.ts +0 -13
- package/dist/utils/checkSafeUniversalResolverData.js +0 -39
- package/dist/utils/checkSafeUniversalResolverData.js.map +0 -1
- package/dist/utils/encoders/encodeAbi.d.ts +0 -28
- package/dist/utils/encoders/encodeAbi.js +0 -64
- package/dist/utils/encoders/encodeAbi.js.map +0 -1
- package/dist/utils/encoders/encodeClearRecords.d.ts +0 -2
- package/dist/utils/encoders/encodeClearRecords.js +0 -8
- package/dist/utils/encoders/encodeClearRecords.js.map +0 -1
- package/dist/utils/encoders/encodeSetAbi.d.ts +0 -7
- package/dist/utils/encoders/encodeSetAbi.js +0 -10
- package/dist/utils/encoders/encodeSetAbi.js.map +0 -1
- package/dist/utils/encoders/encodeSetAddr.d.ts +0 -8
- package/dist/utils/encoders/encodeSetAddr.js +0 -19
- package/dist/utils/encoders/encodeSetAddr.js.map +0 -1
- package/dist/utils/encoders/encodeSetContentHash.d.ts +0 -7
- package/dist/utils/encoders/encodeSetContentHash.js +0 -15
- package/dist/utils/encoders/encodeSetContentHash.js.map +0 -1
- package/dist/utils/encoders/encodeSetText.d.ts +0 -8
- package/dist/utils/encoders/encodeSetText.js +0 -10
- package/dist/utils/encoders/encodeSetText.js.map +0 -1
- package/dist/utils/generateFunction.d.ts +0 -22
- package/dist/utils/generateFunction.js +0 -26
- package/dist/utils/generateFunction.js.map +0 -1
- package/dist/utils/generateRecordCallArray.d.ts +0 -20
- package/dist/utils/generateRecordCallArray.js +0 -36
- package/dist/utils/generateRecordCallArray.js.map +0 -1
- package/dist/utils/getNameType.d.ts +0 -2
- package/dist/utils/getNameType.js.map +0 -1
- package/dist/utils/getRevertErrorData.d.ts +0 -1
- package/dist/utils/getRevertErrorData.js +0 -11
- package/dist/utils/getRevertErrorData.js.map +0 -1
- package/dist/utils/hexEncodedName.d.ts +0 -3
- package/dist/utils/hexEncodedName.js +0 -43
- package/dist/utils/hexEncodedName.js.map +0 -1
- package/dist/utils/labels.d.ts +0 -9
- package/dist/utils/labels.js +0 -76
- package/dist/utils/labels.js.map +0 -1
- package/dist/utils/legacyRegisterHelpers.d.ts +0 -48
- package/dist/utils/legacyRegisterHelpers.js +0 -45
- package/dist/utils/legacyRegisterHelpers.js.map +0 -1
- package/dist/utils/makeLabelNodeAndParent.d.ts +0 -5
- package/dist/utils/makeLabelNodeAndParent.js +0 -13
- package/dist/utils/makeLabelNodeAndParent.js.map +0 -1
- package/dist/utils/makeSafeSecondsDate.d.ts +0 -1
- package/dist/utils/makeSafeSecondsDate.js +0 -8
- package/dist/utils/makeSafeSecondsDate.js.map +0 -1
- package/dist/utils/normalise.d.ts +0 -11
- package/dist/utils/normalise.js +0 -33
- package/dist/utils/normalise.js.map +0 -1
- package/dist/utils/normaliseCoinId.d.ts +0 -9
- package/dist/utils/normaliseCoinId.js +0 -30
- package/dist/utils/normaliseCoinId.js.map +0 -1
- package/dist/utils/validation.d.ts +0 -13
- package/dist/utils/validation.js +0 -60
- package/dist/utils/validation.js.map +0 -1
- package/dist/wallet.d.ts +0 -20
- package/dist/wallet.js +0 -21
- package/dist/wallet.js.map +0 -1
- package/src/clients/decorators/public.ts +0 -420
- package/src/clients/decorators/subgraph.ts +0 -195
- package/src/clients/decorators/wallet.ts +0 -746
- package/src/clients/public.ts +0 -84
- package/src/clients/subgraph.ts +0 -75
- package/src/clients/wallet.ts +0 -96
- package/src/contracts/consts.ts +0 -236
- package/src/contracts/legacyEthRegistrarController.ts +0 -194
- package/src/errors/register.ts +0 -22
- package/src/functions/dns/getDnsImportData.ts +0 -102
- package/src/functions/dns/getDnsOffchainData.ts +0 -152
- package/src/functions/dns/getDnsOwner.ts +0 -89
- package/src/functions/dns/importDnsName.ts +0 -171
- package/src/functions/public/_getAbi.ts +0 -126
- package/src/functions/public/_getAddr.ts +0 -121
- package/src/functions/public/_getContentHash.ts +0 -60
- package/src/functions/public/_getText.ts +0 -59
- package/src/functions/public/batch.ts +0 -101
- package/src/functions/public/getAbiRecord.ts +0 -87
- package/src/functions/public/getAddressRecord.ts +0 -88
- package/src/functions/public/getAvailable.ts +0 -92
- package/src/functions/public/getContentHashRecord.ts +0 -84
- package/src/functions/public/getExpiry.ts +0 -200
- package/src/functions/public/getName.ts +0 -197
- package/src/functions/public/getOwner.ts +0 -277
- package/src/functions/public/getPrice.ts +0 -148
- package/src/functions/public/getRecords.ts +0 -505
- package/src/functions/public/getResolver.ts +0 -101
- package/src/functions/public/getSupportedInterfaces.ts +0 -114
- package/src/functions/public/getTextRecord.ts +0 -83
- package/src/functions/public/getWrapperData.ts +0 -129
- package/src/functions/public/getWrapperName.ts +0 -98
- package/src/functions/public/multicallWrapper.ts +0 -88
- package/src/functions/public/universalWrapper.ts +0 -122
- package/src/functions/subgraph/client.ts +0 -103
- package/src/functions/subgraph/filters.ts +0 -848
- package/src/functions/subgraph/getDecodedName.ts +0 -121
- package/src/functions/subgraph/getNameHistory.ts +0 -328
- package/src/functions/subgraph/getNamesForAddress.ts +0 -347
- package/src/functions/subgraph/getSubgraphRecords.ts +0 -183
- package/src/functions/subgraph/getSubgraphRegistrant.ts +0 -76
- package/src/functions/subgraph/getSubnames.ts +0 -236
- package/src/functions/subgraph/utils.ts +0 -92
- package/src/functions/wallet/clearRecords.ts +0 -98
- package/src/functions/wallet/commitName.ts +0 -132
- package/src/functions/wallet/createSubname.ts +0 -276
- package/src/functions/wallet/deleteSubname.ts +0 -192
- package/src/functions/wallet/legacyCommitName.ts +0 -127
- package/src/functions/wallet/legacyRegisterName.ts +0 -159
- package/src/functions/wallet/registerName.ts +0 -156
- package/src/functions/wallet/renewNames.ts +0 -153
- package/src/functions/wallet/setAbiRecord.ts +0 -114
- package/src/functions/wallet/setAddressRecord.ts +0 -108
- package/src/functions/wallet/setChildFuses.ts +0 -113
- package/src/functions/wallet/setContentHashRecord.ts +0 -103
- package/src/functions/wallet/setFuses.ts +0 -107
- package/src/functions/wallet/setPrimaryName.ts +0 -156
- package/src/functions/wallet/setRecords.ts +0 -135
- package/src/functions/wallet/setResolver.ts +0 -127
- package/src/functions/wallet/setTextRecord.ts +0 -108
- package/src/functions/wallet/transferName.ts +0 -264
- package/src/functions/wallet/unwrapName.ts +0 -173
- package/src/functions/wallet/wrapName.ts +0 -189
- package/src/public.ts +0 -100
- package/src/types.ts +0 -131
- package/src/utils/checkSafeUniversalResolverData.ts +0 -62
- package/src/utils/encoders/encodeAbi.ts +0 -104
- package/src/utils/encoders/encodeClearRecords.ts +0 -9
- package/src/utils/encoders/encodeSetAbi.ts +0 -21
- package/src/utils/encoders/encodeSetAddr.ts +0 -32
- package/src/utils/encoders/encodeSetContentHash.ts +0 -25
- package/src/utils/encoders/encodeSetText.ts +0 -22
- package/src/utils/generateFunction.ts +0 -83
- package/src/utils/generateRecordCallArray.ts +0 -74
- package/src/utils/getNameType.ts +0 -18
- package/src/utils/getRevertErrorData.ts +0 -9
- package/src/utils/hexEncodedName.ts +0 -49
- package/src/utils/labels.ts +0 -96
- package/src/utils/legacyRegisterHelpers.ts +0 -147
- package/src/utils/makeLabelNodeAndParent.ts +0 -13
- package/src/utils/makeSafeSecondsDate.ts +0 -7
- package/src/utils/normalise.ts +0 -75
- package/src/utils/normaliseCoinId.ts +0 -36
- package/src/utils/validation.ts +0 -79
- package/src/wallet.ts +0 -140
- /package/dist/{functions → actions}/dns/types.js +0 -0
- /package/dist/{functions → actions}/subgraph/events.js +0 -0
- /package/dist/{functions → actions}/subgraph/fragments.js +0 -0
- /package/dist/{functions → actions}/subgraph/types.js +0 -0
- /package/dist/utils/{getNameType.js → name/getNameType.js} +0 -0
- /package/src/{functions → actions}/dns/types.ts +0 -0
- /package/src/{functions → actions}/subgraph/events.ts +0 -0
- /package/src/{functions → actions}/subgraph/fragments.ts +0 -0
- /package/src/{functions → actions}/subgraph/types.ts +0 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NameWithEmptyLabelsError,
|
|
3
|
+
RootNameIncludesOtherLabelsError,
|
|
4
|
+
} from '../../errors/utils.js'
|
|
5
|
+
import { MINIMUM_DOT_ETH_CHARS } from '../consts.js'
|
|
6
|
+
import {
|
|
7
|
+
type CheckLabelErrorType,
|
|
8
|
+
checkLabel,
|
|
9
|
+
isEncodedLabelhash,
|
|
10
|
+
type SaveNameErrorType,
|
|
11
|
+
saveName,
|
|
12
|
+
} from './labels.js'
|
|
13
|
+
import {
|
|
14
|
+
type Label,
|
|
15
|
+
type NormalizeErrorType,
|
|
16
|
+
normalize,
|
|
17
|
+
split,
|
|
18
|
+
} from './normalize.js'
|
|
19
|
+
|
|
20
|
+
// ================================
|
|
21
|
+
// Validate Name
|
|
22
|
+
// ================================
|
|
23
|
+
|
|
24
|
+
export type ValidateNameErrorType =
|
|
25
|
+
| NameWithEmptyLabelsError
|
|
26
|
+
| RootNameIncludesOtherLabelsError
|
|
27
|
+
| CheckLabelErrorType
|
|
28
|
+
| NormalizeErrorType
|
|
29
|
+
| SaveNameErrorType
|
|
30
|
+
|
|
31
|
+
export const validateName = (name: string) => {
|
|
32
|
+
const nameArray = name.split('.')
|
|
33
|
+
const normalizedArray = nameArray.map((label) => {
|
|
34
|
+
if (label.length === 0) throw new NameWithEmptyLabelsError({ name })
|
|
35
|
+
if (label === '[root]') {
|
|
36
|
+
if (name !== label) throw new RootNameIncludesOtherLabelsError({ name })
|
|
37
|
+
return label
|
|
38
|
+
}
|
|
39
|
+
return isEncodedLabelhash(label)
|
|
40
|
+
? // may throw CheckLabelErrorType
|
|
41
|
+
checkLabel(label) || label
|
|
42
|
+
: // may throw NormalizeErrorType
|
|
43
|
+
normalize(label)
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
const normalizedName = normalizedArray.join('.')
|
|
47
|
+
|
|
48
|
+
// may throw SaveNameErrorType
|
|
49
|
+
saveName(normalizedName)
|
|
50
|
+
|
|
51
|
+
return normalizedName
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// ================================
|
|
55
|
+
// Parse Input
|
|
56
|
+
// ================================
|
|
57
|
+
|
|
58
|
+
export type ParsedInputResult = {
|
|
59
|
+
type: 'name' | 'label'
|
|
60
|
+
normalized: string | undefined
|
|
61
|
+
isValid: boolean
|
|
62
|
+
isShort: boolean
|
|
63
|
+
is2LD: boolean
|
|
64
|
+
isETH: boolean
|
|
65
|
+
labelDataArray: Label[]
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export const parseInput = (input: string): ParsedInputResult => {
|
|
69
|
+
let nameReference = input
|
|
70
|
+
let isValid = false
|
|
71
|
+
|
|
72
|
+
// TODO: Should this only be catching the explicitly thrown errors or should it be catching all errors?
|
|
73
|
+
try {
|
|
74
|
+
nameReference = validateName(input)
|
|
75
|
+
isValid = true
|
|
76
|
+
} catch {}
|
|
77
|
+
|
|
78
|
+
const normalizedName = isValid ? nameReference : undefined
|
|
79
|
+
|
|
80
|
+
const labels = nameReference.split('.')
|
|
81
|
+
const tld = labels[labels.length - 1]
|
|
82
|
+
const isETH = tld === 'eth'
|
|
83
|
+
const labelDataArray = split(nameReference)
|
|
84
|
+
const isShort =
|
|
85
|
+
(labelDataArray[0].output?.length || 0) < MINIMUM_DOT_ETH_CHARS
|
|
86
|
+
|
|
87
|
+
if (labels.length === 1) {
|
|
88
|
+
return {
|
|
89
|
+
type: 'label',
|
|
90
|
+
normalized: normalizedName,
|
|
91
|
+
isShort,
|
|
92
|
+
isValid,
|
|
93
|
+
is2LD: false,
|
|
94
|
+
isETH,
|
|
95
|
+
labelDataArray,
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const is2LD = labels.length === 2
|
|
100
|
+
return {
|
|
101
|
+
type: 'name',
|
|
102
|
+
normalized: normalizedName,
|
|
103
|
+
isShort: isETH && is2LD ? isShort : false,
|
|
104
|
+
isValid,
|
|
105
|
+
is2LD,
|
|
106
|
+
isETH,
|
|
107
|
+
labelDataArray,
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// ================================
|
|
112
|
+
// Check Is Dot Eth
|
|
113
|
+
// ================================
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Checks if a label is a 2LD and is the .eth TLD
|
|
117
|
+
*/
|
|
118
|
+
export const checkIsDotEth = (labels: string[]) =>
|
|
119
|
+
labels.length === 2 && labels[1] === 'eth'
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type Coin,
|
|
3
|
+
getCoderByCoinName,
|
|
4
|
+
getCoderByCoinType,
|
|
5
|
+
} from '@ensdomains/address-encoder'
|
|
6
|
+
import { CoinFormatterNotFoundError } from '../errors/public.js'
|
|
7
|
+
import type { ErrorType } from '../errors/utils.js'
|
|
8
|
+
|
|
9
|
+
// ================================
|
|
10
|
+
// Normalize coin id
|
|
11
|
+
// ================================
|
|
12
|
+
|
|
13
|
+
export type NormalizeCoinIdReturnType =
|
|
14
|
+
| {
|
|
15
|
+
type: 'id'
|
|
16
|
+
value: number
|
|
17
|
+
}
|
|
18
|
+
| {
|
|
19
|
+
type: 'name'
|
|
20
|
+
value: string
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const normalizeCoinId = (
|
|
24
|
+
coinId: string | number,
|
|
25
|
+
): NormalizeCoinIdReturnType => {
|
|
26
|
+
const isString = typeof coinId === 'string'
|
|
27
|
+
|
|
28
|
+
if (isString && Number.isNaN(Number.parseInt(coinId))) {
|
|
29
|
+
return {
|
|
30
|
+
type: 'name',
|
|
31
|
+
value: coinId.toLowerCase().replace(/legacy$/, 'Legacy'),
|
|
32
|
+
} as const
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
type: 'id',
|
|
36
|
+
value: isString ? Number.parseInt(coinId as string) : (coinId as number),
|
|
37
|
+
} as const
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// ================================
|
|
41
|
+
// Get coder from coin
|
|
42
|
+
// ================================
|
|
43
|
+
|
|
44
|
+
export type GetCoderFromCoinReturnType = Coin
|
|
45
|
+
|
|
46
|
+
export type GetCoderFromCoinErrorType = CoinFormatterNotFoundError | ErrorType
|
|
47
|
+
|
|
48
|
+
export const getCoderFromCoin = (
|
|
49
|
+
coinId: string | number,
|
|
50
|
+
): GetCoderFromCoinReturnType => {
|
|
51
|
+
const normalizedCoin = normalizeCoinId(coinId)
|
|
52
|
+
let coder: Coin
|
|
53
|
+
try {
|
|
54
|
+
coder =
|
|
55
|
+
normalizedCoin.type === 'id'
|
|
56
|
+
? // may throw Error
|
|
57
|
+
getCoderByCoinType(normalizedCoin.value)
|
|
58
|
+
: // may throw Error
|
|
59
|
+
getCoderByCoinName(normalizedCoin.value)
|
|
60
|
+
} catch {
|
|
61
|
+
throw new CoinFormatterNotFoundError({ coinType: coinId })
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return coder
|
|
65
|
+
}
|
|
@@ -1,22 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import {
|
|
2
|
+
type Chain,
|
|
3
|
+
getChainContractAddress,
|
|
4
|
+
type Hex,
|
|
5
|
+
type LabelhashErrorType,
|
|
6
|
+
labelhash,
|
|
7
|
+
type ReadContractParameters,
|
|
8
|
+
} from 'viem'
|
|
9
|
+
import type { RequireChainContracts } from '../clients/chain.js'
|
|
5
10
|
import { nameWrapperOwnerOfSnippet } from '../contracts/nameWrapper.js'
|
|
6
11
|
import { registryOwnerSnippet } from '../contracts/registry.js'
|
|
7
12
|
import { InvalidContractTypeError } from '../errors/general.js'
|
|
13
|
+
import { ASSERT_NO_TYPE_ERROR } from '../types/internal.js'
|
|
8
14
|
|
|
9
15
|
export type OwnerContract = 'nameWrapper' | 'registry' | 'registrar'
|
|
10
16
|
|
|
11
17
|
export type OwnerFromContractArgs = {
|
|
12
|
-
client: ClientWithEns
|
|
13
18
|
contract: OwnerContract
|
|
14
|
-
|
|
19
|
+
node?: Hex
|
|
15
20
|
labels?: string[]
|
|
16
21
|
} & (
|
|
17
22
|
| {
|
|
18
23
|
contract: Exclude<OwnerContract, 'registrar'>
|
|
19
|
-
|
|
24
|
+
node: Hex
|
|
20
25
|
}
|
|
21
26
|
| {
|
|
22
27
|
contract: 'registrar'
|
|
@@ -24,43 +29,53 @@ export type OwnerFromContractArgs = {
|
|
|
24
29
|
}
|
|
25
30
|
)
|
|
26
31
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
const abi = [...nameWrapperOwnerOfSnippet, ...registryOwnerSnippet] as const
|
|
33
|
+
|
|
34
|
+
// ================================
|
|
35
|
+
// Get contract specific owner parameters
|
|
36
|
+
// ================================
|
|
37
|
+
|
|
38
|
+
export type GetContractSpecificOwnerParametersErrorType =
|
|
39
|
+
// | GetChainContractAddressErrorType
|
|
40
|
+
InvalidContractTypeError | LabelhashErrorType
|
|
41
|
+
|
|
42
|
+
export const getContractSpecificOwnerParameters = <_chain extends Chain>(
|
|
43
|
+
chain: RequireChainContracts<
|
|
44
|
+
_chain,
|
|
45
|
+
'ensNameWrapper' | 'ensRegistry' | 'ensBaseRegistrarImplementation'
|
|
46
|
+
>,
|
|
47
|
+
{ contract, node, labels }: OwnerFromContractArgs,
|
|
48
|
+
) => {
|
|
49
|
+
ASSERT_NO_TYPE_ERROR(chain)
|
|
50
|
+
|
|
33
51
|
switch (contract) {
|
|
34
52
|
case 'nameWrapper':
|
|
35
53
|
return {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
functionName: 'ownerOf',
|
|
40
|
-
args: [BigInt(namehash)],
|
|
54
|
+
address: getChainContractAddress({
|
|
55
|
+
chain,
|
|
56
|
+
contract: 'ensNameWrapper',
|
|
41
57
|
}),
|
|
42
|
-
|
|
58
|
+
abi,
|
|
59
|
+
functionName: 'ownerOf',
|
|
60
|
+
args: [BigInt(node)],
|
|
61
|
+
} as const satisfies ReadContractParameters<typeof abi, 'ownerOf'>
|
|
43
62
|
case 'registry':
|
|
44
63
|
return {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}),
|
|
51
|
-
}
|
|
64
|
+
address: getChainContractAddress({ chain, contract: 'ensRegistry' }),
|
|
65
|
+
abi,
|
|
66
|
+
functionName: 'owner',
|
|
67
|
+
args: [node],
|
|
68
|
+
} as const satisfies ReadContractParameters<typeof abi, 'owner'>
|
|
52
69
|
case 'registrar':
|
|
53
70
|
return {
|
|
54
|
-
|
|
55
|
-
|
|
71
|
+
address: getChainContractAddress({
|
|
72
|
+
chain,
|
|
56
73
|
contract: 'ensBaseRegistrarImplementation',
|
|
57
74
|
}),
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}),
|
|
63
|
-
}
|
|
75
|
+
abi,
|
|
76
|
+
functionName: 'ownerOf',
|
|
77
|
+
args: [BigInt(labelhash(labels[0]))],
|
|
78
|
+
} as const satisfies ReadContractParameters<typeof abi, 'ownerOf'>
|
|
64
79
|
default:
|
|
65
80
|
throw new InvalidContractTypeError({
|
|
66
81
|
contractType: contract,
|
|
@@ -1,24 +1,36 @@
|
|
|
1
1
|
import {
|
|
2
2
|
type Address,
|
|
3
|
-
type
|
|
3
|
+
type EncodeAbiParametersErrorType,
|
|
4
4
|
encodeAbiParameters,
|
|
5
|
+
encodeFunctionData,
|
|
6
|
+
type Hex,
|
|
7
|
+
type Keccak256ErrorType,
|
|
5
8
|
keccak256,
|
|
9
|
+
type LabelhashErrorType,
|
|
6
10
|
labelhash,
|
|
11
|
+
type PadErrorType,
|
|
7
12
|
pad,
|
|
13
|
+
type ToBytesErrorType,
|
|
14
|
+
type ToHexErrorType,
|
|
8
15
|
toBytes,
|
|
9
16
|
toHex,
|
|
17
|
+
zeroAddress,
|
|
10
18
|
} from 'viem'
|
|
19
|
+
import { type NamehashErrorType, namehash } from 'viem/ens'
|
|
11
20
|
import {
|
|
12
21
|
CampaignReferenceTooLargeError,
|
|
22
|
+
type ErrorType,
|
|
13
23
|
ResolverAddressRequiredError,
|
|
14
24
|
} from '../errors/utils.js'
|
|
15
|
-
import { EMPTY_ADDRESS } from './consts.js'
|
|
16
|
-
import { type EncodeChildFusesInputObject, encodeFuses } from './fuses.js'
|
|
17
25
|
import {
|
|
18
26
|
type RecordOptions,
|
|
19
|
-
|
|
20
|
-
} from './
|
|
21
|
-
import {
|
|
27
|
+
resolverMulticallParameters,
|
|
28
|
+
} from './coders/resolverMulticallParameters.js'
|
|
29
|
+
import {
|
|
30
|
+
type EncodeChildFusesInputObject,
|
|
31
|
+
type EncodeFusesErrorType,
|
|
32
|
+
encodeFuses,
|
|
33
|
+
} from './fuses.js'
|
|
22
34
|
|
|
23
35
|
export type RegistrationParameters = {
|
|
24
36
|
/** Name to register */
|
|
@@ -68,6 +80,18 @@ const cryptoRef =
|
|
|
68
80
|
window.crypto) ||
|
|
69
81
|
undefined
|
|
70
82
|
|
|
83
|
+
// ================================
|
|
84
|
+
// Random secret
|
|
85
|
+
// ================================
|
|
86
|
+
|
|
87
|
+
export type RandomSecretErrorType =
|
|
88
|
+
| ToBytesErrorType
|
|
89
|
+
| NamehashErrorType
|
|
90
|
+
| CampaignReferenceTooLargeError
|
|
91
|
+
| PadErrorType
|
|
92
|
+
| ToHexErrorType
|
|
93
|
+
| ErrorType
|
|
94
|
+
|
|
71
95
|
export const randomSecret = ({
|
|
72
96
|
platformDomain,
|
|
73
97
|
campaign,
|
|
@@ -75,7 +99,7 @@ export const randomSecret = ({
|
|
|
75
99
|
platformDomain?: string
|
|
76
100
|
campaign?: number
|
|
77
101
|
} = {}) => {
|
|
78
|
-
const bytes = cryptoRef
|
|
102
|
+
const bytes = cryptoRef?.getRandomValues(new Uint8Array(32))!
|
|
79
103
|
if (platformDomain) {
|
|
80
104
|
const hash = toBytes(namehash(platformDomain))
|
|
81
105
|
for (let i = 0; i < 4; i += 1) {
|
|
@@ -93,16 +117,26 @@ export const randomSecret = ({
|
|
|
93
117
|
return toHex(bytes)
|
|
94
118
|
}
|
|
95
119
|
|
|
96
|
-
|
|
120
|
+
// ================================
|
|
121
|
+
// Make commitment tuple
|
|
122
|
+
// ================================
|
|
123
|
+
|
|
124
|
+
export type MakeCommitmentTupleErrorType =
|
|
125
|
+
| LabelhashErrorType
|
|
126
|
+
| NamehashErrorType
|
|
127
|
+
| EncodeFusesErrorType
|
|
128
|
+
| ResolverAddressRequiredError
|
|
129
|
+
|
|
130
|
+
export const makeCommitmentTuple = async ({
|
|
97
131
|
name,
|
|
98
132
|
owner,
|
|
99
133
|
duration,
|
|
100
|
-
resolverAddress =
|
|
134
|
+
resolverAddress = zeroAddress,
|
|
101
135
|
records: { coins = [], ...records } = { texts: [], coins: [] },
|
|
102
136
|
reverseRecord,
|
|
103
137
|
fuses,
|
|
104
138
|
secret,
|
|
105
|
-
}: RegistrationParameters): CommitmentTuple => {
|
|
139
|
+
}: RegistrationParameters): Promise<CommitmentTuple> => {
|
|
106
140
|
const labelHash = labelhash(name.split('.')[0])
|
|
107
141
|
const hash = namehash(name)
|
|
108
142
|
const fuseData = fuses
|
|
@@ -123,10 +157,12 @@ export const makeCommitmentTuple = ({
|
|
|
123
157
|
}
|
|
124
158
|
|
|
125
159
|
const data = records
|
|
126
|
-
?
|
|
160
|
+
? (await resolverMulticallParameters({ namehash: hash, coins, ...records }))
|
|
161
|
+
// @ts-expect-error needs TS magic
|
|
162
|
+
.map((item) => encodeFunctionData(item))
|
|
127
163
|
: []
|
|
128
164
|
|
|
129
|
-
if (data.length > 0 && resolverAddress ===
|
|
165
|
+
if (data.length > 0 && resolverAddress === zeroAddress)
|
|
130
166
|
throw new ResolverAddressRequiredError({
|
|
131
167
|
data: {
|
|
132
168
|
name,
|
|
@@ -151,15 +187,29 @@ export const makeCommitmentTuple = ({
|
|
|
151
187
|
]
|
|
152
188
|
}
|
|
153
189
|
|
|
154
|
-
|
|
190
|
+
// ================================
|
|
191
|
+
// Make registration tuple
|
|
192
|
+
// ================================
|
|
193
|
+
|
|
194
|
+
export type MakeRegistrationTupleErrorType = MakeCommitmentTupleErrorType
|
|
195
|
+
|
|
196
|
+
export const makeRegistrationTuple = async (
|
|
155
197
|
params: RegistrationParameters,
|
|
156
|
-
): RegistrationTuple => {
|
|
198
|
+
): Promise<RegistrationTuple> => {
|
|
157
199
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
158
|
-
const [_labelhash, ...commitmentData] = makeCommitmentTuple(params)
|
|
200
|
+
const [_labelhash, ...commitmentData] = await makeCommitmentTuple(params)
|
|
159
201
|
const label = params.name.split('.')[0]
|
|
160
202
|
return [label, ...commitmentData]
|
|
161
203
|
}
|
|
162
204
|
|
|
205
|
+
// ================================
|
|
206
|
+
// Make commitment from tuple
|
|
207
|
+
// ================================
|
|
208
|
+
|
|
209
|
+
export type MakeCommitmentFromTupleErrorType =
|
|
210
|
+
| Keccak256ErrorType
|
|
211
|
+
| EncodeAbiParametersErrorType
|
|
212
|
+
|
|
163
213
|
export const makeCommitmentFromTuple = (params: CommitmentTuple): Hex => {
|
|
164
214
|
return keccak256(
|
|
165
215
|
encodeAbiParameters(
|
|
@@ -178,5 +228,14 @@ export const makeCommitmentFromTuple = (params: CommitmentTuple): Hex => {
|
|
|
178
228
|
)
|
|
179
229
|
}
|
|
180
230
|
|
|
181
|
-
|
|
182
|
-
|
|
231
|
+
// ================================
|
|
232
|
+
// Make commitment
|
|
233
|
+
// ================================
|
|
234
|
+
|
|
235
|
+
export type MakeCommitmentErrorType =
|
|
236
|
+
| MakeCommitmentTupleErrorType
|
|
237
|
+
| MakeCommitmentFromTupleErrorType
|
|
238
|
+
|
|
239
|
+
export const makeCommitment = async (
|
|
240
|
+
params: RegistrationParameters,
|
|
241
|
+
): Promise<Hex> => makeCommitmentFromTuple(await makeCommitmentTuple(params))
|
package/src/utils/wrapper.ts
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import { stringToBytes } from 'viem'
|
|
2
|
-
import { WrappedLabelTooLargeError } from '../errors/utils.js'
|
|
3
|
-
import type { AnyDate } from '../types.js'
|
|
1
|
+
import { type StringToBytesErrorType, stringToBytes } from 'viem'
|
|
2
|
+
import { type ErrorType, WrappedLabelTooLargeError } from '../errors/utils.js'
|
|
3
|
+
import type { AnyDate } from '../types/index.js'
|
|
4
4
|
import { ParentFuses } from './fuses.js'
|
|
5
5
|
|
|
6
6
|
export const MAX_EXPIRY = 2n ** 64n - 1n
|
|
7
7
|
|
|
8
|
+
// ================================
|
|
9
|
+
// Expiry to bigint
|
|
10
|
+
// ================================
|
|
11
|
+
|
|
12
|
+
export type ExpiryToBigIntErrorType = TypeError | ErrorType
|
|
13
|
+
|
|
8
14
|
export const expiryToBigInt = (expiry?: AnyDate, defaultValue = 0n): bigint => {
|
|
9
15
|
if (!expiry) return defaultValue
|
|
10
16
|
if (typeof expiry === 'bigint') return expiry
|
|
@@ -14,12 +20,29 @@ export const expiryToBigInt = (expiry?: AnyDate, defaultValue = 0n): bigint => {
|
|
|
14
20
|
throw new TypeError('Expiry must be a bigint, string, number or Date')
|
|
15
21
|
}
|
|
16
22
|
|
|
23
|
+
// ================================
|
|
24
|
+
// Wrapped label length check
|
|
25
|
+
// ================================
|
|
26
|
+
|
|
27
|
+
export type WrappedLabelLengthCheckErrorType =
|
|
28
|
+
| WrappedLabelTooLargeError
|
|
29
|
+
| StringToBytesErrorType
|
|
30
|
+
|
|
17
31
|
export const wrappedLabelLengthCheck = (label: string) => {
|
|
18
32
|
const bytes = stringToBytes(label)
|
|
19
33
|
if (bytes.byteLength > 255)
|
|
20
|
-
throw new WrappedLabelTooLargeError({
|
|
34
|
+
throw new WrappedLabelTooLargeError({
|
|
35
|
+
label,
|
|
36
|
+
byteLength: bytes.byteLength,
|
|
37
|
+
})
|
|
21
38
|
}
|
|
22
39
|
|
|
40
|
+
// ================================
|
|
41
|
+
// Make default expiry
|
|
42
|
+
// ================================
|
|
43
|
+
|
|
44
|
+
export type MakeDefaultExpiryErrorType = ErrorType
|
|
45
|
+
|
|
23
46
|
export const makeDefaultExpiry = (fuses?: number): bigint => {
|
|
24
47
|
if (fuses && BigInt(fuses) & ParentFuses.PARENT_CANNOT_CONTROL)
|
|
25
48
|
return MAX_EXPIRY
|
package/dist/clients/public.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { type Client, type ClientConfig, type PublicRpcSchema, type Transport } from 'viem';
|
|
2
|
-
import type { ChainWithBaseContracts, ChainWithEns } from '../contracts/consts.js';
|
|
3
|
-
import type { Prettify } from '../types.js';
|
|
4
|
-
import { type EnsPublicActions } from './decorators/public.js';
|
|
5
|
-
import { type EnsSubgraphActions } from './decorators/subgraph.js';
|
|
6
|
-
export type EnsPublicClientConfig<TTransport extends Transport = Transport, TChain extends ChainWithBaseContracts = ChainWithBaseContracts> = Pick<ClientConfig<TTransport, TChain>, 'batch' | 'key' | 'name' | 'pollingInterval' | 'transport'> & {
|
|
7
|
-
chain: TChain;
|
|
8
|
-
};
|
|
9
|
-
export type EnsPublicClient<TTransport extends Transport = Transport, TChain extends ChainWithEns = ChainWithEns> = Prettify<Client<TTransport, TChain, undefined, PublicRpcSchema, EnsPublicActions & EnsSubgraphActions>>;
|
|
10
|
-
/**
|
|
11
|
-
* Creates a ENS Public Client with a given [Transport](https://viem.sh/docs/clients/intro.html) configured for a [Chain](https://viem.sh/docs/clients/chains.html).
|
|
12
|
-
*
|
|
13
|
-
* @param config - {@link EnsPublicClientConfig}
|
|
14
|
-
* @returns An ENS Public Client. {@link EnsPublicClient}
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* import { http } from 'viem'
|
|
18
|
-
* import { mainnet } from 'viem/chains'
|
|
19
|
-
* import { createEnsPublicClient } from '@ensdomains/ensjs'
|
|
20
|
-
*
|
|
21
|
-
* const client = createEnsPublicClient({
|
|
22
|
-
* chain: mainnet,
|
|
23
|
-
* transport: http(),
|
|
24
|
-
* })
|
|
25
|
-
*/
|
|
26
|
-
export declare const createEnsPublicClient: <TTransport extends Transport, TChain extends ChainWithBaseContracts>({ batch, chain, key, name, transport, pollingInterval, }: EnsPublicClientConfig<TTransport, TChain>) => EnsPublicClient<TTransport, ChainWithEns<TChain>>;
|
package/dist/clients/public.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { createClient, } from 'viem';
|
|
2
|
-
import { addEnsContracts } from '../contracts/addEnsContracts.js';
|
|
3
|
-
import { ensPublicActions } from './decorators/public.js';
|
|
4
|
-
import { ensSubgraphActions, } from './decorators/subgraph.js';
|
|
5
|
-
/**
|
|
6
|
-
* Creates a ENS Public Client with a given [Transport](https://viem.sh/docs/clients/intro.html) configured for a [Chain](https://viem.sh/docs/clients/chains.html).
|
|
7
|
-
*
|
|
8
|
-
* @param config - {@link EnsPublicClientConfig}
|
|
9
|
-
* @returns An ENS Public Client. {@link EnsPublicClient}
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* import { http } from 'viem'
|
|
13
|
-
* import { mainnet } from 'viem/chains'
|
|
14
|
-
* import { createEnsPublicClient } from '@ensdomains/ensjs'
|
|
15
|
-
*
|
|
16
|
-
* const client = createEnsPublicClient({
|
|
17
|
-
* chain: mainnet,
|
|
18
|
-
* transport: http(),
|
|
19
|
-
* })
|
|
20
|
-
*/
|
|
21
|
-
export const createEnsPublicClient = ({ batch, chain, key = 'ensPublic', name = 'ENS Public Client', transport, pollingInterval, }) => {
|
|
22
|
-
return createClient({
|
|
23
|
-
batch,
|
|
24
|
-
chain: addEnsContracts(chain),
|
|
25
|
-
key,
|
|
26
|
-
name,
|
|
27
|
-
pollingInterval,
|
|
28
|
-
transport,
|
|
29
|
-
type: 'ensPublicClient',
|
|
30
|
-
})
|
|
31
|
-
.extend(ensPublicActions)
|
|
32
|
-
.extend(ensSubgraphActions);
|
|
33
|
-
};
|
|
34
|
-
//# sourceMappingURL=public.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"public.js","sourceRoot":"","sources":["../../src/clients/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,YAAY,GACb,MAAM,MAAM,CAAA;AACb,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AAMjE,OAAO,EAAyB,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAChF,OAAO,EAEL,kBAAkB,GACnB,MAAM,0BAA0B,CAAA;AAyBjC;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAGnC,EACA,KAAK,EACL,KAAK,EACL,GAAG,GAAG,WAAW,EACjB,IAAI,GAAG,mBAAmB,EAC1B,SAAS,EACT,eAAe,GAC2B,EAG1C,EAAE;IACF,OAAO,YAAY,CAAC;QAClB,KAAK;QACL,KAAK,EAAE,eAAe,CAAC,KAAK,CAAC;QAC7B,GAAG;QACH,IAAI;QACJ,eAAe;QACf,SAAS;QACT,IAAI,EAAE,iBAAiB;KACxB,CAAC;SACC,MAAM,CAAC,gBAAgB,CAAC;SACxB,MAAM,CAAC,kBAAkB,CAAC,CAAA;AAC/B,CAAC,CAAA"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { type Client, type ClientConfig, type PublicRpcSchema, type Transport } from 'viem';
|
|
2
|
-
import type { ChainWithBaseContracts, ChainWithEns } from '../contracts/consts.js';
|
|
3
|
-
import type { Prettify } from '../types.js';
|
|
4
|
-
import { type EnsSubgraphActions } from './decorators/subgraph.js';
|
|
5
|
-
export type EnsSubgraphClientConfig<TTransport extends Transport = Transport, TChain extends ChainWithBaseContracts = ChainWithBaseContracts> = Pick<ClientConfig<TTransport, TChain>, 'batch' | 'key' | 'name' | 'pollingInterval' | 'transport'> & {
|
|
6
|
-
chain: TChain;
|
|
7
|
-
};
|
|
8
|
-
export type EnsSubgraphClient<TTransport extends Transport = Transport, TChain extends ChainWithEns = ChainWithEns> = Prettify<Client<TTransport, TChain, undefined, PublicRpcSchema, EnsSubgraphActions>>;
|
|
9
|
-
/**
|
|
10
|
-
* Creates a ENS Subgraph Client with a given [Transport](https://viem.sh/docs/clients/intro.html) configured for a [Chain](https://viem.sh/docs/clients/chains.html).
|
|
11
|
-
*
|
|
12
|
-
* @param config - {@link EnsSubgraphClientConfig}
|
|
13
|
-
* @returns An ENS Subgraph Client. {@link EnsSubgraphClient}
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* import { http } from 'viem'
|
|
17
|
-
* import { mainnet } from 'viem/chains'
|
|
18
|
-
* import { createEnsSubgraphClient } from '@ensdomains/ensjs'
|
|
19
|
-
*
|
|
20
|
-
* const client = createEnsSubgraphClient({
|
|
21
|
-
* chain: mainnet,
|
|
22
|
-
* transport: http(),
|
|
23
|
-
* })
|
|
24
|
-
*/
|
|
25
|
-
export declare const createEnsSubgraphClient: <TTransport extends Transport, TChain extends ChainWithBaseContracts>({ batch, chain, key, name, transport, pollingInterval, }: EnsSubgraphClientConfig<TTransport, TChain>) => EnsSubgraphClient<TTransport, ChainWithEns<TChain>>;
|
package/dist/clients/subgraph.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { createClient, } from 'viem';
|
|
2
|
-
import { addEnsContracts } from '../contracts/addEnsContracts.js';
|
|
3
|
-
import { ensSubgraphActions, } from './decorators/subgraph.js';
|
|
4
|
-
/**
|
|
5
|
-
* Creates a ENS Subgraph Client with a given [Transport](https://viem.sh/docs/clients/intro.html) configured for a [Chain](https://viem.sh/docs/clients/chains.html).
|
|
6
|
-
*
|
|
7
|
-
* @param config - {@link EnsSubgraphClientConfig}
|
|
8
|
-
* @returns An ENS Subgraph Client. {@link EnsSubgraphClient}
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* import { http } from 'viem'
|
|
12
|
-
* import { mainnet } from 'viem/chains'
|
|
13
|
-
* import { createEnsSubgraphClient } from '@ensdomains/ensjs'
|
|
14
|
-
*
|
|
15
|
-
* const client = createEnsSubgraphClient({
|
|
16
|
-
* chain: mainnet,
|
|
17
|
-
* transport: http(),
|
|
18
|
-
* })
|
|
19
|
-
*/
|
|
20
|
-
export const createEnsSubgraphClient = ({ batch, chain, key = 'ensSubgraph', name = 'ENS Subgraph Client', transport, pollingInterval, }) => {
|
|
21
|
-
return createClient({
|
|
22
|
-
batch,
|
|
23
|
-
chain: addEnsContracts(chain),
|
|
24
|
-
key,
|
|
25
|
-
name,
|
|
26
|
-
pollingInterval,
|
|
27
|
-
transport,
|
|
28
|
-
type: 'ensSubgraphClient',
|
|
29
|
-
}).extend(ensSubgraphActions);
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=subgraph.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subgraph.js","sourceRoot":"","sources":["../../src/clients/subgraph.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,YAAY,GACb,MAAM,MAAM,CAAA;AACb,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AAMjE,OAAO,EAEL,kBAAkB,GACnB,MAAM,0BAA0B,CAAA;AAmBjC;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAGrC,EACA,KAAK,EACL,KAAK,EACL,GAAG,GAAG,aAAa,EACnB,IAAI,GAAG,qBAAqB,EAC5B,SAAS,EACT,eAAe,GAC6B,EAG5C,EAAE;IACF,OAAO,YAAY,CAAC;QAClB,KAAK;QACL,KAAK,EAAE,eAAe,CAAC,KAAK,CAAC;QAC7B,GAAG;QACH,IAAI;QACJ,eAAe;QACf,SAAS;QACT,IAAI,EAAE,mBAAmB;KAC1B,CAAC,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAA;AAC/B,CAAC,CAAA"}
|
package/dist/clients/wallet.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { type Account, type Address, type Client, type ClientConfig, type ParseAccount, type Transport, type WalletActions, type WalletRpcSchema } from 'viem';
|
|
2
|
-
import type { ChainWithBaseContracts, ChainWithEns, CheckedChainWithEns } from '../contracts/consts.js';
|
|
3
|
-
import type { Assign, Prettify } from '../types.js';
|
|
4
|
-
import { type EnsWalletActions } from './decorators/wallet.js';
|
|
5
|
-
export type EnsWalletClientConfig<TTransport extends Transport, TChain extends ChainWithBaseContracts, TAccountOrAddress extends Account | Address | undefined = Account | Address | undefined> = Assign<Pick<ClientConfig<TTransport, TChain, TAccountOrAddress>, 'account' | 'chain' | 'key' | 'name' | 'pollingInterval' | 'transport'>, {
|
|
6
|
-
chain: TChain;
|
|
7
|
-
}>;
|
|
8
|
-
export type EnsWalletClient<TTransport extends Transport = Transport, TChain extends ChainWithEns = ChainWithEns, TAccount extends Account | undefined = Account | undefined> = Prettify<Client<TTransport, TChain, TAccount, WalletRpcSchema, WalletActions<TChain, TAccount> & EnsWalletActions<TChain, TAccount>>>;
|
|
9
|
-
/**
|
|
10
|
-
* Creates an ENS Wallet Client with a given [Transport](https://viem.sh/docs/clients/intro.html) configured for a [Chain](https://viem.sh/docs/clients/chains.html).
|
|
11
|
-
*
|
|
12
|
-
* @param config - {@link EnsWalletClientConfig}
|
|
13
|
-
* @returns An ENS Wallet Client. {@link EnsWalletClient}
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* import { custom } from 'viem'
|
|
17
|
-
* import { mainnet } from 'viem/chains'
|
|
18
|
-
* import { createEnsWalletClient } from '@ensdomains/ensjs'
|
|
19
|
-
*
|
|
20
|
-
* const client = createEnsWalletClient({
|
|
21
|
-
* chain: mainnet,
|
|
22
|
-
* transport: custom(window.ethereum),
|
|
23
|
-
* })
|
|
24
|
-
*/
|
|
25
|
-
export declare const createEnsWalletClient: <TTransport extends Transport, TChain extends ChainWithBaseContracts, TAccountOrAddress extends Account | Address | undefined = undefined>({ account, chain, key, name, transport, pollingInterval, }: EnsWalletClientConfig<TTransport, TChain, TAccountOrAddress>) => EnsWalletClient<TTransport, CheckedChainWithEns<TChain>, ParseAccount<TAccountOrAddress>>;
|