openapi: 3.2.0 info: title: MoltGuard Credential Issuance API version: 1.5.0 description: 'Trust & Integrity Service for the x402 Agent Economy. Sub-API of MolTrust Trust Registry (api.moltrust.ch). See also: https://api.moltrust.ch/openapi.json (parent service).' contact: name: CryptoKRI GmbH url: https://moltrust.ch license: name: Apache-2.0 url: https://www.apache.org/licenses/LICENSE-2.0 servers: - url: https://api.moltrust.ch/guard description: Production security: [] tags: - name: credential-issuance description: Generic VC issuance + verify paths: /api/credential/issue: post: tags: - credential-issuance summary: Issue a generic W3C Verifiable Credential (paid) operationId: issueCredential security: - x402: [] x-moltrust-pricing: amount: '0.10' currency: USDC chain: eip155:8453 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/VCIssueRequestBase' responses: '200': description: Issued VC content: application/json: schema: $ref: '#/components/schemas/CredentialIssueResult' '402': description: x402 payment required content: application/json: schema: $ref: '#/components/schemas/PaymentRequired' /api/credential/verify: post: tags: - credential-issuance summary: Verify a W3C VC + AAE delegation chain (free) operationId: verifyCredential requestBody: required: true content: application/json: schema: type: object additionalProperties: true description: VC to verify (full credentialSubject + proof) responses: '200': description: Verification result content: application/json: schema: $ref: '#/components/schemas/CredentialVerifyResult' components: schemas: PaymentRequired: type: object description: x402 v2 challenge body. Returned with HTTP 402 when X-PAYMENT header is missing or invalid. properties: x402: type: object properties: version: type: integer example: 2 accepts: type: array items: type: object properties: scheme: type: string example: exact network: type: string example: base maxAmountRequired: type: object properties: asset: type: string example: USDC amount: type: string description: USDC base units (6 decimals) payTo: type: string CredentialVerifyResult: type: object description: W3C VC + AAE delegation chain verification result. properties: verified: type: boolean credential: type: - object - 'null' additionalProperties: true aae: type: object description: AAE evaluation, if envelope present additionalProperties: true errors: type: array items: type: string CredentialIssueResult: type: object description: Generic VC issuance result. Specific VC type returned per request body. additionalProperties: true VCIssueRequestBase: type: object description: Base body for a VC issuance request. Specific VC types extend with type-specific fields. additionalProperties: true securitySchemes: x402: type: apiKey in: header name: X-PAYMENT description: 'x402 v2 payment receipt header. Format: "x402 ". See https://x402.org/writing/x402-v2-launch.'