@canton-network/wallet-gateway-remote 0.4.0 → 0.5.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.
Files changed (66) hide show
  1. package/README.md +0 -12
  2. package/dist/auth/jwt-auth-service.d.ts +1 -1
  3. package/dist/auth/jwt-auth-service.d.ts.map +1 -1
  4. package/dist/auth/jwt-auth-service.js +11 -1
  5. package/dist/auth/jwt-unsafe-auth-service.d.ts +11 -0
  6. package/dist/auth/jwt-unsafe-auth-service.d.ts.map +1 -0
  7. package/dist/auth/jwt-unsafe-auth-service.js +50 -0
  8. package/dist/config/Config.d.ts +144 -30
  9. package/dist/config/Config.d.ts.map +1 -1
  10. package/dist/dapp-api/controller.d.ts +2 -0
  11. package/dist/dapp-api/controller.d.ts.map +1 -1
  12. package/dist/dapp-api/controller.js +27 -6
  13. package/dist/dapp-api/rpc-gen/index.d.ts +6 -0
  14. package/dist/dapp-api/rpc-gen/index.d.ts.map +1 -1
  15. package/dist/dapp-api/rpc-gen/index.js +2 -0
  16. package/dist/dapp-api/rpc-gen/typings.d.ts +23 -17
  17. package/dist/dapp-api/rpc-gen/typings.d.ts.map +1 -1
  18. package/dist/dapp-api/server.d.ts +2 -1
  19. package/dist/dapp-api/server.d.ts.map +1 -1
  20. package/dist/dapp-api/server.js +8 -3
  21. package/dist/dapp-api/server.test.js +11 -8
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +14 -1
  24. package/dist/init.d.ts +2 -1
  25. package/dist/init.d.ts.map +1 -1
  26. package/dist/init.js +46 -23
  27. package/dist/ledger/party-allocation-service.d.ts +2 -1
  28. package/dist/ledger/party-allocation-service.d.ts.map +1 -1
  29. package/dist/ledger/party-allocation-service.js +4 -4
  30. package/dist/ledger/party-allocation-service.test.js +11 -2
  31. package/dist/ledger/wallet-sync-service.d.ts.map +1 -1
  32. package/dist/ledger/wallet-sync-service.js +1 -1
  33. package/dist/user-api/controller.d.ts.map +1 -1
  34. package/dist/user-api/controller.js +57 -12
  35. package/dist/user-api/rpc-gen/typings.d.ts +10 -0
  36. package/dist/user-api/rpc-gen/typings.d.ts.map +1 -1
  37. package/dist/user-api/server.d.ts +6 -5
  38. package/dist/user-api/server.d.ts.map +1 -1
  39. package/dist/user-api/server.js +2 -4
  40. package/dist/user-api/server.test.js +4 -3
  41. package/dist/web/frontend/404/index.html +3 -6
  42. package/dist/web/frontend/approve/index.html +5 -9
  43. package/dist/web/frontend/assets/{404-FxmR286l.js → 404-BJiXCpwg.js} +3 -3
  44. package/dist/web/frontend/assets/approve-hB6irrWF.js +157 -0
  45. package/dist/web/frontend/assets/callback-DHz7ggNR.js +1 -0
  46. package/dist/web/frontend/assets/handle-errors-DT2Go5Ch.js +1 -0
  47. package/dist/web/frontend/assets/{index-BknZMPaI.css → index-HEe9--Xd.css} +1 -1
  48. package/dist/web/frontend/assets/{index-VtAAU1cN.js → index-YpAHEASq.js} +64 -51
  49. package/dist/web/frontend/assets/login-Dw5jymys.js +159 -0
  50. package/dist/web/frontend/assets/{networks-CZV8G3N2.js → networks-CaAXx7MG.js} +9 -9
  51. package/dist/web/frontend/assets/{state-DKGJ6EmM.js → state-BTqOtYLt.js} +2 -2
  52. package/dist/web/frontend/assets/{wallets-DwPVJP85.js → wallets-fk9mMhcI.js} +4 -4
  53. package/dist/web/frontend/callback/index.html +3 -3
  54. package/dist/web/frontend/index.html +2 -5
  55. package/dist/web/frontend/login/index.html +5 -8
  56. package/dist/web/frontend/networks/index.html +6 -8
  57. package/dist/web/frontend/wallets/index.html +5 -9
  58. package/package.json +17 -17
  59. package/dist/web/frontend/assets/approve-BHHuvE3i.js +0 -157
  60. package/dist/web/frontend/assets/callback-D9y0DRns.js +0 -1
  61. package/dist/web/frontend/assets/handle-errors-BM-xvD4v.js +0 -1
  62. package/dist/web/frontend/assets/index-BPTkodPz.js +0 -1
  63. package/dist/web/frontend/assets/index-TZrNw7dA.css +0 -1
  64. package/dist/web/frontend/assets/login-DJofeRCg.js +0 -159
  65. package/dist/web/frontend/assets/rpc-client-TGo-LOnR.js +0 -1
  66. package/dist/web/frontend/assets/state-manager-BNW0y5PZ.js +0 -23
