@2060.io/vs-agent-client 1.6.0-dev.28 → 1.6.0-dev.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,13 +21,13 @@ export declare class TrustCredentialService {
21
21
  * optionally linked to a DID.
22
22
  *
23
23
  * @param type - The credential format. Accepted values: `'jsonld' | 'anoncreds'`.
24
- * @param jsonSchemaCredential - The URL of the credential JSON schema definition.
24
+ * @param jsonSchemaCredentialId - The URL of the credential JSON schema definition.
25
25
  * @param claims - A JSON object containing the credential claims.
26
26
  * @param did - (Optional) A decentralized identifier (DID) associated with the holder.
27
27
  *
28
28
  * @returns A `CredentialIssuanceResponse` containing either the DIDComm invitation URL
29
29
  * or the issued verifiable credential, depending on the credential type.
30
30
  */
31
- issuance({ type, jsonSchemaCredential, claims, did, }: CredentialIssuanceRequest): Promise<CredentialIssuanceResponse>;
31
+ issuance({ format, jsonSchemaCredentialId, claims, did, }: CredentialIssuanceRequest): Promise<CredentialIssuanceResponse>;
32
32
  revoke(): Promise<void>;
33
33
  }
@@ -30,22 +30,22 @@ class TrustCredentialService {
30
30
  * optionally linked to a DID.
31
31
  *
32
32
  * @param type - The credential format. Accepted values: `'jsonld' | 'anoncreds'`.
33
- * @param jsonSchemaCredential - The URL of the credential JSON schema definition.
33
+ * @param jsonSchemaCredentialId - The URL of the credential JSON schema definition.
34
34
  * @param claims - A JSON object containing the credential claims.
35
35
  * @param did - (Optional) A decentralized identifier (DID) associated with the holder.
36
36
  *
37
37
  * @returns A `CredentialIssuanceResponse` containing either the DIDComm invitation URL
38
38
  * or the issued verifiable credential, depending on the credential type.
39
39
  */
40
- async issuance({ type, jsonSchemaCredential, claims, did, }) {
40
+ async issuance({ format, jsonSchemaCredentialId, claims, did, }) {
41
41
  try {
42
- logger.info(`issue credential with schema: ${jsonSchemaCredential}`);
42
+ logger.info(`issue credential with schema: ${jsonSchemaCredentialId}`);
43
43
  const response = await fetch(`${this.url}/issue-credential`, {
44
44
  method: 'POST',
45
45
  headers: { 'Content-Type': 'application/json' },
46
46
  body: JSON.stringify({
47
- type,
48
- jsonSchemaCredential,
47
+ format,
48
+ jsonSchemaCredentialId,
49
49
  claims,
50
50
  did,
51
51
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"TrustCredentialService.js","sourceRoot":"","sources":["../../src/services/TrustCredentialService.ts"],"names":[],"mappings":";AAAA,yCAAyC;;;AAGzC,iCAA8B;AAI9B,MAAM,MAAM,GAAG,IAAI,cAAM,CAAC;IACxB,IAAI,EAAE,uBAAuB;IAC7B,IAAI,EAAE,QAAQ;IACd,iBAAiB,EAAE,+BAA+B;CACnD,CAAC,CAAA;AAEF;;;;;;GAMG;AACH,MAAa,sBAAsB;IAGjC,YACU,OAAe,EACf,OAAmB;QADnB,YAAO,GAAP,OAAO,CAAQ;QACf,YAAO,GAAP,OAAO,CAAY;QAE3B,IAAI,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,OAAO,KAAK,CAAA;IACpE,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACI,KAAK,CAAC,QAAQ,CAAC,EACpB,IAAI,EACJ,oBAAoB,EACpB,MAAM,EACN,GAAG,GACuB;QAC1B,IAAI,CAAC;YACH,MAAM,CAAC,IAAI,CAAC,iCAAiC,oBAAoB,EAAE,CAAC,CAAA;YACpE,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,mBAAmB,EAAE;gBAC3D,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;gBAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;oBACnB,IAAI;oBACJ,oBAAoB;oBACpB,MAAM;oBACN,GAAG;iBACJ,CAAC;aACH,CAAC,CAAA;YAEF,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;gBACjB,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;gBAC1C,MAAM,IAAI,KAAK,CACb,+BAA+B;oBAC7B,WAAW,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,UAAU,IAAI;oBACrD,kBAAkB,YAAY,IAAI,2BAA2B,EAAE,CAClE,CAAA;YACH,CAAC;YAED,MAAM,IAAI,GAAG,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAA+B,CAAA;YAClE,MAAM,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAA;YAC9C,OAAO,IAAI,CAAA;QACb,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,KAAK,CAAC,2BAA2B,KAAK,EAAE,CAAC,CAAA;YAChD,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAA;QAC3C,CAAC;IACH,CAAC;IAED,sEAAsE;IACtE,yEAAyE;IAClE,KAAK,CAAC,MAAM;QACjB,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAA;IACvD,CAAC;CACF;AApED,wDAoEC"}
1
+ {"version":3,"file":"TrustCredentialService.js","sourceRoot":"","sources":["../../src/services/TrustCredentialService.ts"],"names":[],"mappings":";AAAA,yCAAyC;;;AAGzC,iCAA8B;AAI9B,MAAM,MAAM,GAAG,IAAI,cAAM,CAAC;IACxB,IAAI,EAAE,uBAAuB;IAC7B,IAAI,EAAE,QAAQ;IACd,iBAAiB,EAAE,+BAA+B;CACnD,CAAC,CAAA;AAEF;;;;;;GAMG;AACH,MAAa,sBAAsB;IAGjC,YACU,OAAe,EACf,OAAmB;QADnB,YAAO,GAAP,OAAO,CAAQ;QACf,YAAO,GAAP,OAAO,CAAY;QAE3B,IAAI,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,OAAO,KAAK,CAAA;IACpE,CAAC;IAED;;;;;;;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7 +2,7 @@
2
2
  "name": "@2060.io/vs-agent-client",
3
3
  "main": "build/index",
4
4
  "types": "build/index",
5
- "version": "1.6.0-dev.28",
5
+ "version": "1.6.0-dev.29",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/2060-io/vs-agent"
@@ -19,7 +19,7 @@
19
19
  "class-validator": "0.14.1",
20
20
  "express": "^4.18.1",
21
21
  "tslog": "^4.8.2",
22
- "@2060.io/vs-agent-model": "1.6.0-dev.28"
22
+ "@2060.io/vs-agent-model": "1.6.0-dev.29"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@nestjs/common": "^10.0.0",
@@ -34,6 +34,6 @@
34
34
  "clean": "rimraf -rf ./build",
35
35
  "compile": "tsc -p tsconfig.build.json",
36
36
  "version": "pnpm version",
37
- "test": "jest --passWithNoTests"
37
+ "test": "vitest"
38
38
  }
39
39
  }