@zolvency/sdk
v0.1.6
Published
Official Zolvency SDK for Decentralized ZK-Identity and Sovereign Proofs.
Downloads
668
Maintainers
Readme
Zolvency SDK
The official SDK for integrating Zolvency ZK-Identity and Sovereign Proofs into your application.
Installation
npm install @zolvency/sdkQuick Start (React / Next.js)
1. Wrap your app with the Provider
import { ZolvencyProvider } from '@zolvency/sdk';
function App({ children }) {
return (
<ZolvencyProvider>
{children}
</ZolvencyProvider>
);
}2. Use the Verification Button
import { ZolvencyButton } from '@zolvency/sdk';
export function VerifyGitHub() {
return (
<ZolvencyButton
userId="user_123"
clientId="your_project_id"
verifyOptions={{ provider: 'github' }}
onResult={(res) => console.log("Verified!", res)}
>
Verify identity with Zolvency
</ZolvencyButton>
);
}3. Access Session Data
import { useZolvency } from '@zolvency/sdk';
function Profile() {
const { sessionData, isAuthenticated } = useZolvency();
if (isAuthenticated) {
return <div>Welcome, {sessionData.claims.username}</div>;
}
}Server-side (Next.js API Routes)
import { ZolvencyServer } from '@zolvency/sdk/server';
export async function POST(req: Request) {
return ZolvencyServer.proxyRequest(req, 'onboard');
}Features
- Privacy-First: User data never leaves the ZK-Proof environment.
- Ultra-Compact UI: 350x350px square modal for a seamless experience.
- Cross-Chain Ready: Identity anchored on the Stellar network.
- Agnostic: Works with any ZK-Proof provider (GitHub, LinkedIn, Gov.br, etc).
License
MIT © Zolvency
