@sphereon/ssi-sdk.oidf-client 0.34.1-next.7 → 0.34.1-next.86

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.d.cts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as _sphereon_ssi_types from '@sphereon/ssi-types';
2
2
  import { IPluginMethodMap, IAgentContext, IAgentPlugin } from '@veramo/core';
3
3
  import { IResourceResolver } from '@sphereon/ssi-sdk.resource-resolver';
4
- import { IJwtService } from '@sphereon/ssi-sdk-ext.jwt-service';
5
4
  import { TrustChainResolveResponse, IFetchService, ICryptoService } from '@sphereon/openid-federation-client';
5
+ import { JWK } from 'jose';
6
6
 
7
7
  type IRequiredPlugins = IJwtService & IResourceResolver;
8
8
  type IRequiredContext = IAgentContext<IRequiredPlugins>;
@@ -17,6 +17,17 @@ type OIDFClientArgs = {
17
17
  fetchServiceCallback?: IFetchService;
18
18
  cryptoServiceCallback?: ICryptoService;
19
19
  };
20
+ /**
21
+ * Partial opy of IJWTService to break cyclic dep between identifier-resolution, jwt-service and oidf-client
22
+ */
23
+ interface IJwtService extends IPluginMethodMap {
24
+ jwtVerifyJwsSignature(args: VerifyJwsArgs, context: IRequiredContext): Promise<any>;
25
+ }
26
+ type VerifyJwsArgs = {
27
+ jws: any;
28
+ jwk?: JWK;
29
+ opts?: any;
30
+ };
20
31
 
21
32
  declare const oidfClientMethods: Array<string>;
