@canton-network/wallet-gateway-remote 0.1.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.
- package/README.md +25 -0
- package/dist/auth/jwt-auth-service.d.ts +11 -0
- package/dist/auth/jwt-auth-service.d.ts.map +1 -0
- package/dist/auth/jwt-auth-service.js +50 -0
- package/dist/config/Config.d.ts +590 -0
- package/dist/config/Config.d.ts.map +1 -0
- package/dist/config/Config.js +19 -0
- package/dist/config/Config.test.d.ts +2 -0
- package/dist/config/Config.test.d.ts.map +1 -0
- package/dist/config/Config.test.js +19 -0
- package/dist/config/ConfigUtils.d.ts +5 -0
- package/dist/config/ConfigUtils.d.ts.map +1 -0
- package/dist/config/ConfigUtils.js +14 -0
- package/dist/dapp-api/controller.d.ts +18 -0
- package/dist/dapp-api/controller.d.ts.map +1 -0
- package/dist/dapp-api/controller.js +101 -0
- package/dist/dapp-api/rpc-gen/index.d.ts +36 -0
- package/dist/dapp-api/rpc-gen/index.d.ts.map +1 -0
- package/dist/dapp-api/rpc-gen/index.js +17 -0
- package/dist/dapp-api/rpc-gen/typings.d.ts +337 -0
- package/dist/dapp-api/rpc-gen/typings.d.ts.map +1 -0
- package/dist/dapp-api/rpc-gen/typings.js +3 -0
- package/dist/dapp-api/server.d.ts +6 -0
- package/dist/dapp-api/server.d.ts.map +1 -0
- package/dist/dapp-api/server.js +62 -0
- package/dist/dapp-api/server.test.d.ts +2 -0
- package/dist/dapp-api/server.test.d.ts.map +1 -0
- package/dist/dapp-api/server.test.js +45 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +30 -0
- package/dist/init.d.ts +9 -0
- package/dist/init.d.ts.map +1 -0
- package/dist/init.js +77 -0
- package/dist/ledger/party-allocation-service.d.ts +34 -0
- package/dist/ledger/party-allocation-service.d.ts.map +1 -0
- package/dist/ledger/party-allocation-service.js +50 -0
- package/dist/ledger/party-allocation-service.test.d.ts +2 -0
- package/dist/ledger/party-allocation-service.test.d.ts.map +1 -0
- package/dist/ledger/party-allocation-service.test.js +85 -0
- package/dist/ledger/wallet-sync-service.d.ts +18 -0
- package/dist/ledger/wallet-sync-service.d.ts.map +1 -0
- package/dist/ledger/wallet-sync-service.js +90 -0
- package/dist/middleware/jsonRpcHandler.d.ts +9 -0
- package/dist/middleware/jsonRpcHandler.d.ts.map +1 -0
- package/dist/middleware/jsonRpcHandler.js +102 -0
- package/dist/middleware/jwtAuth.d.ts +5 -0
- package/dist/middleware/jwtAuth.d.ts.map +1 -0
- package/dist/middleware/jwtAuth.js +20 -0
- package/dist/middleware/rateLimit.d.ts +2 -0
- package/dist/middleware/rateLimit.d.ts.map +1 -0
- package/dist/middleware/rateLimit.js +9 -0
- package/dist/notification/NotificationService.d.ts +11 -0
- package/dist/notification/NotificationService.d.ts.map +1 -0
- package/dist/notification/NotificationService.js +5 -0
- package/dist/user-api/controller.d.ts +23 -0
- package/dist/user-api/controller.d.ts.map +1 -0
- package/dist/user-api/controller.js +336 -0
- package/dist/user-api/rpc-gen/index.d.ts +42 -0
- package/dist/user-api/rpc-gen/index.d.ts.map +1 -0
- package/dist/user-api/rpc-gen/index.js +19 -0
- package/dist/user-api/rpc-gen/typings.d.ts +297 -0
- package/dist/user-api/rpc-gen/typings.d.ts.map +1 -0
- package/dist/user-api/rpc-gen/typings.js +3 -0
- package/dist/user-api/server.d.ts +7 -0
- package/dist/user-api/server.d.ts.map +1 -0
- package/dist/user-api/server.js +20 -0
- package/dist/user-api/server.test.d.ts +2 -0
- package/dist/user-api/server.test.d.ts.map +1 -0
- package/dist/user-api/server.test.js +38 -0
- package/dist/web/frontend/404/index.html +20 -0
- package/dist/web/frontend/approve/index.html +23 -0
- package/dist/web/frontend/assets/404-BHkjVWlW.js +16 -0
- package/dist/web/frontend/assets/approve-lRsfAWmm.js +157 -0
- package/dist/web/frontend/assets/callback-QrXhW3mX.js +1 -0
- package/dist/web/frontend/assets/handle-errors-BcwHAkCd.js +1 -0
- package/dist/web/frontend/assets/index-BknZMPaI.css +5 -0
- package/dist/web/frontend/assets/index-BxdGgjHv.js +1 -0
- package/dist/web/frontend/assets/index-D-GexOrJ.js +697 -0
- package/dist/web/frontend/assets/index-TZrNw7dA.css +1 -0
- package/dist/web/frontend/assets/login-HUymBqli.js +159 -0
- package/dist/web/frontend/assets/networks-BZihbVwK.js +221 -0
- package/dist/web/frontend/assets/rpc-client-CCUlY3sp.js +1 -0
- package/dist/web/frontend/assets/state-DKGJ6EmM.js +9 -0
- package/dist/web/frontend/assets/state-manager-BNW0y5PZ.js +23 -0
- package/dist/web/frontend/assets/wallets-BoN6kUME.js +214 -0
- package/dist/web/frontend/callback/index.html +13 -0
- package/dist/web/frontend/icon.png +0 -0
- package/dist/web/frontend/index.html +19 -0
- package/dist/web/frontend/login/index.html +21 -0
- package/dist/web/frontend/networks/index.html +20 -0
- package/dist/web/frontend/wallets/index.html +22 -0
- package/dist/web/server.d.ts +2 -0
- package/dist/web/server.d.ts.map +1 -0
- package/dist/web/server.js +30 -0
- package/package.json +86 -0
package/README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Wallet Gateway
|
|
2
|
+
|
|
3
|
+
The RPC-based (server-side) Wallet Gateway.
|
|
4
|
+
|
|
5
|
+
# Usage
|
|
6
|
+
|
|
7
|
+
Start the service directly through npx (tested with NodeJS v24):
|
|
8
|
+
|
|
9
|
+
`npx @canton-network/wallet-gateway-remote -c ./config.json`
|
|
10
|
+
|
|
11
|
+
This exposes:
|
|
12
|
+
|
|
13
|
+
- A dApp JSON-RPC API running on (by default) `localhost:3008`
|
|
14
|
+
- A User JSON-RPC API running on (by default) `localhost:3001`
|
|
15
|
+
- A User web interface running on (by default) `localhost:3002`
|
|
16
|
+
|
|
17
|
+
## Configuration
|
|
18
|
+
|
|
19
|
+
A configuration file is required to start up the gateway. See [config.json](https://github.com/hyperledger-labs/splice-wallet-kernel/blob/main/wallet-gateway/test/config.json) for an example.
|
|
20
|
+
|
|
21
|
+
# Developing
|
|
22
|
+
|
|
23
|
+
## Codegen
|
|
24
|
+
|
|
25
|
+
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`.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Logger } from 'pino';
|
|
2
|
+
import { AuthService } from '@canton-network/core-wallet-auth';
|
|
3
|
+
import { Store } from '@canton-network/core-wallet-store';
|
|
4
|
+
/**
|
|
5
|
+
* Creates an AuthService that verifies JWT tokens using a remote JWK set.
|
|
6
|
+
* @param store - The Store instance to access network configurations.
|
|
7
|
+
* @param logger - Logger instance for logging debug and warning messages.
|
|
8
|
+
* @returns An AuthService implementation that verifies JWT tokens.
|
|
9
|
+
*/
|
|
10
|
+
export declare const jwtAuthService: (store: Store, logger: Logger) => AuthService;
|
|
11
|
+
//# sourceMappingURL=jwt-auth-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jwt-auth-service.d.ts","sourceRoot":"","sources":["../../src/auth/jwt-auth-service.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAE7B,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAC9D,OAAO,EAAQ,KAAK,EAAE,MAAM,mCAAmC,CAAA;AAE/D;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,OAAO,KAAK,EAAE,QAAQ,MAAM,KAAG,WAkD5D,CAAA"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Copyright (c) 2025 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { createRemoteJWKSet, decodeJwt, jwtVerify } from 'jose';
|
|
4
|
+
/**
|
|
5
|
+
* Creates an AuthService that verifies JWT tokens using a remote JWK set.
|
|
6
|
+
* @param store - The Store instance to access network configurations.
|
|
7
|
+
* @param logger - Logger instance for logging debug and warning messages.
|
|
8
|
+
* @returns An AuthService implementation that verifies JWT tokens.
|
|
9
|
+
*/
|
|
10
|
+
export const jwtAuthService = (store, logger) => ({
|
|
11
|
+
verifyToken: async (accessToken) => {
|
|
12
|
+
if (!accessToken || !accessToken.startsWith('Bearer ')) {
|
|
13
|
+
return undefined;
|
|
14
|
+
}
|
|
15
|
+
const jwt = accessToken.split(' ')[1];
|
|
16
|
+
logger.debug({ jwt }, 'Verifying JWT token');
|
|
17
|
+
try {
|
|
18
|
+
const iss = decodeJwt(jwt).iss;
|
|
19
|
+
if (!iss) {
|
|
20
|
+
logger.warn('JWT does not contain an issuer');
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
// TODO: change once IDP is decoupled from networks
|
|
24
|
+
const networks = await store.listNetworks();
|
|
25
|
+
const idp = networks.find((n) => n.auth.issuer === iss)?.auth;
|
|
26
|
+
if (!idp) {
|
|
27
|
+
logger.warn(`No identity provider found for issuer: ${iss}`);
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
logger.debug(idp, 'Using IDP');
|
|
31
|
+
const response = await fetch(idp.configUrl);
|
|
32
|
+
const config = await response.json();
|
|
33
|
+
const jwks = createRemoteJWKSet(new URL(config.jwks_uri));
|
|
34
|
+
const { payload } = await jwtVerify(jwt, jwks, {
|
|
35
|
+
algorithms: ['RS256'],
|
|
36
|
+
});
|
|
37
|
+
if (!payload.sub) {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
logger.debug({ userId: payload.sub, accessToken: jwt }, 'JWT verified');
|
|
41
|
+
return { userId: payload.sub, accessToken: jwt };
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
if (error instanceof Error) {
|
|
45
|
+
logger.warn(error, `Failed to verify token: ${error.message}`);
|
|
46
|
+
}
|
|
47
|
+
return undefined;
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
});
|
|
@@ -0,0 +1,590 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const kernelInfoSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
clientType: z.ZodUnion<[z.ZodLiteral<"browser">, z.ZodLiteral<"desktop">, z.ZodLiteral<"mobile">, z.ZodLiteral<"remote">]>;
|
|
5
|
+
url: z.ZodString;
|
|
6
|
+
userUrl: z.ZodString;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
id: string;
|
|
9
|
+
clientType: "browser" | "desktop" | "mobile" | "remote";
|
|
10
|
+
url: string;
|
|
11
|
+
userUrl: string;
|
|
12
|
+
}, {
|
|
13
|
+
id: string;
|
|
14
|
+
clientType: "browser" | "desktop" | "mobile" | "remote";
|
|
15
|
+
url: string;
|
|
16
|
+
userUrl: string;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const configSchema: z.ZodObject<{
|
|
19
|
+
kernel: z.ZodObject<{
|
|
20
|
+
id: z.ZodString;
|
|
21
|
+
clientType: z.ZodUnion<[z.ZodLiteral<"browser">, z.ZodLiteral<"desktop">, z.ZodLiteral<"mobile">, z.ZodLiteral<"remote">]>;
|
|
22
|
+
url: z.ZodString;
|
|
23
|
+
userUrl: z.ZodString;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
id: string;
|
|
26
|
+
clientType: "browser" | "desktop" | "mobile" | "remote";
|
|
27
|
+
url: string;
|
|
28
|
+
userUrl: string;
|
|
29
|
+
}, {
|
|
30
|
+
id: string;
|
|
31
|
+
clientType: "browser" | "desktop" | "mobile" | "remote";
|
|
32
|
+
url: string;
|
|
33
|
+
userUrl: string;
|
|
34
|
+
}>;
|
|
35
|
+
store: z.ZodObject<{
|
|
36
|
+
connection: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
37
|
+
type: z.ZodLiteral<"memory">;
|
|
38
|
+
}, "strip", z.ZodTypeAny, {
|
|
39
|
+
type: "memory";
|
|
40
|
+
}, {
|
|
41
|
+
type: "memory";
|
|
42
|
+
}>, z.ZodObject<{
|
|
43
|
+
type: z.ZodLiteral<"sqlite">;
|
|
44
|
+
database: z.ZodString;
|
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
type: "sqlite";
|
|
47
|
+
database: string;
|
|
48
|
+
}, {
|
|
49
|
+
type: "sqlite";
|
|
50
|
+
database: string;
|
|
51
|
+
}>, z.ZodObject<{
|
|
52
|
+
type: z.ZodLiteral<"postgres">;
|
|
53
|
+
host: z.ZodString;
|
|
54
|
+
port: z.ZodNumber;
|
|
55
|
+
user: z.ZodString;
|
|
56
|
+
password: z.ZodString;
|
|
57
|
+
database: z.ZodString;
|
|
58
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
|
+
type: "postgres";
|
|
60
|
+
password: string;
|
|
61
|
+
database: string;
|
|
62
|
+
host: string;
|
|
63
|
+
port: number;
|
|
64
|
+
user: string;
|
|
65
|
+
}, {
|
|
66
|
+
type: "postgres";
|
|
67
|
+
password: string;
|
|
68
|
+
database: string;
|
|
69
|
+
host: string;
|
|
70
|
+
port: number;
|
|
71
|
+
user: string;
|
|
72
|
+
}>]>;
|
|
73
|
+
networks: z.ZodArray<z.ZodObject<{
|
|
74
|
+
name: z.ZodString;
|
|
75
|
+
chainId: z.ZodString;
|
|
76
|
+
synchronizerId: z.ZodString;
|
|
77
|
+
description: z.ZodString;
|
|
78
|
+
ledgerApi: z.ZodObject<{
|
|
79
|
+
baseUrl: z.ZodString;
|
|
80
|
+
}, "strip", z.ZodTypeAny, {
|
|
81
|
+
baseUrl: string;
|
|
82
|
+
}, {
|
|
83
|
+
baseUrl: string;
|
|
84
|
+
}>;
|
|
85
|
+
auth: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
86
|
+
identityProviderId: z.ZodString;
|
|
87
|
+
type: z.ZodLiteral<"password">;
|
|
88
|
+
issuer: z.ZodString;
|
|
89
|
+
configUrl: z.ZodString;
|
|
90
|
+
audience: z.ZodString;
|
|
91
|
+
tokenUrl: z.ZodString;
|
|
92
|
+
grantType: z.ZodString;
|
|
93
|
+
scope: z.ZodString;
|
|
94
|
+
clientId: z.ZodString;
|
|
95
|
+
admin: z.ZodOptional<z.ZodObject<{
|
|
96
|
+
clientId: z.ZodString;
|
|
97
|
+
clientSecret: z.ZodString;
|
|
98
|
+
}, "strip", z.ZodTypeAny, {
|
|
99
|
+
clientId: string;
|
|
100
|
+
clientSecret: string;
|
|
101
|
+
}, {
|
|
102
|
+
clientId: string;
|
|
103
|
+
clientSecret: string;
|
|
104
|
+
}>>;
|
|
105
|
+
}, "strip", z.ZodTypeAny, {
|
|
106
|
+
type: "password";
|
|
107
|
+
clientId: string;
|
|
108
|
+
identityProviderId: string;
|
|
109
|
+
issuer: string;
|
|
110
|
+
configUrl: string;
|
|
111
|
+
audience: string;
|
|
112
|
+
tokenUrl: string;
|
|
113
|
+
grantType: string;
|
|
114
|
+
scope: string;
|
|
115
|
+
admin?: {
|
|
116
|
+
clientId: string;
|
|
117
|
+
clientSecret: string;
|
|
118
|
+
} | undefined;
|
|
119
|
+
}, {
|
|
120
|
+
type: "password";
|
|
121
|
+
clientId: string;
|
|
122
|
+
identityProviderId: string;
|
|
123
|
+
issuer: string;
|
|
124
|
+
configUrl: string;
|
|
125
|
+
audience: string;
|
|
126
|
+
tokenUrl: string;
|
|
127
|
+
grantType: string;
|
|
128
|
+
scope: string;
|
|
129
|
+
admin?: {
|
|
130
|
+
clientId: string;
|
|
131
|
+
clientSecret: string;
|
|
132
|
+
} | undefined;
|
|
133
|
+
}>, z.ZodObject<{
|
|
134
|
+
identityProviderId: z.ZodString;
|
|
135
|
+
type: z.ZodLiteral<"implicit">;
|
|
136
|
+
issuer: z.ZodString;
|
|
137
|
+
configUrl: z.ZodString;
|
|
138
|
+
audience: z.ZodString;
|
|
139
|
+
scope: z.ZodString;
|
|
140
|
+
clientId: z.ZodString;
|
|
141
|
+
admin: z.ZodOptional<z.ZodObject<{
|
|
142
|
+
clientId: z.ZodString;
|
|
143
|
+
clientSecret: z.ZodString;
|
|
144
|
+
}, "strip", z.ZodTypeAny, {
|
|
145
|
+
clientId: string;
|
|
146
|
+
clientSecret: string;
|
|
147
|
+
}, {
|
|
148
|
+
clientId: string;
|
|
149
|
+
clientSecret: string;
|
|
150
|
+
}>>;
|
|
151
|
+
}, "strip", z.ZodTypeAny, {
|
|
152
|
+
type: "implicit";
|
|
153
|
+
clientId: string;
|
|
154
|
+
identityProviderId: string;
|
|
155
|
+
issuer: string;
|
|
156
|
+
configUrl: string;
|
|
157
|
+
audience: string;
|
|
158
|
+
scope: string;
|
|
159
|
+
admin?: {
|
|
160
|
+
clientId: string;
|
|
161
|
+
clientSecret: string;
|
|
162
|
+
} | undefined;
|
|
163
|
+
}, {
|
|
164
|
+
type: "implicit";
|
|
165
|
+
clientId: string;
|
|
166
|
+
identityProviderId: string;
|
|
167
|
+
issuer: string;
|
|
168
|
+
configUrl: string;
|
|
169
|
+
audience: string;
|
|
170
|
+
scope: string;
|
|
171
|
+
admin?: {
|
|
172
|
+
clientId: string;
|
|
173
|
+
clientSecret: string;
|
|
174
|
+
} | undefined;
|
|
175
|
+
}>, z.ZodObject<{
|
|
176
|
+
identityProviderId: z.ZodString;
|
|
177
|
+
type: z.ZodLiteral<"client_credentials">;
|
|
178
|
+
issuer: z.ZodString;
|
|
179
|
+
configUrl: z.ZodString;
|
|
180
|
+
audience: z.ZodString;
|
|
181
|
+
scope: z.ZodString;
|
|
182
|
+
clientId: z.ZodString;
|
|
183
|
+
clientSecret: z.ZodString;
|
|
184
|
+
admin: z.ZodOptional<z.ZodObject<{
|
|
185
|
+
clientId: z.ZodString;
|
|
186
|
+
clientSecret: z.ZodString;
|
|
187
|
+
}, "strip", z.ZodTypeAny, {
|
|
188
|
+
clientId: string;
|
|
189
|
+
clientSecret: string;
|
|
190
|
+
}, {
|
|
191
|
+
clientId: string;
|
|
192
|
+
clientSecret: string;
|
|
193
|
+
}>>;
|
|
194
|
+
}, "strip", z.ZodTypeAny, {
|
|
195
|
+
type: "client_credentials";
|
|
196
|
+
clientId: string;
|
|
197
|
+
clientSecret: string;
|
|
198
|
+
identityProviderId: string;
|
|
199
|
+
issuer: string;
|
|
200
|
+
configUrl: string;
|
|
201
|
+
audience: string;
|
|
202
|
+
scope: string;
|
|
203
|
+
admin?: {
|
|
204
|
+
clientId: string;
|
|
205
|
+
clientSecret: string;
|
|
206
|
+
} | undefined;
|
|
207
|
+
}, {
|
|
208
|
+
type: "client_credentials";
|
|
209
|
+
clientId: string;
|
|
210
|
+
clientSecret: string;
|
|
211
|
+
identityProviderId: string;
|
|
212
|
+
issuer: string;
|
|
213
|
+
configUrl: string;
|
|
214
|
+
audience: string;
|
|
215
|
+
scope: string;
|
|
216
|
+
admin?: {
|
|
217
|
+
clientId: string;
|
|
218
|
+
clientSecret: string;
|
|
219
|
+
} | undefined;
|
|
220
|
+
}>]>;
|
|
221
|
+
}, "strip", z.ZodTypeAny, {
|
|
222
|
+
name: string;
|
|
223
|
+
chainId: string;
|
|
224
|
+
synchronizerId: string;
|
|
225
|
+
description: string;
|
|
226
|
+
ledgerApi: {
|
|
227
|
+
baseUrl: string;
|
|
228
|
+
};
|
|
229
|
+
auth: {
|
|
230
|
+
type: "password";
|
|
231
|
+
clientId: string;
|
|
232
|
+
identityProviderId: string;
|
|
233
|
+
issuer: string;
|
|
234
|
+
configUrl: string;
|
|
235
|
+
audience: string;
|
|
236
|
+
tokenUrl: string;
|
|
237
|
+
grantType: string;
|
|
238
|
+
scope: string;
|
|
239
|
+
admin?: {
|
|
240
|
+
clientId: string;
|
|
241
|
+
clientSecret: string;
|
|
242
|
+
} | undefined;
|
|
243
|
+
} | {
|
|
244
|
+
type: "implicit";
|
|
245
|
+
clientId: string;
|
|
246
|
+
identityProviderId: string;
|
|
247
|
+
issuer: string;
|
|
248
|
+
configUrl: string;
|
|
249
|
+
audience: string;
|
|
250
|
+
scope: string;
|
|
251
|
+
admin?: {
|
|
252
|
+
clientId: string;
|
|
253
|
+
clientSecret: string;
|
|
254
|
+
} | undefined;
|
|
255
|
+
} | {
|
|
256
|
+
type: "client_credentials";
|
|
257
|
+
clientId: string;
|
|
258
|
+
clientSecret: string;
|
|
259
|
+
identityProviderId: string;
|
|
260
|
+
issuer: string;
|
|
261
|
+
configUrl: string;
|
|
262
|
+
audience: string;
|
|
263
|
+
scope: string;
|
|
264
|
+
admin?: {
|
|
265
|
+
clientId: string;
|
|
266
|
+
clientSecret: string;
|
|
267
|
+
} | undefined;
|
|
268
|
+
};
|
|
269
|
+
}, {
|
|
270
|
+
name: string;
|
|
271
|
+
chainId: string;
|
|
272
|
+
synchronizerId: string;
|
|
273
|
+
description: string;
|
|
274
|
+
ledgerApi: {
|
|
275
|
+
baseUrl: string;
|
|
276
|
+
};
|
|
277
|
+
auth: {
|
|
278
|
+
type: "password";
|
|
279
|
+
clientId: string;
|
|
280
|
+
identityProviderId: string;
|
|
281
|
+
issuer: string;
|
|
282
|
+
configUrl: string;
|
|
283
|
+
audience: string;
|
|
284
|
+
tokenUrl: string;
|
|
285
|
+
grantType: string;
|
|
286
|
+
scope: string;
|
|
287
|
+
admin?: {
|
|
288
|
+
clientId: string;
|
|
289
|
+
clientSecret: string;
|
|
290
|
+
} | undefined;
|
|
291
|
+
} | {
|
|
292
|
+
type: "implicit";
|
|
293
|
+
clientId: string;
|
|
294
|
+
identityProviderId: string;
|
|
295
|
+
issuer: string;
|
|
296
|
+
configUrl: string;
|
|
297
|
+
audience: string;
|
|
298
|
+
scope: string;
|
|
299
|
+
admin?: {
|
|
300
|
+
clientId: string;
|
|
301
|
+
clientSecret: string;
|
|
302
|
+
} | undefined;
|
|
303
|
+
} | {
|
|
304
|
+
type: "client_credentials";
|
|
305
|
+
clientId: string;
|
|
306
|
+
clientSecret: string;
|
|
307
|
+
identityProviderId: string;
|
|
308
|
+
issuer: string;
|
|
309
|
+
configUrl: string;
|
|
310
|
+
audience: string;
|
|
311
|
+
scope: string;
|
|
312
|
+
admin?: {
|
|
313
|
+
clientId: string;
|
|
314
|
+
clientSecret: string;
|
|
315
|
+
} | undefined;
|
|
316
|
+
};
|
|
317
|
+
}>, "many">;
|
|
318
|
+
}, "strip", z.ZodTypeAny, {
|
|
319
|
+
connection: {
|
|
320
|
+
type: "memory";
|
|
321
|
+
} | {
|
|
322
|
+
type: "sqlite";
|
|
323
|
+
database: string;
|
|
324
|
+
} | {
|
|
325
|
+
type: "postgres";
|
|
326
|
+
password: string;
|
|
327
|
+
database: string;
|
|
328
|
+
host: string;
|
|
329
|
+
port: number;
|
|
330
|
+
user: string;
|
|
331
|
+
};
|
|
332
|
+
networks: {
|
|
333
|
+
name: string;
|
|
334
|
+
chainId: string;
|
|
335
|
+
synchronizerId: string;
|
|
336
|
+
description: string;
|
|
337
|
+
ledgerApi: {
|
|
338
|
+
baseUrl: string;
|
|
339
|
+
};
|
|
340
|
+
auth: {
|
|
341
|
+
type: "password";
|
|
342
|
+
clientId: string;
|
|
343
|
+
identityProviderId: string;
|
|
344
|
+
issuer: string;
|
|
345
|
+
configUrl: string;
|
|
346
|
+
audience: string;
|
|
347
|
+
tokenUrl: string;
|
|
348
|
+
grantType: string;
|
|
349
|
+
scope: string;
|
|
350
|
+
admin?: {
|
|
351
|
+
clientId: string;
|
|
352
|
+
clientSecret: string;
|
|
353
|
+
} | undefined;
|
|
354
|
+
} | {
|
|
355
|
+
type: "implicit";
|
|
356
|
+
clientId: string;
|
|
357
|
+
identityProviderId: string;
|
|
358
|
+
issuer: string;
|
|
359
|
+
configUrl: string;
|
|
360
|
+
audience: string;
|
|
361
|
+
scope: string;
|
|
362
|
+
admin?: {
|
|
363
|
+
clientId: string;
|
|
364
|
+
clientSecret: string;
|
|
365
|
+
} | undefined;
|
|
366
|
+
} | {
|
|
367
|
+
type: "client_credentials";
|
|
368
|
+
clientId: string;
|
|
369
|
+
clientSecret: string;
|
|
370
|
+
identityProviderId: string;
|
|
371
|
+
issuer: string;
|
|
372
|
+
configUrl: string;
|
|
373
|
+
audience: string;
|
|
374
|
+
scope: string;
|
|
375
|
+
admin?: {
|
|
376
|
+
clientId: string;
|
|
377
|
+
clientSecret: string;
|
|
378
|
+
} | undefined;
|
|
379
|
+
};
|
|
380
|
+
}[];
|
|
381
|
+
}, {
|
|
382
|
+
connection: {
|
|
383
|
+
type: "memory";
|
|
384
|
+
} | {
|
|
385
|
+
type: "sqlite";
|
|
386
|
+
database: string;
|
|
387
|
+
} | {
|
|
388
|
+
type: "postgres";
|
|
389
|
+
password: string;
|
|
390
|
+
database: string;
|
|
391
|
+
host: string;
|
|
392
|
+
port: number;
|
|
393
|
+
user: string;
|
|
394
|
+
};
|
|
395
|
+
networks: {
|
|
396
|
+
name: string;
|
|
397
|
+
chainId: string;
|
|
398
|
+
synchronizerId: string;
|
|
399
|
+
description: string;
|
|
400
|
+
ledgerApi: {
|
|
401
|
+
baseUrl: string;
|
|
402
|
+
};
|
|
403
|
+
auth: {
|
|
404
|
+
type: "password";
|
|
405
|
+
clientId: string;
|
|
406
|
+
identityProviderId: string;
|
|
407
|
+
issuer: string;
|
|
408
|
+
configUrl: string;
|
|
409
|
+
audience: string;
|
|
410
|
+
tokenUrl: string;
|
|
411
|
+
grantType: string;
|
|
412
|
+
scope: string;
|
|
413
|
+
admin?: {
|
|
414
|
+
clientId: string;
|
|
415
|
+
clientSecret: string;
|
|
416
|
+
} | undefined;
|
|
417
|
+
} | {
|
|
418
|
+
type: "implicit";
|
|
419
|
+
clientId: string;
|
|
420
|
+
identityProviderId: string;
|
|
421
|
+
issuer: string;
|
|
422
|
+
configUrl: string;
|
|
423
|
+
audience: string;
|
|
424
|
+
scope: string;
|
|
425
|
+
admin?: {
|
|
426
|
+
clientId: string;
|
|
427
|
+
clientSecret: string;
|
|
428
|
+
} | undefined;
|
|
429
|
+
} | {
|
|
430
|
+
type: "client_credentials";
|
|
431
|
+
clientId: string;
|
|
432
|
+
clientSecret: string;
|
|
433
|
+
identityProviderId: string;
|
|
434
|
+
issuer: string;
|
|
435
|
+
configUrl: string;
|
|
436
|
+
audience: string;
|
|
437
|
+
scope: string;
|
|
438
|
+
admin?: {
|
|
439
|
+
clientId: string;
|
|
440
|
+
clientSecret: string;
|
|
441
|
+
} | undefined;
|
|
442
|
+
};
|
|
443
|
+
}[];
|
|
444
|
+
}>;
|
|
445
|
+
}, "strip", z.ZodTypeAny, {
|
|
446
|
+
kernel: {
|
|
447
|
+
id: string;
|
|
448
|
+
clientType: "browser" | "desktop" | "mobile" | "remote";
|
|
449
|
+
url: string;
|
|
450
|
+
userUrl: string;
|
|
451
|
+
};
|
|
452
|
+
store: {
|
|
453
|
+
connection: {
|
|
454
|
+
type: "memory";
|
|
455
|
+
} | {
|
|
456
|
+
type: "sqlite";
|
|
457
|
+
database: string;
|
|
458
|
+
} | {
|
|
459
|
+
type: "postgres";
|
|
460
|
+
password: string;
|
|
461
|
+
database: string;
|
|
462
|
+
host: string;
|
|
463
|
+
port: number;
|
|
464
|
+
user: string;
|
|
465
|
+
};
|
|
466
|
+
networks: {
|
|
467
|
+
name: string;
|
|
468
|
+
chainId: string;
|
|
469
|
+
synchronizerId: string;
|
|
470
|
+
description: string;
|
|
471
|
+
ledgerApi: {
|
|
472
|
+
baseUrl: string;
|
|
473
|
+
};
|
|
474
|
+
auth: {
|
|
475
|
+
type: "password";
|
|
476
|
+
clientId: string;
|
|
477
|
+
identityProviderId: string;
|
|
478
|
+
issuer: string;
|
|
479
|
+
configUrl: string;
|
|
480
|
+
audience: string;
|
|
481
|
+
tokenUrl: string;
|
|
482
|
+
grantType: string;
|
|
483
|
+
scope: string;
|
|
484
|
+
admin?: {
|
|
485
|
+
clientId: string;
|
|
486
|
+
clientSecret: string;
|
|
487
|
+
} | undefined;
|
|
488
|
+
} | {
|
|
489
|
+
type: "implicit";
|
|
490
|
+
clientId: string;
|
|
491
|
+
identityProviderId: string;
|
|
492
|
+
issuer: string;
|
|
493
|
+
configUrl: string;
|
|
494
|
+
audience: string;
|
|
495
|
+
scope: string;
|
|
496
|
+
admin?: {
|
|
497
|
+
clientId: string;
|
|
498
|
+
clientSecret: string;
|
|
499
|
+
} | undefined;
|
|
500
|
+
} | {
|
|
501
|
+
type: "client_credentials";
|
|
502
|
+
clientId: string;
|
|
503
|
+
clientSecret: string;
|
|
504
|
+
identityProviderId: string;
|
|
505
|
+
issuer: string;
|
|
506
|
+
configUrl: string;
|
|
507
|
+
audience: string;
|
|
508
|
+
scope: string;
|
|
509
|
+
admin?: {
|
|
510
|
+
clientId: string;
|
|
511
|
+
clientSecret: string;
|
|
512
|
+
} | undefined;
|
|
513
|
+
};
|
|
514
|
+
}[];
|
|
515
|
+
};
|
|
516
|
+
}, {
|
|
517
|
+
kernel: {
|
|
518
|
+
id: string;
|
|
519
|
+
clientType: "browser" | "desktop" | "mobile" | "remote";
|
|
520
|
+
url: string;
|
|
521
|
+
userUrl: string;
|
|
522
|
+
};
|
|
523
|
+
store: {
|
|
524
|
+
connection: {
|
|
525
|
+
type: "memory";
|
|
526
|
+
} | {
|
|
527
|
+
type: "sqlite";
|
|
528
|
+
database: string;
|
|
529
|
+
} | {
|
|
530
|
+
type: "postgres";
|
|
531
|
+
password: string;
|
|
532
|
+
database: string;
|
|
533
|
+
host: string;
|
|
534
|
+
port: number;
|
|
535
|
+
user: string;
|
|
536
|
+
};
|
|
537
|
+
networks: {
|
|
538
|
+
name: string;
|
|
539
|
+
chainId: string;
|
|
540
|
+
synchronizerId: string;
|
|
541
|
+
description: string;
|
|
542
|
+
ledgerApi: {
|
|
543
|
+
baseUrl: string;
|
|
544
|
+
};
|
|
545
|
+
auth: {
|
|
546
|
+
type: "password";
|
|
547
|
+
clientId: string;
|
|
548
|
+
identityProviderId: string;
|
|
549
|
+
issuer: string;
|
|
550
|
+
configUrl: string;
|
|
551
|
+
audience: string;
|
|
552
|
+
tokenUrl: string;
|
|
553
|
+
grantType: string;
|
|
554
|
+
scope: string;
|
|
555
|
+
admin?: {
|
|
556
|
+
clientId: string;
|
|
557
|
+
clientSecret: string;
|
|
558
|
+
} | undefined;
|
|
559
|
+
} | {
|
|
560
|
+
type: "implicit";
|
|
561
|
+
clientId: string;
|
|
562
|
+
identityProviderId: string;
|
|
563
|
+
issuer: string;
|
|
564
|
+
configUrl: string;
|
|
565
|
+
audience: string;
|
|
566
|
+
scope: string;
|
|
567
|
+
admin?: {
|
|
568
|
+
clientId: string;
|
|
569
|
+
clientSecret: string;
|
|
570
|
+
} | undefined;
|
|
571
|
+
} | {
|
|
572
|
+
type: "client_credentials";
|
|
573
|
+
clientId: string;
|
|
574
|
+
clientSecret: string;
|
|
575
|
+
identityProviderId: string;
|
|
576
|
+
issuer: string;
|
|
577
|
+
configUrl: string;
|
|
578
|
+
audience: string;
|
|
579
|
+
scope: string;
|
|
580
|
+
admin?: {
|
|
581
|
+
clientId: string;
|
|
582
|
+
clientSecret: string;
|
|
583
|
+
} | undefined;
|
|
584
|
+
};
|
|
585
|
+
}[];
|
|
586
|
+
};
|
|
587
|
+
}>;
|
|
588
|
+
export type KernelInfo = z.infer<typeof kernelInfoSchema>;
|
|
589
|
+
export type Config = z.infer<typeof configSchema>;
|
|
590
|
+
//# sourceMappingURL=Config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/config/Config.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;EAU3B,CAAA;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAOqoe,CAAC;;;;;;;;;;;;;;qBAA0Z,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAA6+B,CAAC;;;;;;;;;;;;qBAA6V,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAA0kC,CAAC;;;;;;;;;;;;;qBAAyY,CAAC;;;;;;;;;;;;;;;;;;;;;;;qBAAonB,CAAC;;;;;;;;;;;;qBAA8V,CAAC;;;;;;;;;;;;;qBAA0Y,CAAC;;;;;;;;;;;;;;;;;;;;;;;qBAA0lB,CAAC;;;;;;;;;;;;qBAA8V,CAAC;;;;;;;;;;;;;qBAA0Y,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAq5B,CAAC;;;;;;;;;;;;qBAA8V,CAAC;;;;;;;;;;;;;qBAA0Y,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAs3B,CAAC;;;;;;;;;;;;qBAA8V,CAAC;;;;;;;;;;;;;qBAA0Y,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAA50E,CAAC;;;;;;;;;;;;qBAA8V,CAAC;;;;;;;;;;;;;qBAA0Y,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAs3B,CAAC;;;;;;;;;;;;qBAA8V,CAAC;;;;;;;;;;;;;qBAA0Y,CAAC;;;;;;;EAJ9twB,CAAA;AAEF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AACzD,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA"}
|