package/README.md CHANGED
@@ -28,18 +28,6 @@ By default, the service runs on port `3030`, but this can be overridden via the
28
28
 
29
29
  A configuration file is required to start up the Gateway. See [config.json](https://github.com/hyperledger-labs/splice-wallet-kernel/blob/main/wallet-gateway/test/config.json) for an example.
30
30
 
31
- ## First time startup
32
-
33
- When running the Gateway for the first time, the database must be properly initialized.
34
-
35
- ```shell
36
- $ wallet-gateway -c ./config.json db reset
37
- $ wallet-gateway -c ./config.json db bootstrap
38
-
39
- # Finally, start the service
40
- $ wallet-gateway -c ./config.json
41
- ```
42
-
43
31
  # Developing
44
32
 
45
33
  ## Codegen
@@ -1,6 +1,6 @@
1
- import { Logger } from 'pino';
2
1
  import { AuthService } from '@canton-network/core-wallet-auth';
3
2
  import { Store } from '@canton-network/core-wallet-store';
3
+ import { Logger } from 'pino';
4
4
  /**
5
5
  * Creates an AuthService that verifies JWT tokens using a remote JWK set.
6
6
  * @param store - The Store instance to access network configurations.
@@ -1 +1 @@
1
- {"version":3,"file":"jwt-auth-service.d.ts","sourceRoot":"","sources":["../../src/auth/jwt-auth-service.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAE7B,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAC9D,OAAO,EAAQ,KAAK,EAAE,MAAM,mCAAmC,CAAA;AAE/D;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,OAAO,KAAK,EAAE,QAAQ,MAAM,KAAG,WAkD5D,CAAA"}
1
+ {"version":3,"file":"jwt-auth-service.d.ts","sourceRoot":"","sources":["../../src/auth/jwt-auth-service.ts"],"names":[],"mappings":"AAGA,OAAO,EAAQ,WAAW,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAA;AAEzD,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAE7B;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,OAAO,KAAK,EAAE,QAAQ,MAAM,KAAG,WA6D5D,CAAA"}
@@ -15,7 +15,8 @@ export const jwtAuthService = (store, logger) => ({
15
15
  const jwt = accessToken.split(' ')[1];
16
16
  logger.debug({ jwt }, 'Verifying JWT token');
17
17
  try {
18
- const iss = decodeJwt(jwt).iss;
18
+ const decoded = decodeJwt(jwt);
19
+ const iss = decoded.iss;
19
20
  if (!iss) {
20
21
  logger.warn('JWT does not contain an issuer');
21
22
  return undefined;
@@ -27,6 +28,15 @@ export const jwtAuthService = (store, logger) => ({
27
28
  logger.warn(`No identity provider found for issuer: ${iss}`);
28
29
  return undefined;
29
30
  }
31
+ if (idp.type == 'self_signed') {
32
+ logger.debug(idp, 'Using self-signed IDP');
33
+ const sub = decoded.sub;
34
+ if (!sub) {
35
+ logger.warn('JWT does not contain a subject');
36
+ return undefined;
37
+ }
38
+ return { userId: sub, accessToken: jwt };
39
+ }
30
40
  logger.debug(idp, 'Using IDP');
31
41
  const response = await fetch(idp.configUrl);
32
42
  const config = await response.json();
@@ -0,0 +1,11 @@
1
+ import { AuthService } from '@canton-network/core-wallet-auth';
2
+ import { Store } from '@canton-network/core-wallet-store';
3
+ import { Logger } from 'pino';
4
+ /**
5
+ * Creates an AuthService that verifies unsafe JWT tokens.
6
+ * @param store - The Store instance to access network configurations.
7
+ * @param logger - Logger instance for logging debug and warning messages.
8
+ * @returns An AuthService implementation that verifies JWT tokens.
9
+ */
10
+ export declare const jwtAuthService: (store: Store, logger: Logger) => AuthService;
11
+ //# sourceMappingURL=jwt-unsafe-auth-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jwt-unsafe-auth-service.d.ts","sourceRoot":"","sources":["../../src/auth/jwt-unsafe-auth-service.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAE9D,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAA;AAEzD,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAE7B;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,OAAO,KAAK,EAAE,QAAQ,MAAM,KAAG,WAiD5D,CAAA"}
@@ -0,0 +1,50 @@
1
+ // Copyright (c) 2025 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ import { decodeJwt } from 'jose';
4
+ /**
5
+ * Creates an AuthService that verifies unsafe JWT tokens.
6
+ * @param store - The Store instance to access network configurations.
7
+ * @param logger - Logger instance for logging debug and warning messages.
8
+ * @returns An AuthService implementation that verifies JWT tokens.
9
+ */
10
+ export const jwtAuthService = (store, logger) => ({
11
+ verifyToken: async (accessToken) => {
12
+ if (!accessToken || !accessToken.startsWith('Bearer ')) {
13
+ return undefined;
14
+ }
15
+ const jwt = accessToken.split(' ')[1];
16
+ logger.debug({ jwt }, 'Verifying JWT token');
17
+ try {
18
+ const decoded = decodeJwt(jwt);
19
+ const iss = decoded.iss;
20
+ if (!iss) {
21
+ logger.warn('JWT does not contain an issuer');
22
+ return undefined;
23
+ }
24
+ const sub = decoded.sub;
25
+ if (!sub) {
26
+ logger.warn('JWT does not contain a subject');
27
+ return undefined;
28
+ }
29
+ // TODO: change once IDP is decoupled from networks
30
+ const networks = await store.listNetworks();
31
+ const idp = networks.find((n) => n.auth.issuer === iss)?.auth;
32
+ if (!idp) {
33
+ logger.warn(`No identity provider found for issuer: ${iss}`);
34
+ return undefined;
35
+ }
36
+ if (idp.type !== 'self_signed') {
37
+ logger.warn(`Cannot verify token for non-self-signed IDP: ${iss}`);
38
+ return undefined;
39
+ }
40
+ // TODO: Verify JWT signature using idp.clientSecret / idp.admin.clientSecret
41
+ return { userId: sub, accessToken: jwt };
42
+ }
43
+ catch (error) {
44
+ if (error instanceof Error) {
45
+ logger.warn(error, `Failed to verify token: ${error.message}`);
46
+ }
47
+ return undefined;
48
+ }
49
+ },
50
+ });
@@ -57,18 +57,18 @@ export declare const configSchema: z.ZodObject<{
57
57
  database: z.ZodString;
58
58
  }, "strip", z.ZodTypeAny, {
59
59
  type: "postgres";
60
- password: string;
61
60
  database: string;
62
61
  host: string;
63
62
  port: number;
64
63
  user: string;
64
+ password: string;
65
65
  }, {
66
66
  type: "postgres";
67
- password: string;
68
67
  database: string;
69
68
  host: string;
70
69
  port: number;
71
70
  user: string;
71
+ password: string;
72
72
  }>]>;
