Connect to Independent Network
Setting Up ConsentFlow with an Independent Network
Prerequisites
Step 1: Create a Service Profile
// Install and start LearnCard CLI
// pnpm dlx @learncard/cli
// Initialize LearnCard with your Independent Network
const networkLearnCard = await initLearnCard({
seed: '[your secure key]',
network: 'https://network.independent.example.org/trpc' // Point to your Independent Network
})
// Create a service profile
const serviceProfile = {
displayName: 'Your App Name',
profileId: 'your-app-unique-id',
image: 'https://example.com/your-app-logo.jpg',
};
// Register the service profile
await networkLearnCard.invoke.createServiceProfile(serviceProfile);Step 2: Create a ConsentFlow Contract
Available Credential Categories
Step 3: Add a "Connect Your Wallet" Button to Your Website
Step 4: Handle the Redirect After User Consent
Step 5: Reading Data from Connected LearnCards
Step 6: Sending Credentials to Users
Option A: Using LearnCard SDK
Option B: Using HTTP Endpoints
Best Practices
Step 7: Working with Boosts
What is a Boost?
Why Use Boosts Instead of Direct Credential Sending
Feature
Direct Credential Sending
Boosts
Creating a Boost Using HTTP Endpoints
Sending a Boost to Recipients
Best Practices for Working with Boosts
Troubleshooting
Last updated
Was this helpful?