### Quick Start Source: https://docs.learncard.com/sdks/embed-sdk A simple example demonstrating how to integrate the LearnCard claim button into a webpage. ```APIDOC ## Quick Start ```html
``` Clicking the rendered button opens the claim modal. The user enters their email, receives an OTP, and accepts the credential into their LearnCard wallet. ``` -------------------------------- ### Clone and Setup Simple Signing Service Source: https://docs.learncard.com/how-to-guides/deploy-infrastructure/signing-authority Clone the LearnCard repository and set up the `simple-signing-service` which will act as your Signing Authority on AWS. Ensure Node.js (v16+) and pnpm are installed. ```bash git clone https://github.com/learningeconomy/LearnCard.git cd services/learn-card-network/simple-signing-service pnpm install ``` -------------------------------- ### Install LearnCard Wallet SDK Source: https://docs.learncard.com/quick-start/setup-and-prerequisites Commands to install the @learncard/init package using various package managers. ```bash # Using npm npm install @learncard/init # Using yarn yarn add @learncard/init # Using pnpm pnpm add @learncard/init ``` -------------------------------- ### Install LearnCard SDK with pnpm Source: https://docs.learncard.com/sdks/learncard-core Install the LearnCard SDK using pnpm. ```bash pnpm i @learncard/init ``` -------------------------------- ### Install LearnCard SDK with npm Source: https://docs.learncard.com/sdks/learncard-core Install the LearnCard SDK using npm. ```bash npm i @learncard/init ``` -------------------------------- ### Installation Source: https://docs.learncard.com/sdks/embed-sdk Instructions on how to install the LearnCard Embed SDK using npm, CDN, or ESM. ```APIDOC ## Installation ### npm ```bash npm install @learncard/embed-sdk ``` ### CDN (IIFE) ```html ``` ### ESM ```js import { init } from '@learncard/embed-sdk'; ``` ``` -------------------------------- ### Install LearnCard SDK with yarn Source: https://docs.learncard.com/sdks/learncard-core Install the LearnCard SDK using yarn. ```bash yarn add @learncard/init ``` -------------------------------- ### Install LearnCard Packages Source: https://docs.learncard.com/how-to-guides/implement-flows/chapi/demo-application Install the necessary LearnCard packages for wallet initialization and CHAPI integration using pnpm. ```bash pnpm i @learncard/init @learncard/types @learncard/chapi-plugin ``` -------------------------------- ### Install Auth Types Source: https://docs.learncard.com/sdks/auth-types Install the package containing the authentication interfaces. ```bash pnpm add @learncard/types ``` -------------------------------- ### Install LearnCard SDK Source: https://docs.learncard.com/core-concepts/credentials-and-data/getting-started-with-boosts Use this command to install the necessary LearnCard initialization package in your Node.js project. ```bash npm install @learncard/init ``` -------------------------------- ### Quick Start: Initialize Embed SDK Source: https://docs.learncard.com/sdks/embed-sdk Initialize the LearnCard Embed SDK by providing your publishable key, a target element for the button, credential details, and your partner name. This setup renders the claim button and initiates the credential flow upon user interaction. ```html
``` -------------------------------- ### Install @learncard/react Source: https://docs.learncard.com/how-to-guides/implement-flows/chapi/demo-application Install the @learncard/react package using pnpm to use its components. ```bash pnpm i @learncard/react ``` -------------------------------- ### Initialize LearnCard and Install CHAPI Handler Source: https://docs.learncard.com/how-to-guides/implement-flows/chapi/cheat-sheets/wallets Initializes LearnCard and installs the CHAPI handler. This is typically the first step in setting up a wallet. ```typescript import { initLearnCard } from '@learncard/init'; const learnCard = await initLearnCard(); await learnCard.invoke.installChapiHandler(); ``` -------------------------------- ### Start Development Server Source: https://docs.learncard.com/how-to-guides/implement-flows/chapi/demo-application Run this command in the terminal to start the local development server for the project. ```bash pnpm dev ``` -------------------------------- ### Install SSS Key Manager Source: https://docs.learncard.com/sdks/sss-key-manager Install the @learncard/sss-key-manager package using pnpm. ```bash pnpm add @learncard/sss-key-manager ``` -------------------------------- ### Build and Run Embed Example Locally Source: https://docs.learncard.com/how-to-guides/connect-systems/embed-a-claim-button Commands to build the LearnCard embed SDK and run the local development server for the embed example. ```bash # From repo root pnpm --filter @learncard/embed-sdk build cd examples/embed-example && pnpm dev ``` -------------------------------- ### Install the LearnCard SDK Source: https://docs.learncard.com/how-to-guides/connect-systems/embed-a-claim-button Choose between using a CDN script tag or installing via npm for your project. ```html ``` ```bash npm install @learncard/embed-sdk ``` ```js import { init } from '@learncard/embed-sdk'; ``` -------------------------------- ### Install LearnCard Network Plugin Source: https://docs.learncard.com/sdks/learncard-network/authentication Install the required package to enable network functionality. ```bash pnpm install @learncard/network-plugin ``` -------------------------------- ### Install dependencies Source: https://docs.learncard.com/development/contributing Installs all required project dependencies using pnpm. ```bash pnpm install ``` -------------------------------- ### Verify Package Installation Source: https://docs.learncard.com/sdks/learncard-core/troubleshooting-guide Check if LearnCard packages are correctly installed in your project. ```bash npm list @learncard/core @learncard/init # or for pnpm pnpm list @learncard/core @learncard/init ``` -------------------------------- ### Install LearnCloud Storage Plugin Source: https://docs.learncard.com/sdks/learncloud-storage-api/authentication Install the LearnCloud Storage Plugin using pnpm. This package handles authentication automatically. ```bash pnpm install @learncard/learn-cloud-plugin ``` -------------------------------- ### Registry File Structure Example Source: https://docs.learncard.com/how-to-guides/verify-my-issuer Examples showing the placement of new entries within the registry object, including necessary comma placement. ```json { "meta": { ... }, "registry": { "did:web:existing.org": { "name": "Existing Org", "location": "Some City, Country", "url": "https://existing.org/" } // <--- Add your entry after this, so add a comma above } } ``` ```json { "meta": { ... }, "registry": { "did:web:existing.org": { "name": "Existing Org", "location": "Some City, Country", "url": "https://existing.org/" }, // <--- Added comma here "did:web:yourneworg.com": { // <--- Your new entry "name": "My New Organization", "location": "New City, New Country", "url": "https://yourneworg.com/" } } } ``` -------------------------------- ### Install LearnCard dependencies Source: https://docs.learncard.com/how-to-guides/deploy-infrastructure/the-simplest-plugin Install the core LearnCard packages required for plugin development. ```bash pnpm i @learncard/core @learncard/init ``` ```bash yarn add @learncard/core @learncard/init ``` ```bash npm i @learncard/core @learncard/init ``` -------------------------------- ### Install LearnCard SDK Packages Source: https://docs.learncard.com/how-to-guides/deploy-infrastructure/signing-authority Install necessary LearnCard SDK packages for the Owner's side of the tutorial. Supports npm, pnpm, and yarn. ```bash # In a new project folder for this tutorial's main script (Owner's side) npm install @learncard/init @learncard/simple-signing-plugin # or pnpm/yarn ``` -------------------------------- ### Install LearnCard Dependencies Source: https://docs.learncard.com/quick-start/your-first-integration Install the required LearnCard plugins and environment configuration tools using your preferred package manager. ```bash # Using npm npm install @learncard/init @learncard/claimable-boosts-plugin @learncard/simple-signing-plugin dotenv # Using yarn yarn add @learncard/init @learncard/claimable-boosts-plugin @learncard/simple-signing-plugin dotenv # Using pnpm pnpm add @learncard/init @learncard/claimable-boosts-plugin @learncard/simple-signing-plugin dotenv ``` -------------------------------- ### Install Partner Connect SDK with npm Source: https://docs.learncard.com/how-to-guides/connect-systems/connect-an-embedded-app Use npm to install the Partner Connect SDK for your embedded LearnCard application. ```bash npm install @learncard/partner-connect ``` -------------------------------- ### Complete Embedded App Example Source: https://docs.learncard.com/how-to-guides/connect-systems/connect-an-embedded-app This HTML and JavaScript example shows a full integration of the Partner Connect SDK, including requesting user identity and sending a quiz completion credential. ```html Quiz App

