import { CSSProperties, ReactNode } from "react"; import * as _renown_sdk0 from "@renown/sdk"; import { CREDENTIAL_SCHEMA_EIP712_TYPE, CREDENTIAL_SUBJECT_TYPE, CREDENTIAL_TYPES, DOMAIN_TYPE, IRenown, ISSUER_TYPE, LoginStatus, User, VERIFIABLE_CREDENTIAL_EIP712_TYPE } from "@renown/sdk"; import * as react_jsx_runtime0 from "react/jsx-runtime"; //#region src/renown/use-renown-auth.d.ts type RenownAuthStatus = LoginStatus | "loading"; interface RenownAuth { status: RenownAuthStatus | undefined; user: User | undefined; address: string | undefined; ensName: string | undefined; avatarUrl: string | undefined; profileId: string | undefined; displayName: string | undefined; displayAddress: string | undefined; login: () => void; logout: () => Promise; openProfile: () => void; } declare function useRenownAuth(): RenownAuth; //#endregion //#region src/renown/utils.d.ts declare function openRenown(documentId?: string): void; /** * Log in the user. Resolves the user DID from (in order): * 1. Explicit `userDid` argument * 2. `?user=` URL parameter (from Renown portal redirect) * 3. Previously stored session in the Renown instance */ declare function login(userDid: string | undefined, renown: IRenown | undefined): Promise; declare function logout(): Promise; //#endregion //#region src/renown/components/RenownAuthButton.d.ts interface RenownAuthButtonProps { className?: string; darkMode?: boolean; loginContent?: ReactNode; userContent?: ReactNode; loadingContent?: ReactNode; children?: (auth: RenownAuth) => ReactNode; } declare function RenownAuthButton({ className, darkMode, loginContent, userContent, loadingContent, children }: RenownAuthButtonProps): react_jsx_runtime0.JSX.Element; //#endregion //#region src/renown/components/RenownLoginButton.d.ts interface RenownLoginButtonProps { onLogin?: () => void; darkMode?: boolean; style?: CSSProperties; className?: string; asChild?: boolean; children?: ReactNode; } declare function RenownLoginButton({ onLogin: onLoginProp, darkMode, style, className, asChild, children }: RenownLoginButtonProps): react_jsx_runtime0.JSX.Element; //#endregion //#region src/renown/components/RenownUserButton.d.ts interface RenownUserButtonMenuItem { label: string; icon?: ReactNode; onClick: () => void; style?: CSSProperties; } interface RenownUserButtonProps { address?: string; username?: string; avatarUrl?: string; userId?: string; onDisconnect?: () => void; style?: CSSProperties; className?: string; asChild?: boolean; children?: ReactNode; menuItems?: RenownUserButtonMenuItem[]; } declare function RenownUserButton({ address: addressProp, username: usernameProp, avatarUrl: avatarUrlProp, userId: userIdProp, onDisconnect: onDisconnectProp, style, className, asChild, children, menuItems }: RenownUserButtonProps): react_jsx_runtime0.JSX.Element; //#endregion //#region src/renown/components/icons.d.ts interface IconProps { size?: number; width?: number; height?: number; color?: string; style?: CSSProperties; className?: string; } interface RenownLogoProps extends IconProps { hovered?: boolean; } declare function RenownLogo({ width, height, hovered, color, className }: RenownLogoProps): react_jsx_runtime0.JSX.Element; declare function CopyIcon({ size, color }: IconProps): react_jsx_runtime0.JSX.Element; declare function DisconnectIcon({ size, color }: IconProps): react_jsx_runtime0.JSX.Element; declare function SpinnerIcon({ size, color }: IconProps): react_jsx_runtime0.JSX.Element; declare function ChevronDownIcon({ size, color, style }: IconProps): react_jsx_runtime0.JSX.Element; declare function UserIcon({ size, color }: IconProps): react_jsx_runtime0.JSX.Element; //#endregion //#region src/renown/crypto.d.ts /** * @deprecated Use {@link initRenownCrypto} instead * * Initialize ConnectCrypto * @returns ConnectCrypto instance */ declare function initConnectCrypto(): Promise<_renown_sdk0.RenownCrypto>; /** * Initialize RenownCrypto * @returns RenownCrypto instance */ declare function initRenownCrypto(): Promise<_renown_sdk0.RenownCrypto>; //#endregion //#region src/renown/constants.d.ts declare const RENOWN_URL = "https://www.renown.id"; declare const RENOWN_NETWORK_ID = "eip155"; declare const RENOWN_CHAIN_ID = "1"; //#endregion //#region src/renown/use-renown-init.d.ts interface RenownInitOptions { appName: string; /** * Prefix for localStorage keys, allowing multiple apps * to use Renown on the same domain without conflicts. */ namespace?: string; url?: string; } /** * Hook that initializes the Renown SDK. * Call once at the top of your app. Options are read only on first mount. * Returns a promise that resolves with the Renown instance. * * @example * ```tsx * function App() { * const renownPromise = useRenownInit({ appName: "my-app" }); * return ; * } * ``` */ declare function useRenownInit({ appName, namespace, url }: RenownInitOptions): Promise; //#endregion //#region src/renown/renown-init.d.ts interface RenownProps extends RenownInitOptions { onError?: (error: unknown) => void; } /** * Side-effect component that initializes the Renown SDK. * Renders nothing — place it alongside your app tree. * * @example * ```tsx * function App() { * return ( * <> * * * * ); * } * ``` */ declare function Renown({ onError, ...initOptions }: RenownProps): null; //#endregion export { logout as A, RenownUserButtonMenuItem as C, RenownAuthButton as D, RenownLoginButtonProps as E, RenownAuth as M, RenownAuthStatus as N, RenownAuthButtonProps as O, useRenownAuth as P, RenownUserButton as S, RenownLoginButton as T, CopyIcon as _, CREDENTIAL_SCHEMA_EIP712_TYPE as a, SpinnerIcon as b, DOMAIN_TYPE as c, RENOWN_NETWORK_ID as d, RENOWN_URL as f, ChevronDownIcon as g, initRenownCrypto as h, useRenownInit as i, openRenown as j, login as k, ISSUER_TYPE as l, initConnectCrypto as m, RenownProps as n, CREDENTIAL_SUBJECT_TYPE as o, VERIFIABLE_CREDENTIAL_EIP712_TYPE as p, RenownInitOptions as r, CREDENTIAL_TYPES as s, Renown as t, RENOWN_CHAIN_ID as u, DisconnectIcon as v, RenownUserButtonProps as w, UserIcon as x, RenownLogo as y }; //# sourceMappingURL=index-Bz4MqX_j.d.ts.map