Add 7 missing SDK methods and document all exports

- Add listAgents, unfreezeAgent, deleteAgent, getMe, issueApiToken, downloadExport, health methods
- Add corresponding response types to types.ts
- Export new types from index.ts
- Document all previously undocumented exports in README

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 4.6 committed 2026-03-01 15:53:50 -05:00
1 parent 8a2e34eac2
commit cb7a6320d5
4 files changed
+141

No files matched your search

+47
View File
@@ -99,6 +99,12 @@ const auth = await ElydoraClient.login(baseUrl, email, password);
// Set token on client
client.setToken(auth.token);
// Get current authenticated user profile
const { user } = await client.getMe();
// Issue a new API token (with optional TTL in seconds)
const { token, expires_at } = await client.issueApiToken(3600);
```
### Operations
@@ -141,6 +147,15 @@ await client.freezeAgent(agentId, 'security review');
// Revoke a key
await client.revokeKey(agentId, kid, 'key rotation');
// List all agents in the organization
const { agents } = await client.listAgents();
// Unfreeze a previously frozen agent
await client.unfreezeAgent(agentId, 'review complete');
// Delete an agent permanently
const { deleted } = await client.deleteAgent(agentId);
```
### Audit
@@ -173,6 +188,9 @@ const { export: exp } = await client.createExport({
const { exports } = await client.listExports();
const { export: detail, download_url } = await client.getExport(exportId);
// Download export file data
const data = await client.downloadExport(exportId);
```
### JWKS
@@ -181,6 +199,24 @@ const { export: detail, download_url } = await client.getExport(exportId);
const { keys } = await client.getJWKS();
```
### Health
```typescript
// Check API health (no authentication required)
const health = await client.health();
// health.status, health.version, health.protocol_version, health.timestamp
```
### Client State
```typescript
// Get the current chain hash (useful for debugging/inspection)
const chainHash = client.getChainHash();
// Get the Ed25519 public key derived from the configured private key
const publicKey = client.getPublicKey();
```
### Crypto Utilities
The SDK exports low-level cryptographic primitives for advanced use:
@@ -197,6 +233,17 @@ import {
} from '@elydora/sdk';
```
### Utility Functions
```typescript
import {
uuidv7, // Generate a UUIDv7 (time-ordered, RFC 9562)
generateNonce, // Generate a 16-byte random nonce (base64url)
base64urlEncode, // Encode Buffer/Uint8Array to base64url (no padding)
base64urlDecode, // Decode base64url string to Buffer
} from '@elydora/sdk';
```
## Error Handling
```typescript