73
73
  networks: z.ZodArray<z.ZodObject<{
74
74
  name: z.ZodString;
@@ -103,8 +103,8 @@ export declare const configSchema: z.ZodObject<{
103
103
  clientSecret: string;
104
104
  }>>;
105
105
  }, "strip", z.ZodTypeAny, {
106
- type: "password";
107
106
  clientId: string;
107
+ type: "password";
108
108
  identityProviderId: string;
109
109
  issuer: string;
110
110
  configUrl: string;
@@ -117,8 +117,8 @@ export declare const configSchema: z.ZodObject<{
117
117
  clientSecret: string;
118
118
  } | undefined;
119
119
  }, {
120
- type: "password";
121
120
  clientId: string;
121
+ type: "password";
122
122
  identityProviderId: string;
123
123
  issuer: string;
124
124
  configUrl: string;
@@ -149,8 +149,8 @@ export declare const configSchema: z.ZodObject<{
149
149
  clientSecret: string;
150
150
  }>>;
151
151
  }, "strip", z.ZodTypeAny, {
152
- type: "implicit";
153
152
  clientId: string;
153
+ type: "implicit";
154
154
  identityProviderId: string;
155
155
  issuer: string;
156
156
  configUrl: string;
@@ -161,8 +161,8 @@ export declare const configSchema: z.ZodObject<{
161
161
  clientSecret: string;
162
162
  } | undefined;
163
163
  }, {
164
- type: "implicit";
165
164
  clientId: string;
165
+ type: "implicit";
166
166
  identityProviderId: string;
167
167
  issuer: string;
168
168
  configUrl: string;
@@ -192,9 +192,9 @@ export declare const configSchema: z.ZodObject<{
192
192
  clientSecret: string;
193
193
  }>>;
194
194
  }, "strip", z.ZodTypeAny, {
195
- type: "client_credentials";
196
195
  clientId: string;
197
196
  clientSecret: string;
197
+ type: "client_credentials";
198
198
  identityProviderId: string;
199
199
  issuer: string;
200
200
  configUrl: string;
@@ -205,9 +205,9 @@ export declare const configSchema: z.ZodObject<{
205
205
  clientSecret: string;
206
206
  } | undefined;
207
207
  }, {
208
- type: "client_credentials";
209
208
  clientId: string;
210
209
  clientSecret: string;
210
+ type: "client_credentials";
211
211
  identityProviderId: string;
212
212
  issuer: string;
213
213
  configUrl: string;
@@ -217,6 +217,48 @@ export declare const configSchema: z.ZodObject<{
217
217
  clientId: string;
218
218
  clientSecret: string;
219
219
  } | undefined;
220
+ }>, z.ZodObject<{
221
+ identityProviderId: z.ZodString;
222
+ type: z.ZodLiteral<"self_signed">;
223
+ issuer: z.ZodString;
224
+ audience: z.ZodString;
225
+ scope: z.ZodString;
226
+ clientId: z.ZodString;
227
+ clientSecret: z.ZodString;
228
+ admin: z.ZodOptional<z.ZodObject<{
229
+ clientId: z.ZodString;
230
+ clientSecret: z.ZodString;
231
+ }, "strip", z.ZodTypeAny, {
232
+ clientId: string;
233
+ clientSecret: string;
234
+ }, {
235
+ clientId: string;
236
+ clientSecret: string;
237
+ }>>;
238
+ }, "strip", z.ZodTypeAny, {
239
+ clientId: string;
240
+ clientSecret: string;
241
+ type: "self_signed";
242
+ identityProviderId: string;
243
+ issuer: string;
244
+ audience: string;
245
+ scope: string;
246
+ admin?: {
247
+ clientId: string;
248
+ clientSecret: string;
249
+ } | undefined;
250
+ }, {
251
+ clientId: string;
252
+ clientSecret: string;
253
+ type: "self_signed";
254
+ identityProviderId: string;
255
+ issuer: string;
256
+ audience: string;
257
+ scope: string;
258
+ admin?: {
259
+ clientId: string;
260
+ clientSecret: string;
261
+ } | undefined;
220
262
  }>]>;
