> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getpara.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ConstructorOpts

> Options for SDK constructor

export const MethodDocs = ({name, description, parameters = [], returns, deprecated = false, since = null, async = false, static: isStatic = false, tag = null, defaultExpanded = false, preventCollapse = false, id = 'method'}) => {
  const [isExpanded, setIsExpanded] = useState(defaultExpanded || preventCollapse);
  const [isHovered, setIsHovered] = useState(false);
  const [isCopied, setIsCopied] = useState(false);
  const [hoveredParam, setHoveredParam] = useState(null);
  const [hoveredReturn, setHoveredReturn] = useState(false);
  const parseMethodName = fullName => {
    const match = fullName.match(/^([^(]+)(\()([^)]*)(\))$/);
    if (match) {
      return {
        name: match[1],
        openParen: match[2],
        params: match[3],
        closeParen: match[4]
      };
    }
    return {
      name: fullName,
      openParen: '',
      params: '',
      closeParen: ''
    };
  };
  const methodParts = parseMethodName(name);
  const handleCopy = e => {
    e.stopPropagation();
    navigator.clipboard.writeText(name);
    setIsCopied(true);
    setTimeout(() => setIsCopied(false), 2000);
  };
  return <div className={`not-prose rounded-2xl border border-gray-200 overflow-hidden transition-colors duration-200 mb-6 ${isHovered && !preventCollapse ? 'bg-gray-50' : 'bg-white'}`} onMouseEnter={() => setIsHovered(true)} onMouseLeave={() => setIsHovered(false)}>
      <button onClick={() => !preventCollapse && setIsExpanded(!isExpanded)} className={`w-full bg-transparent p-6 border-none text-left ${preventCollapse ? 'cursor-default' : 'cursor-pointer'}`}>
        <div className="flex items-start justify-between gap-4">
          <div className="flex-1 flex flex-col gap-2">
            <div className="flex items-center gap-3 flex-wrap">
              <div className="flex items-center gap-2">
                {async && <span className="px-1.5 py-0.5 text-[0.625rem] font-medium bg-purple-200 text-purple-800 rounded-lg">
                    async
                  </span>}
                {isStatic && <span className="px-1.5 py-0.5 text-[0.625rem] font-medium bg-violet-200 text-violet-900 rounded-lg">
                    static
                  </span>}
                {tag && <span className="px-1.5 py-0.5 text-[0.625rem] font-medium bg-teal-200 text-teal-800 rounded-lg">
                    {tag}
                  </span>}
              </div>
              
              <code className="text-lg font-mono font-semibold text-gray-900">
                <span>{methodParts.name}</span>
                <span className="text-gray-500 font-normal">{methodParts.openParen}</span>
                <span className="text-blue-600 font-normal">{methodParts.params}</span>
                <span className="text-gray-500 font-normal">{methodParts.closeParen}</span>
              </code>
              
              {deprecated && <span className="px-1.5 py-0.5 text-[0.625rem] font-medium bg-red-100 text-red-800 rounded-lg flex items-center gap-0.5">
                  ⚠ Deprecated
                </span>}
              {since && <span className="px-1.5 py-0.5 text-[0.625rem] font-medium bg-blue-100 text-blue-800 rounded-lg">
                  Since v{since}
                </span>}
            </div>
            
            <p className="text-sm text-gray-600 leading-6 m-0">
              {description}
            </p>
          </div>
          
          <div className="flex items-center gap-2 flex-shrink-0">
            <button onClick={handleCopy} className="p-2 bg-transparent border-none rounded-md cursor-pointer transition-colors duration-200 text-gray-500 hover:bg-gray-100" title="Copy method signature">
              {isCopied ? <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#16a34a" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
                  <polyline points="20 6 9 17 4 12"></polyline>
                </svg> : <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
                  <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
                  <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
                </svg>}
            </button>
            
            {!preventCollapse && <span className="text-gray-400">
                {isExpanded ? <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
                    <polyline points="18 15 12 9 6 15"></polyline>
                  </svg> : <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
                    <polyline points="6 9 12 15 18 9"></polyline>
                  </svg>}
              </span>}
          </div>
        </div>
      </button>

      <div className={`overflow-hidden transition-all duration-300 ease-in-out px-6 border-t border-gray-200 ${isExpanded ? 'max-h-[2000px] opacity-100 pb-6' : 'max-h-0 opacity-0 pb-0'}`}>
        {parameters.length > 0 && <div className="pt-6">
            <div className="flex items-center gap-2 mb-3">
              <h3 className="text-sm font-semibold text-gray-700 uppercase tracking-wider m-0">
                Parameters
              </h3>
              <span className="text-xs text-gray-500">({parameters.length})</span>
            </div>
            <div>
              {parameters.map((param, index) => <div key={index} className={`pl-4 border-l-2 transition-colors duration-200 ${hoveredParam === index ? 'border-gray-300' : 'border-gray-200'} ${index < parameters.length - 1 ? 'mb-3' : ''}`} onMouseEnter={() => setHoveredParam(index)} onMouseLeave={() => setHoveredParam(null)}>
                  <div className="flex items-baseline gap-2 mb-1 flex-wrap">
                    <code className="font-mono text-sm font-medium text-gray-900">
                      {param.name}
                    </code>
                    <span className="text-sm text-gray-500">:</span>
                    {param.typeLink ? <a href={param.typeLink} className="no-underline">
                        <code className="font-mono text-sm text-blue-600 bg-transparent px-1 py-0.5 rounded-md cursor-pointer transition-all duration-200 hover:bg-gray-100 hover:text-blue-700">
                          {param.type}
                        </code>
                      </a> : <code className="font-mono text-sm text-blue-600 bg-transparent px-1 py-0.5 rounded-md">
                        {param.type}
                      </code>}
                    {param.required && <span className="px-1.5 py-0.5 text-[0.625rem] font-medium bg-yellow-100 text-yellow-800 rounded-lg">
                        Required
                      </span>}
                    {param.optional && <span className="px-1.5 py-0.5 text-[0.625rem] font-medium bg-gray-100 text-gray-600 rounded-lg">
                        Optional
                      </span>}
                  </div>
                  {param.description && <p className="text-sm text-gray-600 mt-1 mb-0">
                      {param.description}
                    </p>}
                  {param.defaultValue !== undefined && <p className="text-sm text-gray-500 mt-1">
                      Default: <code className="font-mono text-[0.625rem] bg-gray-100 px-1.5 py-0.5 rounded-lg">{param.defaultValue}</code>
                    </p>}
                </div>)}
            </div>
          </div>}

        {returns && <div className={`${parameters.length > 0 ? 'mt-6' : 'pt-6'}`}>
            <h3 className="text-sm font-semibold text-gray-700 uppercase tracking-wider m-0 mb-3">
              Returns
            </h3>
            <div className={`pl-4 border-l-2 transition-colors duration-200 ${hoveredReturn ? 'border-gray-300' : 'border-gray-200'}`} onMouseEnter={() => setHoveredReturn(true)} onMouseLeave={() => setHoveredReturn(false)}>
              <div className="flex items-baseline gap-2 mb-1">
                {returns.typeLink ? <a href={returns.typeLink} className="no-underline">
                    <code className="font-mono text-sm text-blue-600 bg-transparent px-1 py-0.5 rounded cursor-pointer transition-all duration-200 hover:bg-gray-100 hover:text-blue-700">
                      {returns.type}
                    </code>
                  </a> : <code className="font-mono text-sm text-blue-600 bg-transparent px-1 py-0.5 rounded">
                    {returns.type}
                  </code>}
              </div>
              {returns.description && <p className="text-sm text-gray-600 mt-1 mb-0">
                  {returns.description}
                </p>}
            </div>
          </div>}
      </div>
    </div>;
};

