@canton-network/wallet-gateway-remote 1.8.0 → 1.9.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 (43) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +1 -1
  3. package/dist/ledger/transaction-service.d.ts.map +1 -1
  4. package/dist/ledger/transaction-service.js +1 -1
  5. package/dist/user-api/controller.d.ts.map +1 -1
  6. package/dist/user-api/controller.js +8 -0
  7. package/dist/user-api/controller.test.js +43 -3
  8. package/dist/user-api/token-network-matching.d.ts.map +1 -1
  9. package/dist/user-api/token-network-matching.js +4 -3
  10. package/dist/utils.d.ts.map +1 -1
  11. package/dist/utils.js +1 -0
  12. package/dist/web/frontend/404/index.html +2 -2
  13. package/dist/web/frontend/activities/index.html +2 -2
  14. package/dist/web/frontend/approve/index.html +2 -2
  15. package/dist/web/frontend/assets/{404-DAyFyvuw.js → 404-G9ooRT6W.js} +2 -2
  16. package/dist/web/frontend/assets/{activities-BQSNQCP2.js → activities-WIV19RPr.js} +2 -2
  17. package/dist/web/frontend/assets/{addIdentityProvider-Djya4QfT.js → addIdentityProvider-DA4ry8mX.js} +3 -3
  18. package/dist/web/frontend/assets/{addNetwork-83_QwE58.js → addNetwork-URqIQBpY.js} +2 -2
  19. package/dist/web/frontend/assets/{addParty-CdxWCt0U.js → addParty-CYVpWBOW.js} +2 -2
  20. package/dist/web/frontend/assets/{approve-NcV61aZJ.js → approve-uxh5J3JI.js} +2 -2
  21. package/dist/web/frontend/assets/{callback-U_3ypVos.js → callback-BSwKp4qp.js} +1 -1
  22. package/dist/web/frontend/assets/{identityProviders-CIk5SJX_.js → identityProviders-nRE_Y8vP.js} +2 -2
  23. package/dist/web/frontend/assets/{index-uxv_f8PV.js → index-Bbo4F8DN.js} +127 -113
  24. package/dist/web/frontend/assets/{index-jHlzHNRR.js → index-kNaUhLVu.js} +2 -2
  25. package/dist/web/frontend/assets/login-Dojx8YbO.js +11 -0
  26. package/dist/web/frontend/assets/{networks-C1kpJNtZ.js → networks-pshe9KRL.js} +1 -1
  27. package/dist/web/frontend/assets/{reviewIdentityProvider-BZv-CbZZ.js → reviewIdentityProvider-DtUWN0jT.js} +4 -4
  28. package/dist/web/frontend/assets/{reviewNetwork-CnoSJz4N.js → reviewNetwork-3vKq0jr4.js} +2 -2
  29. package/dist/web/frontend/assets/{settings-Dt0_RW30.js → settings-Bdp9lvU5.js} +2 -2
  30. package/dist/web/frontend/callback/index.html +2 -2
  31. package/dist/web/frontend/identity-providers/add/index.html +2 -2
  32. package/dist/web/frontend/identity-providers/index.html +2 -2
  33. package/dist/web/frontend/identity-providers/review/index.html +2 -2
  34. package/dist/web/frontend/index.html +1 -1
  35. package/dist/web/frontend/login/index.html +2 -2
  36. package/dist/web/frontend/networks/add/index.html +2 -2
  37. package/dist/web/frontend/networks/index.html +2 -2
  38. package/dist/web/frontend/networks/review/index.html +2 -2
  39. package/dist/web/frontend/parties/add/index.html +3 -3
  40. package/dist/web/frontend/parties/index.html +2 -2
  41. package/dist/web/frontend/settings/index.html +2 -2
  42. package/package.json +43 -43
  43. package/dist/web/frontend/assets/login-C_JAX4Df.js +0 -10
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "{}"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright {yyyy} {name of copyright owner}
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
202
+
package/README.md CHANGED
@@ -42,7 +42,7 @@ wallet-gateway --config-schema
42
42
 
43
43
  ## Codegen
44
44
 
45
- The JSON-RPC API specs from `api-specs/` are generated into strongly-typed method builders for the remote RPC server. To update the codegen, run `yarn generate:dapp`.
45
+ The JSON-RPC API specs from `api-specs/` are generated into strongly-typed method builders for the remote RPC server. To update the codegen, run `pnpm generate:dapp`.
46
46
 
47
47
  ## Dfns
48
48
 