221
263
  }, "strip", z.ZodTypeAny, {
222
264
  name: string;
@@ -227,8 +269,8 @@ export declare const configSchema: z.ZodObject<{
227
269
  baseUrl: string;
228
270
  };
229
271
  auth: {
230
- type: "password";
231
272
  clientId: string;
273
+ type: "password";
232
274
  identityProviderId: string;
233
275
  issuer: string;
234
276
  configUrl: string;
@@ -241,8 +283,8 @@ export declare const configSchema: z.ZodObject<{
241
283
  clientSecret: string;
242
284
  } | undefined;
243
285
  } | {
244
- type: "implicit";
245
286
  clientId: string;
287
+ type: "implicit";
246
288
  identityProviderId: string;
247
289
  issuer: string;
248
290
  configUrl: string;
@@ -253,9 +295,9 @@ export declare const configSchema: z.ZodObject<{
253
295
  clientSecret: string;
254
296
  } | undefined;
255
297
  } | {
256
- type: "client_credentials";
257
298
  clientId: string;
258
299
  clientSecret: string;
300
+ type: "client_credentials";
259
301
  identityProviderId: string;
260
302
  issuer: string;
261
303
  configUrl: string;
@@ -265,6 +307,18 @@ export declare const configSchema: z.ZodObject<{
265
307
  clientId: string;
266
308
  clientSecret: string;
267
309
  } | undefined;
310
+ } | {
311
+ clientId: string;
312
+ clientSecret: string;
313
+ type: "self_signed";
314
+ identityProviderId: string;
315
+ issuer: string;
316
+ audience: string;
317
+ scope: string;
318
+ admin?: {
319
+ clientId: string;
320
+ clientSecret: string;
321
+ } | undefined;
268
322
  };
269
323
  }, {
270
324
  name: string;
@@ -275,8 +329,8 @@ export declare const configSchema: z.ZodObject<{
275
329
  baseUrl: string;
276
330
  };
277
331
  auth: {
278
- type: "password";
279
332
  clientId: string;
333
+ type: "password";
280
334
  identityProviderId: string;
281
335
  issuer: string;
282
336
  configUrl: string;
@@ -289,8 +343,8 @@ export declare const configSchema: z.ZodObject<{
289
343
  clientSecret: string;
290
344
  } | undefined;
291
345
  } | {
292
- type: "implicit";
293
346
  clientId: string;
347
+ type: "implicit";
294
348
  identityProviderId: string;
295
349
  issuer: string;
296
350
  configUrl: string;
@@ -301,9 +355,9 @@ export declare const configSchema: z.ZodObject<{
301
355
  clientSecret: string;
302
356
  } | undefined;
303
357
  } | {
304
- type: "client_credentials";
305
358
  clientId: string;
306
359
  clientSecret: string;
360
+ type: "client_credentials";
307
361
  identityProviderId: string;
308
362
  issuer: string;
309
363
  configUrl: string;
@@ -313,6 +367,18 @@ export declare const configSchema: z.ZodObject<{
313
367
  clientId: string;
314
368
  clientSecret: string;
315
369
  } | undefined;
370
+ } | {
371
+ clientId: string;
372
+ clientSecret: string;
373
+ type: "self_signed";
374
+ identityProviderId: string;
375
+ issuer: string;
376
+ audience: string;
377
+ scope: string;
378
+ admin?: {
379
+ clientId: string;
380
+ clientSecret: string;
381
+ } | undefined;
316
382
  };
317
383
  }>, "many">;
