LearnCard Documentation
GithubStatusSupportLaunch App
  • 🚀Introduction
    • What is LearnCard?
    • Use Cases & Possibilities
    • Ecosystem Architecture
  • ⚡Quick Start
    • Setup & Prerequisites
    • Your First Integration
  • 📚Tutorials
    • Create a Credential
    • Create a Boost
    • Create a ConsentFlow
    • Create a Connected Website
    • Send xAPI Statements
    • Listen to Webhooks
  • ✅How-To Guides
    • Verify My Issuer
    • Connect Systems
      • Connect a Website
      • Connect a Game
    • Implement Flows
      • Claim Data after Guardian Consent
      • Connect via CHAPI
        • ⭐CHAPI Wallet Setup Guide
        • ↔️Translating to CHAPI documentation
        • 🖥️Demo Application
        • 🔰Using LearnCard to Interact with a CHAPI Wallet
        • 📝Cheat Sheets
          • Issuers
          • Wallets
    • Deploy Infrastructure
      • Remote Key Management
      • Generate API Tokens
      • Signing Authority
      • Connect to Independent Network
      • Build a Plugin
  • 🛠️SDKs & API Reference
    • LearnCard Wallet SDK
      • Authentication
      • Usage Examples
      • SDK Reference
      • Plugin API Reference
      • Integration Strategies
      • Deployment
      • Troubleshooting
      • Changelog
    • LearnCloud Network API
      • Authentication
      • Usage Examples
      • Architecture
      • Notifications & Webhooks
      • Profiles
      • Profile Managers
      • Credentials
      • Boosts
      • Presentations
      • Storage
      • Contracts
      • DID Metadata
      • Claim Hooks
      • Auth Grants
      • Utilities
      • Models
      • OpenAPI
    • LearnCloud Storage API
      • Authentication
      • Usage Examples
      • Architecture
      • Storage
      • Index
      • User
      • Custom Storage
      • Utilities
      • Models
      • xAPI Reference
    • Plugins
      • Crypto
      • DIDKit
      • DID Key
      • Dynamic Loader
      • VC
        • Expiration Sub-Plugin
      • VC-Templates
      • VC-API
      • Ceramic
      • IDX
      • VPQR
      • Ethereum
      • CHAPI
      • LearnCard Network
      • LearnCloud
      • LearnCard
      • Simple Signing
      • Claimable Boosts
    • LearnCard CLI
  • 🧠Core Concepts
    • Identities & Keys
      • Decentralized Identifiers (DIDs)
      • Seed Phrases
      • Network Profiles
      • Signing Authorities
      • Trust Registries
    • Credentials & Data
      • Verifiable Credentials (VCs)
      • Credential Lifecycle
      • Schemas, Types, & Categories
      • Building Verifiable Credentials
      • Boost Credentials
      • Getting Started with Boosts
      • Credential URIs
      • xAPI Data
      • General Best Practices & Troubleshooting
    • Consent & Permissions
      • ConsentFlow Overview
      • Consent Contracts
      • User Consent & Terms
      • Consent Transactions
      • Auto-Boosts
      • Writing Consented Data
      • Accessing Consented Data
      • GameFlow Overview
    • Network & Interactions
      • Network Vision & Principles
      • Key Network Procedures
      • Core Interaction Workflows
    • Architecture & Principles
      • Control Planes
      • Plugin System
      • Auth Grants and API Tokens
  • 🔗Development
    • Contributing
Powered by GitBook
On this page
  • For Wallets
  • For Issuers

Was this helpful?

  1. How-To Guides
  2. Implement Flows
  3. Connect via CHAPI

Translating to CHAPI documentation

How to translate LearnCard's methods into the CHAPI documentation's methods

For Wallets

CHAPI exposes four main methods from its two packages:

  • loadOnce from credential-handler-polyfill

  • installHandler from web-credential-handler

  • activeHandler from web-credential-handler

  • receiveCredentialEvent from web-credential-handler

LearnCard exposes three of these methods for you, while implicitly calling loadOnce for you at construction time in the CHAPI plugin.

  • learnCard.invoke.installChapiHandler wraps installHandler

  • learnCard.invoke.activateChapiHandler wraps activeHandler

  • learnCard.invoke.receiveChapiEvent wraps receiveCredentialEvent

In the case of installHandler and receiveCredentialEvent, these two methods are exposed directly, with only types added to help make them easier to use.

When using activeChapiHandler instead of activateHandler, LearnCard will default the mediatorOrigin to `https://authn.io/mediator?${encodedURIComponent(window.location.origin)` for you. This can be overrided by simply passing in a custom mediatorOrigin when calling activateChapiHandler.

For Issuers

The method storePresentationViaChapi loosely wraps the window.navigator.credentials.store method. However, learnCard.invoke.storePresentationViaChapi will automatically convert a raw Verifiable Presentation into the WebCredential class for you before calling window.navigator.credentials.store.

PreviousCHAPI Wallet Setup GuideNextDemo Application

Last updated 1 month ago

Was this helpful?

✅
↔️