@sphereon/ssi-types 0.18.2-next.9 → 0.18.2-unstable.13
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/LICENSE +201 -201
- package/README.md +49 -49
- package/dist/index.d.ts +3 -3
- package/dist/index.js +19 -19
- package/dist/mapper/credential-mapper.d.ts +107 -107
- package/dist/mapper/credential-mapper.js +556 -556
- package/dist/mapper/index.d.ts +1 -1
- package/dist/mapper/index.js +17 -17
- package/dist/types/did.d.ts +35 -35
- package/dist/types/did.js +75 -75
- package/dist/types/generic.d.ts +7 -7
- package/dist/types/generic.js +2 -2
- package/dist/types/index.d.ts +6 -6
- package/dist/types/index.js +22 -22
- package/dist/types/pex.d.ts +35 -35
- package/dist/types/pex.js +2 -2
- package/dist/types/sd-jwt-vc.d.ts +170 -170
- package/dist/types/sd-jwt-vc.js +71 -71
- package/dist/types/vc.d.ts +23 -23
- package/dist/types/vc.js +23 -23
- package/dist/types/w3c-vc.d.ts +247 -247
- package/dist/types/w3c-vc.js +29 -29
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +17 -17
- package/dist/utils/object.d.ts +6 -6
- package/dist/utils/object.js +20 -20
- package/package.json +2 -2
- package/src/index.ts +3 -3
- package/src/mapper/credential-mapper.ts +686 -686
- package/src/mapper/index.ts +1 -1
- package/src/types/generic.ts +8 -8
- package/src/types/index.ts +6 -6
- package/src/types/pex.ts +36 -36
- package/src/types/sd-jwt-vc.ts +232 -232
- package/src/types/vc.ts +62 -62
- package/src/types/w3c-vc.ts +300 -300
- package/src/utils/index.ts +1 -1
- package/src/utils/object.ts +19 -19
package/src/types/vc.ts
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
import { SdJwtDecodedVerifiableCredential, WrappedSdJwtVerifiableCredential, WrappedSdJwtVerifiablePresentation } from './sd-jwt-vc'
|
|
2
|
-
import {
|
|
3
|
-
JwtDecodedVerifiableCredential,
|
|
4
|
-
JwtDecodedVerifiablePresentation,
|
|
5
|
-
W3CVerifiableCredential,
|
|
6
|
-
W3CVerifiablePresentation,
|
|
7
|
-
WrappedW3CVerifiableCredential,
|
|
8
|
-
WrappedW3CVerifiablePresentation,
|
|
9
|
-
} from './w3c-vc'
|
|
10
|
-
|
|
11
|
-
export type WrappedVerifiableCredential = WrappedW3CVerifiableCredential | WrappedSdJwtVerifiableCredential
|
|
12
|
-
|
|
13
|
-
export type WrappedVerifiablePresentation = WrappedW3CVerifiablePresentation | WrappedSdJwtVerifiablePresentation
|
|
14
|
-
|
|
15
|
-
export enum OriginalType {
|
|
16
|
-
// W3C
|
|
17
|
-
JSONLD = 'json-ld',
|
|
18
|
-
JWT_ENCODED = 'jwt-encoded',
|
|
19
|
-
JWT_DECODED = 'jwt-decoded',
|
|
20
|
-
|
|
21
|
-
// SD-JWT
|
|
22
|
-
SD_JWT_VC_ENCODED = 'sd-jwt-vc-encoded',
|
|
23
|
-
SD_JWT_VC_DECODED = 'sd-jwt-vc-decoded',
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export type CredentialFormat =
|
|
27
|
-
// W3C
|
|
28
|
-
| 'jwt_vc'
|
|
29
|
-
| 'ldp_vc'
|
|
30
|
-
// SD-JWT
|
|
31
|
-
| 'vc+sd-jwt'
|
|
32
|
-
// Remaining
|
|
33
|
-
| 'jwt'
|
|
34
|
-
| 'ldp'
|
|
35
|
-
| string
|
|
36
|
-
|
|
37
|
-
export type PresentationFormat =
|
|
38
|
-
// W3C
|
|
39
|
-
| 'jwt_vp'
|
|
40
|
-
| 'ldp_vp'
|
|
41
|
-
// SD-JWT
|
|
42
|
-
| 'vc+sd-jwt'
|
|
43
|
-
// Remaining
|
|
44
|
-
| 'jwt'
|
|
45
|
-
| 'ldp'
|
|
46
|
-
| string
|
|
47
|
-
|
|
48
|
-
export type ClaimFormat = CredentialFormat | PresentationFormat
|
|
49
|
-
|
|
50
|
-
export type OriginalVerifiableCredential = W3CVerifiableCredential | JwtDecodedVerifiableCredential | SdJwtDecodedVerifiableCredential
|
|
51
|
-
export type OriginalVerifiablePresentation = W3CVerifiablePresentation | JwtDecodedVerifiablePresentation | SdJwtDecodedVerifiableCredential
|
|
52
|
-
export type Original = OriginalVerifiablePresentation | OriginalVerifiableCredential
|
|
53
|
-
|
|
54
|
-
export const enum DocumentFormat {
|
|
55
|
-
// W3C
|
|
56
|
-
JWT,
|
|
57
|
-
JSONLD,
|
|
58
|
-
// SD-JWT
|
|
59
|
-
SD_JWT_VC,
|
|
60
|
-
// Remaining
|
|
61
|
-
EIP712,
|
|
62
|
-
}
|
|
1
|
+
import { SdJwtDecodedVerifiableCredential, WrappedSdJwtVerifiableCredential, WrappedSdJwtVerifiablePresentation } from './sd-jwt-vc'
|
|
2
|
+
import {
|
|
3
|
+
JwtDecodedVerifiableCredential,
|
|
4
|
+
JwtDecodedVerifiablePresentation,
|
|
5
|
+
W3CVerifiableCredential,
|
|
6
|
+
W3CVerifiablePresentation,
|
|
7
|
+
WrappedW3CVerifiableCredential,
|
|
8
|
+
WrappedW3CVerifiablePresentation,
|
|
9
|
+
} from './w3c-vc'
|
|
10
|
+
|
|
11
|
+
export type WrappedVerifiableCredential = WrappedW3CVerifiableCredential | WrappedSdJwtVerifiableCredential
|
|
12
|
+
|
|
13
|
+
export type WrappedVerifiablePresentation = WrappedW3CVerifiablePresentation | WrappedSdJwtVerifiablePresentation
|
|
14
|
+
|
|
15
|
+
export enum OriginalType {
|
|
16
|
+
// W3C
|
|
17
|
+
JSONLD = 'json-ld',
|
|
18
|
+
JWT_ENCODED = 'jwt-encoded',
|
|
19
|
+
JWT_DECODED = 'jwt-decoded',
|
|
20
|
+
|
|
21
|
+
// SD-JWT
|
|
22
|
+
SD_JWT_VC_ENCODED = 'sd-jwt-vc-encoded',
|
|
23
|
+
SD_JWT_VC_DECODED = 'sd-jwt-vc-decoded',
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type CredentialFormat =
|
|
27
|
+
// W3C
|
|
28
|
+
| 'jwt_vc'
|
|
29
|
+
| 'ldp_vc'
|
|
30
|
+
// SD-JWT
|
|
31
|
+
| 'vc+sd-jwt'
|
|
32
|
+
// Remaining
|
|
33
|
+
| 'jwt'
|
|
34
|
+
| 'ldp'
|
|
35
|
+
| string
|
|
36
|
+
|
|
37
|
+
export type PresentationFormat =
|
|
38
|
+
// W3C
|
|
39
|
+
| 'jwt_vp'
|
|
40
|
+
| 'ldp_vp'
|
|
41
|
+
// SD-JWT
|
|
42
|
+
| 'vc+sd-jwt'
|
|
43
|
+
// Remaining
|
|
44
|
+
| 'jwt'
|
|
45
|
+
| 'ldp'
|
|
46
|
+
| string
|
|
47
|
+
|
|
48
|
+
export type ClaimFormat = CredentialFormat | PresentationFormat
|
|
49
|
+
|
|
50
|
+
export type OriginalVerifiableCredential = W3CVerifiableCredential | JwtDecodedVerifiableCredential | SdJwtDecodedVerifiableCredential
|
|
51
|
+
export type OriginalVerifiablePresentation = W3CVerifiablePresentation | JwtDecodedVerifiablePresentation | SdJwtDecodedVerifiableCredential
|
|
52
|
+
export type Original = OriginalVerifiablePresentation | OriginalVerifiableCredential
|
|
53
|
+
|
|
54
|
+
export const enum DocumentFormat {
|
|
55
|
+
// W3C
|
|
56
|
+
JWT,
|
|
57
|
+
JSONLD,
|
|
58
|
+
// SD-JWT
|
|
59
|
+
SD_JWT_VC,
|
|
60
|
+
// Remaining
|
|
61
|
+
EIP712,
|
|
62
|
+
}
|