<MethodDocs
  defaultExpanded={true}
  preventCollapse={true}
  name="ConstructorOpts"
  tag="Type"
  description="Options for SDK constructor."
  parameters={[
{
  name: "externalWalletConnectionOnly",
  type: "boolean",
  optional: true
},
{
  name: "useStorageOverrides",
  type: "boolean",
  optional: true
},
{
  name: "disableWorkers",
  type: "boolean",
  optional: true
},
{
  name: "offloadMPCComputationURL",
  type: "string",
  optional: true
},
{
  name: "useLocalFiles",
  type: "boolean",
  optional: true
},
{
  name: "localStorageGetItemOverride",
  type: "(key: string) => Promise<string | null>",
  optional: true
},
{
  name: "localStorageSetItemOverride",
  type: "(key: string, value: string) => Promise<void>",
  optional: true
},
{
  name: "sessionStorageGetItemOverride",
  type: "(key: string) => Promise<string | null>",
  optional: true
},
{
  name: "sessionStorageSetItemOverride",
  type: "(key: string, value: string) => Promise<void>",
  optional: true
},
{
  name: "sessionStorageRemoveItemOverride",
  type: "(key: string) => Promise<void>",
  optional: true
},
{
  name: "clearStorageOverride",
  type: "() => Promise<void>",
  optional: true
},
{
  name: "portalBackgroundColor",
  type: "string",
  optional: true,
  description: "Hex color to use in the portal for the background color. Deprecated: use portalTheme instead."
},
{
  name: "portalPrimaryButtonColor",
  type: "string",
  optional: true,
  description: "Hex color to use in the portal for the primary button. Deprecated: use portalTheme instead."
},
{
  name: "portalTextColor",
  type: "string",
  optional: true,
  description: "Hex text color to use in the portal. Deprecated: use portalTheme instead."
},
{
  name: "portalPrimaryButtonTextColor",
  type: "string",
  optional: true,
  description: "Hex color to use in the portal for the primary button text. Deprecated: use portalTheme instead."
},
{
  name: "portalTheme",
  type: "Theme",
  typeLink: "/v2/references/types/theme",
  optional: true,
  description: "Theme to use for the portal. Deprecated: configure theming through the developer portal."
},
{
  name: "useDKLSForCreation",
  type: "boolean",
  optional: true
},
{
  name: "disableWebSockets",
  type: "boolean",
  optional: true,
  description: "Set to `true` for non-Node.js runtimes (Bun, Deno, Cloudflare Workers). These runtimes have incompatible WebSocket implementations, so the SDK falls back to HTTP polling. Required for server-side signing in these environments."
},
{
  name: "wasmOverride",
  type: "ArrayBuffer",
  optional: true
},
{
  name: "emailTheme",
  type: "EmailTheme",
  typeLink: "/v2/references/types/emailtheme",
  optional: true,
  description: "Base theme for the emails sent from this Para instance. Default: dark. Deprecated: configure theming through the developer portal."
},
{
  name: "emailPrimaryColor",
  type: "string",
  optional: true,
  description: "Hex color to use as the primary color in the emails. Default: #FE452B. Deprecated: configure theming through the developer portal."
},
{
  name: "linkedinUrl",
  type: "string",
  optional: true,
  description: "Linkedin URL to link to in the emails. Deprecated: configure this through the developer portal."
},
{
  name: "githubUrl",
  type: "string",
  optional: true,
  description: "Github URL to link to in the emails. Deprecated: configure this through the developer portal."
},
{
  name: "xUrl",
  type: "string",
  optional: true,
  description: "X (Twitter) URL to link to in the emails. Deprecated: configure this through the developer portal."
},
{
  name: "supportUrl",
  type: "string",
  optional: true,
  description: "Support URL to link to in the emails. Deprecated: homepageUrl will be used for this, configure it through the developer portal."
},
{
  name: "homepageUrl",
  type: "string",
  optional: true,
  description: "URL for your home landing page. Deprecated: configure this through the developer portal."
},
{
  name: "useSessionStorage",
  type: "boolean",
  optional: true,
  description: "If `true`, the SDK will use the device's temporary session storage instead of saving user and wallet data to local storage."
},
{
  name: "portalPartnerId",
  type: "string",
  optional: true,
  description: "Partner ID set in the Para Portal to track analytics for legacy SDK versions."
},
{
  name: "fetchPregenWalletsOverride",
  type: "(opts: { pregenId: PregenAuth }) => Promise<{ userShare?: string }>",
  optional: true,
  description: "An optional function that fetches the pregenerated wallets for a given identifier so a user can claim them on account creation."
},
{
  name: "enableDebugLogs",
  type: "boolean",
  optional: true,
  description: "If `true`, enables verbose logging for debugging purposes. This will output additional internal SDK operations to the console. Default: false."
}
]}
/>
