@canton-network/core-wallet-store 0.11.0 → 0.12.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/dist/Store.d.ts +4 -3
- package/dist/Store.d.ts.map +1 -1
- package/dist/config/schema.d.ts +29 -559
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/Store.d.ts
CHANGED
|
@@ -18,11 +18,13 @@ export interface WalletFilter {
|
|
|
18
18
|
signingProviderIds?: string[];
|
|
19
19
|
}
|
|
20
20
|
export interface UpdateWallet {
|
|
21
|
-
status:
|
|
22
|
-
partyId:
|
|
21
|
+
status: WalletStatus;
|
|
22
|
+
partyId: PartyId;
|
|
23
23
|
}
|
|
24
|
+
export type WalletStatus = 'initialized' | 'allocated';
|
|
24
25
|
export interface Wallet {
|
|
25
26
|
primary: boolean;
|
|
27
|
+
status: WalletStatus;
|
|
26
28
|
partyId: PartyId;
|
|
27
29
|
hint: string;
|
|
28
30
|
publicKey: string;
|
|
@@ -31,7 +33,6 @@ export interface Wallet {
|
|
|
31
33
|
signingProviderId: string;
|
|
32
34
|
externalTxId?: string;
|
|
33
35
|
topologyTransactions?: string;
|
|
34
|
-
status?: string;
|
|
35
36
|
}
|
|
36
37
|
export interface Session {
|
|
37
38
|
network: string;
|
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,GAAG,EAAE,MAAM,kCAAkC,CAAA;AACtD,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,EA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AI,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAA;IAC/B,SAAS,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAClC,MAAM,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC/B,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAGvC,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAC/C,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC,CAAA;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,11 +1,7 @@
|
|
|
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<{
|
|
10
6
|
id: z.ZodString;
|
|
11
7
|
name: z.ZodString;
|
|
@@ -14,282 +10,70 @@ export declare const networkSchema: z.ZodObject<{
|
|
|
14
10
|
identityProviderId: z.ZodString;
|
|
15
11
|
ledgerApi: z.ZodObject<{
|
|
16
12
|
baseUrl: z.ZodString;
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
}, {
|
|
20
|
-
baseUrl: string;
|
|
21
|
-
}>;
|
|
22
|
-
auth: z.ZodDiscriminatedUnion<"method", [z.ZodObject<{
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
auth: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
23
15
|
method: z.ZodLiteral<"authorization_code">;
|
|
24
16
|
audience: z.ZodString;
|
|
25
17
|
scope: z.ZodString;
|
|
26
18
|
clientId: z.ZodString;
|
|
27
|
-
},
|
|
28
|
-
method: "authorization_code";
|
|
29
|
-
audience: string;
|
|
30
|
-
scope: string;
|
|
31
|
-
clientId: string;
|
|
32
|
-
}, {
|
|
33
|
-
method: "authorization_code";
|
|
34
|
-
audience: string;
|
|
35
|
-
scope: string;
|
|
36
|
-
clientId: string;
|
|
37
|
-
}>, z.ZodObject<{
|
|
19
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
38
20
|
method: z.ZodLiteral<"client_credentials">;
|
|
39
21
|
audience: z.ZodString;
|
|
40
22
|
scope: z.ZodString;
|
|
41
23
|
clientId: z.ZodString;
|
|
42
24
|
clientSecret: z.ZodString;
|
|
43
|
-
},
|
|
44
|
-
method: "client_credentials";
|
|
45
|
-
audience: string;
|
|
46
|
-
scope: string;
|
|
47
|
-
clientId: string;
|
|
48
|
-
clientSecret: string;
|
|
49
|
-
}, {
|
|
50
|
-
method: "client_credentials";
|
|
51
|
-
audience: string;
|
|
52
|
-
scope: string;
|
|
53
|
-
clientId: string;
|
|
54
|
-
clientSecret: string;
|
|
55
|
-
}>, z.ZodObject<{
|
|
25
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
56
26
|
method: z.ZodLiteral<"self_signed">;
|
|
57
27
|
issuer: z.ZodString;
|
|
58
28
|
audience: z.ZodString;
|
|
59
29
|
scope: z.ZodString;
|
|
60
30
|
clientId: z.ZodString;
|
|
61
31
|
clientSecret: z.ZodString;
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
audience: string;
|
|
65
|
-
scope: string;
|
|
66
|
-
clientId: string;
|
|
67
|
-
clientSecret: string;
|
|
68
|
-
issuer: string;
|
|
69
|
-
}, {
|
|
70
|
-
method: "self_signed";
|
|
71
|
-
audience: string;
|
|
72
|
-
scope: string;
|
|
73
|
-
clientId: string;
|
|
74
|
-
clientSecret: string;
|
|
75
|
-
issuer: string;
|
|
76
|
-
}>]>;
|
|
77
|
-
adminAuth: z.ZodOptional<z.ZodDiscriminatedUnion<"method", [z.ZodObject<{
|
|
32
|
+
}, z.core.$strip>], "method">;
|
|
33
|
+
adminAuth: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
78
34
|
method: z.ZodLiteral<"authorization_code">;
|
|
79
35
|
audience: z.ZodString;
|
|
80
36
|
scope: z.ZodString;
|
|
81
37
|
clientId: z.ZodString;
|
|
82
|
-
},
|
|
83
|
-
method: "authorization_code";
|
|
84
|
-
audience: string;
|
|
85
|
-
scope: string;
|
|
86
|
-
clientId: string;
|
|
87
|
-
}, {
|
|
88
|
-
method: "authorization_code";
|
|
89
|
-
audience: string;
|
|
90
|
-
scope: string;
|
|
91
|
-
clientId: string;
|
|
92
|
-
}>, z.ZodObject<{
|
|
38
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
93
39
|
method: z.ZodLiteral<"client_credentials">;
|
|
94
40
|
audience: z.ZodString;
|
|
95
41
|
scope: z.ZodString;
|
|
96
42
|
clientId: z.ZodString;
|
|
97
43
|
clientSecret: z.ZodString;
|
|
98
|
-
},
|
|
99
|
-
method: "client_credentials";
|
|
100
|
-
audience: string;
|
|
101
|
-
scope: string;
|
|
102
|
-
clientId: string;
|
|
103
|
-
clientSecret: string;
|
|
104
|
-
}, {
|
|
105
|
-
method: "client_credentials";
|
|
106
|
-
audience: string;
|
|
107
|
-
scope: string;
|
|
108
|
-
clientId: string;
|
|
109
|
-
clientSecret: string;
|
|
110
|
-
}>, z.ZodObject<{
|
|
44
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
111
45
|
method: z.ZodLiteral<"self_signed">;
|
|
112
46
|
issuer: z.ZodString;
|
|
113
47
|
audience: z.ZodString;
|
|
114
48
|
scope: z.ZodString;
|
|
115
49
|
clientId: z.ZodString;
|
|
116
50
|
clientSecret: z.ZodString;
|
|
117
|
-
},
|
|
118
|
-
|
|
119
|
-
audience: string;
|
|
120
|
-
scope: string;
|
|
121
|
-
clientId: string;
|
|
122
|
-
clientSecret: string;
|
|
123
|
-
issuer: string;
|
|
124
|
-
}, {
|
|
125
|
-
method: "self_signed";
|
|
126
|
-
audience: string;
|
|
127
|
-
scope: string;
|
|
128
|
-
clientId: string;
|
|
129
|
-
clientSecret: string;
|
|
130
|
-
issuer: string;
|
|
131
|
-
}>]>>;
|
|
132
|
-
}, "strip", z.ZodTypeAny, {
|
|
133
|
-
id: string;
|
|
134
|
-
name: string;
|
|
135
|
-
description: string;
|
|
136
|
-
synchronizerId: string;
|
|
137
|
-
identityProviderId: string;
|
|
138
|
-
ledgerApi: {
|
|
139
|
-
baseUrl: string;
|
|
140
|
-
};
|
|
141
|
-
auth: {
|
|
142
|
-
method: "authorization_code";
|
|
143
|
-
audience: string;
|
|
144
|
-
scope: string;
|
|
145
|
-
clientId: string;
|
|
146
|
-
} | {
|
|
147
|
-
method: "client_credentials";
|
|
148
|
-
audience: string;
|
|
149
|
-
scope: string;
|
|
150
|
-
clientId: string;
|
|
151
|
-
clientSecret: string;
|
|
152
|
-
} | {
|
|
153
|
-
method: "self_signed";
|
|
154
|
-
audience: string;
|
|
155
|
-
scope: string;
|
|
156
|
-
clientId: string;
|
|
157
|
-
clientSecret: string;
|
|
158
|
-
issuer: string;
|
|
159
|
-
};
|
|
160
|
-
adminAuth?: {
|
|
161
|
-
method: "authorization_code";
|
|
162
|
-
audience: string;
|
|
163
|
-
scope: string;
|
|
164
|
-
clientId: string;
|
|
165
|
-
} | {
|
|
166
|
-
method: "client_credentials";
|
|
167
|
-
audience: string;
|
|
168
|
-
scope: string;
|
|
169
|
-
clientId: string;
|
|
170
|
-
clientSecret: string;
|
|
171
|
-
} | {
|
|
172
|
-
method: "self_signed";
|
|
173
|
-
audience: string;
|
|
174
|
-
scope: string;
|
|
175
|
-
clientId: string;
|
|
176
|
-
clientSecret: string;
|
|
177
|
-
issuer: string;
|
|
178
|
-
} | undefined;
|
|
179
|
-
}, {
|
|
180
|
-
id: string;
|
|
181
|
-
name: string;
|
|
182
|
-
description: string;
|
|
183
|
-
synchronizerId: string;
|
|
184
|
-
identityProviderId: string;
|
|
185
|
-
ledgerApi: {
|
|
186
|
-
baseUrl: string;
|
|
187
|
-
};
|
|
188
|
-
auth: {
|
|
189
|
-
method: "authorization_code";
|
|
190
|
-
audience: string;
|
|
191
|
-
scope: string;
|
|
192
|
-
clientId: string;
|
|
193
|
-
} | {
|
|
194
|
-
method: "client_credentials";
|
|
195
|
-
audience: string;
|
|
196
|
-
scope: string;
|
|
197
|
-
clientId: string;
|
|
198
|
-
clientSecret: string;
|
|
199
|
-
} | {
|
|
200
|
-
method: "self_signed";
|
|
201
|
-
audience: string;
|
|
202
|
-
scope: string;
|
|
203
|
-
clientId: string;
|
|
204
|
-
clientSecret: string;
|
|
205
|
-
issuer: string;
|
|
206
|
-
};
|
|
207
|
-
adminAuth?: {
|
|
208
|
-
method: "authorization_code";
|
|
209
|
-
audience: string;
|
|
210
|
-
scope: string;
|
|
211
|
-
clientId: string;
|
|
212
|
-
} | {
|
|
213
|
-
method: "client_credentials";
|
|
214
|
-
audience: string;
|
|
215
|
-
scope: string;
|
|
216
|
-
clientId: string;
|
|
217
|
-
clientSecret: string;
|
|
218
|
-
} | {
|
|
219
|
-
method: "self_signed";
|
|
220
|
-
audience: string;
|
|
221
|
-
scope: string;
|
|
222
|
-
clientId: string;
|
|
223
|
-
clientSecret: string;
|
|
224
|
-
issuer: string;
|
|
225
|
-
} | undefined;
|
|
226
|
-
}>;
|
|
51
|
+
}, z.core.$strip>], "method">>;
|
|
52
|
+
}, z.core.$strip>;
|
|
227
53
|
export declare const storeConfigSchema: z.ZodObject<{
|
|
228
|
-
connection: z.ZodDiscriminatedUnion<
|
|
54
|
+
connection: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
229
55
|
type: z.ZodLiteral<"memory">;
|
|
230
|
-
},
|
|
231
|
-
type: "memory";
|
|
232
|
-
}, {
|
|
233
|
-
type: "memory";
|
|
234
|
-
}>, z.ZodObject<{
|
|
56
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
235
57
|
type: z.ZodLiteral<"sqlite">;
|
|
236
58
|
database: z.ZodString;
|
|
237
|
-
},
|
|
238
|
-
type: "sqlite";
|
|
239
|
-
database: string;
|
|
240
|
-
}, {
|
|
241
|
-
type: "sqlite";
|
|
242
|
-
database: string;
|
|
243
|
-
}>, z.ZodObject<{
|
|
59
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
244
60
|
type: z.ZodLiteral<"postgres">;
|
|
245
61
|
host: z.ZodString;
|
|
246
62
|
port: z.ZodNumber;
|
|
247
63
|
user: z.ZodString;
|
|
248
64
|
password: z.ZodString;
|
|
249
65
|
database: z.ZodString;
|
|
250
|
-
},
|
|
251
|
-
|
|
252
|
-
database: string;
|
|
253
|
-
host: string;
|
|
254
|
-
port: number;
|
|
255
|
-
user: string;
|
|
256
|
-
password: string;
|
|
257
|
-
}, {
|
|
258
|
-
type: "postgres";
|
|
259
|
-
database: string;
|
|
260
|
-
host: string;
|
|
261
|
-
port: number;
|
|
262
|
-
user: string;
|
|
263
|
-
password: string;
|
|
264
|
-
}>]>;
|
|
265
|
-
idps: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
66
|
+
}, z.core.$strip>], "type">;
|
|
67
|
+
idps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
266
68
|
id: z.ZodString;
|
|
267
69
|
type: z.ZodLiteral<"self_signed">;
|
|
268
70
|
issuer: z.ZodString;
|
|
269
|
-
},
|
|
270
|
-
type: "self_signed";
|
|
271
|
-
issuer: string;
|
|
272
|
-
id: string;
|
|
273
|
-
}, {
|
|
274
|
-
type: "self_signed";
|
|
275
|
-
issuer: string;
|
|
276
|
-
id: string;
|
|
277
|
-
}>, z.ZodObject<{
|
|
71
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
278
72
|
id: z.ZodString;
|
|
279
73
|
type: z.ZodLiteral<"oauth">;
|
|
280
74
|
issuer: z.ZodString;
|
|
281
75
|
configUrl: z.ZodString;
|
|
282
|
-
},
|
|
283
|
-
type: "oauth";
|
|
284
|
-
issuer: string;
|
|
285
|
-
id: string;
|
|
286
|
-
configUrl: string;
|
|
287
|
-
}, {
|
|
288
|
-
type: "oauth";
|
|
289
|
-
issuer: string;
|
|
290
|
-
id: string;
|
|
291
|
-
configUrl: string;
|
|
292
|
-
}>]>, "many">;
|
|
76
|
+
}, z.core.$strip>], "type">>;
|
|
293
77
|
networks: z.ZodArray<z.ZodObject<{
|
|
294
78
|
id: z.ZodString;
|
|
295
79
|
name: z.ZodString;
|
|
@@ -298,361 +82,47 @@ export declare const storeConfigSchema: z.ZodObject<{
|
|
|
298
82
|
identityProviderId: z.ZodString;
|
|
299
83
|
ledgerApi: z.ZodObject<{
|
|
300
84
|
baseUrl: z.ZodString;
|
|
301
|
-
},
|
|
302
|
-
|
|
303
|
-
}, {
|
|
304
|
-
baseUrl: string;
|
|
305
|
-
}>;
|
|
306
|
-
auth: z.ZodDiscriminatedUnion<"method", [z.ZodObject<{
|
|
85
|
+
}, z.core.$strip>;
|
|
86
|
+
auth: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
307
87
|
method: z.ZodLiteral<"authorization_code">;
|
|
308
88
|
audience: z.ZodString;
|
|
309
89
|
scope: z.ZodString;
|
|
310
90
|
clientId: z.ZodString;
|
|
311
|
-
},
|
|
312
|
-
method: "authorization_code";
|
|
313
|
-
audience: string;
|
|
314
|
-
scope: string;
|
|
315
|
-
clientId: string;
|
|
316
|
-
}, {
|
|
317
|
-
method: "authorization_code";
|
|
318
|
-
audience: string;
|
|
319
|
-
scope: string;
|
|
320
|
-
clientId: string;
|
|
321
|
-
}>, z.ZodObject<{
|
|
91
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
322
92
|
method: z.ZodLiteral<"client_credentials">;
|
|
323
93
|
audience: z.ZodString;
|
|
324
94
|
scope: z.ZodString;
|
|
325
95
|
clientId: z.ZodString;
|
|
326
96
|
clientSecret: z.ZodString;
|
|
327
|
-
},
|
|
328
|
-
method: "client_credentials";
|
|
329
|
-
audience: string;
|
|
330
|
-
scope: string;
|
|
331
|
-
clientId: string;
|
|
332
|
-
clientSecret: string;
|
|
333
|
-
}, {
|
|
334
|
-
method: "client_credentials";
|
|
335
|
-
audience: string;
|
|
336
|
-
scope: string;
|
|
337
|
-
clientId: string;
|
|
338
|
-
clientSecret: string;
|
|
339
|
-
}>, z.ZodObject<{
|
|
97
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
340
98
|
method: z.ZodLiteral<"self_signed">;
|
|
341
99
|
issuer: z.ZodString;
|
|
342
100
|
audience: z.ZodString;
|
|
343
101
|
scope: z.ZodString;
|
|
344
102
|
clientId: z.ZodString;
|
|
345
103
|
clientSecret: z.ZodString;
|
|
346
|
-
},
|
|
347
|
-
|
|
348
|
-
audience: string;
|
|
349
|
-
scope: string;
|
|
350
|
-
clientId: string;
|
|
351
|
-
clientSecret: string;
|
|
352
|
-
issuer: string;
|
|
353
|
-
}, {
|
|
354
|
-
method: "self_signed";
|
|
355
|
-
audience: string;
|
|
356
|
-
scope: string;
|
|
357
|
-
clientId: string;
|
|
358
|
-
clientSecret: string;
|
|
359
|
-
issuer: string;
|
|
360
|
-
}>]>;
|
|
361
|
-
adminAuth: z.ZodOptional<z.ZodDiscriminatedUnion<"method", [z.ZodObject<{
|
|
104
|
+
}, z.core.$strip>], "method">;
|
|
105
|
+
adminAuth: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
362
106
|
method: z.ZodLiteral<"authorization_code">;
|
|
363
107
|
audience: z.ZodString;
|
|
364
108
|
scope: z.ZodString;
|
|
365
109
|
clientId: z.ZodString;
|
|
366
|
-
},
|
|
367
|
-
method: "authorization_code";
|
|
368
|
-
audience: string;
|
|
369
|
-
scope: string;
|
|
370
|
-
clientId: string;
|
|
371
|
-
}, {
|
|
372
|
-
method: "authorization_code";
|
|
373
|
-
audience: string;
|
|
374
|
-
scope: string;
|
|
375
|
-
clientId: string;
|
|
376
|
-
}>, z.ZodObject<{
|
|
110
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
377
111
|
method: z.ZodLiteral<"client_credentials">;
|
|
378
112
|
audience: z.ZodString;
|
|
379
113
|
scope: z.ZodString;
|
|
380
114
|
clientId: z.ZodString;
|
|
381
115
|
clientSecret: z.ZodString;
|
|
382
|
-
},
|
|
383
|
-
method: "client_credentials";
|
|
384
|
-
audience: string;
|
|
385
|
-
scope: string;
|
|
386
|
-
clientId: string;
|
|
387
|
-
clientSecret: string;
|
|
388
|
-
}, {
|
|
389
|
-
method: "client_credentials";
|
|
390
|
-
audience: string;
|
|
391
|
-
scope: string;
|
|
392
|
-
clientId: string;
|
|
393
|
-
clientSecret: string;
|
|
394
|
-
}>, z.ZodObject<{
|
|
116
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
395
117
|
method: z.ZodLiteral<"self_signed">;
|
|
396
118
|
issuer: z.ZodString;
|
|
397
119
|
audience: z.ZodString;
|
|
398
120
|
scope: z.ZodString;
|
|
399
121
|
clientId: z.ZodString;
|
|
400
122
|
clientSecret: z.ZodString;
|
|
401
|
-
},
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
scope: string;
|
|
405
|
-
clientId: string;
|
|
406
|
-
clientSecret: string;
|
|
407
|
-
issuer: string;
|
|
408
|
-
}, {
|
|
409
|
-
method: "self_signed";
|
|
410
|
-
audience: string;
|
|
411
|
-
scope: string;
|
|
412
|
-
clientId: string;
|
|
413
|
-
clientSecret: string;
|
|
414
|
-
issuer: string;
|
|
415
|
-
}>]>>;
|
|
416
|
-
}, "strip", z.ZodTypeAny, {
|
|
417
|
-
id: string;
|
|
418
|
-
name: string;
|
|
419
|
-
description: string;
|
|
420
|
-
synchronizerId: string;
|
|
421
|
-
identityProviderId: string;
|
|
422
|
-
ledgerApi: {
|
|
423
|
-
baseUrl: string;
|
|
424
|
-
};
|
|
425
|
-
auth: {
|
|
426
|
-
method: "authorization_code";
|
|
427
|
-
audience: string;
|
|
428
|
-
scope: string;
|
|
429
|
-
clientId: string;
|
|
430
|
-
} | {
|
|
431
|
-
method: "client_credentials";
|
|
432
|
-
audience: string;
|
|
433
|
-
scope: string;
|
|
434
|
-
clientId: string;
|
|
435
|
-
clientSecret: string;
|
|
436
|
-
} | {
|
|
437
|
-
method: "self_signed";
|
|
438
|
-
audience: string;
|
|
439
|
-
scope: string;
|
|
440
|
-
clientId: string;
|
|
441
|
-
clientSecret: string;
|
|
442
|
-
issuer: string;
|
|
443
|
-
};
|
|
444
|
-
adminAuth?: {
|
|
445
|
-
method: "authorization_code";
|
|
446
|
-
audience: string;
|
|
447
|
-
scope: string;
|
|
448
|
-
clientId: string;
|
|
449
|
-
} | {
|
|
450
|
-
method: "client_credentials";
|
|
451
|
-
audience: string;
|
|
452
|
-
scope: string;
|
|
453
|
-
clientId: string;
|
|
454
|
-
clientSecret: string;
|
|
455
|
-
} | {
|
|
456
|
-
method: "self_signed";
|
|
457
|
-
audience: string;
|
|
458
|
-
scope: string;
|
|
459
|
-
clientId: string;
|
|
460
|
-
clientSecret: string;
|
|
461
|
-
issuer: string;
|
|
462
|
-
} | undefined;
|
|
463
|
-
}, {
|
|
464
|
-
id: string;
|
|
465
|
-
name: string;
|
|
466
|
-
description: string;
|
|
467
|
-
synchronizerId: string;
|
|
468
|
-
identityProviderId: string;
|
|
469
|
-
ledgerApi: {
|
|
470
|
-
baseUrl: string;
|
|
471
|
-
};
|
|
472
|
-
auth: {
|
|
473
|
-
method: "authorization_code";
|
|
474
|
-
audience: string;
|
|
475
|
-
scope: string;
|
|
476
|
-
clientId: string;
|
|
477
|
-
} | {
|
|
478
|
-
method: "client_credentials";
|
|
479
|
-
audience: string;
|
|
480
|
-
scope: string;
|
|
481
|
-
clientId: string;
|
|
482
|
-
clientSecret: string;
|
|
483
|
-
} | {
|
|
484
|
-
method: "self_signed";
|
|
485
|
-
audience: string;
|
|
486
|
-
scope: string;
|
|
487
|
-
clientId: string;
|
|
488
|
-
clientSecret: string;
|
|
489
|
-
issuer: string;
|
|
490
|
-
};
|
|
491
|
-
adminAuth?: {
|
|
492
|
-
method: "authorization_code";
|
|
493
|
-
audience: string;
|
|
494
|
-
scope: string;
|
|
495
|
-
clientId: string;
|
|
496
|
-
} | {
|
|
497
|
-
method: "client_credentials";
|
|
498
|
-
audience: string;
|
|
499
|
-
scope: string;
|
|
500
|
-
clientId: string;
|
|
501
|
-
clientSecret: string;
|
|
502
|
-
} | {
|
|
503
|
-
method: "self_signed";
|
|
504
|
-
audience: string;
|
|
505
|
-
scope: string;
|
|
506
|
-
clientId: string;
|
|
507
|
-
clientSecret: string;
|
|
508
|
-
issuer: string;
|
|
509
|
-
} | undefined;
|
|
510
|
-
}>, "many">;
|
|
511
|
-
}, "strip", z.ZodTypeAny, {
|
|
512
|
-
connection: {
|
|
513
|
-
type: "memory";
|
|
514
|
-
} | {
|
|
515
|
-
type: "sqlite";
|
|
516
|
-
database: string;
|
|
517
|
-
} | {
|
|
518
|
-
type: "postgres";
|
|
519
|
-
database: string;
|
|
520
|
-
host: string;
|
|
521
|
-
port: number;
|
|
522
|
-
user: string;
|
|
523
|
-
password: string;
|
|
524
|
-
};
|
|
525
|
-
idps: ({
|
|
526
|
-
type: "self_signed";
|
|
527
|
-
issuer: string;
|
|
528
|
-
id: string;
|
|
529
|
-
} | {
|
|
530
|
-
type: "oauth";
|
|
531
|
-
issuer: string;
|
|
532
|
-
id: string;
|
|
533
|
-
configUrl: string;
|
|
534
|
-
})[];
|
|
535
|
-
networks: {
|
|
536
|
-
id: string;
|
|
537
|
-
name: string;
|
|
538
|
-
description: string;
|
|
539
|
-
synchronizerId: string;
|
|
540
|
-
identityProviderId: string;
|
|
541
|
-
ledgerApi: {
|
|
542
|
-
baseUrl: string;
|
|
543
|
-
};
|
|
544
|
-
auth: {
|
|
545
|
-
method: "authorization_code";
|
|
546
|
-
audience: string;
|
|
547
|
-
scope: string;
|
|
548
|
-
clientId: string;
|
|
549
|
-
} | {
|
|
550
|
-
method: "client_credentials";
|
|
551
|
-
audience: string;
|
|
552
|
-
scope: string;
|
|
553
|
-
clientId: string;
|
|
554
|
-
clientSecret: string;
|
|
555
|
-
} | {
|
|
556
|
-
method: "self_signed";
|
|
557
|
-
audience: string;
|
|
558
|
-
scope: string;
|
|
559
|
-
clientId: string;
|
|
560
|
-
clientSecret: string;
|
|
561
|
-
issuer: string;
|
|
562
|
-
};
|
|
563
|
-
adminAuth?: {
|
|
564
|
-
method: "authorization_code";
|
|
565
|
-
audience: string;
|
|
566
|
-
scope: string;
|
|
567
|
-
clientId: string;
|
|
568
|
-
} | {
|
|
569
|
-
method: "client_credentials";
|
|
570
|
-
audience: string;
|
|
571
|
-
scope: string;
|
|
572
|
-
clientId: string;
|
|
573
|
-
clientSecret: string;
|
|
574
|
-
} | {
|
|
575
|
-
method: "self_signed";
|
|
576
|
-
audience: string;
|
|
577
|
-
scope: string;
|
|
578
|
-
clientId: string;
|
|
579
|
-
clientSecret: string;
|
|
580
|
-
issuer: string;
|
|
581
|
-
} | undefined;
|
|
582
|
-
}[];
|
|
583
|
-
}, {
|
|
584
|
-
connection: {
|
|
585
|
-
type: "memory";
|
|
586
|
-
} | {
|
|
587
|
-
type: "sqlite";
|
|
588
|
-
database: string;
|
|
589
|
-
} | {
|
|
590
|
-
type: "postgres";
|
|
591
|
-
database: string;
|
|
592
|
-
host: string;
|
|
593
|
-
port: number;
|
|
594
|
-
user: string;
|
|
595
|
-
password: string;
|
|
596
|
-
};
|
|
597
|
-
idps: ({
|
|
598
|
-
type: "self_signed";
|
|
599
|
-
issuer: string;
|
|
600
|
-
id: string;
|
|
601
|
-
} | {
|
|
602
|
-
type: "oauth";
|
|
603
|
-
issuer: string;
|
|
604
|
-
id: string;
|
|
605
|
-
configUrl: string;
|
|
606
|
-
})[];
|
|
607
|
-
networks: {
|
|
608
|
-
id: string;
|
|
609
|
-
name: string;
|
|
610
|
-
description: string;
|
|
611
|
-
synchronizerId: string;
|
|
612
|
-
identityProviderId: string;
|
|
613
|
-
ledgerApi: {
|
|
614
|
-
baseUrl: string;
|
|
615
|
-
};
|
|
616
|
-
auth: {
|
|
617
|
-
method: "authorization_code";
|
|
618
|
-
audience: string;
|
|
619
|
-
scope: string;
|
|
620
|
-
clientId: string;
|
|
621
|
-
} | {
|
|
622
|
-
method: "client_credentials";
|
|
623
|
-
audience: string;
|
|
624
|
-
scope: string;
|
|
625
|
-
clientId: string;
|
|
626
|
-
clientSecret: string;
|
|
627
|
-
} | {
|
|
628
|
-
method: "self_signed";
|
|
629
|
-
audience: string;
|
|
630
|
-
scope: string;
|
|
631
|
-
clientId: string;
|
|
632
|
-
clientSecret: string;
|
|
633
|
-
issuer: string;
|
|
634
|
-
};
|
|
635
|
-
adminAuth?: {
|
|
636
|
-
method: "authorization_code";
|
|
637
|
-
audience: string;
|
|
638
|
-
scope: string;
|
|
639
|
-
clientId: string;
|
|
640
|
-
} | {
|
|
641
|
-
method: "client_credentials";
|
|
642
|
-
audience: string;
|
|
643
|
-
scope: string;
|
|
644
|
-
clientId: string;
|
|
645
|
-
clientSecret: string;
|
|
646
|
-
} | {
|
|
647
|
-
method: "self_signed";
|
|
648
|
-
audience: string;
|
|
649
|
-
scope: string;
|
|
650
|
-
clientId: string;
|
|
651
|
-
clientSecret: string;
|
|
652
|
-
issuer: string;
|
|
653
|
-
} | undefined;
|
|
654
|
-
}[];
|
|
655
|
-
}>;
|
|
123
|
+
}, z.core.$strip>], "method">>;
|
|
124
|
+
}, z.core.$strip>>;
|
|
125
|
+
}, z.core.$strip>;
|
|
656
126
|
export type StoreConfig = z.infer<typeof storeConfigSchema>;
|
|
657
127
|
export type Network = z.infer<typeof networkSchema>;
|
|
658
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.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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,aAA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,MAAE,MAAA,EAAO;AAAA,MACnB,QAAA,EAAUA,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:
|
|
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,aAAA,aAAA,CAAA,GAAc,aAAA;AAFN,EAAA,OAAAA,YAAAA;AAAA,CAAA,EAAA,WAAA,IAAA,EAAA;ACDL,IAAM,eAAA,GAAkBC,MAAE,MAAA,CAAO;AAAA,EACpC,OAAA,EAASA,KAAA,CAAE,MAAA,EAAO,CAAE,GAAA;AACxB,CAAC;AAEM,IAAM,aAAA,GAAgBA,MAAE,MAAA,CAAO;AAAA,EAClC,EAAA,EAAIA,MAAE,MAAA,EAAO;AAAA,EACb,IAAA,EAAMA,MAAE,MAAA,EAAO;AAAA,EACf,WAAA,EAAaA,MAAE,MAAA,EAAO;AAAA,EACtB,cAAA,EAAgBA,MAAE,MAAA,EAAO;AAAA,EACzB,kBAAA,EAAoBA,MAAE,MAAA,EAAO;AAAA,EAC7B,SAAA,EAAW,eAAA;AAAA,EACX,IAAA,EAAMC,yBAAA;AAAA,EACN,SAAA,EAAWA,0BAAW,QAAA;AAC1B,CAAC;AAEM,IAAM,iBAAA,GAAoBD,MAAE,MAAA,CAAO;AAAA,EACtC,UAAA,EAAYA,KAAA,CAAE,kBAAA,CAAmB,MAAA,EAAQ;AAAA,IACrCA,MAAE,MAAA,CAAO;AAAA,MACL,IAAA,EAAMA,KAAA,CAAE,OAAA,CAAQ,QAAQ;AAAA,KAC3B,CAAA;AAAA,IACDA,MAAE,MAAA,CAAO;AAAA,MACL,IAAA,EAAMA,KAAA,CAAE,OAAA,CAAQ,QAAQ,CAAA;AAAA,MACxB,QAAA,EAAUA,MAAE,MAAA;AAAO,KACtB,CAAA;AAAA,IACDA,MAAE,MAAA,CAAO;AAAA,MACL,IAAA,EAAMA,KAAA,CAAE,OAAA,CAAQ,UAAU,CAAA;AAAA,MAC1B,IAAA,EAAMA,MAAE,MAAA,EAAO;AAAA,MACf,IAAA,EAAMA,MAAE,MAAA,EAAO;AAAA,MACf,IAAA,EAAMA,MAAE,MAAA,EAAO;AAAA,MACf,QAAA,EAAUA,MAAE,MAAA,EAAO;AAAA,MACnB,QAAA,EAAUA,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: WalletStatus\n partyId: PartyId\n}\n\nexport type WalletStatus = 'initialized' | 'allocated'\n\nexport interface Wallet {\n primary: boolean\n status: WalletStatus\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 // 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.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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:
|
|
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: WalletStatus\n partyId: PartyId\n}\n\nexport type WalletStatus = 'initialized' | 'allocated'\n\nexport interface Wallet {\n primary: boolean\n status: WalletStatus\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 // 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.12.0",
|
|
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.13.0",
|
|
21
|
+
"zod": "^4.1.12"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@jest/globals": "^29.0.0",
|