@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.
Files changed (136) hide show
  1. package/README.md +101 -70
  2. package/dist/index.css +1 -4890
  3. package/dist/index.css.map +1 -1
  4. package/dist/index.d.ts +200 -26718
  5. package/dist/index.js +28464 -132563
  6. package/dist/index.js.map +1 -1
  7. package/dist/styles.js +3 -3
  8. package/dist/types/components/atoms/icon/Icon.d.ts +1 -1
  9. package/dist/types/components/atoms/index.d.ts +1 -0
  10. package/dist/types/components/atoms/input/Input.d.ts +1 -0
  11. package/dist/types/components/atoms/spinner/ShurikenSpinner.d.ts +8 -0
  12. package/dist/types/components/ens-name-registration/ENSNameRegistrationForm.d.ts +10 -0
  13. package/dist/types/components/ens-name-registration/RegistrationProcess.d.ts +20 -0
  14. package/dist/types/components/ens-name-registration/RegistrationSummary.d.ts +32 -0
  15. package/dist/types/components/ens-name-registration/SetNameRecords.d.ts +9 -0
  16. package/dist/types/components/ens-name-registration/registration/CommitmentStep.d.ts +11 -0
  17. package/dist/types/components/{ens-names-registrar-component/sub-components → ens-name-registration/registration}/ProgressBar.d.ts +1 -0
  18. package/dist/types/components/ens-name-registration/registration/RegistrationStep.d.ts +17 -0
  19. package/dist/types/components/ens-name-registration/registration/SuccessScreen.d.ts +16 -0
  20. package/dist/types/components/{ens-names-registrar-component/sub-components → ens-name-registration/registration}/Timer.d.ts +1 -0
  21. package/dist/types/components/ens-name-registration/registration/TimerStep.d.ts +8 -0
  22. package/dist/types/components/ens-name-registration/registration/TransactionPendingScreen.d.ts +10 -0
  23. package/dist/types/components/ens-name-registration/registration/index.d.ts +7 -0
  24. package/dist/types/components/ens-name-registration/registration/types.d.ts +28 -0
  25. package/dist/types/components/index.d.ts +1 -6
  26. package/dist/types/components/molecules/accordion/Accordion.d.ts +16 -0
  27. package/dist/types/components/molecules/accordion/index.d.ts +1 -0
  28. package/dist/types/components/molecules/contract-error-label/ContractErrorLabel.d.ts +16 -0
  29. package/dist/types/components/molecules/contract-error-label/index.d.ts +1 -0
  30. package/dist/types/components/molecules/index.d.ts +2 -0
  31. package/dist/types/components/select-records-form/SelectRecordsForm.d.ts +2 -1
  32. package/dist/types/constants/records/addressConstants.d.ts +0 -1
  33. package/dist/types/hooks/abis/index.d.ts +92 -0
  34. package/dist/types/hooks/index.d.ts +2 -25
  35. package/dist/types/hooks/useRegisterENS.d.ts +23 -0
  36. package/dist/types/hooks/useWaitTransaction.d.ts +13 -0
  37. package/dist/types/index.d.ts +1 -2
  38. package/dist/types/types/index.d.ts +0 -10
  39. package/dist/types/utils/ens.d.ts +2 -3
  40. package/dist/types/utils/index.d.ts +2 -0
  41. package/dist/types/utils/models.d.ts +1 -2
  42. package/dist/types/utils/strings.d.ts +1 -0
  43. package/dist/types/web3/index.d.ts +0 -4
  44. package/package.json +16 -17
  45. package/dist/types/backend/index.d.ts +0 -1
  46. package/dist/types/backend/list-manager/index.d.ts +0 -57
  47. package/dist/types/components/ens-names-card/EnsNameCard.d.ts +0 -14
  48. package/dist/types/components/ens-names-registrar-component/ENSNamesRegistrarComponent.d.ts +0 -17
  49. package/dist/types/components/ens-names-registrar-component/sub-components/CostSummary.d.ts +0 -12
  50. package/dist/types/components/ens-names-registrar-component/sub-components/Header.d.ts +0 -8
  51. package/dist/types/components/ens-names-registrar-component/sub-components/NameSearch.d.ts +0 -12
  52. package/dist/types/components/ens-names-registrar-component/sub-components/RegistrationForm.d.ts +0 -24
  53. package/dist/types/components/ens-names-registrar-component/sub-components/RegistrationProcess.d.ts +0 -10
  54. package/dist/types/components/ens-names-registrar-component/sub-components/StepItem.d.ts +0 -11
  55. package/dist/types/components/ens-names-registrar-component/sub-components/SuccessScreen.d.ts +0 -13
  56. package/dist/types/components/ens-navbar-profile-card/NavbarProfileCard.d.ts +0 -14
  57. package/dist/types/components/ens-profile-card/ProfileCard.d.ts +0 -24
  58. package/dist/types/components/subname-offchain-registrar-modal/SubnameOffChainRegistrarModal.d.ts +0 -18
  59. package/dist/types/components/subname-offchain-registrar-modal/sub-components/InitialStep.d.ts +0 -9
  60. package/dist/types/components/subname-offchain-registrar-modal/sub-components/OffchainRegistrationProcess.d.ts +0 -18
  61. package/dist/types/components/subname-offchain-registrar-modal/sub-components/OffchainSuccessScreen.d.ts +0 -8
  62. package/dist/types/components/subname-onchain-registrar-modal/SubnameOnChainRegistrarModal.d.ts +0 -31
  63. package/dist/types/components/subname-onchain-registrar-modal/sub-components/ConfirmationStep.d.ts +0 -18
  64. package/dist/types/components/subname-onchain-registrar-modal/sub-components/InitialStep.d.ts +0 -11
  65. package/dist/types/components/subname-onchain-registrar-modal/sub-components/OnchainSuccessScreen.d.ts +0 -6
  66. package/dist/types/components/subname-onchain-registrar-modal/sub-components/RegistrationStep.d.ts +0 -28
  67. package/dist/types/context/account-context.d.ts +0 -44
  68. package/dist/types/context/account-filter-context.d.ts +0 -32
  69. package/dist/types/context/auth-context.d.ts +0 -22
  70. package/dist/types/context/crop-image-context.d.ts +0 -27
  71. package/dist/types/context/current-user-context.d.ts +0 -19
  72. package/dist/types/context/edit-profile-context.d.ts +0 -13
  73. package/dist/types/context/ens-profile-context.d.ts +0 -54
  74. package/dist/types/context/index.d.ts +0 -6
  75. package/dist/types/context/listing-form-context.d.ts +0 -55
  76. package/dist/types/context/listing-status-context.d.ts +0 -19
  77. package/dist/types/context/mint-subname-context.d.ts +0 -12
  78. package/dist/types/context/profile-filter.context.d.ts +0 -19
  79. package/dist/types/environment/index.d.ts +0 -9
  80. package/dist/types/hooks/efp/use-efp.d.ts +0 -11
  81. package/dist/types/hooks/ens/ens-local-cache.d.ts +0 -18
  82. package/dist/types/hooks/ens/use-ens-client.d.ts +0 -763
  83. package/dist/types/hooks/ens/use-ens-contract-address.d.ts +0 -1
  84. package/dist/types/hooks/ens/use-ens-name-profile.d.ts +0 -15
  85. package/dist/types/hooks/ens/use-ens.d.ts +0 -21
  86. package/dist/types/hooks/ens/use-eth-registrar-controller.d.ts +0 -21
  87. package/dist/types/hooks/ens/use-name-wrapper.d.ts +0 -6
  88. package/dist/types/hooks/ens/use-owned-ens-names.d.ts +0 -9
  89. package/dist/types/hooks/namespace/use-burn-l2-subname.d.ts +0 -4
  90. package/dist/types/hooks/namespace/use-hybrid-resolver.d.ts +0 -10
  91. package/dist/types/hooks/namespace/use-l2-controller.d.ts +0 -8
  92. package/dist/types/hooks/namespace/use-listing-manager.d.ts +0 -2
  93. package/dist/types/hooks/namespace/use-mint-client.d.ts +0 -2
  94. package/dist/types/hooks/namespace/use-mintable-listings.d.ts +0 -7
  95. package/dist/types/hooks/namespace/use-name-listings.d.ts +0 -1
  96. package/dist/types/hooks/namespace/use-namespace-account.d.ts +0 -25
  97. package/dist/types/hooks/namespace/use-namespace-indexer.d.ts +0 -7
  98. package/dist/types/hooks/namespace/use-re-render-image.d.ts +0 -1
  99. package/dist/types/hooks/namespace/use-trading-stats.d.ts +0 -1
  100. package/dist/types/hooks/upload-image/use-upload-image.d.ts +0 -8
  101. package/dist/types/hooks/use-error-modal.d.ts +0 -4
  102. package/dist/types/hooks/use-screen-size.d.ts +0 -5
  103. package/dist/types/hooks/useWaitForTransaction.d.ts +0 -3
  104. package/dist/types/hooks/useWeb3Clients.d.ts +0 -8041
  105. package/dist/types/hooks/web3/alchemy-sdk-no-ssr.d.ts +0 -0
  106. package/dist/types/hooks/web3/use-alchemy-sdk.d.ts +0 -4
  107. package/dist/types/hooks/web3/use-block-explorer.d.ts +0 -2
  108. package/dist/types/hooks/web3/use-blockexplorer-url.d.ts +0 -2
  109. package/dist/types/hooks/web3/use-contract-addresses.d.ts +0 -1
  110. package/dist/types/hooks/web3/use-l1-name-minter.d.ts +0 -5
  111. package/dist/types/hooks/web3/use-main-chain.d.ts +0 -10
  112. package/dist/types/hooks/web3/use-main-public-client.d.ts +0 -3624
  113. package/dist/types/hooks/web3/use-name-resolver.d.ts +0 -24
  114. package/dist/types/hooks/web3/use-name-wrapper.d.ts +0 -3
  115. package/dist/types/hooks/web3/use-wait-for-transaction.d.ts +0 -8
  116. package/dist/types/hooks/web3/use-web3-clients.d.ts +0 -8042
  117. package/dist/types/types/auth.d.ts +0 -8
  118. package/dist/types/types/ens.d.ts +0 -61
  119. package/dist/types/types/errors.d.ts +0 -2
  120. package/dist/types/types/hybrid-resolver.d.ts +0 -4
  121. package/dist/types/types/indexer.d.ts +0 -27
  122. package/dist/types/types/l2.d.ts +0 -34
  123. package/dist/types/types/list-manager.d.ts +0 -179
  124. package/dist/types/types/listing.d.ts +0 -136
  125. package/dist/types/types/minting.d.ts +0 -75
  126. package/dist/types/types/name-listing/enums.d.ts +0 -20
  127. package/dist/types/types/name-listing/index.d.ts +0 -3
  128. package/dist/types/types/name-listing/l2-name-registry.d.ts +0 -13
  129. package/dist/types/types/name-listing/listing.d.ts +0 -73
  130. package/dist/types/types/networks.d.ts +0 -16
  131. package/dist/types/utils/image-event-emitter.d.ts +0 -8
  132. package/dist/types/web3/abis/index.d.ts +0 -300
  133. package/dist/types/web3/chains.d.ts +0 -12
  134. package/dist/types/web3/contracts/addresses.d.ts +0 -4
  135. package/dist/types/web3/efp-provider.d.ts +0 -2
  136. package/dist/types/web3/providers.d.ts +0 -3
