LearnCard Network
Using the LearnCard Network Plugin
The LearnCard Network Plugin (@learncard/network-plugin
) simplifies the process of interacting with the LearnCard Network API by providing a set of convenient methods for managing profiles, connections, credentials, presentations, and boosts. This guide will help you understand how to use this plugin in your application.
Installation
Initialization
Accessing Plugin Methods
Once you've initialized the LearnCard Network Plugin, you can access the methods by calling learnCard.invoke.<LearnCardNetworkPluginMethods>
. For example, to get a user's profile with a profileId
of johnsmith
you can call:
Here's a brief overview of the available methods in the LearnCardNetworkPluginMethods
:
Profile Management: Create, update, delete, and retrieve user profiles.
Connections: Manage connections between users, including sending and accepting connection requests, and fetching connection information.
Credentials: Send, accept, retrieve, and delete credentials between users.
Presentations: Send, accept, retrieve, and delete presentations between users.
Boosts: Create, send, update, delete, and claim boosts for users on the network.
Storage: Resolve a URI to a credential or presentation.
Signing Authorities: Register and retrieve signing authorities for the LearnCard Network.
For detailed information on the method signatures and their parameters, refer to the type definitions provided in the @learncard/network-plugin
package.
Examples
Here are a few examples of how to use the LearnCard Network Plugin in your application:
Create a Profile
Connect with Another Profile
Send a Credential
Claim a Boost
These examples demonstrate some of the ways you can interact with the LearnCard Network API using the @learncard/network-plugin
.
Last updated