318
384
  }, "strip", z.ZodTypeAny, {
@@ -323,11 +389,11 @@ export declare const configSchema: z.ZodObject<{
323
389
  database: string;
324
390
  } | {
325
391
  type: "postgres";
326
- password: string;
327
392
  database: string;
328
393
  host: string;
329
394
  port: number;
330
395
  user: string;
396
+ password: string;
331
397
  };
332
398
  networks: {
333
399
  name: string;
@@ -338,8 +404,8 @@ export declare const configSchema: z.ZodObject<{
338
404
  baseUrl: string;
339
405
  };
340
406
  auth: {
341
- type: "password";
342
407
  clientId: string;
408
+ type: "password";
343
409
  identityProviderId: string;
344
410
  issuer: string;
345
411
  configUrl: string;
@@ -352,8 +418,8 @@ export declare const configSchema: z.ZodObject<{
352
418
  clientSecret: string;
353
419
  } | undefined;
354
420
  } | {
355
- type: "implicit";
356
421
  clientId: string;
422
+ type: "implicit";
357
423
  identityProviderId: string;
358
424
  issuer: string;
359
425
  configUrl: string;
@@ -364,9 +430,9 @@ export declare const configSchema: z.ZodObject<{
364
430
  clientSecret: string;
365
431
  } | undefined;
366
432
  } | {
367
- type: "client_credentials";
368
433
  clientId: string;
369
434
  clientSecret: string;
435
+ type: "client_credentials";
370
436
  identityProviderId: string;
371
437
  issuer: string;
372
438
  configUrl: string;
@@ -376,6 +442,18 @@ export declare const configSchema: z.ZodObject<{
376
442
  clientId: string;
377
443
  clientSecret: string;
378
444
  } | undefined;
445
+ } | {
446
+ clientId: string;
447
+ clientSecret: string;
448
+ type: "self_signed";
449
+ identityProviderId: string;
450
+ issuer: string;
451
+ audience: string;
452
+ scope: string;
453
+ admin?: {
454
+ clientId: string;
455
+ clientSecret: string;
456
+ } | undefined;
379
457
  };
380
458
  }[];
381
459
  }, {
@@ -386,11 +464,11 @@ export declare const configSchema: z.ZodObject<{
386
464
  database: string;
387
465
  } | {
388
466
  type: "postgres";
389
- password: string;
390
467
  database: string;
391
468
  host: string;
392
469
  port: number;
393
470
  user: string;
471
+ password: string;
394
472
  };
395
473
  networks: {
396
474
  name: string;
@@ -401,8 +479,8 @@ export declare const configSchema: z.ZodObject<{
401
479
  baseUrl: string;
402
480
  };
403
481
  auth: {
404
- type: "password";
405
482
  clientId: string;
483
+ type: "password";
406
484
  identityProviderId: string;
407
485
  issuer: string;
408
486
  configUrl: string;
@@ -415,8 +493,8 @@ export declare const configSchema: z.ZodObject<{
415
493
  clientSecret: string;
416
494
  } | undefined;
417
495
  } | {
418
- type: "implicit";
419
496
  clientId: string;
497
+ type: "implicit";
420
498
  identityProviderId: string;
421
499
  issuer: string;
422
500
  configUrl: string;
@@ -427,9 +505,9 @@ export declare const configSchema: z.ZodObject<{
427
505
  clientSecret: string;
428
506
  } | undefined;
429
507
  } | {
430
- type: "client_credentials";
431
508
  clientId: string;
432
509
  clientSecret: string;
510
+ type: "client_credentials";
433
511
  identityProviderId: string;
434
512
  issuer: string;
435
513
  configUrl: string;
@@ -439,6 +517,18 @@ export declare const configSchema: z.ZodObject<{
439
517
  clientId: string;
440
518
  clientSecret: string;
441
519
  } | undefined;
520
+ } | {
521
+ clientId: string;
522
+ clientSecret: string;
523
+ type: "self_signed";
524
+ identityProviderId: string;
525
+ issuer: string;
526
+ audience: string;
527
+ scope: string;
528
+ admin?: {
529
+ clientId: string;
530
+ clientSecret: string;
531
+ } | undefined;
442
532
  };
443
533
  }[];
444
534
  }>;
