Overview
The@timeback/clr package provides a client for the CLR v2.0 API, enabling:
- Credentials: Upsert verifiable CLR credentials with platform-signed proofs
- Discovery: Retrieve API capabilities via the OpenAPI discovery endpoint
Installation
Quick Start
Credentials
Create or update verifiable CLR credentials. The platform digitally signs each credential, adding a cryptographic proof to ensure authenticity and integrity. Inputs are validated with Zod schemas before requests.| Method | Returns | Description |
|---|---|---|
upsert() | ClrCredential | Create or update a credential; returns signed result |
Credential Structure
A CLR credential follows the W3C Verifiable Credentials v2 model:| Field | Type | Description |
|---|---|---|
@context | string[] | JSON-LD context URIs |
id | string | Unique credential identifier (URN/URI) |
type | string[] | Must include VerifiableCredential |
issuer | ClrProfile | Issuing organization profile |
name | string | Human-readable credential name |
validFrom | string | ISO 8601 date when credential is valid |
credentialSubject | ClrCredentialSubject | Subject with nested achievements |
Discovery
Retrieve API capabilities and the OpenAPI specification.| Method | Returns | Description |
|---|---|---|
get() | DiscoveryResponse | OpenAPI 3.0 spec for the CLR v2 API |
The CLR v2.0 spec declares the discovery endpoint as public, but the BeyondAI implementation
requires OAuth authentication. The client handles this transparently.
Standalone vs Composed
The client works standalone or composed into@timeback/core:
Error Handling
Configuration
Next Steps
CASE
Competencies and standards
Caliper
Learning event tracking
Types
CLR type definitions