JavaScript Quiz

``` -------------------------------- ### GET /boost Source: https://docs.learncard.com/sdks/learncard-network/boosts Retrieves metadata about a specific boost using its URI. ```APIDOC ## GET /boost ### Description This endpoint gets metadata about a boost. ### Method GET ### Endpoint /boost ### Parameters #### Query Parameters - **uri** (string) - Required - The URI of the boost to retrieve. ### Response #### Success Response (200) - **name** (string) - The name of the boost. - **type** (string) - The type of the boost. - **category** (string) - The category of the boost. - **status** (string) - The status of the boost (DRAFT, PROVISIONAL, LIVE). - **autoConnectRecipients** (boolean) - Whether to auto-connect recipients. - **meta** (object) - Additional metadata. - **defaultPermissions** (object) - Default permissions for the boost. - **allowAnyoneToCreateChildren** (boolean) - Whether anyone can create children. - **claimPermissions** (object) - Permissions for claiming the boost. ``` -------------------------------- ### GET /records Source: https://docs.learncard.com/sdks/learncard-network/boosts Retrieves a list of records from the LearnCard system. ```APIDOC ## GET /records ### Description Retrieves a paginated list of records. ### Method GET ### Endpoint /records ### Response #### Success Response (200) - **hasMore** (boolean) - Indicates if there are more records available. - **records** (array) - List of record objects. #### Record Object Schema - **id** (string) - Required - Unique identifier. - **name** (string) - Required - Name of the record. - **description** (string) - Optional - Description of the record. - **image** (string) - Optional - Image URL. - **sourceURI** (string) - Optional - URI of the source. - **isPublic** (boolean) - Required - Visibility status. - **status** (string) - Required - Status of the record (active or archived). - **createdAt** (string) - Optional - Creation timestamp. - **updatedAt** (string) - Optional - Last update timestamp. ### Response Example { "hasMore": false, "records": [ { "id": "123", "name": "Example Record", "isPublic": false, "status": "active" } ] } ``` -------------------------------- ### GET /uri Source: https://docs.learncard.com/sdks/learncard-network/boosts Retrieves information based on the provided URI. ```APIDOC ## GET /uri ### Description Retrieves a numeric value associated with the provided URI. ### Method GET ### Endpoint /uri ### Parameters #### Query Parameters - **uri** (string) - Required - The URI to query. ### Response #### Success Response (200) - **value** (number) - The numeric result of the request. #### Error Responses - **400** - Invalid input data - **401** - Authorization not provided - **403** - Insufficient access - **500** - Internal server error ``` -------------------------------- ### GET /boost/skills/available Source: https://docs.learncard.com/sdks/learncard-network/boosts Retrieves a list of available skills for a given boost. This endpoint requires boost administrator privileges and fetches skills from the boost's associated frameworks or their ancestors. ```APIDOC ## GET /boost/skills/available ### Description Returns skills from frameworks attached to the boost or any of its ancestors. Requires boost admin. ### Method GET ### Endpoint /boost/skills/available ### Parameters #### Query Parameters - **uri** (string) - Required - The URI of the boost to retrieve skills for. ### Responses #### Success Response (200) - **framework** (object) - Information about the framework. - **id** (string) - The unique identifier of the framework. - **name** (string) - The name of the framework. - **description** (string) - A description of the framework. - **image** (string) - URL of the framework's image. - **sourceURI** (string) - The source URI of the framework. - **isPublic** (boolean) - Indicates if the framework is public. - **status** (string) - The status of the framework (active or archived). - **createdAt** (string) - The timestamp when the framework was created. - **updatedAt** (string) - The timestamp when the framework was last updated. - **skills** (array) - A list of skills associated with the framework. - **id** (string) - The unique identifier of the skill. - **statement** (string) - The statement or question of the skill. - **description** (string) - A description of the skill. - **code** (string) - A code or identifier for the skill. - **icon** (string) - URL of the skill's icon. - **type** (string) - The type of the skill (e.g., 'skill'). - **status** (string) - The status of the skill (active or archived). - **frameworkId** (string) - The ID of the framework this skill belongs to. #### Error Response (400) - **message** (string) - The error message. - **code** (string) - The error code. - **issues** (array) - An array of issues that caused the error. #### Error Response (401) - **message** (string) - The error message. - **code** (string) - The error code. - **issues** (array) - An array of issues that caused the error. #### Error Response (403) - **message** (string) - The error message. - **code** (string) - The error code. - **issues** (array) - An array of issues that caused the error. #### Error Response (404) - **message** (string) - The error message. - **code** (string) - The error code. - **issues** (array) - An array of issues that caused the error. #### Error Response (500) - **message** (string) - The error message. - **code** (string) - The error code. - **issues** (array) - An array of issues that caused the error. ### Request Example (No request body for GET requests) ### Response Example (200) { "framework": { "id": "framework-123", "name": "Example Framework", "description": "This is an example framework.", "image": "http://example.com/image.png", "sourceURI": "http://example.com/source", "isPublic": true, "status": "active", "createdAt": "2023-10-27T10:00:00Z", "updatedAt": "2023-10-27T10:00:00Z" }, "skills": [ { "id": "skill-abc", "statement": "What is the capital of France?", "description": "A basic geography question.", "code": "GEO-001", "icon": "http://example.com/icon.png", "type": "skill", "status": "active", "frameworkId": "framework-123" } ] } ``` -------------------------------- ### Get OBv3 alignments for a boost Source: https://docs.learncard.com/sdks/learncard-network/boosts Returns OBv3 alignment entries based on the boost's linked framework and aligned skills. Requires issue permission. Use this endpoint to fetch alignment data for a specific boost. ```json {"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Boosts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.NOT_FOUND":{"title":"Not found error (404)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/boost/alignments":{"get":{"operationId":"boost-getBoostAlignments","summary":"Get OBv3 alignments for a boost","description":"Returns OBv3 alignment entries based on the boost's linked framework and aligned skills. Requires issue permission.","tags":["Boosts"],"parameters":[{"in":"query","name":"uri","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"targetCode":{"type":"string"},"targetName":{"type":"string"},"targetDescription":{"type":"string"},"targetUrl":{"type":"string"},"targetFramework":{"type":"string"}},"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}} ``` -------------------------------- ### Complete Implementation Example Source: https://docs.learncard.com/how-to-guides/connect-systems/embed-a-claim-button A full HTML document demonstrating the integration of the LearnCard SDK with a success message display. ```html Course Complete

