//#region src/models/EndorsementCredential.d.ts /** * EndorsementCredential Types * * EndorsementCredentials are third-party validation credentials used in OpenBadges 3.0 * to provide external endorsement of achievements, profiles, or other credentials. * * @see https://www.imsglobal.org/spec/ob/v3p0/#endorsementcredential */ /** * The subject of an endorsement - what is being endorsed */ interface EndorsementSubject { /** The ID of the entity being endorsed (DID or URL) */ id: string; /** Must be 'EndorsementSubject' */ type: 'EndorsementSubject'; /** Optional comment explaining the endorsement */ endorsementComment?: string; } /** * Profile information for the endorser (issuer of the endorsement) */ interface EndorserProfile { /** DID or URL identifying the endorser */ id: string; /** Must include 'Profile' */ type?: 'Profile' | ['Profile', ...string[]]; /** Name of the endorsing organization/individual */ name?: string; /** Description of the endorser */ description?: string; /** URL to the endorser's website */ url?: string; /** Image representing the endorser */ image?: string | { id: string; type?: 'Image'; }; /** Email of the endorser */ email?: string; /** Phone number of the endorser */ phone?: string; } /** * Input for creating an EndorsementCredential */ interface EndorsementCredentialInput { /** The entity being endorsed (DID or URL) - becomes credentialSubject.id */ endorsedEntity: string; /** Optional comment explaining the endorsement */ endorsementComment?: string; /** Profile information for the endorser (becomes the issuer) */ issuerProfile: EndorserProfile; /** Verification method ID for signing */ verificationMethod: string; /** ISO 8601 date string when the endorsement becomes valid */ validFrom?: string; /** ISO 8601 date string when the endorsement expires */ validUntil?: string; /** Optional credential ID (auto-generated if not provided) */ id?: string; } /** * Full EndorsementCredential structure (unsigned) */ interface EndorsementCredential { '@context': string[]; type: ['VerifiableCredential', 'EndorsementCredential']; id: string; issuer: EndorserProfile; validFrom: string; validUntil?: string; credentialSubject: EndorsementSubject; } /** * Signed EndorsementCredential with proof */ interface SignedEndorsementCredential extends EndorsementCredential { proof: { type: string; cryptosuite?: string; created: string; verificationMethod: string; proofPurpose: string; proofValue: string; challenge?: string; domain?: string; }; } //#endregion export { EndorsementCredential, EndorsementCredentialInput, EndorsementSubject, EndorserProfile, SignedEndorsementCredential }; //# sourceMappingURL=EndorsementCredential.d.mts.map