@thenamespace/ens-components 0.29.0 → 0.30.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
@@ -193,9 +193,10 @@ interface OffchainSubnameFormProps {
193
193
  label?: string;
194
194
  hideTitle?: boolean;
195
195
  onCancel?: () => void;
196
+ isTestnet?: boolean;
196
197
  onSuccess?: (data: OffchainSubnameCreatedData) => void;
197
198
  }
198
- declare const OffchainSubnameForm: ({ apiKeyOrToken, name, label: propLabel, hideTitle, onCancel, onSuccess, }: OffchainSubnameFormProps) => react_jsx_runtime.JSX.Element;
199
+ declare const OffchainSubnameForm: ({ apiKeyOrToken, name, label: propLabel, hideTitle, isTestnet, onCancel, onSuccess, }: OffchainSubnameFormProps) => react_jsx_runtime.JSX.Element;
199
200
 
200
201
  type ButtonVariant = "solid" | "outline" | "ghost" | "destructive";
201
202
  type ButtonSize = "sm" | "md" | "lg";
@@ -1282,7 +1283,7 @@ interface OffchainClient {
1282
1283
  getDataRecord(fullSubname: string, key: string): Promise<GetRecordResponse>;
1283
1284
  }
1284
1285
 
1285
- declare const useOffchainManager: (name: string, apiKeyOrToken: string) => OffchainClient;
1286
+ declare const useOffchainManager: (name: string, apiKeyOrToken: string, isTestnet?: boolean) => OffchainClient;
1286
1287
 
1287
1288
  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
1289
  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 };
package/dist/index.js CHANGED
@@ -58597,11 +58597,12 @@ function requireDist () {
58597
58597
 
58598
58598
  var distExports = requireDist();
58599
58599
 
58600
- const useOffchainManager = (name, apiKeyOrToken) => {
58600
+ const useOffchainManager = (name, apiKeyOrToken, isTestnet = false) => {
58601
58601
  const client = useMemo(() => {
58602
58602
  const key = { [name]: apiKeyOrToken };
58603
58603
  return distExports.createOffchainClient({
58604
- domainApiKeys: key
58604
+ domainApiKeys: key,
58605
+ mode: isTestnet ? "sepolia" : "mainnet"
58605
58606
  });
58606
58607
  }, [name, apiKeyOrToken]);
58607
58608
  return client;
@@ -62519,10 +62520,11 @@ const OffchainSubnameForm = ({
62519
62520
  name,
62520
62521
  label: propLabel,
62521
62522
  hideTitle = false,
62523
+ isTestnet,
62522
62524
  onCancel,
62523
62525
  onSuccess
62524
62526
  }) => {
62525
- const client = useOffchainManager(name, apiKeyOrToken);
62527
+ const client = useOffchainManager(name, apiKeyOrToken, isTestnet);
62526
62528
  const [label, setLabel] = useState(propLabel || "");
62527
62529
  const [showProfile, setShowProfile] = useState(false);
62528
62530
  const [createStep, setCreateStep] = useState("form" /* Form */);