@sphereon/ssi-sdk.credential-vcdm2-jose-provider 0.33.1-feature.jose.vcdm.60 → 0.33.1-feature.jose.vcdm.62
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/dist/index.cjs +31 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -16
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
- package/src/did-jwt/JWT.ts +4 -4
- package/src/did-jwt/SignerAlgorithm.ts +2 -2
- package/src/did-jwt/VerifierAlgorithm.ts +15 -9
- package/src/did-jwt/util.ts +18 -4
package/src/did-jwt/util.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// @ts-ignore
|
|
2
|
-
import
|
|
2
|
+
import * as u8a from 'uint8arrays'
|
|
3
|
+
// const { concat, fromString, toString } = u8a
|
|
3
4
|
import { x25519 } from '@noble/curves/ed25519'
|
|
4
|
-
|
|
5
|
-
import type { EphemeralKeyPair } from 'did-jwt-vc'
|
|
5
|
+
|
|
6
6
|
// @ts-ignore
|
|
7
7
|
import { varint } from 'multiformats'
|
|
8
8
|
import { BaseName, decode, encode } from 'multibase'
|
|
@@ -10,8 +10,20 @@ import type { VerificationMethod } from 'did-resolver'
|
|
|
10
10
|
import { secp256k1 } from '@noble/curves/secp256k1'
|
|
11
11
|
import { p256 } from '@noble/curves/p256'
|
|
12
12
|
|
|
13
|
-
const u8a = { toString, fromString, concat }
|
|
13
|
+
// const u8a = { toString, fromString, concat }
|
|
14
|
+
|
|
15
|
+
|
|
14
16
|
|
|
17
|
+
export interface EphemeralPublicKey {
|
|
18
|
+
kty?: string
|
|
19
|
+
//ECC
|
|
20
|
+
crv?: string
|
|
21
|
+
x?: string
|
|
22
|
+
y?: string
|
|
23
|
+
//RSA
|
|
24
|
+
n?: string
|
|
25
|
+
e?: string
|
|
26
|
+
}
|
|
15
27
|
/**
|
|
16
28
|
* @deprecated Signers will be expected to return base64url `string` signatures.
|
|
17
29
|
*/
|
|
@@ -401,6 +413,7 @@ export function generateKeyPairFromSeed(seed: Uint8Array): { secretKey: Uint8Arr
|
|
|
401
413
|
secretKey: seed,
|
|
402
414
|
}
|
|
403
415
|
}
|
|
416
|
+
/*
|
|
404
417
|
|
|
405
418
|
export function genX25519EphemeralKeyPair(): EphemeralKeyPair {
|
|
406
419
|
const epk = generateKeyPair()
|
|
@@ -409,6 +422,7 @@ export function genX25519EphemeralKeyPair(): EphemeralKeyPair {
|
|
|
409
422
|
secretKey: epk.secretKey,
|
|
410
423
|
}
|
|
411
424
|
}
|
|
425
|
+
*/
|
|
412
426
|
|
|
413
427
|
/**
|
|
414
428
|
* Checks if a variable is defined and not null.
|