@canton-network/core-wallet-store 0.10.0 → 0.11.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/dist/Store.d.ts +19 -4
- package/dist/Store.d.ts.map +1 -1
- package/dist/config/schema.d.ts +70 -764
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/index.cjs +6 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/Store.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Idp } from '@canton-network/core-wallet-auth';
|
|
1
2
|
import { Network } from './config/schema';
|
|
2
3
|
export declare enum AddressType {
|
|
3
4
|
PaperAddress = "PaperAddress",
|
|
@@ -13,17 +14,24 @@ export interface SigningProvider {
|
|
|
13
14
|
addressType: AddressType;
|
|
14
15
|
}
|
|
15
16
|
export interface WalletFilter {
|
|
16
|
-
|
|
17
|
+
networkIds?: string[];
|
|
17
18
|
signingProviderIds?: string[];
|
|
18
19
|
}
|
|
20
|
+
export interface UpdateWallet {
|
|
21
|
+
status: string;
|
|
22
|
+
partyId: string;
|
|
23
|
+
}
|
|
19
24
|
export interface Wallet {
|
|
20
25
|
primary: boolean;
|
|
21
26
|
partyId: PartyId;
|
|
22
27
|
hint: string;
|
|
23
28
|
publicKey: string;
|
|
24
29
|
namespace: string;
|
|
25
|
-
|
|
30
|
+
networkId: string;
|
|
26
31
|
signingProviderId: string;
|
|
32
|
+
externalTxId?: string;
|
|
33
|
+
topologyTransactions?: string;
|
|
34
|
+
status?: string;
|
|
27
35
|
}
|
|
28
36
|
export interface Session {
|
|
29
37
|
network: string;
|
|
@@ -41,15 +49,22 @@ export interface Store {
|
|
|
41
49
|
getPrimaryWallet(): Promise<Wallet | undefined>;
|
|
42
50
|
setPrimaryWallet(partyId: PartyId): Promise<void>;
|
|
43
51
|
addWallet(wallet: Wallet): Promise<void>;
|
|
52
|
+
updateWallet(params: UpdateWallet): Promise<void>;
|
|
53
|
+
removeWallet(partyId: PartyId): Promise<void>;
|
|
44
54
|
getSession(): Promise<Session | undefined>;
|
|
45
55
|
setSession(session: Session): Promise<void>;
|
|
46
56
|
removeSession(): Promise<void>;
|
|
47
|
-
|
|
57
|
+
getIdp(idpId: string): Promise<Idp>;
|
|
58
|
+
listIdps(): Promise<Array<Idp>>;
|
|
59
|
+
updateIdp(idp: Idp): Promise<void>;
|
|
60
|
+
addIdp(idp: Idp): Promise<void>;
|
|
61
|
+
removeIdp(idpId: string): Promise<void>;
|
|
62
|
+
getNetwork(networkId: string): Promise<Network>;
|
|
48
63
|
getCurrentNetwork(): Promise<Network>;
|
|
49
64
|
listNetworks(): Promise<Array<Network>>;
|
|
50
65
|
updateNetwork(network: Network): Promise<void>;
|
|
51
66
|
addNetwork(network: Network): Promise<void>;
|
|
52
|
-
removeNetwork(
|
|
67
|
+
removeNetwork(networkId: string): Promise<void>;
|
|
53
68
|
setTransaction(tx: Transaction): Promise<void>;
|
|
54
69
|
getTransaction(commandId: string): Promise<Transaction | undefined>;
|
|
55
70
|
}
|
package/dist/Store.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Store.d.ts","sourceRoot":"","sources":["../src/Store.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAEzC,oBAAY,WAAW;IACnB,YAAY,iBAAiB;IAC7B,WAAW,gBAAgB;CAC9B;AAED,MAAM,MAAM,OAAO,GAAG,MAAM,CAAA;AAE5B,MAAM,WAAW,aAAa;IAC1B,eAAe,EAAE,MAAM,CAAA;CAC1B;AAED,MAAM,WAAW,eAAe;IAC5B,iBAAiB,EAAE,MAAM,CAAA;IACzB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,WAAW,CAAA;CAC3B;AAED,MAAM,WAAW,YAAY;IACzB,
|
|
1
|
+
{"version":3,"file":"Store.d.ts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A;IACrC,YAAY,IAAI,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAA;IACvC,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC9C,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3C,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAG/C,cAAc,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC9C,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC,CAAA;CACtE"}
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -1,822 +1,128 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const ledgerApiSchema: z.ZodObject<{
|
|
3
3
|
baseUrl: z.ZodString;
|
|
4
|
-
},
|
|
5
|
-
baseUrl: string;
|
|
6
|
-
}, {
|
|
7
|
-
baseUrl: string;
|
|
8
|
-
}>;
|
|
4
|
+
}, z.core.$strip>;
|
|
9
5
|
export declare const networkSchema: z.ZodObject<{
|
|
6
|
+
id: z.ZodString;
|
|
10
7
|
name: z.ZodString;
|
|
11
|
-
chainId: z.ZodString;
|
|
12
|
-
synchronizerId: z.ZodString;
|
|
13
8
|
description: z.ZodString;
|
|
9
|
+
synchronizerId: z.ZodString;
|
|
10
|
+
identityProviderId: z.ZodString;
|
|
14
11
|
ledgerApi: z.ZodObject<{
|
|
15
12
|
baseUrl: z.ZodString;
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
baseUrl: string;
|
|
20
|
-
}>;
|
|
21
|
-
auth: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
22
|
-
identityProviderId: z.ZodString;
|
|
23
|
-
type: z.ZodLiteral<"password">;
|
|
24
|
-
issuer: z.ZodString;
|
|
25
|
-
configUrl: z.ZodString;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
auth: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
15
|
+
method: z.ZodLiteral<"authorization_code">;
|
|
26
16
|
audience: z.ZodString;
|
|
27
|
-
tokenUrl: z.ZodString;
|
|
28
|
-
grantType: z.ZodString;
|
|
29
17
|
scope: z.ZodString;
|
|
30
18
|
clientId: z.ZodString;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
clientSecret: z.ZodString;
|
|
34
|
-
}, "strip", z.ZodTypeAny, {
|
|
35
|
-
clientId: string;
|
|
36
|
-
clientSecret: string;
|
|
37
|
-
}, {
|
|
38
|
-
clientId: string;
|
|
39
|
-
clientSecret: string;
|
|
40
|
-
}>>;
|
|
41
|
-
}, "strip", z.ZodTypeAny, {
|
|
42
|
-
clientId: string;
|
|
43
|
-
type: "password";
|
|
44
|
-
identityProviderId: string;
|
|
45
|
-
issuer: string;
|
|
46
|
-
configUrl: string;
|
|
47
|
-
audience: string;
|
|
48
|
-
tokenUrl: string;
|
|
49
|
-
grantType: string;
|
|
50
|
-
scope: string;
|
|
51
|
-
admin?: {
|
|
52
|
-
clientId: string;
|
|
53
|
-
clientSecret: string;
|
|
54
|
-
} | undefined;
|
|
55
|
-
}, {
|
|
56
|
-
clientId: string;
|
|
57
|
-
type: "password";
|
|
58
|
-
identityProviderId: string;
|
|
59
|
-
issuer: string;
|
|
60
|
-
configUrl: string;
|
|
61
|
-
audience: string;
|
|
62
|
-
tokenUrl: string;
|
|
63
|
-
grantType: string;
|
|
64
|
-
scope: string;
|
|
65
|
-
admin?: {
|
|
66
|
-
clientId: string;
|
|
67
|
-
clientSecret: string;
|
|
68
|
-
} | undefined;
|
|
69
|
-
}>, z.ZodObject<{
|
|
70
|
-
identityProviderId: z.ZodString;
|
|
71
|
-
type: z.ZodLiteral<"implicit">;
|
|
72
|
-
issuer: z.ZodString;
|
|
73
|
-
configUrl: z.ZodString;
|
|
19
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
20
|
+
method: z.ZodLiteral<"client_credentials">;
|
|
74
21
|
audience: z.ZodString;
|
|
75
22
|
scope: z.ZodString;
|
|
76
23
|
clientId: z.ZodString;
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}, "strip", z.ZodTypeAny, {
|
|
81
|
-
clientId: string;
|
|
82
|
-
clientSecret: string;
|
|
83
|
-
}, {
|
|
84
|
-
clientId: string;
|
|
85
|
-
clientSecret: string;
|
|
86
|
-
}>>;
|
|
87
|
-
}, "strip", z.ZodTypeAny, {
|
|
88
|
-
clientId: string;
|
|
89
|
-
type: "implicit";
|
|
90
|
-
identityProviderId: string;
|
|
91
|
-
issuer: string;
|
|
92
|
-
configUrl: string;
|
|
93
|
-
audience: string;
|
|
94
|
-
scope: string;
|
|
95
|
-
admin?: {
|
|
96
|
-
clientId: string;
|
|
97
|
-
clientSecret: string;
|
|
98
|
-
} | undefined;
|
|
99
|
-
}, {
|
|
100
|
-
clientId: string;
|
|
101
|
-
type: "implicit";
|
|
102
|
-
identityProviderId: string;
|
|
103
|
-
issuer: string;
|
|
104
|
-
configUrl: string;
|
|
105
|
-
audience: string;
|
|
106
|
-
scope: string;
|
|
107
|
-
admin?: {
|
|
108
|
-
clientId: string;
|
|
109
|
-
clientSecret: string;
|
|
110
|
-
} | undefined;
|
|
111
|
-
}>, z.ZodObject<{
|
|
112
|
-
identityProviderId: z.ZodString;
|
|
113
|
-
type: z.ZodLiteral<"client_credentials">;
|
|
24
|
+
clientSecret: z.ZodString;
|
|
25
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
26
|
+
method: z.ZodLiteral<"self_signed">;
|
|
114
27
|
issuer: z.ZodString;
|
|
115
|
-
configUrl: z.ZodString;
|
|
116
28
|
audience: z.ZodString;
|
|
117
29
|
scope: z.ZodString;
|
|
118
30
|
clientId: z.ZodString;
|
|
119
31
|
clientSecret: z.ZodString;
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
identityProviderId: string;
|
|
135
|
-
issuer: string;
|
|
136
|
-
configUrl: string;
|
|
137
|
-
audience: string;
|
|
138
|
-
scope: string;
|
|
139
|
-
admin?: {
|
|
140
|
-
clientId: string;
|
|
141
|
-
clientSecret: string;
|
|
142
|
-
} | undefined;
|
|
143
|
-
}, {
|
|
144
|
-
clientId: string;
|
|
145
|
-
clientSecret: string;
|
|
146
|
-
type: "client_credentials";
|
|
147
|
-
identityProviderId: string;
|
|
148
|
-
issuer: string;
|
|
149
|
-
configUrl: string;
|
|
150
|
-
audience: string;
|
|
151
|
-
scope: string;
|
|
152
|
-
admin?: {
|
|
153
|
-
clientId: string;
|
|
154
|
-
clientSecret: string;
|
|
155
|
-
} | undefined;
|
|
156
|
-
}>, z.ZodObject<{
|
|
157
|
-
identityProviderId: z.ZodString;
|
|
158
|
-
type: z.ZodLiteral<"self_signed">;
|
|
32
|
+
}, z.core.$strip>], "method">;
|
|
33
|
+
adminAuth: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
34
|
+
method: z.ZodLiteral<"authorization_code">;
|
|
35
|
+
audience: z.ZodString;
|
|
36
|
+
scope: z.ZodString;
|
|
37
|
+
clientId: z.ZodString;
|
|
38
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
39
|
+
method: z.ZodLiteral<"client_credentials">;
|
|
40
|
+
audience: z.ZodString;
|
|
41
|
+
scope: z.ZodString;
|
|
42
|
+
clientId: z.ZodString;
|
|
43
|
+
clientSecret: z.ZodString;
|
|
44
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
45
|
+
method: z.ZodLiteral<"self_signed">;
|
|
159
46
|
issuer: z.ZodString;
|
|
160
47
|
audience: z.ZodString;
|
|
161
48
|
scope: z.ZodString;
|
|
162
49
|
clientId: z.ZodString;
|
|
163
50
|
clientSecret: z.ZodString;
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
clientSecret: z.ZodString;
|
|
167
|
-
}, "strip", z.ZodTypeAny, {
|
|
168
|
-
clientId: string;
|
|
169
|
-
clientSecret: string;
|
|
170
|
-
}, {
|
|
171
|
-
clientId: string;
|
|
172
|
-
clientSecret: string;
|
|
173
|
-
}>>;
|
|
174
|
-
}, "strip", z.ZodTypeAny, {
|
|
175
|
-
clientId: string;
|
|
176
|
-
clientSecret: string;
|
|
177
|
-
type: "self_signed";
|
|
178
|
-
identityProviderId: string;
|
|
179
|
-
issuer: string;
|
|
180
|
-
audience: string;
|
|
181
|
-
scope: string;
|
|
182
|
-
admin?: {
|
|
183
|
-
clientId: string;
|
|
184
|
-
clientSecret: string;
|
|
185
|
-
} | undefined;
|
|
186
|
-
}, {
|
|
187
|
-
clientId: string;
|
|
188
|
-
clientSecret: string;
|
|
189
|
-
type: "self_signed";
|
|
190
|
-
identityProviderId: string;
|
|
191
|
-
issuer: string;
|
|
192
|
-
audience: string;
|
|
193
|
-
scope: string;
|
|
194
|
-
admin?: {
|
|
195
|
-
clientId: string;
|
|
196
|
-
clientSecret: string;
|
|
197
|
-
} | undefined;
|
|
198
|
-
}>]>;
|
|
199
|
-
}, "strip", z.ZodTypeAny, {
|
|
200
|
-
name: string;
|
|
201
|
-
chainId: string;
|
|
202
|
-
synchronizerId: string;
|
|
203
|
-
description: string;
|
|
204
|
-
ledgerApi: {
|
|
205
|
-
baseUrl: string;
|
|
206
|
-
};
|
|
207
|
-
auth: {
|
|
208
|
-
clientId: string;
|
|
209
|
-
type: "password";
|
|
210
|
-
identityProviderId: string;
|
|
211
|
-
issuer: string;
|
|
212
|
-
configUrl: string;
|
|
213
|
-
audience: string;
|
|
214
|
-
tokenUrl: string;
|
|
215
|
-
grantType: string;
|
|
216
|
-
scope: string;
|
|
217
|
-
admin?: {
|
|
218
|
-
clientId: string;
|
|
219
|
-
clientSecret: string;
|
|
220
|
-
} | undefined;
|
|
221
|
-
} | {
|
|
222
|
-
clientId: string;
|
|
223
|
-
type: "implicit";
|
|
224
|
-
identityProviderId: string;
|
|
225
|
-
issuer: string;
|
|
226
|
-
configUrl: string;
|
|
227
|
-
audience: string;
|
|
228
|
-
scope: string;
|
|
229
|
-
admin?: {
|
|
230
|
-
clientId: string;
|
|
231
|
-
clientSecret: string;
|
|
232
|
-
} | undefined;
|
|
233
|
-
} | {
|
|
234
|
-
clientId: string;
|
|
235
|
-
clientSecret: string;
|
|
236
|
-
type: "client_credentials";
|
|
237
|
-
identityProviderId: string;
|
|
238
|
-
issuer: string;
|
|
239
|
-
configUrl: string;
|
|
240
|
-
audience: string;
|
|
241
|
-
scope: string;
|
|
242
|
-
admin?: {
|
|
243
|
-
clientId: string;
|
|
244
|
-
clientSecret: string;
|
|
245
|
-
} | undefined;
|
|
246
|
-
} | {
|
|
247
|
-
clientId: string;
|
|
248
|
-
clientSecret: string;
|
|
249
|
-
type: "self_signed";
|
|
250
|
-
identityProviderId: string;
|
|
251
|
-
issuer: string;
|
|
252
|
-
audience: string;
|
|
253
|
-
scope: string;
|
|
254
|
-
admin?: {
|
|
255
|
-
clientId: string;
|
|
256
|
-
clientSecret: string;
|
|
257
|
-
} | undefined;
|
|
258
|
-
};
|
|
259
|
-
}, {
|
|
260
|
-
name: string;
|
|
261
|
-
chainId: string;
|
|
262
|
-
synchronizerId: string;
|
|
263
|
-
description: string;
|
|
264
|
-
ledgerApi: {
|
|
265
|
-
baseUrl: string;
|
|
266
|
-
};
|
|
267
|
-
auth: {
|
|
268
|
-
clientId: string;
|
|
269
|
-
type: "password";
|
|
270
|
-
identityProviderId: string;
|
|
271
|
-
issuer: string;
|
|
272
|
-
configUrl: string;
|
|
273
|
-
audience: string;
|
|
274
|
-
tokenUrl: string;
|
|
275
|
-
grantType: string;
|
|
276
|
-
scope: string;
|
|
277
|
-
admin?: {
|
|
278
|
-
clientId: string;
|
|
279
|
-
clientSecret: string;
|
|
280
|
-
} | undefined;
|
|
281
|
-
} | {
|
|
282
|
-
clientId: string;
|
|
283
|
-
type: "implicit";
|
|
284
|
-
identityProviderId: string;
|
|
285
|
-
issuer: string;
|
|
286
|
-
configUrl: string;
|
|
287
|
-
audience: string;
|
|
288
|
-
scope: string;
|
|
289
|
-
admin?: {
|
|
290
|
-
clientId: string;
|
|
291
|
-
clientSecret: string;
|
|
292
|
-
} | undefined;
|
|
293
|
-
} | {
|
|
294
|
-
clientId: string;
|
|
295
|
-
clientSecret: string;
|
|
296
|
-
type: "client_credentials";
|
|
297
|
-
identityProviderId: string;
|
|
298
|
-
issuer: string;
|
|
299
|
-
configUrl: string;
|
|
300
|
-
audience: string;
|
|
301
|
-
scope: string;
|
|
302
|
-
admin?: {
|
|
303
|
-
clientId: string;
|
|
304
|
-
clientSecret: string;
|
|
305
|
-
} | undefined;
|
|
306
|
-
} | {
|
|
307
|
-
clientId: string;
|
|
308
|
-
clientSecret: string;
|
|
309
|
-
type: "self_signed";
|
|
310
|
-
identityProviderId: string;
|
|
311
|
-
issuer: string;
|
|
312
|
-
audience: string;
|
|
313
|
-
scope: string;
|
|
314
|
-
admin?: {
|
|
315
|
-
clientId: string;
|
|
316
|
-
clientSecret: string;
|
|
317
|
-
} | undefined;
|
|
318
|
-
};
|
|
319
|
-
}>;
|
|
51
|
+
}, z.core.$strip>], "method">>;
|
|
52
|
+
}, z.core.$strip>;
|
|
320
53
|
export declare const storeConfigSchema: z.ZodObject<{
|
|
321
|
-
connection: z.ZodDiscriminatedUnion<
|
|
54
|
+
connection: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
322
55
|
type: z.ZodLiteral<"memory">;
|
|
323
|
-
},
|
|
324
|
-
type: "memory";
|
|
325
|
-
}, {
|
|
326
|
-
type: "memory";
|
|
327
|
-
}>, z.ZodObject<{
|
|
56
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
328
57
|
type: z.ZodLiteral<"sqlite">;
|
|
329
58
|
database: z.ZodString;
|
|
330
|
-
},
|
|
331
|
-
type: "sqlite";
|
|
332
|
-
database: string;
|
|
333
|
-
}, {
|
|
334
|
-
type: "sqlite";
|
|
335
|
-
database: string;
|
|
336
|
-
}>, z.ZodObject<{
|
|
59
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
337
60
|
type: z.ZodLiteral<"postgres">;
|
|
338
61
|
host: z.ZodString;
|
|
339
62
|
port: z.ZodNumber;
|
|
340
63
|
user: z.ZodString;
|
|
341
64
|
password: z.ZodString;
|
|
342
65
|
database: z.ZodString;
|
|
343
|
-
},
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
port: number;
|
|
355
|
-
user: string;
|
|
356
|
-
password: string;
|
|
357
|
-
}>]>;
|
|
66
|
+
}, z.core.$strip>], "type">;
|
|
67
|
+
idps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
68
|
+
id: z.ZodString;
|
|
69
|
+
type: z.ZodLiteral<"self_signed">;
|
|
70
|
+
issuer: z.ZodString;
|
|
71
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
72
|
+
id: z.ZodString;
|
|
73
|
+
type: z.ZodLiteral<"oauth">;
|
|
74
|
+
issuer: z.ZodString;
|
|
75
|
+
configUrl: z.ZodString;
|
|
76
|
+
}, z.core.$strip>], "type">>;
|
|
358
77
|
networks: z.ZodArray<z.ZodObject<{
|
|
78
|
+
id: z.ZodString;
|
|
359
79
|
name: z.ZodString;
|
|
360
|
-
chainId: z.ZodString;
|
|
361
|
-
synchronizerId: z.ZodString;
|
|
362
80
|
description: z.ZodString;
|
|
81
|
+
synchronizerId: z.ZodString;
|
|
82
|
+
identityProviderId: z.ZodString;
|
|
363
83
|
ledgerApi: z.ZodObject<{
|
|
364
84
|
baseUrl: z.ZodString;
|
|
365
|
-
},
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
baseUrl: string;
|
|
369
|
-
}>;
|
|
370
|
-
auth: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
371
|
-
identityProviderId: z.ZodString;
|
|
372
|
-
type: z.ZodLiteral<"password">;
|
|
373
|
-
issuer: z.ZodString;
|
|
374
|
-
configUrl: z.ZodString;
|
|
85
|
+
}, z.core.$strip>;
|
|
86
|
+
auth: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
87
|
+
method: z.ZodLiteral<"authorization_code">;
|
|
375
88
|
audience: z.ZodString;
|
|
376
|
-
tokenUrl: z.ZodString;
|
|
377
|
-
grantType: z.ZodString;
|
|
378
89
|
scope: z.ZodString;
|
|
379
90
|
clientId: z.ZodString;
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
clientSecret: z.ZodString;
|
|
383
|
-
}, "strip", z.ZodTypeAny, {
|
|
384
|
-
clientId: string;
|
|
385
|
-
clientSecret: string;
|
|
386
|
-
}, {
|
|
387
|
-
clientId: string;
|
|
388
|
-
clientSecret: string;
|
|
389
|
-
}>>;
|
|
390
|
-
}, "strip", z.ZodTypeAny, {
|
|
391
|
-
clientId: string;
|
|
392
|
-
type: "password";
|
|
393
|
-
identityProviderId: string;
|
|
394
|
-
issuer: string;
|
|
395
|
-
configUrl: string;
|
|
396
|
-
audience: string;
|
|
397
|
-
tokenUrl: string;
|
|
398
|
-
grantType: string;
|
|
399
|
-
scope: string;
|
|
400
|
-
admin?: {
|
|
401
|
-
clientId: string;
|
|
402
|
-
clientSecret: string;
|
|
403
|
-
} | undefined;
|
|
404
|
-
}, {
|
|
405
|
-
clientId: string;
|
|
406
|
-
type: "password";
|
|
407
|
-
identityProviderId: string;
|
|
408
|
-
issuer: string;
|
|
409
|
-
configUrl: string;
|
|
410
|
-
audience: string;
|
|
411
|
-
tokenUrl: string;
|
|
412
|
-
grantType: string;
|
|
413
|
-
scope: string;
|
|
414
|
-
admin?: {
|
|
415
|
-
clientId: string;
|
|
416
|
-
clientSecret: string;
|
|
417
|
-
} | undefined;
|
|
418
|
-
}>, z.ZodObject<{
|
|
419
|
-
identityProviderId: z.ZodString;
|
|
420
|
-
type: z.ZodLiteral<"implicit">;
|
|
421
|
-
issuer: z.ZodString;
|
|
422
|
-
configUrl: z.ZodString;
|
|
91
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
92
|
+
method: z.ZodLiteral<"client_credentials">;
|
|
423
93
|
audience: z.ZodString;
|
|
424
94
|
scope: z.ZodString;
|
|
425
95
|
clientId: z.ZodString;
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
}, "strip", z.ZodTypeAny, {
|
|
430
|
-
clientId: string;
|
|
431
|
-
clientSecret: string;
|
|
432
|
-
}, {
|
|
433
|
-
clientId: string;
|
|
434
|
-
clientSecret: string;
|
|
435
|
-
}>>;
|
|
436
|
-
}, "strip", z.ZodTypeAny, {
|
|
437
|
-
clientId: string;
|
|
438
|
-
type: "implicit";
|
|
439
|
-
identityProviderId: string;
|
|
440
|
-
issuer: string;
|
|
441
|
-
configUrl: string;
|
|
442
|
-
audience: string;
|
|
443
|
-
scope: string;
|
|
444
|
-
admin?: {
|
|
445
|
-
clientId: string;
|
|
446
|
-
clientSecret: string;
|
|
447
|
-
} | undefined;
|
|
448
|
-
}, {
|
|
449
|
-
clientId: string;
|
|
450
|
-
type: "implicit";
|
|
451
|
-
identityProviderId: string;
|
|
452
|
-
issuer: string;
|
|
453
|
-
configUrl: string;
|
|
454
|
-
audience: string;
|
|
455
|
-
scope: string;
|
|
456
|
-
admin?: {
|
|
457
|
-
clientId: string;
|
|
458
|
-
clientSecret: string;
|
|
459
|
-
} | undefined;
|
|
460
|
-
}>, z.ZodObject<{
|
|
461
|
-
identityProviderId: z.ZodString;
|
|
462
|
-
type: z.ZodLiteral<"client_credentials">;
|
|
96
|
+
clientSecret: z.ZodString;
|
|
97
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
98
|
+
method: z.ZodLiteral<"self_signed">;
|
|
463
99
|
issuer: z.ZodString;
|
|
464
|
-
configUrl: z.ZodString;
|
|
465
100
|
audience: z.ZodString;
|
|
466
101
|
scope: z.ZodString;
|
|
467
102
|
clientId: z.ZodString;
|
|
468
103
|
clientSecret: z.ZodString;
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
identityProviderId: string;
|
|
484
|
-
issuer: string;
|
|
485
|
-
configUrl: string;
|
|
486
|
-
audience: string;
|
|
487
|
-
scope: string;
|
|
488
|
-
admin?: {
|
|
489
|
-
clientId: string;
|
|
490
|
-
clientSecret: string;
|
|
491
|
-
} | undefined;
|
|
492
|
-
}, {
|
|
493
|
-
clientId: string;
|
|
494
|
-
clientSecret: string;
|
|
495
|
-
type: "client_credentials";
|
|
496
|
-
identityProviderId: string;
|
|
497
|
-
issuer: string;
|
|
498
|
-
configUrl: string;
|
|
499
|
-
audience: string;
|
|
500
|
-
scope: string;
|
|
501
|
-
admin?: {
|
|
502
|
-
clientId: string;
|
|
503
|
-
clientSecret: string;
|
|
504
|
-
} | undefined;
|
|
505
|
-
}>, z.ZodObject<{
|
|
506
|
-
identityProviderId: z.ZodString;
|
|
507
|
-
type: z.ZodLiteral<"self_signed">;
|
|
104
|
+
}, z.core.$strip>], "method">;
|
|
105
|
+
adminAuth: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
106
|
+
method: z.ZodLiteral<"authorization_code">;
|
|
107
|
+
audience: z.ZodString;
|
|
108
|
+
scope: z.ZodString;
|
|
109
|
+
clientId: z.ZodString;
|
|
110
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
111
|
+
method: z.ZodLiteral<"client_credentials">;
|
|
112
|
+
audience: z.ZodString;
|
|
113
|
+
scope: z.ZodString;
|
|
114
|
+
clientId: z.ZodString;
|
|
115
|
+
clientSecret: z.ZodString;
|
|
116
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
117
|
+
method: z.ZodLiteral<"self_signed">;
|
|
508
118
|
issuer: z.ZodString;
|
|
509
119
|
audience: z.ZodString;
|
|
510
120
|
scope: z.ZodString;
|
|
511
121
|
clientId: z.ZodString;
|
|
512
122
|
clientSecret: z.ZodString;
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
}, "strip", z.ZodTypeAny, {
|
|
517
|
-
clientId: string;
|
|
518
|
-
clientSecret: string;
|
|
519
|
-
}, {
|
|
520
|
-
clientId: string;
|
|
521
|
-
clientSecret: string;
|
|
522
|
-
}>>;
|
|
523
|
-
}, "strip", z.ZodTypeAny, {
|
|
524
|
-
clientId: string;
|
|
525
|
-
clientSecret: string;
|
|
526
|
-
type: "self_signed";
|
|
527
|
-
identityProviderId: string;
|
|
528
|
-
issuer: string;
|
|
529
|
-
audience: string;
|
|
530
|
-
scope: string;
|
|
531
|
-
admin?: {
|
|
532
|
-
clientId: string;
|
|
533
|
-
clientSecret: string;
|
|
534
|
-
} | undefined;
|
|
535
|
-
}, {
|
|
536
|
-
clientId: string;
|
|
537
|
-
clientSecret: string;
|
|
538
|
-
type: "self_signed";
|
|
539
|
-
identityProviderId: string;
|
|
540
|
-
issuer: string;
|
|
541
|
-
audience: string;
|
|
542
|
-
scope: string;
|
|
543
|
-
admin?: {
|
|
544
|
-
clientId: string;
|
|
545
|
-
clientSecret: string;
|
|
546
|
-
} | undefined;
|
|
547
|
-
}>]>;
|
|
548
|
-
}, "strip", z.ZodTypeAny, {
|
|
549
|
-
name: string;
|
|
550
|
-
chainId: string;
|
|
551
|
-
synchronizerId: string;
|
|
552
|
-
description: string;
|
|
553
|
-
ledgerApi: {
|
|
554
|
-
baseUrl: string;
|
|
555
|
-
};
|
|
556
|
-
auth: {
|
|
557
|
-
clientId: string;
|
|
558
|
-
type: "password";
|
|
559
|
-
identityProviderId: string;
|
|
560
|
-
issuer: string;
|
|
561
|
-
configUrl: string;
|
|
562
|
-
audience: string;
|
|
563
|
-
tokenUrl: string;
|
|
564
|
-
grantType: string;
|
|
565
|
-
scope: string;
|
|
566
|
-
admin?: {
|
|
567
|
-
clientId: string;
|
|
568
|
-
clientSecret: string;
|
|
569
|
-
} | undefined;
|
|
570
|
-
} | {
|
|
571
|
-
clientId: string;
|
|
572
|
-
type: "implicit";
|
|
573
|
-
identityProviderId: string;
|
|
574
|
-
issuer: string;
|
|
575
|
-
configUrl: string;
|
|
576
|
-
audience: string;
|
|
577
|
-
scope: string;
|
|
578
|
-
admin?: {
|
|
579
|
-
clientId: string;
|
|
580
|
-
clientSecret: string;
|
|
581
|
-
} | undefined;
|
|
582
|
-
} | {
|
|
583
|
-
clientId: string;
|
|
584
|
-
clientSecret: string;
|
|
585
|
-
type: "client_credentials";
|
|
586
|
-
identityProviderId: string;
|
|
587
|
-
issuer: string;
|
|
588
|
-
configUrl: string;
|
|
589
|
-
audience: string;
|
|
590
|
-
scope: string;
|
|
591
|
-
admin?: {
|
|
592
|
-
clientId: string;
|
|
593
|
-
clientSecret: string;
|
|
594
|
-
} | undefined;
|
|
595
|
-
} | {
|
|
596
|
-
clientId: string;
|
|
597
|
-
clientSecret: string;
|
|
598
|
-
type: "self_signed";
|
|
599
|
-
identityProviderId: string;
|
|
600
|
-
issuer: string;
|
|
601
|
-
audience: string;
|
|
602
|
-
scope: string;
|
|
603
|
-
admin?: {
|
|
604
|
-
clientId: string;
|
|
605
|
-
clientSecret: string;
|
|
606
|
-
} | undefined;
|
|
607
|
-
};
|
|
608
|
-
}, {
|
|
609
|
-
name: string;
|
|
610
|
-
chainId: string;
|
|
611
|
-
synchronizerId: string;
|
|
612
|
-
description: string;
|
|
613
|
-
ledgerApi: {
|
|
614
|
-
baseUrl: string;
|
|
615
|
-
};
|
|
616
|
-
auth: {
|
|
617
|
-
clientId: string;
|
|
618
|
-
type: "password";
|
|
619
|
-
identityProviderId: string;
|
|
620
|
-
issuer: string;
|
|
621
|
-
configUrl: string;
|
|
622
|
-
audience: string;
|
|
623
|
-
tokenUrl: string;
|
|
624
|
-
grantType: string;
|
|
625
|
-
scope: string;
|
|
626
|
-
admin?: {
|
|
627
|
-
clientId: string;
|
|
628
|
-
clientSecret: string;
|
|
629
|
-
} | undefined;
|
|
630
|
-
} | {
|
|
631
|
-
clientId: string;
|
|
632
|
-
type: "implicit";
|
|
633
|
-
identityProviderId: string;
|
|
634
|
-
issuer: string;
|
|
635
|
-
configUrl: string;
|
|
636
|
-
audience: string;
|
|
637
|
-
scope: string;
|
|
638
|
-
admin?: {
|
|
639
|
-
clientId: string;
|
|
640
|
-
clientSecret: string;
|
|
641
|
-
} | undefined;
|
|
642
|
-
} | {
|
|
643
|
-
clientId: string;
|
|
644
|
-
clientSecret: string;
|
|
645
|
-
type: "client_credentials";
|
|
646
|
-
identityProviderId: string;
|
|
647
|
-
issuer: string;
|
|
648
|
-
configUrl: string;
|
|
649
|
-
audience: string;
|
|
650
|
-
scope: string;
|
|
651
|
-
admin?: {
|
|
652
|
-
clientId: string;
|
|
653
|
-
clientSecret: string;
|
|
654
|
-
} | undefined;
|
|
655
|
-
} | {
|
|
656
|
-
clientId: string;
|
|
657
|
-
clientSecret: string;
|
|
658
|
-
type: "self_signed";
|
|
659
|
-
identityProviderId: string;
|
|
660
|
-
issuer: string;
|
|
661
|
-
audience: string;
|
|
662
|
-
scope: string;
|
|
663
|
-
admin?: {
|
|
664
|
-
clientId: string;
|
|
665
|
-
clientSecret: string;
|
|
666
|
-
} | undefined;
|
|
667
|
-
};
|
|
668
|
-
}>, "many">;
|
|
669
|
-
}, "strip", z.ZodTypeAny, {
|
|
670
|
-
connection: {
|
|
671
|
-
type: "memory";
|
|
672
|
-
} | {
|
|
673
|
-
type: "sqlite";
|
|
674
|
-
database: string;
|
|
675
|
-
} | {
|
|
676
|
-
type: "postgres";
|
|
677
|
-
database: string;
|
|
678
|
-
host: string;
|
|
679
|
-
port: number;
|
|
680
|
-
user: string;
|
|
681
|
-
password: string;
|
|
682
|
-
};
|
|
683
|
-
networks: {
|
|
684
|
-
name: string;
|
|
685
|
-
chainId: string;
|
|
686
|
-
synchronizerId: string;
|
|
687
|
-
description: string;
|
|
688
|
-
ledgerApi: {
|
|
689
|
-
baseUrl: string;
|
|
690
|
-
};
|
|
691
|
-
auth: {
|
|
692
|
-
clientId: string;
|
|
693
|
-
type: "password";
|
|
694
|
-
identityProviderId: string;
|
|
695
|
-
issuer: string;
|
|
696
|
-
configUrl: string;
|
|
697
|
-
audience: string;
|
|
698
|
-
tokenUrl: string;
|
|
699
|
-
grantType: string;
|
|
700
|
-
scope: string;
|
|
701
|
-
admin?: {
|
|
702
|
-
clientId: string;
|
|
703
|
-
clientSecret: string;
|
|
704
|
-
} | undefined;
|
|
705
|
-
} | {
|
|
706
|
-
clientId: string;
|
|
707
|
-
type: "implicit";
|
|
708
|
-
identityProviderId: string;
|
|
709
|
-
issuer: string;
|
|
710
|
-
configUrl: string;
|
|
711
|
-
audience: string;
|
|
712
|
-
scope: string;
|
|
713
|
-
admin?: {
|
|
714
|
-
clientId: string;
|
|
715
|
-
clientSecret: string;
|
|
716
|
-
} | undefined;
|
|
717
|
-
} | {
|
|
718
|
-
clientId: string;
|
|
719
|
-
clientSecret: string;
|
|
720
|
-
type: "client_credentials";
|
|
721
|
-
identityProviderId: string;
|
|
722
|
-
issuer: string;
|
|
723
|
-
configUrl: string;
|
|
724
|
-
audience: string;
|
|
725
|
-
scope: string;
|
|
726
|
-
admin?: {
|
|
727
|
-
clientId: string;
|
|
728
|
-
clientSecret: string;
|
|
729
|
-
} | undefined;
|
|
730
|
-
} | {
|
|
731
|
-
clientId: string;
|
|
732
|
-
clientSecret: string;
|
|
733
|
-
type: "self_signed";
|
|
734
|
-
identityProviderId: string;
|
|
735
|
-
issuer: string;
|
|
736
|
-
audience: string;
|
|
737
|
-
scope: string;
|
|
738
|
-
admin?: {
|
|
739
|
-
clientId: string;
|
|
740
|
-
clientSecret: string;
|
|
741
|
-
} | undefined;
|
|
742
|
-
};
|
|
743
|
-
}[];
|
|
744
|
-
}, {
|
|
745
|
-
connection: {
|
|
746
|
-
type: "memory";
|
|
747
|
-
} | {
|
|
748
|
-
type: "sqlite";
|
|
749
|
-
database: string;
|
|
750
|
-
} | {
|
|
751
|
-
type: "postgres";
|
|
752
|
-
database: string;
|
|
753
|
-
host: string;
|
|
754
|
-
port: number;
|
|
755
|
-
user: string;
|
|
756
|
-
password: string;
|
|
757
|
-
};
|
|
758
|
-
networks: {
|
|
759
|
-
name: string;
|
|
760
|
-
chainId: string;
|
|
761
|
-
synchronizerId: string;
|
|
762
|
-
description: string;
|
|
763
|
-
ledgerApi: {
|
|
764
|
-
baseUrl: string;
|
|
765
|
-
};
|
|
766
|
-
auth: {
|
|
767
|
-
clientId: string;
|
|
768
|
-
type: "password";
|
|
769
|
-
identityProviderId: string;
|
|
770
|
-
issuer: string;
|
|
771
|
-
configUrl: string;
|
|
772
|
-
audience: string;
|
|
773
|
-
tokenUrl: string;
|
|
774
|
-
grantType: string;
|
|
775
|
-
scope: string;
|
|
776
|
-
admin?: {
|
|
777
|
-
clientId: string;
|
|
778
|
-
clientSecret: string;
|
|
779
|
-
} | undefined;
|
|
780
|
-
} | {
|
|
781
|
-
clientId: string;
|
|
782
|
-
type: "implicit";
|
|
783
|
-
identityProviderId: string;
|
|
784
|
-
issuer: string;
|
|
785
|
-
configUrl: string;
|
|
786
|
-
audience: string;
|
|
787
|
-
scope: string;
|
|
788
|
-
admin?: {
|
|
789
|
-
clientId: string;
|
|
790
|
-
clientSecret: string;
|
|
791
|
-
} | undefined;
|
|
792
|
-
} | {
|
|
793
|
-
clientId: string;
|
|
794
|
-
clientSecret: string;
|
|
795
|
-
type: "client_credentials";
|
|
796
|
-
identityProviderId: string;
|
|
797
|
-
issuer: string;
|
|
798
|
-
configUrl: string;
|
|
799
|
-
audience: string;
|
|
800
|
-
scope: string;
|
|
801
|
-
admin?: {
|
|
802
|
-
clientId: string;
|
|
803
|
-
clientSecret: string;
|
|
804
|
-
} | undefined;
|
|
805
|
-
} | {
|
|
806
|
-
clientId: string;
|
|
807
|
-
clientSecret: string;
|
|
808
|
-
type: "self_signed";
|
|
809
|
-
identityProviderId: string;
|
|
810
|
-
issuer: string;
|
|
811
|
-
audience: string;
|
|
812
|
-
scope: string;
|
|
813
|
-
admin?: {
|
|
814
|
-
clientId: string;
|
|
815
|
-
clientSecret: string;
|
|
816
|
-
} | undefined;
|
|
817
|
-
};
|
|
818
|
-
}[];
|
|
819
|
-
}>;
|
|
123
|
+
}, z.core.$strip>], "method">>;
|
|
124
|
+
}, z.core.$strip>>;
|
|
125
|
+
}, z.core.$strip>;
|
|
820
126
|
export type StoreConfig = z.infer<typeof storeConfigSchema>;
|
|
821
127
|
export type Network = z.infer<typeof networkSchema>;
|
|
822
128
|
export type LedgerApi = z.infer<typeof ledgerApiSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,eAAe;;iBAE1B,CAAA;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBASxB,CAAA;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoB5B,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAC3D,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AACnD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA"}
|
package/dist/index.cjs
CHANGED
|
@@ -13,12 +13,14 @@ var ledgerApiSchema = zod.z.object({
|
|
|
13
13
|
baseUrl: zod.z.string().url()
|
|
14
14
|
});
|
|
15
15
|
var networkSchema = zod.z.object({
|
|
16
|
+
id: zod.z.string(),
|
|
16
17
|
name: zod.z.string(),
|
|
17
|
-
chainId: zod.z.string(),
|
|
18
|
-
synchronizerId: zod.z.string(),
|
|
19
18
|
description: zod.z.string(),
|
|
19
|
+
synchronizerId: zod.z.string(),
|
|
20
|
+
identityProviderId: zod.z.string(),
|
|
20
21
|
ledgerApi: ledgerApiSchema,
|
|
21
|
-
auth: coreWalletAuth.authSchema
|
|
22
|
+
auth: coreWalletAuth.authSchema,
|
|
23
|
+
adminAuth: coreWalletAuth.authSchema.optional()
|
|
22
24
|
});
|
|
23
25
|
var storeConfigSchema = zod.z.object({
|
|
24
26
|
connection: zod.z.discriminatedUnion("type", [
|
|
@@ -38,6 +40,7 @@ var storeConfigSchema = zod.z.object({
|
|
|
38
40
|
database: zod.z.string()
|
|
39
41
|
})
|
|
40
42
|
]),
|
|
43
|
+
idps: zod.z.array(coreWalletAuth.idpSchema),
|
|
41
44
|
networks: zod.z.array(networkSchema)
|
|
42
45
|
});
|
|
43
46
|
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Store.ts","../src/config/schema.ts"],"names":["AddressType","z","authSchema"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"sources":["../src/Store.ts","../src/config/schema.ts"],"names":["AddressType","z","authSchema","idpSchema"],"mappings":";;;;;;AAOO,IAAK,WAAA,qBAAAA,YAAAA,KAAL;AACH,EAAAA,aAAA,cAAA,CAAA,GAAe,cAAA;AACf,EAAAA,aAA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A,MAAE,MAAA;AAAO,KACtB;AAAA,GACJ,CAAA;AAAA,EACD,IAAA,EAAMA,KAAA,CAAE,KAAA,CAAME,wBAAS,CAAA;AAAA,EACvB,QAAA,EAAUF,KAAA,CAAE,KAAA,CAAM,aAAa;AACnC,CAAC","file":"index.cjs","sourcesContent":["// Copyright (c) 2025 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Account\n\nimport { Idp } from '@canton-network/core-wallet-auth'\nimport { Network } from './config/schema'\n\nexport enum AddressType {\n PaperAddress = 'PaperAddress',\n CCSPAddress = 'CCSPAddress',\n}\n\nexport type PartyId = string\n\nexport interface SigningDriver {\n signingDriverId: string\n}\n\nexport interface SigningProvider {\n signingProviderId: string\n privateKey?: string\n addressType: AddressType\n}\n\nexport interface WalletFilter {\n networkIds?: string[]\n signingProviderIds?: string[]\n}\n\nexport interface UpdateWallet {\n status: string\n partyId: string\n}\n\nexport interface Wallet {\n primary: boolean\n partyId: PartyId\n hint: string\n publicKey: string\n namespace: string\n networkId: string\n signingProviderId: string\n externalTxId?: string\n topologyTransactions?: string\n status?: string\n // hosted: [network]\n}\n\n// Session management\n\nexport interface Session {\n network: string\n accessToken: string\n}\n\nexport interface Transaction {\n status: 'pending' | 'signed' | 'executed' | 'failed'\n commandId: string\n preparedTransaction: string\n preparedTransactionHash: string\n payload?: unknown\n}\n\n// Store interface for managing wallets, sessions, networks, and transactions\n\nexport interface Store {\n // Wallet methods\n getWallets(filter?: WalletFilter): Promise<Array<Wallet>>\n getPrimaryWallet(): Promise<Wallet | undefined>\n setPrimaryWallet(partyId: PartyId): Promise<void>\n addWallet(wallet: Wallet): Promise<void>\n updateWallet(params: UpdateWallet): Promise<void>\n removeWallet(partyId: PartyId): Promise<void>\n\n // Session methods\n getSession(): Promise<Session | undefined>\n setSession(session: Session): Promise<void>\n removeSession(): Promise<void>\n\n // IDP methods\n getIdp(idpId: string): Promise<Idp>\n listIdps(): Promise<Array<Idp>>\n updateIdp(idp: Idp): Promise<void>\n addIdp(idp: Idp): Promise<void>\n removeIdp(idpId: string): Promise<void>\n\n // Network methods\n getNetwork(networkId: string): Promise<Network>\n getCurrentNetwork(): Promise<Network>\n listNetworks(): Promise<Array<Network>>\n updateNetwork(network: Network): Promise<void>\n addNetwork(network: Network): Promise<void>\n removeNetwork(networkId: string): Promise<void>\n\n // Transaction methods\n setTransaction(tx: Transaction): Promise<void>\n getTransaction(commandId: string): Promise<Transaction | undefined>\n}\n","// Copyright (c) 2025 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { authSchema, idpSchema } from '@canton-network/core-wallet-auth'\nimport { z } from 'zod'\n\nexport const ledgerApiSchema = z.object({\n baseUrl: z.string().url(),\n})\n\nexport const networkSchema = z.object({\n id: z.string(),\n name: z.string(),\n description: z.string(),\n synchronizerId: z.string(),\n identityProviderId: z.string(),\n ledgerApi: ledgerApiSchema,\n auth: authSchema,\n adminAuth: authSchema.optional(),\n})\n\nexport const storeConfigSchema = z.object({\n connection: z.discriminatedUnion('type', [\n z.object({\n type: z.literal('memory'),\n }),\n z.object({\n type: z.literal('sqlite'),\n database: z.string(),\n }),\n z.object({\n type: z.literal('postgres'),\n host: z.string(),\n port: z.number(),\n user: z.string(),\n password: z.string(),\n database: z.string(),\n }),\n ]),\n idps: z.array(idpSchema),\n networks: z.array(networkSchema),\n})\n\nexport type StoreConfig = z.infer<typeof storeConfigSchema>\nexport type Network = z.infer<typeof networkSchema>\nexport type LedgerApi = z.infer<typeof ledgerApiSchema>\n"]}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { authSchema } from '@canton-network/core-wallet-auth';
|
|
1
|
+
import { authSchema, idpSchema } from '@canton-network/core-wallet-auth';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
// src/Store.ts
|
|
@@ -11,12 +11,14 @@ var ledgerApiSchema = z.object({
|
|
|
11
11
|
baseUrl: z.string().url()
|
|
12
12
|
});
|
|
13
13
|
var networkSchema = z.object({
|
|
14
|
+
id: z.string(),
|
|
14
15
|
name: z.string(),
|
|
15
|
-
chainId: z.string(),
|
|
16
|
-
synchronizerId: z.string(),
|
|
17
16
|
description: z.string(),
|
|
17
|
+
synchronizerId: z.string(),
|
|
18
|
+
identityProviderId: z.string(),
|
|
18
19
|
ledgerApi: ledgerApiSchema,
|
|
19
|
-
auth: authSchema
|
|
20
|
+
auth: authSchema,
|
|
21
|
+
adminAuth: authSchema.optional()
|
|
20
22
|
});
|
|
21
23
|
var storeConfigSchema = z.object({
|
|
22
24
|
connection: z.discriminatedUnion("type", [
|
|
@@ -36,6 +38,7 @@ var storeConfigSchema = z.object({
|
|
|
36
38
|
database: z.string()
|
|
37
39
|
})
|
|
38
40
|
]),
|
|
41
|
+
idps: z.array(idpSchema),
|
|
39
42
|
networks: z.array(networkSchema)
|
|
40
43
|
});
|
|
41
44
|
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Store.ts","../src/config/schema.ts"],"names":["AddressType"],"mappings":";;;;
|
|
1
|
+
{"version":3,"sources":["../src/Store.ts","../src/config/schema.ts"],"names":["AddressType"],"mappings":";;;;AAOO,IAAK,WAAA,qBAAAA,YAAAA,KAAL;AACH,EAAAA,aAAA,cAAA,CAAA,GAAe,cAAA;AACf,EAAAA,aAAA,aAAA,CAAA,GAAc,aAAA;AAFN,EAAA,OAAAA,YAAAA;AAAA,CAAA,EAAA,WAAA,IAAA,EAAA;ACDL,IAAM,eAAA,GAAkB,EAAE,MAAA,CAAO;AAAA,EACpC,OAAA,EAAS,CAAA,CAAE,MAAA,EAAO,CAAE,GAAA;AACxB,CAAC;AAEM,IAAM,aAAA,GAAgB,EAAE,MAAA,CAAO;AAAA,EAClC,EAAA,EAAI,EAAE,MAAA,EAAO;AAAA,EACb,IAAA,EAAM,EAAE,MAAA,EAAO;AAAA,EACf,WAAA,EAAa,EAAE,MAAA,EAAO;AAAA,EACtB,cAAA,EAAgB,EAAE,MAAA,EAAO;AAAA,EACzB,kBAAA,EAAoB,EAAE,MAAA,EAAO;AAAA,EAC7B,SAAA,EAAW,eAAA;AAAA,EACX,IAAA,EAAM,UAAA;AAAA,EACN,SAAA,EAAW,WAAW,QAAA;AAC1B,CAAC;AAEM,IAAM,iBAAA,GAAoB,EAAE,MAAA,CAAO;AAAA,EACtC,UAAA,EAAY,CAAA,CAAE,kBAAA,CAAmB,MAAA,EAAQ;AAAA,IACrC,EAAE,MAAA,CAAO;AAAA,MACL,IAAA,EAAM,CAAA,CAAE,OAAA,CAAQ,QAAQ;AAAA,KAC3B,CAAA;AAAA,IACD,EAAE,MAAA,CAAO;AAAA,MACL,IAAA,EAAM,CAAA,CAAE,OAAA,CAAQ,QAAQ,CAAA;AAAA,MACxB,QAAA,EAAU,EAAE,MAAA;AAAO,KACtB,CAAA;AAAA,IACD,EAAE,MAAA,CAAO;AAAA,MACL,IAAA,EAAM,CAAA,CAAE,OAAA,CAAQ,UAAU,CAAA;AAAA,MAC1B,IAAA,EAAM,EAAE,MAAA,EAAO;AAAA,MACf,IAAA,EAAM,EAAE,MAAA,EAAO;AAAA,MACf,IAAA,EAAM,EAAE,MAAA,EAAO;AAAA,MACf,QAAA,EAAU,EAAE,MAAA,EAAO;AAAA,MACnB,QAAA,EAAU,EAAE,MAAA;AAAO,KACtB;AAAA,GACJ,CAAA;AAAA,EACD,IAAA,EAAM,CAAA,CAAE,KAAA,CAAM,SAAS,CAAA;AAAA,EACvB,QAAA,EAAU,CAAA,CAAE,KAAA,CAAM,aAAa;AACnC,CAAC","file":"index.js","sourcesContent":["// Copyright (c) 2025 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Account\n\nimport { Idp } from '@canton-network/core-wallet-auth'\nimport { Network } from './config/schema'\n\nexport enum AddressType {\n PaperAddress = 'PaperAddress',\n CCSPAddress = 'CCSPAddress',\n}\n\nexport type PartyId = string\n\nexport interface SigningDriver {\n signingDriverId: string\n}\n\nexport interface SigningProvider {\n signingProviderId: string\n privateKey?: string\n addressType: AddressType\n}\n\nexport interface WalletFilter {\n networkIds?: string[]\n signingProviderIds?: string[]\n}\n\nexport interface UpdateWallet {\n status: string\n partyId: string\n}\n\nexport interface Wallet {\n primary: boolean\n partyId: PartyId\n hint: string\n publicKey: string\n namespace: string\n networkId: string\n signingProviderId: string\n externalTxId?: string\n topologyTransactions?: string\n status?: string\n // hosted: [network]\n}\n\n// Session management\n\nexport interface Session {\n network: string\n accessToken: string\n}\n\nexport interface Transaction {\n status: 'pending' | 'signed' | 'executed' | 'failed'\n commandId: string\n preparedTransaction: string\n preparedTransactionHash: string\n payload?: unknown\n}\n\n// Store interface for managing wallets, sessions, networks, and transactions\n\nexport interface Store {\n // Wallet methods\n getWallets(filter?: WalletFilter): Promise<Array<Wallet>>\n getPrimaryWallet(): Promise<Wallet | undefined>\n setPrimaryWallet(partyId: PartyId): Promise<void>\n addWallet(wallet: Wallet): Promise<void>\n updateWallet(params: UpdateWallet): Promise<void>\n removeWallet(partyId: PartyId): Promise<void>\n\n // Session methods\n getSession(): Promise<Session | undefined>\n setSession(session: Session): Promise<void>\n removeSession(): Promise<void>\n\n // IDP methods\n getIdp(idpId: string): Promise<Idp>\n listIdps(): Promise<Array<Idp>>\n updateIdp(idp: Idp): Promise<void>\n addIdp(idp: Idp): Promise<void>\n removeIdp(idpId: string): Promise<void>\n\n // Network methods\n getNetwork(networkId: string): Promise<Network>\n getCurrentNetwork(): Promise<Network>\n listNetworks(): Promise<Array<Network>>\n updateNetwork(network: Network): Promise<void>\n addNetwork(network: Network): Promise<void>\n removeNetwork(networkId: string): Promise<void>\n\n // Transaction methods\n setTransaction(tx: Transaction): Promise<void>\n getTransaction(commandId: string): Promise<Transaction | undefined>\n}\n","// Copyright (c) 2025 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { authSchema, idpSchema } from '@canton-network/core-wallet-auth'\nimport { z } from 'zod'\n\nexport const ledgerApiSchema = z.object({\n baseUrl: z.string().url(),\n})\n\nexport const networkSchema = z.object({\n id: z.string(),\n name: z.string(),\n description: z.string(),\n synchronizerId: z.string(),\n identityProviderId: z.string(),\n ledgerApi: ledgerApiSchema,\n auth: authSchema,\n adminAuth: authSchema.optional(),\n})\n\nexport const storeConfigSchema = z.object({\n connection: z.discriminatedUnion('type', [\n z.object({\n type: z.literal('memory'),\n }),\n z.object({\n type: z.literal('sqlite'),\n database: z.string(),\n }),\n z.object({\n type: z.literal('postgres'),\n host: z.string(),\n port: z.number(),\n user: z.string(),\n password: z.string(),\n database: z.string(),\n }),\n ]),\n idps: z.array(idpSchema),\n networks: z.array(networkSchema),\n})\n\nexport type StoreConfig = z.infer<typeof storeConfigSchema>\nexport type Network = z.infer<typeof networkSchema>\nexport type LedgerApi = z.infer<typeof ledgerApiSchema>\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canton-network/core-wallet-store",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The Store API provides persistency for the Wallet Gateway",
|
|
6
6
|
"repository": "github:hyperledger-labs/splice-wallet-kernel",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"test": "jest --passWithNoTests"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@canton-network/core-wallet-auth": "^0.
|
|
21
|
-
"zod": "^
|
|
20
|
+
"@canton-network/core-wallet-auth": "^0.12.1",
|
|
21
|
+
"zod": "^4.1.12"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@jest/globals": "^29.0.0",
|