@thenamespace/ens-components 0.28.0 → 0.29.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.d.ts CHANGED
@@ -28,7 +28,7 @@ declare enum ContenthashProtocol {
28
28
  Swarm = "swarm"
29
29
  }
30
30
 
31
- type ChainName$1 = "eth" | "arb" | "base" | "bitcoin" | "matic" | "op" | "sol" | "zora" | "celo";
31
+ type ChainName$2 = "eth" | "arb" | "base" | "bitcoin" | "matic" | "op" | "sol" | "zora" | "celo";
32
32
 
33
33
  declare enum TxProgress {
34
34
  Pending = 0,
@@ -180,6 +180,23 @@ interface SubnameMintFormProps {
180
180
  }
181
181
  declare const SubnameMintForm: ({ parentName, label, isTestnet, onCancel, onSuccess, onSubnameMinted, }: SubnameMintFormProps) => react_jsx_runtime.JSX.Element;
182
182
 
183
+ interface OffchainSubnameCreatedData {
184
+ label: string;
185
+ parentName: string;
186
+ fullSubname: string;
187
+ records: EnsRecords$1;
188
+ ownerAddress?: string;
189
+ }
190
+ interface OffchainSubnameFormProps {
191
+ apiKeyOrToken: string;
192
+ name: string;
193
+ label?: string;
194
+ hideTitle?: boolean;
195
+ onCancel?: () => void;
196
+ onSuccess?: (data: OffchainSubnameCreatedData) => void;
197
+ }
198
+ declare const OffchainSubnameForm: ({ apiKeyOrToken, name, label: propLabel, hideTitle, onCancel, onSuccess, }: OffchainSubnameFormProps) => react_jsx_runtime.JSX.Element;
199
+
183
200
  type ButtonVariant = "solid" | "outline" | "ghost" | "destructive";
184
201
  type ButtonSize = "sm" | "md" | "lg";
185
202
  interface ButtonProps extends Omit<React__default.ButtonHTMLAttributes<HTMLButtonElement>, "prefix"> {
@@ -240,7 +257,7 @@ interface IconProps {
240
257
  declare const Icon: React__default.FC<IconProps>;
241
258
 
242
259
  interface ChainIconProps extends React__default.SVGProps<SVGSVGElement> {
243
- chain: ChainName$1;
260
+ chain: ChainName$2;
244
261
  size?: number;
245
262
  }
246
263
  declare const ChainIcon: React__default.FC<ChainIconProps>;
@@ -405,13 +422,13 @@ interface SupportedEnsAddress {
405
422
  label: string;
406
423
  coinType: number;
407
424
  chainId?: number;
408
- chainName: ChainName$1;
425
+ chainName: ChainName$2;
409
426
  placeholder?: string;
410
427
  }
411
428
  declare const supportedAddresses: SupportedEnsAddress[];
412
429
  declare const getSupportedAddressMap: () => Record<number, SupportedEnsAddress>;
413
430
  declare const getSupportedAddressByCoin: (coin: number) => SupportedEnsAddress | undefined;
414
- declare const getSupportedAddressByName: (name: ChainName$1) => SupportedEnsAddress | undefined;
431
+ declare const getSupportedAddressByName: (name: ChainName$2) => SupportedEnsAddress | undefined;
415
432
  declare const getSupportedAddressByChainId: (chainId: number) => SupportedEnsAddress | undefined;
416
433
  type TextCategory = "profile" | "social";
417
434
  interface SupportedText {
@@ -573,7 +590,7 @@ declare const useENSResolver: ({ resolverChainId, isTestnet, }: {
573
590
  setUpdateRecordsTx: (update: UpdateRecordsRequest) => Promise<`0x${string}`>;
574
591
  };
575
592
 
576
- declare enum ChainName {
593
+ declare enum ChainName$1 {
577
594
  Ethereum = "eth",
578
595
  Default = "default",
579
596
  Solana = "sol",
@@ -662,7 +679,7 @@ interface EnsTextRecord {
662
679
  }
663
680
  /** Address record for a specific chain (by coin type or ChainName). */
664
681
  interface EnsAddressRecord {
665
- chain: ChainName | number;
682
+ chain: ChainName$1 | number;
666
683
  value: string;
667
684
  }
668
685
  /** Contenthash record (ipfs, ipns, swarm, etc.). */
@@ -738,5 +755,534 @@ declare const useMintSubname: ({ chainId }: {
738
755
  estimateTransactionFees: (params: EstimateFeesParams) => Promise<EstimatedFees | null>;
739
756
  };
740
757
 
741
- export { Accordion, Alert, Button, Card, ChainIcon, ConnectAndSetChain, ContenthashIcon, ContenthashProtocol, ContractErrorLabel, Dropdown, ENS_RESOLVER_ABI, EnsNameRegistrationForm, EnsRecordsForm, Icon, Input, ListingNetwork, ListingType, MULTICALL, Modal, PricingDisplay, ProfileHeader, ProgressBar, SET_ADDRESS_FUNC, SET_CONTENTHASH_FUNC, SET_TEXT_FUNC, SelectRecordsForm, ShurikenSpinner, SubnameMintForm, Text, TextRecordCategory, Textarea, ThemeProvider, Tooltip, TxProgress, WalletConnectProvider, capitalize, convertEVMChainIdToCoinType, convertToMulticallResolverData, convertToResolverData, createEnsReferer, debounce, deepCopy, diffToEnsRecords, ensureFloatInput, equalsIgnoreCase, formatFloat, getBlockExplorer, getBlockExplorerAddressUrl, getBlockExplorerName, getBlockExplorerTransactionUrl, getChainIdForListingNetwork, getEnsAppUrl, getEnsRecordsDiff, getSupportedAddressByChainId, getSupportedAddressByCoin, getSupportedAddressByName, getSupportedAddressMap, getSupportedChashByProtocol, getSupportedText, isCommitmentToNewErr, isContenthashValid, isUserDeniedError, supportedAddresses, supportedContenthashRecords, supportedTexts, useENSResolver, useMintManager, useMintSubname, useRegisterENS, useTheme, useWaitTransaction, validateEnsRecords };
742
- export type { AccordionProps, AlertPosition, AlertProps, AlertVariant, ButtonProps, ButtonSize, ButtonVariant, ChainName$1 as ChainName, ConnectAndSetChainProps, ContractErrorLabelProps, DropdownProps, EnsAddressRecord$1 as EnsAddressRecord, EnsContenthashRecord, EnsRecords$1 as EnsRecords, EnsRecordsDiff, EnsTextRecord$1 as EnsTextRecord, EstimatedFees, IconName, IconProps, InputProps, InputSize, InputType, ModalProps, ModalSize, NameListing, PricingDisplayProps, ProfileHeaderProps, RecordValidationError, RegistrationRequest, ShurikenSpinnerProps, SupportedContenthashRecord, SupportedEnsAddress, SupportedText, SupportedTextRecord, TextCategory, TextColor, TextProps, TextSize, TextWeight, TextareaProps, TextareaSize, ThemeContextValue, ThemeName, ThemeProviderProps, TooltipPosition, TooltipProps };
758
+ /**
759
+ * Complete subname data returned by the Namespace API.
760
+ * This represents a fully resolved ENS subname with all its associated records.
761
+ *
762
+ * @example
763
+ * ```typescript
764
+ * // Retrieved subname data
765
+ * const subname: SubnameDTO = {
766
+ * id: 'abc123',
767
+ * fullName: 'alice.example.eth',
768
+ * parentName: 'example.eth',
769
+ * label: 'alice',
770
+ * texts: { com.twitter: 'alice', url: 'https://alice.dev' },
771
+ * addresses: { '60': '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045' },
772
+ * metadata: {},
773
+ * namehash: '0x...',
774
+ * createdAt: '2024-01-01T00:00:00Z'
775
+ * };
776
+ * ```
777
+ */
778
+ interface SubnameDTO {
779
+ /** Unique identifier for this subname */
780
+ id: string;
781
+ /** Full ENS name including parent domain (e.g., 'alice.example.eth') */
782
+ fullName: string;
783
+ /** Parent ENS domain (e.g., 'example.eth') */
784
+ parentName: string;
785
+ /** Subname label (e.g., 'alice') */
786
+ label: string;
787
+ /** Text records as key-value pairs */
788
+ texts: Record<string, string>;
789
+ /** Address records as coin type -> address mappings */
790
+ addresses: Record<string, string>;
791
+ /** Metadata records as key-value pairs */
792
+ metadata: Record<string, string>;
793
+ /** Optional IPFS content hash */
794
+ contenthash?: string;
795
+ /** ENS namehash for this subname */
796
+ namehash: string;
797
+ /** Optional owner address */
798
+ owner?: string;
799
+ /** Optional time-to-live in seconds */
800
+ ttl?: number;
801
+ /** Timestamp when the subname was created */
802
+ createdAt?: string;
803
+ /** Timestamp when the subname was last updated */
804
+ updatedAt?: string;
805
+ }
806
+
807
+ /**
808
+ * Response from checking if a subname is available for registration.
809
+ */
810
+ interface GetAvailableResponse {
811
+ /** Whether the subname is available for registration */
812
+ isAvailable: boolean;
813
+ }
814
+ /**
815
+ * Response containing a single record value.
816
+ */
817
+ interface GetRecordResponse {
818
+ /** The record value eg. thenamespaceninja for com.github */
819
+ record: string;
820
+ }
821
+ /**
822
+ * Generic paginated response wrapper.
823
+ *
824
+ * @template T - The type of items in the response
825
+ */
826
+ interface PagedResponse<T> {
827
+ /** Total number of items across all pages */
828
+ totalItems: number;
829
+ /** Current page number (1-based) */
830
+ page: number;
831
+ /** Number of items per page */
832
+ size: number;
833
+ /** Array of items for the current page */
834
+ items: T;
835
+ }
836
+ /**
837
+ * Query parameters for searching and filtering subnames.
838
+ *
839
+ * @example
840
+ * ```typescript
841
+ * const query: QuerySubnamesRequest = {
842
+ * parentName: 'example.eth',
843
+ * labelSearch: 'alice',
844
+ * page: 1,
845
+ * size: 50
846
+ * };
847
+ * ```
848
+ */
849
+ interface QuerySubnamesRequest {
850
+ /** Parent ENS domain to filter by */
851
+ parentName?: string;
852
+ /** Search term for subname labels */
853
+ labelSearch?: string;
854
+ /** Page number (1-based) */
855
+ page?: number;
856
+ /** Number of items per page (max 100) */
857
+ size?: number;
858
+ /** Filter by metadata records */
859
+ metadata?: Record<string, string>;
860
+ /** Array of parent names to filter by */
861
+ parentNames?: string[];
862
+ /** Filter by owner address */
863
+ owner?: string;
864
+ }
865
+
866
+ /**
867
+ * Supported blockchain networks for address records.
868
+ * Each chain has a corresponding coin type used internally for ENS address records.
869
+ *
870
+ * @example
871
+ * ```typescript
872
+ * import { ChainName } from '@thenamespace/offchain-manager';
873
+ *
874
+ * // Use in address records
875
+ * const addressRecord = {
876
+ * chain: ChainName.Ethereum,
877
+ * value: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'
878
+ * };
879
+ * ```
880
+ */
881
+ declare enum ChainName {
882
+ /** Ethereum mainnet */
883
+ Ethereum = "eth",
884
+ /** Default (EVM-compatible) */
885
+ Default = "default",
886
+ /** Solana */
887
+ Solana = "sol",
888
+ /** Arbitrum One */
889
+ Arbitrum = "arb",
890
+ /** Optimism */
891
+ Optimism = "op",
892
+ /** Base */
893
+ Base = "base",
894
+ /** Polygon (formerly Matic) */
895
+ Polygon = "polygon",
896
+ /** BNB Smart Chain (formerly BSC) */
897
+ Bsc = "bsc",
898
+ /** Avalanche C-Chain */
899
+ Avalanche = "avax",
900
+ /** Gnosis Chain (formerly xDai) */
901
+ Gnosis = "gnosis",
902
+ /** zkSync Era */
903
+ Zksync = "zksync",
904
+ /** Cosmos Hub */
905
+ Cosmos = "cosmos",
906
+ /** NEAR Protocol */
907
+ Near = "near",
908
+ /** Linea */
909
+ Linea = "linea",
910
+ /** Scroll */
911
+ Scroll = "scroll",
912
+ /** Bitcoin */
913
+ Bitcoin = "btc",
914
+ /** Starknet */
915
+ Starknet = "starknet",
916
+ /** Sui Network */
917
+ Sui = "sui",
918
+ /** Unichain */
919
+ Unichain = "unichain",
920
+ /** Berachain */
921
+ Berachain = "berachain",
922
+ /** WorldChain */
923
+ WorldChain = "world_chain",
924
+ /** Zora */
925
+ Zora = "zora",
926
+ /** Celo */
927
+ Celo = "celo",
928
+ /** Aptos */
929
+ Aptos = "aptos",
930
+ /** Algorand */
931
+ Algorand = "algorand",
932
+ /** Monad */
933
+ Monad = "monad",
934
+ /** Push Chain */
935
+ Push = "push"
936
+ }
937
+
938
+ /**
939
+ * Represents a text record for ENS subnames.
940
+ * Text records store arbitrary key-value pairs like social media handles, websites, etc.
941
+ *
942
+ * @example
943
+ * ```typescript
944
+ * const textRecord: TextRecord = {
945
+ * key: 'com.twitter',
946
+ * value: 'myhandle'
947
+ * };
948
+ * ```
949
+ */
950
+ interface TextRecord {
951
+ /** The record key (e.g., 'description', 'com.twitter', 'com.github', 'url', 'avatar') */
952
+ key: string;
953
+ /** The record value (e.g., 'myhandle', 'https://mysite.com') */
954
+ value: string;
955
+ }
956
+ /**
957
+ * Represents an address record for ENS subnames.
958
+ * Address records map blockchain networks to wallet addresses.
959
+ *
960
+ * @example
961
+ * ```typescript
962
+ * const addressRecord: AddressRecord = {
963
+ * chain: ChainName.Ethereum,
964
+ * value: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'
965
+ * };
966
+ * ```
967
+ */
968
+ interface AddressRecord {
969
+ /** The blockchain network for this address */
970
+ chain: ChainName;
971
+ /** The wallet address on the specified chain */
972
+ value: string;
973
+ }
974
+
975
+ /**
976
+ * Request payload for creating a new ENS subname.
977
+ *
978
+ * @example
979
+ * ```typescript
980
+ * import { CreateSubnameRequest, ChainName } from '@thenamespace/offchain-manager';
981
+ *
982
+ * const request: CreateSubnameRequest = {
983
+ * parentName: 'example.eth',
984
+ * label: 'alice',
985
+ * addresses: [{
986
+ * chain: ChainName.Ethereum,
987
+ * value: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'
988
+ * }],
989
+ * texts: [{
990
+ * key: 'com.twitter',
991
+ * value: 'alice'
992
+ * }]
993
+ * };
994
+ * ```
995
+ */
996
+ interface CreateSubnameRequest {
997
+ /** The parent ENS domain (e.g., 'example.eth') */
998
+ parentName: string;
999
+ /** The subname label (e.g., 'alice' for 'alice.example.eth') */
1000
+ label: string;
1001
+ /** Optional text records for social media, websites, etc. */
1002
+ texts?: TextRecord[];
1003
+ /** Optional address records for different blockchain networks */
1004
+ addresses?: AddressRecord[];
1005
+ /** Optional metadata records for custom data */
1006
+ metadata?: TextRecord[];
1007
+ /** Optional IPFS content hash */
1008
+ contenthash?: string;
1009
+ /** Optional time-to-live in seconds for DNS records */
1010
+ ttl?: number;
1011
+ owner?: string;
1012
+ }
1013
+
1014
+ /**
1015
+ * Request payload for updating an existing ENS subname.
1016
+ * All fields are optional - only provided fields will be updated.
1017
+ *
1018
+ * @example
1019
+ * ```typescript
1020
+ * import { UpdateSubnameRequest, ChainName } from '@thenamespace/offchain-manager';
1021
+ *
1022
+ * const updateRequest: UpdateSubnameRequest = {
1023
+ * texts: [{
1024
+ * key: 'url',
1025
+ * value: 'https://alice.dev'
1026
+ * }],
1027
+ * addresses: [{
1028
+ * chain: ChainName.Base,
1029
+ * value: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'
1030
+ * }]
1031
+ * };
1032
+ * ```
1033
+ */
1034
+ interface UpdateSubnameRequest {
1035
+ /** Text records to update (replaces existing text records) */
1036
+ texts?: TextRecord[];
1037
+ /** Address records to update (replaces existing address records) */
1038
+ addresses?: AddressRecord[];
1039
+ /** Metadata records to update (replaces existing metadata) */
1040
+ metadata?: TextRecord[];
1041
+ /** IPFS content hash to set */
1042
+ contenthash?: string;
1043
+ /** Time-to-live in seconds for DNS records */
1044
+ ttl?: number;
1045
+ }
1046
+
1047
+ /**
1048
+ * Main client interface for managing ENS subnames off-chain.
1049
+ * Provides methods for creating, updating, deleting, and querying subnames and their records.
1050
+ *
1051
+ * @example
1052
+ * ```typescript
1053
+ * import { createOffchainClient } from '@thenamespace/offchain-manager';
1054
+ *
1055
+ * const client = createOffchainClient();
1056
+ * client.setDefaultApiKey('your-api-key'); // Works with your address based ENS domain
1057
+ *
1058
+ * // Create a subname
1059
+ * await client.createSubname({
1060
+ * parentName: 'example.eth',
1061
+ * label: 'alice',
1062
+ * addresses: [{ chain: ChainName.Ethereum, value: '0x...' }]
1063
+ * });
1064
+ * ```
1065
+ */
1066
+ interface OffchainClient {
1067
+ /**
1068
+ * Set API key for a specific ENS domain.
1069
+ * @param ensName - The ENS domain name (e.g., 'example.eth')
1070
+ * @param apiKey - Domain Based API key obtained from https://dev.namespace.ninja
1071
+ * @example
1072
+ * ```typescript
1073
+ * client.setApiKey('example.eth', 'your-domain-based-api-key');
1074
+ * ```
1075
+ */
1076
+ setApiKey(ensName: string, apiKey: string): void;
1077
+ /**
1078
+ * Set a default API key to be used for all your ENS domains with Namespace Resolver.
1079
+ * This is useful when you want to use the same API key for all domains registered with the same address.
1080
+ * @param apiKey - Address Based API key obtained from https://dev.namespace.ninja
1081
+ * @example
1082
+ * ```typescript
1083
+ * client.setDefaultApiKey('your-address-based-api-key');
1084
+ * ```
1085
+ */
1086
+ setDefaultApiKey(apiKey: string): void;
1087
+ /**
1088
+ * Create a new ENS subname with optional records.
1089
+ * @param request - Subname creation parameters
1090
+ * @throws {ValidationError} When request parameters are invalid
1091
+ * @throws {AuthenticationError} When API key is invalid
1092
+ * @throws {SubnameAlreadyExistsError} When subname already exists
1093
+ * @example
1094
+ * ```typescript
1095
+ * await client.createSubname({
1096
+ * parentName: 'example.eth',
1097
+ * label: 'alice',
1098
+ * owner: "0x123...",
1099
+ * addresses: [{ chain: ChainName.Ethereum, value: '0x123...' }],
1100
+ * texts: [{ key: 'com.twitter', value: 'alice' }],
1101
+ * contenthash: "ipfs://baf....",
1102
+ * metadata: [{ key: "sender", value: '0x123...' }],
1103
+ * });
1104
+ */
1105
+ createSubname(request: CreateSubnameRequest): Promise<void>;
1106
+ /**
1107
+ * Update an existing ENS subname's records.
1108
+ * @param subname - Full subname (e.g., 'alice.example.eth')
1109
+ * @param request - Update parameters
1110
+ * @throws {ValidationError} When parameters are invalid
1111
+ * @throws {SubnameNotFoundError} When subname doesn't exist
1112
+ * @example
1113
+ * ```typescript
1114
+ * await client.updateSubname('alice.example.eth', {
1115
+ * addresses: [{ chain: ChainName.Ethereum, value: '0x...' }],
1116
+ * texts: [{ key: 'com.twitter', value: 'alice' }]
1117
+ * });
1118
+ * ```
1119
+ */
1120
+ updateSubname(subname: string, request: UpdateSubnameRequest): Promise<void>;
1121
+ /**
1122
+ * Delete an ENS subname and all its records.
1123
+ * @param fullSubname - Full subname (e.g., 'alice.example.eth')
1124
+ * @throws {SubnameNotFoundError} When subname doesn't exist
1125
+ * @example
1126
+ * ```typescript
1127
+ * await client.deleteSubname('alice.example.eth');
1128
+ * ```
1129
+ */
1130
+ deleteSubname(fullSubname: string): Promise<void>;
1131
+ /**
1132
+ * Check if a subname is available for registration.
1133
+ * @param fullSubname - Full subname to check (e.g., 'alice.example.eth')
1134
+ * @returns Promise resolving to availability status
1135
+ * @example
1136
+ * ```typescript
1137
+ * const availability = await client.isSubnameAvailable('alice.example.eth');
1138
+ * ```
1139
+ */
1140
+ isSubnameAvailable(fullSubname: string): Promise<GetAvailableResponse>;
1141
+ /**
1142
+ * Get details of a specific subname.
1143
+ * @param fullName - Full subname (e.g., 'alice.example.eth')
1144
+ * @returns Promise resolving to subname data or null if not found
1145
+ * @example
1146
+ * ```typescript
1147
+ * const subname = await client.getSingleSubname('alice.example.eth');
1148
+ * ```
1149
+ */
1150
+ getSingleSubname(fullName: string): Promise<SubnameDTO | null>;
1151
+ /**
1152
+ * Search and filter subnames with pagination.
1153
+ * @param query - Search and filter parameters
1154
+ * @returns Promise resolving to paginated subname results
1155
+ * @example
1156
+ * ```typescript
1157
+ * const subnames = await client.getFilteredSubnames({
1158
+ * parentName: 'example.eth',
1159
+ * page: 1,
1160
+ * size: 50,
1161
+ * });
1162
+ * ```
1163
+ */
1164
+ getFilteredSubnames(query: QuerySubnamesRequest): Promise<PagedResponse<SubnameDTO[]>>;
1165
+ /**
1166
+ * Add an address record for a specific blockchain to a subname.
1167
+ * @param subname - Full subname (e.g., 'alice.example.eth')
1168
+ * @param chain - Blockchain network
1169
+ * @param value - Wallet address on the specified chain
1170
+ * @throws {ValidationError} When address format is invalid for the chain
1171
+ * @example
1172
+ * ```typescript
1173
+ * await client.addAddressRecord('alice.example.eth', ChainName.Ethereum, '0x...');
1174
+ * ```
1175
+ */
1176
+ addAddressRecord(subname: string, chain: ChainName, value: string): Promise<void>;
1177
+ /**
1178
+ * Remove an address record for a specific blockchain from a subname.
1179
+ * @param subname - Full subname (e.g., 'alice.example.eth')
1180
+ * @param chain - Blockchain network to remove
1181
+ * @example
1182
+ * ```typescript
1183
+ * await client.deleteAddressRecord('alice.example.eth', ChainName.Ethereum);
1184
+ * ```
1185
+ */
1186
+ deleteAddressRecord(subname: string, chain: ChainName): Promise<void>;
1187
+ /**
1188
+ * Set a default EVM address for all EVM-compatible chains to a subname.
1189
+ * This sets the same address for Ethereum, Arbitrum, Optimism, Base, Polygon, BSC, Avalanche, Gnosis, zkSync, Linea, Scroll, Unichain, Berachain, WorldChain, Zora, Celo, and Monad.
1190
+ * @param subname - Full subname (e.g., 'alice.example.eth')
1191
+ * @param value - EVM wallet address to set as default for all supported EVM chains
1192
+ * @throws {ValidationError} When address format is invalid
1193
+ * @example
1194
+ * ```typescript
1195
+ * await client.setDefaultEvmAddress('alice.example.eth', '0x...');
1196
+ * ```
1197
+ */
1198
+ setDefaultEvmAddress(subname: string, value: string): Promise<void>;
1199
+ /**
1200
+ * Add a text record to a subname.
1201
+ * @param subname - Full subname (e.g., 'alice.example.eth')
1202
+ * @param key - Record key (e.g., 'com.twitter', 'com.github', 'url')
1203
+ * @param value - Record value (e.g., 'alice', 'https://alice.dev')
1204
+ * @example
1205
+ * ```typescript
1206
+ * await client.addTextRecord('alice.example.eth', 'com.twitter', 'alice');
1207
+ * ```
1208
+ */
1209
+ addTextRecord(subname: string, key: string, value: string): Promise<void>;
1210
+ /**
1211
+ * Remove a text record from a subname.
1212
+ * @param subname - Full subname (e.g., 'alice.example.eth')
1213
+ * @param key - Record key to remove
1214
+ * @example
1215
+ * ```typescript
1216
+ * await client.deleteTextRecord('alice.example.eth', 'com.twitter');
1217
+ * ```
1218
+ */
1219
+ deleteTextRecord(subname: string, key: string): Promise<void>;
1220
+ /**
1221
+ * Get all text records for a subname.
1222
+ * @param fullSubname - Full subname (e.g., 'alice.example.eth')
1223
+ * @returns Promise resolving to all the text records for the subname
1224
+ * @example
1225
+ * ```typescript
1226
+ * const textRecords = await client.getTextRecords('alice.example.eth');
1227
+ * ```
1228
+ */
1229
+ getTextRecords(fullSubname: string): Promise<Record<string, string>>;
1230
+ /**
1231
+ * Get a specific text record for a subname.
1232
+ * @param fullSubname - Full subname (e.g., 'alice.example.eth')
1233
+ * @param key - Record key to retrieve
1234
+ * @returns Promise resolving to the record response
1235
+ * @example
1236
+ * ```typescript
1237
+ * const textRecord = await client.getTextRecord('alice.example.eth', 'com.twitter');
1238
+ * ```
1239
+ */
1240
+ getTextRecord(fullSubname: string, key: string): Promise<GetRecordResponse>;
1241
+ /**
1242
+ * Add a metadata record to a subname.
1243
+ * @param fullSubname - Full subname (e.g., 'alice.example.eth')
1244
+ * @param key - Metadata key
1245
+ * @param data - Metadata value (will be JSON stringified if object)
1246
+ * @example
1247
+ * ```typescript
1248
+ * await client.addDataRecord('alice.example.eth', 'data', 'HODL ENS!');
1249
+ * ```
1250
+ */
1251
+ addDataRecord(fullSubname: string, key: string, data: unknown): Promise<void>;
1252
+ /**
1253
+ * Remove a metadata record from a subname.
1254
+ * @param subname - Full subname (e.g., 'alice.example.eth')
1255
+ * @param key - Metadata key to remove
1256
+ * @example
1257
+ * ```typescript
1258
+ * await client.deleteDataRecord('alice.example.eth', 'data');
1259
+ * ```
1260
+ */
1261
+ deleteDataRecord(subname: string, key: string): Promise<void>;
1262
+ /**
1263
+ * Get all metadata records for a subname.
1264
+ * @param fullSubname - Full subname (e.g., 'alice.example.eth')
1265
+ * @returns Promise resolving to key-value pairs of metadata records
1266
+ * @example
1267
+ * ```typescript
1268
+ * const dataRecords = await client.getDataRecords('alice.example.eth');
1269
+ * ```
1270
+ */
1271
+ getDataRecords(fullSubname: string): Promise<Record<string, unknown>>;
1272
+ /**
1273
+ * Get a specific metadata record for a subname.
1274
+ * @param fullSubname - Full subname (e.g., 'alice.example.eth')
1275
+ * @param key - Metadata key to retrieve
1276
+ * @returns Promise resolving to the record response
1277
+ * @example
1278
+ * ```typescript
1279
+ * const dataRecord = await client.getDataRecord('alice.example.eth', 'data');
1280
+ * ```
1281
+ */
1282
+ getDataRecord(fullSubname: string, key: string): Promise<GetRecordResponse>;
1283
+ }
1284
+
1285
+ declare const useOffchainManager: (name: string, apiKeyOrToken: string) => OffchainClient;
1286
+
1287
+ export { Accordion, Alert, Button, Card, ChainIcon, ConnectAndSetChain, ContenthashIcon, ContenthashProtocol, ContractErrorLabel, Dropdown, ENS_RESOLVER_ABI, EnsNameRegistrationForm, EnsRecordsForm, Icon, Input, ListingNetwork, ListingType, MULTICALL, Modal, OffchainSubnameForm, PricingDisplay, ProfileHeader, ProgressBar, SET_ADDRESS_FUNC, SET_CONTENTHASH_FUNC, SET_TEXT_FUNC, SelectRecordsForm, ShurikenSpinner, SubnameMintForm, Text, TextRecordCategory, Textarea, ThemeProvider, Tooltip, TxProgress, WalletConnectProvider, capitalize, convertEVMChainIdToCoinType, convertToMulticallResolverData, convertToResolverData, createEnsReferer, debounce, deepCopy, diffToEnsRecords, ensureFloatInput, equalsIgnoreCase, formatFloat, getBlockExplorer, getBlockExplorerAddressUrl, getBlockExplorerName, getBlockExplorerTransactionUrl, getChainIdForListingNetwork, getEnsAppUrl, getEnsRecordsDiff, getSupportedAddressByChainId, getSupportedAddressByCoin, getSupportedAddressByName, getSupportedAddressMap, getSupportedChashByProtocol, getSupportedText, isCommitmentToNewErr, isContenthashValid, isUserDeniedError, supportedAddresses, supportedContenthashRecords, supportedTexts, useENSResolver, useMintManager, useMintSubname, useOffchainManager, useRegisterENS, useTheme, useWaitTransaction, validateEnsRecords };
1288
+ export type { AccordionProps, AlertPosition, AlertProps, AlertVariant, ButtonProps, ButtonSize, ButtonVariant, ChainName$2 as ChainName, ConnectAndSetChainProps, ContractErrorLabelProps, DropdownProps, EnsAddressRecord$1 as EnsAddressRecord, EnsContenthashRecord, EnsRecords$1 as EnsRecords, EnsRecordsDiff, EnsTextRecord$1 as EnsTextRecord, EstimatedFees, IconName, IconProps, InputProps, InputSize, InputType, ModalProps, ModalSize, NameListing, PricingDisplayProps, ProfileHeaderProps, RecordValidationError, RegistrationRequest, ShurikenSpinnerProps, SupportedContenthashRecord, SupportedEnsAddress, SupportedText, SupportedTextRecord, TextCategory, TextColor, TextProps, TextSize, TextWeight, TextareaProps, TextareaSize, ThemeContextValue, ThemeName, ThemeProviderProps, TooltipPosition, TooltipProps };