Congratulations! You finished the course.

Claim your credential to add it to your LearnCard wallet.

``` -------------------------------- ### GET /boost/skills Source: https://docs.learncard.com/sdks/learncard-network/boosts Retrieves skills aligned to a boost, including proficiency levels. ```APIDOC ## GET /boost/skills ### Description Returns skills aligned to a boost via ALIGNED_TO, including proficiencyLevel stored on the relationship. ### Method GET ### Endpoint /boost/skills ### Parameters #### Query Parameters - **uri** (string) - Required - The unique identifier for the boost. ### Response #### Success Response (200) - **id** (string) - The unique identifier of the skill. - **statement** (string) - The statement or name of the skill. - **description** (string) - A detailed description of the skill. - **code** (string) - A code or identifier for the skill. - **icon** (string) - A URL or identifier for the skill's icon. - **type** (string) - The type of the skill (defaults to 'skill'). - **status** (string) - The status of the skill (e.g., 'active', 'archived', defaults to 'active'). - **frameworkId** (string) - The identifier of the framework the skill belongs to. - **createdAt** (string) - The timestamp when the skill was created. - **updatedAt** (string) - The timestamp when the skill was last updated. - **proficiencyLevel** (number) - The user's proficiency level in this skill. #### Response Example ```json [ { "id": "skill-123", "statement": "Skill Statement", "description": "Detailed description of the skill.", "code": "SKILL-CODE-123", "icon": "/icons/skill.png", "type": "skill", "status": "active", "frameworkId": "framework-abc", "createdAt": "2023-10-27T10:00:00Z", "updatedAt": "2023-10-27T10:00:00Z", "proficiencyLevel": 0.8 } ] ``` ### Error Handling - **400 Bad Request**: Invalid input data. - **401 Unauthorized**: Authorization not provided. - **403 Forbidden**: Insufficient access. - **404 Not Found**: The requested resource was not found. - **500 Internal Server Error**: An unexpected error occurred on the server. ``` -------------------------------- ### Get Boost Permissions Source: https://docs.learncard.com/sdks/learncard-network/boosts Retrieves permission metadata for a specific boost. Requires a valid URI for the boost. ```APIDOC ## GET /boost/permissions ### Description This endpoint gets permission metadata about a boost. ### Method GET ### Endpoint /boost/permissions ### Query Parameters - **uri** (string) - Required - The unique identifier for the boost. ### Responses #### Success Response (200) - **role** (string) - The role associated with the boost permissions. - **canView** (boolean) - Indicates if the user can view the boost (defaults to true). - **canEdit** (boolean) - Indicates if the user can edit the boost. - **canIssue** (boolean) - Indicates if the user can issue the boost. - **canRevoke** (boolean) - Indicates if the user can revoke the boost. - **canManagePermissions** (boolean) - Indicates if the user can manage permissions for the boost. - **canIssueChildren** (string) - Indicates if the user can issue child boosts. - **canCreateChildren** (string) - Indicates if the user can create child boosts. - **canEditChildren** (string) - Indicates if the user can edit child boosts. - **canRevokeChildren** (string) - Indicates if the user can revoke child boosts. - **canManageChildrenPermissions** (string) - Indicates if the user can manage permissions for child boosts. - **canManageChildrenProfiles** (boolean) - Indicates if the user can manage profiles for child boosts. - **canViewAnalytics** (boolean) - Indicates if the user can view analytics for the boost. #### Response Example ```json { "role": "admin", "canView": true, "canEdit": true, "canIssue": true, "canRevoke": true, "canManagePermissions": true, "canIssueChildren": "true", "canCreateChildren": "true", "canEditChildren": "true", "canRevokeChildren": "true", "canManageChildrenPermissions": "true", "canManageChildrenProfiles": true, "canViewAnalytics": true } ``` #### Error Responses - **400** - Invalid input data. - **401** - Authorization not provided. - **403** - Insufficient access. - **404** - Not found. - **500** - Internal server error. ``` -------------------------------- ### Response Body for Get Auth Share Source: https://docs.learncard.com/sdks/learncard-network/lca-api-key-management This is an example of a successful response when retrieving an auth share. It includes encrypted data, recovery method information, and the user's primary DID. ```json { "exists": true, "authShare": { "encryptedData": "...", "encryptedDek": "...", "iv": "..." }, "securityLevel": "enhanced", "recoveryMethods": [{ "type": "passkey", "createdAt": "2025-01-15T..." }], "maskedRecoveryEmail": "u***@example.com", "shareVersion": 2, "primaryDid": "did:key:z6Mk..." } ``` -------------------------------- ### GET /boost/permissions/{profileId} Source: https://docs.learncard.com/sdks/learncard-network/boosts Retrieves permission metadata regarding a specific boost for a given profile ID. ```APIDOC ## GET /boost/permissions/{profileId} ### Description This endpoint gets permission metadata about a boost for someone else. ### Method GET ### Endpoint /boost/permissions/{profileId} ### Parameters #### Path Parameters - **profileId** (string) - Required - The ID of the profile to retrieve permissions for. #### Query Parameters - **uri** (string) - Required - The URI of the boost. ### Response #### Success Response (200) - **role** (string) - The role assigned. - **canView** (boolean) - Permission to view. - **canEdit** (boolean) - Permission to edit. - **canIssue** (boolean) - Permission to issue. - **canRevoke** (boolean) - Permission to revoke. - **canManagePermissions** (boolean) - Permission to manage permissions. - **canIssueChildren** (string) - Permission to issue children. - **canCreateChildren** (string) - Permission to create children. - **canEditChildren** (string) - Permission to edit children. - **canRevokeChildren** (string) - Permission to revoke children. - **canManageChildrenPermissions** (string) - Permission to manage children permissions. - **canManageChildrenProfiles** (boolean) - Permission to manage children profiles. - **canViewAnalytics** (boolean) - Permission to view analytics. ``` -------------------------------- ### GET /profiles Source: https://docs.learncard.com/sdks/learncard-network/boosts Retrieves a paginated list of profile records based on optional filter criteria. ```APIDOC ## GET /profiles ### Description Retrieves a list of profile records. Supports filtering by fields such as uri, email, websiteLink, and type using exact matches, $in arrays, $regex patterns, or $or logical operators. ### Method GET ### Endpoint /profiles ### Request Body - **f** (object) - Optional - Filter object containing criteria for uri, email, websiteLink, isServiceProfile, and type. ### Response #### Success Response (200) - **cursor** (string) - Pagination cursor for the next page. - **hasMore** (boolean) - Indicates if there are more records available. - **records** (array) - List of profile objects. #### Response Example { "cursor": "next_page_token", "hasMore": true, "records": [ { "to": { "profileId": "example-id", "displayName": "Example Profile", "shortBio": "A short bio", "bio": "A longer bio", "did": "did:example:123" } } ] } ``` -------------------------------- ### GET /learncards Source: https://docs.learncard.com/sdks/learncard-network/boosts Retrieves a list of LearnCards based on optional filters such as status and auto-connect settings. ```APIDOC ## GET /learncards ### Description Retrieves a list of LearnCards. Supports filtering by status (DRAFT, PROVISIONAL, LIVE) and auto-connect recipients. ### Method GET ### Endpoint /learncards ### Response #### Success Response (200) - **name** (string) - Name of the LearnCard - **type** (string) - Type of the LearnCard - **category** (string) - Category of the LearnCard - **status** (string) - Current status (DRAFT, PROVISIONAL, LIVE) - **autoConnectRecipients** (boolean) - Whether auto-connect is enabled - **uri** (string) - Unique identifier URI - **defaultPermissions** (object) - Configuration for role-based permissions #### Response Example [ { "uri": "did:learncard:123", "name": "Example Card", "status": "LIVE", "defaultPermissions": { "role": "admin", "canView": true, "canEdit": true, "canIssue": true, "canRevoke": true, "canManagePermissions": true, "canIssueChildren": "all", "canCreateChildren": "all", "canEditChildren": "all", "canRevokeChildren": "all", "canManageChildrenPermissions": "all", "canManageChildrenProfiles": true, "canViewAnalytics": true } } ] ``` -------------------------------- ### Example Usage of LocalStorage Plugin Source: https://docs.learncard.com/sdks/learncard-core/writing-plugins These TypeScript snippets demonstrate how to use the implemented LocalStorage plugin to store and retrieve credentials. The first snippet shows uploading a credential to get a URI, and the second shows retrieving the credential using that URI. ```typescript const uri = await learnCard.store.LocalStorage.upload(vc); // ...Later const vc = await learnCard.read.get(uri); ``` -------------------------------- ### Get OBv3 alignments for a boost Source: https://docs.learncard.com/sdks/learncard-network/boosts Retrieves OBv3 alignment entries based on the boost's linked framework and aligned skills. This operation requires issue permission. ```APIDOC ## GET /boost/alignments ### Description Returns OBv3 alignment entries based on the boost's linked framework and aligned skills. Requires issue permission. ### Method GET ### Endpoint /boost/alignments ### Parameters #### Query Parameters - **uri** (string) - Required - The URI of the boost to retrieve alignments for. ### Response #### Success Response (200) - **targetCode** (string) - The code of the target alignment. - **targetName** (string) - The name of the target alignment. - **targetDescription** (string) - The description of the target alignment. - **targetUrl** (string) - The URL for the target alignment. - **targetFramework** (string) - The framework the target alignment belongs to. #### Response Example ```json [ { "targetCode": "SKILL-101", "targetName": "Introduction to API Design", "targetDescription": "Learn the fundamentals of designing effective APIs.", "targetUrl": "/skills/api-design", "targetFramework": "OBv3" } ] ``` #### Error Responses - **400** - Bad Request: Invalid input data. - **401** - Unauthorized: Authorization not provided. - **403** - Forbidden: Insufficient access. - **404** - Not Found: The requested resource was not found. - **500** - Internal Server Error: An unexpected error occurred. ``` -------------------------------- ### GET /websites/learncard Source: https://docs.learncard.com/sdks/learncard-network/boosts Retrieves details about the LearnCard website and its content. Supports filtering content by URI, name, type, category, and meta-properties. ```APIDOC ## GET /websites/learncard ### Description Retrieves details about the LearnCard website and its content. Supports filtering content by URI, name, type, category, and meta-properties. ### Method GET ### Endpoint /websites/learncard ### Query Parameters - **uri** (string) - Optional - Filters content by URI. Supports exact match, `$in` array, and `$regex`. - **name** (string) - Optional - Filters content by name. Supports exact match, `$in` array, and `$regex`. - **type** (string) - Optional - Filters content by type. Supports exact match, `$in` array, and `$regex`. - **category** (string) - Optional - Filters content by category. Supports exact match, `$in` array, and `$regex`. - **meta** (object) - Optional - Filters content by meta-properties. Supports nested filtering with `$in` and `$regex`. - **status** (string) - Optional - Filters content by status. Supports exact match or `$in` array with values: DRAFT, PROVISIONAL, LIVE. - **autoConnectRecipients** (boolean) - Optional - Filters based on auto-connection of recipients. ### Response #### Success Response (200) - **website** (object) - Contains details of the website and its content. - **uri** (string) - The URI of the content. - **name** (string) - The name of the content. - **type** (string) - The type of the content. - **category** (string) - The category of the content. - **meta** (object) - Meta-properties associated with the content. - **status** (string) - The status of the content (DRAFT, PROVISIONAL, LIVE). - **autoConnectRecipients** (boolean) - Indicates if recipients are auto-connected. #### Response Example ```json { "website": [ { "uri": "/learncard/courses/intro-to-api", "name": "Introduction to APIs", "type": "course", "category": "Technology", "meta": { "difficulty": "Beginner" }, "status": "LIVE", "autoConnectRecipients": true } ] } ``` ``` -------------------------------- ### Get User Boosts (Deprecated) Source: https://docs.learncard.com/sdks/learncard-network/boosts Retrieves the current user's boosts. This endpoint is deprecated and has a limit of 50 boosts. Use `getPaginatedBoosts` for a paginated approach. ```json {"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Boosts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":"The error message","type":"string"},"code":"The error code","type":"string","issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":"The error message","type":"string"},"code":"The error code","type":"string","issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":"The error message","type":"string"},"code":"The error code","type":"string","issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/boost/all":{"post":{"operationId":"boost-getBoosts","summary":"Get boosts","description":"This endpoint gets the current user's boosts.\nWarning! This route is deprecated and currently has a hard limit of returning only the first 50 boosts. Please use getPaginatedBoosts instead","tags":["Boosts"],"deprecated":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"anyOf":[{"type":"object","properties":{"$or":{"type":"array","items":{"type":"object","properties":{"uri":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"object","properties":{"$in":{"type":"array","items":{"type":"string"}}},"required":["$in"]}]},{"type":"object","properties":{"$regex":{"anyOf":[{"type":"string"},{"type":"string"}],"type":"string"}},"required":["$regex"]}]}]},"name":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"object","properties":{"$in":{"type":"array","items":{"type":"string"}}},"required":["$in"]}]},{"type":"object","properties":{"$regex":{"anyOf":[{"type":"string"},{"type":"string"}],"type":"string"}},"required":["$regex"]}]}]},"type":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"object","properties":{"$in":{"type":"array","items":{"type":"string"}}},"required":["$in"]}]},{"type":"object","properties":{"$regex":{"anyOf":[{"type":"string"},{"type":"string"}],"type":"string"}},"required":["$regex"]}]}]},"$or":{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"object","properties":{"$in":{"type":"array","items":{"type":"string"}}},"required":["$in"]}]},{"type":"object","properties":{"$regex":{"anyOf":[{"type":"string"},{"type":"string"}],"type":"string"}},"required":["$regex"]}]}}},"required":["$or"]}]}}},"name":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"object","properties":{"$in":{"type":"array","items":{"type":"string"}}},"required":["$in"]}]},{"type":"object","properties":{"$regex":{"anyOf":[{"type":"string"},{"type":"string"}],"type":"string"}},"required":["$regex"]}]}]},"type":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"object","properties":{"$in":{"type":"array","items":{"type":"string"}}},"required":["$in"]}]},{"type":"object","properties":{"$regex":{"anyOf":[{"type":"string"},{"type":"string"}],"type":"string"}},"required":["$regex"]}]}]},"$or":{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"object","properties":{"$in":{"type":"array","items":{"type":"string"}}},"required":["$in"]}]},{"type":"object","properties":{"$regex":{"anyOf":[{"type":"string"},{"type":"string"}],"type":"string"}},"required":["$regex"]}]}}},"required":["$or"]}]}}}},"required":false}}}}]}} ```