@sphereon/ssi-sdk-ext.identifier-resolution 0.34.1-next.88 → 0.36.0
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 +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +13 -13
- package/plugin.schema.json +2 -2
- package/src/agent/IdentifierResolution.ts +11 -11
- package/src/functions/LegacySupport.ts +3 -3
- package/src/functions/externalIdentifierFunctions.ts +9 -9
- package/src/functions/externalOIDFIdentifier.ts +1 -1
- package/src/functions/managedIdentifierFunctions.ts +11 -11
- package/src/types/IIdentifierResolution.ts +3 -3
- package/src/types/externalIdentifierTypes.ts +2 -3
package/dist/tsdoc-metadata.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ssi-sdk-ext.identifier-resolution",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.0",
|
|
4
4
|
"source": "./src/index.ts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"generate-plugin-schema": "tsx ../../packages/dev/bin/sphereon.js dev generate-plugin-schema"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@sphereon/ssi-sdk-ext.did-utils": "0.
|
|
31
|
-
"@sphereon/ssi-sdk-ext.key-utils": "0.
|
|
32
|
-
"@sphereon/ssi-sdk-ext.x509-utils": "0.
|
|
33
|
-
"@sphereon/ssi-sdk.agent-config": "0.
|
|
34
|
-
"@sphereon/ssi-sdk.oidf-client": "0.
|
|
35
|
-
"@sphereon/ssi-types": "0.
|
|
30
|
+
"@sphereon/ssi-sdk-ext.did-utils": "0.36.0",
|
|
31
|
+
"@sphereon/ssi-sdk-ext.key-utils": "0.36.0",
|
|
32
|
+
"@sphereon/ssi-sdk-ext.x509-utils": "0.36.0",
|
|
33
|
+
"@sphereon/ssi-sdk.agent-config": "0.36.0",
|
|
34
|
+
"@sphereon/ssi-sdk.oidf-client": "0.36.0",
|
|
35
|
+
"@sphereon/ssi-types": "0.36.0",
|
|
36
36
|
"@veramo/core": "4.2.0",
|
|
37
37
|
"@veramo/utils": "4.2.0",
|
|
38
38
|
"debug": "^4.3.4",
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
"uint8arrays": "3.1.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@sphereon/ssi-sdk-ext.did-provider-jwk": "0.
|
|
44
|
-
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.
|
|
45
|
-
"@sphereon/ssi-sdk-ext.key-manager": "0.
|
|
46
|
-
"@sphereon/ssi-sdk-ext.kms-local": "0.
|
|
47
|
-
"@sphereon/ssi-sdk.dev": "0.
|
|
43
|
+
"@sphereon/ssi-sdk-ext.did-provider-jwk": "0.36.0",
|
|
44
|
+
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.36.0",
|
|
45
|
+
"@sphereon/ssi-sdk-ext.key-manager": "0.36.0",
|
|
46
|
+
"@sphereon/ssi-sdk-ext.kms-local": "0.36.0",
|
|
47
|
+
"@sphereon/ssi-sdk.dev": "0.36.0",
|
|
48
48
|
"@veramo/data-store": "4.2.0",
|
|
49
49
|
"@veramo/did-manager": "4.2.0",
|
|
50
50
|
"@veramo/did-resolver": "4.2.0",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"X.509 Certificates",
|
|
79
79
|
"ARF"
|
|
80
80
|
],
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "f713d3a83948ef69aaa7d435700b16d5655ac863"
|
|
82
82
|
}
|
package/plugin.schema.json
CHANGED
|
@@ -1052,9 +1052,9 @@
|
|
|
1052
1052
|
"type": "object"
|
|
1053
1053
|
},
|
|
1054
1054
|
"DidDocumentJwks": {
|
|
1055
|
-
"$ref": "#/components/schemas/Record<Exclude<DIDDocumentSection,(\"publicKey\"|\"service\")>,def-interface-.ts-
|
|
1055
|
+
"$ref": "#/components/schemas/Record<Exclude<DIDDocumentSection,(\"publicKey\"|\"service\")>,def-interface-.ts-36152-36877-.ts-0-63876[]>"
|
|
1056
1056
|
},
|
|
1057
|
-
"Record<Exclude<DIDDocumentSection,(\"publicKey\"|\"service\")>,def-interface-.ts-
|
|
1057
|
+
"Record<Exclude<DIDDocumentSection,(\"publicKey\"|\"service\")>,def-interface-.ts-36152-36877-.ts-0-63876[]>": {
|
|
1058
1058
|
"type": "object",
|
|
1059
1059
|
"properties": {
|
|
1060
1060
|
"verificationMethod": {
|
|
@@ -78,63 +78,63 @@ export class IdentifierResolution implements IAgentPlugin {
|
|
|
78
78
|
*/
|
|
79
79
|
private async identifierManagedGet(
|
|
80
80
|
args: ManagedIdentifierOptsOrResult,
|
|
81
|
-
context: IAgentContext<IKeyManager & IIdentifierResolution
|
|
81
|
+
context: IAgentContext<IKeyManager & IIdentifierResolution>,
|
|
82
82
|
): Promise<ManagedIdentifierResult> {
|
|
83
83
|
return await ensureManagedIdentifierResult({ ...args, crypto: this._crypto }, context)
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
private async identifierManagedGetByDid(
|
|
87
87
|
args: ManagedIdentifierDidOpts,
|
|
88
|
-
context: IAgentContext<IKeyManager & IDIDManager & IIdentifierResolution
|
|
88
|
+
context: IAgentContext<IKeyManager & IDIDManager & IIdentifierResolution>,
|
|
89
89
|
): Promise<ManagedIdentifierDidResult> {
|
|
90
90
|
return (await this.identifierManagedGet({ ...args, method: 'did' }, context)) as ManagedIdentifierDidResult
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
private async identifierManagedGetByKid(
|
|
94
94
|
args: ManagedIdentifierKidOpts,
|
|
95
|
-
context: IAgentContext<IKeyManager & IIdentifierResolution
|
|
95
|
+
context: IAgentContext<IKeyManager & IIdentifierResolution>,
|
|
96
96
|
): Promise<ManagedIdentifierKidResult> {
|
|
97
97
|
return (await this.identifierManagedGet({ ...args, method: 'kid' }, context)) as ManagedIdentifierKidResult
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
private async identifierManagedGetByKey(
|
|
101
101
|
args: ManagedIdentifierKeyOpts,
|
|
102
|
-
context: IAgentContext<IKeyManager & IIdentifierResolution
|
|
102
|
+
context: IAgentContext<IKeyManager & IIdentifierResolution>,
|
|
103
103
|
): Promise<ManagedIdentifierKeyResult> {
|
|
104
104
|
return (await this.identifierManagedGet({ ...args, method: 'key' }, context)) as ManagedIdentifierKeyResult
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
private async identifierManagedGetByCoseKey(
|
|
108
108
|
args: ManagedIdentifierCoseKeyOpts,
|
|
109
|
-
context: IAgentContext<IKeyManager & IIdentifierResolution
|
|
109
|
+
context: IAgentContext<IKeyManager & IIdentifierResolution>,
|
|
110
110
|
): Promise<ManagedIdentifierCoseKeyResult> {
|
|
111
111
|
return (await this.identifierManagedGet({ ...args, method: 'cose_key' }, context)) as ManagedIdentifierCoseKeyResult
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
private async identifierManagedGetByOID4VCIssuer(
|
|
115
115
|
args: ManagedIdentifierOID4VCIssuerOpts,
|
|
116
|
-
context: IAgentContext<IKeyManager & IIdentifierResolution
|
|
116
|
+
context: IAgentContext<IKeyManager & IIdentifierResolution>,
|
|
117
117
|
): Promise<ManagedIdentifierOID4VCIssuerResult> {
|
|
118
118
|
return (await this.identifierManagedGet({ ...args, method: 'oid4vci-issuer' }, context)) as ManagedIdentifierOID4VCIssuerResult
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
private async identifierManagedGetByJwk(
|
|
122
122
|
args: ManagedIdentifierJwkOpts,
|
|
123
|
-
context: IAgentContext<IKeyManager & IIdentifierResolution
|
|
123
|
+
context: IAgentContext<IKeyManager & IIdentifierResolution>,
|
|
124
124
|
): Promise<ManagedIdentifierJwkResult> {
|
|
125
125
|
return (await this.identifierManagedGet({ ...args, method: 'jwk' }, context)) as ManagedIdentifierJwkResult
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
private async identifierManagedGetByX5c(
|
|
129
129
|
args: ManagedIdentifierX5cOpts,
|
|
130
|
-
context: IAgentContext<IKeyManager & IIdentifierResolution
|
|
130
|
+
context: IAgentContext<IKeyManager & IIdentifierResolution>,
|
|
131
131
|
): Promise<ManagedIdentifierX5cResult> {
|
|
132
132
|
return (await this.identifierManagedGet({ ...args, method: 'x5c' }, context)) as ManagedIdentifierX5cResult
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
private async identifierExternalResolve(
|
|
136
136
|
args: ExternalIdentifierOpts,
|
|
137
|
-
context: IAgentContext<IKeyManager | IOIDFClient
|
|
137
|
+
context: IAgentContext<IKeyManager | IOIDFClient>,
|
|
138
138
|
): Promise<ExternalIdentifierResult> {
|
|
139
139
|
return await resolveExternalIdentifier({ ...args, crypto: this._crypto }, context)
|
|
140
140
|
}
|
|
@@ -149,7 +149,7 @@ export class IdentifierResolution implements IAgentPlugin {
|
|
|
149
149
|
|
|
150
150
|
private async identifierExternalResolveByCoseKey(
|
|
151
151
|
args: ExternalIdentifierCoseKeyOpts,
|
|
152
|
-
context: IAgentContext<any
|
|
152
|
+
context: IAgentContext<any>,
|
|
153
153
|
): Promise<ExternalIdentifierCoseKeyResult> {
|
|
154
154
|
return (await this.identifierExternalResolve({ ...args, method: 'cose_key' }, context)) as ExternalIdentifierCoseKeyResult
|
|
155
155
|
}
|
|
@@ -160,7 +160,7 @@ export class IdentifierResolution implements IAgentPlugin {
|
|
|
160
160
|
|
|
161
161
|
private async identifierExternalResolveByOIDFEntityId(
|
|
162
162
|
args: ExternalIdentifierOIDFEntityIdOpts,
|
|
163
|
-
context: IAgentContext<any
|
|
163
|
+
context: IAgentContext<any>,
|
|
164
164
|
): Promise<ExternalIdentifierOIDFEntityIdResult> {
|
|
165
165
|
return (await this.identifierExternalResolve({ ...args, method: 'entity_id' }, context)) as ExternalIdentifierOIDFEntityIdResult
|
|
166
166
|
}
|
|
@@ -13,7 +13,7 @@ export function legacyKeyRefsToIdentifierOpts(opts: {
|
|
|
13
13
|
}): ManagedIdentifierOptsOrResult {
|
|
14
14
|
if (!opts.idOpts) {
|
|
15
15
|
console.warn(
|
|
16
|
-
`Legacy idOpts being used. Support will be dropped in the future. Consider switching to the idOpts, to have support for DIDs, JWKS, x5c etc. See https://github.com/Sphereon-Opensource/SSI-SDK-crypto-extensions/tree/feature/multi_identifier_support/packages/identifier-resolution
|
|
16
|
+
`Legacy idOpts being used. Support will be dropped in the future. Consider switching to the idOpts, to have support for DIDs, JWKS, x5c etc. See https://github.com/Sphereon-Opensource/SSI-SDK-crypto-extensions/tree/feature/multi_identifier_support/packages/identifier-resolution`,
|
|
17
17
|
)
|
|
18
18
|
// legacy way
|
|
19
19
|
let kmsKeyRef =
|
|
@@ -37,14 +37,14 @@ export function legacyKeyRefsToIdentifierOpts(opts: {
|
|
|
37
37
|
if (opts.keyRef && !idOpts.kmsKeyRef) {
|
|
38
38
|
// legacy way
|
|
39
39
|
console.warn(
|
|
40
|
-
`Legacy keyRef being used. Support will be dropped in the future. Consider switching to the idOpts, to have support for DIDs, JWKS, x5c etc. See https://github.com/Sphereon-Opensource/SSI-SDK-crypto-extensions/tree/feature/multi_identifier_support/packages/identifier-resolution
|
|
40
|
+
`Legacy keyRef being used. Support will be dropped in the future. Consider switching to the idOpts, to have support for DIDs, JWKS, x5c etc. See https://github.com/Sphereon-Opensource/SSI-SDK-crypto-extensions/tree/feature/multi_identifier_support/packages/identifier-resolution`,
|
|
41
41
|
)
|
|
42
42
|
idOpts.kmsKeyRef = opts.keyRef
|
|
43
43
|
}
|
|
44
44
|
if (opts.iss && !idOpts.issuer) {
|
|
45
45
|
// legacy way
|
|
46
46
|
console.warn(
|
|
47
|
-
`Legacy iss being used. Support will be dropped in the future. Consider switching to the idOpts, to have support for DIDs, JWKS, x5c etc. See https://github.com/Sphereon-Opensource/SSI-SDK-crypto-extensions/tree/feature/multi_identifier_support/packages/identifier-resolution
|
|
47
|
+
`Legacy iss being used. Support will be dropped in the future. Consider switching to the idOpts, to have support for DIDs, JWKS, x5c etc. See https://github.com/Sphereon-Opensource/SSI-SDK-crypto-extensions/tree/feature/multi_identifier_support/packages/identifier-resolution`,
|
|
48
48
|
)
|
|
49
49
|
idOpts.issuer = opts.iss
|
|
50
50
|
}
|
|
@@ -43,7 +43,7 @@ export async function resolveExternalIdentifier(
|
|
|
43
43
|
opts: ExternalIdentifierOpts & {
|
|
44
44
|
crypto?: webcrypto.Crypto
|
|
45
45
|
},
|
|
46
|
-
context: IAgentContext<any
|
|
46
|
+
context: IAgentContext<any>,
|
|
47
47
|
): Promise<ExternalIdentifierResult> {
|
|
48
48
|
let method: ExternalIdentifierMethod | undefined
|
|
49
49
|
if (isExternalIdentifierDidOpts(opts)) {
|
|
@@ -70,7 +70,7 @@ export async function resolveExternalX5cIdentifier(
|
|
|
70
70
|
opts: ExternalIdentifierX5cOpts & {
|
|
71
71
|
crypto?: webcrypto.Crypto
|
|
72
72
|
},
|
|
73
|
-
context: IAgentContext<IResolver & IDIDManager
|
|
73
|
+
context: IAgentContext<IResolver & IDIDManager>,
|
|
74
74
|
): Promise<ExternalIdentifierX5cResult> {
|
|
75
75
|
if (!isExternalIdentifierX5cOpts(opts)) {
|
|
76
76
|
return Promise.reject('External x5c Identifier args need to be provided')
|
|
@@ -129,7 +129,7 @@ export async function resolveExternalX5cIdentifier(
|
|
|
129
129
|
jwkThumbprint: calculateJwkThumbprint({ jwk }),
|
|
130
130
|
publicKeyHex: jwkTtoPublicKeyHex(jwk),
|
|
131
131
|
} satisfies ExternalJwkInfo
|
|
132
|
-
})
|
|
132
|
+
}),
|
|
133
133
|
)
|
|
134
134
|
}
|
|
135
135
|
if (jwks.length === 0) {
|
|
@@ -158,7 +158,7 @@ export async function resolveExternalJwkIdentifier(
|
|
|
158
158
|
opts: ExternalIdentifierJwkOpts & {
|
|
159
159
|
x5c?: ExternalIdentifierX5cOpts
|
|
160
160
|
},
|
|
161
|
-
context: IAgentContext<any
|
|
161
|
+
context: IAgentContext<any>,
|
|
162
162
|
): Promise<ExternalIdentifierJwkResult> {
|
|
163
163
|
if (!isExternalIdentifierJwkOpts(opts)) {
|
|
164
164
|
return Promise.reject('External JWK Identifier args need to be provided')
|
|
@@ -193,7 +193,7 @@ export async function resolveExternalCoseKeyIdentifier(
|
|
|
193
193
|
opts: ExternalIdentifierCoseKeyOpts & {
|
|
194
194
|
x5c?: ExternalIdentifierX5cOpts
|
|
195
195
|
},
|
|
196
|
-
context: IAgentContext<any
|
|
196
|
+
context: IAgentContext<any>,
|
|
197
197
|
): Promise<ExternalIdentifierCoseKeyResult> {
|
|
198
198
|
if (!isExternalIdentifierCoseKeyOpts(opts)) {
|
|
199
199
|
return Promise.reject('External Cose Key args need to be provided')
|
|
@@ -223,7 +223,7 @@ export async function resolveExternalCoseKeyIdentifier(
|
|
|
223
223
|
|
|
224
224
|
export async function resolveExternalDidIdentifier(
|
|
225
225
|
opts: ExternalIdentifierDidOpts,
|
|
226
|
-
context: IAgentContext<IResolver & IDIDManager
|
|
226
|
+
context: IAgentContext<IResolver & IDIDManager>,
|
|
227
227
|
): Promise<ExternalIdentifierDidResult> {
|
|
228
228
|
if (!isExternalIdentifierDidOpts(opts)) {
|
|
229
229
|
return Promise.reject('External DID Identifier args need to be provided')
|
|
@@ -253,7 +253,7 @@ export async function resolveExternalDidIdentifier(
|
|
|
253
253
|
Array.from(
|
|
254
254
|
Object.values(didJwks)
|
|
255
255
|
.filter((jwks) => isDefined(jwks) && jwks.length > 0)
|
|
256
|
-
.flatMap((jwks) => jwks)
|
|
256
|
+
.flatMap((jwks) => jwks),
|
|
257
257
|
)
|
|
258
258
|
.flatMap((jwk) => {
|
|
259
259
|
return {
|
|
@@ -263,8 +263,8 @@ export async function resolveExternalDidIdentifier(
|
|
|
263
263
|
publicKeyHex: jwkTtoPublicKeyHex(jwk),
|
|
264
264
|
}
|
|
265
265
|
})
|
|
266
|
-
.map((jwk) => JSON.stringify(jwk))
|
|
267
|
-
)
|
|
266
|
+
.map((jwk) => JSON.stringify(jwk)),
|
|
267
|
+
),
|
|
268
268
|
).map((jwks) => JSON.parse(jwks))
|
|
269
269
|
: []
|
|
270
270
|
|
|
@@ -30,7 +30,7 @@ const { fromString, toString } = u8a
|
|
|
30
30
|
*/
|
|
31
31
|
export async function resolveExternalOIDFEntityIdIdentifier(
|
|
32
32
|
opts: ExternalIdentifierOIDFEntityIdOpts,
|
|
33
|
-
context: IAgentContext<IOIDFClient
|
|
33
|
+
context: IAgentContext<IOIDFClient>,
|
|
34
34
|
): Promise<ExternalIdentifierOIDFEntityIdResult> {
|
|
35
35
|
let { trustAnchors, identifier } = opts
|
|
36
36
|
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
|
|
42
42
|
export async function getManagedKidIdentifier(
|
|
43
43
|
opts: ManagedIdentifierKidOpts,
|
|
44
|
-
context: IAgentContext<IKeyManager
|
|
44
|
+
context: IAgentContext<IKeyManager>,
|
|
45
45
|
): Promise<ManagedIdentifierKidResult> {
|
|
46
46
|
const method = 'kid'
|
|
47
47
|
let key: IKey | undefined = undefined
|
|
@@ -85,7 +85,7 @@ export async function getManagedKidIdentifier(
|
|
|
85
85
|
export function isManagedIdentifierResult(
|
|
86
86
|
identifier: ManagedIdentifierOptsOrResult & {
|
|
87
87
|
crypto?: webcrypto.Crypto
|
|
88
|
-
}
|
|
88
|
+
},
|
|
89
89
|
): identifier is ManagedIdentifierResult {
|
|
90
90
|
return 'key' in identifier && 'kmsKeyRef' in identifier && 'method' in identifier && 'opts' in identifier && 'jwkThumbprint' in identifier
|
|
91
91
|
}
|
|
@@ -99,7 +99,7 @@ export async function ensureManagedIdentifierResult(
|
|
|
99
99
|
identifier: ManagedIdentifierOptsOrResult & {
|
|
100
100
|
crypto?: webcrypto.Crypto
|
|
101
101
|
},
|
|
102
|
-
context: IAgentContext<IKeyManager
|
|
102
|
+
context: IAgentContext<IKeyManager>,
|
|
103
103
|
): Promise<ManagedIdentifierResult> {
|
|
104
104
|
const { lazyDisabled = false } = identifier
|
|
105
105
|
return !lazyDisabled && isManagedIdentifierResult(identifier) ? identifier : await getManagedIdentifier(identifier, context)
|
|
@@ -142,7 +142,7 @@ export async function getManagedKeyIdentifier(opts: ManagedIdentifierKeyOpts, _c
|
|
|
142
142
|
*/
|
|
143
143
|
export async function getManagedCoseKeyIdentifier(
|
|
144
144
|
opts: ManagedIdentifierCoseKeyOpts,
|
|
145
|
-
context: IAgentContext<any
|
|
145
|
+
context: IAgentContext<any>,
|
|
146
146
|
): Promise<ManagedIdentifierCoseKeyResult> {
|
|
147
147
|
const method = 'cose_key'
|
|
148
148
|
const coseKey: ICoseKeyJson = opts.identifier
|
|
@@ -192,7 +192,7 @@ export async function getManagedDidIdentifier(opts: ManagedIdentifierDidOpts, co
|
|
|
192
192
|
identifier,
|
|
193
193
|
vmRelationship: opts.vmRelationship ?? 'verificationMethod',
|
|
194
194
|
},
|
|
195
|
-
context
|
|
195
|
+
context,
|
|
196
196
|
)
|
|
197
197
|
const key = extendedKey
|
|
198
198
|
const controllerKeyId = identifier.controllerKeyId
|
|
@@ -225,7 +225,7 @@ export async function getManagedDidIdentifier(opts: ManagedIdentifierDidOpts, co
|
|
|
225
225
|
|
|
226
226
|
export async function getManagedJwkIdentifier(
|
|
227
227
|
opts: ManagedIdentifierJwkOpts,
|
|
228
|
-
context: IAgentContext<IKeyManager
|
|
228
|
+
context: IAgentContext<IKeyManager>,
|
|
229
229
|
): Promise<ManagedIdentifierJwkResult> {
|
|
230
230
|
const method = 'jwk'
|
|
231
231
|
const { kid, issuer } = opts
|
|
@@ -255,7 +255,7 @@ export async function getManagedX5cIdentifier(
|
|
|
255
255
|
opts: ManagedIdentifierX5cOpts & {
|
|
256
256
|
crypto?: webcrypto.Crypto
|
|
257
257
|
},
|
|
258
|
-
context: IAgentContext<IKeyManager
|
|
258
|
+
context: IAgentContext<IKeyManager>,
|
|
259
259
|
): Promise<ManagedIdentifierX5cResult> {
|
|
260
260
|
const { kid, issuer } = opts
|
|
261
261
|
const method = 'x5c'
|
|
@@ -294,7 +294,7 @@ export async function getManagedX5cIdentifier(
|
|
|
294
294
|
|
|
295
295
|
export async function getManagedOID4VCIssuerIdentifier(
|
|
296
296
|
opts: ManagedIdentifierOID4VCIssuerOpts,
|
|
297
|
-
context: IAgentContext<IKeyManager
|
|
297
|
+
context: IAgentContext<IKeyManager>,
|
|
298
298
|
): Promise<ManagedIdentifierOID4VCIssuerResult> {
|
|
299
299
|
const { identifier } = opts
|
|
300
300
|
const method = 'oid4vci-issuer'
|
|
@@ -339,7 +339,7 @@ export async function getManagedIdentifier(
|
|
|
339
339
|
opts: ManagedIdentifierOptsOrResult & {
|
|
340
340
|
crypto?: webcrypto.Crypto
|
|
341
341
|
},
|
|
342
|
-
context: IAgentContext<IKeyManager
|
|
342
|
+
context: IAgentContext<IKeyManager>,
|
|
343
343
|
): Promise<ManagedIdentifierResult> {
|
|
344
344
|
let resolutionResult: ManagedIdentifierResult
|
|
345
345
|
if (isManagedIdentifierResult(opts)) {
|
|
@@ -375,7 +375,7 @@ export async function getManagedIdentifier(
|
|
|
375
375
|
|
|
376
376
|
export async function managedIdentifierToKeyResult(
|
|
377
377
|
identifier: ManagedIdentifierOptsOrResult,
|
|
378
|
-
context: IAgentContext<IIdentifierResolution & IKeyManager
|
|
378
|
+
context: IAgentContext<IIdentifierResolution & IKeyManager>,
|
|
379
379
|
): Promise<ManagedIdentifierKeyResult> {
|
|
380
380
|
const resolved = await ensureManagedIdentifierResult(identifier, context)
|
|
381
381
|
if (isManagedIdentifierKeyResult(resolved)) {
|
|
@@ -391,7 +391,7 @@ export async function managedIdentifierToKeyResult(
|
|
|
391
391
|
|
|
392
392
|
export async function managedIdentifierToJwk(
|
|
393
393
|
identifier: ManagedIdentifierOptsOrResult,
|
|
394
|
-
context: IAgentContext<IIdentifierResolution & IKeyManager
|
|
394
|
+
context: IAgentContext<IIdentifierResolution & IKeyManager>,
|
|
395
395
|
): Promise<ManagedIdentifierJwkResult> {
|
|
396
396
|
const resolved = await ensureManagedIdentifierResult(identifier, context)
|
|
397
397
|
if (isManagedIdentifierJwkResult(resolved)) {
|
|
@@ -80,12 +80,12 @@ export interface IIdentifierResolution extends IPluginMethodMap {
|
|
|
80
80
|
|
|
81
81
|
identifierManagedGetByCoseKey(
|
|
82
82
|
args: ManagedIdentifierCoseKeyOpts,
|
|
83
|
-
context: IAgentContext<IKeyManager & IIdentifierResolution
|
|
83
|
+
context: IAgentContext<IKeyManager & IIdentifierResolution>,
|
|
84
84
|
): Promise<ManagedIdentifierCoseKeyResult>
|
|
85
85
|
|
|
86
86
|
identifierManagedGetByOID4VCIssuer(
|
|
87
87
|
args: ManagedIdentifierOID4VCIssuerOpts,
|
|
88
|
-
context: IAgentContext<any
|
|
88
|
+
context: IAgentContext<any>,
|
|
89
89
|
): Promise<ManagedIdentifierOID4VCIssuerResult>
|
|
90
90
|
|
|
91
91
|
// TODO: We can create a custom managed identifier method allowing developers to register a callback function to get their implementation hooked up. Needs more investigation as it would also impact the KMS
|
|
@@ -108,6 +108,6 @@ export interface IIdentifierResolution extends IPluginMethodMap {
|
|
|
108
108
|
|
|
109
109
|
identifierExternalResolveByOIDFEntityId(
|
|
110
110
|
args: ExternalIdentifierOIDFEntityIdOpts,
|
|
111
|
-
context: IAgentContext<any
|
|
111
|
+
context: IAgentContext<any>,
|
|
112
112
|
): Promise<ExternalIdentifierOIDFEntityIdResult>
|
|
113
113
|
}
|