Skip to main content

Overview

The ZKScore JavaScript SDK provides a comprehensive interface for interacting with the ZKScore platform. It supports identity management, score queries, achievement tracking, and real-time updates with built-in caching and error handling.
The SDK automatically handles ZKS ID resolution, so you can use either ZKS IDs (like alice.zks) or wallet addresses in your application. The SDK will resolve them to the appropriate format.

Installation

Install the ZKScore JavaScript SDK using npm or yarn:

Quick Start

1. Basic Setup

2. Environment Configuration

3. First API Call

Configuration Options

SDK Configuration

Core Features

1. Identity Management

2. Score Queries

3. Achievement System

4. Real-time Updates

Error Handling

1. Basic Error Handling

2. Advanced Error Handling

Caching

1. Cache Configuration

2. Custom Cache Implementation

TypeScript Support

1. Type Definitions

2. Custom Types

Best Practices

1. Environment Variables

2. Singleton Pattern

3. Connection Pooling

4. Monitoring and Logging

Troubleshooting

Common Issues

1. “Invalid API Key” Error
2. “Network Error” Issues
3. “Rate Limit Exceeded” Error

Support

For additional help: