@thenamespace/ens-components 0.8.0 → 0.10.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/index.css +316 -109
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +19157 -7819
- package/dist/index.js +129408 -2911
- package/dist/index.js.map +1 -1
- package/dist/types/backend/index.d.ts +1 -0
- package/dist/types/backend/list-manager/index.d.ts +57 -0
- package/dist/types/components/ens-names-registrar-component/ENSNamesRegistrarComponent.d.ts +17 -0
- package/dist/types/components/{ens-names-register-component → ens-names-registrar-component}/sub-components/CostSummary.d.ts +3 -1
- package/dist/types/components/ens-names-registrar-component/sub-components/Header.d.ts +8 -0
- package/dist/types/components/{ens-names-register-component → ens-names-registrar-component}/sub-components/NameSearch.d.ts +4 -1
- package/dist/types/components/{ens-names-register-component → ens-names-registrar-component}/sub-components/RegistrationForm.d.ts +8 -1
- package/dist/types/components/ens-names-registrar-component/sub-components/RegistrationProcess.d.ts +10 -0
- package/dist/types/components/index.d.ts +3 -3
- package/dist/types/components/{ens-offchain-register-modal/EnsOffChainRegisterModal.d.ts → subname-offchain-registrar-modal/SubnameOffChainRegistrarModal.d.ts} +3 -3
- package/dist/types/components/{ens-onchain-register-modal/EnsOnChainRegisterModal.d.ts → subname-onchain-registrar-modal/SubnameOnChainRegistrarModal.d.ts} +3 -3
- package/dist/types/components/{ens-onchain-register-modal → subname-onchain-registrar-modal}/sub-components/RegistrationStep.d.ts +1 -2
- package/dist/types/constants/records/addressConstants.d.ts +12 -0
- package/dist/types/context/account-context.d.ts +44 -0
- package/dist/types/context/account-filter-context.d.ts +32 -0
- package/dist/types/context/auth-context.d.ts +22 -0
- package/dist/types/context/crop-image-context.d.ts +27 -0
- package/dist/types/context/current-user-context.d.ts +19 -0
- package/dist/types/context/edit-profile-context.d.ts +13 -0
- package/dist/types/context/ens-profile-context.d.ts +54 -0
- package/dist/types/context/index.d.ts +6 -0
- package/dist/types/context/listing-form-context.d.ts +55 -0
- package/dist/types/context/listing-status-context.d.ts +19 -0
- package/dist/types/context/mint-subname-context.d.ts +12 -0
- package/dist/types/environment/index.d.ts +9 -0
- package/dist/types/hooks/efp/use-efp.d.ts +11 -0
- package/dist/types/hooks/ens/ens-local-cache.d.ts +18 -0
- package/dist/types/hooks/ens/use-ens-client.d.ts +763 -0
- package/dist/types/hooks/ens/use-ens-contract-address.d.ts +1 -0
- package/dist/types/hooks/ens/use-ens-name-profile.d.ts +15 -0
- package/dist/types/hooks/ens/use-ens.d.ts +21 -0
- package/dist/types/hooks/ens/use-eth-registrar-controller.d.ts +21 -0
- package/dist/types/hooks/ens/use-name-wrapper.d.ts +6 -0
- package/dist/types/hooks/ens/use-owned-ens-names.d.ts +9 -0
- package/dist/types/hooks/index.d.ts +24 -1
- package/dist/types/hooks/namespace/use-burn-l2-subname.d.ts +4 -0
- package/dist/types/hooks/namespace/use-hybrid-resolver.d.ts +10 -0
- package/dist/types/hooks/namespace/use-l2-controller.d.ts +8 -0
- package/dist/types/hooks/namespace/use-listing-manager.d.ts +2 -0
- package/dist/types/hooks/namespace/use-mint-client.d.ts +2 -0
- package/dist/types/hooks/namespace/use-mintable-listings.d.ts +7 -0
- package/dist/types/hooks/namespace/use-name-listings.d.ts +1 -0
- package/dist/types/hooks/namespace/use-namespace-account.d.ts +25 -0
- package/dist/types/hooks/namespace/use-namespace-indexer.d.ts +7 -0
- package/dist/types/hooks/namespace/use-re-render-image.d.ts +1 -0
- package/dist/types/hooks/namespace/use-trading-stats.d.ts +1 -0
- package/dist/types/hooks/upload-image/use-upload-image.d.ts +8 -0
- package/dist/types/hooks/use-error-modal.d.ts +4 -0
- package/dist/types/hooks/use-screen-size.d.ts +5 -0
- package/dist/types/hooks/useWeb3Clients.d.ts +30 -30
- package/dist/types/hooks/web3/alchemy-sdk-no-ssr.d.ts +0 -0
- package/dist/types/hooks/web3/use-alchemy-sdk.d.ts +4 -0
- package/dist/types/hooks/web3/use-block-explorer.d.ts +2 -0
- package/dist/types/hooks/web3/use-blockexplorer-url.d.ts +2 -0
- package/dist/types/hooks/web3/use-contract-addresses.d.ts +1 -0
- package/dist/types/hooks/web3/use-l1-name-minter.d.ts +5 -0
- package/dist/types/hooks/web3/use-main-chain.d.ts +10 -0
- package/dist/types/hooks/web3/use-main-public-client.d.ts +3624 -0
- package/dist/types/hooks/web3/use-name-resolver.d.ts +24 -0
- package/dist/types/hooks/web3/use-name-wrapper.d.ts +3 -0
- package/dist/types/hooks/web3/use-wait-for-transaction.d.ts +8 -0
- package/dist/types/hooks/web3/use-web3-clients.d.ts +8042 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/types/auth.d.ts +8 -0
- package/dist/types/types/ens.d.ts +61 -0
- package/dist/types/types/errors.d.ts +2 -0
- package/dist/types/types/hybrid-resolver.d.ts +4 -0
- package/dist/types/types/index.d.ts +10 -0
- package/dist/types/types/indexer.d.ts +27 -0
- package/dist/types/types/l2.d.ts +34 -0
- package/dist/types/types/list-manager.d.ts +179 -0
- package/dist/types/types/listing.d.ts +136 -0
- package/dist/types/types/minting.d.ts +75 -0
- package/dist/types/types/name-listing/enums.d.ts +20 -0
- package/dist/types/types/name-listing/index.d.ts +3 -0
- package/dist/types/types/name-listing/l2-name-registry.d.ts +13 -0
- package/dist/types/types/name-listing/listing.d.ts +73 -0
- package/dist/types/types/networks.d.ts +16 -0
- package/dist/types/utils/ens.d.ts +3 -0
- package/dist/types/utils/image-event-emitter.d.ts +8 -0
- package/dist/types/utils/models.d.ts +24 -0
- package/dist/types/web3/abis/index.d.ts +300 -0
- package/dist/types/web3/chains.d.ts +12 -0
- package/dist/types/web3/contracts/addresses.d.ts +4 -0
- package/dist/types/web3/efp-provider.d.ts +2 -0
- package/dist/types/web3/index.d.ts +5 -0
- package/dist/types/web3/providers.d.ts +3 -0
- package/dist/types/web3/wallet-connect.d.ts +2 -0
- package/package.json +13 -3
- package/dist/types/components/ens-names-register-component/ENSNamesRegisterComponent.d.ts +0 -17
- package/dist/types/components/ens-names-register-component/sub-components/Header.d.ts +0 -7
- package/dist/types/components/ens-names-register-component/sub-components/RegistrationProcess.d.ts +0 -17
- /package/dist/types/components/{ens-names-register-component → ens-names-registrar-component}/sub-components/ProgressBar.d.ts +0 -0
- /package/dist/types/components/{ens-names-register-component → ens-names-registrar-component}/sub-components/StepItem.d.ts +0 -0
- /package/dist/types/components/{ens-names-register-component → ens-names-registrar-component}/sub-components/SuccessScreen.d.ts +0 -0
- /package/dist/types/components/{ens-names-register-component → ens-names-registrar-component}/sub-components/Timer.d.ts +0 -0
- /package/dist/types/components/{ens-offchain-register-modal → subname-offchain-registrar-modal}/sub-components/InitialStep.d.ts +0 -0
- /package/dist/types/components/{ens-offchain-register-modal → subname-offchain-registrar-modal}/sub-components/OffchainRegistrationProcess.d.ts +0 -0
- /package/dist/types/components/{ens-offchain-register-modal → subname-offchain-registrar-modal}/sub-components/OffchainSuccessScreen.d.ts +0 -0
- /package/dist/types/components/{ens-onchain-register-modal → subname-onchain-registrar-modal}/sub-components/ConfirmationStep.d.ts +0 -0
- /package/dist/types/components/{ens-onchain-register-modal → subname-onchain-registrar-modal}/sub-components/InitialStep.d.ts +0 -0
- /package/dist/types/components/{ens-onchain-register-modal → subname-onchain-registrar-modal}/sub-components/OnchainSuccessScreen.d.ts +0 -0
package/dist/types/index.d.ts
CHANGED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Address } from "viem";
|
|
2
|
+
import { Layer2Network } from "./networks";
|
|
3
|
+
import { EnsTextRecord, EnsAddressRecord } from "./records";
|
|
4
|
+
export interface EnsContenthashRecordDecoded {
|
|
5
|
+
decoded: string;
|
|
6
|
+
protocolType: string;
|
|
7
|
+
}
|
|
8
|
+
export interface EnsRecordsDecoded {
|
|
9
|
+
texts: EnsTextRecord[];
|
|
10
|
+
addresses: EnsAddressRecord[];
|
|
11
|
+
contenthash?: EnsContenthashRecordDecoded;
|
|
12
|
+
}
|
|
13
|
+
export interface EnsNameOwner {
|
|
14
|
+
address: Address;
|
|
15
|
+
ensName?: string;
|
|
16
|
+
avatar?: string;
|
|
17
|
+
isWrapped: boolean;
|
|
18
|
+
}
|
|
19
|
+
type EnsNameLevel = 2 | 3;
|
|
20
|
+
export interface EnsName {
|
|
21
|
+
name: string;
|
|
22
|
+
label: string;
|
|
23
|
+
createdAt: number;
|
|
24
|
+
expiry: number;
|
|
25
|
+
isWrapped: boolean;
|
|
26
|
+
namehash: string;
|
|
27
|
+
parentName: string;
|
|
28
|
+
level: EnsNameLevel;
|
|
29
|
+
owner: string;
|
|
30
|
+
}
|
|
31
|
+
export interface GenericMintedName {
|
|
32
|
+
name: string;
|
|
33
|
+
label: string;
|
|
34
|
+
expiry?: number;
|
|
35
|
+
namehash: string;
|
|
36
|
+
parentName: string;
|
|
37
|
+
owner: string;
|
|
38
|
+
addresses: Record<string, string>;
|
|
39
|
+
texts: Record<string, string>;
|
|
40
|
+
isL2: boolean;
|
|
41
|
+
chainId: number;
|
|
42
|
+
hightlighted?: boolean;
|
|
43
|
+
mintTransaction?: {
|
|
44
|
+
price: number;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export interface L2NameMetadata {
|
|
48
|
+
resolver: Address;
|
|
49
|
+
network: Layer2Network;
|
|
50
|
+
owner: Address;
|
|
51
|
+
}
|
|
52
|
+
export interface IEnsNameFullProfile {
|
|
53
|
+
ensName: string;
|
|
54
|
+
ownership: EnsNameOwner;
|
|
55
|
+
records: EnsRecordsDecoded;
|
|
56
|
+
resolver: Address;
|
|
57
|
+
expiry: number;
|
|
58
|
+
l2Metadata?: L2NameMetadata;
|
|
59
|
+
subnames: GenericMintedName[];
|
|
60
|
+
}
|
|
61
|
+
export {};
|
|
@@ -1,2 +1,12 @@
|
|
|
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";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface L2IndexedSubname {
|
|
2
|
+
name: string;
|
|
3
|
+
namehash: string;
|
|
4
|
+
owner: string;
|
|
5
|
+
avatar?: string;
|
|
6
|
+
chainId: number;
|
|
7
|
+
expiry: number;
|
|
8
|
+
parentHash: string;
|
|
9
|
+
records: {
|
|
10
|
+
addresses: Record<string, string>;
|
|
11
|
+
texts: Record<string, string>;
|
|
12
|
+
contenthash: string;
|
|
13
|
+
};
|
|
14
|
+
metadata: {
|
|
15
|
+
blockNumber: number;
|
|
16
|
+
price: number;
|
|
17
|
+
fee: number;
|
|
18
|
+
tx: string;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export interface EnsNameMintStats {
|
|
22
|
+
totalL1Subnames: number;
|
|
23
|
+
totalL2Subnames: number;
|
|
24
|
+
totalPrice: number;
|
|
25
|
+
totalFee: number;
|
|
26
|
+
totalVolume: number;
|
|
27
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Layer2Network } from "./networks";
|
|
2
|
+
export interface IL2Node {
|
|
3
|
+
label: string;
|
|
4
|
+
namehash: string;
|
|
5
|
+
name: string;
|
|
6
|
+
owner: string;
|
|
7
|
+
addresses: Record<string, string>;
|
|
8
|
+
texts: Record<string, string>;
|
|
9
|
+
contenthash?: string;
|
|
10
|
+
chainId: number;
|
|
11
|
+
expiry?: number;
|
|
12
|
+
mintTransaction?: {
|
|
13
|
+
price: number;
|
|
14
|
+
paymentReceiver: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface L2Registry {
|
|
18
|
+
parentControl: number;
|
|
19
|
+
label: string;
|
|
20
|
+
TLD: string;
|
|
21
|
+
network: Layer2Network;
|
|
22
|
+
deployment: {
|
|
23
|
+
address: string;
|
|
24
|
+
};
|
|
25
|
+
isDeployed: boolean;
|
|
26
|
+
expirableType: number;
|
|
27
|
+
owner: string;
|
|
28
|
+
tokenName: string;
|
|
29
|
+
tokenSymbol: string;
|
|
30
|
+
}
|
|
31
|
+
export declare enum L2ExpirableType {
|
|
32
|
+
Expirable = 1,
|
|
33
|
+
NotExpirable = 0
|
|
34
|
+
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { Address } from "viem";
|
|
2
|
+
export declare enum ListingNetwork {
|
|
3
|
+
Mainnet = "MAINNET",
|
|
4
|
+
Sepolia = "SEPOLIA",
|
|
5
|
+
Optimism = "OPTIMISM",
|
|
6
|
+
Base = "BASE",
|
|
7
|
+
BaseSepolia = "BASE_SEPOLIA"
|
|
8
|
+
}
|
|
9
|
+
export interface NamespaceListing {
|
|
10
|
+
name: string;
|
|
11
|
+
namehash: string;
|
|
12
|
+
nameNetwork: ListingNetwork;
|
|
13
|
+
type: ListingType;
|
|
14
|
+
currency: ListingCurrency;
|
|
15
|
+
createdAt?: string;
|
|
16
|
+
updatedAt?: string;
|
|
17
|
+
whitelist?: ListingWhitelist;
|
|
18
|
+
deadline?: ListingDeadline;
|
|
19
|
+
prices: ListingPrices;
|
|
20
|
+
isVerified: boolean;
|
|
21
|
+
owner: string;
|
|
22
|
+
paymentWallet: string;
|
|
23
|
+
tokenGatedAccess?: TokenGatedAccess[];
|
|
24
|
+
metadata?: ListingMetadata;
|
|
25
|
+
reservations?: ReservedLabel[];
|
|
26
|
+
l2Metadata?: L2Registry;
|
|
27
|
+
}
|
|
28
|
+
export interface ListingWhitelist {
|
|
29
|
+
type: WhitelistType;
|
|
30
|
+
wallets: Address[];
|
|
31
|
+
}
|
|
32
|
+
export interface ListingDeadline {
|
|
33
|
+
type: DeadlineType;
|
|
34
|
+
timestamp: number;
|
|
35
|
+
}
|
|
36
|
+
export declare enum ListingType {
|
|
37
|
+
L1 = "L1",
|
|
38
|
+
L2 = "L2"
|
|
39
|
+
}
|
|
40
|
+
export declare enum ListingCurrency {
|
|
41
|
+
ETH = "ETH",
|
|
42
|
+
DOLLAR = "DOLLAR"
|
|
43
|
+
}
|
|
44
|
+
export declare enum WhitelistType {
|
|
45
|
+
ONLY_WHITELISTED = 1,
|
|
46
|
+
FREE_MINT = 2
|
|
47
|
+
}
|
|
48
|
+
export interface ListingWhitelist {
|
|
49
|
+
type: WhitelistType;
|
|
50
|
+
wallets: Address[];
|
|
51
|
+
}
|
|
52
|
+
export declare enum DeadlineType {
|
|
53
|
+
CANT_MINT_AFTER_EXPIRY = 1
|
|
54
|
+
}
|
|
55
|
+
export interface ListingDeadline {
|
|
56
|
+
type: DeadlineType;
|
|
57
|
+
timestamp: number;
|
|
58
|
+
}
|
|
59
|
+
export interface SpecialPrices {
|
|
60
|
+
letterOnlyPrice?: number;
|
|
61
|
+
numberOnlyPrice?: number;
|
|
62
|
+
emojiOnlyPrice?: number;
|
|
63
|
+
}
|
|
64
|
+
export interface LabelPrice {
|
|
65
|
+
numberOfLetters: number;
|
|
66
|
+
price: number;
|
|
67
|
+
}
|
|
68
|
+
export interface ListingPrices {
|
|
69
|
+
basePrice: number;
|
|
70
|
+
labelPrices?: LabelPrice[];
|
|
71
|
+
specialPrices?: SpecialPrices;
|
|
72
|
+
}
|
|
73
|
+
export declare enum ListingTokenType {
|
|
74
|
+
ERC20 = "ERC20",
|
|
75
|
+
ERC721 = "ERC721",
|
|
76
|
+
ERC1155 = "ERC1155"
|
|
77
|
+
}
|
|
78
|
+
export interface TokenGatedAccess {
|
|
79
|
+
tokenType: ListingTokenType;
|
|
80
|
+
tokenAddress: string;
|
|
81
|
+
tokenId?: string;
|
|
82
|
+
erc20MinTokenBalance?: number;
|
|
83
|
+
erc20TokenDecimals?: number;
|
|
84
|
+
tokenNetwork: ListingNetwork;
|
|
85
|
+
}
|
|
86
|
+
export interface ListingMetadata {
|
|
87
|
+
description?: string;
|
|
88
|
+
holderBenefits?: string;
|
|
89
|
+
}
|
|
90
|
+
export interface ReservedLabel {
|
|
91
|
+
label: string;
|
|
92
|
+
price?: number;
|
|
93
|
+
isMintable: boolean;
|
|
94
|
+
}
|
|
95
|
+
export interface L2Registry {
|
|
96
|
+
isBurnable: boolean;
|
|
97
|
+
isExpirable: boolean;
|
|
98
|
+
registryNetwork: ListingNetwork;
|
|
99
|
+
registryName: string;
|
|
100
|
+
registrySymbol: string;
|
|
101
|
+
isDeployed: boolean;
|
|
102
|
+
registryAddress?: string;
|
|
103
|
+
name: string;
|
|
104
|
+
nameNetwork: ListingNetwork;
|
|
105
|
+
registryOwner: string;
|
|
106
|
+
}
|
|
107
|
+
export interface CreateL2RegistryRequest {
|
|
108
|
+
tokenName: string;
|
|
109
|
+
tokenSymbol: string;
|
|
110
|
+
isBurnable: boolean;
|
|
111
|
+
isExpirable: boolean;
|
|
112
|
+
tokenOwner?: string;
|
|
113
|
+
tokenNetwork: ListingNetwork;
|
|
114
|
+
}
|
|
115
|
+
export interface CreateListingRequest {
|
|
116
|
+
name: string;
|
|
117
|
+
nameNetwork: ListingNetwork;
|
|
118
|
+
type: ListingType;
|
|
119
|
+
currency: ListingCurrency;
|
|
120
|
+
whitelist?: ListingWhitelist;
|
|
121
|
+
deadline?: ListingDeadline;
|
|
122
|
+
prices: ListingPrices;
|
|
123
|
+
paymentWallet?: string;
|
|
124
|
+
tokenGatedAccess?: TokenGatedAccess[];
|
|
125
|
+
metadata?: ListingMetadata;
|
|
126
|
+
reservations?: ReservedLabel[];
|
|
127
|
+
l2Registry?: CreateL2RegistryRequest;
|
|
128
|
+
}
|
|
129
|
+
export interface ListingStatusDTO {
|
|
130
|
+
name: string;
|
|
131
|
+
nameNetwork: ListingNetwork;
|
|
132
|
+
listingCreated: boolean;
|
|
133
|
+
listingVerified: boolean;
|
|
134
|
+
type: ListingType;
|
|
135
|
+
registryDeployed: boolean;
|
|
136
|
+
approvalGiven: boolean;
|
|
137
|
+
nameWrapped: boolean;
|
|
138
|
+
l2Network: ListingNetwork;
|
|
139
|
+
resolverSet: boolean;
|
|
140
|
+
resolverConfigured: boolean;
|
|
141
|
+
}
|
|
142
|
+
export interface GetRegistryParametersRequest {
|
|
143
|
+
ensName: string;
|
|
144
|
+
isTestnet?: boolean;
|
|
145
|
+
registryNetwork: ListingNetwork;
|
|
146
|
+
}
|
|
147
|
+
export interface GetRegistryParametersResponse {
|
|
148
|
+
parameters: {
|
|
149
|
+
tokenName: string;
|
|
150
|
+
tokenSymbol: string;
|
|
151
|
+
label: string;
|
|
152
|
+
TLD: string;
|
|
153
|
+
owner: string;
|
|
154
|
+
parentControl: number;
|
|
155
|
+
expirableType: number;
|
|
156
|
+
signatureExpiry: number;
|
|
157
|
+
};
|
|
158
|
+
signature: string;
|
|
159
|
+
}
|
|
160
|
+
export interface ListingSuggestion {
|
|
161
|
+
label: string;
|
|
162
|
+
parentName: string;
|
|
163
|
+
nameNetwork: ListingNetwork;
|
|
164
|
+
listingType: ListingType;
|
|
165
|
+
l2Network?: ListingNetwork;
|
|
166
|
+
price: number;
|
|
167
|
+
fee: number;
|
|
168
|
+
isStandardFee: boolean;
|
|
169
|
+
totalPrice: number;
|
|
170
|
+
}
|
|
171
|
+
export interface ListingSuggestionRequest {
|
|
172
|
+
label: string;
|
|
173
|
+
parentName?: string;
|
|
174
|
+
page?: number;
|
|
175
|
+
size?: number;
|
|
176
|
+
minterAddress: Address;
|
|
177
|
+
listingType?: ListingType;
|
|
178
|
+
nameNetwork: ListingNetwork;
|
|
179
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { Layer2Network, SupportedChainName, Web3Network } from "./networks";
|
|
2
|
+
export interface INameListing {
|
|
3
|
+
node: string;
|
|
4
|
+
fullName: string;
|
|
5
|
+
basePrice: number;
|
|
6
|
+
label: string;
|
|
7
|
+
whitelist: string[];
|
|
8
|
+
network: Web3Network;
|
|
9
|
+
whitelistType: number;
|
|
10
|
+
reservations: IReservedSubname[];
|
|
11
|
+
specialPrices: ILabelPrice[];
|
|
12
|
+
deadline: number;
|
|
13
|
+
tokenGatedAccess?: ITokenGatedAccess[];
|
|
14
|
+
listingOwner: string;
|
|
15
|
+
isListed: boolean;
|
|
16
|
+
isApproved: boolean;
|
|
17
|
+
listingType?: ListingType;
|
|
18
|
+
specialLabelRules?: ISpecialLabelRules;
|
|
19
|
+
registryNetwork?: Layer2Network;
|
|
20
|
+
}
|
|
21
|
+
export type TokenGatedType = "ERC20" | "ERC1155" | "ERC721";
|
|
22
|
+
export interface ILabelPrice {
|
|
23
|
+
letters: number;
|
|
24
|
+
price: number;
|
|
25
|
+
}
|
|
26
|
+
export interface IReservedSubname {
|
|
27
|
+
label: string;
|
|
28
|
+
isMintable: boolean;
|
|
29
|
+
price: number;
|
|
30
|
+
}
|
|
31
|
+
export interface ITokenGatedAccess {
|
|
32
|
+
tokenAddress: string;
|
|
33
|
+
tokenId?: string;
|
|
34
|
+
tokenType: TokenGatedType;
|
|
35
|
+
erc20TokenAmount?: number;
|
|
36
|
+
tokenNetwork: SupportedChainName;
|
|
37
|
+
erc20TokenDecimals?: number;
|
|
38
|
+
}
|
|
39
|
+
export interface CreateListingRequest {
|
|
40
|
+
label: string;
|
|
41
|
+
basePrice: number;
|
|
42
|
+
whitelist?: string[];
|
|
43
|
+
whitelistType: number;
|
|
44
|
+
reservations?: IReservedSubname[];
|
|
45
|
+
specialPrices?: ILabelPrice[];
|
|
46
|
+
deadline?: number;
|
|
47
|
+
tokenGatedAccess?: ITokenGatedAccess[];
|
|
48
|
+
network: Web3Network;
|
|
49
|
+
listingType?: ListingType;
|
|
50
|
+
specialLabelRules?: ISpecialLabelRules;
|
|
51
|
+
l2Token?: L2TokenCreateRequest;
|
|
52
|
+
}
|
|
53
|
+
export interface L2TokenCreateRequest {
|
|
54
|
+
tokenSymbol: string;
|
|
55
|
+
tokenName: string;
|
|
56
|
+
listingType: L2ListingType;
|
|
57
|
+
parentControl: ParentControl;
|
|
58
|
+
l2Network: Layer2Network;
|
|
59
|
+
}
|
|
60
|
+
export interface L2TokenParameters {
|
|
61
|
+
token: string;
|
|
62
|
+
listingName: string;
|
|
63
|
+
ensName: string;
|
|
64
|
+
owner: string;
|
|
65
|
+
resolver: string;
|
|
66
|
+
baseUri: string;
|
|
67
|
+
parentControl: ParentControl;
|
|
68
|
+
listingType: L2ListingType;
|
|
69
|
+
}
|
|
70
|
+
export declare enum ParentControl {
|
|
71
|
+
NO_CONTROL = 0,
|
|
72
|
+
CONTROLLABLE = 1
|
|
73
|
+
}
|
|
74
|
+
export declare enum L2ListingType {
|
|
75
|
+
BASIC = 0,
|
|
76
|
+
EXPIRABLE = 1
|
|
77
|
+
}
|
|
78
|
+
export interface IMintableListing {
|
|
79
|
+
parentLabel: string;
|
|
80
|
+
parentNamehash: string;
|
|
81
|
+
parentName: string;
|
|
82
|
+
subnameLabel: string;
|
|
83
|
+
mintPrice: number;
|
|
84
|
+
listingOwner: string;
|
|
85
|
+
created: number;
|
|
86
|
+
verificationReason?: any;
|
|
87
|
+
listingType: ListingType;
|
|
88
|
+
}
|
|
89
|
+
export interface IGetMintableListingsParams {
|
|
90
|
+
subnameLabel: string;
|
|
91
|
+
parentLabel?: string;
|
|
92
|
+
owner?: string;
|
|
93
|
+
minterAddress: string;
|
|
94
|
+
currentPage?: number;
|
|
95
|
+
pageSize?: number;
|
|
96
|
+
network: null;
|
|
97
|
+
registrationPerion?: number;
|
|
98
|
+
}
|
|
99
|
+
export declare enum ListingType {
|
|
100
|
+
SELL_UNRUGGABLE = "sellUnruggable",
|
|
101
|
+
RENTING = "renting",
|
|
102
|
+
L2 = "l2"
|
|
103
|
+
}
|
|
104
|
+
export interface ISpecialLabelRules {
|
|
105
|
+
onlyLettersPrice?: number;
|
|
106
|
+
onlyNumbersPrice?: number;
|
|
107
|
+
onlyEmojiPrice?: number;
|
|
108
|
+
}
|
|
109
|
+
export interface IListingStats {
|
|
110
|
+
subnamesSold: number;
|
|
111
|
+
subnameProfile: number;
|
|
112
|
+
subnameVolume: number;
|
|
113
|
+
}
|
|
114
|
+
export interface GetMintableListingsParams {
|
|
115
|
+
subnameLabel: string;
|
|
116
|
+
parentLabel?: string;
|
|
117
|
+
owner?: string;
|
|
118
|
+
minterAddress: string;
|
|
119
|
+
currentPage?: number;
|
|
120
|
+
pageSize?: number;
|
|
121
|
+
network: Web3Network;
|
|
122
|
+
showL2Listings: boolean;
|
|
123
|
+
}
|
|
124
|
+
export interface MintableListing {
|
|
125
|
+
parentLabel: string;
|
|
126
|
+
parentNamehash: string;
|
|
127
|
+
parentName: string;
|
|
128
|
+
subnameLabel: string;
|
|
129
|
+
mintPrice: number;
|
|
130
|
+
listingOwner: string;
|
|
131
|
+
created: number;
|
|
132
|
+
verificationReason?: any;
|
|
133
|
+
listingType: ListingType;
|
|
134
|
+
network: Web3Network;
|
|
135
|
+
l2Network: Layer2Network;
|
|
136
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Address, Hash } from "viem";
|
|
2
|
+
import { Layer2Network, Web3Network } from "./networks";
|
|
3
|
+
export type MintDeniedReason = "SUBNAME_TAKEN" | "MINTER_NOT_TOKEN_OWNER" | "MINTER_NOT_WHITELISTED" | "LISTING_EXPIRED" | "SUBNAME_RESERVED" | "VERIFIED_MINTER_ADDRESS_REQUIRED" | "UNKNOWN_REASON";
|
|
4
|
+
export declare const MintDeniedMessage: Record<MintDeniedReason, string>;
|
|
5
|
+
export interface SimulateMintRequest {
|
|
6
|
+
label: string;
|
|
7
|
+
parentLabel: string;
|
|
8
|
+
network: Web3Network;
|
|
9
|
+
subnameOwner: Address;
|
|
10
|
+
minter: Address;
|
|
11
|
+
}
|
|
12
|
+
export interface SimulateMintResponse {
|
|
13
|
+
canMint: boolean;
|
|
14
|
+
estimatedPrice: number;
|
|
15
|
+
estimatedFee: number;
|
|
16
|
+
validationErrors: MintDeniedReason[];
|
|
17
|
+
requiresVerifiedMinter: boolean;
|
|
18
|
+
isStandardFee: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface L2MintParametersResponse {
|
|
21
|
+
parameters: L2MintParameters;
|
|
22
|
+
signature: Hash;
|
|
23
|
+
}
|
|
24
|
+
export interface L2MintParametersRequest {
|
|
25
|
+
mainNetwork: Web3Network;
|
|
26
|
+
tokenNetwork: Layer2Network;
|
|
27
|
+
parentLabel: string;
|
|
28
|
+
label: string;
|
|
29
|
+
owner: string;
|
|
30
|
+
expiry?: number;
|
|
31
|
+
}
|
|
32
|
+
export interface L2MintParameters {
|
|
33
|
+
label: string;
|
|
34
|
+
parentLabel: string;
|
|
35
|
+
resolver: Address;
|
|
36
|
+
owner: string;
|
|
37
|
+
expiry: number;
|
|
38
|
+
price: string;
|
|
39
|
+
fee: string;
|
|
40
|
+
paymentReceiver: Address;
|
|
41
|
+
}
|
|
42
|
+
export interface MintParameters {
|
|
43
|
+
subnameLabel: string;
|
|
44
|
+
parentNode: string;
|
|
45
|
+
resolver: string;
|
|
46
|
+
subnameOwner: string;
|
|
47
|
+
fuses: number;
|
|
48
|
+
mintPrice: string;
|
|
49
|
+
mintFee: string;
|
|
50
|
+
expiry: number;
|
|
51
|
+
ttl: number;
|
|
52
|
+
}
|
|
53
|
+
export interface MintParametersRequest {
|
|
54
|
+
label: string;
|
|
55
|
+
parentLabel: string;
|
|
56
|
+
subnameOwner: string;
|
|
57
|
+
resolver?: string;
|
|
58
|
+
network: Web3Network;
|
|
59
|
+
registrationPeriod?: number;
|
|
60
|
+
}
|
|
61
|
+
export interface MintParametersResponse {
|
|
62
|
+
parameters: MintParameters;
|
|
63
|
+
signature: Hash;
|
|
64
|
+
}
|
|
65
|
+
export interface MintedL1SubnameEvent {
|
|
66
|
+
chainId: number;
|
|
67
|
+
subnameLabel: string;
|
|
68
|
+
mintFee: number;
|
|
69
|
+
mintPrice: number;
|
|
70
|
+
parentNode: string;
|
|
71
|
+
paymentReceiver: string;
|
|
72
|
+
sender: string;
|
|
73
|
+
subnameOwner: string;
|
|
74
|
+
tx: string;
|
|
75
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare enum DeadlineType {
|
|
2
|
+
CANT_MINT_AFTER_EXPIRY = 1
|
|
3
|
+
}
|
|
4
|
+
export declare enum ListingCurrencyType {
|
|
5
|
+
ETH = "ETH",
|
|
6
|
+
USD = "DOLLAR"
|
|
7
|
+
}
|
|
8
|
+
export declare enum ListingVersionType {
|
|
9
|
+
L1 = "L1",
|
|
10
|
+
L2 = "L2"
|
|
11
|
+
}
|
|
12
|
+
export declare enum ListingTokenType {
|
|
13
|
+
ERC20 = "ERC20",
|
|
14
|
+
ERC721 = "ERC721",
|
|
15
|
+
ERC1155 = "ERC1155"
|
|
16
|
+
}
|
|
17
|
+
export declare enum WhitelistType {
|
|
18
|
+
ONLY_WHITELISTED = 1,
|
|
19
|
+
FREE_MINT = 2
|
|
20
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SupportedNetwork } from "../networks";
|
|
2
|
+
export interface L2NameRegistryDTO {
|
|
3
|
+
isBurnable: boolean;
|
|
4
|
+
isExpirable: boolean;
|
|
5
|
+
registryNetwork: SupportedNetwork;
|
|
6
|
+
registryName: string;
|
|
7
|
+
registrySymbol: string;
|
|
8
|
+
isDeployed: boolean;
|
|
9
|
+
registryAddress?: string;
|
|
10
|
+
name: string;
|
|
11
|
+
nameNetwork: SupportedNetwork;
|
|
12
|
+
registryOwner: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Address } from "viem";
|
|
2
|
+
import { ListingCurrencyType, ListingVersionType, WhitelistType, DeadlineType, ListingTokenType } from "./enums";
|
|
3
|
+
import { L2NameRegistryDTO } from "./l2-name-registry";
|
|
4
|
+
import { SupportedNetwork } from "../networks";
|
|
5
|
+
export interface WhitelistDTO {
|
|
6
|
+
type: WhitelistType;
|
|
7
|
+
wallets: Address[];
|
|
8
|
+
}
|
|
9
|
+
export interface DeadlineDTO {
|
|
10
|
+
timestamp: number;
|
|
11
|
+
type: DeadlineType;
|
|
12
|
+
}
|
|
13
|
+
export interface SpecialPriceDTO {
|
|
14
|
+
letterOnlyPrice?: number;
|
|
15
|
+
numberOnlyPrice?: number;
|
|
16
|
+
emojiOnlyPrice?: number;
|
|
17
|
+
}
|
|
18
|
+
export interface LabelPriceDTO {
|
|
19
|
+
numberOfLetters: number;
|
|
20
|
+
price: number;
|
|
21
|
+
}
|
|
22
|
+
export interface ListingPricesDTO {
|
|
23
|
+
basePrice: number;
|
|
24
|
+
labelPrices?: LabelPriceDTO[];
|
|
25
|
+
specialPrices?: SpecialPriceDTO;
|
|
26
|
+
}
|
|
27
|
+
export interface TokenGatedAccessDTO {
|
|
28
|
+
tokenType: ListingTokenType;
|
|
29
|
+
tokenAddress: string;
|
|
30
|
+
tokenId?: string;
|
|
31
|
+
erc20MinTokenBalance?: number;
|
|
32
|
+
erc20TokenDecimals?: number;
|
|
33
|
+
tokenNetwork: SupportedNetwork;
|
|
34
|
+
}
|
|
35
|
+
export interface ReservedLabelDTO {
|
|
36
|
+
label: string;
|
|
37
|
+
price?: number;
|
|
38
|
+
isMintable: boolean;
|
|
39
|
+
}
|
|
40
|
+
export declare class ListingMetadataDTO {
|
|
41
|
+
description?: string;
|
|
42
|
+
holderBenefits?: string;
|
|
43
|
+
}
|
|
44
|
+
export interface ListingDTO {
|
|
45
|
+
name: string;
|
|
46
|
+
namehash: string;
|
|
47
|
+
nameNetwork: SupportedNetwork;
|
|
48
|
+
type: ListingVersionType;
|
|
49
|
+
currency: ListingCurrencyType;
|
|
50
|
+
createdAt?: string;
|
|
51
|
+
updatedAt?: string;
|
|
52
|
+
whitelist?: WhitelistDTO;
|
|
53
|
+
deadline?: DeadlineDTO;
|
|
54
|
+
prices: ListingPricesDTO;
|
|
55
|
+
isVerified: boolean;
|
|
56
|
+
owner: string;
|
|
57
|
+
paymentWallet: string;
|
|
58
|
+
tokenGatedAccess?: TokenGatedAccessDTO[];
|
|
59
|
+
metadata?: ListingMetadataDTO;
|
|
60
|
+
reservations?: ReservedLabelDTO[];
|
|
61
|
+
}
|
|
62
|
+
export interface UpdateListingRequestDTO {
|
|
63
|
+
name: string;
|
|
64
|
+
nameNetwork: SupportedNetwork;
|
|
65
|
+
whitelist?: WhitelistDTO;
|
|
66
|
+
deadline?: DeadlineDTO;
|
|
67
|
+
prices: ListingPricesDTO;
|
|
68
|
+
tokenGatedAccess?: TokenGatedAccessDTO[];
|
|
69
|
+
reservations?: ReservedLabelDTO[];
|
|
70
|
+
}
|
|
71
|
+
export interface FullListingDTO extends ListingDTO {
|
|
72
|
+
l2Metadata?: L2NameRegistryDTO;
|
|
73
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ListingNetwork } from "./list-manager";
|
|
2
|
+
export type Web3Network = "mainnet" | "sepolia";
|
|
3
|
+
export type Layer2Network = "base" | "baseSepolia" | "optimism";
|
|
4
|
+
export type SupportedChainName = Web3Network | Layer2Network;
|
|
5
|
+
export declare const isTestnet: (chainId: number) => boolean;
|
|
6
|
+
export declare const allSupportedChains: SupportedChainName[];
|
|
7
|
+
export declare const isL2Chain: (network: SupportedChainName) => boolean;
|
|
8
|
+
export declare enum SupportedNetwork {
|
|
9
|
+
Mainnet = "mainnet",
|
|
10
|
+
Sepolia = "sepolia",
|
|
11
|
+
Optimism = "optimism",
|
|
12
|
+
BaseSepolia = "baseSepolia",
|
|
13
|
+
Base = "base"
|
|
14
|
+
}
|
|
15
|
+
export declare const toListingNetwork: (network: SupportedNetwork) => ListingNetwork;
|
|
16
|
+
export type SupportedNetworkType = "mainnet" | "sepolia" | "optimism" | "baseSepolia" | "base";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const AVATAR_UPDATED = "avatarUpdated";
|
|
2
|
+
export declare const COVER_UPDATED = "coverUpdated";
|
|
3
|
+
export declare const notifyAvatarUpdated: () => boolean;
|
|
4
|
+
export declare const onAvatarUpdated: (callback: () => void) => void;
|
|
5
|
+
export declare const offAvatarUpdated: (callback: () => void) => void;
|
|
6
|
+
export declare const notifyCoverUpdated: () => boolean;
|
|
7
|
+
export declare const onCoverUpdated: (callback: () => void) => void;
|
|
8
|
+
export declare const offCoverUpdated: (callback: () => void) => void;
|