@canton-network/wallet-gateway-remote 1.4.0 → 1.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 (116) hide show
  1. package/dist/auth/jwt-auth-service.d.ts.map +1 -1
  2. package/dist/auth/jwt-auth-service.js +6 -5
  3. package/dist/auth/jwt-auth-service.test.d.ts +2 -0
  4. package/dist/auth/jwt-auth-service.test.d.ts.map +1 -0
  5. package/dist/auth/jwt-auth-service.test.js +259 -0
  6. package/dist/auth/jwt-unsafe-auth-service.test.d.ts +2 -0
  7. package/dist/auth/jwt-unsafe-auth-service.test.d.ts.map +1 -0
  8. package/dist/auth/jwt-unsafe-auth-service.test.js +120 -0
  9. package/dist/config/Config.d.ts +60 -4
  10. package/dist/config/Config.d.ts.map +1 -1
  11. package/dist/config/Config.js +1 -0
  12. package/dist/config/ConfigUtils.d.ts.map +1 -1
  13. package/dist/config/ConfigUtils.js +3 -0
  14. package/dist/dapp-api/controller.d.ts.map +1 -1
  15. package/dist/dapp-api/controller.js +54 -24
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +10 -0
  18. package/dist/init.d.ts.map +1 -1
  19. package/dist/init.js +3 -6
  20. package/dist/ledger/transaction-service.d.ts +14 -11
  21. package/dist/ledger/transaction-service.d.ts.map +1 -1
  22. package/dist/ledger/transaction-service.js +95 -8
  23. package/dist/ledger/transaction-service.test.d.ts +2 -0
  24. package/dist/ledger/transaction-service.test.d.ts.map +1 -0
  25. package/dist/ledger/transaction-service.test.js +356 -0
  26. package/dist/ledger/wallet-allocation/signing-providers/fireblocks-wallet-allocator.d.ts +5 -2
  27. package/dist/ledger/wallet-allocation/signing-providers/fireblocks-wallet-allocator.d.ts.map +1 -1
  28. package/dist/ledger/wallet-allocation/signing-providers/fireblocks-wallet-allocator.js +7 -6
  29. package/dist/ledger/wallet-allocation/wallet-allocation-service.d.ts +11 -5
  30. package/dist/ledger/wallet-allocation/wallet-allocation-service.d.ts.map +1 -1
  31. package/dist/ledger/wallet-allocation/wallet-allocation-service.js +28 -14
  32. package/dist/ledger/wallet-allocation/wallet-allocation-service.test.js +550 -19
  33. package/dist/ledger/wallet-sync-service.js +3 -3
  34. package/dist/middleware/apiKeyAuth.d.ts +6 -0
  35. package/dist/middleware/apiKeyAuth.d.ts.map +1 -0
  36. package/dist/middleware/apiKeyAuth.js +88 -0
  37. package/dist/middleware/apiKeyAuth.test.d.ts +2 -0
  38. package/dist/middleware/apiKeyAuth.test.d.ts.map +1 -0
  39. package/dist/middleware/apiKeyAuth.test.js +126 -0
  40. package/dist/middleware/jsonRpcHandler.d.ts +11 -1
  41. package/dist/middleware/jsonRpcHandler.d.ts.map +1 -1
  42. package/dist/middleware/jsonRpcHandler.js +14 -15
  43. package/dist/middleware/jsonRpcHandler.test.d.ts +2 -0
  44. package/dist/middleware/jsonRpcHandler.test.d.ts.map +1 -0
  45. package/dist/middleware/jsonRpcHandler.test.js +254 -0
  46. package/dist/middleware/jwtAuth.d.ts.map +1 -1
  47. package/dist/middleware/jwtAuth.js +4 -0
  48. package/dist/middleware/jwtAuth.test.d.ts +2 -0
  49. package/dist/middleware/jwtAuth.test.d.ts.map +1 -0
  50. package/dist/middleware/jwtAuth.test.js +93 -0
  51. package/dist/middleware/rateLimit.test.js +12 -0
  52. package/dist/middleware/sessionHandler.js +1 -1
  53. package/dist/middleware/sessionHandler.test.d.ts +2 -0
  54. package/dist/middleware/sessionHandler.test.d.ts.map +1 -0
  55. package/dist/middleware/sessionHandler.test.js +121 -0
  56. package/dist/notification/NotificationService.test.d.ts +2 -0
  57. package/dist/notification/NotificationService.test.d.ts.map +1 -0
  58. package/dist/notification/NotificationService.test.js +110 -0
  59. package/dist/signing/signing-drivers.d.ts +7 -0
  60. package/dist/signing/signing-drivers.d.ts.map +1 -0
  61. package/dist/signing/signing-drivers.js +3 -0
  62. package/dist/user-api/controller.d.ts +6 -4
  63. package/dist/user-api/controller.d.ts.map +1 -1
  64. package/dist/user-api/controller.js +111 -94
  65. package/dist/user-api/controller.test.d.ts +2 -0
  66. package/dist/user-api/controller.test.d.ts.map +1 -0
  67. package/dist/user-api/controller.test.js +862 -0
  68. package/dist/user-api/rpc-gen/index.d.ts +12 -0
  69. package/dist/user-api/rpc-gen/index.d.ts.map +1 -1
  70. package/dist/user-api/rpc-gen/index.js +4 -0
  71. package/dist/user-api/rpc-gen/typings.d.ts +52 -3
  72. package/dist/user-api/rpc-gen/typings.d.ts.map +1 -1
  73. package/dist/utils.d.ts +17 -1
  74. package/dist/utils.d.ts.map +1 -1
  75. package/dist/utils.js +53 -2
  76. package/dist/utils.test.d.ts +2 -0
  77. package/dist/utils.test.d.ts.map +1 -0
  78. package/dist/utils.test.js +24 -0
  79. package/dist/web/frontend/404/index.html +2 -2
  80. package/dist/web/frontend/activities/index.html +3 -3
  81. package/dist/web/frontend/approve/index.html +4 -4
  82. package/dist/web/frontend/assets/404-MVLWUPwN.js +5 -0
  83. package/dist/web/frontend/assets/{activities-NY8oZAkH.js → activities-DaWkmGqA.js} +2 -2
  84. package/dist/web/frontend/assets/{addIdentityProvider-38ghz3RT.js → addIdentityProvider--rBb0ihb.js} +2 -2
  85. package/dist/web/frontend/assets/{addNetwork-BaDhbrZl.js → addNetwork-C6UDsRkU.js} +4 -4
  86. package/dist/web/frontend/assets/addParty-B3fFD1eM.js +45 -0
  87. package/dist/web/frontend/assets/approve-WbGL4E82.js +21 -0
  88. package/dist/web/frontend/assets/callback--tihEryB.js +1 -0
  89. package/dist/web/frontend/assets/{identityProviders-BZ9h_VOJ.js → identityProviders-Dra4qG6t.js} +2 -2
  90. package/dist/web/frontend/assets/{index-B-HiKugW.js → index-Bm76pXA_.js} +2 -2
  91. package/dist/web/frontend/assets/index-D1dC4Cl9.js +4477 -0
  92. package/dist/web/frontend/assets/{login-CqwMEG9J.js → login-BC8a-kD_.js} +2 -2
  93. package/dist/web/frontend/assets/{networks-BJvRi47M.js → networks-B3ztsogL.js} +2 -2
  94. package/dist/web/frontend/assets/{reviewIdentityProvider-ySlQnw5R.js → reviewIdentityProvider-Co420Dbk.js} +3 -3
  95. package/dist/web/frontend/assets/{reviewNetwork-DrVxeHd4.js → reviewNetwork-B-Sh8pCH.js} +3 -3
  96. package/dist/web/frontend/assets/{settings-BVNkaUyJ.js → settings-DvyUjqLl.js} +1 -1
  97. package/dist/web/frontend/assets/{state-qAsNw5qf.js → state-Bq65GwdF.js} +1 -1
  98. package/dist/web/frontend/assets/{utils-BDkHxi8V.js → utils-B2iziW8V.js} +1 -1
  99. package/dist/web/frontend/callback/index.html +2 -2
  100. package/dist/web/frontend/identity-providers/add/index.html +3 -3
  101. package/dist/web/frontend/identity-providers/index.html +3 -3
  102. package/dist/web/frontend/identity-providers/review/index.html +3 -3
  103. package/dist/web/frontend/index.html +1 -1
  104. package/dist/web/frontend/login/index.html +3 -3
  105. package/dist/web/frontend/networks/add/index.html +3 -3
  106. package/dist/web/frontend/networks/index.html +3 -3
  107. package/dist/web/frontend/networks/review/index.html +3 -3
  108. package/dist/web/frontend/parties/add/index.html +5 -5
  109. package/dist/web/frontend/parties/index.html +4 -4
  110. package/dist/web/frontend/settings/index.html +3 -3
  111. package/package.json +36 -32
  112. package/dist/web/frontend/assets/404-C7V2yl2z.js +0 -5
  113. package/dist/web/frontend/assets/addParty-j3JWZX5a.js +0 -41
  114. package/dist/web/frontend/assets/approve-43nVzAAC.js +0 -21
  115. package/dist/web/frontend/assets/callback-BBMiCjHR.js +0 -1
  116. package/dist/web/frontend/assets/index-DoNqknyE.js +0 -4042