22
33
  declare class OIDFClient implements IAgentPlugin {
@@ -36,4 +47,4 @@ declare const schema: any;
36
47
 
37
48
  declare const logger: _sphereon_ssi_types.ISimpleLogger<unknown>;
38
49
 
39
- export { type IOIDFClient, type IRequiredContext, type IRequiredPlugins, OIDFClient, type OIDFClientArgs, type ResolveTrustChainArgs, logger, oidfClientMethods, schema };
50
+ export { type IJwtService, type IOIDFClient, type IRequiredContext, type IRequiredPlugins, OIDFClient, type OIDFClientArgs, type ResolveTrustChainArgs, type VerifyJwsArgs, logger, oidfClientMethods, schema };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as _sphereon_ssi_types from '@sphereon/ssi-types';
2
2
  import { IPluginMethodMap, IAgentContext, IAgentPlugin } from '@veramo/core';
3
3
  import { IResourceResolver } from '@sphereon/ssi-sdk.resource-resolver';
4
- import { IJwtService } from '@sphereon/ssi-sdk-ext.jwt-service';
5
4
  import { TrustChainResolveResponse, IFetchService, ICryptoService } from '@sphereon/openid-federation-client';
5
+ import { JWK } from 'jose';
6
6
 
7
7
  type IRequiredPlugins = IJwtService & IResourceResolver;
8
8
  type IRequiredContext = IAgentContext<IRequiredPlugins>;
@@ -17,6 +17,17 @@ type OIDFClientArgs = {
17
17
  fetchServiceCallback?: IFetchService;
18
18
  cryptoServiceCallback?: ICryptoService;
19
19
  };
20
+ /**
21
+ * Partial opy of IJWTService to break cyclic dep between identifier-resolution, jwt-service and oidf-client
22
+ */
23
+ interface IJwtService extends IPluginMethodMap {
24
+ jwtVerifyJwsSignature(args: VerifyJwsArgs, context: IRequiredContext): Promise<any>;
25
+ }
26
+ type VerifyJwsArgs = {
27
+ jws: any;
28
+ jwk?: JWK;
29
+ opts?: any;
30
+ };
20
31
 
21
32
  declare const oidfClientMethods: Array<string>;
22
33
  declare class OIDFClient implements IAgentPlugin {
@@ -36,4 +47,4 @@ declare const schema: any;
36
47
 
37
48
  declare const logger: _sphereon_ssi_types.ISimpleLogger<unknown>;
38
49
 
39
- export { type IOIDFClient, type IRequiredContext, type IRequiredPlugins, OIDFClient, type OIDFClientArgs, type ResolveTrustChainArgs, logger, oidfClientMethods, schema };
50
+ export { type IJwtService, type IOIDFClient, type IRequiredContext, type IRequiredPlugins, OIDFClient, type OIDFClientArgs, type ResolveTrustChainArgs, type VerifyJwsArgs, logger, oidfClientMethods, schema };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sphereon/ssi-sdk.oidf-client",
3
- "version": "0.34.1-next.7+abc1dfeb",
3
+ "version": "0.34.1-next.86+38dc1ac2",
4
4
  "source": "src/index.ts",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -24,21 +24,21 @@
24
24
  },
25
25
  "scripts": {
26
26
  "build": "tsup --config ../../tsup.config.ts --tsconfig ../../tsconfig.tsup.json",
27
- "generate-plugin-schema": "ts-node ../../packages/dev/bin/sphereon.js dev generate-plugin-schema"
27
+ "generate-plugin-schema": "tsx ../../packages/dev/bin/sphereon.js dev generate-plugin-schema"
28
28
  },
29
29
  "dependencies": {
30
30
  "@sphereon/openid-federation-client": "0.20.9-unstable.48ddfa1",
31
31
  "@sphereon/openid-federation-common": "0.20.9-unstable.48ddfa1",
32
32
  "@sphereon/openid-federation-open-api": "0.20.9-unstable.48ddfa1",
33
- "@sphereon/ssi-sdk-ext.jwt-service": "0.29.1-next.3",
34
- "@sphereon/ssi-sdk.resource-resolver": "0.34.1-next.7+abc1dfeb",
35
- "@sphereon/ssi-types": "0.34.1-next.7+abc1dfeb"
33
+ "@sphereon/ssi-sdk.resource-resolver": "0.34.1-next.86+38dc1ac2",
34
+ "@sphereon/ssi-types": "0.34.1-next.86+38dc1ac2"
36
35
  },
37
36
  "devDependencies": {
38
- "@sphereon/ssi-sdk.agent-config": "0.34.1-next.7+abc1dfeb",
37
+ "@sphereon/ssi-sdk.agent-config": "0.34.1-next.86+38dc1ac2",
39
38
  "@veramo/remote-client": "4.2.0",
40
39
  "@veramo/remote-server": "4.2.0",
41
- "jose": "^5.10.0"
40
+ "jose": "^5.10.0",
41
+ "uint8arrays": "3.1.1"
42
42
  },
43
43
  "files": [
44
44
  "dist",
@@ -60,5 +60,5 @@
60
60
  "Veramo",
61
61
  "OpenID Federation"
62
62
  ],
63
- "gitHead": "abc1dfebd9a53c49235573ad0a337abb248bf2f3"
63
+ "gitHead": "38dc1ac283787611ad5ebcedf1ca222438566dd9"
64
64
  }
@@ -1,7 +1,8 @@
1
1
  import { IResourceResolver } from '@sphereon/ssi-sdk.resource-resolver'
2
2
  import { IAgentContext, IPluginMethodMap } from '@veramo/core'
3
- import { IJwtService } from '@sphereon/ssi-sdk-ext.jwt-service'
4
3
  import { ICryptoService, IFetchService, TrustChainResolveResponse } from '@sphereon/openid-federation-client'
4
+ import { JWK } from 'jose'
5
+
5
6
  export type IRequiredPlugins = IJwtService & IResourceResolver
6
7
  export type IRequiredContext = IAgentContext<IRequiredPlugins>
7
8
 
@@ -18,3 +19,16 @@ export type OIDFClientArgs = {
18
19
  fetchServiceCallback?: IFetchService
19
20
  cryptoServiceCallback?: ICryptoService
20
21
  }
22
+
23
+ /**
24
+ * Partial opy of IJWTService to break cyclic dep between identifier-resolution, jwt-service and oidf-client
25
+ */
26
+ export interface IJwtService extends IPluginMethodMap {
27
+ jwtVerifyJwsSignature(args: VerifyJwsArgs, context: IRequiredContext): Promise<any>
28
+ }
29
+
30
+ export type VerifyJwsArgs = {
31
+ jws: any
32
+ jwk?: JWK // Jwk will be resolved from jws, but you can also provide one
33
+ opts?: any
34
+ }