@canton-network/wallet-gateway-remote 1.8.0 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +1 -1
- package/dist/user-api/controller.d.ts.map +1 -1
- package/dist/user-api/controller.js +8 -0
- package/dist/user-api/controller.test.js +43 -3
- package/dist/user-api/token-network-matching.d.ts.map +1 -1
- package/dist/user-api/token-network-matching.js +4 -3
- package/dist/web/frontend/404/index.html +2 -2
- package/dist/web/frontend/activities/index.html +2 -2
- package/dist/web/frontend/approve/index.html +2 -2
- package/dist/web/frontend/assets/{404-DAyFyvuw.js → 404-eHe1UlAO.js} +1 -1
- package/dist/web/frontend/assets/{activities-BQSNQCP2.js → activities-BNiyUauf.js} +1 -1
- package/dist/web/frontend/assets/{addIdentityProvider-Djya4QfT.js → addIdentityProvider-gTMI7Z0x.js} +1 -1
- package/dist/web/frontend/assets/{addNetwork-83_QwE58.js → addNetwork-B82E7ioc.js} +3 -3
- package/dist/web/frontend/assets/{addParty-CdxWCt0U.js → addParty-CZcERPC7.js} +1 -1
- package/dist/web/frontend/assets/{approve-NcV61aZJ.js → approve-msSywhWK.js} +1 -1
- package/dist/web/frontend/assets/{callback-U_3ypVos.js → callback-DfNP22-V.js} +1 -1
- package/dist/web/frontend/assets/{identityProviders-CIk5SJX_.js → identityProviders-BDguIzmc.js} +1 -1
- package/dist/web/frontend/assets/{index-uxv_f8PV.js → index-BT9e9Q96.js} +14 -14
- package/dist/web/frontend/assets/{index-jHlzHNRR.js → index-ohjr2alM.js} +3 -3
- package/dist/web/frontend/assets/{login-C_JAX4Df.js → login-B9l6Znpd.js} +1 -1
- package/dist/web/frontend/assets/{networks-C1kpJNtZ.js → networks-BdDz41wp.js} +1 -1
- package/dist/web/frontend/assets/{reviewIdentityProvider-BZv-CbZZ.js → reviewIdentityProvider-C2mAfah_.js} +1 -1
- package/dist/web/frontend/assets/{reviewNetwork-CnoSJz4N.js → reviewNetwork-DcGIAg6z.js} +1 -1
- package/dist/web/frontend/assets/{settings-Dt0_RW30.js → settings-DCnHy29n.js} +1 -1
- package/dist/web/frontend/callback/index.html +2 -2
- package/dist/web/frontend/identity-providers/add/index.html +2 -2
- package/dist/web/frontend/identity-providers/index.html +2 -2
- package/dist/web/frontend/identity-providers/review/index.html +2 -2
- package/dist/web/frontend/index.html +1 -1
- package/dist/web/frontend/login/index.html +2 -2
- package/dist/web/frontend/networks/add/index.html +2 -2
- package/dist/web/frontend/networks/index.html +2 -2
- package/dist/web/frontend/networks/review/index.html +2 -2
- package/dist/web/frontend/parties/add/index.html +3 -3
- package/dist/web/frontend/parties/index.html +2 -2
- package/dist/web/frontend/settings/index.html +2 -2
- package/package.json +42 -42
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 `
|
|
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":"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;
|
|
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
|
|
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
|
-
|
|
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,
|
|
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
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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;
|
|
@@ -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-
|
|
8
|
-
<link rel="modulepreload" crossorigin href="../assets/index-
|
|
7
|
+
<script type="module" crossorigin src="../assets/404-eHe1UlAO.js"></script>
|
|
8
|
+
<link rel="modulepreload" crossorigin href="../assets/index-BT9e9Q96.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-
|
|
8
|
-
<link rel="modulepreload" crossorigin href="../assets/index-
|
|
7
|
+
<script type="module" crossorigin src="../assets/activities-BNiyUauf.js"></script>
|
|
8
|
+
<link rel="modulepreload" crossorigin href="../assets/index-BT9e9Q96.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-
|
|
8
|
-
<link rel="modulepreload" crossorigin href="../assets/index-
|
|
7
|
+
<script type="module" crossorigin src="../assets/approve-msSywhWK.js"></script>
|
|
8
|
+
<link rel="modulepreload" crossorigin href="../assets/index-BT9e9Q96.js">
|
|
9
9
|
<link rel="modulepreload" crossorigin href="../assets/index-BjhQnXf1.js">
|
|
10
10
|
</head>
|
|
11
11
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{v as h,i as z,O as E,b as I,t as j}from"./index-BT9e9Q96.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,m=0,P=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],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=h){render(){return I`<not-found href=${E("/")}></not-found>`}};u.styles=[h.styles,z`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
}
|
|
@@ -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,
|
|
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,v as N,i as it,t as st}from"./index-BT9e9Q96.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 _`
|
|
2
2
|
<div class="page-header">
|
|
3
3
|
<h1 class="h4 fw-semibold mb-0 text-body">Activities</h1>
|
|
4
4
|
</div>
|
package/dist/web/frontend/assets/{addIdentityProvider-Djya4QfT.js → addIdentityProvider-gTMI7Z0x.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as G,s as P,O as H,d as L,c as N,a as J,
|
|
1
|
+
import{r as G,s as P,O as H,d as L,c as N,a as J,u as K,o as Q,b as R,v as B,i as V,t as X}from"./index-BT9e9Q96.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`
|
|
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>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as q,s as U,O as G,d as H,c as L,a as J,
|
|
1
|
+
import{r as q,s as U,O as G,d as H,c as L,a as J,u as K,o as Q,$ as R,b as V,v as M,i as X,t as Y}from"./index-BT9e9Q96.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"],u=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(u(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?u(d)&&(a>4?P.unshift(d):a?l?n=d:c[z]=d:i=d):typeof d!="object"||d===null?_("Object expected"):(u(p=d.get)&&(c.get=p),u(p=d.set)&&(c.set=p),u(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 w 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`
|
|
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,
|
|
20
|
+
`}}v=te(A);C=new WeakMap;D(v,4,"loading",F,w,C);w=D(v,0,"UserUiAddNetwork",T,w);w.styles=[M.styles,X`
|
|
21
21
|
:host {
|
|
22
22
|
display: block;
|
|
23
23
|
max-width: 900px;
|
|
@@ -35,4 +35,4 @@ 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
|
|
|
35
35
|
.form-wrap {
|
|
36
36
|
width: 100%;
|
|
37
37
|
}
|
|
38
|
-
`];b(v,1,
|
|
38
|
+
`];b(v,1,w);
|