LearnCard Developer Docs
  • ๐Ÿš€Get Started
    • ๐Ÿ‘‹Welcome
    • โญWho are you?
      • Learners & Employees
      • Traditional Educator
      • Non-Traditional Educator
      • Assessment Provider
      • Employer
      • App Developer & EdTech
      • DAO & Communities
      • Content Creators
      • Research Institutions
      • NGOs & Governments
      • Plugfest Partner
        • Guide for Interop Issuers
          • ๐ŸคฝCreating an Interop Issuer
        • Guide for Interop Wallets
    • Protocol Overview
      • The Internet of Education
      • The Learning Economy
      • Learner & Employee Privacy
      • 22nd Century Education
      • The Open Credential Network
      • PVCs
  • ๐Ÿ”ฐLearnCard SDK
    • What is LearnCard?
      • Why a Universal Wallet?
      • Architectural Patterns
      • Production Deployment Guide
      • Troubleshooting Guide
    • LearnCard Core
      • Quick Start
        • Create New Credentials
          • Creating Verifiable Credentials for LearnCard
          • Achievement Types and Categories
          • Custom Types
          • Understanding Boosts
          • Creating Boost Credentials
        • Sign & Send Credentials
        • Accept & Verify Credentials
        • Share & Present Credentials
      • Construction
        • Managing Seed Phrases
        • initLearnCard
        • DIDKit
        • learnCardFromSeed
        • emptyLearnCard
        • IDX Config
      • Control Planes
        • ID
        • Read
        • Store
        • Index
        • Cache
        • Context
      • Plugins
        • Adding Plugins
        • Official Plugins
          • Dynamic Loader
          • Crypto
          • DIDKit
          • DID Key
          • VC
            • Expiration Sub-Plugin
          • VC Resolution
          • VC-Templates
          • VC-API
          • Ceramic
          • IDX
          • VPQR
          • Ethereum
          • CHAPI
          • LearnCard Network
          • LearnCloud
          • LearnCard
          • Claimable Boosts
        • Writing Plugins
          • The Simplest Plugin
          • The Plugin Type
          • The LearnCard Type
          • Implementing Control Planes
          • Implementing Methods
          • The Implicit LearnCard
          • Depending on Plugins
          • Private Fields
          • Publishing a Plugin to NPM
      • URIs
      • CHAPI
        • โญCHAPI Wallet Setup Guide
        • โ†”๏ธTranslating to CHAPI documentation
        • ๐Ÿ–ฅ๏ธDemo Application
        • ๐Ÿ”ฐUsing LearnCard to Interact with a CHAPI Wallet
        • ๐Ÿ“Cheat Sheets
          • Issuers
          • Wallets
      • LearnCard UX
        • Quick Start
        • Components
          • Verifiable Credentials
            • VC Thumbnail
            • VC Thumbnail, Mini
          • LearnCards
            • LearnCard Front
            • LearnCard Back
        • API
      • LearnCard Bridge
      • API
      • Migration Guide
    • LearnCard Network
      • LearnCard Network API
        • Authentication
        • Auth Grants and API Tokens
        • Profile
        • Credentials
        • Boosts
        • Presentations
        • Storage
        • Signing Authorities
        • Notifications
        • API Docs
        • Launch Your Own Network
      • ๐Ÿ”ŒConnect Your Application
    • ConsentFlow
      • Setting Up ConsentFlow with an Independent Network
    • GameFlow
      • Sending xAPI Statements
        • xAPI URIs
      • Reading xAPI Statements
        • Advanced xAPI Statement Queries
      • Consentful "Claim Later" Flow
  • ๐Ÿš€Applications
    • LearnCard
    • SuperSkills!
      • SuperSkills! SDK
        • Digital Wallets
        • Issuing into SuperSkills!
        • ๐ŸฆธCreating a SuperSkills! Issuer
    • Metaversity
    • Admin Dashboard
  • ๐Ÿ”—Resources
    • Github
    • Community
    • ๐Ÿ’…Custom Development
    • Contact Our Team
    • Learning Economy
  • ๐Ÿค–LearnCard Services
    • LearnCard CLI
    • Discord Bot
    • Metamask Snap
  • ๐Ÿ’ธLearnBank SDK
    • Why LearnBank?
  • ๐Ÿ“ŠLearnGraph SDK
    • Why LearnGraph?
Powered by GitBook
On this page

Was this helpful?

  1. LearnCard SDK
  2. LearnCard Network
  3. LearnCard Network API

Storage

Storage Management

PreviousPresentationsNextSigning Authorities

Last updated 2 years ago

Was this helpful?

1. Store a Credential/Presentation

To store a credential or presentation, use the store method. This method accepts a credential or presentation object.

const credential = your_credential;

await learnCard.store['LearnCard Network'].uploadEncrypted(credential);

2. Resolve a URI to a Credential/Presentation

To resolve a URI to a credential or presentation, use the learnCard.read method. This method accepts a uri parameter.

const uri = 'your_credential_or_presentation_uri';

await learnCard.read.get(uri);

These are the storage-related API calls available in the LearnCard Network API. Use these methods to manage the storage and retrieval of credentials and presentations on the LearnCard Network.

๐Ÿ”ฐ
  • 1. Store a Credential/Presentation
  • POSTStore a Credential/Presentation
  • 2. Resolve a URI to a Credential/Presentation

Store a Credential/Presentation

post

This endpoint stores a credential/presentation, returning a uri that can be used to resolve it

Authorizations
Body
itemany ofRequired
or
or
or
typestring ยท enumOptionalPossible values:
Responses
200
Successful response
application/json
Responsestring
default
Error response
application/json
post
POST /api/storage/store HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 800

{
  "item": {
    "@context": [
      "text"
    ],
    "id": "text",
    "type": [
      "text"
    ],
    "issuer": "text",
    "credentialSubject": {
      "id": "text",
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "refreshService": {
      "id": "text",
      "type": "text",
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "credentialSchema": {
      "id": "text",
      "type": "text",
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "issuanceDate": "text",
    "expirationDate": "text",
    "credentialStatus": {
      "type": "text",
      "id": "text",
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "name": "text",
    "description": "text",
    "validFrom": "text",
    "validUntil": "text",
    "status": {
      "type": "text",
      "id": "text",
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "termsOfUse": {
      "type": "text",
      "id": "text",
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "evidence": {
      "type": "text",
      "id": "text",
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "type": "credential"
}
text