@@ -1,57 +0,0 @@
1
- import { SupportedNetwork } from "@/types";
2
- import { CreateListingRequest, GetRegistryParametersRequest, GetRegistryParametersResponse, ListingNetwork, ListingStatusDTO, ListingSuggestion, ListingSuggestionRequest, NamespaceListing } from "@/types/list-manager";
3
- import { Address } from "viem";
4
- export interface GetListedNamesQuery {
5
- owner?: Address;
6
- isVerified?: boolean;
7
- page: number;
8
- size: number;
9
- nameNetwork: ListingNetwork;
10
- }
11
- interface PageResponse<T> {
12
- totalItems: number;
13
- page: number;
14
- size: number;
15
- items: T[];
16
- }
17
- export interface WidgetConfiguration {
18
- widgetType: string;
19
- widgetId: string;
20
- widgetOwner: string;
21
- logo?: string;
22
- selectedNames: string[];
23
- showRegisterEns: boolean;
24
- name: string;
25
- }
26
- export interface CreateWidgetRequest {
27
- widgetType: string;
28
- name: string;
29
- selectedNames?: string[];
30
- logo?: string;
31
- showRegisterEns: boolean;
32
- widgetId?: string;
33
- }
34
- export declare class ListManagerClient {
35
- private readonly backendURI;
36
- private httpClient;
37
- constructor(backendURI: string);
38
- getListedName(ensName: string): Promise<NamespaceListing>;
39
- deleteListing(ensName: string, network: SupportedNetwork, siweToken: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
40
- getListedNames(query: GetListedNamesQuery): Promise<PageResponse<NamespaceListing>>;
41
- verifyListing(name: string, nameNetwork: SupportedNetwork): Promise<boolean>;
42
- getListingStatus(name: string, network: SupportedNetwork, refreshCache?: boolean): Promise<ListingStatusDTO>;
43
- getListingSuggestions(request: ListingSuggestionRequest): Promise<PageResponse<ListingSuggestion>>;
44
- waitForVerificationStatus(name: string, retries?: number, waitSeconds?: number): Promise<boolean>;
45
- private waitForSeconds;
46
- getRegistryDeploymentParameters(request: GetRegistryParametersRequest, siweToken: string): Promise<GetRegistryParametersResponse>;
47
- toListingNetwork(network: SupportedNetwork): ListingNetwork;
48
- createListing(request: CreateListingRequest, siweToken: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
49
- updateListing(request: CreateListingRequest, siweToken: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
50
- private getSiweHeaders;
51
- getOwnedWidgets(owner: Address): Promise<WidgetConfiguration[]>;
52
- createWidget(request: CreateWidgetRequest, siweToken: string): Promise<string>;
53
- updateWidget(widgetId: string, request: CreateWidgetRequest, siweToken: string): Promise<any>;
54
- deleteWidget(widgetId: string, siweToken: string): Promise<any>;
55
- }
56
- export declare const createListingManagerClient: (backendUri: string) => ListManagerClient;
57
- export {};
@@ -1,14 +0,0 @@
1
- import "./EnsNameCard.css";
2
- import { ChainName } from "@/types";
3
- /**
4
- * Card for displaying ENS name details.
5
- * @param {ENSNameCardProps} props
6
- */
7
- export interface ENSNameCardProps {
8
- name: string;
9
- imageUrl: string;
10
- expires: string;
11
- chain?: ChainName;
12
- className?: string;
13
- }
14
- export declare const ENSNameCard: ({ name, imageUrl, expires, chain, className, }: ENSNameCardProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,17 +0,0 @@
1
- import "./ENSNamesRegistrarComponent.css";
2
- export interface ENSNamesRegistrarComponentProps {
3
- name?: string;
4
- duration?: number;
5
- onNameChange?: (name: string) => void;
6
- onDurationChange?: (duration: number) => void;
7
- onBack?: () => void;
8
- onClose?: () => void;
9
- onNext?: () => void;
10
- onCompleteProfile?: () => void;
11
- onOpenWallet?: () => void;
12
- onCompleteRegistration?: () => void;
13
- onRegisterAnother?: () => void;
14
- onViewName?: () => void;
15
- }
16
- export declare function ENSNamesRegistrarComponent({ name, duration: initialDuration, onNameChange, onDurationChange, onBack, onClose, onNext, onCompleteProfile, onOpenWallet, onCompleteRegistration, onRegisterAnother, onViewName, }: ENSNamesRegistrarComponentProps): import("react/jsx-runtime").JSX.Element;
17
- export default ENSNamesRegistrarComponent;
@@ -1,12 +0,0 @@
1
- interface CostSummaryProps {
2
- duration: number;
3
- registrationCost: number;
4
- networkFee: number;
5
- total: number;
6
- showExpiry?: boolean;
7
- expiryDate?: string;
8
- isLoading?: boolean;
9
- priceError?: string | null;
10
- }
11
- export declare function CostSummary({ duration, registrationCost, networkFee, total, showExpiry, expiryDate, isLoading, priceError, }: CostSummaryProps): import("react/jsx-runtime").JSX.Element;
12
- export {};
@@ -1,8 +0,0 @@
1
- interface HeaderProps {
2
- showBack?: boolean;
3
- showClose?: boolean;
4
- onBack?: () => void;
5
- onClose?: () => void;
6
- }
7
- export declare function Header({ showBack, showClose, onBack, onClose }: HeaderProps): import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,12 +0,0 @@
1
- interface NameSearchProps {
2
- ensName: string;
3
- onNameChange: (value: string) => void;
4
- onBack?: () => void;
5
- onClose?: () => void;
6
- onNext: () => void;
7
- isChecking?: boolean;
8
- isAvailable?: boolean;
9
- isTaken?: boolean;
10
- }
11
- export declare function NameSearch({ ensName, onNameChange, onBack, onClose, onNext, isChecking, isAvailable, isTaken, }: NameSearchProps): import("react/jsx-runtime").JSX.Element;
12
- export {};
@@ -1,24 +0,0 @@
1
- import { EnsRecords } from "@/types";
2
- interface RegistrationFormProps {
3
- ensName: string;
4
- duration: number;
5
- registrationCost: number;
6
- networkFee: number;
7
- total: number;
8
- onNameChange: (value: string) => void;
9
- onDurationChange: (delta: number) => void;
10
- onBack?: () => void;
11
- onClose?: () => void;
12
- onNext: () => void;
13
- onCompleteProfile?: () => void;
14
- onRecordsChange?: (records: EnsRecords) => void;
15
- isLoadingPrice?: boolean;
16
- priceError?: string | null;
17
- nameAvailability?: {
18
- isAvailable: boolean;
19
- isChecking: boolean;
20
- };
21
- canProceed?: boolean;
22
- }
23
- export declare function RegistrationForm({ ensName, duration, registrationCost, networkFee, total, onNameChange, onDurationChange, onBack, onClose, onNext, onCompleteProfile, onRecordsChange, isLoadingPrice, priceError, nameAvailability, canProceed, }: RegistrationFormProps): import("react/jsx-runtime").JSX.Element;
24
- export {};
@@ -1,10 +0,0 @@
1
- import { EnsRegistrationContext } from "@/hooks";
2
- interface RegistrationProcessProps {
3
- registrations: EnsRegistrationContext[];
4
- onBack: () => void;
5
- onClose?: () => void;
6
- onCompleteProfile?: () => void;
7
- onRegistrationComplete?: () => void;
8
- }
9
- export declare function RegistrationProcess({ registrations, onBack, onClose, onCompleteProfile, onRegistrationComplete, }: RegistrationProcessProps): import("react/jsx-runtime").JSX.Element;
10
- export {};
@@ -1,11 +0,0 @@
1
- import React from "react";
2
- interface StepItemProps {
3
- stepNumber: number;
4
- title: string;
5
- isExpanded: boolean;
6
- isCompleted: boolean;
7
- onToggle: () => void;
8
- children?: React.ReactNode;
9
- }
10
- export declare function StepItem({ stepNumber, title, isExpanded, isCompleted, onToggle, children, }: StepItemProps): import("react/jsx-runtime").JSX.Element;
11
- export {};
@@ -1,13 +0,0 @@
1
- interface SuccessScreenProps {
2
- ensName: string;
3
- duration: number;
4
- registrationCost: number;
5
- networkFee: number;
6
- total: number;
7
- expiryDate: string;
8
- onClose?: () => void;
9
- onRegisterAnother: () => void;
10
- onViewName: () => void;
11
- }
12
- export declare function SuccessScreen({ ensName, duration, registrationCost, networkFee, total, expiryDate, onClose, onRegisterAnother, onViewName, }: SuccessScreenProps): import("react/jsx-runtime").JSX.Element;
13
- export {};
@@ -1,14 +0,0 @@
1
- import React from "react";
2
- import "./NavbarProfileCard.css";
3
- /**
4
- * Compact profile card for navigation bars.
5
- * @param {NavbarProfileCardProps} props
6
- */
7
- export interface NavbarProfileCardProps {
8
- imageUrl: string;
9
- name: string;
10
- address: string;
11
- onLogout?: () => void;
12
- className?: string;
13
- }
14
- export declare const NavbarProfileCard: React.FC<NavbarProfileCardProps>;
@@ -1,24 +0,0 @@
1
- import "./ProfileCard.css";
2
- /**
3
- * Card for displaying ENS profile details.
4
- * @param {ProfileCardProps} props
5
- */
6
- export interface ProfileCardProps {
7
- bannerUrl: string;
8
- avatarUrl: string;
9
- name: string;
10
- username: string;
11
- bio: string;
12
- address: string;
13
- followers?: number;
14
- following?: number;
15
- ownedBy: string;
16
- expires: string;
17
- records?: string[];
18
- website?: string;
19
- subnames?: number;
20
- profit?: number;
21
- volume?: number;
22
- className?: string;
23
- }
24
- export declare const ProfileCard: ({ bannerUrl, avatarUrl, name, username, bio, address, followers, following, ownedBy, expires, records, website, subnames, profit, volume, className, }: ProfileCardProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,18 +0,0 @@
1
- import "./SubnameOffChainRegistrarModal.css";
2
- export interface SubnameOffChainRegistrarModalProps {
3
- step?: number;
4
- name?: string;
5
- profileComplete?: boolean;
6
- onStepChange?: (step: number) => void;
7
- onNameChange?: (name: string) => void;
8
- onProfileCompleteChange?: (complete: boolean) => void;
9
- onRegister?: () => void;
10
- onCancel?: () => void;
11
- onClose?: () => void;
12
- onCompleteProfile?: () => void;
13
- onOpenWallet?: () => void;
14
- onCompleteRegistration?: () => void;
15
- onRegisterAnother?: () => void;
16
- onViewName?: () => void;
17
- }
18
- export declare function SubnameOffChainRegistrarModal({ step: initialStep, name: initialName, profileComplete, onStepChange, onNameChange, onProfileCompleteChange, onRegister, onCancel, onClose, onCompleteProfile, onOpenWallet, onCompleteRegistration, onRegisterAnother, onViewName, }: SubnameOffChainRegistrarModalProps): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +0,0 @@
1
- export interface InitialStepProps {
2
- name: string;
3
- onNameChange: (name: string) => void;
4
- onCancel: () => void;
5
- onRegister: () => void;
6
- onClose?: () => void;
7
- isNameAvailable?: boolean;
8
- }
9
- export declare function InitialStep({ name, onNameChange, onCancel, onRegister, onClose, isNameAvailable, }: InitialStepProps): import("react/jsx-runtime").JSX.Element;
@@ -1,18 +0,0 @@
1
- interface OffchainRegistrationProcessProps {
2
- name: string;
3
- expandedStep: number;
4
- completedSteps: number[];
5
- isTransactionInProgress: boolean;
6
- progress: number;
7
- timerSeconds: number;
8
- timerProgress: number;
9
- remainingHours: number;
10
- onBack: () => void;
11
- onClose?: () => void;
12
- onToggleStep: (stepNumber: number) => void;
13
- onOpenWallet: () => void;
14
- onCompleteRegistration: () => void;
15
- onCompleteProfile?: () => void;
16
- }
17
- export declare function OffchainRegistrationProcess({ name, expandedStep, completedSteps, isTransactionInProgress, progress, timerSeconds, timerProgress, remainingHours, onBack, onClose, onToggleStep, onOpenWallet, onCompleteRegistration, onCompleteProfile, }: OffchainRegistrationProcessProps): import("react/jsx-runtime").JSX.Element;
18
- export {};
@@ -1,8 +0,0 @@
1
- interface OffchainSuccessScreenProps {
2
- name: string;
3
- onClose?: () => void;
4
- onSetProfile?: () => void;
5
- onFinish?: () => void;
6
- }
7
- export declare function OffchainSuccessScreen({ name, onClose, onSetProfile, onFinish, }: OffchainSuccessScreenProps): import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,31 +0,0 @@
1
- import "./SubnameOnChainRegistrarModal.css";
2
- export interface SubnameOnChainRegistrarModalProps {
3
- step?: number;
4
- name?: string;
5
- parentName?: string;
6
- profileComplete?: boolean;
7
- domainSuffix?: string;
8
- owner?: string;
9
- duration?: number;
10
- registrationFee?: string;
11
- networkFee?: string;
12
- totalCost?: string;
13
- useAsPrimary?: boolean;
14
- profileImageUrl?: string;
15
- onStepChange?: (step: number) => void;
16
- onNameChange?: (name: string) => void;
17
- onProfileCompleteChange?: (complete: boolean) => void;
18
- onOwnerChange?: (owner: string) => void;
19
- onDurationChange?: (duration: number) => void;
20
- onUseAsPrimaryChange?: (useAsPrimary: boolean) => void;
21
- onRegister?: () => void;
22
- onCancel?: () => void;
23
- onClose?: () => void;
24
- onCompleteProfile?: () => void;
25
- onOpenWallet?: () => void;
26
- onCompleteRegistration?: () => void;
27
- onRegisterAnother?: () => void;
28
- onViewName?: () => void;
29
- onFinish?: () => void;
30
- }
31
- export declare function SubnameOnChainRegistrarModal({ step: initialStep, name: initialName, parentName: initialParentName, profileComplete, domainSuffix, owner: initialOwner, duration: initialDuration, useAsPrimary: initialUseAsPrimary, profileImageUrl, onStepChange, onNameChange, onProfileCompleteChange, onOwnerChange, onDurationChange, onUseAsPrimaryChange, onRegister, onCancel, onClose, onCompleteProfile, onOpenWallet, onCompleteRegistration, onRegisterAnother, onViewName, onFinish, }: SubnameOnChainRegistrarModalProps): import("react/jsx-runtime").JSX.Element;
@@ -1,18 +0,0 @@
1
- export interface ConfirmationStepProps {
2
- name: string;
3
- domainSuffix?: string;
4
- owner?: string;
5
- duration?: number;
6
- registrationFee?: string;
7
- networkFee?: string;
8
- totalCost?: string;
9
- useAsPrimary?: boolean;
10
- profileComplete?: boolean;
11
- profileImageUrl?: string;
12
- onBack?: () => void;
13
- onCancel?: () => void;
14
- onRegister?: () => void;
15
- onClose?: () => void;
16
- onOwnerChange?: (owner: string) => void;
17
- }
18
- export declare function ConfirmationStep({ name, domainSuffix, owner, duration, registrationFee, networkFee, totalCost, useAsPrimary, profileComplete, profileImageUrl, onBack, onCancel, onRegister, onClose, onOwnerChange, }: ConfirmationStepProps): import("react/jsx-runtime").JSX.Element;
@@ -1,11 +0,0 @@
1
- export interface InitialStepProps {
2
- name: string;
3
- onNameChange: (name: string) => void;
4
- onCancel: () => void;
5
- onRegister: () => void;
6
- onClose?: () => void;
7
- isNameAvailable?: boolean;
8
- domainSuffix?: string;
9
- parentName?: string;
10
- }
11
- export declare function InitialStep({ name, onNameChange, onCancel, onRegister, onClose, isNameAvailable, domainSuffix, parentName, }: InitialStepProps): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- export interface OnchainSuccessScreenProps {
2
- name: string;
3
- onClose?: () => void;
4
- onFinish?: () => void;
5
- }
6
- export declare function OnchainSuccessScreen({ name, onClose, onFinish, }: OnchainSuccessScreenProps): import("react/jsx-runtime").JSX.Element;
@@ -1,28 +0,0 @@
1
- import { EnsRecords } from "@/types";
2
- export interface RegistrationStepProps {
3
- name: string;
4
- domainSuffix?: string;
5
- owner?: string;
6
- duration?: number;
7
- registrationFee?: string | null;
8
- networkFee?: string | null;
9
- totalCost?: string | null;
10
- useAsPrimary?: boolean;
11
- profileComplete?: boolean;
12
- profileImageUrl?: string;
13
- onBack?: () => void;
14
- onCancel?: () => void;
15
- onRegister?: () => void;
16
- onClose?: () => void;
17
- onOwnerChange?: (owner: string) => void;
18
- onDurationChange?: (duration: number) => void;
19
- onUseAsPrimaryChange?: (useAsPrimary: boolean) => void;
20
- onCompleteProfile?: () => void;
21
- onRecordsChange?: (records: EnsRecords) => void;
22
- mintPrice?: number;
23
- isFetchingPrice?: boolean;
24
- expiryYears?: number;
25
- isExpirable?: boolean;
26
- isRegistering?: boolean;
27
- }
28
- export declare function RegistrationStep({ name, domainSuffix, owner, duration: initialDuration, registrationFee, networkFee, totalCost, useAsPrimary: initialUseAsPrimary, profileComplete, profileImageUrl, onBack, onCancel, onRegister, onClose, onOwnerChange, onDurationChange, onUseAsPrimaryChange, onCompleteProfile, onRecordsChange, mintPrice, isFetchingPrice, expiryYears, isExpirable, isRegistering, }: RegistrationStepProps): import("react/jsx-runtime").JSX.Element;
@@ -1,44 +0,0 @@
1
- import { EnsName, GenericMintedName } from "@/types";
2
- import { NamespaceListing } from "@/types/list-manager";
3
- import { L2SubnameResponse } from "@namespacesdk/indexer";
4
- import { PropsWithChildren } from "react";
5
- import { Address } from "viem";
6
- interface ISelectNameState {
7
- selectedName?: string;
8
- isSelected: boolean;
9
- }
10
- interface IEnsNamesState {
11
- ensNames: EnsName[];
12
- subnames: GenericMintedName[];
13
- isLoading: boolean;
14
- isError: boolean;
15
- }
16
- interface IListedNamesState {
17
- isLoading: boolean;
18
- isError: boolean;
19
- items: NamespaceListing[];
20
- }
21
- interface IAccountContext {
22
- listModalOpen: boolean;
23
- selectedName?: string;
24
- accountOwner: Address;
25
- namesState: IEnsNamesState;
26
- listingState: IListedNamesState;
27
- selectNameState: ISelectNameState;
28
- updateSelectNameState: (state: ISelectNameState) => void;
29
- toggleListModal: (open: boolean, ensName: string) => void;
30
- setApprovalGiven: (value: boolean) => void;
31
- handleRemoveListing: (name: string) => void;
32
- contextWrapped: boolean;
33
- handleListingCreated: (ensName: string, verified: boolean) => void;
34
- handleListingVerified: (ensName: string) => void;
35
- }
36
- interface AccountContextProps extends PropsWithChildren {
37
- accountOwner: Address;
38
- isConnectedUserAccount?: boolean;
39
- }
40
- export declare const AccountContextProvider: ({ accountOwner, children, isConnectedUserAccount, }: AccountContextProps) => import("react/jsx-runtime").JSX.Element;
41
- export declare const useAccountContext: () => IAccountContext;
42
- export declare const addL2SubnameToGenericNames: (items: L2SubnameResponse[], arr: GenericMintedName[]) => void;
43
- export declare const addL1SubnameToGenericName: (items: EnsName[], arr: GenericMintedName[]) => void;
44
- export {};
@@ -1,32 +0,0 @@
1
- import { SupportedChainName } from "@/types";
2
- import { Dispatch, ReactNode, SetStateAction } from "react";
3
- export type NetworksLabels = "Base" | "Base Sepolia" | "Ethereum Mainnet" | "Optimism" | "Ethereum Sepolia";
4
- export type NetworksIcon = "base" | "mainnet" | "op" | "eth";
5
- export type NetworksOptionsType = Partial<Record<SupportedChainName, {
6
- icon: NetworksIcon;
7
- label: NetworksLabels;
8
- }>>;
9
- export declare const networks: NetworksOptionsType;
10
- export type NetworksFilterOptions = {
11
- label: NetworksLabels;
12
- icon: NetworksIcon;
13
- };
14
- type NetworkFilter = Partial<Record<SupportedChainName, NetworksFilterOptions>>;
15
- type AccountFilterContextType = {
16
- searchString: string;
17
- setSearchString: Dispatch<SetStateAction<string>>;
18
- networksFilterOptions: NetworkFilter;
19
- setNetworksFilterOptions: Dispatch<SetStateAction<{}>>;
20
- selectedNetworks: SupportedChainName[];
21
- setSelectedNetworks: Dispatch<SetStateAction<SupportedChainName[]>>;
22
- alphabetOrder: "alphabetAsc" | "alphabetDesc" | null;
23
- setAlphabetOrder: Dispatch<SetStateAction<"alphabetAsc" | "alphabetDesc" | null>>;
24
- view: "grid" | "list";
25
- setView: Dispatch<SetStateAction<"grid" | "list">>;
26
- };
27
- type AccountFilterProviderProps = {
28
- children: ReactNode;
29
- };
30
- export declare const AccountFilterProvider: React.FC<AccountFilterProviderProps>;
31
- export declare const useAccountFilterContext: () => AccountFilterContextType;
32
- export {};
@@ -1,22 +0,0 @@
1
- import { Address } from "viem";
2
- import { PropsWithChildren } from "react";
3
- export interface AccessTokens {
4
- accessToken: string;
5
- refreshToken: string;
6
- }
7
- interface IAuthContext {
8
- isAuthenticated: boolean;
9
- isLoading: boolean;
10
- tokens: Record<Address, AccessTokens>;
11
- siweTokens: Record<Address, string>;
12
- authenticate?: () => void;
13
- checkAuthenticationForAddr?: (principal: Address) => Promise<boolean>;
14
- getAccessToken?: (principal: Address) => Promise<string>;
15
- denyAuth?: (principal: Address) => void;
16
- getSiweToken?: (principal: Address) => void;
17
- hasValidSiweToken?: (principal: Address) => boolean;
18
- }
19
- export declare const AUTH_TOKEN_KEY = "auth-tokens";
20
- export declare const useAuthContext: () => IAuthContext;
21
- export declare const AuthContextProvider: ({ children }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
22
- export {};
@@ -1,27 +0,0 @@
1
- import { Dispatch, ReactNode, SetStateAction } from "react";
2
- import { Area } from "react-easy-crop";
3
- export type CropImgContextType = {
4
- newImgSrc: string;
5
- setNewImgSrc: Dispatch<SetStateAction<string>>;
6
- newCroppedImgSrc: string;
7
- setNewCroppedImgSrc: Dispatch<SetStateAction<string>>;
8
- croppedAreaPixels: Area;
9
- setCroppedAreaPixels: Dispatch<SetStateAction<Area>>;
10
- processingImg: boolean;
11
- setProcessingImg: Dispatch<SetStateAction<boolean>>;
12
- uploadedImgSrc: string;
13
- setUploadedImgSrc: Dispatch<SetStateAction<string>>;
14
- imageCategory: "avatar" | "header" | null;
15
- setImageCategory: Dispatch<SetStateAction<"avatar" | "header" | null>>;
16
- hideCoverUpload: boolean;
17
- setHideCoverUpload: Dispatch<SetStateAction<boolean>>;
18
- disableUploads: boolean;
19
- setDisableUploads: Dispatch<SetStateAction<boolean>>;
20
- };
21
- export declare const CropImgContext: import("react").Context<CropImgContextType>;
22
- type CropImgContextProps = {
23
- children: ReactNode;
24
- };
25
- export declare const CropImgProvider: React.FC<CropImgContextProps>;
26
- export declare const useCropImgContext: () => CropImgContextType;
27
- export {};
@@ -1,19 +0,0 @@
1
- import { PropsWithChildren } from "react";
2
- import { Address, Chain } from "viem";
3
- import { EnsRecords, IEnsNameFullProfile } from "@/types";
4
- interface IConnectedAccountContext {
5
- connectedAddress?: Address;
6
- isConnected: boolean;
7
- isAuthenticated: boolean;
8
- chain?: Chain;
9
- primaryName: {
10
- isFetching: boolean;
11
- isError?: boolean;
12
- isPresent: boolean;
13
- data?: IEnsNameFullProfile;
14
- };
15
- handleRecordsUpdated?: (records: EnsRecords) => void;
16
- }
17
- export declare const ConnectedPrincipalProvider: ({ children }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
18
- export declare const useConnectedPrincipal: () => IConnectedAccountContext;
19
- export {};
@@ -1,13 +0,0 @@
1
- import { Dispatch, ReactNode, SetStateAction } from "react";
2
- export type EditProfileStepsType = ["profile", "crop-image", "upload-image"];
3
- export type EditProfileContextType = {
4
- step: "profile" | "crop-image" | "upload-image";
5
- setStep: Dispatch<SetStateAction<"profile" | "crop-image" | "upload-image">>;
6
- };
7
- export declare const EditProfileContext: import("react").Context<EditProfileContextType>;
8
- type EditProfileProviderProps = {
9
- children: ReactNode;
10
- };
11
- export declare const EditProfileProvider: React.FC<EditProfileProviderProps>;
12
- export declare const useEditProfileContext: () => EditProfileContextType;
13
- export {};
@@ -1,54 +0,0 @@
1
- import { EnsNameOwner, EnsRecords, EnsRecordsDecoded, GenericMintedName, Layer2Network } from "@/types";
2
- import { NamespaceListing } from "@/types/list-manager";
3
- import { ReactElement } from "react";
4
- import { Address } from "viem";
5
- export interface SubnamesFilter {
6
- view: "grid" | "list";
7
- searchString: string;
8
- }
9
- export interface NameProfileStats {
10
- subnamesMinted: number;
11
- totalSubnames: number;
12
- totalVolume: number;
13
- totalProfit: number;
14
- }
15
- interface EnsProfileState {
16
- ensName: string;
17
- ensRecords: EnsRecordsDecoded;
18
- ownership: EnsNameOwner;
19
- isFetching: boolean;
20
- subnames: GenericMintedName[];
21
- resolver: Address;
22
- expiryUnix: number;
23
- isL2: boolean;
24
- listing: {
25
- isListed: boolean;
26
- listingData?: NamespaceListing;
27
- isFetching: boolean;
28
- };
29
- stats: {
30
- isLoading: boolean;
31
- data: NameProfileStats;
32
- };
33
- isError?: boolean;
34
- l2Metadata?: {
35
- network: Layer2Network;
36
- resolver: Address;
37
- };
38
- isListed: boolean;
39
- }
40
- interface EnsProfileContext extends EnsProfileState {
41
- onRecordsUpdated?: (records: EnsRecords) => void;
42
- onSubnameMinted?: (name: GenericMintedName) => void;
43
- onL2SubnameBurned?: (subname: string | string[]) => void;
44
- subnameFilter: SubnamesFilter;
45
- onFilterChanged?: (filter: SubnamesFilter) => void;
46
- }
47
- export declare const EnsProfileContext: import("react").Context<EnsProfileContext>;
48
- export declare const EnsProfileContextProvider: ({ ensName, children, isSubname }: {
49
- ensName: string;
50
- isSubname: boolean;
51
- children: ReactElement;
52
- }) => import("react/jsx-runtime").JSX.Element;
53
- export declare const useEnsProfileContext: () => EnsProfileContext;
54
- export {};
@@ -1,6 +0,0 @@
1
- export * from "./current-user-context";
2
- export * from "./auth-context";
3
- export * from "./ens-profile-context";
4
- export * from "./listing-form-context";
5
- export * from "./listing-status-context";
6
- export * from "./account-context";