File

src/issuer/credentials/credentials.controller.ts

Prefix

credentials

Index

Methods

Methods

schema
schema(id: string)
Decorators :
@Get('schema/:id')

Retrieves the schema for a specific credential

Parameters :
Name Type Optional
id string No
Returns : any
vct
vct(id: string)
Decorators :
@Get('vct/:id')

Retrieves the VCT (Verifiable Credential Type) from the credentials service.

Parameters :
Name Type Optional Description
id string No
  • The identifier of the credential configuration.
Returns : any
import { Controller, Get, Param } from '@nestjs/common';
import { CredentialsService } from './credentials.service';
import { ApiTags } from '@nestjs/swagger';

@ApiTags('credentials')
@Controller('credentials')
export class CredentialsController {
    constructor(private readonly credentialsService: CredentialsService) {}

    /**
     * Retrieves the VCT (Verifiable Credential Type) from the credentials service.
     * @param id - The identifier of the credential configuration.
     */
    @Get('vct/:id')
    vct(@Param('id') id: string) {
        return this.credentialsService.getVCT(id);
    }

    /**
     * Retrieves the schema for a specific credential
     * @param id
     * @returns
     */
    @Get('schema/:id')
    schema(@Param('id') id: string) {
        return this.credentialsService.getSchema(id);
    }
}

results matching ""

    No results matching ""