Using ZKS IDs
ZKS IDs are human-readable identifiers that serve as your primary identity in the ZKScore ecosystem. Instead of using long wallet addresses, you can use memorable names likealice.zks or defi-master.zks.
What is a ZKS ID?
A ZKS ID is a unique, human-readable identifier that:- Ends with
.zkssuffix (e.g.,alice.zks) - Maps to your primary wallet address
- Becomes soulbound (non-transferable) after activation
- Can be used across all ZKScore APIs and SDKs
Benefits
1. User-Friendly
2. Privacy Layer
Your ZKS ID acts as a privacy layer, keeping your wallet address private while maintaining your identity.3. Cross-Platform
Use the same ZKS ID across:- ZKScore Explorer
- Third-party integrations
- DeFi protocols
- NFT marketplaces
4. Memorable
Easy to share, remember, and communicate.Getting Started
Step 1: Mint Your Identity
Step 2: Activate Your Identity
Step 3: Use Your ZKS ID
Using ZKS IDs in APIs
Identity Endpoints
Score Endpoints
Achievement Endpoints
Using ZKS IDs in SDK
JavaScript/TypeScript
React
Requirements
For Using ZKS ID as Parameter
To use a ZKS ID as a parameter in API calls or SDK methods, it must be:- Minted: The identity must exist on-chain
- Activated: The identity must be soulbound (activated)
- Valid Format: Must match
^[a-z0-9-]+\.zks$
Validation Rules
✅ Valid ZKS IDs:alice.zksdefi-master.zksuser123.zksmy-identity.zks
alice(missing .zks suffix)Alice.zks(uppercase not allowed)-alice.zks(cannot start with hyphen)alice-.zks(cannot end with hyphen)al.zks(too short, minimum 3 characters)
Best Practices
1. Choose a Memorable Name
2. Activate Immediately
3. Use Consistently
4. Handle Errors Gracefully
Migration Guide
From Wallet Addresses to ZKS IDs
If you’re currently using wallet addresses, here’s how to migrate: Before:Update Your UI
Advanced Usage
Resolving ZKS IDs
Caching
The SDK caches ZKS ID resolutions for 5 minutes to improve performance:Multiple Wallets (Future)
In the future, ZKS IDs will support multiple linked wallets:Troubleshooting
”Identity not found”
Cause: The ZKS ID hasn’t been minted yet. Solution: Mint the identity first:“Identity must be activated”
Cause: The identity exists but hasn’t been activated (made soulbound). Solution: Activate the identity:“Invalid ZKS ID format”
Cause: The ZKS ID doesn’t match the required format. Solution: Ensure your ZKS ID:- Is 3-32 characters long (excluding .zks)
- Contains only lowercase letters, numbers, and hyphens
- Starts and ends with a letter or number
- Ends with .zks suffix
FAQs
Can I change my ZKS ID?
No, ZKS IDs are soulbound and cannot be transferred or changed after activation.Can I have multiple ZKS IDs?
Yes, you can mint multiple ZKS IDs, but each wallet can only have one primary ZKS ID.What happens to my old wallet address?
Your wallet address still works! All APIs and SDKs support both ZKS IDs and wallet addresses.Is my ZKS ID private?
ZKS IDs are public identifiers, but they provide a privacy layer by not directly exposing your wallet address.Can I use ZKS IDs on other platforms?
Yes! ZKS IDs are on-chain and can be used by any platform that integrates with ZKScore.Examples
Complete Integration Example
React Component Example
Next Steps
- API Reference - Complete API documentation
- SDK Documentation - JavaScript SDK guide
- React SDK - React integration guide
- Smart Contracts - On-chain identity contracts
Support
Need help with ZKS IDs?- Discord: Join our community
- Email: support@onzks.com
- Documentation: docs.onzks.com