@@ -457,11 +547,11 @@ export declare const configSchema: z.ZodObject<{
457
547
  database: string;
458
548
  } | {
459
549
  type: "postgres";
460
- password: string;
461
550
  database: string;
462
551
  host: string;
463
552
  port: number;
464
553
  user: string;
554
+ password: string;
465
555
  };
466
556
  networks: {
467
557
  name: string;
@@ -472,8 +562,8 @@ export declare const configSchema: z.ZodObject<{
472
562
  baseUrl: string;
473
563
  };
474
564
  auth: {
475
- type: "password";
476
565
  clientId: string;
566
+ type: "password";
477
567
  identityProviderId: string;
478
568
  issuer: string;
479
569
  configUrl: string;
@@ -486,8 +576,8 @@ export declare const configSchema: z.ZodObject<{
486
576
  clientSecret: string;
487
577
  } | undefined;
488
578
  } | {
489
- type: "implicit";
490
579
  clientId: string;
580
+ type: "implicit";
491
581
  identityProviderId: string;
492
582
  issuer: string;
493
583
  configUrl: string;
@@ -498,9 +588,9 @@ export declare const configSchema: z.ZodObject<{
498
588
  clientSecret: string;
499
589
  } | undefined;
500
590
  } | {
501
- type: "client_credentials";
502
591
  clientId: string;
503
592
  clientSecret: string;
593
+ type: "client_credentials";
504
594
  identityProviderId: string;
505
595
  issuer: string;
506
596
  configUrl: string;
@@ -510,6 +600,18 @@ export declare const configSchema: z.ZodObject<{
510
600
  clientId: string;
511
601
  clientSecret: string;
512
602
  } | undefined;
603
+ } | {
604
+ clientId: string;
605
+ clientSecret: string;
606
+ type: "self_signed";
607
+ identityProviderId: string;
608
+ issuer: string;
609
+ audience: string;
610
+ scope: string;
611
+ admin?: {
612
+ clientId: string;
613
+ clientSecret: string;
614
+ } | undefined;
513
615
  };
514
616
  }[];
515
617
  };
@@ -528,11 +630,11 @@ export declare const configSchema: z.ZodObject<{
528
630
  database: string;
529
631
  } | {
530
632
  type: "postgres";
531
- password: string;
532
633
  database: string;
533
634
  host: string;
534
635
  port: number;
535
636
  user: string;
637
+ password: string;
536
638
  };
