/** * Crossmint Verifiable Credentials API Client * * Integrates with Crossmint's VC system to issue and verify credentials. * Ported from packages/web for SDK consumption. */ declare const GHOSTSPEAK_CREDENTIAL_TYPES: { readonly AGENT_IDENTITY: "GhostSpeakAgentIdentity"; readonly REPUTATION_SCORE: "GhostSpeakReputation"; readonly JOB_COMPLETION: "GhostSpeakJobCompletion"; }; interface ActionResponse { id: string; status: string; data?: { collection?: CredentialTemplate; }; } interface CredentialType { id: string; typeSchema: { $schema: string; $id: string; title: string; description: string; type: string; properties: Record; }; } interface CredentialTemplate { id: string; metadata: { name: string; description: string; imageUrl: string; }; fungibility: string; onChain: { chain: string; type: string; }; actionId: string; } interface IssuedCredential { id: string; credentialId: string; onChain: { status: 'pending' | 'completed'; chain: string; contractAddress: string; tokenId?: string; }; actionId: string; } interface VerificationResult { isValid: boolean; errors?: string[]; } interface CrossmintClientOptions { apiKey: string; environment?: 'staging' | 'production'; chain?: 'base-sepolia' | 'polygon-amoy' | 'ethereum-sepolia' | 'base' | 'polygon' | 'ethereum'; } /** * Crossmint Verifiable Credentials Client * * Handles the complete credential lifecycle: * 1. Create credential types (JSON schemas) * 2. Create credential templates (on-chain configuration) * 3. Issue credentials to recipients * 4. Retrieve credentials * 5. Verify credentials * 6. Revoke credentials * * NOTE: Crossmint VCs are only supported on EVM chains. */ declare class CrossmintVCClient { private apiKey; private baseUrl; private chain; constructor(options: CrossmintClientOptions); /** * Create the GhostSpeak Agent Identity credential type */ createAgentIdentityType(): Promise; /** * Create the GhostSpeak Reputation credential type */ createReputationType(): Promise; /** * Create the GhostSpeak Job Completion credential type */ createJobCompletionType(): Promise; /** * Initialize all GhostSpeak credential types */ initializeAllTypes(): Promise<{ agentIdentity: CredentialType; reputation: CredentialType; jobCompletion: CredentialType; }>; /** * Create all GhostSpeak credential templates */ createAllTemplates(types: { agentIdentity: CredentialType; reputation: CredentialType; jobCompletion: CredentialType; }): Promise<{ agentIdentityTemplate: CredentialTemplate; reputationTemplate: CredentialTemplate; jobCompletionTemplate: CredentialTemplate; }>; /** * Issue an agent identity credential */ issueAgentCredential(templateId: string, recipientEmail: string, subject: Record, expiresAt?: string): Promise; /** * Issue a reputation credential */ issueReputationCredential(templateId: string, recipientEmail: string, subject: Record, expiresAt?: string): Promise; /** * Issue a job completion credential */ issueJobCompletionCredential(templateId: string, recipientEmail: string, subject: Record, expiresAt?: string): Promise; /** * Create a credential type (JSON Schema) */ createCredentialType(typeName: string, schema: Record): Promise; /** * Create a credential template */ createTemplate(typeId: string, metadata: { name: string; description: string; imageUrl: string; }): Promise; /** * Poll an action until completion */ waitForAction(actionId: string): Promise; /** * Issue a credential using a template */ issueCredential(templateId: string, recipientEmail: string, subject: Record, expiresAt?: string): Promise; getCredential(credentialId: string): Promise; verifyCredential(credential: unknown): Promise; revokeCredential(credentialId: string): Promise<{ actionId: string; status: string; }>; private getDefaultExpiry; } export { type CredentialTemplate, type CredentialType, type CrossmintClientOptions, CrossmintVCClient, GHOSTSPEAK_CREDENTIAL_TYPES, type IssuedCredential, type VerificationResult };