@courseproof/provider-swayam
v0.1.1
Published
[](https://opensource.org/licenses/MIT)
Maintainers
Readme
@courseproof/provider-swayam
Provider for verifying SWAYAM certificates. Detects and verifies certificate URLs from SWAYAM by fetching the page and extracting structured data.
Detection
The provider detects URLs matching the following patterns:
swayam.gov.in/…swayam2.ac.in/…
Verification
When verify(url) is called, the provider:
- Fetches the certificate page
- Extracts structured data using JSON-LD, HTML selectors, or regex patterns
- Returns a
CertificateResultwith the parsed certificate information
Usage
import { SwayamProvider } from "@courseproof/provider-swayam";
import { CourseProof } from "@courseproof/core";
const cp = new CourseProof();
cp.registerProvider(new SwayamProvider());
const result = await cp.verify("https://swayam.gov.in/…/verify/abc123");Installation
npm install @courseproof/provider-swayamLicense
MIT — see LICENSE for details.
Part of the CourseProof monorepo.
