@distrohelena/canton-typescript-sdk 1.0.0 → 1.0.2

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.
@@ -29,7 +29,8 @@ class CantonManager {
29
29
  if (options.querySource === query_source_js_1.QuerySource.pqs) {
30
30
  this.pqsPool = pqs_pool_js_1.PqsPool.create(options.pqs.connectionString);
31
31
  const profile = new pqs_schema_profile_js_1.PqsSchemaProfileV1(options.pqs.schema);
32
- this.query = new pqs_query_client_js_1.PqsQueryClient(this.pqsPool.pool, profile, (0, pqs_schema_profile_js_1.validatePqsSchemaAsync)(this.pqsPool.pool, profile));
32
+ const pool = this.pqsPool.pool;
33
+ this.query = new pqs_query_client_js_1.PqsQueryClient(pool, profile, () => (0, pqs_schema_profile_js_1.validatePqsSchemaAsync)(pool, profile));
33
34
  }
34
35
  else {
35
36
  this.query = new grpc_query_client_js_1.GrpcQueryClient({
@@ -23,7 +23,6 @@ function normalizedUniqueAsFindMany(query) {
23
23
  class PqsQueryClient {
24
24
  executor;
25
25
  profile;
26
- ready;
27
26
  source = query_source_js_1.QuerySource.pqs;
28
27
  contracts = {
29
28
  findMany: async (args = {}) => await this.findContractsAsync((0, query_normalizer_js_1.normalizeFindMany)("contracts", args)),
@@ -39,15 +38,31 @@ class PqsQueryClient {
39
38
  packages = this.createPhysicalDelegate("__packages");
40
39
  transactions = this.createPhysicalDelegate("__transactions");
41
40
  watermark = this.createPhysicalDelegate("__watermark");
42
- constructor(executor, profile, ready = Promise.resolve()) {
41
+ checkReadyAsync;
42
+ readyPromise;
43
+ constructor(executor, profile, readiness = () => Promise.resolve()) {
43
44
  this.executor = executor;
44
45
  this.profile = profile;
45
- this.ready = ready;
46
+ this.checkReadyAsync = typeof readiness === "function" ? readiness : () => readiness;
47
+ }
48
+ /**
49
+ * Awaits the readiness check, memoizing success so validation runs once,
50
+ * but clearing the memo on rejection so a transiently unreachable PQS is
51
+ * revalidated on the next query instead of pinning the first failure.
52
+ */
53
+ ready() {
54
+ if (this.readyPromise === undefined) {
55
+ this.readyPromise = Promise.resolve(this.checkReadyAsync()).catch((cause) => {
56
+ this.readyPromise = undefined;
57
+ throw cause;
58
+ });
59
+ }
60
+ return this.readyPromise;
46
61
  }
47
62
  async $queryRaw(sql, values = []) {
48
63
  (0, read_only_sql_js_1.assertReadOnlySql)(sql);
49
64
  try {
50
- await this.ready;
65
+ await this.ready();
51
66
  return (await this.executor.query(sql, values)).rows;
52
67
  }
53
68
  catch (cause) {
@@ -77,7 +92,7 @@ class PqsQueryClient {
77
92
  async readPhysicalAsync(relation, query) {
78
93
  const compiled = (0, pqs_relational_sql_compiler_js_1.compilePqsRelationFindMany)(relation, query, this.profile);
79
94
  try {
80
- await this.ready;
95
+ await this.ready();
81
96
  return (await this.executor.query(compiled.text, compiled.values)).rows.map((row) => this.mapPhysicalRow(row, compiled.resultShape));
82
97
  }
83
98
  catch (cause) {
@@ -87,7 +102,7 @@ class PqsQueryClient {
87
102
  async countPhysicalAsync(relation, query) {
88
103
  const compiled = (0, pqs_relational_sql_compiler_js_1.compilePqsRelationCount)(relation, query, this.profile);
89
104
  try {
90
- await this.ready;
105
+ await this.ready();
91
106
  return Number((await this.executor.query(compiled.text, compiled.values)).rows[0]?.count ?? 0);
92
107
  }
93
108
  catch (cause) {
@@ -97,7 +112,7 @@ class PqsQueryClient {
97
112
  async aggregatePhysicalAsync(relation, query) {
98
113
  const compiled = (0, pqs_relational_sql_compiler_js_1.compilePqsRelationAggregate)(relation, query, this.profile);
99
114
  try {
100
- await this.ready;
115
+ await this.ready();
101
116
  const row = (await this.executor.query(compiled.text, compiled.values)).rows[0] ?? {};
102
117
  const result = {};
103
118
  if (query.aggregates.count)
@@ -115,7 +130,7 @@ class PqsQueryClient {
115
130
  async groupPhysicalAsync(relation, query) {
116
131
  const compiled = (0, pqs_relational_sql_compiler_js_1.compilePqsRelationGroupBy)(relation, query, this.profile);
117
132
  try {
118
- await this.ready;
133
+ await this.ready();
119
134
  return (await this.executor.query(compiled.text, compiled.values)).rows.map((row) => Object.fromEntries(Object.entries(row).map(([name, value]) => [name, name === "count" ? Number(value) : value instanceof Date ? value : value === null ? null : String(value)])));
120
135
  }
121
136
  catch (cause) {
@@ -148,7 +163,7 @@ class PqsQueryClient {
148
163
  async findContractsAsync(query) {
149
164
  const compiled = (0, pqs_sql_compiler_js_1.compileContractFindMany)(query, this.profile);
150
165
  try {
151
- await this.ready;
166
+ await this.ready();
152
167
  return (await this.executor.query(compiled.text, compiled.values)).rows.map((row) => this.mapPhysicalRow(contractRootRow(row), compiled.resultShape, contractRootScalars(row)));
153
168
  }
154
169
  catch (cause) {
@@ -158,7 +173,7 @@ class PqsQueryClient {
158
173
  async countContractsAsync(query) {
159
174
  const compiled = (0, pqs_sql_compiler_js_1.compileContractCount)(query, this.profile);
160
175
  try {
161
- await this.ready;
176
+ await this.ready();
162
177
  return Number((await this.executor.query(compiled.text, compiled.values)).rows[0]?.count ?? 0);
163
178
  }
164
179
  catch (cause) {
@@ -168,7 +183,7 @@ class PqsQueryClient {
168
183
  async aggregateContractsAsync(normalized) {
169
184
  const compiled = (0, pqs_sql_compiler_js_1.compileContractAggregate)(normalized, this.profile);
170
185
  try {
171
- await this.ready;
186
+ await this.ready();
172
187
  const row = (await this.executor.query(compiled.text, compiled.values)).rows[0] ?? {};
173
188
  const result = {};
174
189
  if (normalized.aggregates.count)
@@ -186,7 +201,7 @@ class PqsQueryClient {
186
201
  async groupContractsAsync(query) {
187
202
  const compiled = (0, pqs_sql_compiler_js_1.compileContractGroupBy)(query, this.profile);
188
203
  try {
189
- await this.ready;
204
+ await this.ready();
190
205
  return (await this.executor.query(compiled.text, compiled.values)).rows.map((row) => Object.fromEntries(Object.entries(row).map(([name, value]) => [name, name === "count" ? Number(value) : value === null || typeof value === "string" || typeof value === "number" || typeof value === "boolean" || value instanceof Date ? value : String(value)])));
191
206
  }
192
207
  catch (cause) {
@@ -311,12 +311,12 @@ class GrpcTransport {
311
311
  this.throwIfDisposed();
312
312
  let payload;
313
313
  try {
314
- payload = await this.operations.listPartyToKeyMappingAsync(request, options);
314
+ payload = await this.operations.listPartyToKeyMappingAsync((0, topology_manager_read_mapper_js_1.mapGrpcListPartyToKeyMappingRequest)(request), options);
315
315
  }
316
316
  catch (error) {
317
317
  this.throwPartyTopologyReadCompatibilityError(error, "topologyManagerReadService.listPartyToKeyMappingAsync");
318
318
  }
319
- return payload;
319
+ return (0, topology_manager_read_mapper_js_1.mapGrpcListPartyToKeyMappingResponse)(payload);
320
320
  }
321
321
  async listSynchronizerTrustCertificateAsync(request, options) {
322
322
  this.throwIfDisposed();
@@ -6,6 +6,7 @@ import { AllocatePartyRequest } from "../types/requests/allocate-party-request.j
6
6
  import { GetActiveContractsRequest } from "../types/requests/get-active-contracts-request.js";
7
7
  import { GetUserRequest } from "../types/requests/get-user-request.js";
8
8
  import { ListKnownPartiesRequest } from "../types/requests/list-known-parties-request.js";
9
+ import { ListPartyToKeyMappingRequest } from "../types/requests/list-party-to-key-mapping-request.js";
9
10
  import { ListPartyToParticipantRequest } from "../types/requests/list-party-to-participant-request.js";
10
11
  import { ListUserRightsRequest } from "../types/requests/list-user-rights-request.js";
11
12
  import { ListUsersRequest } from "../types/requests/list-users-request.js";
@@ -17,11 +18,12 @@ import type { GetHighestOffsetByTimestampRequest, GetHighestOffsetByTimestampRes
17
18
  import type { GetNoWaitCommitmentsFromRequest, GetNoWaitCommitmentsFromResponse, GetParticipantScheduleRequest as GetParticipantPruningScheduleRequest, GetParticipantScheduleResponse as GetParticipantPruningScheduleResponse, GetScheduleRequest as GetPruningScheduleRequest, GetScheduleResponse as GetPruningScheduleResponse } from "../../transports/grpc/generated/canton/com/digitalasset/canton/admin/pruning/v30/pruning.js";
18
19
  import { AllocatePartyResponse } from "../types/responses/allocate-party-response.js";
19
20
  import { GetUserResponse } from "../types/responses/get-user-response.js";
21
+ import { ListPartyToKeyMappingResponse } from "../types/responses/list-party-to-key-mapping-response.js";
20
22
  import { ListPartyToParticipantResponse } from "../types/responses/list-party-to-participant-response.js";
21
23
  import { ListUserRightsResponse } from "../types/responses/list-user-rights-response.js";
22
24
  import { ListUsersResponse } from "../types/responses/list-users-response.js";
23
25
  import type { AllocateExternalPartyRequest, AllocateExternalPartyResponse, GenerateExternalPartyTopologyRequest, GenerateExternalPartyTopologyResponse } from "../../transports/grpc/generated/canton/com/daml/ledger/api/v2/admin/party_management_service.js";
24
- import type { ListAllV2Request, ListAllV2Response, ListAllRequest, ListAllResponse, ListAvailableStoresRequest, ListAvailableStoresResponse, ListLsuAnnouncementRequest, ListLsuAnnouncementResponse, ListLsuSequencerConnectionSuccessorRequest, ListLsuSequencerConnectionSuccessorResponse, ListMediatorSynchronizerStateRequest, ListMediatorSynchronizerStateResponse, ListSequencingParametersStateRequest, ListSequencingParametersStateResponse, ListSynchronizerParametersStateRequest, ListSynchronizerParametersStateResponse, ListVettedPackagesRequest as TopologyListVettedPackagesRequest, ListVettedPackagesResponse as TopologyListVettedPackagesResponse, ListPartyHostingLimitsRequest, ListPartyHostingLimitsResponse, ListParticipantSynchronizerPermissionRequest, ListParticipantSynchronizerPermissionResponse, ListSynchronizerTrustCertificateRequest, ListSynchronizerTrustCertificateResponse, ListPartyToKeyMappingRequest, ListPartyToKeyMappingResponse, ListOwnerToKeyMappingRequest, ListOwnerToKeyMappingResponse, ListDecentralizedNamespaceDefinitionRequest, ListDecentralizedNamespaceDefinitionResponse, ListNamespaceDelegationRequest, ListNamespaceDelegationResponse, ListSequencerSynchronizerStateRequest, ListSequencerSynchronizerStateResponse } from "../../transports/grpc/generated/canton/com/digitalasset/canton/topology/admin/v30/topology_manager_read_service.js";
26
+ import type { ListAllV2Request, ListAllV2Response, ListAllRequest, ListAllResponse, ListAvailableStoresRequest, ListAvailableStoresResponse, ListLsuAnnouncementRequest, ListLsuAnnouncementResponse, ListLsuSequencerConnectionSuccessorRequest, ListLsuSequencerConnectionSuccessorResponse, ListMediatorSynchronizerStateRequest, ListMediatorSynchronizerStateResponse, ListSequencingParametersStateRequest, ListSequencingParametersStateResponse, ListSynchronizerParametersStateRequest, ListSynchronizerParametersStateResponse, ListVettedPackagesRequest as TopologyListVettedPackagesRequest, ListVettedPackagesResponse as TopologyListVettedPackagesResponse, ListPartyHostingLimitsRequest, ListPartyHostingLimitsResponse, ListParticipantSynchronizerPermissionRequest, ListParticipantSynchronizerPermissionResponse, ListSynchronizerTrustCertificateRequest, ListSynchronizerTrustCertificateResponse, ListOwnerToKeyMappingRequest, ListOwnerToKeyMappingResponse, ListDecentralizedNamespaceDefinitionRequest, ListDecentralizedNamespaceDefinitionResponse, ListNamespaceDelegationRequest, ListNamespaceDelegationResponse, ListSequencerSynchronizerStateRequest, ListSequencerSynchronizerStateResponse } from "../../transports/grpc/generated/canton/com/digitalasset/canton/topology/admin/v30/topology_manager_read_service.js";
25
27
  import type { GetSynchronizerIdRequest, GetSynchronizerIdResponse, ListConnectedSynchronizersRequest, ListConnectedSynchronizersResponse, ListRegisteredSynchronizersRequest, ListRegisteredSynchronizersResponse } from "../../transports/grpc/generated/canton/com/digitalasset/canton/admin/participant/v30/synchronizer_connectivity_service.js";
26
28
  import type { AddPartyAsyncRequest, AddPartyAsyncResponse, ClearPartyOnboardingFlagRequest, ClearPartyOnboardingFlagResponse } from "../../transports/grpc/generated/canton/com/digitalasset/canton/admin/participant/v30/party_management_service.js";
27
29
  import type { GetSafePruningOffsetRequest, GetSafePruningOffsetResponse } from "../../transports/grpc/generated/canton/com/digitalasset/canton/admin/participant/v30/pruning_service.js";
@@ -26,7 +26,8 @@ export class CantonManager {
26
26
  if (options.querySource === QuerySource.pqs) {
27
27
  this.pqsPool = PqsPool.create(options.pqs.connectionString);
28
28
  const profile = new PqsSchemaProfileV1(options.pqs.schema);
29
- this.query = new PqsQueryClient(this.pqsPool.pool, profile, validatePqsSchemaAsync(this.pqsPool.pool, profile));
29
+ const pool = this.pqsPool.pool;
30
+ this.query = new PqsQueryClient(pool, profile, () => validatePqsSchemaAsync(pool, profile));
30
31
  }
31
32
  else {
32
33
  this.query = new GrpcQueryClient({
@@ -10,7 +10,6 @@ export interface PqsQueryExecutor {
10
10
  export declare class PqsQueryClient implements QueryClient {
11
11
  private readonly executor;
12
12
  private readonly profile;
13
- private readonly ready;
14
13
  readonly source = QuerySource.pqs;
15
14
  readonly contracts: {
16
15
  findMany: <TArgs extends ContractFindManyArgs>(args?: TArgs) => Promise<readonly (import("../model-types.js").ContractRow & import("../model-types.js").ContractRelationRow & JsonProjectionResult<TArgs>)[]>;
@@ -31,7 +30,15 @@ export declare class PqsQueryClient implements QueryClient {
31
30
  readonly packages: QueryClient["packages"];
32
31
  readonly transactions: QueryClient["transactions"];
33
32
  readonly watermark: QueryClient["watermark"];
34
- constructor(executor: PqsQueryExecutor, profile: PqsSchemaProfileV1, ready?: Promise<void>);
33
+ private readonly checkReadyAsync;
34
+ private readyPromise?;
35
+ constructor(executor: PqsQueryExecutor, profile: PqsSchemaProfileV1, readiness?: Promise<void> | (() => Promise<void>));
36
+ /**
37
+ * Awaits the readiness check, memoizing success so validation runs once,
38
+ * but clearing the memo on rejection so a transiently unreachable PQS is
39
+ * revalidated on the next query instead of pinning the first failure.
40
+ */
41
+ private ready;
35
42
  $queryRaw<TRow>(sql: string, values?: readonly unknown[]): Promise<readonly TRow[]>;
36
43
  cacheContracts(_args?: ContractCacheArgs): Promise<ContractCacheResult>;
37
44
  invalidateContractsCache(_args?: ContractCacheArgs): Promise<void>;
@@ -20,7 +20,6 @@ function normalizedUniqueAsFindMany(query) {
20
20
  export class PqsQueryClient {
21
21
  executor;
22
22
  profile;
23
- ready;
24
23
  source = QuerySource.pqs;
25
24
  contracts = {
26
25
  findMany: async (args = {}) => await this.findContractsAsync(normalizeFindMany("contracts", args)),
@@ -36,15 +35,31 @@ export class PqsQueryClient {
36
35
  packages = this.createPhysicalDelegate("__packages");
37
36
  transactions = this.createPhysicalDelegate("__transactions");
38
37
  watermark = this.createPhysicalDelegate("__watermark");
39
- constructor(executor, profile, ready = Promise.resolve()) {
38
+ checkReadyAsync;
39
+ readyPromise;
40
+ constructor(executor, profile, readiness = () => Promise.resolve()) {
40
41
  this.executor = executor;
41
42
  this.profile = profile;
42
- this.ready = ready;
43
+ this.checkReadyAsync = typeof readiness === "function" ? readiness : () => readiness;
44
+ }
45
+ /**
46
+ * Awaits the readiness check, memoizing success so validation runs once,
47
+ * but clearing the memo on rejection so a transiently unreachable PQS is
48
+ * revalidated on the next query instead of pinning the first failure.
49
+ */
50
+ ready() {
51
+ if (this.readyPromise === undefined) {
52
+ this.readyPromise = Promise.resolve(this.checkReadyAsync()).catch((cause) => {
53
+ this.readyPromise = undefined;
54
+ throw cause;
55
+ });
56
+ }
57
+ return this.readyPromise;
43
58
  }
44
59
  async $queryRaw(sql, values = []) {
45
60
  assertReadOnlySql(sql);
46
61
  try {
47
- await this.ready;
62
+ await this.ready();
48
63
  return (await this.executor.query(sql, values)).rows;
49
64
  }
50
65
  catch (cause) {
@@ -74,7 +89,7 @@ export class PqsQueryClient {
74
89
  async readPhysicalAsync(relation, query) {
75
90
  const compiled = compilePqsRelationFindMany(relation, query, this.profile);
76
91
  try {
77
- await this.ready;
92
+ await this.ready();
78
93
  return (await this.executor.query(compiled.text, compiled.values)).rows.map((row) => this.mapPhysicalRow(row, compiled.resultShape));
79
94
  }
80
95
  catch (cause) {
@@ -84,7 +99,7 @@ export class PqsQueryClient {
84
99
  async countPhysicalAsync(relation, query) {
85
100
  const compiled = compilePqsRelationCount(relation, query, this.profile);
86
101
  try {
87
- await this.ready;
102
+ await this.ready();
88
103
  return Number((await this.executor.query(compiled.text, compiled.values)).rows[0]?.count ?? 0);
89
104
  }
90
105
  catch (cause) {
@@ -94,7 +109,7 @@ export class PqsQueryClient {
94
109
  async aggregatePhysicalAsync(relation, query) {
95
110
  const compiled = compilePqsRelationAggregate(relation, query, this.profile);
96
111
  try {
97
- await this.ready;
112
+ await this.ready();
98
113
  const row = (await this.executor.query(compiled.text, compiled.values)).rows[0] ?? {};
99
114
  const result = {};
100
115
  if (query.aggregates.count)
@@ -112,7 +127,7 @@ export class PqsQueryClient {
112
127
  async groupPhysicalAsync(relation, query) {
113
128
  const compiled = compilePqsRelationGroupBy(relation, query, this.profile);
114
129
  try {
115
- await this.ready;
130
+ await this.ready();
116
131
  return (await this.executor.query(compiled.text, compiled.values)).rows.map((row) => Object.fromEntries(Object.entries(row).map(([name, value]) => [name, name === "count" ? Number(value) : value instanceof Date ? value : value === null ? null : String(value)])));
117
132
  }
118
133
  catch (cause) {
@@ -145,7 +160,7 @@ export class PqsQueryClient {
145
160
  async findContractsAsync(query) {
146
161
  const compiled = compileContractFindMany(query, this.profile);
147
162
  try {
148
- await this.ready;
163
+ await this.ready();
149
164
  return (await this.executor.query(compiled.text, compiled.values)).rows.map((row) => this.mapPhysicalRow(contractRootRow(row), compiled.resultShape, contractRootScalars(row)));
150
165
  }
151
166
  catch (cause) {
@@ -155,7 +170,7 @@ export class PqsQueryClient {
155
170
  async countContractsAsync(query) {
156
171
  const compiled = compileContractCount(query, this.profile);
157
172
  try {
158
- await this.ready;
173
+ await this.ready();
159
174
  return Number((await this.executor.query(compiled.text, compiled.values)).rows[0]?.count ?? 0);
160
175
  }
161
176
  catch (cause) {
@@ -165,7 +180,7 @@ export class PqsQueryClient {
165
180
  async aggregateContractsAsync(normalized) {
166
181
  const compiled = compileContractAggregate(normalized, this.profile);
167
182
  try {
168
- await this.ready;
183
+ await this.ready();
169
184
  const row = (await this.executor.query(compiled.text, compiled.values)).rows[0] ?? {};
170
185
  const result = {};
171
186
  if (normalized.aggregates.count)
@@ -183,7 +198,7 @@ export class PqsQueryClient {
183
198
  async groupContractsAsync(query) {
184
199
  const compiled = compileContractGroupBy(query, this.profile);
185
200
  try {
186
- await this.ready;
201
+ await this.ready();
187
202
  return (await this.executor.query(compiled.text, compiled.values)).rows.map((row) => Object.fromEntries(Object.entries(row).map(([name, value]) => [name, name === "count" ? Number(value) : value === null || typeof value === "string" || typeof value === "number" || typeof value === "boolean" || value instanceof Date ? value : String(value)])));
188
203
  }
189
204
  catch (cause) {
@@ -1,8 +1,10 @@
1
+ import { ListPartyToKeyMappingRequest } from "../../core/types/requests/list-party-to-key-mapping-request.js";
2
+ import { ListPartyToKeyMappingResponse } from "../../core/types/responses/list-party-to-key-mapping-response.js";
1
3
  import { ITransport } from "../../core/transports/transport.interface.js";
2
4
  import { RequestOptions } from "../../core/types/request-options.js";
3
5
  import { ListPartyToParticipantRequest } from "../../core/types/requests/list-party-to-participant-request.js";
4
6
  import { ListPartyToParticipantResponse } from "../../core/types/responses/list-party-to-participant-response.js";
5
- import type { ListAllV2Request, ListAllV2Response, ListAllRequest, ListAllResponse, ListAvailableStoresRequest, ListAvailableStoresResponse, ListLsuAnnouncementRequest, ListLsuAnnouncementResponse, ListLsuSequencerConnectionSuccessorRequest, ListLsuSequencerConnectionSuccessorResponse, ListMediatorSynchronizerStateRequest, ListMediatorSynchronizerStateResponse, ListSequencingParametersStateRequest, ListSequencingParametersStateResponse, ListSynchronizerParametersStateRequest, ListSynchronizerParametersStateResponse, ListVettedPackagesRequest as TopologyListVettedPackagesRequest, ListVettedPackagesResponse as TopologyListVettedPackagesResponse, ListPartyHostingLimitsRequest, ListPartyHostingLimitsResponse, ListParticipantSynchronizerPermissionRequest, ListParticipantSynchronizerPermissionResponse, ListSynchronizerTrustCertificateRequest, ListSynchronizerTrustCertificateResponse, ListPartyToKeyMappingRequest, ListPartyToKeyMappingResponse, ListOwnerToKeyMappingRequest, ListOwnerToKeyMappingResponse, ListDecentralizedNamespaceDefinitionRequest, ListDecentralizedNamespaceDefinitionResponse, ListNamespaceDelegationRequest, ListNamespaceDelegationResponse, ListSequencerSynchronizerStateRequest, ListSequencerSynchronizerStateResponse } from "../../transports/grpc/generated/canton/com/digitalasset/canton/topology/admin/v30/topology_manager_read_service.js";
7
+ import type { ListAllV2Request, ListAllV2Response, ListAllRequest, ListAllResponse, ListAvailableStoresRequest, ListAvailableStoresResponse, ListLsuAnnouncementRequest, ListLsuAnnouncementResponse, ListLsuSequencerConnectionSuccessorRequest, ListLsuSequencerConnectionSuccessorResponse, ListMediatorSynchronizerStateRequest, ListMediatorSynchronizerStateResponse, ListSequencingParametersStateRequest, ListSequencingParametersStateResponse, ListSynchronizerParametersStateRequest, ListSynchronizerParametersStateResponse, ListVettedPackagesRequest as TopologyListVettedPackagesRequest, ListVettedPackagesResponse as TopologyListVettedPackagesResponse, ListPartyHostingLimitsRequest, ListPartyHostingLimitsResponse, ListParticipantSynchronizerPermissionRequest, ListParticipantSynchronizerPermissionResponse, ListSynchronizerTrustCertificateRequest, ListSynchronizerTrustCertificateResponse, ListOwnerToKeyMappingRequest, ListOwnerToKeyMappingResponse, ListDecentralizedNamespaceDefinitionRequest, ListDecentralizedNamespaceDefinitionResponse, ListNamespaceDelegationRequest, ListNamespaceDelegationResponse, ListSequencerSynchronizerStateRequest, ListSequencerSynchronizerStateResponse } from "../../transports/grpc/generated/canton/com/digitalasset/canton/topology/admin/v30/topology_manager_read_service.js";
6
8
  export declare class TopologyManagerReadServiceClient {
7
9
  private readonly transport;
8
10
  constructor(transport: ITransport);
@@ -3,6 +3,7 @@ import { AllocatePartyRequest } from "../../core/types/requests/allocate-party-r
3
3
  import { GetActiveContractsRequest } from "../../core/types/requests/get-active-contracts-request.js";
4
4
  import { GetUserRequest } from "../../core/types/requests/get-user-request.js";
5
5
  import { ListKnownPartiesRequest } from "../../core/types/requests/list-known-parties-request.js";
6
+ import { ListPartyToKeyMappingRequest } from "../../core/types/requests/list-party-to-key-mapping-request.js";
6
7
  import { ListPartyToParticipantRequest } from "../../core/types/requests/list-party-to-participant-request.js";
7
8
  import { ListUserRightsRequest } from "../../core/types/requests/list-user-rights-request.js";
8
9
  import { ListUsersRequest } from "../../core/types/requests/list-users-request.js";
@@ -13,6 +14,7 @@ import { PreparedCommandSubmission } from "../../core/types/prepared-command-sub
13
14
  import { AllocatePartyResponse as SdkAllocatePartyResponse } from "../../core/types/responses/allocate-party-response.js";
14
15
  import { GetUserResponse } from "../../core/types/responses/get-user-response.js";
15
16
  import { ListKnownPartiesResponse as SdkListKnownPartiesResponse } from "../../core/types/responses/list-known-parties-response.js";
17
+ import { ListPartyToKeyMappingResponse } from "../../core/types/responses/list-party-to-key-mapping-response.js";
16
18
  import { ListPartyToParticipantResponse } from "../../core/types/responses/list-party-to-participant-response.js";
17
19
  import { ListUserRightsResponse } from "../../core/types/responses/list-user-rights-response.js";
18
20
  import { ListUsersResponse } from "../../core/types/responses/list-users-response.js";
@@ -50,7 +52,7 @@ import type { TrafficControlStateRequest, TrafficControlStateResponse } from "./
50
52
  import { ParticipantStatusRequest, ParticipantStatusResponse as ProtobufParticipantStatusResponse } from "./generated/canton/com/digitalasset/canton/admin/participant/v30/participant_status_service.js";
51
53
  import { ListKeyOwnersRequest as ProtobufListKeyOwnersRequest, ListKeyOwnersResponse as ProtobufListKeyOwnersResponse, ListPartiesRequest as ProtobufTopologyListPartiesRequest, ListPartiesResponse as ProtobufTopologyListPartiesResponse } from "./generated/canton/com/digitalasset/canton/topology/admin/v30/topology_aggregation_service.js";
52
54
  import type { AddTransactionsRequest as ProtobufAddTransactionsRequest, AddTransactionsResponse as ProtobufAddTransactionsResponse, AuthorizeRequest as ProtobufAuthorizeRequest, AuthorizeResponse as ProtobufAuthorizeResponse, CreateTemporaryTopologyStoreRequest as ProtobufCreateTemporaryTopologyStoreRequest, CreateTemporaryTopologyStoreResponse as ProtobufCreateTemporaryTopologyStoreResponse, DropTemporaryTopologyStoreRequest as ProtobufDropTemporaryTopologyStoreRequest, DropTemporaryTopologyStoreResponse as ProtobufDropTemporaryTopologyStoreResponse, GenerateTransactionsRequest as ProtobufGenerateTransactionsRequest, GenerateTransactionsResponse as ProtobufGenerateTransactionsResponse, ImportTopologySnapshotRequest as ProtobufImportTopologySnapshotRequest, ImportTopologySnapshotResponse as ProtobufImportTopologySnapshotResponse, ImportTopologySnapshotV2Request as ProtobufImportTopologySnapshotV2Request, ImportTopologySnapshotV2Response as ProtobufImportTopologySnapshotV2Response, SignTransactionsRequest as ProtobufSignTransactionsRequest, SignTransactionsResponse as ProtobufSignTransactionsResponse } from "./generated/canton/com/digitalasset/canton/topology/admin/v30/topology_manager_write_service.js";
53
- import { ListAllRequest as ProtobufTopologyListAllRequest, ListAllResponse as ProtobufTopologyListAllResponse, ListAllV2Request as ProtobufTopologyListAllV2Request, ListAllV2Response as ProtobufTopologyListAllV2Response, ListAvailableStoresRequest as ProtobufListAvailableStoresRequest, ListAvailableStoresResponse as ProtobufListAvailableStoresResponse, ListDecentralizedNamespaceDefinitionRequest as ProtobufListDecentralizedNamespaceDefinitionRequest, ListDecentralizedNamespaceDefinitionResponse as ProtobufListDecentralizedNamespaceDefinitionResponse, ListLsuAnnouncementRequest as ProtobufListLsuAnnouncementRequest, ListLsuAnnouncementResponse as ProtobufListLsuAnnouncementResponse, ListLsuSequencerConnectionSuccessorRequest as ProtobufListLsuSequencerConnectionSuccessorRequest, ListLsuSequencerConnectionSuccessorResponse as ProtobufListLsuSequencerConnectionSuccessorResponse, ListMediatorSynchronizerStateRequest as ProtobufListMediatorSynchronizerStateRequest, ListMediatorSynchronizerStateResponse as ProtobufListMediatorSynchronizerStateResponse, ListNamespaceDelegationRequest as ProtobufListNamespaceDelegationRequest, ListNamespaceDelegationResponse as ProtobufListNamespaceDelegationResponse, ListOwnerToKeyMappingRequest as ProtobufListOwnerToKeyMappingRequest, ListOwnerToKeyMappingResponse as ProtobufListOwnerToKeyMappingResponse, ListParticipantSynchronizerPermissionRequest as ProtobufListParticipantSynchronizerPermissionRequest, ListParticipantSynchronizerPermissionResponse as ProtobufListParticipantSynchronizerPermissionResponse, ListPartyHostingLimitsRequest as ProtobufListPartyHostingLimitsRequest, ListPartyHostingLimitsResponse as ProtobufListPartyHostingLimitsResponse, ListPartyToKeyMappingRequest as ProtobufListPartyToKeyMappingRequest, ListPartyToKeyMappingResponse as ProtobufListPartyToKeyMappingResponse, ListSequencerSynchronizerStateRequest as ProtobufListSequencerSynchronizerStateRequest, ListSequencerSynchronizerStateResponse as ProtobufListSequencerSynchronizerStateResponse, ListSequencingParametersStateRequest as ProtobufListSequencingParametersStateRequest, ListSequencingParametersStateResponse as ProtobufListSequencingParametersStateResponse, ListSynchronizerParametersStateRequest as ProtobufListSynchronizerParametersStateRequest, ListSynchronizerParametersStateResponse as ProtobufListSynchronizerParametersStateResponse, ListSynchronizerTrustCertificateRequest as ProtobufListSynchronizerTrustCertificateRequest, ListSynchronizerTrustCertificateResponse as ProtobufListSynchronizerTrustCertificateResponse, ListVettedPackagesRequest as ProtobufTopologyListVettedPackagesRequest, ListVettedPackagesResponse as ProtobufTopologyListVettedPackagesResponse } from "./generated/canton/com/digitalasset/canton/topology/admin/v30/topology_manager_read_service.js";
55
+ import { ListAllRequest as ProtobufTopologyListAllRequest, ListAllResponse as ProtobufTopologyListAllResponse, ListAllV2Request as ProtobufTopologyListAllV2Request, ListAllV2Response as ProtobufTopologyListAllV2Response, ListAvailableStoresRequest as ProtobufListAvailableStoresRequest, ListAvailableStoresResponse as ProtobufListAvailableStoresResponse, ListDecentralizedNamespaceDefinitionRequest as ProtobufListDecentralizedNamespaceDefinitionRequest, ListDecentralizedNamespaceDefinitionResponse as ProtobufListDecentralizedNamespaceDefinitionResponse, ListLsuAnnouncementRequest as ProtobufListLsuAnnouncementRequest, ListLsuAnnouncementResponse as ProtobufListLsuAnnouncementResponse, ListLsuSequencerConnectionSuccessorRequest as ProtobufListLsuSequencerConnectionSuccessorRequest, ListLsuSequencerConnectionSuccessorResponse as ProtobufListLsuSequencerConnectionSuccessorResponse, ListMediatorSynchronizerStateRequest as ProtobufListMediatorSynchronizerStateRequest, ListMediatorSynchronizerStateResponse as ProtobufListMediatorSynchronizerStateResponse, ListNamespaceDelegationRequest as ProtobufListNamespaceDelegationRequest, ListNamespaceDelegationResponse as ProtobufListNamespaceDelegationResponse, ListOwnerToKeyMappingRequest as ProtobufListOwnerToKeyMappingRequest, ListOwnerToKeyMappingResponse as ProtobufListOwnerToKeyMappingResponse, ListParticipantSynchronizerPermissionRequest as ProtobufListParticipantSynchronizerPermissionRequest, ListParticipantSynchronizerPermissionResponse as ProtobufListParticipantSynchronizerPermissionResponse, ListPartyHostingLimitsRequest as ProtobufListPartyHostingLimitsRequest, ListPartyHostingLimitsResponse as ProtobufListPartyHostingLimitsResponse, ListSequencerSynchronizerStateRequest as ProtobufListSequencerSynchronizerStateRequest, ListSequencerSynchronizerStateResponse as ProtobufListSequencerSynchronizerStateResponse, ListSequencingParametersStateRequest as ProtobufListSequencingParametersStateRequest, ListSequencingParametersStateResponse as ProtobufListSequencingParametersStateResponse, ListSynchronizerParametersStateRequest as ProtobufListSynchronizerParametersStateRequest, ListSynchronizerParametersStateResponse as ProtobufListSynchronizerParametersStateResponse, ListSynchronizerTrustCertificateRequest as ProtobufListSynchronizerTrustCertificateRequest, ListSynchronizerTrustCertificateResponse as ProtobufListSynchronizerTrustCertificateResponse, ListVettedPackagesRequest as ProtobufTopologyListVettedPackagesRequest, ListVettedPackagesResponse as ProtobufTopologyListVettedPackagesResponse } from "./generated/canton/com/digitalasset/canton/topology/admin/v30/topology_manager_read_service.js";
54
56
  export declare class GrpcTransport implements ITransport {
55
57
  private readonly operations;
56
58
  private disposed;
@@ -115,7 +117,7 @@ export declare class GrpcTransport implements ITransport {
115
117
  listNamespaceDelegationAsync(request: ProtobufListNamespaceDelegationRequest, options?: RequestOptions): Promise<ProtobufListNamespaceDelegationResponse>;
116
118
  listDecentralizedNamespaceDefinitionAsync(request: ProtobufListDecentralizedNamespaceDefinitionRequest, options?: RequestOptions): Promise<ProtobufListDecentralizedNamespaceDefinitionResponse>;
117
119
  listOwnerToKeyMappingAsync(request: ProtobufListOwnerToKeyMappingRequest, options?: RequestOptions): Promise<ProtobufListOwnerToKeyMappingResponse>;
118
- listPartyToKeyMappingAsync(request: ProtobufListPartyToKeyMappingRequest, options?: RequestOptions): Promise<ProtobufListPartyToKeyMappingResponse>;
120
+ listPartyToKeyMappingAsync(request: ListPartyToKeyMappingRequest, options?: RequestOptions): Promise<ListPartyToKeyMappingResponse>;
119
121
  listSynchronizerTrustCertificateAsync(request: ProtobufListSynchronizerTrustCertificateRequest, options?: RequestOptions): Promise<ProtobufListSynchronizerTrustCertificateResponse>;
120
122
  listParticipantSynchronizerPermissionAsync(request: ProtobufListParticipantSynchronizerPermissionRequest, options?: RequestOptions): Promise<ProtobufListParticipantSynchronizerPermissionResponse>;
121
123
  authorizeTopologyTransactionsAsync(request: ProtobufAuthorizeRequest, options?: RequestOptions): Promise<ProtobufAuthorizeResponse>;
@@ -10,7 +10,7 @@ import { createGrpcOperations, } from "./grpc-channel-factory.js";
10
10
  import { mapGrpcSubmitCommand, mapGrpcSubmitCommandsForTransactionRequest, mapGrpcSubmitCommandTransaction, mapGrpcSubmitCommandsRequest, } from "./mappers/commands-mapper.js";
11
11
  import { mapGrpcExecuteSubmissionAndWaitRequest, mapGrpcInteractiveSubmitCommand, mapGrpcPrepareSubmissionRequest, } from "./mappers/interactive-command-mapper.js";
12
12
  import { mapGrpcCreateParty, mapGrpcCreatePartyRequest, mapGrpcListParties, mapGrpcListPartiesRequest } from "./mappers/parties-mapper.js";
13
- import { mapGrpcListPartyToParticipantRequest, mapGrpcListPartyToParticipantResponse, } from "./mappers/topology-manager-read-mapper.js";
13
+ import { mapGrpcListPartyToKeyMappingRequest, mapGrpcListPartyToKeyMappingResponse, mapGrpcListPartyToParticipantRequest, mapGrpcListPartyToParticipantResponse, } from "./mappers/topology-manager-read-mapper.js";
14
14
  import { mapGrpcGetUser, mapGrpcGetUserRequest, mapGrpcListUserRights, mapGrpcListUserRightsRequest, mapGrpcListUsers, mapGrpcListUsersRequest, } from "./mappers/users-mapper.js";
15
15
  import { ObjectDisposedError } from "../../core/errors/object-disposed-error.js";
16
16
  export class GrpcTransport {
@@ -307,12 +307,12 @@ export class GrpcTransport {
307
307
  this.throwIfDisposed();
308
308
  let payload;
309
309
  try {
310
- payload = await this.operations.listPartyToKeyMappingAsync(request, options);
310
+ payload = await this.operations.listPartyToKeyMappingAsync(mapGrpcListPartyToKeyMappingRequest(request), options);
311
311
  }
312
312
  catch (error) {
313
313
  this.throwPartyTopologyReadCompatibilityError(error, "topologyManagerReadService.listPartyToKeyMappingAsync");
314
314
  }
315
- return payload;
315
+ return mapGrpcListPartyToKeyMappingResponse(payload);
316
316
  }
317
317
  async listSynchronizerTrustCertificateAsync(request, options) {
318
318
  this.throwIfDisposed();
@@ -2,12 +2,14 @@ import { AllocatePartyRequest } from "../../core/types/requests/allocate-party-r
2
2
  import { GetActiveContractsRequest } from "../../core/types/requests/get-active-contracts-request.js";
3
3
  import { GetUserRequest } from "../../core/types/requests/get-user-request.js";
4
4
  import { ListKnownPartiesRequest } from "../../core/types/requests/list-known-parties-request.js";
5
+ import { ListPartyToKeyMappingRequest } from "../../core/types/requests/list-party-to-key-mapping-request.js";
5
6
  import { ListPartyToParticipantRequest } from "../../core/types/requests/list-party-to-participant-request.js";
6
7
  import { ListUserRightsRequest } from "../../core/types/requests/list-user-rights-request.js";
7
8
  import { ListUsersRequest } from "../../core/types/requests/list-users-request.js";
8
9
  import { SubmitCommandsRequest } from "../../core/types/requests/submit-commands-request.js";
9
10
  import { AllocatePartyResponse } from "../../core/types/responses/allocate-party-response.js";
10
11
  import { GetUserResponse } from "../../core/types/responses/get-user-response.js";
12
+ import { ListPartyToKeyMappingResponse } from "../../core/types/responses/list-party-to-key-mapping-response.js";
11
13
  import { ListPartyToParticipantResponse } from "../../core/types/responses/list-party-to-participant-response.js";
12
14
  import { ListUserRightsResponse } from "../../core/types/responses/list-user-rights-response.js";
13
15
  import { ListUsersResponse } from "../../core/types/responses/list-users-response.js";
@@ -17,7 +19,7 @@ import type { GetContractRequest, GetContractResponse } from "../grpc/generated/
17
19
  import type { AddPartyAsyncRequest, AddPartyAsyncResponse, ClearPartyOnboardingFlagRequest, ClearPartyOnboardingFlagResponse, GetHighestOffsetByTimestampRequest, GetHighestOffsetByTimestampResponse } from "../grpc/generated/canton/com/digitalasset/canton/admin/participant/v30/party_management_service.js";
18
20
  import type { GetEventsByContractIdRequest, GetEventsByContractIdResponse } from "../grpc/generated/canton/com/daml/ledger/api/v2/event_query_service.js";
19
21
  import type { CurrentTimeRequest, CurrentTimeResponse, GetIdRequest, GetIdResponse } from "../grpc/generated/canton/com/digitalasset/canton/topology/admin/v30/initialization_service.js";
20
- import type { ListAllRequest, ListAllResponse, ListLsuAnnouncementRequest, ListLsuAnnouncementResponse, ListLsuSequencerConnectionSuccessorRequest, ListLsuSequencerConnectionSuccessorResponse, ListMediatorSynchronizerStateRequest, ListMediatorSynchronizerStateResponse, ListSequencingParametersStateRequest, ListSequencingParametersStateResponse, ListSynchronizerParametersStateRequest, ListSynchronizerParametersStateResponse, ListVettedPackagesRequest as TopologyListVettedPackagesRequest, ListVettedPackagesResponse as TopologyListVettedPackagesResponse, ListPartyHostingLimitsRequest, ListPartyHostingLimitsResponse, ListParticipantSynchronizerPermissionRequest, ListParticipantSynchronizerPermissionResponse, ListSynchronizerTrustCertificateRequest, ListSynchronizerTrustCertificateResponse, ListPartyToKeyMappingRequest, ListPartyToKeyMappingResponse, ListOwnerToKeyMappingRequest, ListOwnerToKeyMappingResponse, ListDecentralizedNamespaceDefinitionRequest, ListDecentralizedNamespaceDefinitionResponse, ListNamespaceDelegationRequest, ListNamespaceDelegationResponse, ListSequencerSynchronizerStateRequest, ListSequencerSynchronizerStateResponse } from "../grpc/generated/canton/com/digitalasset/canton/topology/admin/v30/topology_manager_read_service.js";
22
+ import type { ListAllRequest, ListAllResponse, ListLsuAnnouncementRequest, ListLsuAnnouncementResponse, ListLsuSequencerConnectionSuccessorRequest, ListLsuSequencerConnectionSuccessorResponse, ListMediatorSynchronizerStateRequest, ListMediatorSynchronizerStateResponse, ListSequencingParametersStateRequest, ListSequencingParametersStateResponse, ListSynchronizerParametersStateRequest, ListSynchronizerParametersStateResponse, ListVettedPackagesRequest as TopologyListVettedPackagesRequest, ListVettedPackagesResponse as TopologyListVettedPackagesResponse, ListPartyHostingLimitsRequest, ListPartyHostingLimitsResponse, ListParticipantSynchronizerPermissionRequest, ListParticipantSynchronizerPermissionResponse, ListSynchronizerTrustCertificateRequest, ListSynchronizerTrustCertificateResponse, ListOwnerToKeyMappingRequest, ListOwnerToKeyMappingResponse, ListDecentralizedNamespaceDefinitionRequest, ListDecentralizedNamespaceDefinitionResponse, ListNamespaceDelegationRequest, ListNamespaceDelegationResponse, ListSequencerSynchronizerStateRequest, ListSequencerSynchronizerStateResponse } from "../grpc/generated/canton/com/digitalasset/canton/topology/admin/v30/topology_manager_read_service.js";
21
23
  import type { GetParticipantIdRequest, GetParticipantIdResponse, GetPartiesRequest, GetPartiesResponse } from "../grpc/generated/canton/com/daml/ledger/api/v2/admin/party_management_service.js";
22
24
  import type { GetResourceLimitsRequest, GetResourceLimitsResponse } from "../grpc/generated/canton/com/digitalasset/canton/admin/participant/v30/resource_management_service.js";
23
25
  import type { GetNoWaitCommitmentsFromRequest, GetNoWaitCommitmentsFromResponse, GetParticipantScheduleRequest as GetParticipantPruningScheduleRequest, GetParticipantScheduleResponse as GetParticipantPruningScheduleResponse, GetScheduleRequest as GetPruningScheduleRequest, GetScheduleResponse as GetPruningScheduleResponse } from "../grpc/generated/canton/com/digitalasset/canton/admin/pruning/v30/pruning.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@distrohelena/canton-typescript-sdk",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",