@thenamespace/ens-components 0.19.0 → 0.20.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/README.md +101 -70
- package/dist/index.css +1 -4890
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +200 -26718
- package/dist/index.js +28464 -132563
- package/dist/index.js.map +1 -1
- package/dist/styles.js +3 -3
- package/dist/types/components/atoms/icon/Icon.d.ts +1 -1
- package/dist/types/components/atoms/index.d.ts +1 -0
- package/dist/types/components/atoms/input/Input.d.ts +1 -0
- package/dist/types/components/atoms/spinner/ShurikenSpinner.d.ts +8 -0
- package/dist/types/components/ens-name-registration/ENSNameRegistrationForm.d.ts +10 -0
- package/dist/types/components/ens-name-registration/RegistrationProcess.d.ts +20 -0
- package/dist/types/components/ens-name-registration/RegistrationSummary.d.ts +32 -0
- package/dist/types/components/ens-name-registration/SetNameRecords.d.ts +9 -0
- package/dist/types/components/ens-name-registration/registration/CommitmentStep.d.ts +11 -0
- package/dist/types/components/{ens-names-registrar-component/sub-components → ens-name-registration/registration}/ProgressBar.d.ts +1 -0
- package/dist/types/components/ens-name-registration/registration/RegistrationStep.d.ts +17 -0
- package/dist/types/components/ens-name-registration/registration/SuccessScreen.d.ts +16 -0
- package/dist/types/components/{ens-names-registrar-component/sub-components → ens-name-registration/registration}/Timer.d.ts +1 -0
- package/dist/types/components/ens-name-registration/registration/TimerStep.d.ts +8 -0
- package/dist/types/components/ens-name-registration/registration/TransactionPendingScreen.d.ts +10 -0
- package/dist/types/components/ens-name-registration/registration/index.d.ts +7 -0
- package/dist/types/components/ens-name-registration/registration/types.d.ts +28 -0
- package/dist/types/components/index.d.ts +1 -6
- package/dist/types/components/molecules/accordion/Accordion.d.ts +16 -0
- package/dist/types/components/molecules/accordion/index.d.ts +1 -0
- package/dist/types/components/molecules/contract-error-label/ContractErrorLabel.d.ts +16 -0
- package/dist/types/components/molecules/contract-error-label/index.d.ts +1 -0
- package/dist/types/components/molecules/index.d.ts +2 -0
- package/dist/types/components/select-records-form/SelectRecordsForm.d.ts +2 -1
- package/dist/types/constants/records/addressConstants.d.ts +0 -1
- package/dist/types/hooks/abis/index.d.ts +92 -0
- package/dist/types/hooks/index.d.ts +2 -25
- package/dist/types/hooks/useRegisterENS.d.ts +23 -0
- package/dist/types/hooks/useWaitTransaction.d.ts +13 -0
- package/dist/types/index.d.ts +1 -2
- package/dist/types/types/index.d.ts +0 -10
- package/dist/types/utils/ens.d.ts +2 -3
- package/dist/types/utils/index.d.ts +2 -0
- package/dist/types/utils/models.d.ts +1 -2
- package/dist/types/utils/strings.d.ts +1 -0
- package/dist/types/web3/index.d.ts +0 -4
- package/package.json +16 -17
- package/dist/types/backend/index.d.ts +0 -1
- package/dist/types/backend/list-manager/index.d.ts +0 -57
- package/dist/types/components/ens-names-card/EnsNameCard.d.ts +0 -14
- package/dist/types/components/ens-names-registrar-component/ENSNamesRegistrarComponent.d.ts +0 -17
- package/dist/types/components/ens-names-registrar-component/sub-components/CostSummary.d.ts +0 -12
- package/dist/types/components/ens-names-registrar-component/sub-components/Header.d.ts +0 -8
- package/dist/types/components/ens-names-registrar-component/sub-components/NameSearch.d.ts +0 -12
- package/dist/types/components/ens-names-registrar-component/sub-components/RegistrationForm.d.ts +0 -24
- package/dist/types/components/ens-names-registrar-component/sub-components/RegistrationProcess.d.ts +0 -10
- package/dist/types/components/ens-names-registrar-component/sub-components/StepItem.d.ts +0 -11
- package/dist/types/components/ens-names-registrar-component/sub-components/SuccessScreen.d.ts +0 -13
- package/dist/types/components/ens-navbar-profile-card/NavbarProfileCard.d.ts +0 -14
- package/dist/types/components/ens-profile-card/ProfileCard.d.ts +0 -24
- package/dist/types/components/subname-offchain-registrar-modal/SubnameOffChainRegistrarModal.d.ts +0 -18
- package/dist/types/components/subname-offchain-registrar-modal/sub-components/InitialStep.d.ts +0 -9
- package/dist/types/components/subname-offchain-registrar-modal/sub-components/OffchainRegistrationProcess.d.ts +0 -18
- package/dist/types/components/subname-offchain-registrar-modal/sub-components/OffchainSuccessScreen.d.ts +0 -8
- package/dist/types/components/subname-onchain-registrar-modal/SubnameOnChainRegistrarModal.d.ts +0 -31
- package/dist/types/components/subname-onchain-registrar-modal/sub-components/ConfirmationStep.d.ts +0 -18
- package/dist/types/components/subname-onchain-registrar-modal/sub-components/InitialStep.d.ts +0 -11
- package/dist/types/components/subname-onchain-registrar-modal/sub-components/OnchainSuccessScreen.d.ts +0 -6
- package/dist/types/components/subname-onchain-registrar-modal/sub-components/RegistrationStep.d.ts +0 -28
- package/dist/types/context/account-context.d.ts +0 -44
- package/dist/types/context/account-filter-context.d.ts +0 -32
- package/dist/types/context/auth-context.d.ts +0 -22
- package/dist/types/context/crop-image-context.d.ts +0 -27
- package/dist/types/context/current-user-context.d.ts +0 -19
- package/dist/types/context/edit-profile-context.d.ts +0 -13
- package/dist/types/context/ens-profile-context.d.ts +0 -54
- package/dist/types/context/index.d.ts +0 -6
- package/dist/types/context/listing-form-context.d.ts +0 -55
- package/dist/types/context/listing-status-context.d.ts +0 -19
- package/dist/types/context/mint-subname-context.d.ts +0 -12
- package/dist/types/context/profile-filter.context.d.ts +0 -19
- package/dist/types/environment/index.d.ts +0 -9
- package/dist/types/hooks/efp/use-efp.d.ts +0 -11
- package/dist/types/hooks/ens/ens-local-cache.d.ts +0 -18
- package/dist/types/hooks/ens/use-ens-client.d.ts +0 -763
- package/dist/types/hooks/ens/use-ens-contract-address.d.ts +0 -1
- package/dist/types/hooks/ens/use-ens-name-profile.d.ts +0 -15
- package/dist/types/hooks/ens/use-ens.d.ts +0 -21
- package/dist/types/hooks/ens/use-eth-registrar-controller.d.ts +0 -21
- package/dist/types/hooks/ens/use-name-wrapper.d.ts +0 -6
- package/dist/types/hooks/ens/use-owned-ens-names.d.ts +0 -9
- package/dist/types/hooks/namespace/use-burn-l2-subname.d.ts +0 -4
- package/dist/types/hooks/namespace/use-hybrid-resolver.d.ts +0 -10
- package/dist/types/hooks/namespace/use-l2-controller.d.ts +0 -8
- package/dist/types/hooks/namespace/use-listing-manager.d.ts +0 -2
- package/dist/types/hooks/namespace/use-mint-client.d.ts +0 -2
- package/dist/types/hooks/namespace/use-mintable-listings.d.ts +0 -7
- package/dist/types/hooks/namespace/use-name-listings.d.ts +0 -1
- package/dist/types/hooks/namespace/use-namespace-account.d.ts +0 -25
- package/dist/types/hooks/namespace/use-namespace-indexer.d.ts +0 -7
- package/dist/types/hooks/namespace/use-re-render-image.d.ts +0 -1
- package/dist/types/hooks/namespace/use-trading-stats.d.ts +0 -1
- package/dist/types/hooks/upload-image/use-upload-image.d.ts +0 -8
- package/dist/types/hooks/use-error-modal.d.ts +0 -4
- package/dist/types/hooks/use-screen-size.d.ts +0 -5
- package/dist/types/hooks/useWaitForTransaction.d.ts +0 -3
- package/dist/types/hooks/useWeb3Clients.d.ts +0 -8041
- package/dist/types/hooks/web3/alchemy-sdk-no-ssr.d.ts +0 -0
- package/dist/types/hooks/web3/use-alchemy-sdk.d.ts +0 -4
- package/dist/types/hooks/web3/use-block-explorer.d.ts +0 -2
- package/dist/types/hooks/web3/use-blockexplorer-url.d.ts +0 -2
- package/dist/types/hooks/web3/use-contract-addresses.d.ts +0 -1
- package/dist/types/hooks/web3/use-l1-name-minter.d.ts +0 -5
- package/dist/types/hooks/web3/use-main-chain.d.ts +0 -10
- package/dist/types/hooks/web3/use-main-public-client.d.ts +0 -3624
- package/dist/types/hooks/web3/use-name-resolver.d.ts +0 -24
- package/dist/types/hooks/web3/use-name-wrapper.d.ts +0 -3
- package/dist/types/hooks/web3/use-wait-for-transaction.d.ts +0 -8
- package/dist/types/hooks/web3/use-web3-clients.d.ts +0 -8042
- package/dist/types/types/auth.d.ts +0 -8
- package/dist/types/types/ens.d.ts +0 -61
- package/dist/types/types/errors.d.ts +0 -2
- package/dist/types/types/hybrid-resolver.d.ts +0 -4
- package/dist/types/types/indexer.d.ts +0 -27
- package/dist/types/types/l2.d.ts +0 -34
- package/dist/types/types/list-manager.d.ts +0 -179
- package/dist/types/types/listing.d.ts +0 -136
- package/dist/types/types/minting.d.ts +0 -75
- package/dist/types/types/name-listing/enums.d.ts +0 -20
- package/dist/types/types/name-listing/index.d.ts +0 -3
- package/dist/types/types/name-listing/l2-name-registry.d.ts +0 -13
- package/dist/types/types/name-listing/listing.d.ts +0 -73
- package/dist/types/types/networks.d.ts +0 -16
- package/dist/types/utils/image-event-emitter.d.ts +0 -8
- package/dist/types/web3/abis/index.d.ts +0 -300
- package/dist/types/web3/chains.d.ts +0 -12
- package/dist/types/web3/contracts/addresses.d.ts +0 -4
- package/dist/types/web3/efp-provider.d.ts +0 -2
- package/dist/types/web3/providers.d.ts +0 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import "./Icon.css";
|
|
3
|
-
export type IconName = "person" | "x" | "search" | "square-user" | "globe" | "pin" | "box" | "book" | "map-pin" | "mail" | "discord" | "github" | "telegram" | "youtube" | "image" | "circle-person" | "twitter" | "circle-alert" | "check-circle" | "alert-triangle" | "info" | "x-circle" | "rotate-circle" | "logout" | "edit" | "copy" | "clock" | "image" | "xSocial";
|
|
3
|
+
export type IconName = "person" | "x" | "search" | "square-user" | "globe" | "pin" | "box" | "book" | "map-pin" | "mail" | "discord" | "github" | "telegram" | "youtube" | "image" | "circle-person" | "twitter" | "circle-alert" | "check-circle" | "check" | "alert-triangle" | "info" | "x-circle" | "rotate-circle" | "logout" | "edit" | "copy" | "clock" | "image" | "xSocial" | "chevron-up" | "chevron-down" | "chevron-left";
|
|
4
4
|
export interface IconProps {
|
|
5
5
|
name: IconName;
|
|
6
6
|
color?: string;
|
|
@@ -10,6 +10,7 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
|
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
error?: boolean;
|
|
12
12
|
dataTestId?: string;
|
|
13
|
+
wrapperClassName?: string;
|
|
13
14
|
}
|
|
14
15
|
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
15
16
|
export default Input;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "./ENSNamesRegistrarComponent.css";
|
|
2
|
+
import { Address } from "viem";
|
|
3
|
+
export interface EnsNameRegistrationFormProps {
|
|
4
|
+
name?: string;
|
|
5
|
+
isTestnet?: boolean;
|
|
6
|
+
referrer?: Address;
|
|
7
|
+
noBorder?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const EnsNameRegistrationForm: (props: EnsNameRegistrationFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./RegistrationProcess.css";
|
|
3
|
+
import { EnsRecords } from "@/types";
|
|
4
|
+
interface RegistrationSuccessData {
|
|
5
|
+
expiryInYears: number;
|
|
6
|
+
registrationCost: string;
|
|
7
|
+
transactionFees: string;
|
|
8
|
+
total: string;
|
|
9
|
+
expiryDate: string;
|
|
10
|
+
}
|
|
11
|
+
interface RegistrationProcessProps {
|
|
12
|
+
label: string;
|
|
13
|
+
expiryInYears: number;
|
|
14
|
+
isTestnet: boolean;
|
|
15
|
+
records: EnsRecords;
|
|
16
|
+
onBack?: (clearState?: boolean) => void;
|
|
17
|
+
onSuccess?: (data: RegistrationSuccessData) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare const RegistrationProcess: React.FC<RegistrationProcessProps>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./RegistrationSummary.css";
|
|
3
|
+
export interface RegistrationSummaryProps {
|
|
4
|
+
label: string;
|
|
5
|
+
years: number;
|
|
6
|
+
price: {
|
|
7
|
+
isChecking: boolean;
|
|
8
|
+
wei: bigint;
|
|
9
|
+
eth: number;
|
|
10
|
+
};
|
|
11
|
+
nameValidation: {
|
|
12
|
+
isChecking: boolean;
|
|
13
|
+
isTaken: boolean;
|
|
14
|
+
reason?: string;
|
|
15
|
+
};
|
|
16
|
+
isTestnet?: boolean;
|
|
17
|
+
onLabelChange: (label: string) => void;
|
|
18
|
+
onYearsChange: (years: number) => void;
|
|
19
|
+
onPriceChange: (price: {
|
|
20
|
+
isChecking: boolean;
|
|
21
|
+
wei: bigint;
|
|
22
|
+
eth: number;
|
|
23
|
+
}) => void;
|
|
24
|
+
onNameValidationChange: (validation: {
|
|
25
|
+
isChecking: boolean;
|
|
26
|
+
isTaken: boolean;
|
|
27
|
+
reason?: string;
|
|
28
|
+
}) => void;
|
|
29
|
+
onSetProfile?: () => void;
|
|
30
|
+
onStart?: () => void;
|
|
31
|
+
}
|
|
32
|
+
export declare const RegistrationSummary: React.FC<RegistrationSummaryProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { EnsRecords } from "@/types";
|
|
3
|
+
export interface SetNameRecordsProps {
|
|
4
|
+
records: EnsRecords;
|
|
5
|
+
onRecordsChange: (records: EnsRecords) => void;
|
|
6
|
+
onCancel: () => void;
|
|
7
|
+
onSave: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const SetNameRecords: React.FC<SetNameRecordsProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Address } from "viem";
|
|
3
|
+
import { RegistrationState } from "./types";
|
|
4
|
+
interface CommitmentStepProps {
|
|
5
|
+
state: RegistrationState;
|
|
6
|
+
isTestnet?: boolean;
|
|
7
|
+
onStateUpdated: (state: RegistrationState) => void;
|
|
8
|
+
referrer?: Address;
|
|
9
|
+
}
|
|
10
|
+
export declare const CommitmentStep: React.FC<CommitmentStepProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { RegistrationState } from "./types";
|
|
3
|
+
interface RegistrationSuccessData {
|
|
4
|
+
expiryInYears: number;
|
|
5
|
+
registrationCost: string;
|
|
6
|
+
transactionFees: string;
|
|
7
|
+
total: string;
|
|
8
|
+
expiryDate: string;
|
|
9
|
+
}
|
|
10
|
+
interface RegistrationStepProps {
|
|
11
|
+
state: RegistrationState;
|
|
12
|
+
isTestnet: boolean;
|
|
13
|
+
onStateUpdated: (state: RegistrationState) => void;
|
|
14
|
+
onSuccess?: (data: RegistrationSuccessData) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const RegistrationStep: React.FC<RegistrationStepProps>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./SuccessScreen.css";
|
|
3
|
+
interface SuccessScreenProps {
|
|
4
|
+
ensName: string;
|
|
5
|
+
expiryInYears: number;
|
|
6
|
+
registrationCost: string;
|
|
7
|
+
transactionFees: string;
|
|
8
|
+
total: string;
|
|
9
|
+
expiryDate: string;
|
|
10
|
+
isTestnet?: boolean;
|
|
11
|
+
onClose?: () => void;
|
|
12
|
+
onRegisterAnother: () => void;
|
|
13
|
+
onViewName?: () => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const SuccessScreen: React.FC<SuccessScreenProps>;
|
|
16
|
+
export {};
|
package/dist/types/components/ens-name-registration/registration/TransactionPendingScreen.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Hash } from "viem";
|
|
3
|
+
interface TransactionPendingScreenProps {
|
|
4
|
+
message?: string;
|
|
5
|
+
hash: Hash;
|
|
6
|
+
isCompleted: boolean;
|
|
7
|
+
isTestnet?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const TransactionPendingScreen: React.FC<TransactionPendingScreenProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { EnsRecords } from "@/types";
|
|
2
|
+
export declare enum ProcessSteps {
|
|
3
|
+
Start = 0,
|
|
4
|
+
CommitmentSent = 1,
|
|
5
|
+
CommitmentCompleted = 2,
|
|
6
|
+
TimerStarted = 3,
|
|
7
|
+
TimerCompleted = 4,
|
|
8
|
+
RegistrationSent = 5,
|
|
9
|
+
RegistrationCompleted = 6
|
|
10
|
+
}
|
|
11
|
+
export interface RegistrationState {
|
|
12
|
+
step: ProcessSteps;
|
|
13
|
+
commitment: {
|
|
14
|
+
tx?: string;
|
|
15
|
+
completed: boolean;
|
|
16
|
+
time: number;
|
|
17
|
+
};
|
|
18
|
+
timerStartedAt: number;
|
|
19
|
+
registration: {
|
|
20
|
+
tx?: string;
|
|
21
|
+
completed: boolean;
|
|
22
|
+
};
|
|
23
|
+
label: string;
|
|
24
|
+
isTestnet?: boolean;
|
|
25
|
+
secret: string;
|
|
26
|
+
expiryInYears: number;
|
|
27
|
+
records: EnsRecords;
|
|
28
|
+
}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
export { SelectRecordsForm } from "./select-records-form/SelectRecordsForm";
|
|
2
2
|
export { PendingTransaction, TransactionState, } from "./pending-transaction/PendingTransaction";
|
|
3
|
-
export {
|
|
4
|
-
export { ProfileCard } from "./ens-profile-card/ProfileCard";
|
|
5
|
-
export { NavbarProfileCard } from "./ens-navbar-profile-card/NavbarProfileCard";
|
|
6
|
-
export { SubnameOnChainRegistrarModal } from "./subname-onchain-registrar-modal/SubnameOnChainRegistrarModal";
|
|
7
|
-
export { SubnameOffChainRegistrarModal } from "./subname-offchain-registrar-modal/SubnameOffChainRegistrarModal";
|
|
8
|
-
export { ENSNamesRegistrarComponent } from "./ens-names-registrar-component/ENSNamesRegistrarComponent";
|
|
3
|
+
export { EnsNameRegistrationForm } from "./ens-name-registration/ENSNameRegistrationForm";
|
|
9
4
|
export * from "./atoms";
|
|
10
5
|
export * from "./molecules";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./Accordion.css";
|
|
3
|
+
export interface AccordionProps {
|
|
4
|
+
title: React.ReactNode;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
defaultOpen?: boolean;
|
|
7
|
+
isOpen?: boolean;
|
|
8
|
+
onToggle?: (isOpen: boolean) => void;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
togglable?: boolean;
|
|
11
|
+
className?: string;
|
|
12
|
+
titleClassName?: string;
|
|
13
|
+
bodyClassName?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const Accordion: React.FC<AccordionProps>;
|
|
16
|
+
export default Accordion;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Accordion";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ContractFunctionExecutionError } from "viem";
|
|
3
|
+
export interface ContractErrorLabelProps {
|
|
4
|
+
error: ContractFunctionExecutionError | null;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Checks if an error is a user rejection error (user denied the transaction)
|
|
9
|
+
*/
|
|
10
|
+
export declare const isUserDeniedError: (error: unknown) => boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Checks if an error is a CommitmentTooNew error
|
|
13
|
+
*/
|
|
14
|
+
export declare const isCommitmentToNewErr: (err: ContractFunctionExecutionError) => boolean;
|
|
15
|
+
export declare const ContractErrorLabel: React.FC<ContractErrorLabelProps>;
|
|
16
|
+
export default ContractErrorLabel;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ContractErrorLabel";
|
|
@@ -3,5 +3,6 @@ import "./SelectRecordsForm.css";
|
|
|
3
3
|
export interface SelectRecordsFormProps {
|
|
4
4
|
records: EnsRecords;
|
|
5
5
|
onRecordsUpdated: (records: EnsRecords) => void;
|
|
6
|
+
actionButtons?: React.ReactNode;
|
|
6
7
|
}
|
|
7
|
-
export declare const SelectRecordsForm: ({ records, onRecordsUpdated, }: SelectRecordsFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const SelectRecordsForm: ({ records, onRecordsUpdated, actionButtons, }: SelectRecordsFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
export declare const ABIS: {
|
|
2
|
+
readonly ETH_REGISTRAR_CONTOLLER: ({
|
|
3
|
+
inputs: {
|
|
4
|
+
internalType: string;
|
|
5
|
+
name: string;
|
|
6
|
+
type: string;
|
|
7
|
+
}[];
|
|
8
|
+
stateMutability: string;
|
|
9
|
+
type: string;
|
|
10
|
+
name?: undefined;
|
|
11
|
+
anonymous?: undefined;
|
|
12
|
+
outputs?: undefined;
|
|
13
|
+
} | {
|
|
14
|
+
inputs: {
|
|
15
|
+
internalType: string;
|
|
16
|
+
name: string;
|
|
17
|
+
type: string;
|
|
18
|
+
}[];
|
|
19
|
+
name: string;
|
|
20
|
+
type: string;
|
|
21
|
+
stateMutability?: undefined;
|
|
22
|
+
anonymous?: undefined;
|
|
23
|
+
outputs?: undefined;
|
|
24
|
+
} | {
|
|
25
|
+
anonymous: boolean;
|
|
26
|
+
inputs: {
|
|
27
|
+
indexed: boolean;
|
|
28
|
+
internalType: string;
|
|
29
|
+
name: string;
|
|
30
|
+
type: string;
|
|
31
|
+
}[];
|
|
32
|
+
name: string;
|
|
33
|
+
type: string;
|
|
34
|
+
stateMutability?: undefined;
|
|
35
|
+
outputs?: undefined;
|
|
36
|
+
} | {
|
|
37
|
+
inputs: {
|
|
38
|
+
internalType: string;
|
|
39
|
+
name: string;
|
|
40
|
+
type: string;
|
|
41
|
+
}[];
|
|
42
|
+
name: string;
|
|
43
|
+
outputs: {
|
|
44
|
+
internalType: string;
|
|
45
|
+
name: string;
|
|
46
|
+
type: string;
|
|
47
|
+
}[];
|
|
48
|
+
stateMutability: string;
|
|
49
|
+
type: string;
|
|
50
|
+
anonymous?: undefined;
|
|
51
|
+
} | {
|
|
52
|
+
inputs: {
|
|
53
|
+
components: {
|
|
54
|
+
internalType: string;
|
|
55
|
+
name: string;
|
|
56
|
+
type: string;
|
|
57
|
+
}[];
|
|
58
|
+
internalType: string;
|
|
59
|
+
name: string;
|
|
60
|
+
type: string;
|
|
61
|
+
}[];
|
|
62
|
+
name: string;
|
|
63
|
+
outputs: {
|
|
64
|
+
internalType: string;
|
|
65
|
+
name: string;
|
|
66
|
+
type: string;
|
|
67
|
+
}[];
|
|
68
|
+
stateMutability: string;
|
|
69
|
+
type: string;
|
|
70
|
+
anonymous?: undefined;
|
|
71
|
+
} | {
|
|
72
|
+
inputs: {
|
|
73
|
+
internalType: string;
|
|
74
|
+
name: string;
|
|
75
|
+
type: string;
|
|
76
|
+
}[];
|
|
77
|
+
name: string;
|
|
78
|
+
outputs: {
|
|
79
|
+
components: {
|
|
80
|
+
internalType: string;
|
|
81
|
+
name: string;
|
|
82
|
+
type: string;
|
|
83
|
+
}[];
|
|
84
|
+
internalType: string;
|
|
85
|
+
name: string;
|
|
86
|
+
type: string;
|
|
87
|
+
}[];
|
|
88
|
+
stateMutability: string;
|
|
89
|
+
type: string;
|
|
90
|
+
anonymous?: undefined;
|
|
91
|
+
})[];
|
|
92
|
+
};
|
|
@@ -1,25 +1,2 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./web3/use-main-chain";
|
|
4
|
-
export * from "./web3/use-main-public-client";
|
|
5
|
-
export * from "./web3/use-name-resolver";
|
|
6
|
-
export * from "./web3/use-wait-for-transaction";
|
|
7
|
-
export * from "./web3/use-l1-name-minter";
|
|
8
|
-
export * from "./web3/use-block-explorer";
|
|
9
|
-
export * from "./web3/use-alchemy-sdk";
|
|
10
|
-
export * from "./ens/use-ens";
|
|
11
|
-
export * from "./ens/use-eth-registrar-controller";
|
|
12
|
-
export * from "./use-error-modal";
|
|
13
|
-
export * from "./ens/use-ens-contract-address";
|
|
14
|
-
export * from "./ens/use-ens-name-profile";
|
|
15
|
-
export * from "./ens/use-name-wrapper";
|
|
16
|
-
export * from "./namespace/use-burn-l2-subname";
|
|
17
|
-
export * from "./namespace/use-mintable-listings";
|
|
18
|
-
export * from "./namespace/use-hybrid-resolver";
|
|
19
|
-
export * from "./namespace/use-namespace-account";
|
|
20
|
-
export * from "./namespace/use-listing-manager";
|
|
21
|
-
export * from "./namespace/use-l2-controller";
|
|
22
|
-
export * from "./namespace/use-mint-client";
|
|
23
|
-
export * from "./namespace/use-namespace-indexer";
|
|
24
|
-
export * from "./use-screen-size";
|
|
25
|
-
export * from "./efp/use-efp";
|
|
1
|
+
export * from "./useRegisterENS";
|
|
2
|
+
export * from "./useWaitTransaction";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Address, Hash } from "viem";
|
|
2
|
+
import { EnsRecords } from "@/types";
|
|
3
|
+
interface RentPriceResponse {
|
|
4
|
+
wei: bigint;
|
|
5
|
+
eth: number;
|
|
6
|
+
}
|
|
7
|
+
export interface RegistrationRequest {
|
|
8
|
+
label: string;
|
|
9
|
+
owner: Address;
|
|
10
|
+
expiryInYears: number;
|
|
11
|
+
secret: string;
|
|
12
|
+
records: EnsRecords;
|
|
13
|
+
referrer?: Address;
|
|
14
|
+
}
|
|
15
|
+
export declare const useRegisterENS: ({ isTestnet }: {
|
|
16
|
+
isTestnet?: boolean;
|
|
17
|
+
}) => {
|
|
18
|
+
isEnsAvailable: (label: string) => Promise<boolean>;
|
|
19
|
+
getRegistrationPrice: (label: string, expiryInYears?: number) => Promise<RentPriceResponse>;
|
|
20
|
+
sendCommitmentTx: (request: RegistrationRequest) => Promise<Hash>;
|
|
21
|
+
sendRegisterTx: (request: RegistrationRequest) => Promise<Hash>;
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Hash, TransactionReceipt } from "viem";
|
|
2
|
+
interface WaitTransactionOptions {
|
|
3
|
+
hash: Hash;
|
|
4
|
+
retries?: number;
|
|
5
|
+
retryDelay?: number;
|
|
6
|
+
timeout?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const useWaitTransaction: ({ isTestnet }: {
|
|
9
|
+
isTestnet?: boolean;
|
|
10
|
+
}) => {
|
|
11
|
+
waitTx: (options: WaitTransactionOptions) => Promise<TransactionReceipt>;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import "./styles/index.css";
|
|
2
2
|
export * from "./components";
|
|
3
3
|
export * from "./constants";
|
|
4
|
-
export * from "./hooks";
|
|
5
4
|
export * from "./types";
|
|
6
5
|
export * from "./utils";
|
|
7
6
|
export * from "./web3";
|
|
8
|
-
export { isL2Chain } from "./types";
|
|
9
7
|
export * from "./theme/ThemeProvider";
|
|
8
|
+
export * from "./hooks";
|
|
@@ -1,12 +1,2 @@
|
|
|
1
1
|
export * from "./records";
|
|
2
2
|
export type { ChainName } from "./chain";
|
|
3
|
-
export * from "./listing";
|
|
4
|
-
export * from "./minting";
|
|
5
|
-
export * from "./networks";
|
|
6
|
-
export * from "./ens";
|
|
7
|
-
export * from "./l2";
|
|
8
|
-
export * from "./errors";
|
|
9
|
-
export * from "./auth";
|
|
10
|
-
export * from "./name-listing";
|
|
11
|
-
export * from "./hybrid-resolver";
|
|
12
|
-
export * from "./indexer";
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const isValidEnsLabel: (label: string) => boolean;
|
|
1
|
+
import { Address, Hash } from "viem";
|
|
2
|
+
export declare const createEnsReferer: (address: Address) => Hash;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { EnsRegistrationContext } from "@/hooks";
|
|
2
1
|
export interface NameRegistration {
|
|
3
2
|
label: string;
|
|
4
3
|
durationInYears: number;
|
|
@@ -10,7 +9,7 @@ export interface NameRegistration {
|
|
|
10
9
|
}
|
|
11
10
|
export interface NameRegistrationProcessCache {
|
|
12
11
|
currentStep: number;
|
|
13
|
-
registrations:
|
|
12
|
+
registrations: any[];
|
|
14
13
|
}
|
|
15
14
|
export declare const formatPrice: (value: number) => number;
|
|
16
15
|
export declare enum EnsRegistrationSteps {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare const capitalize: (value: string) => string;
|
|
2
2
|
export declare const equalsIgnoreCase: (a: string, b: string) => boolean;
|
|
3
3
|
export declare const deepCopy: (a: any) => any;
|
|
4
|
+
export declare const debounce: <T extends (...args: any[]) => any>(func: T, wait: number) => ((...args: Parameters<T>) => void);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thenamespace/ens-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -12,20 +12,10 @@
|
|
|
12
12
|
"**/*.css"
|
|
13
13
|
],
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"@namespacesdk/indexer": "^1.0.1",
|
|
20
|
-
"@namespacesdk/mint-manager": "^1.0.15",
|
|
21
|
-
"@tanstack/react-query": "^5.87.0",
|
|
22
|
-
"alchemy-sdk": "^3.6.0",
|
|
23
|
-
"ethereum-identity-kit": "^0.2.39",
|
|
24
|
-
"lucide-react": ">=0.525.0",
|
|
25
|
-
"react": ">=18",
|
|
26
|
-
"react-dom": ">=18",
|
|
27
|
-
"viem": "^2.36.0",
|
|
28
|
-
"wagmi": "^2.16.8"
|
|
15
|
+
"react": ">=19",
|
|
16
|
+
"react-dom": ">=19",
|
|
17
|
+
"viem": "^2.38.4",
|
|
18
|
+
"wagmi": "^2.18.2"
|
|
29
19
|
},
|
|
30
20
|
"exports": {
|
|
31
21
|
".": {
|
|
@@ -58,7 +48,7 @@
|
|
|
58
48
|
"format": "prettier --write .",
|
|
59
49
|
"format:check": "prettier --check .",
|
|
60
50
|
"build:types": "tsc -p tsconfig.types.json",
|
|
61
|
-
"build": "npm run clean && npm run build:types && rollup -c"
|
|
51
|
+
"build": "npm run clean && npm run build:types && rollup -c rollup.config.mjs"
|
|
62
52
|
},
|
|
63
53
|
"keywords": [],
|
|
64
54
|
"author": "",
|
|
@@ -85,12 +75,12 @@
|
|
|
85
75
|
"axios": "^1.11.0",
|
|
86
76
|
"bootstrap": "^5.3.8",
|
|
87
77
|
"cssnano": "^7.1.1",
|
|
88
|
-
"react-easy-crop": "^5.5.6",
|
|
89
78
|
"eslint": "^9.34.0",
|
|
90
79
|
"postcss-import": "^16.1.1",
|
|
91
80
|
"prettier": "^3.6.2",
|
|
92
81
|
"react": "^18.3.1",
|
|
93
82
|
"react-dom": "^18.3.1",
|
|
83
|
+
"react-easy-crop": "^5.5.6",
|
|
94
84
|
"rimraf": "^6.0.1",
|
|
95
85
|
"rollup": "^4.50.1",
|
|
96
86
|
"rollup-plugin-dts": "^6.2.3",
|
|
@@ -102,6 +92,15 @@
|
|
|
102
92
|
"vite-tsconfig-paths": "^5.1.4"
|
|
103
93
|
},
|
|
104
94
|
"dependencies": {
|
|
95
|
+
"@adraffy/ens-normalize": "^1.11.1",
|
|
96
|
+
"@ensdomains/address-encoder": "1.1.4",
|
|
97
|
+
"@ensdomains/content-hash": "^3.1.0-rc.1",
|
|
98
|
+
"@namespacesdk/addresses": "^1.0.15",
|
|
99
|
+
"@namespacesdk/indexer": "^1.0.1",
|
|
100
|
+
"@namespacesdk/mint-manager": "^1.0.15",
|
|
101
|
+
"@thenamespace/addresses": "^1.0.16",
|
|
102
|
+
"lodash": "^4.17.21",
|
|
103
|
+
"lucide-react": ">=0.525.0",
|
|
105
104
|
"react-confetti": "^6.4.0"
|
|
106
105
|
}
|
|
107
106
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./list-manager";
|