UNPKG

@0xsequence/connect

Version:
34 lines 1.03 kB
/** * Hook to directly connect to an ecosystem wallet with email * * @returns A function that triggers the ecosystem wallet connection * @throws {Error} If the ecosystem wallet connector is not found among available connectors * * The returned function accepts: * - `auxData` (optional) - Additional data to pass to the ecosystem connector during connection * * @example * ```tsx * const triggerConnect = useDirectEcosystemConnect() * * // Connect without auxiliary data * await triggerConnect() * * // Connect with auxiliary data * await triggerConnect({ * someKey: 'someValue', * anotherKey: 123 * }) * * // Handle connection errors * try { * await triggerConnect() * } catch (error) { * if (error.message === 'Ecosystem wallet connector not found') { * console.error('Ecosystem wallet is not configured') * } * } * ``` */ export declare const useDirectEcosystemConnect: () => (auxData?: Record<string, unknown>) => Promise<void>; //# sourceMappingURL=useDirectEcosystemConnect.d.ts.map