@fairmint/canton-node-sdk 0.0.89 → 0.0.91
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/build/src/clients/ledger-json-api/LedgerJsonApiClient.generated.d.ts +9 -0
- package/build/src/clients/ledger-json-api/LedgerJsonApiClient.generated.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/LedgerJsonApiClient.generated.js +8 -0
- package/build/src/clients/ledger-json-api/LedgerJsonApiClient.generated.js.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/commands/completions.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/commands/submit-and-wait-for-transaction-tree.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/commands/submit-and-wait-for-transaction.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/commands/subscribe-to-completions.d.ts +17 -0
- package/build/src/clients/ledger-json-api/operations/v2/commands/subscribe-to-completions.d.ts.map +1 -0
- package/build/src/clients/ledger-json-api/operations/v2/commands/subscribe-to-completions.js +32 -0
- package/build/src/clients/ledger-json-api/operations/v2/commands/subscribe-to-completions.js.map +1 -0
- package/build/src/clients/ledger-json-api/operations/v2/events/get-events-by-contract-id.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/parties/get-party-details.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/parties/get.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/parties/update-party-details.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/state/get-active-contracts.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/state/get-connected-synchronizers.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/state/subscribe-to-active-contracts.d.ts +51 -0
- package/build/src/clients/ledger-json-api/operations/v2/state/subscribe-to-active-contracts.d.ts.map +1 -0
- package/build/src/clients/ledger-json-api/operations/v2/state/subscribe-to-active-contracts.js +34 -0
- package/build/src/clients/ledger-json-api/operations/v2/state/subscribe-to-active-contracts.js.map +1 -0
- package/build/src/clients/ledger-json-api/operations/v2/updates/get-flats.d.ts +10 -0
- package/build/src/clients/ledger-json-api/operations/v2/updates/get-flats.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/updates/get-transaction-by-id.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/updates/get-transaction-by-offset.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/updates/get-transaction-tree-by-id.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/updates/get-transaction-tree-by-offset.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/updates/get-update-by-id.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/updates/get-update-by-offset.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/updates/subscribe-to-flats.d.ts +237 -0
- package/build/src/clients/ledger-json-api/operations/v2/updates/subscribe-to-flats.d.ts.map +1 -0
- package/build/src/clients/ledger-json-api/operations/v2/updates/subscribe-to-flats.js +36 -0
- package/build/src/clients/ledger-json-api/operations/v2/updates/subscribe-to-flats.js.map +1 -0
- package/build/src/clients/ledger-json-api/operations/v2/updates/subscribe-to-trees.d.ts +239 -0
- package/build/src/clients/ledger-json-api/operations/v2/updates/subscribe-to-trees.d.ts.map +1 -0
- package/build/src/clients/ledger-json-api/operations/v2/updates/subscribe-to-trees.js +34 -0
- package/build/src/clients/ledger-json-api/operations/v2/updates/subscribe-to-trees.js.map +1 -0
- package/build/src/clients/ledger-json-api/operations/v2/updates/utils/format-normalizers.d.ts +8 -0
- package/build/src/clients/ledger-json-api/operations/v2/updates/utils/format-normalizers.d.ts.map +1 -0
- package/build/src/clients/ledger-json-api/operations/v2/updates/utils/format-normalizers.js +95 -0
- package/build/src/clients/ledger-json-api/operations/v2/updates/utils/format-normalizers.js.map +1 -0
- package/build/src/clients/ledger-json-api/operations/v2/users/create-user.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/users/get-user.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/users/grant-user-rights.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/users/list-user-rights.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/users/list-users.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/users/revoke-user-rights.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/operations/v2/users/update-user.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/schemas/api/completions.d.ts +120 -6
- package/build/src/clients/ledger-json-api/schemas/api/completions.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/schemas/api/completions.js +19 -2
- package/build/src/clients/ledger-json-api/schemas/api/completions.js.map +1 -1
- package/build/src/clients/ledger-json-api/schemas/api/errors.d.ts +17 -0
- package/build/src/clients/ledger-json-api/schemas/api/errors.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/schemas/api/errors.js +17 -1
- package/build/src/clients/ledger-json-api/schemas/api/errors.js.map +1 -1
- package/build/src/clients/ledger-json-api/schemas/api/updates.d.ts +71 -0
- package/build/src/clients/ledger-json-api/schemas/api/updates.d.ts.map +1 -1
- package/build/src/clients/ledger-json-api/schemas/api/updates.js +17 -1
- package/build/src/clients/ledger-json-api/schemas/api/updates.js.map +1 -1
- package/build/src/clients/lighthouse-api/LighthouseApiClient.generated.d.ts.map +1 -1
- package/build/src/clients/lighthouse-api/LighthouseApiClient.generated.js.map +1 -1
- package/build/src/clients/register.d.ts +0 -1
- package/build/src/clients/register.d.ts.map +1 -1
- package/build/src/clients/register.js +1 -3
- package/build/src/clients/register.js.map +1 -1
- package/build/src/clients/validator-api/ValidatorApiClient.generated.d.ts.map +1 -1
- package/build/src/clients/validator-api/ValidatorApiClient.generated.js.map +1 -1
- package/build/src/core/BaseClient.d.ts +1 -0
- package/build/src/core/BaseClient.d.ts.map +1 -1
- package/build/src/core/BaseClient.js +3 -0
- package/build/src/core/BaseClient.js.map +1 -1
- package/build/src/core/errors.d.ts +2 -1
- package/build/src/core/errors.d.ts.map +1 -1
- package/build/src/core/errors.js +2 -1
- package/build/src/core/errors.js.map +1 -1
- package/build/src/core/index.d.ts +1 -0
- package/build/src/core/index.d.ts.map +1 -1
- package/build/src/core/index.js +1 -0
- package/build/src/core/index.js.map +1 -1
- package/build/src/core/logging/FileLogger.d.ts.map +1 -1
- package/build/src/core/logging/FileLogger.js +8 -1
- package/build/src/core/logging/FileLogger.js.map +1 -1
- package/build/src/core/operations/WebSocketOperationFactory.d.ts +17 -0
- package/build/src/core/operations/WebSocketOperationFactory.d.ts.map +1 -0
- package/build/src/core/operations/WebSocketOperationFactory.js +38 -0
- package/build/src/core/operations/WebSocketOperationFactory.js.map +1 -0
- package/build/src/core/operations/index.d.ts +1 -0
- package/build/src/core/operations/index.d.ts.map +1 -1
- package/build/src/core/operations/index.js +1 -0
- package/build/src/core/operations/index.js.map +1 -1
- package/build/src/core/ws/WebSocketClient.d.ts +27 -0
- package/build/src/core/ws/WebSocketClient.d.ts.map +1 -0
- package/build/src/core/ws/WebSocketClient.js +96 -0
- package/build/src/core/ws/WebSocketClient.js.map +1 -0
- package/build/src/core/ws/WebSocketErrorUtils.d.ts +36 -0
- package/build/src/core/ws/WebSocketErrorUtils.d.ts.map +1 -0
- package/build/src/core/ws/WebSocketErrorUtils.js +71 -0
- package/build/src/core/ws/WebSocketErrorUtils.js.map +1 -0
- package/build/src/core/ws/index.d.ts +2 -0
- package/build/src/core/ws/index.d.ts.map +1 -0
- package/build/src/core/ws/index.js +18 -0
- package/build/src/core/ws/index.js.map +1 -0
- package/build/src/generated/canton/community/ledger/ledger-json-api/src/test/resources/json-api-docs/openapi.d.ts +280 -4
- package/build/src/generated/canton/community/ledger/ledger-json-api/src/test/resources/json-api-docs/openapi.d.ts.map +1 -1
- package/package.json +7 -5
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { JsCantonErrorSchema, WsCantonErrorSchema } from '../../../schemas/api/errors';
|
|
3
|
+
import { JsUpdateSchema, WsUpdateSchema } from '../../../schemas/api/updates';
|
|
4
|
+
declare const UpdatesFlatsParamsSchema: z.ZodObject<{
|
|
5
|
+
beginExclusive: z.ZodNumber;
|
|
6
|
+
endInclusive: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
streamIdleTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
updateFormat: z.ZodObject<{
|
|
10
|
+
includeTransactions: z.ZodOptional<z.ZodObject<{
|
|
11
|
+
eventFormat: z.ZodObject<{
|
|
12
|
+
filtersByParty: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
13
|
+
cumulative: z.ZodArray<z.ZodObject<{
|
|
14
|
+
identifierFilter: z.ZodUnion<readonly [z.ZodObject<{
|
|
15
|
+
Empty: z.ZodObject<{}, z.core.$strip>;
|
|
16
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
17
|
+
InterfaceFilter: z.ZodObject<{
|
|
18
|
+
interfaceId: z.ZodString;
|
|
19
|
+
includeInterfaceView: z.ZodOptional<z.ZodBoolean>;
|
|
20
|
+
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
23
|
+
TemplateFilter: z.ZodObject<{
|
|
24
|
+
templateId: z.ZodString;
|
|
25
|
+
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
28
|
+
WildcardFilter: z.ZodObject<{
|
|
29
|
+
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
}, z.core.$strip>]>;
|
|
32
|
+
}, z.core.$strip>>;
|
|
33
|
+
}, z.core.$strip>>;
|
|
34
|
+
filtersForAnyParty: z.ZodOptional<z.ZodObject<{
|
|
35
|
+
cumulative: z.ZodArray<z.ZodObject<{
|
|
36
|
+
identifierFilter: z.ZodUnion<readonly [z.ZodObject<{
|
|
37
|
+
Empty: z.ZodObject<{}, z.core.$strip>;
|
|
38
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
39
|
+
InterfaceFilter: z.ZodObject<{
|
|
40
|
+
interfaceId: z.ZodString;
|
|
41
|
+
includeInterfaceView: z.ZodOptional<z.ZodBoolean>;
|
|
42
|
+
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
45
|
+
TemplateFilter: z.ZodObject<{
|
|
46
|
+
templateId: z.ZodString;
|
|
47
|
+
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
50
|
+
WildcardFilter: z.ZodObject<{
|
|
51
|
+
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
}, z.core.$strip>]>;
|
|
54
|
+
}, z.core.$strip>>;
|
|
55
|
+
}, z.core.$strip>>;
|
|
56
|
+
verbose: z.ZodOptional<z.ZodBoolean>;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
transactionShape: z.ZodUnion<readonly [z.ZodLiteral<"TRANSACTION_SHAPE_ACS_DELTA">, z.ZodLiteral<"TRANSACTION_SHAPE_LEDGER_EFFECTS">]>;
|
|
59
|
+
}, z.core.$strip>>;
|
|
60
|
+
includeReassignments: z.ZodOptional<z.ZodObject<{
|
|
61
|
+
filtersByParty: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
62
|
+
cumulative: z.ZodArray<z.ZodObject<{
|
|
63
|
+
identifierFilter: z.ZodUnion<readonly [z.ZodObject<{
|
|
64
|
+
Empty: z.ZodObject<{}, z.core.$strip>;
|
|
65
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
66
|
+
InterfaceFilter: z.ZodObject<{
|
|
67
|
+
interfaceId: z.ZodString;
|
|
68
|
+
includeInterfaceView: z.ZodOptional<z.ZodBoolean>;
|
|
69
|
+
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
|
|
70
|
+
}, z.core.$strip>;
|
|
71
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
72
|
+
TemplateFilter: z.ZodObject<{
|
|
73
|
+
templateId: z.ZodString;
|
|
74
|
+
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
77
|
+
WildcardFilter: z.ZodObject<{
|
|
78
|
+
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
|
|
79
|
+
}, z.core.$strip>;
|
|
80
|
+
}, z.core.$strip>]>;
|
|
81
|
+
}, z.core.$strip>>;
|
|
82
|
+
}, z.core.$strip>>;
|
|
83
|
+
filtersForAnyParty: z.ZodOptional<z.ZodObject<{
|
|
84
|
+
cumulative: z.ZodArray<z.ZodObject<{
|
|
85
|
+
identifierFilter: z.ZodUnion<readonly [z.ZodObject<{
|
|
86
|
+
Empty: z.ZodObject<{}, z.core.$strip>;
|
|
87
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
88
|
+
InterfaceFilter: z.ZodObject<{
|
|
89
|
+
interfaceId: z.ZodString;
|
|
90
|
+
includeInterfaceView: z.ZodOptional<z.ZodBoolean>;
|
|
91
|
+
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
|
|
92
|
+
}, z.core.$strip>;
|
|
93
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
94
|
+
TemplateFilter: z.ZodObject<{
|
|
95
|
+
templateId: z.ZodString;
|
|
96
|
+
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
|
|
97
|
+
}, z.core.$strip>;
|
|
98
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
99
|
+
WildcardFilter: z.ZodObject<{
|
|
100
|
+
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
|
|
101
|
+
}, z.core.$strip>;
|
|
102
|
+
}, z.core.$strip>]>;
|
|
103
|
+
}, z.core.$strip>>;
|
|
104
|
+
}, z.core.$strip>>;
|
|
105
|
+
verbose: z.ZodOptional<z.ZodBoolean>;
|
|
106
|
+
}, z.core.$strip>>;
|
|
107
|
+
includeTopologyEvents: z.ZodOptional<z.ZodObject<{
|
|
108
|
+
includeParticipantAuthorizationEvents: z.ZodOptional<z.ZodObject<{
|
|
109
|
+
parties: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
110
|
+
}, z.core.$strip>>;
|
|
111
|
+
}, z.core.$strip>>;
|
|
112
|
+
}, z.core.$strip>;
|
|
113
|
+
}, z.core.$strip>;
|
|
114
|
+
export type UpdatesFlatsWsParams = z.infer<typeof UpdatesFlatsParamsSchema>;
|
|
115
|
+
export type UpdatesFlatsWsMessage = {
|
|
116
|
+
update: z.infer<typeof JsUpdateSchema>;
|
|
117
|
+
} | {
|
|
118
|
+
update: z.infer<typeof WsUpdateSchema>;
|
|
119
|
+
} | z.infer<typeof JsCantonErrorSchema> | z.infer<typeof WsCantonErrorSchema>;
|
|
120
|
+
export declare const SubscribeToFlats: {
|
|
121
|
+
new (client: import("../../../../..").BaseClient): {
|
|
122
|
+
client: import("../../../../..").BaseClient;
|
|
123
|
+
validateParams<T>(params: T, schema: z.ZodType<T, unknown, z.core.$ZodTypeInternals<T, unknown>>): T;
|
|
124
|
+
subscribe(params: {
|
|
125
|
+
beginExclusive: number;
|
|
126
|
+
updateFormat: {
|
|
127
|
+
includeTransactions?: {
|
|
128
|
+
eventFormat: {
|
|
129
|
+
filtersByParty: Record<string, {
|
|
130
|
+
cumulative: {
|
|
131
|
+
identifierFilter: {
|
|
132
|
+
Empty: Record<string, never>;
|
|
133
|
+
} | {
|
|
134
|
+
InterfaceFilter: {
|
|
135
|
+
interfaceId: string;
|
|
136
|
+
includeInterfaceView?: boolean | undefined;
|
|
137
|
+
includeCreatedEventBlob?: boolean | undefined;
|
|
138
|
+
};
|
|
139
|
+
} | {
|
|
140
|
+
TemplateFilter: {
|
|
141
|
+
templateId: string;
|
|
142
|
+
includeCreatedEventBlob?: boolean | undefined;
|
|
143
|
+
};
|
|
144
|
+
} | {
|
|
145
|
+
WildcardFilter: {
|
|
146
|
+
includeCreatedEventBlob?: boolean | undefined;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
}[];
|
|
150
|
+
}>;
|
|
151
|
+
filtersForAnyParty?: {
|
|
152
|
+
cumulative: {
|
|
153
|
+
identifierFilter: {
|
|
154
|
+
Empty: Record<string, never>;
|
|
155
|
+
} | {
|
|
156
|
+
InterfaceFilter: {
|
|
157
|
+
interfaceId: string;
|
|
158
|
+
includeInterfaceView?: boolean | undefined;
|
|
159
|
+
includeCreatedEventBlob?: boolean | undefined;
|
|
160
|
+
};
|
|
161
|
+
} | {
|
|
162
|
+
TemplateFilter: {
|
|
163
|
+
templateId: string;
|
|
164
|
+
includeCreatedEventBlob?: boolean | undefined;
|
|
165
|
+
};
|
|
166
|
+
} | {
|
|
167
|
+
WildcardFilter: {
|
|
168
|
+
includeCreatedEventBlob?: boolean | undefined;
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
}[];
|
|
172
|
+
} | undefined;
|
|
173
|
+
verbose?: boolean | undefined;
|
|
174
|
+
};
|
|
175
|
+
transactionShape: "TRANSACTION_SHAPE_ACS_DELTA" | "TRANSACTION_SHAPE_LEDGER_EFFECTS";
|
|
176
|
+
} | undefined;
|
|
177
|
+
includeReassignments?: {
|
|
178
|
+
filtersByParty: Record<string, {
|
|
179
|
+
cumulative: {
|
|
180
|
+
identifierFilter: {
|
|
181
|
+
Empty: Record<string, never>;
|
|
182
|
+
} | {
|
|
183
|
+
InterfaceFilter: {
|
|
184
|
+
interfaceId: string;
|
|
185
|
+
includeInterfaceView?: boolean | undefined;
|
|
186
|
+
includeCreatedEventBlob?: boolean | undefined;
|
|
187
|
+
};
|
|
188
|
+
} | {
|
|
189
|
+
TemplateFilter: {
|
|
190
|
+
templateId: string;
|
|
191
|
+
includeCreatedEventBlob?: boolean | undefined;
|
|
192
|
+
};
|
|
193
|
+
} | {
|
|
194
|
+
WildcardFilter: {
|
|
195
|
+
includeCreatedEventBlob?: boolean | undefined;
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
}[];
|
|
199
|
+
}>;
|
|
200
|
+
filtersForAnyParty?: {
|
|
201
|
+
cumulative: {
|
|
202
|
+
identifierFilter: {
|
|
203
|
+
Empty: Record<string, never>;
|
|
204
|
+
} | {
|
|
205
|
+
InterfaceFilter: {
|
|
206
|
+
interfaceId: string;
|
|
207
|
+
includeInterfaceView?: boolean | undefined;
|
|
208
|
+
includeCreatedEventBlob?: boolean | undefined;
|
|
209
|
+
};
|
|
210
|
+
} | {
|
|
211
|
+
TemplateFilter: {
|
|
212
|
+
templateId: string;
|
|
213
|
+
includeCreatedEventBlob?: boolean | undefined;
|
|
214
|
+
};
|
|
215
|
+
} | {
|
|
216
|
+
WildcardFilter: {
|
|
217
|
+
includeCreatedEventBlob?: boolean | undefined;
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
}[];
|
|
221
|
+
} | undefined;
|
|
222
|
+
verbose?: boolean | undefined;
|
|
223
|
+
} | undefined;
|
|
224
|
+
includeTopologyEvents?: {
|
|
225
|
+
includeParticipantAuthorizationEvents?: {
|
|
226
|
+
parties?: string[] | undefined;
|
|
227
|
+
} | undefined;
|
|
228
|
+
} | undefined;
|
|
229
|
+
};
|
|
230
|
+
endInclusive?: number | undefined;
|
|
231
|
+
limit?: number | undefined;
|
|
232
|
+
streamIdleTimeoutMs?: number | undefined;
|
|
233
|
+
}, handlers: import("../../../../..").WebSocketHandlers<UpdatesFlatsWsMessage, unknown>): Promise<import("../../../../..").WebSocketSubscription>;
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
export {};
|
|
237
|
+
//# sourceMappingURL=subscribe-to-flats.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscribe-to-flats.d.ts","sourceRoot":"","sources":["../../../../../../../src/clients/ledger-json-api/operations/v2/updates/subscribe-to-flats.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvF,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAM9E,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAyB,CAAC;AAExD,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC5E,MAAM,MAAM,qBAAqB,GAAG;IAAE,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;CAAE,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAExM,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0B3B,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SubscribeToFlats = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const WebSocketOperationFactory_1 = require("../../../../../core/operations/WebSocketOperationFactory");
|
|
6
|
+
const updates_1 = require("../../../schemas/operations/updates");
|
|
7
|
+
const errors_1 = require("../../../schemas/api/errors");
|
|
8
|
+
const updates_2 = require("../../../schemas/api/updates");
|
|
9
|
+
const format_normalizers_1 = require("./utils/format-normalizers");
|
|
10
|
+
const WebSocketErrorUtils_1 = require("../../../../../core/ws/WebSocketErrorUtils");
|
|
11
|
+
const path = '/v2/updates/flats';
|
|
12
|
+
const UpdatesFlatsParamsSchema = updates_1.GetUpdatesParamsSchema;
|
|
13
|
+
exports.SubscribeToFlats = (0, WebSocketOperationFactory_1.createWebSocketOperation)({
|
|
14
|
+
paramsSchema: UpdatesFlatsParamsSchema,
|
|
15
|
+
buildPath: (_params, _apiUrl) => `${path}`,
|
|
16
|
+
buildRequestMessage: (params) => {
|
|
17
|
+
const hasUpdateFormat = !!params.updateFormat;
|
|
18
|
+
const { filter, verbose } = (0, format_normalizers_1.buildWsRequestFilterAndVerbose)(params.updateFormat);
|
|
19
|
+
return {
|
|
20
|
+
beginExclusive: params.beginExclusive,
|
|
21
|
+
endInclusive: params.endInclusive,
|
|
22
|
+
// Server requires verbose; include it always. Only include filter when updateFormat is absent.
|
|
23
|
+
verbose,
|
|
24
|
+
...(hasUpdateFormat ? { updateFormat: (0, format_normalizers_1.normalizeUpdateFormat)(params.updateFormat) } : { filter }),
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
transformInbound: (msg) => {
|
|
28
|
+
return WebSocketErrorUtils_1.WebSocketErrorUtils.parseUnion(msg, zod_1.z.union([
|
|
29
|
+
zod_1.z.object({ update: updates_2.JsUpdateSchema }),
|
|
30
|
+
zod_1.z.object({ update: updates_2.WsUpdateSchema }),
|
|
31
|
+
errors_1.JsCantonErrorSchema,
|
|
32
|
+
errors_1.WsCantonErrorSchema,
|
|
33
|
+
]), 'SubscribeToFlats');
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=subscribe-to-flats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscribe-to-flats.js","sourceRoot":"","sources":["../../../../../../../src/clients/ledger-json-api/operations/v2/updates/subscribe-to-flats.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,wGAAoG;AACpG,iEAA6E;AAC7E,wDAAuF;AACvF,0DAA8E;AAC9E,mEAAmG;AACnG,oFAAiF;AAEjF,MAAM,IAAI,GAAG,mBAA4B,CAAC;AAE1C,MAAM,wBAAwB,GAAG,gCAAsB,CAAC;AAK3C,QAAA,gBAAgB,GAAG,IAAA,oDAAwB,EAAuD;IAC9G,YAAY,EAAE,wBAAwB;IACtC,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE;IAC1C,mBAAmB,EAAE,CAAC,MAAM,EAAE,EAAE;QAC/B,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC;QAC9C,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,mDAA8B,EAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QAChF,OAAO;YACN,cAAc,EAAE,MAAM,CAAC,cAAc;YACrC,YAAY,EAAE,MAAM,CAAC,YAAY;YACjC,+FAA+F;YAC/F,OAAO;YACP,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,IAAA,0CAAqB,EAAC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC;SAChG,CAAC;IACH,CAAC;IACD,gBAAgB,EAAE,CAAC,GAAG,EAAE,EAAE;QACzB,OAAO,yCAAmB,CAAC,UAAU,CACpC,GAAG,EACH,OAAC,CAAC,KAAK,CAAC;YACP,OAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,wBAAc,EAAE,CAAC;YACpC,OAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,wBAAc,EAAE,CAAC;YACpC,4BAAmB;YACnB,4BAAmB;SACnB,CAAC,EACF,kBAAkB,CAClB,CAAC;IACH,CAAC;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { JsCantonErrorSchema, WsCantonErrorSchema } from '../../../schemas/api/errors';
|
|
3
|
+
import { JsTransactionTreeSchema, WsUpdateTreesSchema } from '../../../schemas/api/updates';
|
|
4
|
+
declare const UpdatesTreesParamsSchema: z.ZodObject<{
|
|
5
|
+
beginExclusive: z.ZodNumber;
|
|
6
|
+
endInclusive: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
streamIdleTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
updateFormat: z.ZodObject<{
|
|
10
|
+
includeTransactions: z.ZodOptional<z.ZodObject<{
|
|
11
|
+
eventFormat: z.ZodObject<{
|
|
12
|
+
filtersByParty: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
13
|
+
cumulative: z.ZodArray<z.ZodObject<{
|
|
14
|
+
identifierFilter: z.ZodUnion<readonly [z.ZodObject<{
|
|
15
|
+
Empty: z.ZodObject<{}, z.core.$strip>;
|
|
16
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
17
|
+
InterfaceFilter: z.ZodObject<{
|
|
18
|
+
interfaceId: z.ZodString;
|
|
19
|
+
includeInterfaceView: z.ZodOptional<z.ZodBoolean>;
|
|
20
|
+
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
23
|
+
TemplateFilter: z.ZodObject<{
|
|
24
|
+
templateId: z.ZodString;
|
|
25
|
+
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
28
|
+
WildcardFilter: z.ZodObject<{
|
|
29
|
+
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
}, z.core.$strip>]>;
|
|
32
|
+
}, z.core.$strip>>;
|
|
33
|
+
}, z.core.$strip>>;
|
|
34
|
+
filtersForAnyParty: z.ZodOptional<z.ZodObject<{
|
|
35
|
+
cumulative: z.ZodArray<z.ZodObject<{
|
|
36
|
+
identifierFilter: z.ZodUnion<readonly [z.ZodObject<{
|
|
37
|
+
Empty: z.ZodObject<{}, z.core.$strip>;
|
|
38
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
39
|
+
InterfaceFilter: z.ZodObject<{
|
|
40
|
+
interfaceId: z.ZodString;
|
|
41
|
+
includeInterfaceView: z.ZodOptional<z.ZodBoolean>;
|
|
42
|
+
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
45
|
+
TemplateFilter: z.ZodObject<{
|
|
46
|
+
templateId: z.ZodString;
|
|
47
|
+
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
50
|
+
WildcardFilter: z.ZodObject<{
|
|
51
|
+
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
}, z.core.$strip>]>;
|
|
54
|
+
}, z.core.$strip>>;
|
|
55
|
+
}, z.core.$strip>>;
|
|
56
|
+
verbose: z.ZodOptional<z.ZodBoolean>;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
transactionShape: z.ZodUnion<readonly [z.ZodLiteral<"TRANSACTION_SHAPE_ACS_DELTA">, z.ZodLiteral<"TRANSACTION_SHAPE_LEDGER_EFFECTS">]>;
|
|
59
|
+
}, z.core.$strip>>;
|
|
60
|
+
includeReassignments: z.ZodOptional<z.ZodObject<{
|
|
61
|
+
filtersByParty: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
62
|
+
cumulative: z.ZodArray<z.ZodObject<{
|
|
63
|
+
identifierFilter: z.ZodUnion<readonly [z.ZodObject<{
|
|
64
|
+
Empty: z.ZodObject<{}, z.core.$strip>;
|
|
65
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
66
|
+
InterfaceFilter: z.ZodObject<{
|
|
67
|
+
interfaceId: z.ZodString;
|
|
68
|
+
includeInterfaceView: z.ZodOptional<z.ZodBoolean>;
|
|
69
|
+
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
|
|
70
|
+
}, z.core.$strip>;
|
|
71
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
72
|
+
TemplateFilter: z.ZodObject<{
|
|
73
|
+
templateId: z.ZodString;
|
|
74
|
+
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
77
|
+
WildcardFilter: z.ZodObject<{
|
|
78
|
+
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
|
|
79
|
+
}, z.core.$strip>;
|
|
80
|
+
}, z.core.$strip>]>;
|
|
81
|
+
}, z.core.$strip>>;
|
|
82
|
+
}, z.core.$strip>>;
|
|
83
|
+
filtersForAnyParty: z.ZodOptional<z.ZodObject<{
|
|
84
|
+
cumulative: z.ZodArray<z.ZodObject<{
|
|
85
|
+
identifierFilter: z.ZodUnion<readonly [z.ZodObject<{
|
|
86
|
+
Empty: z.ZodObject<{}, z.core.$strip>;
|
|
87
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
88
|
+
InterfaceFilter: z.ZodObject<{
|
|
89
|
+
interfaceId: z.ZodString;
|
|
90
|
+
includeInterfaceView: z.ZodOptional<z.ZodBoolean>;
|
|
91
|
+
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
|
|
92
|
+
}, z.core.$strip>;
|
|
93
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
94
|
+
TemplateFilter: z.ZodObject<{
|
|
95
|
+
templateId: z.ZodString;
|
|
96
|
+
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
|
|
97
|
+
}, z.core.$strip>;
|
|
98
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
99
|
+
WildcardFilter: z.ZodObject<{
|
|
100
|
+
includeCreatedEventBlob: z.ZodOptional<z.ZodBoolean>;
|
|
101
|
+
}, z.core.$strip>;
|
|
102
|
+
}, z.core.$strip>]>;
|
|
103
|
+
}, z.core.$strip>>;
|
|
104
|
+
}, z.core.$strip>>;
|
|
105
|
+
verbose: z.ZodOptional<z.ZodBoolean>;
|
|
106
|
+
}, z.core.$strip>>;
|
|
107
|
+
includeTopologyEvents: z.ZodOptional<z.ZodObject<{
|
|
108
|
+
includeParticipantAuthorizationEvents: z.ZodOptional<z.ZodObject<{
|
|
109
|
+
parties: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
110
|
+
}, z.core.$strip>>;
|
|
111
|
+
}, z.core.$strip>>;
|
|
112
|
+
}, z.core.$strip>;
|
|
113
|
+
}, z.core.$strip>;
|
|
114
|
+
export type UpdatesTreesWsParams = z.infer<typeof UpdatesTreesParamsSchema>;
|
|
115
|
+
export type UpdatesTreesWsMessage = {
|
|
116
|
+
update: {
|
|
117
|
+
JsTransactionTree: z.infer<typeof JsTransactionTreeSchema>;
|
|
118
|
+
};
|
|
119
|
+
} | {
|
|
120
|
+
update: z.infer<typeof WsUpdateTreesSchema>;
|
|
121
|
+
} | z.infer<typeof JsCantonErrorSchema> | z.infer<typeof WsCantonErrorSchema>;
|
|
122
|
+
export declare const SubscribeToTrees: {
|
|
123
|
+
new (client: import("../../../../..").BaseClient): {
|
|
124
|
+
client: import("../../../../..").BaseClient;
|
|
125
|
+
validateParams<T>(params: T, schema: z.ZodType<T, unknown, z.core.$ZodTypeInternals<T, unknown>>): T;
|
|
126
|
+
subscribe(params: {
|
|
127
|
+
beginExclusive: number;
|
|
128
|
+
updateFormat: {
|
|
129
|
+
includeTransactions?: {
|
|
130
|
+
eventFormat: {
|
|
131
|
+
filtersByParty: Record<string, {
|
|
132
|
+
cumulative: {
|
|
133
|
+
identifierFilter: {
|
|
134
|
+
Empty: Record<string, never>;
|
|
135
|
+
} | {
|
|
136
|
+
InterfaceFilter: {
|
|
137
|
+
interfaceId: string;
|
|
138
|
+
includeInterfaceView?: boolean | undefined;
|
|
139
|
+
includeCreatedEventBlob?: boolean | undefined;
|
|
140
|
+
};
|
|
141
|
+
} | {
|
|
142
|
+
TemplateFilter: {
|
|
143
|
+
templateId: string;
|
|
144
|
+
includeCreatedEventBlob?: boolean | undefined;
|
|
145
|
+
};
|
|
146
|
+
} | {
|
|
147
|
+
WildcardFilter: {
|
|
148
|
+
includeCreatedEventBlob?: boolean | undefined;
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
}[];
|
|
152
|
+
}>;
|
|
153
|
+
filtersForAnyParty?: {
|
|
154
|
+
cumulative: {
|
|
155
|
+
identifierFilter: {
|
|
156
|
+
Empty: Record<string, never>;
|
|
157
|
+
} | {
|
|
158
|
+
InterfaceFilter: {
|
|
159
|
+
interfaceId: string;
|
|
160
|
+
includeInterfaceView?: boolean | undefined;
|
|
161
|
+
includeCreatedEventBlob?: boolean | undefined;
|
|
162
|
+
};
|
|
163
|
+
} | {
|
|
164
|
+
TemplateFilter: {
|
|
165
|
+
templateId: string;
|
|
166
|
+
includeCreatedEventBlob?: boolean | undefined;
|
|
167
|
+
};
|
|
168
|
+
} | {
|
|
169
|
+
WildcardFilter: {
|
|
170
|
+
includeCreatedEventBlob?: boolean | undefined;
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
}[];
|
|
174
|
+
} | undefined;
|
|
175
|
+
verbose?: boolean | undefined;
|
|
176
|
+
};
|
|
177
|
+
transactionShape: "TRANSACTION_SHAPE_ACS_DELTA" | "TRANSACTION_SHAPE_LEDGER_EFFECTS";
|
|
178
|
+
} | undefined;
|
|
179
|
+
includeReassignments?: {
|
|
180
|
+
filtersByParty: Record<string, {
|
|
181
|
+
cumulative: {
|
|
182
|
+
identifierFilter: {
|
|
183
|
+
Empty: Record<string, never>;
|
|
184
|
+
} | {
|
|
185
|
+
InterfaceFilter: {
|
|
186
|
+
interfaceId: string;
|
|
187
|
+
includeInterfaceView?: boolean | undefined;
|
|
188
|
+
includeCreatedEventBlob?: boolean | undefined;
|
|
189
|
+
};
|
|
190
|
+
} | {
|
|
191
|
+
TemplateFilter: {
|
|
192
|
+
templateId: string;
|
|
193
|
+
includeCreatedEventBlob?: boolean | undefined;
|
|
194
|
+
};
|
|
195
|
+
} | {
|
|
196
|
+
WildcardFilter: {
|
|
197
|
+
includeCreatedEventBlob?: boolean | undefined;
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
}[];
|
|
201
|
+
}>;
|
|
202
|
+
filtersForAnyParty?: {
|
|
203
|
+
cumulative: {
|
|
204
|
+
identifierFilter: {
|
|
205
|
+
Empty: Record<string, never>;
|
|
206
|
+
} | {
|
|
207
|
+
InterfaceFilter: {
|
|
208
|
+
interfaceId: string;
|
|
209
|
+
includeInterfaceView?: boolean | undefined;
|
|
210
|
+
includeCreatedEventBlob?: boolean | undefined;
|
|
211
|
+
};
|
|
212
|
+
} | {
|
|
213
|
+
TemplateFilter: {
|
|
214
|
+
templateId: string;
|
|
215
|
+
includeCreatedEventBlob?: boolean | undefined;
|
|
216
|
+
};
|
|
217
|
+
} | {
|
|
218
|
+
WildcardFilter: {
|
|
219
|
+
includeCreatedEventBlob?: boolean | undefined;
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
}[];
|
|
223
|
+
} | undefined;
|
|
224
|
+
verbose?: boolean | undefined;
|
|
225
|
+
} | undefined;
|
|
226
|
+
includeTopologyEvents?: {
|
|
227
|
+
includeParticipantAuthorizationEvents?: {
|
|
228
|
+
parties?: string[] | undefined;
|
|
229
|
+
} | undefined;
|
|
230
|
+
} | undefined;
|
|
231
|
+
};
|
|
232
|
+
endInclusive?: number | undefined;
|
|
233
|
+
limit?: number | undefined;
|
|
234
|
+
streamIdleTimeoutMs?: number | undefined;
|
|
235
|
+
}, handlers: import("../../../../..").WebSocketHandlers<UpdatesTreesWsMessage, unknown>): Promise<import("../../../../..").WebSocketSubscription>;
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
export {};
|
|
239
|
+
//# sourceMappingURL=subscribe-to-trees.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscribe-to-trees.d.ts","sourceRoot":"","sources":["../../../../../../../src/clients/ledger-json-api/operations/v2/updates/subscribe-to-trees.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvF,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAM5F,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAyB,CAAC;AAExD,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC5E,MAAM,MAAM,qBAAqB,GAAG;IAAE,MAAM,EAAE;QAAE,iBAAiB,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;KAAE,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;CAAE,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAE7O,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwB3B,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SubscribeToTrees = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const WebSocketOperationFactory_1 = require("../../../../../core/operations/WebSocketOperationFactory");
|
|
6
|
+
const updates_1 = require("../../../schemas/operations/updates");
|
|
7
|
+
const errors_1 = require("../../../schemas/api/errors");
|
|
8
|
+
const updates_2 = require("../../../schemas/api/updates");
|
|
9
|
+
const format_normalizers_1 = require("./utils/format-normalizers");
|
|
10
|
+
const WebSocketErrorUtils_1 = require("../../../../../core/ws/WebSocketErrorUtils");
|
|
11
|
+
const path = '/v2/updates/trees';
|
|
12
|
+
const UpdatesTreesParamsSchema = updates_1.GetUpdatesParamsSchema;
|
|
13
|
+
exports.SubscribeToTrees = (0, WebSocketOperationFactory_1.createWebSocketOperation)({
|
|
14
|
+
paramsSchema: UpdatesTreesParamsSchema,
|
|
15
|
+
buildPath: (_params, _apiUrl) => `${path}`,
|
|
16
|
+
buildRequestMessage: (params) => {
|
|
17
|
+
const { filter, verbose } = (0, format_normalizers_1.buildWsRequestFilterAndVerbose)(params.updateFormat);
|
|
18
|
+
return {
|
|
19
|
+
beginExclusive: params.beginExclusive,
|
|
20
|
+
endInclusive: params.endInclusive,
|
|
21
|
+
verbose,
|
|
22
|
+
filter,
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
transformInbound: (msg) => {
|
|
26
|
+
return WebSocketErrorUtils_1.WebSocketErrorUtils.parseUnion(msg, zod_1.z.union([
|
|
27
|
+
zod_1.z.object({ update: zod_1.z.object({ JsTransactionTree: updates_2.JsTransactionTreeSchema }) }),
|
|
28
|
+
zod_1.z.object({ update: updates_2.WsUpdateTreesSchema }),
|
|
29
|
+
errors_1.JsCantonErrorSchema,
|
|
30
|
+
errors_1.WsCantonErrorSchema,
|
|
31
|
+
]), 'SubscribeToTrees');
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
//# sourceMappingURL=subscribe-to-trees.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscribe-to-trees.js","sourceRoot":"","sources":["../../../../../../../src/clients/ledger-json-api/operations/v2/updates/subscribe-to-trees.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,wGAAoG;AACpG,iEAA6E;AAC7E,wDAAuF;AACvF,0DAA4F;AAC5F,mEAA4E;AAC5E,oFAAiF;AAEjF,MAAM,IAAI,GAAG,mBAA4B,CAAC;AAE1C,MAAM,wBAAwB,GAAG,gCAAsB,CAAC;AAK3C,QAAA,gBAAgB,GAAG,IAAA,oDAAwB,EAAuD;IAC9G,YAAY,EAAE,wBAAwB;IACtC,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE;IAC1C,mBAAmB,EAAE,CAAC,MAAM,EAAE,EAAE;QAC/B,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,mDAA8B,EAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QAChF,OAAO;YACN,cAAc,EAAE,MAAM,CAAC,cAAc;YACrC,YAAY,EAAE,MAAM,CAAC,YAAY;YACjC,OAAO;YACP,MAAM;SACN,CAAC;IACH,CAAC;IACD,gBAAgB,EAAE,CAAC,GAAG,EAAE,EAAE;QACzB,OAAO,yCAAmB,CAAC,UAAU,CACpC,GAAG,EACH,OAAC,CAAC,KAAK,CAAC;YACP,OAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,iBAAiB,EAAE,iCAAuB,EAAE,CAAC,EAAE,CAAC;YAC9E,OAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,6BAAmB,EAAE,CAAC;YACzC,4BAAmB;YACnB,4BAAmB;SACnB,CAAC,EACF,kBAAkB,CAClB,CAAC;IACH,CAAC;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { GetUpdatesParams, IdentifierFilter } from '../../../../schemas/operations/updates';
|
|
2
|
+
export declare function normalizeIdentifierFilter(filter: IdentifierFilter): unknown;
|
|
3
|
+
export declare function normalizeUpdateFormat(p: GetUpdatesParams['updateFormat']): unknown;
|
|
4
|
+
export declare function buildWsRequestFilterAndVerbose(p: GetUpdatesParams['updateFormat']): {
|
|
5
|
+
filter?: unknown;
|
|
6
|
+
verbose: boolean;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=format-normalizers.d.ts.map
|
package/build/src/clients/ledger-json-api/operations/v2/updates/utils/format-normalizers.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-normalizers.d.ts","sourceRoot":"","sources":["../../../../../../../../src/clients/ledger-json-api/operations/v2/updates/utils/format-normalizers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAEjG,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAiB3E;AAED,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,gBAAgB,CAAC,cAAc,CAAC,GAAG,OAAO,CA8ClF;AAGD,wBAAgB,8BAA8B,CAAC,CAAC,EAAE,gBAAgB,CAAC,cAAc,CAAC,GAAG;IAAE,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CA8B1H"}
|