API Reference
Components
ZkEmailSDKProvider
Prop
Type
Description
import { ZkEmailSDKProvider } from "@zk-email/zk-email-sdk";
function App() {
return (
<ZkEmailSDKProvider
clientId={import.meta.env.VITE_GOOGLE_OAUTH_CLIENT_ID}
zkEmailSDKRegistryUrl='https://registry-dev.zkregex.com'
>
{/* Your app components */}
</ZkEmailSDKProvider>
);
}
export default App;// src/app/providers.tsx
'use client'
import { ZkEmailSDKProvider } from "@zk-email/zk-email-sdk";
export function Providers({ children }: { children: React.ReactNode }) {
return (
<ZkEmailSDKProvider
clientId={process.env.NEXT_PUBLIC_GOOGLE_OAUTH_CLIENT_ID}
zkEmailSDKRegistryUrl='https://registry-dev.zkregex.com'
>
{children}
</ZkEmailSDKProvider>
);
}// src/app/layout.tsx
import { Providers } from './providers'
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>
<Providers>{children}</Providers>
</body>
</html>
)
}GoogleAuthProvider
Prop
Type
Description
Hooks
useZkEmailSDK
Property
Type
Description
useGoogleAuth
Property
Type
Description
Utility Functions
fetchEmailList, fetchEmailsRaw, fetchProfile
Last updated