@canton-network/wallet-gateway-remote 0.6.1 → 0.8.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 +11 -1
- package/dist/auth/jwt-auth-service.d.ts.map +1 -1
- package/dist/auth/jwt-auth-service.js +5 -0
- package/dist/auth/jwt-unsafe-auth-service.d.ts.map +1 -1
- package/dist/auth/jwt-unsafe-auth-service.js +5 -0
- package/dist/config/Config.d.ts +1 -1
- package/dist/dapp-api/controller.d.ts.map +1 -1
- package/dist/dapp-api/controller.js +25 -11
- package/dist/dapp-api/rpc-gen/typings.d.ts +102 -12
- package/dist/dapp-api/rpc-gen/typings.d.ts.map +1 -1
- package/dist/example-config.d.ts +82 -0
- package/dist/example-config.d.ts.map +1 -0
- package/dist/example-config.js +84 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -7
- package/dist/ledger/party-allocation-service.d.ts +8 -2
- package/dist/ledger/party-allocation-service.d.ts.map +1 -1
- package/dist/ledger/party-allocation-service.js +9 -6
- package/dist/ledger/party-allocation-service.test.js +6 -1
- package/dist/user-api/controller.d.ts +4 -0
- package/dist/user-api/controller.d.ts.map +1 -1
- package/dist/user-api/controller.js +68 -9
- package/dist/user-api/rpc-gen/index.d.ts +12 -0
- package/dist/user-api/rpc-gen/index.d.ts.map +1 -1
- package/dist/user-api/rpc-gen/index.js +4 -0
- package/dist/user-api/rpc-gen/typings.d.ts +79 -27
- package/dist/user-api/rpc-gen/typings.d.ts.map +1 -1
- package/dist/user-api/server.test.js +8 -5
- package/dist/web/frontend/404/index.html +2 -2
- package/dist/web/frontend/approve/index.html +5 -7
- package/dist/web/frontend/assets/{404-CT3y_TOo.js → 404-CK2XmoLz.js} +3 -3
- package/dist/web/frontend/assets/{approve-aBUJf8IZ.js → approve-C-O7VrUc.js} +14 -8
- package/dist/web/frontend/assets/{callback-F-xYJVy-.js → callback-Bgkm99UY.js} +1 -1
- package/dist/web/frontend/assets/{index-CkNk7mKn.js → index-BVQSWRTn.js} +473 -187
- package/dist/web/frontend/assets/{login-BbI2P4fJ.js → login-FaVg_LJv.js} +3 -3
- package/dist/web/frontend/assets/settings-YzEHE3VQ.js +26 -0
- package/dist/web/frontend/assets/{state-DvPMGcqb.js → state-xH49VD_k.js} +1 -1
- package/dist/web/frontend/assets/{wallets-DC9a3FFG.js → wallets-CsSlR4-u.js} +1 -1
- package/dist/web/frontend/callback/index.html +2 -2
- package/dist/web/frontend/index.html +3 -4
- package/dist/web/frontend/login/index.html +5 -6
- package/dist/web/frontend/{networks → settings}/index.html +6 -8
- package/dist/web/frontend/wallets/index.html +5 -7
- package/package.json +17 -17
- package/dist/web/frontend/assets/handle-errors-C5Ovml71.js +0 -1
- package/dist/web/frontend/assets/networks-amJnI8M-.js +0 -225
|
@@ -74,7 +74,12 @@ describe('PartyAllocationService', () => {
|
|
|
74
74
|
.fn()
|
|
75
75
|
.mockResolvedValue('admin.jwt'),
|
|
76
76
|
};
|
|
77
|
-
service = new pas.PartyAllocationService(
|
|
77
|
+
service = new pas.PartyAllocationService({
|
|
78
|
+
synchronizerId: network.synchronizerId,
|
|
79
|
+
accessTokenProvider: mockAccessTokenProvider,
|
|
80
|
+
httpLedgerUrl: network.ledgerApi.baseUrl,
|
|
81
|
+
logger: mockLogger,
|
|
82
|
+
});
|
|
78
83
|
});
|
|
79
84
|
it('allocates an internal party', async () => {
|
|
80
85
|
mockLedgerGet.mockResolvedValueOnce({ participantId: 'participantid' });
|
|
@@ -9,6 +9,8 @@ export declare const userController: (kernelInfo: KernelInfo, store: Store, noti
|
|
|
9
9
|
addNetwork: import("./rpc-gen/typings.js").AddNetwork;
|
|
10
10
|
removeNetwork: import("./rpc-gen/typings.js").RemoveNetwork;
|
|
11
11
|
listNetworks: import("./rpc-gen/typings.js").ListNetworks;
|
|
12
|
+
addIdp: import("./rpc-gen/typings.js").AddIdp;
|
|
13
|
+
removeIdp: import("./rpc-gen/typings.js").RemoveIdp;
|
|
12
14
|
listIdps: import("./rpc-gen/typings.js").ListIdps;
|
|
13
15
|
createWallet: import("./rpc-gen/typings.js").CreateWallet;
|
|
14
16
|
setPrimaryWallet: import("./rpc-gen/typings.js").SetPrimaryWallet;
|
|
@@ -18,7 +20,9 @@ export declare const userController: (kernelInfo: KernelInfo, store: Store, noti
|
|
|
18
20
|
sign: import("./rpc-gen/typings.js").Sign;
|
|
19
21
|
execute: import("./rpc-gen/typings.js").Execute;
|
|
20
22
|
addSession: import("./rpc-gen/typings.js").AddSession;
|
|
23
|
+
removeSession: import("./rpc-gen/typings.js").RemoveSession;
|
|
21
24
|
listSessions: import("./rpc-gen/typings.js").ListSessions;
|
|
25
|
+
getTransaction: import("./rpc-gen/typings.js").GetTransaction;
|
|
22
26
|
};
|
|
23
27
|
export {};
|
|
24
28
|
//# sourceMappingURL=controller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../src/user-api/controller.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../src/user-api/controller.ts"],"names":[],"mappings":"AAwBA,OAAO,EACH,KAAK,EAIR,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAC7B,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAA;AAC5E,OAAO,EAGH,WAAW,EAId,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,EACH,sBAAsB,EACtB,eAAe,EAClB,MAAM,kCAAkC,CAAA;AASzC,KAAK,uBAAuB,GAAG,OAAO,CAClC,MAAM,CAAC,eAAe,EAAE,sBAAsB,CAAC,CAClD,CAAA;AAED,eAAO,MAAM,cAAc,GACvB,YAAY,UAAU,EACtB,OAAO,KAAK,EACZ,qBAAqB,mBAAmB,EACxC,aAAa,WAAW,GAAG,SAAS,EACpC,SAAS,uBAAuB,EAChC,SAAS,MAAM;;;;;;;;;;;;;;;;;;CAinBlB,CAAA"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
5
5
|
import { LedgerClient } from '@canton-network/core-ledger-client';
|
|
6
6
|
import buildController from './rpc-gen/index.js';
|
|
7
|
-
import { assertConnected, authSchema, AuthTokenProvider, } from '@canton-network/core-wallet-auth';
|
|
7
|
+
import { assertConnected, authSchema, AuthTokenProvider, idpSchema, } from '@canton-network/core-wallet-auth';
|
|
8
8
|
import { SigningProvider, } from '@canton-network/core-signing-lib';
|
|
9
9
|
import { PartyAllocationService, } from '../ledger/party-allocation-service.js';
|
|
10
10
|
import { WalletSyncService } from '../ledger/wallet-sync-service.js';
|
|
@@ -46,6 +46,22 @@ export const userController = (kernelInfo, store, notificationService, authConte
|
|
|
46
46
|
return null;
|
|
47
47
|
},
|
|
48
48
|
listNetworks: async () => Promise.resolve({ networks: await store.listNetworks() }),
|
|
49
|
+
addIdp: async (params) => {
|
|
50
|
+
const validatedIdp = idpSchema.parse(params.idp);
|
|
51
|
+
// TODO: Add an explicit updateIdp method to the User API spec and controller
|
|
52
|
+
const existingIdps = await store.listIdps();
|
|
53
|
+
if (existingIdps.find((n) => n.id === validatedIdp.id)) {
|
|
54
|
+
await store.updateIdp(validatedIdp);
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
await store.addIdp(validatedIdp);
|
|
58
|
+
}
|
|
59
|
+
return null;
|
|
60
|
+
},
|
|
61
|
+
removeIdp: async (params) => {
|
|
62
|
+
await store.removeIdp(params.identityProviderId);
|
|
63
|
+
return null;
|
|
64
|
+
},
|
|
49
65
|
listIdps: async () => Promise.resolve({ idps: await store.listIdps() }),
|
|
50
66
|
createWallet: async (params) => {
|
|
51
67
|
logger.info(`Allocating party with params: ${JSON.stringify(params)}`);
|
|
@@ -58,7 +74,12 @@ export const userController = (kernelInfo, store, notificationService, authConte
|
|
|
58
74
|
}
|
|
59
75
|
const idp = await store.getIdp(network.identityProviderId);
|
|
60
76
|
const tokenProvider = new AuthTokenProvider(idp, network.auth, network.adminAuth, logger);
|
|
61
|
-
const partyAllocator = new PartyAllocationService(
|
|
77
|
+
const partyAllocator = new PartyAllocationService({
|
|
78
|
+
synchronizerId: network.synchronizerId,
|
|
79
|
+
accessTokenProvider: tokenProvider,
|
|
80
|
+
httpLedgerUrl: network.ledgerApi.baseUrl,
|
|
81
|
+
logger,
|
|
82
|
+
});
|
|
62
83
|
const driver = drivers[signingProviderId]?.controller(userId);
|
|
63
84
|
if (!driver) {
|
|
64
85
|
throw new Error(`Signing provider ${signingProviderId} not supported`);
|
|
@@ -94,7 +115,7 @@ export const userController = (kernelInfo, store, notificationService, authConte
|
|
|
94
115
|
if (!key)
|
|
95
116
|
throw new Error('Fireblocks key not found');
|
|
96
117
|
if (signingProviderContext) {
|
|
97
|
-
walletStatus = '
|
|
118
|
+
walletStatus = 'initialized';
|
|
98
119
|
const { signature, status } = await driver.getTransaction({
|
|
99
120
|
userId,
|
|
100
121
|
txId: signingProviderContext.externalTxId,
|
|
@@ -134,7 +155,7 @@ export const userController = (kernelInfo, store, notificationService, authConte
|
|
|
134
155
|
}
|
|
135
156
|
else {
|
|
136
157
|
txId = id;
|
|
137
|
-
walletStatus = '
|
|
158
|
+
walletStatus = 'initialized';
|
|
138
159
|
}
|
|
139
160
|
party = {
|
|
140
161
|
partyId,
|
|
@@ -152,11 +173,11 @@ export const userController = (kernelInfo, store, notificationService, authConte
|
|
|
152
173
|
const wallet = {
|
|
153
174
|
signingProviderId,
|
|
154
175
|
networkId,
|
|
176
|
+
status: walletStatus,
|
|
155
177
|
primary: primary ?? false,
|
|
156
178
|
publicKey: publicKey || partyArgs.namespace,
|
|
157
179
|
externalTxId: txId,
|
|
158
180
|
topologyTransactions: topologyTransactions?.join(', ') ?? '',
|
|
159
|
-
status: walletStatus,
|
|
160
181
|
partyId: partyId !== ''
|
|
161
182
|
? partyId
|
|
162
183
|
: `${partyArgs.hint}::${partyArgs.namespace}`,
|
|
@@ -186,7 +207,7 @@ export const userController = (kernelInfo, store, notificationService, authConte
|
|
|
186
207
|
removeWallet: async (params) => Promise.resolve({}),
|
|
187
208
|
listWallets: async (params) => {
|
|
188
209
|
// TODO: support filters
|
|
189
|
-
return store.getWallets();
|
|
210
|
+
return await store.getWallets();
|
|
190
211
|
},
|
|
191
212
|
sign: async ({ preparedTransaction, preparedTransactionHash, partyId, commandId, }) => {
|
|
192
213
|
const wallets = await store.getWallets();
|
|
@@ -264,6 +285,8 @@ export const userController = (kernelInfo, store, notificationService, authConte
|
|
|
264
285
|
const ledgerClient = new LedgerClient(new URL(network.ledgerApi.baseUrl), logger, false, undefined, userAccessTokenProvider);
|
|
265
286
|
switch (wallet.signingProviderId) {
|
|
266
287
|
case SigningProvider.PARTICIPANT: {
|
|
288
|
+
const synchronizerId = network.synchronizerId ??
|
|
289
|
+
(await ledgerClient.getSynchronizerId());
|
|
267
290
|
// Participant signing provider specific logic can be added here
|
|
268
291
|
const request = {
|
|
269
292
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- because OpenRPC codegen type is incompatible with ledger codegen type
|
|
@@ -273,7 +296,7 @@ export const userController = (kernelInfo, store, notificationService, authConte
|
|
|
273
296
|
actAs: [partyId],
|
|
274
297
|
readAs: [],
|
|
275
298
|
disclosedContracts: [],
|
|
276
|
-
synchronizerId
|
|
299
|
+
synchronizerId,
|
|
277
300
|
packageIdSelectionPreference: [],
|
|
278
301
|
};
|
|
279
302
|
try {
|
|
@@ -363,6 +386,20 @@ export const userController = (kernelInfo, store, notificationService, authConte
|
|
|
363
386
|
throw new Error(`Failed to add session: ${error}`);
|
|
364
387
|
}
|
|
365
388
|
},
|
|
389
|
+
removeSession: async () => {
|
|
390
|
+
logger.info(authContext, 'Removing session');
|
|
391
|
+
const userId = assertConnected(authContext).userId;
|
|
392
|
+
const notifier = notificationService.getNotifier(userId);
|
|
393
|
+
await store.removeSession();
|
|
394
|
+
notifier.emit('statusChanged', {
|
|
395
|
+
kernel: kernelInfo,
|
|
396
|
+
isConnected: false,
|
|
397
|
+
isNetworkConnected: false,
|
|
398
|
+
networkReason: 'Unauthenticated',
|
|
399
|
+
userUrl: 'http://localhost:3030/login/', // TODO: pull user URL from config
|
|
400
|
+
});
|
|
401
|
+
return null;
|
|
402
|
+
},
|
|
366
403
|
listSessions: async () => {
|
|
367
404
|
const session = await store.getSession();
|
|
368
405
|
if (!session) {
|
|
@@ -386,13 +423,35 @@ export const userController = (kernelInfo, store, notificationService, authConte
|
|
|
386
423
|
},
|
|
387
424
|
syncWallets: async function () {
|
|
388
425
|
const network = await store.getCurrentNetwork();
|
|
389
|
-
assertConnected(authContext);
|
|
426
|
+
const { userId } = assertConnected(authContext);
|
|
390
427
|
const userAccessTokenProvider = {
|
|
391
428
|
getUserAccessToken: async () => authContext.accessToken,
|
|
392
429
|
getAdminAccessToken: async () => authContext.accessToken,
|
|
393
430
|
};
|
|
394
431
|
const service = new WalletSyncService(store, new LedgerClient(new URL(network.ledgerApi.baseUrl), logger, false, undefined, userAccessTokenProvider), authContext, logger);
|
|
395
|
-
|
|
432
|
+
const result = await service.syncWallets();
|
|
433
|
+
if (result.added.length === 0 && result.removed.length === 0) {
|
|
434
|
+
return result;
|
|
435
|
+
}
|
|
436
|
+
const notifier = notificationService.getNotifier(userId);
|
|
437
|
+
const wallets = await store.getWallets();
|
|
438
|
+
notifier?.emit('accountsChanged', wallets);
|
|
439
|
+
return result;
|
|
440
|
+
},
|
|
441
|
+
getTransaction: async (params) => {
|
|
442
|
+
const transaction = await store.getTransaction(params.commandId);
|
|
443
|
+
if (!transaction) {
|
|
444
|
+
throw new Error(`Transaction not found with commandId: ${params.commandId}`);
|
|
445
|
+
}
|
|
446
|
+
return {
|
|
447
|
+
commandId: transaction.commandId,
|
|
448
|
+
status: transaction.status,
|
|
449
|
+
preparedTransaction: transaction.preparedTransaction,
|
|
450
|
+
preparedTransactionHash: transaction.preparedTransactionHash,
|
|
451
|
+
payload: transaction.payload
|
|
452
|
+
? JSON.stringify(transaction.payload)
|
|
453
|
+
: '',
|
|
454
|
+
};
|
|
396
455
|
},
|
|
397
456
|
});
|
|
398
457
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { AddNetwork } from './typings.js';
|
|
2
2
|
import { RemoveNetwork } from './typings.js';
|
|
3
3
|
import { ListNetworks } from './typings.js';
|
|
4
|
+
import { AddIdp } from './typings.js';
|
|
5
|
+
import { RemoveIdp } from './typings.js';
|
|
4
6
|
import { ListIdps } from './typings.js';
|
|
5
7
|
import { CreateWallet } from './typings.js';
|
|
6
8
|
import { SetPrimaryWallet } from './typings.js';
|
|
@@ -10,11 +12,15 @@ import { SyncWallets } from './typings.js';
|
|
|
10
12
|
import { Sign } from './typings.js';
|
|
11
13
|
import { Execute } from './typings.js';
|
|
12
14
|
import { AddSession } from './typings.js';
|
|
15
|
+
import { RemoveSession } from './typings.js';
|
|
13
16
|
import { ListSessions } from './typings.js';
|
|
17
|
+
import { GetTransaction } from './typings.js';
|
|
14
18
|
export type Methods = {
|
|
15
19
|
addNetwork: AddNetwork;
|
|
16
20
|
removeNetwork: RemoveNetwork;
|
|
17
21
|
listNetworks: ListNetworks;
|
|
22
|
+
addIdp: AddIdp;
|
|
23
|
+
removeIdp: RemoveIdp;
|
|
18
24
|
listIdps: ListIdps;
|
|
19
25
|
createWallet: CreateWallet;
|
|
20
26
|
setPrimaryWallet: SetPrimaryWallet;
|
|
@@ -24,12 +30,16 @@ export type Methods = {
|
|
|
24
30
|
sign: Sign;
|
|
25
31
|
execute: Execute;
|
|
26
32
|
addSession: AddSession;
|
|
33
|
+
removeSession: RemoveSession;
|
|
27
34
|
listSessions: ListSessions;
|
|
35
|
+
getTransaction: GetTransaction;
|
|
28
36
|
};
|
|
29
37
|
declare function buildController(methods: Methods): {
|
|
30
38
|
addNetwork: AddNetwork;
|
|
31
39
|
removeNetwork: RemoveNetwork;
|
|
32
40
|
listNetworks: ListNetworks;
|
|
41
|
+
addIdp: AddIdp;
|
|
42
|
+
removeIdp: RemoveIdp;
|
|
33
43
|
listIdps: ListIdps;
|
|
34
44
|
createWallet: CreateWallet;
|
|
35
45
|
setPrimaryWallet: SetPrimaryWallet;
|
|
@@ -39,7 +49,9 @@ declare function buildController(methods: Methods): {
|
|
|
39
49
|
sign: Sign;
|
|
40
50
|
execute: Execute;
|
|
41
51
|
addSession: AddSession;
|
|
52
|
+
removeSession: RemoveSession;
|
|
42
53
|
listSessions: ListSessions;
|
|
54
|
+
getTransaction: GetTransaction;
|
|
43
55
|
};
|
|
44
56
|
export default buildController;
|
|
45
57
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/user-api/rpc-gen/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"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AAW,CAAA;IACxB,WAAW,EAAE,WAAW,CAAA;IACxB,IAAI,EAAE,IAAI,CAAA;IACV,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,EAAE,UAAU,CAAA;IACtB,aAAa,EAAE,aAAa,CAAA;IAC5B,YAAY,EAAE,YAAY,CAAA;IAC1B,cAAc,EAAE,cAAc,CAAA;CACjC,CAAA;AAED,iBAAS,eAAe,CAAC,OAAO,EAAE,OAAO;;;;;;;;;;;;;;;;;;EAoBxC;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -5,6 +5,8 @@ function buildController(methods) {
|
|
|
5
5
|
addNetwork: methods.addNetwork,
|
|
6
6
|
removeNetwork: methods.removeNetwork,
|
|
7
7
|
listNetworks: methods.listNetworks,
|
|
8
|
+
addIdp: methods.addIdp,
|
|
9
|
+
removeIdp: methods.removeIdp,
|
|
8
10
|
listIdps: methods.listIdps,
|
|
9
11
|
createWallet: methods.createWallet,
|
|
10
12
|
setPrimaryWallet: methods.setPrimaryWallet,
|
|
@@ -14,7 +16,9 @@ function buildController(methods) {
|
|
|
14
16
|
sign: methods.sign,
|
|
15
17
|
execute: methods.execute,
|
|
16
18
|
addSession: methods.addSession,
|
|
19
|
+
removeSession: methods.removeSession,
|
|
17
20
|
listSessions: methods.listSessions,
|
|
21
|
+
getTransaction: methods.getTransaction,
|
|
18
22
|
};
|
|
19
23
|
}
|
|
20
24
|
export default buildController;
|
|
@@ -62,7 +62,7 @@ export interface Network {
|
|
|
62
62
|
id: NetworkId;
|
|
63
63
|
name: Name;
|
|
64
64
|
description: Description;
|
|
65
|
-
synchronizerId
|
|
65
|
+
synchronizerId?: SynchronizerId;
|
|
66
66
|
identityProviderId: IdentityProviderId;
|
|
67
67
|
auth: Auth;
|
|
68
68
|
adminAuth?: Auth;
|
|
@@ -74,6 +74,35 @@ export interface Network {
|
|
|
74
74
|
*
|
|
75
75
|
*/
|
|
76
76
|
export type NetworkName = string;
|
|
77
|
+
/**
|
|
78
|
+
*
|
|
79
|
+
* ID of the identity provider
|
|
80
|
+
*
|
|
81
|
+
*/
|
|
82
|
+
export type Id = string;
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
* Type of identity provider (oauth / self_signed)
|
|
86
|
+
*
|
|
87
|
+
*/
|
|
88
|
+
export type Type = any;
|
|
89
|
+
/**
|
|
90
|
+
*
|
|
91
|
+
* The configuration URL for the identity provider.
|
|
92
|
+
*
|
|
93
|
+
*/
|
|
94
|
+
export type ConfigUrl = string;
|
|
95
|
+
/**
|
|
96
|
+
*
|
|
97
|
+
* Structure representing the Identity Providers
|
|
98
|
+
*
|
|
99
|
+
*/
|
|
100
|
+
export interface Idp {
|
|
101
|
+
id: Id;
|
|
102
|
+
type: Type;
|
|
103
|
+
issuer: Issuer;
|
|
104
|
+
configUrl?: ConfigUrl;
|
|
105
|
+
}
|
|
77
106
|
/**
|
|
78
107
|
*
|
|
79
108
|
* Set as primary wallet for dApp usage.
|
|
@@ -145,47 +174,34 @@ export interface WalletFilter {
|
|
|
145
174
|
signingProviderIds?: SigningProviderIds;
|
|
146
175
|
[k: string]: any;
|
|
147
176
|
}
|
|
148
|
-
export type PreparedTransaction = string;
|
|
149
|
-
export type PreparedTransactionHash = string;
|
|
150
177
|
/**
|
|
151
178
|
*
|
|
152
|
-
* The
|
|
179
|
+
* The transaction data corresponding to the command ID.
|
|
153
180
|
*
|
|
154
181
|
*/
|
|
155
|
-
export type
|
|
156
|
-
export type Signature = string;
|
|
157
|
-
export type SignedBy = string;
|
|
158
|
-
export type Networks = Network[];
|
|
159
|
-
/**
|
|
160
|
-
*
|
|
161
|
-
* ID of the identity provider
|
|
162
|
-
*
|
|
163
|
-
*/
|
|
164
|
-
export type Id = string;
|
|
182
|
+
export type PreparedTransaction = string;
|
|
165
183
|
/**
|
|
166
184
|
*
|
|
167
|
-
*
|
|
185
|
+
* The hash of the prepared transaction.
|
|
168
186
|
*
|
|
169
187
|
*/
|
|
170
|
-
export type
|
|
188
|
+
export type PreparedTransactionHash = string;
|
|
171
189
|
/**
|
|
172
190
|
*
|
|
173
|
-
*
|
|
191
|
+
* The unique identifier of the command associated with the transaction.
|
|
174
192
|
*
|
|
175
193
|
*/
|
|
176
|
-
export type
|
|
194
|
+
export type CommandId = string;
|
|
195
|
+
export type Signature = string;
|
|
196
|
+
export type SignedBy = string;
|
|
197
|
+
export type Networks = Network[];
|
|
198
|
+
export type Idps = Idp[];
|
|
177
199
|
/**
|
|
178
200
|
*
|
|
179
|
-
*
|
|
201
|
+
* The status of the wallet.
|
|
180
202
|
*
|
|
181
203
|
*/
|
|
182
|
-
export
|
|
183
|
-
id: Id;
|
|
184
|
-
type: Type;
|
|
185
|
-
issuer: Issuer;
|
|
186
|
-
configUrl?: ConfigUrl;
|
|
187
|
-
}
|
|
188
|
-
export type Idps = Idp[];
|
|
204
|
+
export type WalletStatus = 'initialized' | 'allocated';
|
|
189
205
|
/**
|
|
190
206
|
*
|
|
191
207
|
* The party hint and name of the wallet.
|
|
@@ -206,6 +222,7 @@ export type PublicKey = string;
|
|
|
206
222
|
export interface Wallet {
|
|
207
223
|
primary: Primary;
|
|
208
224
|
partyId: PartyId;
|
|
225
|
+
status: WalletStatus;
|
|
209
226
|
hint: Hint;
|
|
210
227
|
publicKey: PublicKey;
|
|
211
228
|
namespace: Namespace;
|
|
@@ -223,7 +240,12 @@ export type Removed = Wallet[];
|
|
|
223
240
|
*
|
|
224
241
|
*/
|
|
225
242
|
export type AccessToken = string;
|
|
226
|
-
|
|
243
|
+
/**
|
|
244
|
+
*
|
|
245
|
+
* The status of the transaction.
|
|
246
|
+
*
|
|
247
|
+
*/
|
|
248
|
+
export type Status = string;
|
|
227
249
|
/**
|
|
228
250
|
*
|
|
229
251
|
* The reason for the current status.
|
|
@@ -242,6 +264,12 @@ export interface Session {
|
|
|
242
264
|
reason?: Reason;
|
|
243
265
|
}
|
|
244
266
|
export type Sessions = Session[];
|
|
267
|
+
/**
|
|
268
|
+
*
|
|
269
|
+
* Optional payload associated with the transaction.
|
|
270
|
+
*
|
|
271
|
+
*/
|
|
272
|
+
export type Payload = string;
|
|
245
273
|
export interface AddNetworkParams {
|
|
246
274
|
network: Network;
|
|
247
275
|
[k: string]: any;
|
|
@@ -250,6 +278,14 @@ export interface RemoveNetworkParams {
|
|
|
250
278
|
networkName: NetworkName;
|
|
251
279
|
[k: string]: any;
|
|
252
280
|
}
|
|
281
|
+
export interface AddIdpParams {
|
|
282
|
+
idp: Idp;
|
|
283
|
+
[k: string]: any;
|
|
284
|
+
}
|
|
285
|
+
export interface RemoveIdpParams {
|
|
286
|
+
identityProviderId: IdentityProviderId;
|
|
287
|
+
[k: string]: any;
|
|
288
|
+
}
|
|
253
289
|
export interface CreateWalletParams {
|
|
254
290
|
primary?: Primary;
|
|
255
291
|
partyHint: PartyHint;
|
|
@@ -288,6 +324,10 @@ export interface AddSessionParams {
|
|
|
288
324
|
networkId: NetworkId;
|
|
289
325
|
[k: string]: any;
|
|
290
326
|
}
|
|
327
|
+
export interface GetTransactionParams {
|
|
328
|
+
commandId: CommandId;
|
|
329
|
+
[k: string]: any;
|
|
330
|
+
}
|
|
291
331
|
/**
|
|
292
332
|
*
|
|
293
333
|
* Represents a null value, used in responses where no data is returned.
|
|
@@ -349,6 +389,14 @@ export interface ListSessionsResult {
|
|
|
349
389
|
sessions: Sessions;
|
|
350
390
|
[k: string]: any;
|
|
351
391
|
}
|
|
392
|
+
export interface GetTransactionResult {
|
|
393
|
+
commandId: CommandId;
|
|
394
|
+
status: Status;
|
|
395
|
+
preparedTransaction: PreparedTransaction;
|
|
396
|
+
preparedTransactionHash: PreparedTransactionHash;
|
|
397
|
+
payload?: Payload;
|
|
398
|
+
[k: string]: any;
|
|
399
|
+
}
|
|
352
400
|
/**
|
|
353
401
|
*
|
|
354
402
|
* Generated! Represents an alias to any of the provided schemas
|
|
@@ -357,6 +405,8 @@ export interface ListSessionsResult {
|
|
|
357
405
|
export type AddNetwork = (params: AddNetworkParams) => Promise<Null>;
|
|
358
406
|
export type RemoveNetwork = (params: RemoveNetworkParams) => Promise<Null>;
|
|
359
407
|
export type ListNetworks = () => Promise<ListNetworksResult>;
|
|
408
|
+
export type AddIdp = (params: AddIdpParams) => Promise<Null>;
|
|
409
|
+
export type RemoveIdp = (params: RemoveIdpParams) => Promise<Null>;
|
|
360
410
|
export type ListIdps = () => Promise<ListIdpsResult>;
|
|
361
411
|
export type CreateWallet = (params: CreateWalletParams) => Promise<CreateWalletResult>;
|
|
362
412
|
export type SetPrimaryWallet = (params: SetPrimaryWalletParams) => Promise<Null>;
|
|
@@ -366,5 +416,7 @@ export type SyncWallets = () => Promise<SyncWalletsResult>;
|
|
|
366
416
|
export type Sign = (params: SignParams) => Promise<SignResult>;
|
|
367
417
|
export type Execute = (params: ExecuteParams) => Promise<ExecuteResult>;
|
|
368
418
|
export type AddSession = (params: AddSessionParams) => Promise<AddSessionResult>;
|
|
419
|
+
export type RemoveSession = () => Promise<Null>;
|
|
369
420
|
export type ListSessions = () => Promise<ListSessionsResult>;
|
|
421
|
+
export type GetTransaction = (params: GetTransactionParams) => Promise<GetTransactionResult>;
|
|
370
422
|
//# sourceMappingURL=typings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typings.d.ts","sourceRoot":"","sources":["../../../src/user-api/rpc-gen/typings.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAA;AAC9B;;;;GAIG;AACH,MAAM,MAAM,IAAI,GAAG,MAAM,CAAA;AACzB;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAA;AAChC;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAA;AACnC;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAA;AACvC,MAAM,MAAM,MAAM,GAAG,MAAM,CAAA;AAC3B,MAAM,MAAM,KAAK,GAAG,MAAM,CAAA;AAC1B,MAAM,MAAM,QAAQ,GAAG,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iB,KACxB,OAAO,CAAC,iBAAiB,CAAC,CAAA;AAC/B,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC,iBAAiB,CAAC,CAAA;AAC1D,MAAM,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,UAAU,CAAC,CAAA;AAC9D,MAAM,MAAM,OAAO,GAAG,CAAC,MAAM,EAAE,aAAa,KAAK,OAAO,CAAC,aAAa,CAAC,CAAA;AACvE,MAAM,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,gBAAgB,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAA;AAChF,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;AAC/C,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,kBAAkB,CAAC,CAAA;AAC5D,MAAM,MAAM,cAAc,GAAG,CACzB,MAAM,EAAE,oBAAoB,KAC3B,OAAO,CAAC,oBAAoB,CAAC,CAAA"}
|
|
@@ -30,9 +30,12 @@ test('call listNetworks rpc', async () => {
|
|
|
30
30
|
.set('Accept', 'application/json');
|
|
31
31
|
const json = await response.body.result;
|
|
32
32
|
expect(response.statusCode).toBe(200);
|
|
33
|
-
expect(json.networks.length).toBe(
|
|
34
|
-
expect(json.networks
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
expect(json.networks.length).toBe(5);
|
|
34
|
+
expect(json.networks.map((n) => n.name)).toStrictEqual([
|
|
35
|
+
'Local (OAuth IDP)',
|
|
36
|
+
'Local (OAuth IDP - Client Credentials)',
|
|
37
|
+
'Local (Self signed)',
|
|
38
|
+
'Devnet (Auth0)',
|
|
39
|
+
'LocalNet',
|
|
40
|
+
]);
|
|
38
41
|
});
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<title>Wallet Kernel - Not found</title>
|
|
6
|
-
<script type="module" crossorigin src="/assets/404-
|
|
7
|
-
<link rel="modulepreload" crossorigin href="/assets/index-
|
|
6
|
+
<script type="module" crossorigin src="/assets/404-CK2XmoLz.js"></script>
|
|
7
|
+
<link rel="modulepreload" crossorigin href="/assets/index-BVQSWRTn.js">
|
|
8
8
|
<link rel="stylesheet" crossorigin href="/assets/index-HEe9--Xd.css">
|
|
9
9
|
</head>
|
|
10
10
|
|
|
@@ -3,17 +3,15 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<title>Wallet Kernel - Approve Write Request</title>
|
|
6
|
-
<script type="module" crossorigin src="/assets/approve-
|
|
7
|
-
<link rel="modulepreload" crossorigin href="/assets/index-
|
|
8
|
-
<link rel="modulepreload" crossorigin href="/assets/state-
|
|
9
|
-
<link rel="modulepreload" crossorigin href="/assets/handle-errors-C5Ovml71.js">
|
|
6
|
+
<script type="module" crossorigin src="/assets/approve-C-O7VrUc.js"></script>
|
|
7
|
+
<link rel="modulepreload" crossorigin href="/assets/index-BVQSWRTn.js">
|
|
8
|
+
<link rel="modulepreload" crossorigin href="/assets/state-xH49VD_k.js">
|
|
10
9
|
<link rel="stylesheet" crossorigin href="/assets/index-HEe9--Xd.css">
|
|
11
10
|
</head>
|
|
12
11
|
|
|
13
12
|
<body>
|
|
14
|
-
<app
|
|
15
|
-
<user-ui-auth-redirect></user-ui-auth-redirect>
|
|
13
|
+
<user-app>
|
|
16
14
|
<user-ui-approve></user-ui-approve>
|
|
17
|
-
</app
|
|
15
|
+
</user-app>
|
|
18
16
|
</body>
|
|
19
17
|
</html>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{i as k,a as z,x as O,t as P}from"./index-
|
|
1
|
+
import{i as k,a as z,x as O,t as P}from"./index-BVQSWRTn.js";var C=Object.create,s=Object.defineProperty,E=Object.getOwnPropertyDescriptor,b=(r,e)=>(e=Symbol[r])?e:Symbol.for("Symbol."+r),h=r=>{throw TypeError(r)},I=(r,e,a)=>e in r?s(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a,j=(r,e)=>s(r,"name",{value:e,configurable:!0}),A=r=>[,,,C((r==null?void 0:r[b("metadata")])??null)],D=["class","method","getter","setter","accessor","field","value","get","set"],w=r=>r!==void 0&&typeof r!="function"?h("Function expected"):r,F=(r,e,a,n,t)=>({kind:D[r],name:e,metadata:n,addInitializer:o=>a._?h("Already initialized"):t.push(w(o||null))}),M=(r,e)=>I(e,b("metadata"),r[3]),N=(r,e,a,n)=>{for(var t=0,o=r[e>>1],i=o&&o.length;t<i;t++)o[t].call(a);return n},T=(r,e,a,n,t,o)=>{var i,u,f,l=e&7,m=!1,x=0,g=r[x]||(r[x]=[]),c=l&&(t=t.prototype,l<5&&(l>3||!m)&&E(t,a));j(t,a);for(var _=n.length-1;_>=0;_--)f=F(l,a,u={},r[3],g),i=(0,n[_])(t,f),u._=1,w(i)&&(t=i);return M(r,t),c&&s(t,a,c),m?l^4?o:c:t},y,v,S;y=[P("user-ui-404")];const p=class p extends(S=k){connectedCallback(){super.connectedCallback()}render(){return O`
|
|
2
2
|
<div class="wrapper">
|
|
3
|
-
<not-found
|
|
3
|
+
<not-found href="/"></not-found>
|
|
4
4
|
</div>
|
|
5
5
|
`}};p.styles=z`
|
|
6
6
|
:host {
|
|
@@ -13,4 +13,4 @@ import{i as k,a as z,x as O,t as P}from"./index-CkNk7mKn.js";var C=Object.create
|
|
|
13
13
|
color: var(--text-color, #222);
|
|
14
14
|
padding: 20px;
|
|
15
15
|
}
|
|
16
|
-
`;let
|
|
16
|
+
`;let d=p;v=A(S);d=T(v,0,"ApproveUi",y,d);N(v,1,d);
|