@@ -1 +1 @@
1
- {"version":3,"file":"transaction-service.d.ts","sourceRoot":"","sources":["../../src/ledger/transaction-service.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA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AAC,EAAE,aAAa,EAC7B,YAAY,CAAC,EAAE,YAAY,EAC3B,OAAO,CAAC,EAAE,OAAO,GAClB,OAAO,CAAC,aAAa,CAAC;IAkEZ,cAAc,CACvB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,GACzB,OAAO,CAAC,oBAAoB,CAAC;YAyDlB,iCAAiC;YAsBjC,mBAAmB;YAiCnB,oBAAoB;YAyDpB,mBAAmB;YAiHnB,kBAAkB;YAqHlB,YAAY;YA6GZ,iBAAiB;YA4GjB,sBAAsB;YAoDtB,mBAAmB;CAiEpC"}
@@ -582,7 +582,7 @@ export class TransactionService {
582
582
  const result = await ledgerClient.postWithRetry('/v2/interactive-submission/executeAndWait', {
583
583
  userId,
584
584
  preparedTransaction: transaction.preparedTransaction,
585
- hashingSchemeVersion: 'HASHING_SCHEME_VERSION_V2',
585
+ hashingSchemeVersion: 'HASHING_SCHEME_VERSION_V3',
586
586
  submissionId: commandId,
587
587
  deduplicationPeriod: {
588
588
  Empty: {},
@@ -1 +1 @@
1
- {"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../src/user-api/controller.ts"],"names":[],"mappings":"AAgDA,OAAO,EAAE,KAAK,EAAW,MAAM,mCAAmC,CAAA;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAC7B,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAA;AAC5E,OAAO,EAEH,WAAW,EAKd,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAEhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAanE,eAAO,MAAM,cAAc,GACvB,YAAY,UAAU,EACtB,SAAS,MAAM,EACf,OAAO,KAAK,EACZ,qBAAqB,mBAAmB,EACxC,aAAa,WAAW,GAAG,SAAS,EACpC,SAAS,cAAc,EACvB,SAAS,MAAM,EACf,cAAc,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4mCvB,CAAA"}
1
+ {"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../src/user-api/controller.ts"],"names":[],"mappings":"AAgDA,OAAO,EAAE,KAAK,EAAW,MAAM,mCAAmC,CAAA;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAC7B,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAA;AAC5E,OAAO,EAEH,WAAW,EAKd,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAEhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAgBnE,eAAO,MAAM,cAAc,GACvB,YAAY,UAAU,EACtB,SAAS,MAAM,EACf,OAAO,KAAK,EACZ,qBAAqB,mBAAmB,EACxC,aAAa,WAAW,GAAG,SAAS,EACpC,SAAS,cAAc,EACvB,SAAS,MAAM,EACf,cAAc,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAunCvB,CAAA"}
@@ -739,7 +739,15 @@ export const userController = (kernelInfo, userUrl, store, notificationService,
739
739
  if (transaction.status !== 'pending') {
740
740
  throw new Error(`Cannot delete transaction with status '${transaction.status}'. Only pending transactions can be deleted.`);
741
741
  }
742
+ const session = await store.getSession(assertConnected(authContext).accessToken);
743
+ if (!session) {
744
+ throw new Error('No active session found');
745
+ }
742
746
  await store.removeTransaction(transaction.id);
747
+ notificationService.getNotifier(session.id).emit('txChanged', {
748
+ status: 'failed',
749
+ commandId: transaction.commandId,
750
+ });
743
751
  return null;
744
752
  },
745
753
  generateApiKey: async (params) => {
@@ -493,13 +493,20 @@ describe('userController', () => {
493
493
  expect(result.transactions).toHaveLength(1);
494
494
  expect(result.transactions[0]?.id).toBe('tx-1');
495
495
  });
496
- it('deletes a pending transaction', async () => {
496
+ it('deletes a pending transaction and emits a failed event', async () => {
497
497
  const store = await createStore(logger, auth);
498
498
  await store.setTransaction(transaction);
499
499
  const removeSpy = vi.spyOn(store, 'removeTransaction');
500
+ const emitSpy = vi.spyOn(notificationService.getNotifier(session.id), 'emit');
500
501
  const controller = createController(store, notificationService, logger, auth);
501
502
  await controller.deleteTransaction({ transactionId: 'tx-1' });
502
503
  expect(removeSpy).toHaveBeenCalledWith('tx-1');
504
+ expect(emitSpy).toHaveBeenCalledOnce();
505
+ expect(emitSpy).toHaveBeenCalledWith('txChanged', {
506
+ status: 'failed',
507
+ commandId: transaction.commandId,
508
+ });
509
+ expect(removeSpy.mock.invocationCallOrder[0]).toBeLessThan(emitSpy.mock.invocationCallOrder[0]);
503
510
  });
504
511
  it('rejects delete when the transaction is not pending', async () => {
505
512
  const store = await createStore(logger, auth);
@@ -841,9 +848,22 @@ describe('userController', () => {
841
848
  networkId: 'network1',
842
849
  })).rejects.toThrow('Failed to add session');
843
850
  });
844
- it('addSession rejects token with subject mismatch', async () => {
851
+ it('addSession rejects token with client_id claim and auth.clientId mismatch', async () => {
852
+ const authWithInvalidSubject = createAuthWithAddSessionClaims({
853
+ client_id: 'wrong-client-id',
854
+ });
855
+ const store = await createStore(logger, authWithInvalidSubject, {
856
+ withWallet: false,
857
+ });
858
+ const controller = createController(store, notificationService, logger, authWithInvalidSubject);
859
+ await expect(controller.addSession({
860
+ origin: 'dapp-1',
861
+ networkId: 'network1',
862
+ })).rejects.toThrow('Failed to add session');
863
+ });
864
+ it('addSession rejects token with azp claim and auth.clientId mismatch', async () => {
845
865
  const authWithInvalidSubject = createAuthWithAddSessionClaims({
846
- sub: 'wrong-client-id',
866
+ azp: 'wrong-client-id',
847
867
  });
848
868
  const store = await createStore(logger, authWithInvalidSubject, {
849
869
  withWallet: false,
@@ -854,6 +874,26 @@ describe('userController', () => {
854
874
  networkId: 'network1',
855
875
  })).rejects.toThrow('Failed to add session');
856
876
  });
877
+ it("addSession passes when token doesn't token have azp and client-id claims", async () => {
878
+ const authWithInvalidSubject = createAuthWithAddSessionClaims();
879
+ const store = await createStore(logger, authWithInvalidSubject, {
880
+ withWallet: false,
881
+ });
882
+ const controller = createController(store, notificationService, logger, authWithInvalidSubject);
883
+ const result = await controller.addSession({
884
+ origin: 'dapp-1',
885
+ networkId: 'network1',
886
+ });
887
+ expect(result).toMatchObject({
888
+ network: expect.objectContaining({
889
+ id: 'network1',
890
+ auth: expect.objectContaining({
891
+ method: 'authorization_code',
892
+ }),
893
+ }),
894
+ status: 'connected',
895
+ });
896
+ });
857
897
  });
858
898
  describe('createWallet', () => {
859
899
  const walletKernelDriver = {
@@ -1 +1 @@
1
- {"version":3,"file":"token-network-matching.d.ts","sourceRoot":"","sources":["../../src/user-api/token-network-matching.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,GAAG,EAAQ,MAAM,kCAAkC,CAAA;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAA;AAwC3D,wBAAgB,6BAA6B,CACzC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,GAAG,GACT,IAAI,CA2CN"}
1
+ {"version":3,"file":"token-network-matching.d.ts","sourceRoot":"","sources":["../../src/user-api/token-network-matching.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,GAAG,EAAQ,MAAM,kCAAkC,CAAA;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAA;AAwC3D,wBAAgB,6BAA6B,CACzC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,GAAG,GACT,IAAI,CA4CN"}
@@ -35,9 +35,10 @@ export function assertTokenClaimsMatchNetwork(accessToken, network, idp) {
35
35
  if (!tokenAudiences.includes(network.auth.audience)) {
36
36
  throw new Error(`Token aud claim doesn't match network's auth audience.`);
37
37
  }
38
- const tokenSubject = tokenClaims.sub;
39
- if (tokenSubject !== network.auth.clientId) {
40
- throw new Error(`Token sub claim doesn't match network's auth clientId.`);
38
+ // check client ID based on `azp` (Authorized Party) claim or `client_id` claim, only if present.
39
+ const tokenClientId = tokenClaims.azp || tokenClaims.client_id;
40
+ if (tokenClientId && tokenClientId !== network.auth.clientId) {
41
+ throw new Error(`Token client ID doesn't match network's auth clientId.`);
41
42
  }
42
43
  const requiredScopes = normalizeScopeClaim(network.auth.scope);
43
44
  const hasScopeClaim = tokenClaims.scope !== undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,oCAAoC,CAAA;AACxE,OAAO,KAAK,EACR,kBAAkB,EAClB,QAAQ,EACR,4BAA4B,EAC/B,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAE7B,KAAK,aAAa,GAAG;IACjB,WAAW,EAAE,OAAO,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,aAAa,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA;AAED,wBAAsB,aAAa,CAC/B,YAAY,EAAE,YAAY,GAC3B,OAAO,CAAC,aAAa,CAAC,CAaxB;AAED,MAAM,WAAW,aAAa;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,kBAAkB,CAAC,EAAE,kBAAkB,CAAA;IACvC,4BAA4B,CAAC,EAAE,4BAA4B,CAAA;CAC9D;AAED,wBAAgB,mBAAmB,CAC/B,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAAE,EAClB,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,aAAa,GACtB,KAAK,CAAC,4BAA4B,CAAC,CAuBrC;AAED,UAAU,gBAAgB;IACtB,IAAI,CAAC,EAAE,MA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,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CAChB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC1B,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,gBAAgB,GACvB,IAAI,CAUN;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,GAAE,MAAU,GAAG,MAAM,EAAE,CA8BxE"}
package/dist/utils.js CHANGED
@@ -37,6 +37,7 @@ export function ledgerPrepareParams(userId, partyIds, synchronizerId, params) {
37
37
  synchronizerId,
38
38
  verboseHashing: false,
39
39
  packageIdSelectionPreference: params.packageIdSelectionPreference || [],
40
+ hashingSchemeVersion: 'HASHING_SCHEME_VERSION_V3',
40
41
  };
41
42
  }
42
43
  /**
@@ -4,8 +4,8 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Wallet Gateway - Not found</title>
7
- <script type="module" crossorigin src="../assets/404-DAyFyvuw.js"></script>
8
- <link rel="modulepreload" crossorigin href="../assets/index-uxv_f8PV.js">
7
+ <script type="module" crossorigin src="../assets/404-G9ooRT6W.js"></script>
8
+ <link rel="modulepreload" crossorigin href="../assets/index-Bbo4F8DN.js">
9
9
  </head>
10
10
 
11
11
  <body>
@@ -4,8 +4,8 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Wallet Gateway - Activities</title>
7
- <script type="module" crossorigin src="../assets/activities-BQSNQCP2.js"></script>
8
- <link rel="modulepreload" crossorigin href="../assets/index-uxv_f8PV.js">
7
+ <script type="module" crossorigin src="../assets/activities-WIV19RPr.js"></script>
8
+ <link rel="modulepreload" crossorigin href="../assets/index-Bbo4F8DN.js">
9
9
  <link rel="modulepreload" crossorigin href="../assets/index-BjhQnXf1.js">
10
10
  </head>
11
11
  <body>
@@ -4,8 +4,8 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Wallet Gateway - Activity detail</title>
7
- <script type="module" crossorigin src="../assets/approve-NcV61aZJ.js"></script>
8
- <link rel="modulepreload" crossorigin href="../assets/index-uxv_f8PV.js">
7
+ <script type="module" crossorigin src="../assets/approve-uxh5J3JI.js"></script>
8
+ <link rel="modulepreload" crossorigin href="../assets/index-Bbo4F8DN.js">
9
9
  <link rel="modulepreload" crossorigin href="../assets/index-BjhQnXf1.js">
10
10
  </head>
11
11
 
@@ -1,5 +1,5 @@
1
- import{h as m,i as z,O as E,b as I,t as j}from"./index-uxv_f8PV.js";var k=Object.create,s=Object.defineProperty,D=Object.getOwnPropertyDescriptor,y=(r,e)=>(e=Symbol[r])?e:Symbol.for("Symbol."+r),O=r=>{throw TypeError(r)},F=(r,e,o)=>e in r?s(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,g=(r,e)=>s(r,"name",{value:e,configurable:!0}),A=r=>[,,,k(r?.[y("metadata")]??null)],C=["class","method","getter","setter","accessor","field","value","get","set"],x=r=>r!==void 0&&typeof r!="function"?O("Function expected"):r,M=(r,e,o,_,t)=>({kind:C[r],name:e,metadata:_,addInitializer:a=>o._?O("Already initialized"):t.push(x(a||null))}),N=(r,e)=>F(e,y("metadata"),r[3]),T=(r,e,o,_)=>{for(var t=0,a=r[e>>1],n=a&&a.length;t<n;t++)a[t].call(o);return _},$=(r,e,o,_,t,a)=>{var n,p,f,i=e&7,b=!1,h=0,P=r[h]||(r[h]=[]),c=i&&(t=t.prototype,i<5&&(i>3||!b)&&D(t,o));g(t,o);for(var d=_.length-1;d>=0;d--)f=M(i,o,p={},r[3],P),n=(0,_[d])(t,f),p._=1,x(n)&&(t=n);return N(r,t),c&&s(t,o,c),b?i^4?a:c:t},S,v,w;S=[j("user-ui-404")];const u=class u extends(w=m){render(){return I`<not-found href=${E("/")}></not-found>`}};u.styles=[m.styles,z`
1
+ import{v as h,i as P,E as z,b as I,t as j}from"./index-Bbo4F8DN.js";var k=Object.create,s=Object.defineProperty,D=Object.getOwnPropertyDescriptor,y=(r,e)=>(e=Symbol[r])?e:Symbol.for("Symbol."+r),x=r=>{throw TypeError(r)},F=(r,e,o)=>e in r?s(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,g=(r,e)=>s(r,"name",{value:e,configurable:!0}),A=r=>[,,,k(r?.[y("metadata")]??null)],C=["class","method","getter","setter","accessor","field","value","get","set"],S=r=>r!==void 0&&typeof r!="function"?x("Function expected"):r,M=(r,e,o,_,t)=>({kind:C[r],name:e,metadata:_,addInitializer:a=>o._?x("Already initialized"):t.push(S(a||null))}),N=(r,e)=>F(e,y("metadata"),r[3]),T=(r,e,o,_)=>{for(var t=0,a=r[e>>1],n=a&&a.length;t<n;t++)a[t].call(o);return _},$=(r,e,o,_,t,a)=>{var n,p,f,i=e&7,b=!1,m=0,O=r[m]||(r[m]=[]),c=i&&(t=t.prototype,i<5&&(i>3||!b)&&D(t,o));g(t,o);for(var d=_.length-1;d>=0;d--)f=M(i,o,p={},r[3],O),n=(0,_[d])(t,f),p._=1,S(n)&&(t=n);return N(r,t),c&&s(t,o,c),b?i^4?a:c:t},w,v,E;w=[j("user-ui-404")];const u=class u extends(E=h){render(){return I`<not-found href=${z("/")}></not-found>`}};u.styles=[h.styles,P`
2
2
  :host {
3
3
  display: block;
4
4
  }
5
- `];let l=u;v=A(w);l=$(v,0,"NotFoundUi",S,l);T(v,1,l);
5
+ `];let l=u;v=A(E);l=$(v,0,"NotFoundUi",w,l);T(v,1,l);
@@ -1,4 +1,4 @@
1
- import{r as C,b as _,O as Y,s as Z,d as j,c as tt,a as at,o as et,h as N,i as it,t as st}from"./index-uxv_f8PV.js";import{p as rt}from"./index-BjhQnXf1.js";var nt=Object.create,I=Object.defineProperty,ot=Object.getOwnPropertyDescriptor,R=(a,t)=>(t=Symbol[a])?t:Symbol.for("Symbol."+a),v=a=>{throw TypeError(a)},ct=(a,t,e)=>t in a?I(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e,F=(a,t)=>I(a,"name",{value:t,configurable:!0}),dt=a=>[,,,nt(a?.[R("metadata")]??null)],q=["class","method","getter","setter","accessor","field","value","get","set"],m=a=>a!==void 0&&typeof a!="function"?v("Function expected"):a,lt=(a,t,e,o,s)=>({kind:q[a],name:t,metadata:o,addInitializer:r=>e._?v("Already initialized"):s.push(m(r||null))}),pt=(a,t)=>ct(t,R("metadata"),a[3]),p=(a,t,e,o)=>{for(var s=0,r=a[t>>1],h=r&&r.length;s<h;s++)t&1?r[s].call(e):o=r[s].call(e,o);return o},w=(a,t,e,o,s,r)=>{var h,d,x,f,T,i=t&7,$=!!(t&8),u=!!(t&16),P=i>3?a.length+1:i?$?1:2:0,E=q[i+5],D=i>3&&(a[P-1]=[]),X=a[P]||(a[P]=[]),l=i&&(!u&&!$&&(s=s.prototype),i<5&&(i>3||!u)&&ot(i<4?s:{get[e](){return H(this,r)},set[e](c){return L(this,r,c)}},e));i?u&&i<4&&F(r,(i>2?"set ":i>1?"get ":"")+e):F(s,e);for(var b=o.length-1;b>=0;b--)f=lt(i,e,x={},a[3],X),i&&(f.static=$,f.private=u,T=f.access={has:u?c=>ht(s,c):c=>e in c},i^3&&(T.get=u?c=>(i^1?H:ut)(c,s,i^4?r:l.get):c=>c[e]),i>2&&(T.set=u?(c,k)=>L(c,s,k,i^4?r:l.set):(c,k)=>c[e]=k)),d=(0,o[b])(i?i<4?u?r:l[E]:i>4?void 0:{get:l.get,set:l.set}:s,f),x._=1,i^4||d===void 0?m(d)&&(i>4?D.unshift(d):i?u?r=d:l[E]=d:s=d):typeof d!="object"||d===null?v("Object expected"):(m(h=d.get)&&(l.get=h),m(h=d.set)&&(l.set=h),m(h=d.init)&&D.unshift(h));return i||pt(a,s),l&&I(s,e,l),u?i^4?r:l:s},O=(a,t,e)=>t.has(a)||v("Cannot "+e),ht=(a,t)=>Object(t)!==t?v('Cannot use the "in" operator on this value'):a.has(t),H=(a,t,e)=>(O(a,t,"read from private field"),e?e.call(a):t.get(a)),y=(a,t,e)=>t.has(a)?v("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(a):t.set(a,e),L=(a,t,e,o)=>(O(a,t,"write to private field"),o?o.call(a,e):t.set(a,e),e),ut=(a,t,e)=>(O(a,t,"access private method"),e),G,B,J,K,Q,S,V,n,z,A,M,U,W;V=[st("user-ui-activities")];class g extends(S=N,Q=[C()],K=[C()],J=[C()],B=[C()],G=[C()],S){constructor(){super(...arguments),y(this,z,p(n,8,this,[])),p(n,11,this),y(this,A,p(n,12,this,new Map)),p(n,15,this),y(this,M,p(n,16,this,!1)),p(n,19,this),y(this,U,p(n,20,this,1)),p(n,23,this),y(this,W,p(n,24,this,0)),p(n,27,this),this.pageCursors=[void 0],this.pageSize=4}render(){return _`
1
+ import{r as C,b as _,E as Y,s as Z,d as j,c as tt,a as at,e as et,v as N,i as it,t as st}from"./index-Bbo4F8DN.js";import{p as rt}from"./index-BjhQnXf1.js";var nt=Object.create,I=Object.defineProperty,ot=Object.getOwnPropertyDescriptor,R=(a,t)=>(t=Symbol[a])?t:Symbol.for("Symbol."+a),v=a=>{throw TypeError(a)},ct=(a,t,e)=>t in a?I(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e,F=(a,t)=>I(a,"name",{value:t,configurable:!0}),dt=a=>[,,,nt(a?.[R("metadata")]??null)],q=["class","method","getter","setter","accessor","field","value","get","set"],m=a=>a!==void 0&&typeof a!="function"?v("Function expected"):a,lt=(a,t,e,o,s)=>({kind:q[a],name:t,metadata:o,addInitializer:r=>e._?v("Already initialized"):s.push(m(r||null))}),pt=(a,t)=>ct(t,R("metadata"),a[3]),p=(a,t,e,o)=>{for(var s=0,r=a[t>>1],h=r&&r.length;s<h;s++)t&1?r[s].call(e):o=r[s].call(e,o);return o},w=(a,t,e,o,s,r)=>{var h,d,W,f,T,i=t&7,$=!!(t&8),u=!!(t&16),P=i>3?a.length+1:i?$?1:2:0,x=q[i+5],D=i>3&&(a[P-1]=[]),X=a[P]||(a[P]=[]),l=i&&(!u&&!$&&(s=s.prototype),i<5&&(i>3||!u)&&ot(i<4?s:{get[e](){return H(this,r)},set[e](c){return L(this,r,c)}},e));i?u&&i<4&&F(r,(i>2?"set ":i>1?"get ":"")+e):F(s,e);for(var b=o.length-1;b>=0;b--)f=lt(i,e,W={},a[3],X),i&&(f.static=$,f.private=u,T=f.access={has:u?c=>ht(s,c):c=>e in c},i^3&&(T.get=u?c=>(i^1?H:ut)(c,s,i^4?r:l.get):c=>c[e]),i>2&&(T.set=u?(c,k)=>L(c,s,k,i^4?r:l.set):(c,k)=>c[e]=k)),d=(0,o[b])(i?i<4?u?r:l[x]:i>4?void 0:{get:l.get,set:l.set}:s,f),W._=1,i^4||d===void 0?m(d)&&(i>4?D.unshift(d):i?u?r=d:l[x]=d:s=d):typeof d!="object"||d===null?v("Object expected"):(m(h=d.get)&&(l.get=h),m(h=d.set)&&(l.set=h),m(h=d.init)&&D.unshift(h));return i||pt(a,s),l&&I(s,e,l),u?i^4?r:l:s},z=(a,t,e)=>t.has(a)||v("Cannot "+e),ht=(a,t)=>Object(t)!==t?v('Cannot use the "in" operator on this value'):a.has(t),H=(a,t,e)=>(z(a,t,"read from private field"),e?e.call(a):t.get(a)),y=(a,t,e)=>t.has(a)?v("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(a):t.set(a,e),L=(a,t,e,o)=>(z(a,t,"write to private field"),o?o.call(a,e):t.set(a,e),e),ut=(a,t,e)=>(z(a,t,"access private method"),e),G,B,J,K,Q,S,V,n,A,M,O,U,E;V=[st("user-ui-activities")];class g extends(S=N,Q=[C()],K=[C()],J=[C()],B=[C()],G=[C()],S){constructor(){super(...arguments),y(this,A,p(n,8,this,[])),p(n,11,this),y(this,M,p(n,12,this,new Map)),p(n,15,this),y(this,O,p(n,16,this,!1)),p(n,19,this),y(this,U,p(n,20,this,1)),p(n,23,this),y(this,E,p(n,24,this,0)),p(n,27,this),this.pageCursors=[void 0],this.pageSize=4}render(){return _`
2
2
  <div class="page-header">
3
3
  <h1 class="h4 fw-semibold mb-0 text-body">Activities</h1>
4
4
  </div>
@@ -36,7 +36,7 @@ import{r as C,b as _,O as Y,s as Z,d as j,c as tt,a as at,o as et,h as N,i as it
36
36
  `:_`<p class="mb-0 text-body-secondary">
37
37
  No activities yet.
38
38
  </p>`}
39
- `}connectedCallback(){super.connectedCallback(),this.updateTransactions()}_onReview(t){const e=Y("/approve");Z(`${e}?transactionId=${t.transactionId}`)}_onPageChange(t){const e=t.detail.page;e===this.currentPage||e<1||(this.currentPage=e,this.updateTransactions())}async updateTransactions(){this.loading=!0;try{const t=await j(),e=await tt(await at.accessToken.get(t)),o=this.pageCursors[this.currentPage-1],s=await e.request({method:"listTransactions",params:{limit:this.pageSize,...o!==void 0?{cursor:o}:{}}});this.transactions=s.transactions||[],this.totalTransactionCount=s.count??0,s.nextCursor&&(this.pageCursors[this.currentPage]=s.nextCursor),this.parsedTransactions=new Map(this.transactions.map(r=>{try{return[r.id,rt(r.preparedTransaction)]}catch(h){return console.error("Error parsing transaction:",h),[r.id,null]}}))}catch(t){et(t)}finally{this.loading=!1}}}n=dt(S);z=new WeakMap;A=new WeakMap;M=new WeakMap;U=new WeakMap;W=new WeakMap;w(n,4,"transactions",Q,g,z);w(n,4,"parsedTransactions",K,g,A);w(n,4,"loading",J,g,M);w(n,4,"currentPage",B,g,U);w(n,4,"totalTransactionCount",G,g,W);g=w(n,0,"UserUiActivities",V,g);g.styles=[N.styles,it`
39
+ `}connectedCallback(){super.connectedCallback(),this.updateTransactions()}_onReview(t){const e=Y("/approve");Z(`${e}?transactionId=${t.transactionId}`)}_onPageChange(t){const e=t.detail.page;e===this.currentPage||e<1||(this.currentPage=e,this.updateTransactions())}async updateTransactions(){this.loading=!0;try{const t=await j(),e=await tt(await at.accessToken.get(t)),o=this.pageCursors[this.currentPage-1],s=await e.request({method:"listTransactions",params:{limit:this.pageSize,...o!==void 0?{cursor:o}:{}}});this.transactions=s.transactions||[],this.totalTransactionCount=s.count??0,s.nextCursor&&(this.pageCursors[this.currentPage]=s.nextCursor),this.parsedTransactions=new Map(this.transactions.map(r=>{try{return[r.id,rt(r.preparedTransaction)]}catch(h){return console.error("Error parsing transaction:",h),[r.id,null]}}))}catch(t){et(t)}finally{this.loading=!1}}}n=dt(S);A=new WeakMap;M=new WeakMap;O=new WeakMap;U=new WeakMap;E=new WeakMap;w(n,4,"transactions",Q,g,A);w(n,4,"parsedTransactions",K,g,M);w(n,4,"loading",J,g,O);w(n,4,"currentPage",B,g,U);w(n,4,"totalTransactionCount",G,g,E);g=w(n,0,"UserUiActivities",V,g);g.styles=[N.styles,it`
40
40
  :host {
41
41
  display: block;
42
42
  max-width: 900px;
@@ -1,4 +1,4 @@
1
- import{r as G,s as P,O as H,d as L,c as N,a as J,v as K,o as Q,b as R,h as B,i as V,t as X}from"./index-uxv_f8PV.js";var Y=Object.create,b=Object.defineProperty,Z=Object.getOwnPropertyDescriptor,D=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),_=e=>{throw TypeError(e)},j=(e,t,a)=>t in e?b(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,M=(e,t)=>b(e,"name",{value:t,configurable:!0}),ee=e=>[,,,Y(e?.[D("metadata")]??null)],F=["class","method","getter","setter","accessor","field","value","get","set"],u=e=>e!==void 0&&typeof e!="function"?_("Function expected"):e,te=(e,t,a,n,i)=>({kind:F[e],name:t,metadata:n,addInitializer:s=>a._?_("Already initialized"):i.push(u(s||null))}),ae=(e,t)=>j(t,D("metadata"),e[3]),O=(e,t,a,n)=>{for(var i=0,s=e[t>>1],p=s&&s.length;i<p;i++)t&1?s[i].call(a):n=s[i].call(a,n);return n},T=(e,t,a,n,i,s)=>{var p,o,U,h,g,r=t&7,w=!!(t&8),l=!!(t&16),m=r>3?e.length+1:r?w?1:2:0,A=F[r+5],z=r>3&&(e[m-1]=[]),q=e[m]||(e[m]=[]),c=r&&(!l&&!w&&(i=i.prototype),r<5&&(r>3||!l)&&Z(r<4?i:{get[a](){return x(this,s)},set[a](d){return E(this,s,d)}},a));r?l&&r<4&&M(s,(r>2?"set ":r>1?"get ":"")+a):M(i,a);for(var y=n.length-1;y>=0;y--)h=te(r,a,U={},e[3],q),r&&(h.static=w,h.private=l,g=h.access={has:l?d=>re(i,d):d=>a in d},r^3&&(g.get=l?d=>(r^1?x:se)(d,i,r^4?s:c.get):d=>d[a]),r>2&&(g.set=l?(d,k)=>E(d,i,k,r^4?s:c.set):(d,k)=>d[a]=k)),o=(0,n[y])(r?r<4?l?s:c[A]:r>4?void 0:{get:c.get,set:c.set}:i,h),U._=1,r^4||o===void 0?u(o)&&(r>4?z.unshift(o):r?l?s=o:c[A]=o:i=o):typeof o!="object"||o===null?_("Object expected"):(u(p=o.get)&&(c.get=p),u(p=o.set)&&(c.set=p),u(p=o.init)&&z.unshift(p));return r||ae(e,i),c&&b(i,a,c),l?r^4?s:c:i},C=(e,t,a)=>t.has(e)||_("Cannot "+a),re=(e,t)=>Object(t)!==t?_('Cannot use the "in" operator on this value'):e.has(t),x=(e,t,a)=>(C(e,t,"read from private field"),a?a.call(e):t.get(e)),ie=(e,t,a)=>t.has(e)?_("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,a),E=(e,t,a,n)=>(C(e,t,"write to private field"),n?n.call(e,a):t.set(e,a),a),se=(e,t,a)=>(C(e,t,"access private method"),a),W,S,$,v,I;$=[X("user-ui-add-idp")];class f extends(S=B,W=[G()],S){constructor(){super(...arguments),ie(this,I,O(v,8,this,!1)),O(v,11,this)}navigateBack(){P(H("/identity-providers"))}async onSave(t){this.loading=!0;try{const a=await L();await(await N(await J.accessToken.get(a))).request({method:"addIdp",params:{idp:t.idp}}),P(K("/identity-providers/"))}catch(a){this.loading=!1,Q(a)}}render(){return R`
1
+ import{r as G,s as E,E as H,d as L,c as N,a as J,W as K,e as Q,b as R,v as x,i as V,t as X}from"./index-Bbo4F8DN.js";var Y=Object.create,C=Object.defineProperty,Z=Object.getOwnPropertyDescriptor,B=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),_=e=>{throw TypeError(e)},j=(e,t,a)=>t in e?C(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,P=(e,t)=>C(e,"name",{value:t,configurable:!0}),ee=e=>[,,,Y(e?.[B("metadata")]??null)],D=["class","method","getter","setter","accessor","field","value","get","set"],u=e=>e!==void 0&&typeof e!="function"?_("Function expected"):e,te=(e,t,a,n,i)=>({kind:D[e],name:t,metadata:n,addInitializer:s=>a._?_("Already initialized"):i.push(u(s||null))}),ae=(e,t)=>j(t,B("metadata"),e[3]),S=(e,t,a,n)=>{for(var i=0,s=e[t>>1],p=s&&s.length;i<p;i++)t&1?s[i].call(a):n=s[i].call(a,n);return n},F=(e,t,a,n,i,s)=>{var p,o,U,h,g,r=t&7,w=!!(t&8),l=!!(t&16),m=r>3?e.length+1:r?w?1:2:0,A=D[r+5],z=r>3&&(e[m-1]=[]),q=e[m]||(e[m]=[]),c=r&&(!l&&!w&&(i=i.prototype),r<5&&(r>3||!l)&&Z(r<4?i:{get[a](){return M(this,s)},set[a](d){return W(this,s,d)}},a));r?l&&r<4&&P(s,(r>2?"set ":r>1?"get ":"")+a):P(i,a);for(var y=n.length-1;y>=0;y--)h=te(r,a,U={},e[3],q),r&&(h.static=w,h.private=l,g=h.access={has:l?d=>re(i,d):d=>a in d},r^3&&(g.get=l?d=>(r^1?M:se)(d,i,r^4?s:c.get):d=>d[a]),r>2&&(g.set=l?(d,k)=>W(d,i,k,r^4?s:c.set):(d,k)=>d[a]=k)),o=(0,n[y])(r?r<4?l?s:c[A]:r>4?void 0:{get:c.get,set:c.set}:i,h),U._=1,r^4||o===void 0?u(o)&&(r>4?z.unshift(o):r?l?s=o:c[A]=o:i=o):typeof o!="object"||o===null?_("Object expected"):(u(p=o.get)&&(c.get=p),u(p=o.set)&&(c.set=p),u(p=o.init)&&z.unshift(p));return r||ae(e,i),c&&C(i,a,c),l?r^4?s:c:i},O=(e,t,a)=>t.has(e)||_("Cannot "+a),re=(e,t)=>Object(t)!==t?_('Cannot use the "in" operator on this value'):e.has(t),M=(e,t,a)=>(O(e,t,"read from private field"),a?a.call(e):t.get(e)),ie=(e,t,a)=>t.has(e)?_("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,a),W=(e,t,a,n)=>(O(e,t,"write to private field"),n?n.call(e,a):t.set(e,a),a),se=(e,t,a)=>(O(e,t,"access private method"),a),T,b,$,v,I;$=[X("user-ui-add-idp")];class f extends(b=x,T=[G()],b){constructor(){super(...arguments),ie(this,I,S(v,8,this,!1)),S(v,11,this)}navigateBack(){E(H("/identity-providers"))}async onSave(t){this.loading=!0;try{const a=await L();await(await N(await J.accessToken.get(a))).request({method:"addIdp",params:{idp:t.idp}}),E(K("/identity-providers/"))}catch(a){this.loading=!1,Q(a)}}render(){return R`
2
2
  <div class="page-header">
3
3
  <h1 class="h4 fw-semibold mb-0">Add a new identity provider</h1>
4
4
  <wg-back-link @click=${this.navigateBack}></wg-back-link>
@@ -7,7 +7,7 @@ import{r as G,s as P,O as H,d as L,c as N,a as J,v as K,o as Q,b as R,h as B,i a
7
7
  <div class="form-wrap">
8
8
  <idp-form mode="add" @idp-form-save=${this.onSave}></idp-form>
9
9
  </div>
10
- `}}v=ee(S);I=new WeakMap;T(v,4,"loading",W,f,I);f=T(v,0,"UserUiAddIdp",$,f);f.styles=[B.styles,V`
10
+ `}}v=ee(b);I=new WeakMap;F(v,4,"loading",T,f,I);f=F(v,0,"UserUiAddIdp",$,f);f.styles=[x.styles,V`
11
11
  :host {
12
12
  display: block;
13
13
  max-width: 900px;
@@ -25,4 +25,4 @@ import{r as G,s as P,O as H,d as L,c as N,a as J,v as K,o as Q,b as R,h as B,i a
25
25
  .form-wrap {
26
26
  width: 100%;
27
27
  }
28
- `];O(v,1,f);
28
+ `];S(v,1,f);
@@ -1,4 +1,4 @@
1
- import{r as q,s as U,O as G,d as H,c as L,a as J,v as K,o as Q,$ as R,b as V,h as M,i as X,t as Y}from"./index-uxv_f8PV.js";var Z=Object.create,O=Object.defineProperty,j=Object.getOwnPropertyDescriptor,B=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),_=e=>{throw TypeError(e)},ee=(e,t,r)=>t in e?O(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,x=(e,t)=>O(e,"name",{value:t,configurable:!0}),te=e=>[,,,Z(e?.[B("metadata")]??null)],E=["class","method","getter","setter","accessor","field","value","get","set"],w=e=>e!==void 0&&typeof e!="function"?_("Function expected"):e,re=(e,t,r,s,i)=>({kind:E[e],name:t,metadata:s,addInitializer:n=>r._?_("Already initialized"):i.push(w(n||null))}),ae=(e,t)=>ee(t,B("metadata"),e[3]),b=(e,t,r,s)=>{for(var i=0,n=e[t>>1],p=n&&n.length;i<p;i++)t&1?n[i].call(r):s=n[i].call(r,s);return s},D=(e,t,r,s,i,n)=>{var p,d,I,h,k,a=t&7,g=!!(t&8),l=!!(t&16),f=a>3?e.length+1:a?g?1:2:0,z=E[a+5],P=a>3&&(e[f-1]=[]),W=e[f]||(e[f]=[]),c=a&&(!l&&!g&&(i=i.prototype),a<5&&(a>3||!l)&&j(a<4?i:{get[r](){return N(this,n)},set[r](o){return $(this,n,o)}},r));a?l&&a<4&&x(n,(a>2?"set ":a>1?"get ":"")+r):x(i,r);for(var m=s.length-1;m>=0;m--)h=re(a,r,I={},e[3],W),a&&(h.static=g,h.private=l,k=h.access={has:l?o=>ie(i,o):o=>r in o},a^3&&(k.get=l?o=>(a^1?N:se)(o,i,a^4?n:c.get):o=>o[r]),a>2&&(k.set=l?(o,y)=>$(o,i,y,a^4?n:c.set):(o,y)=>o[r]=y)),d=(0,s[m])(a?a<4?l?n:c[z]:a>4?void 0:{get:c.get,set:c.set}:i,h),I._=1,a^4||d===void 0?w(d)&&(a>4?P.unshift(d):a?l?n=d:c[z]=d:i=d):typeof d!="object"||d===null?_("Object expected"):(w(p=d.get)&&(c.get=p),w(p=d.set)&&(c.set=p),w(p=d.init)&&P.unshift(p));return a||ae(e,i),c&&O(i,r,c),l?a^4?n:c:i},S=(e,t,r)=>t.has(e)||_("Cannot "+r),ie=(e,t)=>Object(t)!==t?_('Cannot use the "in" operator on this value'):e.has(t),N=(e,t,r)=>(S(e,t,"read from private field"),r?r.call(e):t.get(e)),ne=(e,t,r)=>t.has(e)?_("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),$=(e,t,r,s)=>(S(e,t,"write to private field"),s?s.call(e,r):t.set(e,r),r),se=(e,t,r)=>(S(e,t,"access private method"),r),F,A,T,v,C;T=[Y("user-ui-add-network")];class u extends(A=M,F=[q()],A){constructor(){super(...arguments),ne(this,C,b(v,8,this,!1)),b(v,11,this)}navigateBack(){U(G("/networks"))}async onSave(t){this.loading=!0;const{auth:r,adminAuth:s,serviceAccountAuth:i}=t.network;try{const n=await H();await(await L(await J.accessToken.get(n))).request({method:"addNetwork",params:{network:{id:t.network.id,name:t.network.name,description:t.network.description,identityProviderId:t.network.identityProviderId,...t.network.synchronizerId&&{synchronizerId:t.network.synchronizerId},ledgerApi:t.network.ledgerApi,auth:r,...s&&{adminAuth:s},...i&&{serviceAccountAuth:i}}}}),U(K("/networks/"))}catch(n){this.loading=!1,Q(n)}}render(){return V`
1
+ import{r as q,s as U,E as G,d as H,c as L,a as J,W as K,e as Q,$ as R,b as V,v as $,i as X,t as Y}from"./index-Bbo4F8DN.js";var Z=Object.create,S=Object.defineProperty,j=Object.getOwnPropertyDescriptor,M=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),_=e=>{throw TypeError(e)},ee=(e,t,r)=>t in e?S(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,x=(e,t)=>S(e,"name",{value:t,configurable:!0}),te=e=>[,,,Z(e?.[M("metadata")]??null)],W=["class","method","getter","setter","accessor","field","value","get","set"],w=e=>e!==void 0&&typeof e!="function"?_("Function expected"):e,re=(e,t,r,s,i)=>({kind:W[e],name:t,metadata:s,addInitializer:n=>r._?_("Already initialized"):i.push(w(n||null))}),ae=(e,t)=>ee(t,M("metadata"),e[3]),b=(e,t,r,s)=>{for(var i=0,n=e[t>>1],p=n&&n.length;i<p;i++)t&1?n[i].call(r):s=n[i].call(r,s);return s},B=(e,t,r,s,i,n)=>{var p,d,O,h,k,a=t&7,g=!!(t&8),l=!!(t&16),f=a>3?e.length+1:a?g?1:2:0,z=W[a+5],P=a>3&&(e[f-1]=[]),T=e[f]||(e[f]=[]),c=a&&(!l&&!g&&(i=i.prototype),a<5&&(a>3||!l)&&j(a<4?i:{get[r](){return E(this,n)},set[r](o){return N(this,n,o)}},r));a?l&&a<4&&x(n,(a>2?"set ":a>1?"get ":"")+r):x(i,r);for(var m=s.length-1;m>=0;m--)h=re(a,r,O={},e[3],T),a&&(h.static=g,h.private=l,k=h.access={has:l?o=>ie(i,o):o=>r in o},a^3&&(k.get=l?o=>(a^1?E:se)(o,i,a^4?n:c.get):o=>o[r]),a>2&&(k.set=l?(o,y)=>N(o,i,y,a^4?n:c.set):(o,y)=>o[r]=y)),d=(0,s[m])(a?a<4?l?n:c[z]:a>4?void 0:{get:c.get,set:c.set}:i,h),O._=1,a^4||d===void 0?w(d)&&(a>4?P.unshift(d):a?l?n=d:c[z]=d:i=d):typeof d!="object"||d===null?_("Object expected"):(w(p=d.get)&&(c.get=p),w(p=d.set)&&(c.set=p),w(p=d.init)&&P.unshift(p));return a||ae(e,i),c&&S(i,r,c),l?a^4?n:c:i},C=(e,t,r)=>t.has(e)||_("Cannot "+r),ie=(e,t)=>Object(t)!==t?_('Cannot use the "in" operator on this value'):e.has(t),E=(e,t,r)=>(C(e,t,"read from private field"),r?r.call(e):t.get(e)),ne=(e,t,r)=>t.has(e)?_("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),N=(e,t,r,s)=>(C(e,t,"write to private field"),s?s.call(e,r):t.set(e,r),r),se=(e,t,r)=>(C(e,t,"access private method"),r),D,A,F,v,I;F=[Y("user-ui-add-network")];class u extends(A=$,D=[q()],A){constructor(){super(...arguments),ne(this,I,b(v,8,this,!1)),b(v,11,this)}navigateBack(){U(G("/networks"))}async onSave(t){this.loading=!0;const{auth:r,adminAuth:s,serviceAccountAuth:i}=t.network;try{const n=await H();await(await L(await J.accessToken.get(n))).request({method:"addNetwork",params:{network:{id:t.network.id,name:t.network.name,description:t.network.description,identityProviderId:t.network.identityProviderId,...t.network.synchronizerId&&{synchronizerId:t.network.synchronizerId},ledgerApi:t.network.ledgerApi,auth:r,...s&&{adminAuth:s},...i&&{serviceAccountAuth:i}}}}),U(K("/networks/"))}catch(n){this.loading=!1,Q(n)}}render(){return V`
2
2
  <div class="page-header">
3
3
  <h1 class="h4 fw-semibold mb-0">Add a new network</h1>
4
4
  <button
@@ -17,7 +17,7 @@ import{r as q,s as U,O as G,d as H,c as L,a as J,v as K,o as Q,$ as R,b as V,h a
17
17
  @network-edit-save=${this.onSave}
18
18
  ></network-form>
19
19
  </div>
20
- `}}v=te(A);C=new WeakMap;D(v,4,"loading",F,u,C);u=D(v,0,"UserUiAddNetwork",T,u);u.styles=[M.styles,X`
20
+ `}}v=te(A);I=new WeakMap;B(v,4,"loading",D,u,I);u=B(v,0,"UserUiAddNetwork",F,u);u.styles=[$.styles,X`
21
21
  :host {
22
22
  display: block;
23
23
  max-width: 900px;