@@ -4,14 +4,16 @@
4
4
  /* eslint-disable @typescript-eslint/no-unused-vars */
5
5
  import { LedgerClient } from '@canton-network/core-ledger-client';
6
6
  import buildController from './rpc-gen/index.js';
7
- import { assertConnected, authSchema, AuthTokenProvider, fetchOidcUserInfo, idpSchema, } from '@canton-network/core-wallet-auth';
8
- import { isRpcError, SigningProvider, } from '@canton-network/core-signing-lib';
7
+ import { assertConnected, authSchema, AuthTokenProvider, idpSchema, } from '@canton-network/core-wallet-auth';
8
+ import { isRpcError, SigningProvider } from '@canton-network/core-signing-lib';
9
9
  import { PartyAllocationService } from '../ledger/party-allocation-service.js';
10
10
  import { WalletAllocationService } from '../ledger/wallet-allocation/wallet-allocation-service.js';
11
11
  import { WalletSyncService } from '../ledger/wallet-sync-service.js';
12
- import { networkStatus } from '../utils.js';
12
+ import { logDynamically, networkStatus } from '../utils.js';
13
13
  import { v4 } from 'uuid';
14
14
  import { TransactionService } from '../ledger/transaction-service.js';
15
+ import { rpcErrors } from '@canton-network/core-rpc-errors';
16
+ import crypto from 'crypto';
15
17
  export const userController = (kernelInfo, userUrl, store, notificationService, authContext, drivers, _logger, adminUserId) => {
16
18
  const logger = _logger.child({ component: 'user-controller' });
17
19
  const provider = {
@@ -26,27 +28,6 @@ export const userController = (kernelInfo, userUrl, store, notificationService,
26
28
  throw new Error('Unauthorized: only the admin user can perform this operation');
27
29
  }
28
30
  }
29
- async function resolveUserEmail(connectedContext) {
30
- if (connectedContext.email) {
31
- return connectedContext.email;
32
- }
33
- try {
34
- const network = await store.getCurrentNetwork();
35
- if (!network) {
36
- return undefined;
37
- }
38
- const idp = await store.getIdp(network.identityProviderId);
39
- if (idp.type !== 'oauth') {
40
- return undefined;
41
- }
42
- const userInfo = await fetchOidcUserInfo(idp.configUrl, connectedContext.accessToken);
43
- return userInfo?.email;
44
- }
45
- catch (error) {
46
- logger.warn(error, 'Failed to resolve user email from OIDC userinfo');
47
- return undefined;
48
- }
49
- }
50
31
  return buildController({
51
32
  getUser: async () => {
52
33
  const userId = assertConnected(authContext).userId;
@@ -152,14 +133,10 @@ export const userController = (kernelInfo, userUrl, store, notificationService,
152
133
  await store.removeIdp(params.identityProviderId);
153
134
  return null;
154
135
  },
155
- listIdps: async () => Promise.resolve({ idps: await store.listIdps() }),
136
+ listIdps: async () => ({ idps: await store.listIdps() }),
156
137
  createWallet: async (params) => {
157
- logger.info(`Creating wallet with params: ${JSON.stringify(params)}`);
158
138
  const { signingProviderId, primary, partyHint } = params;
159
139
  const connectedContext = assertConnected(authContext);
160
- const userId = connectedContext.userId;
161
- const email = await resolveUserEmail(connectedContext);
162
- const notifier = notificationService.getNotifier(userId);
163
140
  const network = await store.getCurrentNetwork();
164
141
  if (network === undefined) {
165
142
  throw new Error('No network session found');
@@ -168,6 +145,7 @@ export const userController = (kernelInfo, userUrl, store, notificationService,
168
145
  if (!network.adminAuth) {
169
146
  throw new Error('No admin auth configured');
170
147
  }
148
+ const notifier = notificationService.getNotifier(connectedContext.userId);
171
149
  const adminTokenProvider = AuthTokenProvider.fromGatewayConfig(idp, network.adminAuth, logger);
172
150
  const partyAllocator = new PartyAllocationService({
173
151
  synchronizerId: network.synchronizerId,
@@ -179,7 +157,7 @@ export const userController = (kernelInfo, userUrl, store, notificationService,
179
157
  if (!drivers[signingProviderId]) {
180
158
  throw new Error(`Signing provider ${signingProviderId} not supported`);
181
159
  }
182
- const wallet = await walletAllocationService.createWallet(userId, email, partyHint, primary ?? false, signingProviderId);
160
+ const wallet = await walletAllocationService.createWallet(connectedContext, partyHint, primary ?? false, signingProviderId, params.vaultName);
183
161
  // Sync wallets (TODO: separate rights sync from wallet sync as we only need rights sync here)
184
162
  const ledgerClient = new LedgerClient({
185
163
  baseUrl: new URL(network.ledgerApi.baseUrl),
@@ -194,24 +172,21 @@ export const userController = (kernelInfo, userUrl, store, notificationService,
194
172
  return { wallet };
195
173
  },
196
174
  allocatePartyForWallet: async (params) => {
197
- logger.info(`Allocating party for wallet: ${JSON.stringify(params)}`);
198
175
  const connectedContext = assertConnected(authContext);
199
176
  const userId = connectedContext.userId;
200
- const email = await resolveUserEmail(connectedContext);
201
- const notifier = notificationService.getNotifier(userId);
202
177
  const network = await store.getCurrentNetwork();
203
178
  if (!network) {
204
179
  throw new Error('No network session found');
205
180
  }
181
+ if (!network.adminAuth) {
182
+ throw new Error('No admin auth configured');
183
+ }
206
184
  const allWallets = await store.getWallets();
207
185
  const existingWallet = allWallets.find((w) => w.partyId === params.partyId && w.networkId === network.id);
208
186
  if (!existingWallet) {
209
187
  throw new Error(`Wallet not found for party ${params.partyId}`);
210
188
  }
211
189
  const idp = await store.getIdp(network.identityProviderId);
212
- if (!network.adminAuth) {
213
- throw new Error('No admin auth configured');
214
- }
215
190
  const accessTokenProvider = AuthTokenProvider.fromGatewayConfig(idp, network.adminAuth, logger);
216
191
  const partyAllocator = new PartyAllocationService({
217
192
  synchronizerId: network.synchronizerId,
@@ -224,7 +199,7 @@ export const userController = (kernelInfo, userUrl, store, notificationService,
224
199
  if (!drivers[signingProviderId]) {
225
200
  throw new Error(`Signing provider ${signingProviderId} not supported`);
226
201
  }
227
- await walletAllocationService.allocateParty(userId, email, existingWallet, signingProviderId);
202
+ await walletAllocationService.allocateParty(connectedContext, existingWallet, signingProviderId);
228
203
  // Sync wallets (TODO: separate rights sync from wallet sync as we only need rights sync here)
229
204
  const ledgerClient = new LedgerClient({
230
205
  baseUrl: new URL(network.ledgerApi.baseUrl),
@@ -237,6 +212,7 @@ export const userController = (kernelInfo, userUrl, store, notificationService,
237
212
  const wallets = await store.getWallets();
238
213
  const wallet = wallets.find((w) => w.partyId === existingWallet.partyId &&
239
214
  w.networkId === network.id);
215
+ const notifier = notificationService.getNotifier(userId);
240
216
  notifier?.emit('accountsChanged', wallets);
241
217
  return { wallet };
242
218
  },
@@ -249,7 +225,9 @@ export const userController = (kernelInfo, userUrl, store, notificationService,
249
225
  notifier?.emit('accountsChanged', wallets);
250
226
  return null;
251
227
  },
252
- removeWallet: async (params) => Promise.resolve({}),
228
+ removeWallet: async (params) => {
229
+ throw rpcErrors.methodNotSupported();
230
+ },
253
231
  listWallets: async (params) => {
254
232
  return await store.getWallets(params.filter);
255
233
  },
@@ -265,36 +243,18 @@ export const userController = (kernelInfo, userUrl, store, notificationService,
265
243
  }
266
244
  const connectedContext = assertConnected(authContext);
267
245
  const userId = connectedContext.userId;
268
- const email = await resolveUserEmail(connectedContext);
269
246
  const notifier = notificationService.getNotifier(userId);
270
- const signingProvider = wallet.signingProviderId;
271
- const driver = drivers[signingProvider]?.controller(userId);
272
- if (!driver) {
273
- throw new Error(`No driver found for ${wallet.signingProviderId}`);
274
- }
275
247
  const transactionService = new TransactionService(store, logger, drivers, notifier);
276
- switch (wallet.signingProviderId) {
277
- case SigningProvider.PARTICIPANT: {
278
- return transactionService.signWithParticipant(wallet);
279
- }
280
- case SigningProvider.WALLET_KERNEL: {
281
- return transactionService.signWithWalletKernel(userId, wallet, signParams);
282
- }
283
- case SigningProvider.BLOCKDAEMON: {
284
- if (!email) {
285
- throw new Error('Email is required for Blockdaemon wallet allocation');
286
- }
287
- return transactionService.signWithBlockdaemon(email, wallet, signParams);
288
- }
289
- case SigningProvider.FIREBLOCKS: {
290
- return transactionService.signWithFireblocks(userId, wallet, signParams);
291
- }
292
- case SigningProvider.DFNS: {
293
- return transactionService.signWithDfns(userId, wallet, signParams);
294
- }
295
- default:
296
- throw new Error(`Unsupported signing provider: ${wallet.signingProviderId}`);
297
- }
248
+ logDynamically(logger, 'signing transaction with params', {
249
+ info: { transactionId: signParams.transactionId },
250
+ debug: { signParams, wallet, connectedContext },
251
+ });
252
+ const response = await transactionService.sign(connectedContext, wallet, signParams);
253
+ logDynamically(logger, 'transaction signed with response', {
254
+ info: { transactionId: signParams.transactionId },
255
+ debug: { response },
256
+ });
257
+ return response;
298
258
  },
299
259
  signMessage: async (params) => {
300
260
  const pending = await store.getMessageRaw(params.messageId);
@@ -437,45 +397,38 @@ export const userController = (kernelInfo, userUrl, store, notificationService,
437
397
  const transaction = await store.getTransaction(executeParams.transactionId);
438
398
  const wallet = wallets.find((w) => w.partyId === executeParams.partyId);
439
399
  if (wallet === undefined) {
440
- throw new Error('No primary wallet found');
400
+ throw new Error('Requested wallet not found for user');
441
401
  }
442
402
  if (transaction === undefined) {
443
403
  throw new Error('No transaction found');
444
404
  }
445
- const userId = assertConnected(authContext).userId;
405
+ const connectedContext = assertConnected(authContext);
406
+ const accessTokenProvider = AuthTokenProvider.fromToken(connectedContext.accessToken, logger);
446
407
  if (network === undefined) {
447
408
  throw new Error('No network session found');
448
409
  }
449
- const notifier = notificationService.getNotifier(userId);
450
- // Create AccessTokenProvider for user token
451
- const userAccessTokenProvider = AuthTokenProvider.fromToken(authContext.accessToken, logger);
410
+ const notifier = notificationService.getNotifier(connectedContext.userId);
452
411
  const ledgerClient = new LedgerClient({
453
412
  baseUrl: new URL(network.ledgerApi.baseUrl),
454
413
  logger,
455
- accessTokenProvider: userAccessTokenProvider,
414
+ accessTokenProvider,
456
415
  });
457
416
  const transactionService = new TransactionService(store, logger, drivers, notifier);
458
- switch (wallet.signingProviderId) {
459
- case SigningProvider.PARTICIPANT: {
460
- try {
461
- return await transactionService.executeWithParticipant(userId, executeParams, transaction, ledgerClient, network);
462
- }
463
- catch (error) {
464
- logger.error(error, 'Failed to submit transaction');
465
- throw error;
466
- }
467
- }
468
- case SigningProvider.WALLET_KERNEL:
469
- case SigningProvider.BLOCKDAEMON:
470
- case SigningProvider.FIREBLOCKS: {
471
- return transactionService.executeWithExternal(userId, executeParams, transaction, ledgerClient);
472
- }
473
- case SigningProvider.DFNS: {
474
- return transactionService.executeWithDfns(transaction);
475
- }
476
- default:
477
- throw new Error(`Unsupported signing provider: ${wallet.signingProviderId}`);
478
- }
417
+ logDynamically(logger, 'executing transaction with params', {
418
+ info: { transactionId: executeParams.transactionId },
419
+ debug: {
420
+ executeParams,
421
+ transaction,
422
+ wallet,
423
+ userId: connectedContext.userId,
424
+ },
425
+ });
426
+ const response = await transactionService.execute(connectedContext.userId, wallet, transaction, executeParams, ledgerClient, network);
427
+ logDynamically(logger, 'transaction executed with response', {
428
+ info: { transactionId: executeParams.transactionId },
429
+ debug: { response },
430
+ });
431
+ return response;
479
432
  },
480
433
  addSession: async function (params) {
481
434
  try {
@@ -555,7 +508,7 @@ export const userController = (kernelInfo, userUrl, store, notificationService,
555
508
  }
556
509
  },
557
510
  removeSession: async () => {
558
- logger.info(authContext, 'Removing session');
511
+ logger.info({ authContext }, 'Removing session');
559
512
  const userId = assertConnected(authContext).userId;
560
513
  const notifier = notificationService.getNotifier(userId);
561
514
  await store.removeSession();
@@ -726,6 +679,70 @@ export const userController = (kernelInfo, userUrl, store, notificationService,
726
679
  await store.removeTransaction(transaction.id);
727
680
  return null;
728
681
  },
682
+ generateApiKey: async (params) => {
683
+ const userId = assertConnected(authContext).userId;
684
+ const network = await store.getCurrentNetwork();
685
+ const apiKeyId = v4();
686
+ const generatedApiKey = crypto.randomBytes(32).toString('hex');
687
+ const hashedApiKey = crypto
688
+ .createHash('sha256')
689
+ .update(generatedApiKey)
690
+ .digest('hex');
691
+ const storedApiKey = {
692
+ id: apiKeyId,
693
+ name: params.name,
694
+ digest: hashedApiKey,
695
+ userId,
696
+ networkId: network.id,
697
+ email: authContext?.email || null,
698
+ createdAt: new Date(),
699
+ };
700
+ await store.addApiKey(storedApiKey);
701
+ logDynamically(logger, 'Generated new API key', {
702
+ info: { apiKeyId: storedApiKey.id },
703
+ debug: {
704
+ name: storedApiKey.name,
705
+ userId: storedApiKey.userId,
706
+ networkId: storedApiKey.networkId,
707
+ createdAt: storedApiKey.createdAt,
708
+ },
709
+ });
710
+ return {
711
+ id: storedApiKey.id,
712
+ apiKey: generatedApiKey,
713
+ };
714
+ },
715
+ listApiKeys: async () => {
716
+ const apiKeys = await store.listApiKeys().then((keys) => keys.map((key) => ({
717
+ id: key.id,
718
+ name: key.name,
719
+ createdAt: key.createdAt.toISOString(),
720
+ })));
721
+ return { apiKeys };
722
+ },
723
+ removeApiKey: async (params) => {
724
+ await store.removeApiKey(params.id);
725
+ return null;
726
+ },
727
+ listSigningProviderVaults: async (params) => {
728
+ const network = await store.getCurrentNetwork();
729
+ const idp = await store.getIdp(network.identityProviderId);
730
+ if (!network.adminAuth) {
731
+ throw new Error('No admin auth configured');
732
+ }
733
+ const adminAccessTokenProvider = AuthTokenProvider.fromGatewayConfig(idp, network.adminAuth, logger);
734
+ const partyAllocator = new PartyAllocationService({
735
+ synchronizerId: network.synchronizerId,
736
+ accessTokenProvider: adminAccessTokenProvider,
737
+ httpLedgerUrl: network.ledgerApi.baseUrl,
738
+ logger,
739
+ });
740
+ const walletAllocationService = new WalletAllocationService(store, logger, partyAllocator, drivers);
741
+ if (!drivers[params.signingProviderId]) {
742
+ throw new Error(`Signing provider ${params.signingProviderId} not supported`);
743
+ }
744
+ return walletAllocationService.getVaults(assertConnected(authContext), params.signingProviderId);
745
+ },
729
746
  });
730
747
  };
731
748
  function toAuthDto(auth) {
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=controller.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"controller.test.d.ts","sourceRoot":"","sources":["../../src/user-api/controller.test.ts"],"names":[],"mappings":""}