537
639
  networks: {
538
640
  name: string;
@@ -543,8 +645,8 @@ export declare const configSchema: z.ZodObject<{
543
645
  baseUrl: string;
544
646
  };
545
647
  auth: {
546
- type: "password";
547
648
  clientId: string;
649
+ type: "password";
548
650
  identityProviderId: string;
549
651
  issuer: string;
550
652
  configUrl: string;
@@ -557,8 +659,8 @@ export declare const configSchema: z.ZodObject<{
557
659
  clientSecret: string;
558
660
  } | undefined;
559
661
  } | {
560
- type: "implicit";
561
662
  clientId: string;
663
+ type: "implicit";
562
664
  identityProviderId: string;
563
665
  issuer: string;
564
666
  configUrl: string;
@@ -569,9 +671,9 @@ export declare const configSchema: z.ZodObject<{
569
671
  clientSecret: string;
570
672
  } | undefined;
571
673
  } | {
572
- type: "client_credentials";
573
674
  clientId: string;
574
675
  clientSecret: string;
676
+ type: "client_credentials";
575
677
  identityProviderId: string;
576
678
  issuer: string;
577
679
  configUrl: string;
@@ -581,6 +683,18 @@ export declare const configSchema: z.ZodObject<{
581
683
  clientId: string;
582
684
  clientSecret: string;
583
685
  } | undefined;
686
+ } | {
687
+ clientId: string;
688
+ clientSecret: string;
689
+ type: "self_signed";
690
+ identityProviderId: string;
691
+ issuer: string;
692
+ audience: string;
693
+ scope: string;
694
+ admin?: {
695
+ clientId: string;
696
+ clientSecret: string;
697
+ } | undefined;
584
698
  };
585
699
  }[];
586
700
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/config/Config.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;EAU3B,CAAA;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAOqoe,CAAC;;;;;;;;;;;;;;qBAA0Z,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAA6+B,CAAC;;;;;;;;;;;;qBAA6V,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAA0kC,CAAC;;;;;;;;;;;;;qBAAyY,CAAC;;;;;;;;;;;;;;;;;;;;;;;qBAAonB,CAAC;;;;;;;;;;;;qBAA8V,CAAC;;;;;;;;;;;;;qBAA0Y,CAAC;;;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ernelInfo: KernelInfoConfig, store: Store, notificationService: NotificationService, _logger: Logger, context?: AuthContext) => {
7
7
  status: import("./rpc-gen/typings.js").Status;
8
8
  connect: import("./rpc-gen/typings.js").Connect;
9
+ disconnect: import("./rpc-gen/typings.js").Disconnect;
9
10
  darsAvailable: import("./rpc-gen/typings.js").DarsAvailable;
10
11
  prepareReturn: import("./rpc-gen/typings.js").PrepareReturn;
11
12
  prepareExecute: import("./rpc-gen/typings.js").PrepareExecute;
12
13
  ledgerApi: import("./rpc-gen/typings.js").LedgerApi;
13
14
  onConnected: import("./rpc-gen/typings.js").OnConnected;
15
+ onStatusChanged: import("./rpc-gen/typings.js").OnStatusChanged;
14
16
  onAccountsChanged: import("./rpc-gen/typings.js").OnAccountsChanged;
15
17
  requestAccounts: import("./rpc-gen/typings.js").RequestAccounts;
16
18
  onTxChanged: import("./rpc-gen/typings.js").OnTxChanged;
@@ -1 +1 @@
1
- {"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../src/dapp-api/controller.ts"],"names":[],"mappings":"AAIA,OAAO,EAAmB,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAO/E,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAA;AAQzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAA;AAC5E,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AA6B7B,eAAO,MAAM,cAAc,GACvB,YAAY,gBAAgB,EAC5B,OAAO,KAAK,EACZ,qBAAqB,mBAAmB,EACxC,SAAS,MAAM,EACf,UAAU,WAAW;;;;;;;;;;;CA8IxB,CAAA"}
1
+ {"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../src/dapp-api/controller.ts"],"names":[],"mappings":"AAIA,OAAO,EAAmB,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAO/E,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAA;AAQzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAA;AAC5E,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AA6B7B,eAAO,MAAM,cAAc,GACvB,YAAY,gBAAgB,EAC5B,OAAO,KAAK,EACZ,qBAAqB,mBAAmB,EACxC,SAAS,MAAM,EACf,UAAU,WAAW;;;;;;;;;;;;;CAuKxB,CAAA"}