@sd-jwt/sd-jwt-vc 0.6.1 → 0.6.2-next.10

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.
package/README.md CHANGED
@@ -38,13 +38,13 @@ Here's a basic example of how to use this library:
38
38
  import { DisclosureFrame } from '@sd-jwt/sd-jwt-vc';
39
39
 
40
40
  // identifier of the issuer
41
- const iss = "University";
41
+ const iss = 'University';
42
42
 
43
43
  // issuance time
44
44
  const iat = new Date().getTime() / 1000;
45
45
 
46
46
  //unique identifier of the schema
47
- const vct = "University-Degree";
47
+ const vct = 'University-Degree';
48
48
 
49
49
  // Issuer defines the claims object with the user's information
50
50
  const claims = {
@@ -61,7 +61,10 @@ const disclosureFrame: DisclosureFrame<typeof claims> = {
61
61
 
62
62
  // Issuer issues a signed JWT credential with the specified claims and disclosure frame
63
63
  // returns an encoded JWT
64
- const credential = await sdjwt.issue({iss, iat, vct, ...claims}, disclosureFrame);
64
+ const credential = await sdjwt.issue(
65
+ { iss, iat, vct, ...claims },
66
+ disclosureFrame,
67
+ );
65
68
 
66
69
  // Holder may validate the credential from the issuer
67
70
  const valid = await sdjwt.validate(credential);
@@ -78,7 +81,7 @@ const presentation = await sdjwt.present(credential, presentationFrame);
78
81
  const verified = await sdjwt.verify(presentation);
79
82
  ```
80
83
 
81
- Check out more details in our [documentation](https://github.com/openwallet-foundation-labs/sd-jwt-js/tree/next/docs) or [examples](https://github.com/openwallet-foundation-labs/sd-jwt-js/tree/next/examples)
84
+ Check out more details in our [documentation](https://github.com/openwallet-foundation-labs/sd-jwt-js/tree/main/docs) or [examples](https://github.com/openwallet-foundation-labs/sd-jwt-js/tree/main/examples)
82
85
 
83
86
  ### Dependencies
84
87
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sd-jwt/sd-jwt-vc",
3
- "version": "0.6.1",
3
+ "version": "0.6.2-next.10+074fe88",
4
4
  "description": "sd-jwt draft 7 implementation in typescript",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -39,11 +39,11 @@
39
39
  },
40
40
  "license": "Apache-2.0",
41
41
  "dependencies": {
42
- "@sd-jwt/core": "0.6.1"
42
+ "@sd-jwt/core": "0.6.2-next.10+074fe88"
43
43
  },
44
44
  "devDependencies": {
45
- "@sd-jwt/crypto-nodejs": "0.6.1",
46
- "@sd-jwt/types": "0.6.1"
45
+ "@sd-jwt/crypto-nodejs": "0.6.2-next.10+074fe88",
46
+ "@sd-jwt/types": "0.6.2-next.10+074fe88"
47
47
  },
48
48
  "publishConfig": {
49
49
  "access": "public"
@@ -61,5 +61,5 @@
61
61
  "esm"
62
62
  ]
63
63
  },
64
- "gitHead": "f19b76c7c3a66c539a5eac06ff20ad2ac17dcf47"
64
+ "gitHead": "074fe884e44803f22ff56a9f1b2ea6df72e45a84"
65
65
  }
@@ -125,7 +125,10 @@ describe('App', () => {
125
125
  firstname: true,
126
126
  id: true,
127
127
  };
128
- const presentedSDJwt = await sdjwt.present(encodedSdjwt, presentationFrame);
128
+ const presentedSDJwt = await sdjwt.present<typeof claims>(
129
+ encodedSdjwt,
130
+ presentationFrame,
131
+ );
129
132
  expect(presentedSDJwt).toBeDefined();
130
133
 
131
134
  const presentationClaims = await sdjwt.getClaims(presentedSDJwt);
@@ -236,7 +239,7 @@ async function JSONtest(filename: string) {
236
239
  payload,
237
240
  });
238
241
 
239
- const presentedSDJwt = await sdjwt.present(
242
+ const presentedSDJwt = await sdjwt.present<typeof claims>(
240
243
  encodedSdjwt,
241
244
  test.presentationFrames,
242
245
  );