@credo-ts/core
Version:
<p align="center"> <br /> <img alt="Credo Logo" src="https://github.com/openwallet-foundation/credo-ts/blob/c7886cb8377ceb8ee4efe8d264211e561a75072d/images/credo-logo.png" height="250px" /> </p> <h1 align="center"><b>Credo - Core</b></h1
1 lines • 1.68 kB
Source Map (JSON)
{"version":3,"file":"IndyAgentService.mjs","names":[],"sources":["../../../../../src/modules/dids/domain/service/IndyAgentService.ts"],"sourcesContent":["import { ArrayNotEmpty, IsOptional, IsString } from 'class-validator'\n\nimport { IsUri } from '../../../../utils'\nimport { getProtocolScheme } from '../../../../utils/uri'\n\nimport { DidDocumentService } from './DidDocumentService'\n\nexport class IndyAgentService extends DidDocumentService {\n public constructor(options: {\n id: string\n serviceEndpoint: string\n recipientKeys: string[]\n routingKeys?: string[]\n priority?: number\n }) {\n super({ ...options, type: IndyAgentService.type })\n\n if (options) {\n this.recipientKeys = options.recipientKeys\n this.routingKeys = options.routingKeys\n if (options.priority) this.priority = options.priority\n }\n }\n\n public static type = 'IndyAgent'\n\n public get protocolScheme(): string {\n return getProtocolScheme(this.serviceEndpoint)\n }\n\n @IsString()\n @IsUri()\n public serviceEndpoint!: string\n\n @ArrayNotEmpty()\n @IsString({ each: true })\n public recipientKeys!: string[]\n\n @IsString({ each: true })\n @IsOptional()\n public routingKeys?: string[]\n\n public priority = 0\n}\n"],"mappings":";;;;;;;;;;;AAOA,IAAa,mBAAb,MAAa,yBAAyB,mBAAmB;CACvD,AAAO,YAAY,SAMhB;AACD,QAAM;GAAE,GAAG;GAAS,MAAM,iBAAiB;GAAM,CAAC;OA2B7C,WAAW;AAzBhB,MAAI,SAAS;AACX,QAAK,gBAAgB,QAAQ;AAC7B,QAAK,cAAc,QAAQ;AAC3B,OAAI,QAAQ,SAAU,MAAK,WAAW,QAAQ;;;CAMlD,IAAW,iBAAyB;AAClC,SAAO,kBAAkB,KAAK,gBAAgB;;;iBAHlC,OAAO;;CAMpB,UAAU;CACV,OAAO;;;;CAGP,eAAe;CACf,SAAS,EAAE,MAAM,MAAM,CAAC;;;;CAGxB,SAAS,EAAE,MAAM,MAAM,CAAC;CACxB,YAAY"}