@canton-network/wallet-gateway-remote 0.21.0 → 0.22.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 +1 -3
- package/dist/config/Config.d.ts +145 -0
- package/dist/config/Config.d.ts.map +1 -1
- package/dist/config/Config.js +18 -2
- package/dist/config/Config.test.js +3 -0
- package/dist/config/ConfigUtils.d.ts.map +1 -1
- package/dist/config/ConfigUtils.js +41 -2
- package/dist/dapp-api/controller.d.ts.map +1 -1
- package/dist/dapp-api/controller.js +2 -5
- package/dist/env.d.ts +19 -0
- package/dist/env.d.ts.map +1 -0
- package/dist/env.js +16 -0
- package/dist/example-config.d.ts +3 -1
- package/dist/example-config.d.ts.map +1 -1
- package/dist/example-config.js +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +8 -18
- package/dist/ledger/party-allocation-service.d.ts.map +1 -1
- package/dist/ledger/party-allocation-service.js +3 -0
- package/dist/ledger/transaction-service.d.ts +22 -0
- package/dist/ledger/transaction-service.d.ts.map +1 -0
- package/dist/ledger/transaction-service.js +296 -0
- package/dist/user-api/controller.d.ts.map +1 -1
- package/dist/user-api/controller.js +24 -159
- package/dist/user-api/rpc-gen/typings.d.ts +30 -6
- package/dist/user-api/rpc-gen/typings.d.ts.map +1 -1
- package/dist/web/frontend/404/index.html +2 -2
- package/dist/web/frontend/approve/index.html +4 -4
- package/dist/web/frontend/assets/404-DzH9sSlT.js +8 -0
- package/dist/web/frontend/assets/approve-Duv1K5LE.js +17 -0
- package/dist/web/frontend/assets/{callback-Bev8B02C.js → callback-D_VLeaX-.js} +1 -1
- package/dist/web/frontend/assets/index-Bj5VTWmh.js +1686 -0
- package/dist/web/frontend/assets/login-B-jF6DLr.js +7 -0
- package/dist/web/frontend/assets/{settings-laHcyEOv.js → settings-DZpeOwSh.js} +2 -2
- package/dist/web/frontend/assets/{state-BZtCpgb6.js → state-PjJJ3Anb.js} +1 -1
- package/dist/web/frontend/assets/{transactions-n26INLpW.js → transactions-DGdh8VAO.js} +3 -3
- package/dist/web/frontend/assets/{utils-DqekxUsS.js → utils-D5kQDwtZ.js} +1 -1
- package/dist/web/frontend/assets/{wallets-dk9ilN4k.js → wallets-CjjRt-cQ.js} +2 -2
- package/dist/web/frontend/callback/index.html +2 -2
- package/dist/web/frontend/index.html +1 -1
- package/dist/web/frontend/login/index.html +3 -3
- package/dist/web/frontend/settings/index.html +3 -3
- package/dist/web/frontend/transactions/index.html +4 -4
- package/dist/web/frontend/wallets/index.html +4 -4
- package/package.json +20 -19
- package/dist/web/frontend/assets/404-C-OWOQ3D.js +0 -8
- package/dist/web/frontend/assets/approve-CPkaFbuR.js +0 -17
- package/dist/web/frontend/assets/index-CZYV-CqB.js +0 -1679
- package/dist/web/frontend/assets/login-D2fXBXBX.js +0 -7
package/README.md
CHANGED
|
@@ -48,9 +48,7 @@ The JSON-RPC API specs from `api-specs/` are generated into strongly-typed metho
|
|
|
48
48
|
|
|
49
49
|
1. Complete steps 1–3 from the instructions at https://github.com/hyperledger-labs/splice-wallet-kernel/tree/main/core/signing-fireblocks
|
|
50
50
|
|
|
51
|
-
2.
|
|
52
|
-
|
|
53
|
-
3. Create a file named `fireblocks_api.key` at the path `/splice-wallet-kernel/wallet-gateway/remote` and insert your Fireblocks API key into it (get it from `API User (ID)` column in fireblocks api users table). Make sure file doesn't end with new line character.
|
|
51
|
+
2. set the environment variable `FIREBLOCKS_API_KEY` (get it from `API User (ID)` column in fireblocks api users table).
|
|
54
52
|
|
|
55
53
|
## Postgres connection
|
|
56
54
|
|
package/dist/config/Config.d.ts
CHANGED
|
@@ -15,6 +15,150 @@ export declare const serverConfigSchema: z.ZodObject<{
|
|
|
15
15
|
requestRateLimit: z.ZodDefault<z.ZodNumber>;
|
|
16
16
|
admin: z.ZodOptional<z.ZodString>;
|
|
17
17
|
}, z.core.$strip>;
|
|
18
|
+
export declare const rawConfigSchema: z.ZodObject<{
|
|
19
|
+
kernel: z.ZodObject<{
|
|
20
|
+
id: z.ZodString;
|
|
21
|
+
publicUrl: z.ZodOptional<z.ZodString>;
|
|
22
|
+
clientType: z.ZodUnion<readonly [z.ZodLiteral<"browser">, z.ZodLiteral<"desktop">, z.ZodLiteral<"mobile">, z.ZodLiteral<"remote">]>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
server: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodObject<{
|
|
25
|
+
port: z.ZodDefault<z.ZodNumber>;
|
|
26
|
+
dappPath: z.ZodDefault<z.ZodString>;
|
|
27
|
+
userPath: z.ZodDefault<z.ZodString>;
|
|
28
|
+
allowedOrigins: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodString>]>>;
|
|
29
|
+
host: z.ZodOptional<z.ZodString>;
|
|
30
|
+
tls: z.ZodOptional<z.ZodBoolean>;
|
|
31
|
+
requestSizeLimit: z.ZodDefault<z.ZodString>;
|
|
32
|
+
requestRateLimit: z.ZodDefault<z.ZodNumber>;
|
|
33
|
+
admin: z.ZodOptional<z.ZodString>;
|
|
34
|
+
}, z.core.$strip>>;
|
|
35
|
+
store: z.ZodObject<{
|
|
36
|
+
connection: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
37
|
+
type: z.ZodLiteral<"memory">;
|
|
38
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
39
|
+
type: z.ZodLiteral<"sqlite">;
|
|
40
|
+
database: z.ZodString;
|
|
41
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
42
|
+
type: z.ZodLiteral<"postgres">;
|
|
43
|
+
host: z.ZodString;
|
|
44
|
+
port: z.ZodNumber;
|
|
45
|
+
user: z.ZodString;
|
|
46
|
+
password: z.ZodString;
|
|
47
|
+
database: z.ZodString;
|
|
48
|
+
}, z.core.$strip>], "type">;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
signingStore: z.ZodObject<{
|
|
51
|
+
connection: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
52
|
+
type: z.ZodLiteral<"memory">;
|
|
53
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
54
|
+
type: z.ZodLiteral<"sqlite">;
|
|
55
|
+
database: z.ZodString;
|
|
56
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
57
|
+
type: z.ZodLiteral<"postgres">;
|
|
58
|
+
host: z.ZodString;
|
|
59
|
+
port: z.ZodNumber;
|
|
60
|
+
user: z.ZodString;
|
|
61
|
+
password: z.ZodString;
|
|
62
|
+
database: z.ZodString;
|
|
63
|
+
}, z.core.$strip>], "type">;
|
|
64
|
+
}, z.core.$strip>;
|
|
65
|
+
bootstrap: z.ZodObject<{
|
|
66
|
+
idps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
67
|
+
id: z.ZodString;
|
|
68
|
+
type: z.ZodLiteral<"self_signed">;
|
|
69
|
+
issuer: z.ZodString;
|
|
70
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
71
|
+
id: z.ZodString;
|
|
72
|
+
type: z.ZodLiteral<"oauth">;
|
|
73
|
+
issuer: z.ZodString;
|
|
74
|
+
configUrl: z.ZodString;
|
|
75
|
+
}, z.core.$strip>], "type">>;
|
|
76
|
+
networks: z.ZodArray<z.ZodObject<{
|
|
77
|
+
id: z.ZodString;
|
|
78
|
+
name: z.ZodString;
|
|
79
|
+
description: z.ZodString;
|
|
80
|
+
synchronizerId: z.ZodOptional<z.ZodString>;
|
|
81
|
+
identityProviderId: z.ZodString;
|
|
82
|
+
ledgerApi: z.ZodObject<{
|
|
83
|
+
baseUrl: z.ZodString;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
auth: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
86
|
+
method: z.ZodLiteral<"authorization_code">;
|
|
87
|
+
audience: z.ZodString;
|
|
88
|
+
scope: z.ZodString;
|
|
89
|
+
clientId: z.ZodString;
|
|
90
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
91
|
+
method: z.ZodLiteral<"client_credentials">;
|
|
92
|
+
audience: z.ZodString;
|
|
93
|
+
scope: z.ZodString;
|
|
94
|
+
clientId: z.ZodString;
|
|
95
|
+
clientSecret: z.ZodString;
|
|
96
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
97
|
+
method: z.ZodLiteral<"self_signed">;
|
|
98
|
+
issuer: z.ZodString;
|
|
99
|
+
audience: z.ZodString;
|
|
100
|
+
scope: z.ZodString;
|
|
101
|
+
clientId: z.ZodString;
|
|
102
|
+
clientSecret: z.ZodString;
|
|
103
|
+
}, z.core.$strip>], "method">, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
104
|
+
method: z.ZodLiteral<"authorization_code">;
|
|
105
|
+
audience: z.ZodString;
|
|
106
|
+
scope: z.ZodString;
|
|
107
|
+
clientId: z.ZodString;
|
|
108
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
109
|
+
method: z.ZodLiteral<"client_credentials">;
|
|
110
|
+
audience: z.ZodString;
|
|
111
|
+
scope: z.ZodString;
|
|
112
|
+
clientId: z.ZodString;
|
|
113
|
+
clientSecretEnv: z.ZodString;
|
|
114
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
115
|
+
method: z.ZodLiteral<"self_signed">;
|
|
116
|
+
issuer: z.ZodString;
|
|
117
|
+
audience: z.ZodString;
|
|
118
|
+
scope: z.ZodString;
|
|
119
|
+
clientId: z.ZodString;
|
|
120
|
+
clientSecretEnv: z.ZodString;
|
|
121
|
+
}, z.core.$strip>], "method">]>;
|
|
122
|
+
adminAuth: z.ZodOptional<z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
123
|
+
method: z.ZodLiteral<"authorization_code">;
|
|
124
|
+
audience: z.ZodString;
|
|
125
|
+
scope: z.ZodString;
|
|
126
|
+
clientId: z.ZodString;
|
|
127
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
128
|
+
method: z.ZodLiteral<"client_credentials">;
|
|
129
|
+
audience: z.ZodString;
|
|
130
|
+
scope: z.ZodString;
|
|
131
|
+
clientId: z.ZodString;
|
|
132
|
+
clientSecret: z.ZodString;
|
|
133
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
134
|
+
method: z.ZodLiteral<"self_signed">;
|
|
135
|
+
issuer: z.ZodString;
|
|
136
|
+
audience: z.ZodString;
|
|
137
|
+
scope: z.ZodString;
|
|
138
|
+
clientId: z.ZodString;
|
|
139
|
+
clientSecret: z.ZodString;
|
|
140
|
+
}, z.core.$strip>], "method">, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
141
|
+
method: z.ZodLiteral<"authorization_code">;
|
|
142
|
+
audience: z.ZodString;
|
|
143
|
+
scope: z.ZodString;
|
|
144
|
+
clientId: z.ZodString;
|
|
145
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
146
|
+
method: z.ZodLiteral<"client_credentials">;
|
|
147
|
+
audience: z.ZodString;
|
|
148
|
+
scope: z.ZodString;
|
|
149
|
+
clientId: z.ZodString;
|
|
150
|
+
clientSecretEnv: z.ZodString;
|
|
151
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
152
|
+
method: z.ZodLiteral<"self_signed">;
|
|
153
|
+
issuer: z.ZodString;
|
|
154
|
+
audience: z.ZodString;
|
|
155
|
+
scope: z.ZodString;
|
|
156
|
+
clientId: z.ZodString;
|
|
157
|
+
clientSecretEnv: z.ZodString;
|
|
158
|
+
}, z.core.$strip>], "method">]>>;
|
|
159
|
+
}, z.core.$strip>>;
|
|
160
|
+
}, z.core.$strip>;
|
|
161
|
+
}, z.core.$strip>;
|
|
18
162
|
export declare const configSchema: z.ZodObject<{
|
|
19
163
|
kernel: z.ZodObject<{
|
|
20
164
|
id: z.ZodString;
|
|
@@ -125,5 +269,6 @@ export declare const configSchema: z.ZodObject<{
|
|
|
125
269
|
}, z.core.$strip>;
|
|
126
270
|
export type KernelInfo = z.infer<typeof kernelInfoSchema>;
|
|
127
271
|
export type ServerConfig = z.infer<typeof serverConfigSchema>;
|
|
272
|
+
export type RawConfig = z.infer<typeof rawConfigSchema>;
|
|
128
273
|
export type Config = z.infer<typeof configSchema>;
|
|
129
274
|
//# sourceMappingURL=Config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/config/Config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/config/Config.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AASvB,eAAO,MAAM,gBAAgB;;;;iBAY3B,CAAA;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;iBA0C7B,CAAA;AAcF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAM1B,CAAA;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMvB,CAAA;AAEF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AACzD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAC7D,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AACvD,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA"}
|
package/dist/config/Config.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import { storeConfigSchema, bootstrapConfigSchema, } from '@canton-network/core-wallet-store';
|
|
4
|
-
import { storeConfigSchema as signingStoreConfigSchema } from '@canton-network/core-signing-store-sql';
|
|
5
3
|
import { z } from 'zod';
|
|
4
|
+
import { storeConfigSchema, bootstrapConfigSchema, networkSchema, } from '@canton-network/core-wallet-store';
|
|
5
|
+
import { storeConfigSchema as signingStoreConfigSchema } from '@canton-network/core-signing-store-sql';
|
|
6
|
+
import { authFromEnvSchema, authSchema } from '@canton-network/core-wallet-auth';
|
|
6
7
|
export const kernelInfoSchema = z.object({
|
|
7
8
|
id: z.string(),
|
|
8
9
|
publicUrl: z.string().optional().meta({
|
|
@@ -51,6 +52,21 @@ export const serverConfigSchema = z.object({
|
|
|
51
52
|
description: 'The JWT claim (e.g. "sub") identifying the admin user. If set, requests with a matching claim will be granted admin privileges.',
|
|
52
53
|
}),
|
|
53
54
|
});
|
|
55
|
+
const authFromEnvOrConfig = z.union([authSchema, authFromEnvSchema]);
|
|
56
|
+
const bootstrapFromEnv = bootstrapConfigSchema.extend({
|
|
57
|
+
networks: z.array(networkSchema.extend({
|
|
58
|
+
auth: authFromEnvOrConfig,
|
|
59
|
+
adminAuth: authFromEnvOrConfig.optional(),
|
|
60
|
+
})),
|
|
61
|
+
});
|
|
62
|
+
// Includes secrets for networks as env vars, rather than defined explicitly
|
|
63
|
+
export const rawConfigSchema = z.object({
|
|
64
|
+
kernel: kernelInfoSchema,
|
|
65
|
+
server: z.preprocess((val) => val ?? {}, serverConfigSchema),
|
|
66
|
+
store: storeConfigSchema,
|
|
67
|
+
signingStore: signingStoreConfigSchema,
|
|
68
|
+
bootstrap: bootstrapFromEnv,
|
|
69
|
+
});
|
|
54
70
|
export const configSchema = z.object({
|
|
55
71
|
kernel: kernelInfoSchema,
|
|
56
72
|
server: z.preprocess((val) => val ?? {}, serverConfigSchema),
|
|
@@ -13,4 +13,7 @@ test('config from json file', async () => {
|
|
|
13
13
|
if (resp.bootstrap.networks[2].auth.method === 'client_credentials') {
|
|
14
14
|
expect(resp.bootstrap.networks[2].auth.audience).toBe('https://daml.com/jwt/aud/participant/participant1::1220d44fc1c3ba0b5bdf7b956ee71bc94ebe2d23258dc268fdf0824fbaeff2c61424');
|
|
15
15
|
}
|
|
16
|
+
if (resp.bootstrap.networks[4].adminAuth?.method === 'client_credentials') {
|
|
17
|
+
expect(resp.bootstrap.networks[4].adminAuth.clientSecret).toBe('devnet_secret_testval');
|
|
18
|
+
}
|
|
16
19
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigUtils.d.ts","sourceRoot":"","sources":["../../src/config/ConfigUtils.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ConfigUtils.d.ts","sourceRoot":"","sources":["../../src/config/ConfigUtils.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAA8B,MAAM,aAAa,CAAA;AAGhE,qBAAa,WAAW;IACpB,MAAM,CAAC,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;CAsDlD;AA+FD,UAAU,IAAI;IACV,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;CACrB;AAOD,eAAO,MAAM,UAAU,GAAI,QAAQ,MAAM,EAAE,OAAO,MAAM,KAAG,IAa1D,CAAA"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import { readFileSync, existsSync } from 'fs';
|
|
4
|
-
import {
|
|
4
|
+
import { rawConfigSchema } from './Config.js';
|
|
5
|
+
import { Env } from '../env.js';
|
|
5
6
|
export class ConfigUtils {
|
|
6
7
|
static loadConfigFile(filePath) {
|
|
7
8
|
if (existsSync(filePath)) {
|
|
8
|
-
const
|
|
9
|
+
const rawConfig = rawConfigSchema.parse(JSON.parse(readFileSync(filePath, 'utf-8')));
|
|
10
|
+
const config = resolveRawConfig(rawConfig);
|
|
9
11
|
/**
|
|
10
12
|
* Perform extra config validation beyond schema validation.
|
|
11
13
|
* We want to enforce the following constraints:
|
|
@@ -38,6 +40,43 @@ export class ConfigUtils {
|
|
|
38
40
|
}
|
|
39
41
|
}
|
|
40
42
|
}
|
|
43
|
+
// The Wallet Gateway can accept adminAuth secrets from environment variables.
|
|
44
|
+
// However, the store expects strings. This function resolves the config from env vars
|
|
45
|
+
function resolveRawNetworkAuth(n) {
|
|
46
|
+
if (n.method === 'authorization_code') {
|
|
47
|
+
return n;
|
|
48
|
+
}
|
|
49
|
+
if ('clientSecret' in n) {
|
|
50
|
+
return n;
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
const { clientSecretEnv, ...rest } = n;
|
|
54
|
+
const clientSecret = Env.get(clientSecretEnv, { required: true });
|
|
55
|
+
return {
|
|
56
|
+
...rest,
|
|
57
|
+
clientSecret,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function resolveRawConfig(rawConfig) {
|
|
62
|
+
const rawNetworks = rawConfig.bootstrap.networks;
|
|
63
|
+
const networks = rawNetworks.map((n) => {
|
|
64
|
+
return {
|
|
65
|
+
...n,
|
|
66
|
+
auth: resolveRawNetworkAuth(n.auth),
|
|
67
|
+
adminAuth: n.adminAuth
|
|
68
|
+
? resolveRawNetworkAuth(n.adminAuth)
|
|
69
|
+
: undefined,
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
return {
|
|
73
|
+
...rawConfig,
|
|
74
|
+
bootstrap: {
|
|
75
|
+
...rawConfig.bootstrap,
|
|
76
|
+
networks,
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
}
|
|
41
80
|
function hasDuplicateElement(list) {
|
|
42
81
|
let duplicate;
|
|
43
82
|
list.forEach((item, i) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../src/dapp-api/controller.ts"],"names":[],"mappings":"AAGA,OAAO,EAEH,WAAW,EAEd,MAAM,kCAAkC,CAAA;AAWzC,OAAO,EAAE,KAAK,EAAe,MAAM,mCAAmC,CAAA;AAQtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAA;AAC5E,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAI7B,eAAO,MAAM,cAAc,GACvB,YAAY,gBAAgB,EAC5B,SAAS,MAAM,EACf,SAAS,MAAM,EACf,OAAO,KAAK,EACZ,qBAAqB,mBAAmB,EACxC,SAAS,MAAM,EACf,QAAQ,MAAM,GAAG,IAAI,EACrB,UAAU,WAAW;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../src/dapp-api/controller.ts"],"names":[],"mappings":"AAGA,OAAO,EAEH,WAAW,EAEd,MAAM,kCAAkC,CAAA;AAWzC,OAAO,EAAE,KAAK,EAAe,MAAM,mCAAmC,CAAA;AAQtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAA;AAC5E,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAI7B,eAAO,MAAM,cAAc,GACvB,YAAY,gBAAgB,EAC5B,SAAS,MAAM,EACf,SAAS,MAAM,EACf,OAAO,KAAK,EACZ,qBAAqB,mBAAmB,EACxC,SAAS,MAAM,EACf,QAAQ,MAAM,GAAG,IAAI,EACrB,UAAU,WAAW;;;;;;;;;;;;;;CAkRxB,CAAA"}
|
|
@@ -126,10 +126,6 @@ export const dappController = (kernelInfo, dappUrl, userUrl, store, notification
|
|
|
126
126
|
const synchronizerId = network.synchronizerId ??
|
|
127
127
|
(await ledgerClient.getSynchronizerId());
|
|
128
128
|
const response = await prepareSubmission(context.userId, wallet.partyId, synchronizerId, params, ledgerClient);
|
|
129
|
-
//TODO: remove and handle normally when v3_3 is not supported anymore
|
|
130
|
-
const costEstimation = 'costEstimation' in response
|
|
131
|
-
? response.costEstimation
|
|
132
|
-
: undefined;
|
|
133
129
|
const transaction = {
|
|
134
130
|
commandId,
|
|
135
131
|
status: 'pending',
|
|
@@ -145,7 +141,8 @@ export const dappController = (kernelInfo, dappUrl, userUrl, store, notification
|
|
|
145
141
|
userId: context.userId,
|
|
146
142
|
commandId,
|
|
147
143
|
commands: params.commands?.[0],
|
|
148
|
-
confirmationRequestTrafficCostEstimation: costEstimation
|
|
144
|
+
confirmationRequestTrafficCostEstimation: response.costEstimation
|
|
145
|
+
?.confirmationRequestTrafficCostEstimation,
|
|
149
146
|
}, 'prepared transaction traffic estimation');
|
|
150
147
|
store.setTransaction(transaction);
|
|
151
148
|
return {
|
package/dist/env.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare class Env {
|
|
2
|
+
static FIREBLOCKS_API_KEY: () => string | undefined;
|
|
3
|
+
static FIREBLOCKS_SECRET: () => string | undefined;
|
|
4
|
+
static BLOCKDAEMON_API_URL: (fallback: string) => string;
|
|
5
|
+
static BLOCKDAEMON_API_KEY: (fallback: string) => string;
|
|
6
|
+
static get(key: string, options: {
|
|
7
|
+
required?: boolean;
|
|
8
|
+
fallback: string;
|
|
9
|
+
}): string;
|
|
10
|
+
static get(key: string, options: {
|
|
11
|
+
required: true;
|
|
12
|
+
fallback?: string;
|
|
13
|
+
}): string;
|
|
14
|
+
static get(key: string, options?: {
|
|
15
|
+
required?: boolean;
|
|
16
|
+
fallback?: string;
|
|
17
|
+
} | undefined): string | undefined;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=env.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AAGA,qBAAa,GAAG;IACZ,MAAM,CAAC,kBAAkB,2BAAsC;IAC/D,MAAM,CAAC,iBAAiB,2BAAqC;IAC7D,MAAM,CAAC,mBAAmB,GAAI,UAAU,MAAM,YACE;IAChD,MAAM,CAAC,mBAAmB,GAAI,UAAU,MAAM,YACE;IAEhD,MAAM,CAAC,GAAG,CACN,GAAG,EAAE,MAAM,EACX,OAAO,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,GAClD,MAAM;IACT,MAAM,CAAC,GAAG,CACN,GAAG,EAAE,MAAM,EACX,OAAO,EAAE;QAAE,QAAQ,EAAE,IAAI,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,GAC/C,MAAM;IACT,MAAM,CAAC,GAAG,CACN,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,GAChE,MAAM,GAAG,SAAS;CAcxB"}
|
package/dist/env.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
export class Env {
|
|
4
|
+
static { this.FIREBLOCKS_API_KEY = () => Env.get('FIREBLOCKS_API_KEY'); }
|
|
5
|
+
static { this.FIREBLOCKS_SECRET = () => Env.get('FIREBLOCKS_SECRET'); }
|
|
6
|
+
static { this.BLOCKDAEMON_API_URL = (fallback) => Env.get('BLOCKDAEMON_API_URL', { fallback }); }
|
|
7
|
+
static { this.BLOCKDAEMON_API_KEY = (fallback) => Env.get('BLOCKDAEMON_API_KEY', { fallback }); }
|
|
8
|
+
static get(key, options) {
|
|
9
|
+
const { fallback, required } = options || {};
|
|
10
|
+
const value = process.env[key]?.trim() || fallback?.trim();
|
|
11
|
+
if (required && !value) {
|
|
12
|
+
throw new Error(`Required environment variable (${key}) missing.`);
|
|
13
|
+
}
|
|
14
|
+
return value;
|
|
15
|
+
}
|
|
16
|
+
}
|
package/dist/example-config.d.ts
CHANGED
|
@@ -56,6 +56,7 @@ declare const _default: {
|
|
|
56
56
|
audience: string;
|
|
57
57
|
clientId: string;
|
|
58
58
|
clientSecret: string;
|
|
59
|
+
clientSecretEnv?: never;
|
|
59
60
|
};
|
|
60
61
|
ledgerApi: {
|
|
61
62
|
baseUrl: string;
|
|
@@ -78,8 +79,9 @@ declare const _default: {
|
|
|
78
79
|
scope: string;
|
|
79
80
|
audience: string;
|
|
80
81
|
clientId: string;
|
|
81
|
-
|
|
82
|
+
clientSecretEnv: string;
|
|
82
83
|
issuer?: never;
|
|
84
|
+
clientSecret?: never;
|
|
83
85
|
};
|
|
84
86
|
ledgerApi: {
|
|
85
87
|
baseUrl: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"example-config.d.ts","sourceRoot":"","sources":["../src/example-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"example-config.d.ts","sourceRoot":"","sources":["../src/example-config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,wBA6FqB"}
|
package/dist/example-config.js
CHANGED
|
@@ -82,7 +82,7 @@ export default {
|
|
|
82
82
|
scope: 'daml_ledger_api',
|
|
83
83
|
audience: '<REPLACE_PARTICIPANT_AUDIENCE>',
|
|
84
84
|
clientId: '<REPLACE_ADMIN_CLIENT_ID>',
|
|
85
|
-
|
|
85
|
+
clientSecretEnv: 'MY_CLIENT_SECRET_ENV_VAR',
|
|
86
86
|
},
|
|
87
87
|
ledgerApi: {
|
|
88
88
|
baseUrl: 'http://127.0.0.1:2975',
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAiEA,QAAA,MAAM,OAAO;;;;;;CAAiB,CAAA;AAE9B,MAAM,MAAM,UAAU,GAAG,OAAO,OAAO,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
import dotenv from 'dotenv';
|
|
5
|
+
dotenv.config({ quiet: true, path: ['.env', '.env.local'] });
|
|
4
6
|
import { Option, Command } from '@commander-js/extra-typings';
|
|
5
7
|
import { initialize } from './init.js';
|
|
6
8
|
import { createCLI } from '@canton-network/core-wallet-store-sql';
|
|
@@ -8,7 +10,7 @@ import { createCLI as createSigningCLI } from '@canton-network/core-signing-stor
|
|
|
8
10
|
import { ConfigUtils } from './config/ConfigUtils.js';
|
|
9
11
|
import pino from 'pino';
|
|
10
12
|
import z from 'zod';
|
|
11
|
-
import {
|
|
13
|
+
import { rawConfigSchema } from './config/Config.js';
|
|
12
14
|
import exampleConfig from './example-config.js';
|
|
13
15
|
import { GATEWAY_VERSION } from './version.js';
|
|
14
16
|
const program = new Command()
|
|
@@ -24,7 +26,7 @@ const program = new Command()
|
|
|
24
26
|
.default('pretty'))
|
|
25
27
|
.action((opts) => {
|
|
26
28
|
if (opts.configSchema) {
|
|
27
|
-
console.log(JSON.stringify(z.toJSONSchema(
|
|
29
|
+
console.log(JSON.stringify(z.toJSONSchema(rawConfigSchema), null, 2));
|
|
28
30
|
process.exit(0);
|
|
29
31
|
}
|
|
30
32
|
if (opts.configExample) {
|
package/dist/init.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAqB7B,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAyIvC,wBAAsB,UAAU,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAqB7B,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAyIvC,wBAAsB,UAAU,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iBAiIhE"}
|
package/dist/init.js
CHANGED
|
@@ -16,12 +16,12 @@ import express from 'express';
|
|
|
16
16
|
import { jwtAuth } from './middleware/jwtAuth.js';
|
|
17
17
|
import { rateLimiter } from './middleware/rateLimit.js';
|
|
18
18
|
import { deriveUrls } from './config/ConfigUtils.js';
|
|
19
|
-
import { existsSync
|
|
20
|
-
import path from 'path';
|
|
19
|
+
import { existsSync } from 'fs';
|
|
21
20
|
import { GATEWAY_VERSION } from './version.js';
|
|
22
21
|
import { sessionHandler } from './middleware/sessionHandler.js';
|
|
23
22
|
import { NotificationService } from './notification/NotificationService.js';
|
|
24
23
|
import { sql } from 'kysely';
|
|
24
|
+
import { Env } from './env.js';
|
|
25
25
|
let isReady = false;
|
|
26
26
|
async function initializeDatabase(config, logger) {
|
|
27
27
|
logger.info('Checking for database migrations...');
|
|
@@ -137,25 +137,15 @@ export async function initialize(opts, logger) {
|
|
|
137
137
|
const store = await initializeDatabase(config, logger);
|
|
138
138
|
const signingStore = await initializeSigningDatabase(config, logger);
|
|
139
139
|
const authService = jwtAuthService(store, logger);
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
let apiKey;
|
|
144
|
-
let apiSecret;
|
|
145
|
-
if (existsSync(apiPath) && existsSync(secretPath)) {
|
|
146
|
-
apiKey = readFileSync(apiPath, 'utf8');
|
|
147
|
-
apiSecret = readFileSync(secretPath, 'utf8');
|
|
148
|
-
}
|
|
149
|
-
else {
|
|
140
|
+
let apiKey = Env.FIREBLOCKS_API_KEY();
|
|
141
|
+
let apiSecret = Env.FIREBLOCKS_SECRET();
|
|
142
|
+
if (!apiKey || !apiSecret) {
|
|
150
143
|
apiKey = 'missing';
|
|
151
144
|
apiSecret = 'missing';
|
|
152
|
-
logger.warn('Fireblocks
|
|
145
|
+
logger.warn('Fireblocks key files are missing');
|
|
153
146
|
}
|
|
154
147
|
const keyInfo = { apiKey, apiSecret };
|
|
155
148
|
const userApiKeys = new Map([['user', keyInfo]]);
|
|
156
|
-
const blockdaemonApiUrl = process.env.BLOCKDAEMON_API_URL ||
|
|
157
|
-
'http://localhost:5080/api/cwp/canton';
|
|
158
|
-
const blockdaemonApiKey = process.env.BLOCKDAEMON_API_KEY || '';
|
|
159
149
|
const drivers = {
|
|
160
150
|
[SigningProvider.PARTICIPANT]: new ParticipantSigningDriver(),
|
|
161
151
|
[SigningProvider.WALLET_KERNEL]: new InternalSigningDriver(signingStore),
|
|
@@ -164,8 +154,8 @@ export async function initialize(opts, logger) {
|
|
|
164
154
|
userApiKeys,
|
|
165
155
|
}),
|
|
166
156
|
[SigningProvider.BLOCKDAEMON]: new BlockdaemonSigningProvider({
|
|
167
|
-
baseUrl:
|
|
168
|
-
apiKey:
|
|
157
|
+
baseUrl: Env.BLOCKDAEMON_API_URL('http://localhost:5080/api/cwp/canton'),
|
|
158
|
+
apiKey: Env.BLOCKDAEMON_API_KEY(''),
|
|
169
159
|
}),
|
|
170
160
|
};
|
|
171
161
|
const allowedPaths = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"party-allocation-service.d.ts","sourceRoot":"","sources":["../../src/ledger/party-allocation-service.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,2BAA2B,EAE9B,MAAM,oCAAoC,CAAA;AAE3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAA;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAE7B,MAAM,MAAM,cAAc,GAAG;IACzB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,KAAK,WAAW,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;AAEpD;;GAEG;AACH,qBAAa,sBAAsB;IAC/B,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,YAAY,CAAc;IAClC,OAAO,CAAC,cAAc,CAAoB;gBAE9B,EACR,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,MAAM,GACT,EAAE;QACC,cAAc,CAAC,EAAE,MAAM,CAAA;QACvB,mBAAmB,EAAE,mBAAmB,CAAA;QACxC,aAAa,EAAE,MAAM,CAAA;QACrB,MAAM,EAAE,MAAM,CAAA;KACjB;IAUD;;;;OAIG;IACG,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAE1E;;;;;;OAMG;IACG,aAAa,CACf,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,eAAe,EAAE,WAAW,GAC7B,OAAO,CAAC,cAAc,CAAC;IAoB1B;;;OAGG;IACH,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAenD;;;;;OAKG;IACH,0BAA0B,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAsB5D;;;;OAIG;IACG,4BAA4B,CAC9B,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,GAClB,OAAO,CAAC,2BAA2B,CAAC;IAevC;;;;;;OAMG;IACG,+BAA+B,CACjC,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EAAE,EACtB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GACf,OAAO,CAAC,MAAM,CAAC;YAgCJ,qBAAqB;
|
|
1
|
+
{"version":3,"file":"party-allocation-service.d.ts","sourceRoot":"","sources":["../../src/ledger/party-allocation-service.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,2BAA2B,EAE9B,MAAM,oCAAoC,CAAA;AAE3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAA;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAE7B,MAAM,MAAM,cAAc,GAAG;IACzB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,KAAK,WAAW,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;AAEpD;;GAEG;AACH,qBAAa,sBAAsB;IAC/B,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,YAAY,CAAc;IAClC,OAAO,CAAC,cAAc,CAAoB;gBAE9B,EACR,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,MAAM,GACT,EAAE;QACC,cAAc,CAAC,EAAE,MAAM,CAAA;QACvB,mBAAmB,EAAE,mBAAmB,CAAA;QACxC,aAAa,EAAE,MAAM,CAAA;QACrB,MAAM,EAAE,MAAM,CAAA;KACjB;IAUD;;;;OAIG;IACG,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAE1E;;;;;;OAMG;IACG,aAAa,CACf,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,eAAe,EAAE,WAAW,GAC7B,OAAO,CAAC,cAAc,CAAC;IAoB1B;;;OAGG;IACH,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAenD;;;;;OAKG;IACH,0BAA0B,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAsB5D;;;;OAIG;IACG,4BAA4B,CAC9B,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,GAClB,OAAO,CAAC,2BAA2B,CAAC;IAevC;;;;;;OAMG;IACG,+BAA+B,CACjC,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EAAE,EACtB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GACf,OAAO,CAAC,MAAM,CAAC;YAgCJ,qBAAqB;YAoCrB,qBAAqB;CAsCtC"}
|
|
@@ -95,6 +95,9 @@ export class PartyAllocationService {
|
|
|
95
95
|
const res = await this.ledgerClient.postWithRetry('/v2/parties', {
|
|
96
96
|
partyIdHint: hint,
|
|
97
97
|
identityProviderId: '',
|
|
98
|
+
synchronizerId: this.synchronizerId ??
|
|
99
|
+
(await this.ledgerClient.getSynchronizerId()),
|
|
100
|
+
userId,
|
|
98
101
|
});
|
|
99
102
|
if (!res.partyDetails?.party) {
|
|
100
103
|
throw new Error('Failed to allocate party');
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Logger } from 'pino';
|
|
2
|
+
import { LedgerClient } from '@canton-network/core-ledger-client';
|
|
3
|
+
import { Store, Transaction, Wallet, Network } from '@canton-network/core-wallet-store';
|
|
4
|
+
import type { SignResult } from '../user-api/rpc-gen/typings.js';
|
|
5
|
+
import { SigningDriverInterface, SigningProvider } from '@canton-network/core-signing-lib';
|
|
6
|
+
import { ExecuteParams, ExecuteResult, SignParams, SignResultSigned } from '../user-api/rpc-gen/typings.js';
|
|
7
|
+
import { UserId } from '../dapp-api/rpc-gen/typings.js';
|
|
8
|
+
import { Notifier } from '../notification/NotificationService.js';
|
|
9
|
+
export declare class TransactionService {
|
|
10
|
+
private store;
|
|
11
|
+
private logger;
|
|
12
|
+
private signingDrivers;
|
|
13
|
+
private notifier;
|
|
14
|
+
constructor(store: Store, logger: Logger, signingDrivers: Partial<Record<SigningProvider, SigningDriverInterface>> | undefined, notifier: Notifier);
|
|
15
|
+
signWithParticipant(wallet: Wallet): SignResultSigned;
|
|
16
|
+
signWithWalletKernel(userId: UserId, wallet: Wallet, signParams: SignParams): Promise<SignResultSigned>;
|
|
17
|
+
signWithBlockdaemon(userId: UserId, wallet: Wallet, signParams: SignParams): Promise<SignResult>;
|
|
18
|
+
signWithFireblocks(userId: UserId, wallet: Wallet, signParams: SignParams): Promise<SignResult>;
|
|
19
|
+
executeWithParticipant(userId: UserId, executeParams: ExecuteParams, transaction: Transaction, ledgerClient: LedgerClient, network: Network): Promise<ExecuteResult>;
|
|
20
|
+
executeWithExternal(userId: UserId, executeParams: ExecuteParams, transaction: Transaction, ledgerClient: LedgerClient): Promise<ExecuteResult>;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=transaction-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-service.d.ts","sourceRoot":"","sources":["../../src/ledger/transaction-service.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAA;AACjE,OAAO,EACH,KAAK,EACL,WAAW,EACX,MAAM,EACN,OAAO,EACV,MAAM,mCAAmC,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,EAGH,sBAAsB,EACtB,eAAe,EAElB,MAAM,kCAAkC,CAAA;AACzC,OAAO,EACH,aAAa,EACb,aAAa,EACb,UAAU,EACV,gBAAgB,EACnB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAA;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAA;AAYjE,qBAAa,kBAAkB;IAEvB,OAAO,CAAC,KAAK;IACb,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,cAAc;IAGtB,OAAO,CAAC,QAAQ;gBALR,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,OAAO,CAC3B,MAAM,CAAC,eAAe,EAAE,sBAAsB,CAAC,CAClD,YAAK,EACE,QAAQ,EAAE,QAAQ;IAGvB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB;IAS/C,oBAAoB,CAC7B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,GACvB,OAAO,CAAC,gBAAgB,CAAC;IAoDf,mBAAmB,CAC5B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,GACvB,OAAO,CAAC,UAAU,CAAC;IAgGT,kBAAkB,CAC3B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,GACvB,OAAO,CAAC,UAAU,CAAC;IAoGT,sBAAsB,CAC/B,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,aAAa,EAC5B,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,OAAO,GACjB,OAAO,CAAC,aAAa,CAAC;IAqCZ,mBAAmB,CAC5B,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,aAAa,EAC5B,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,GAC3B,OAAO,CAAC,aAAa,CAAC;CAmD5B"}
|