Getting Started with Boosts

Prerequisites

  • Node.js environment

  • Basic knowledge of Verifiable Credentials and JSON-LD

  • LearnCard SDK installed in your project

npm install @learncard/init

Setup Your LearnCard Instance

First, initialize the LearnCard SDK:

import { initLearnCard } from '@learncard/init';

// Initialize LearnCard with a seed for key generation
const learnCard = await initLearnCard({ 
  seed: 'your-secure-seed-value',
  network: true 
});

Creating a Basic Boost Credential

Let's start with creating a simple Boost Credential:

// Define credential issuer and subject
const issuerDID = 'did:web:network.learncard.com:users:issuer-example';
const subjectDID = 'did:web:network.learncard.com:users:example';

// Create a basic Boost Credential
const basicBoostCredential = {
  "@context": [
    "https://www.w3.org/2018/credentials/v1",
    "https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.1.json",
    "https://ctx.learncard.com/boosts/1.0.3.json",
  ],
  "credentialSubject": {
    "achievement": {
      "achievementType": "Badge",
      "criteria": {
        "narrative": "This badge is awarded for demonstrating teamwork skills."
      },
      "description": "Recognizes excellence in team collaboration.",
      "id": "urn:uuid:" + crypto.randomUUID(), // Generate a unique ID
      "image": "https://example.com/badge-images/teamwork.png",
      "name": "Team Player",
      "type": [
        "Achievement"
      ]
    },
    "id": subjectDID,
    "type": [
      "AchievementSubject"
    ]
  },
  "display": {
    "backgroundColor": "#4285F4",
    "displayType": "badge"
  },
  "image": "https://example.com/badge-images/teamwork.png",
  "issuanceDate": new Date().toISOString(),
  "issuer": issuerDID,
  "name": "Team Player Badge",
  "type": [
    "VerifiableCredential",
    "OpenBadgeCredential",
    "BoostCredential"
  ]
};

// Sign the credential to verify you created it correctly
const signedCredential = await learnCard.invoke.issueCredential(basicBoostCredential);

// Now you have a verifiable Boost Credential that can be shared with the recipient
console.log(JSON.stringify(signedCredential, null, 2));

Customizing Display Options

Boost Credentials allow for extensive display customization. Here's how to enhance your credential's visual appearance:

Adding Skills Information

For education and workforce credentials, adding skills data helps make the credential more valuable:

Adding Attachments

You can enhance a Boost Credential with attachments.

Creating a BoostID

BoostID extends the credential concept to create digital identity cards with enhanced display properties:

Real-world Use Cases

Educational Achievement Badges

Professional Certification

Adding Evidence to Boost Credentials

Evidence is a crucial component of Open Badge v3 credentials that provides proof or documentation of the achievement. Adding evidence to your Boost Credentials enhances their credibility and value by showing the actual work, assessment, or documentation that supports the credential claim.

Understanding Evidence in Open Badge v3

In the Open Badge v3 specification, evidence can be attached to a credential to provide verification of the achievement being recognized. Evidence can include:

  • URLs to completed projects

  • Assessment results

  • Documentation of work performed

  • Portfolio items

  • Media files demonstrating competency

  • Testimonials or evaluations

How to Add Evidence to Boost Credentials

Here's how to incorporate evidence into your Boost Credentials:

Evidence Properties

Each evidence item in the evidence array can include the following properties:

  • id: A unique identifier for the evidence item (required)

  • type: The type of evidence, typically ["Evidence"] (required)

  • name: A name or title for the evidence (recommended)

  • description: A short description of the evidence (recommended)

  • narrative: A detailed explanation of how this evidence demonstrates the achievement (recommended)

  • genre: The category or type of evidence (e.g., Project, Assessment, Testimonial)

  • url: A URL where the evidence can be accessed (recommended)

  • audience: The intended audience for the evidence

Best Practices for Evidence

  1. Be Specific: Include detailed descriptions and narratives that clearly explain how the evidence demonstrates the achievement.

  2. Ensure Accessibility: Make sure evidence URLs are accessible to verifiers. Consider access permissions for private repositories.

  3. Diversify Evidence Types: Include different types of evidence when possible, such as projects, assessments, and testimonials.

  4. Maintain Privacy: Be mindful of privacy concerns when including evidence. Avoid including sensitive personal information.

  5. Permanence: Try to use evidence links that will remain accessible long-term. Consider using persistent identifiers or archived versions of web content.

Example: Portfolio Evidence

For a credential that recognizes design skills, you might include evidence pointing to portfolio items:

Example: Multiple Evidence Types

For comprehensive credentials, include various types of evidence:

By including comprehensive evidence in your Boost Credentials, you create more valuable and verifiable credentials that clearly demonstrate the achievement being recognized.

Best Practices

  1. Security: Always use a secure method to generate and store your seed value.

  2. Images: Use high-quality images that meet size requirements for optimal display.

  3. Metadata: Include detailed and accurate information in credentials to maximize their utility.

  4. Validation: Test your credentials with the verification method before issuing them at scale.

  5. Privacy: Only include necessary personal information in credentials to respect privacy.

Troubleshooting

Common Issues

  • Verification Failures: Ensure all required fields are present and properly formatted.

  • Display Issues: Check that image URLs are accessible and correctly formatted.

  • Context Errors: Make sure all context URLs are accessible and valid.

For more assistance, refer to the LearnCard SDK documentation or join the LearnCard community forum.

Last updated

Was this helpful?