@distrohelena/canton-explorer 0.1.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/.env.example +9 -0
- package/LICENSE +184 -0
- package/README.md +63 -0
- package/bin/canton-explorer.js +68 -0
- package/config/nodes.example.json +35 -0
- package/dist/public/assets/index-NfJYgVwb.css +1 -0
- package/dist/public/assets/index-ybPCCjei.js +1 -0
- package/dist/public/cantonexplorer.png +0 -0
- package/dist/public/favicon.svg +1 -0
- package/dist/public/icons.svg +24 -0
- package/dist/public/index.html +14 -0
- package/dist/scripts/list-local-parties.d.ts +1 -0
- package/dist/scripts/list-local-parties.js +64 -0
- package/dist/scripts/list-local-parties.js.map +1 -0
- package/dist/src/api/nodes.controller.d.ts +181 -0
- package/dist/src/api/nodes.controller.js +873 -0
- package/dist/src/api/nodes.controller.js.map +1 -0
- package/dist/src/app-bootstrap.d.ts +22 -0
- package/dist/src/app-bootstrap.js +52 -0
- package/dist/src/app-bootstrap.js.map +1 -0
- package/dist/src/app.module.d.ts +2 -0
- package/dist/src/app.module.js +48 -0
- package/dist/src/app.module.js.map +1 -0
- package/dist/src/cache/node-cache.service.d.ts +54 -0
- package/dist/src/cache/node-cache.service.js +154 -0
- package/dist/src/cache/node-cache.service.js.map +1 -0
- package/dist/src/config/node-config.schema.d.ts +100 -0
- package/dist/src/config/node-config.schema.js +83 -0
- package/dist/src/config/node-config.schema.js.map +1 -0
- package/dist/src/config/node-config.service.d.ts +7 -0
- package/dist/src/config/node-config.service.js +36 -0
- package/dist/src/config/node-config.service.js.map +1 -0
- package/dist/src/domain/node-health.d.ts +9 -0
- package/dist/src/domain/node-health.js +16 -0
- package/dist/src/domain/node-health.js.map +1 -0
- package/dist/src/domain/node.types.d.ts +563 -0
- package/dist/src/domain/node.types.js +3 -0
- package/dist/src/domain/node.types.js.map +1 -0
- package/dist/src/grpc/grpc-client.factory.d.ts +297 -0
- package/dist/src/grpc/grpc-client.factory.js +67 -0
- package/dist/src/grpc/grpc-client.factory.js.map +1 -0
- package/dist/src/grpc/grpc-error.util.d.ts +7 -0
- package/dist/src/grpc/grpc-error.util.js +31 -0
- package/dist/src/grpc/grpc-error.util.js.map +1 -0
- package/dist/src/grpc/grpc-operations.service.d.ts +96 -0
- package/dist/src/grpc/grpc-operations.service.js +844 -0
- package/dist/src/grpc/grpc-operations.service.js.map +1 -0
- package/dist/src/grpc/shared-secret-jwt.d.ts +6 -0
- package/dist/src/grpc/shared-secret-jwt.js +22 -0
- package/dist/src/grpc/shared-secret-jwt.js.map +1 -0
- package/dist/src/main.d.ts +1 -0
- package/dist/src/main.js +6 -0
- package/dist/src/main.js.map +1 -0
- package/dist/src/namespaces/namespace-fingerprint.service.d.ts +22 -0
- package/dist/src/namespaces/namespace-fingerprint.service.js +125 -0
- package/dist/src/namespaces/namespace-fingerprint.service.js.map +1 -0
- package/dist/src/orchestrator/node-poller.service.d.ts +26 -0
- package/dist/src/orchestrator/node-poller.service.js +224 -0
- package/dist/src/orchestrator/node-poller.service.js.map +1 -0
- package/dist/src/packages/daml-decoder.types.d.ts +69 -0
- package/dist/src/packages/daml-decoder.types.js +3 -0
- package/dist/src/packages/daml-decoder.types.js.map +1 -0
- package/dist/src/packages/daml-lf-archive-v2.descriptor.pb +0 -0
- package/dist/src/packages/daml-lf-archive.descriptor.pb +0 -0
- package/dist/src/packages/daml-lf-loader.d.ts +3 -0
- package/dist/src/packages/daml-lf-loader.js +51 -0
- package/dist/src/packages/daml-lf-loader.js.map +1 -0
- package/dist/src/packages/daml-lf-raw.util.d.ts +12 -0
- package/dist/src/packages/daml-lf-raw.util.js +117 -0
- package/dist/src/packages/daml-lf-raw.util.js.map +1 -0
- package/dist/src/packages/daml-lf-value.descriptor.pb +0 -0
- package/dist/src/packages/daml-value-decoder.service.d.ts +39 -0
- package/dist/src/packages/daml-value-decoder.service.js +463 -0
- package/dist/src/packages/daml-value-decoder.service.js.map +1 -0
- package/dist/src/packages/package-cache.service.d.ts +53 -0
- package/dist/src/packages/package-cache.service.js +288 -0
- package/dist/src/packages/package-cache.service.js.map +1 -0
- package/dist/src/packages/package-registry.service.d.ts +44 -0
- package/dist/src/packages/package-registry.service.js +625 -0
- package/dist/src/packages/package-registry.service.js.map +1 -0
- package/dist/src/packages/package-sync.service.d.ts +22 -0
- package/dist/src/packages/package-sync.service.js +129 -0
- package/dist/src/packages/package-sync.service.js.map +1 -0
- package/dist/src/packages/pqs-package.service.d.ts +9 -0
- package/dist/src/packages/pqs-package.service.js +118 -0
- package/dist/src/packages/pqs-package.service.js.map +1 -0
- package/dist/src/pqs/pqs-client.factory.d.ts +7 -0
- package/dist/src/pqs/pqs-client.factory.js +37 -0
- package/dist/src/pqs/pqs-client.factory.js.map +1 -0
- package/dist/src/pqs/pqs-summary.service.d.ts +229 -0
- package/dist/src/pqs/pqs-summary.service.js +4652 -0
- package/dist/src/pqs/pqs-summary.service.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +97 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.NodeConfigService = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const node_fs_1 = require("node:fs");
|
|
15
|
+
const node_path_1 = require("node:path");
|
|
16
|
+
const node_config_schema_1 = require("./node-config.schema");
|
|
17
|
+
let NodeConfigService = class NodeConfigService {
|
|
18
|
+
config;
|
|
19
|
+
constructor() {
|
|
20
|
+
const configPath = process.env.NODE_CONFIG_PATH ?? (0, node_path_1.resolve)(process.cwd(), 'config', 'nodes.local.json');
|
|
21
|
+
const fileContents = (0, node_fs_1.readFileSync)(configPath, 'utf8');
|
|
22
|
+
this.config = (0, node_config_schema_1.parseNodeConfigFile)(JSON.parse(fileContents));
|
|
23
|
+
}
|
|
24
|
+
list() {
|
|
25
|
+
return this.config.nodes;
|
|
26
|
+
}
|
|
27
|
+
getTokenMetadataConfig() {
|
|
28
|
+
return this.config.tokenMetadata;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
exports.NodeConfigService = NodeConfigService;
|
|
32
|
+
exports.NodeConfigService = NodeConfigService = __decorate([
|
|
33
|
+
(0, common_1.Injectable)(),
|
|
34
|
+
__metadata("design:paramtypes", [])
|
|
35
|
+
], NodeConfigService);
|
|
36
|
+
//# sourceMappingURL=node-config.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-config.service.js","sourceRoot":"","sources":["../../../src/config/node-config.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,qCAAuC;AACvC,yCAAoC;AACpC,6DAK8B;AAGvB,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IACX,MAAM,CAAiB;IAExC;QACE,MAAM,UAAU,GACd,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,IAAA,mBAAO,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,QAAQ,EAAE,kBAAkB,CAAC,CAAC;QACvF,MAAM,YAAY,GAAG,IAAA,sBAAY,EAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QACtD,IAAI,CAAC,MAAM,GAAG,IAAA,wCAAmB,EAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;IAC9D,CAAC;IAED,IAAI;QACF,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;IAC3B,CAAC;IAED,sBAAsB;QACpB,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC;IACnC,CAAC;CACF,CAAA;AAjBY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;;GACA,iBAAiB,CAiB7B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { NodeStatus } from './node.types';
|
|
2
|
+
export interface ComputeNodeStatusArgs {
|
|
3
|
+
pqsOk: boolean;
|
|
4
|
+
grpcRequired: boolean;
|
|
5
|
+
grpcOk: boolean;
|
|
6
|
+
isStale: boolean;
|
|
7
|
+
hasUsableSnapshot: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function computeNodeStatus(args: ComputeNodeStatusArgs): NodeStatus;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.computeNodeStatus = computeNodeStatus;
|
|
4
|
+
function computeNodeStatus(args) {
|
|
5
|
+
if (!args.pqsOk && !args.hasUsableSnapshot) {
|
|
6
|
+
return 'down';
|
|
7
|
+
}
|
|
8
|
+
if (args.isStale) {
|
|
9
|
+
return 'degraded';
|
|
10
|
+
}
|
|
11
|
+
if (args.grpcRequired && !args.grpcOk) {
|
|
12
|
+
return 'degraded';
|
|
13
|
+
}
|
|
14
|
+
return args.pqsOk ? 'healthy' : 'degraded';
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=node-health.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-health.js","sourceRoot":"","sources":["../../../src/domain/node-health.ts"],"names":[],"mappings":";;AAUA,8CAcC;AAdD,SAAgB,iBAAiB,CAAC,IAA2B;IAC3D,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAC3C,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;QACjB,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,IAAI,IAAI,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACtC,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC;AAC7C,CAAC"}
|
|
@@ -0,0 +1,563 @@
|
|
|
1
|
+
export type NodeRole = 'participant';
|
|
2
|
+
export type NodeMode = 'pqs_only' | 'pqs_with_grpc';
|
|
3
|
+
export type NodeStatus = 'healthy' | 'degraded' | 'down';
|
|
4
|
+
export interface SourceStatus {
|
|
5
|
+
ok: boolean;
|
|
6
|
+
checkedAt: string;
|
|
7
|
+
latencyMs: number | null;
|
|
8
|
+
message: string | null;
|
|
9
|
+
}
|
|
10
|
+
export interface LedgerSummary {
|
|
11
|
+
ledgerLabel: string;
|
|
12
|
+
pqsDatabase: string;
|
|
13
|
+
activeContractCount: number;
|
|
14
|
+
latestOffset: string | null;
|
|
15
|
+
latestEventAt: string | null;
|
|
16
|
+
totalUpdateCount: number;
|
|
17
|
+
}
|
|
18
|
+
export interface ServiceInfo {
|
|
19
|
+
target: string | null;
|
|
20
|
+
reachable: boolean;
|
|
21
|
+
healthCheckImplemented: boolean;
|
|
22
|
+
servingStatus: string | null;
|
|
23
|
+
}
|
|
24
|
+
export interface NodeActivitySample {
|
|
25
|
+
timestamp: string;
|
|
26
|
+
activityValue: number;
|
|
27
|
+
activeContractCount: number;
|
|
28
|
+
latestOffset: string | null;
|
|
29
|
+
}
|
|
30
|
+
export interface NodeActivitySeries {
|
|
31
|
+
nodeId: string;
|
|
32
|
+
label: string;
|
|
33
|
+
status: NodeStatus;
|
|
34
|
+
latestActiveContractCount: number;
|
|
35
|
+
samples: NodeActivitySample[];
|
|
36
|
+
}
|
|
37
|
+
export interface NodeActivityHistoryResponse {
|
|
38
|
+
generatedAt: string;
|
|
39
|
+
windowMinutes: number;
|
|
40
|
+
nodes: NodeActivitySeries[];
|
|
41
|
+
}
|
|
42
|
+
export interface NodeRecentUpdate {
|
|
43
|
+
eventOffset: string;
|
|
44
|
+
updateId: string;
|
|
45
|
+
recordTime: string | null;
|
|
46
|
+
parties: string[];
|
|
47
|
+
}
|
|
48
|
+
export interface NodeRecentUpdatesResponse {
|
|
49
|
+
nodeId: string;
|
|
50
|
+
label: string;
|
|
51
|
+
limit: number;
|
|
52
|
+
nextBefore: string | null;
|
|
53
|
+
nextAfter: string | null;
|
|
54
|
+
updates: NodeRecentUpdate[];
|
|
55
|
+
}
|
|
56
|
+
export interface GlobalRecentUpdate extends NodeRecentUpdate {
|
|
57
|
+
nodeId: string;
|
|
58
|
+
label: string;
|
|
59
|
+
}
|
|
60
|
+
export interface GlobalRecentUpdatesResponse {
|
|
61
|
+
limit: number;
|
|
62
|
+
nextBefore: string | null;
|
|
63
|
+
nextAfter: string | null;
|
|
64
|
+
updates: GlobalRecentUpdate[];
|
|
65
|
+
}
|
|
66
|
+
export interface SearchResultGroup<T> {
|
|
67
|
+
items: T[];
|
|
68
|
+
displayedCount: number;
|
|
69
|
+
truncated: boolean;
|
|
70
|
+
status: 'ok' | 'partial' | 'failed';
|
|
71
|
+
warnings: string[];
|
|
72
|
+
}
|
|
73
|
+
export interface SearchUpdateResult {
|
|
74
|
+
nodeId: string;
|
|
75
|
+
label: string;
|
|
76
|
+
eventOffset: string;
|
|
77
|
+
updateId: string;
|
|
78
|
+
recordTime: string | null;
|
|
79
|
+
parties: string[];
|
|
80
|
+
}
|
|
81
|
+
export interface SearchContractResult {
|
|
82
|
+
nodeId: string;
|
|
83
|
+
label: string;
|
|
84
|
+
contractId: string;
|
|
85
|
+
templateId: string | null;
|
|
86
|
+
createdRecordTime: string | null;
|
|
87
|
+
}
|
|
88
|
+
export interface SearchPartyResult {
|
|
89
|
+
partyId: string;
|
|
90
|
+
nodeIds: string[];
|
|
91
|
+
}
|
|
92
|
+
export interface SearchPackageIdResult {
|
|
93
|
+
packageId: string;
|
|
94
|
+
name: string | null;
|
|
95
|
+
version: string | null;
|
|
96
|
+
}
|
|
97
|
+
export interface SearchPackageNameResult {
|
|
98
|
+
name: string;
|
|
99
|
+
packages: Array<{
|
|
100
|
+
packageId: string;
|
|
101
|
+
version: string | null;
|
|
102
|
+
}>;
|
|
103
|
+
}
|
|
104
|
+
export interface SearchResultsResponse {
|
|
105
|
+
query: string;
|
|
106
|
+
updates: SearchResultGroup<SearchUpdateResult>;
|
|
107
|
+
contracts: SearchResultGroup<SearchContractResult>;
|
|
108
|
+
parties: SearchResultGroup<SearchPartyResult>;
|
|
109
|
+
packages: {
|
|
110
|
+
packageIds: SearchResultGroup<SearchPackageIdResult>;
|
|
111
|
+
packageNames: SearchResultGroup<SearchPackageNameResult>;
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
export interface NodeActiveContractSummary {
|
|
115
|
+
contractId: string;
|
|
116
|
+
templateId: string | null;
|
|
117
|
+
createdRecordTime: string | null;
|
|
118
|
+
}
|
|
119
|
+
export interface NodeContractsResponse {
|
|
120
|
+
nodeId: string;
|
|
121
|
+
label: string;
|
|
122
|
+
limit: number;
|
|
123
|
+
nextBefore: string | null;
|
|
124
|
+
nextAfter: string | null;
|
|
125
|
+
contracts: NodeActiveContractSummary[];
|
|
126
|
+
}
|
|
127
|
+
export interface GlobalContractSummary {
|
|
128
|
+
nodeId: string;
|
|
129
|
+
label: string;
|
|
130
|
+
contractId: string;
|
|
131
|
+
templateId: string | null;
|
|
132
|
+
recordTime: string | null;
|
|
133
|
+
}
|
|
134
|
+
export interface GlobalContractsResponse {
|
|
135
|
+
limit: number;
|
|
136
|
+
nextBefore: string | null;
|
|
137
|
+
nextAfter: string | null;
|
|
138
|
+
contracts: GlobalContractSummary[];
|
|
139
|
+
}
|
|
140
|
+
export interface TokenSummary {
|
|
141
|
+
tokenId: string;
|
|
142
|
+
name: string;
|
|
143
|
+
symbol: string | null;
|
|
144
|
+
issuer: string | null;
|
|
145
|
+
source: 'pqs' | 'grpc';
|
|
146
|
+
}
|
|
147
|
+
export interface TokensResponse {
|
|
148
|
+
limit: number;
|
|
149
|
+
nextBefore: string | null;
|
|
150
|
+
nextAfter: string | null;
|
|
151
|
+
tokens: TokenSummary[];
|
|
152
|
+
}
|
|
153
|
+
export interface TokenDetailResponse {
|
|
154
|
+
token: TokenSummary;
|
|
155
|
+
transfers: TokenTransferSummary[];
|
|
156
|
+
}
|
|
157
|
+
export interface TokenHolderObservedNode {
|
|
158
|
+
nodeId: string;
|
|
159
|
+
label: string;
|
|
160
|
+
}
|
|
161
|
+
export interface TokenHolderSummary {
|
|
162
|
+
partyId: string;
|
|
163
|
+
amount: string | null;
|
|
164
|
+
nodes: TokenHolderObservedNode[];
|
|
165
|
+
}
|
|
166
|
+
export interface TokenHoldersResponse {
|
|
167
|
+
tokenId: string;
|
|
168
|
+
limit: number;
|
|
169
|
+
nextBefore: string | null;
|
|
170
|
+
nextAfter: string | null;
|
|
171
|
+
holders: TokenHolderSummary[];
|
|
172
|
+
}
|
|
173
|
+
export interface TokenTransferObservedNode {
|
|
174
|
+
nodeId: string;
|
|
175
|
+
label: string;
|
|
176
|
+
eventOffset: string;
|
|
177
|
+
}
|
|
178
|
+
export interface TokenTransferSummary {
|
|
179
|
+
rowId?: string;
|
|
180
|
+
movementType?: string | null;
|
|
181
|
+
source?: 'pqs' | 'pqs_inferred_holding_v2';
|
|
182
|
+
tokenId: string;
|
|
183
|
+
tokenName: string;
|
|
184
|
+
amount: string | null;
|
|
185
|
+
sender: string | null;
|
|
186
|
+
receiver: string | null;
|
|
187
|
+
updateId: string;
|
|
188
|
+
recordTime: string | null;
|
|
189
|
+
nodes: TokenTransferObservedNode[];
|
|
190
|
+
}
|
|
191
|
+
export interface TokenTransfersResponse {
|
|
192
|
+
limit: number;
|
|
193
|
+
nextBefore: string | null;
|
|
194
|
+
nextAfter: string | null;
|
|
195
|
+
transfers: TokenTransferSummary[];
|
|
196
|
+
}
|
|
197
|
+
export interface NodeUpdateDetailMeta {
|
|
198
|
+
update_id: string;
|
|
199
|
+
record_time: string | number | null;
|
|
200
|
+
[key: string]: unknown;
|
|
201
|
+
}
|
|
202
|
+
export type NodeDecodeFailureReason = 'missing_package' | 'invalid_package' | 'unknown_template' | 'unknown_choice' | 'unknown_data_type' | 'decode_failure';
|
|
203
|
+
export type NodeDecodedDamlValue = string | number | boolean | {
|
|
204
|
+
kind: 'contract_id';
|
|
205
|
+
value: string;
|
|
206
|
+
} | {
|
|
207
|
+
kind: 'record';
|
|
208
|
+
fields: Array<{
|
|
209
|
+
label: string;
|
|
210
|
+
value: NodeDecodedDamlValue;
|
|
211
|
+
}>;
|
|
212
|
+
} | {
|
|
213
|
+
kind: 'variant';
|
|
214
|
+
constructor: string;
|
|
215
|
+
value: NodeDecodedDamlValue | null;
|
|
216
|
+
} | {
|
|
217
|
+
kind: 'enum';
|
|
218
|
+
constructor: string;
|
|
219
|
+
} | {
|
|
220
|
+
kind: 'list';
|
|
221
|
+
items: NodeDecodedDamlValue[];
|
|
222
|
+
} | {
|
|
223
|
+
kind: 'optional';
|
|
224
|
+
value: NodeDecodedDamlValue | null;
|
|
225
|
+
} | {
|
|
226
|
+
kind: 'text_map';
|
|
227
|
+
entries: Array<{
|
|
228
|
+
key: string;
|
|
229
|
+
value: NodeDecodedDamlValue;
|
|
230
|
+
}>;
|
|
231
|
+
} | {
|
|
232
|
+
kind: 'gen_map';
|
|
233
|
+
entries: Array<{
|
|
234
|
+
key: NodeDecodedDamlValue;
|
|
235
|
+
value: NodeDecodedDamlValue;
|
|
236
|
+
}>;
|
|
237
|
+
} | {
|
|
238
|
+
kind: 'unit';
|
|
239
|
+
};
|
|
240
|
+
export type NodeDecodeState<T> = {
|
|
241
|
+
status: 'decoded';
|
|
242
|
+
value: T;
|
|
243
|
+
} | {
|
|
244
|
+
status: 'invalid_data';
|
|
245
|
+
reason: NodeDecodeFailureReason;
|
|
246
|
+
} | {
|
|
247
|
+
status: 'not_available';
|
|
248
|
+
};
|
|
249
|
+
export interface NodeExerciseDecodeState {
|
|
250
|
+
argument: NodeDecodeState<NodeDecodedDamlValue>;
|
|
251
|
+
result: NodeDecodeState<NodeDecodedDamlValue>;
|
|
252
|
+
}
|
|
253
|
+
export interface NodeUpdateDetailEvent {
|
|
254
|
+
eventKind: 'create' | 'consuming_exercise' | 'non_consuming_exercise';
|
|
255
|
+
eventId: string | null;
|
|
256
|
+
contractId: string | null;
|
|
257
|
+
packageId?: string | null;
|
|
258
|
+
templateId: string | null;
|
|
259
|
+
choice: string | null;
|
|
260
|
+
witnesses: string[];
|
|
261
|
+
createData?: NodeDecodeState<NodeDecodedDamlValue> | null;
|
|
262
|
+
exerciseData?: NodeExerciseDecodeState | null;
|
|
263
|
+
raw: Record<string, unknown>;
|
|
264
|
+
}
|
|
265
|
+
export interface NodeUpdateDetailResponse {
|
|
266
|
+
nodeId: string;
|
|
267
|
+
label: string;
|
|
268
|
+
eventOffset: string;
|
|
269
|
+
updateId: string;
|
|
270
|
+
recordTime: string | null;
|
|
271
|
+
parties: string[];
|
|
272
|
+
meta: NodeUpdateDetailMeta;
|
|
273
|
+
events: NodeUpdateDetailEvent[];
|
|
274
|
+
}
|
|
275
|
+
export interface NodeContractDetailResponse {
|
|
276
|
+
nodeId: string;
|
|
277
|
+
label: string;
|
|
278
|
+
contractId: string;
|
|
279
|
+
templateId: string | null;
|
|
280
|
+
packageId: string | null;
|
|
281
|
+
packageName: string | null;
|
|
282
|
+
packageVersion: string | null;
|
|
283
|
+
createdUpdateId: string | null;
|
|
284
|
+
createdEventOffset: string | null;
|
|
285
|
+
createdRecordTime: string | null;
|
|
286
|
+
archivedUpdateId: string | null;
|
|
287
|
+
archivedEventOffset: string | null;
|
|
288
|
+
archivedRecordTime: string | null;
|
|
289
|
+
contractData: NodeDecodeState<NodeDecodedDamlValue> | null;
|
|
290
|
+
}
|
|
291
|
+
export interface PackageSeenOnNode {
|
|
292
|
+
nodeId: string;
|
|
293
|
+
packageName: string | null;
|
|
294
|
+
packageVersion: string | null;
|
|
295
|
+
seenAt: string;
|
|
296
|
+
}
|
|
297
|
+
export interface PackageTypeField {
|
|
298
|
+
name: string;
|
|
299
|
+
type: PackageTypeNode;
|
|
300
|
+
}
|
|
301
|
+
export interface PackageTypeConstructor {
|
|
302
|
+
name: string;
|
|
303
|
+
type: PackageTypeNode | null;
|
|
304
|
+
}
|
|
305
|
+
export interface PackageInterfaceMethod {
|
|
306
|
+
name: string;
|
|
307
|
+
type: PackageTypeNode | null;
|
|
308
|
+
}
|
|
309
|
+
export interface PackageInterfaceChoice {
|
|
310
|
+
name: string;
|
|
311
|
+
consuming: boolean;
|
|
312
|
+
argumentType: PackageTypeNode | null;
|
|
313
|
+
resultType: PackageTypeNode | null;
|
|
314
|
+
}
|
|
315
|
+
export interface PackageTypeNode {
|
|
316
|
+
kind: 'builtin' | 'type_var' | 'type_con' | 'record' | 'variant' | 'enum' | 'interface' | 'struct' | 'forall' | 'nat' | 'synonym' | 'unknown';
|
|
317
|
+
label: string;
|
|
318
|
+
packageId?: string | null;
|
|
319
|
+
typeId?: string | null;
|
|
320
|
+
arguments?: PackageTypeNode[];
|
|
321
|
+
typeParameters?: string[];
|
|
322
|
+
fields?: PackageTypeField[];
|
|
323
|
+
constructors?: PackageTypeConstructor[];
|
|
324
|
+
view?: PackageTypeNode | null;
|
|
325
|
+
requires?: PackageTypeNode[];
|
|
326
|
+
methods?: PackageInterfaceMethod[];
|
|
327
|
+
choices?: PackageInterfaceChoice[];
|
|
328
|
+
body?: PackageTypeNode | null;
|
|
329
|
+
definition?: PackageTypeNode | null;
|
|
330
|
+
note?: 'recursive_reference' | 'missing_definition' | 'unsupported';
|
|
331
|
+
}
|
|
332
|
+
export interface PackageTemplateSummary {
|
|
333
|
+
templateId: string;
|
|
334
|
+
moduleName: string;
|
|
335
|
+
entityName: string;
|
|
336
|
+
createType: PackageTypeNode | null;
|
|
337
|
+
}
|
|
338
|
+
export interface PackageDataTypeSummary {
|
|
339
|
+
typeId: string;
|
|
340
|
+
moduleName: string;
|
|
341
|
+
entityName: string;
|
|
342
|
+
definition: PackageTypeNode | null;
|
|
343
|
+
}
|
|
344
|
+
export interface PackageDetailResponse {
|
|
345
|
+
packageId: string;
|
|
346
|
+
name: string | null;
|
|
347
|
+
version: string | null;
|
|
348
|
+
uploadedAt: string | null;
|
|
349
|
+
packageSize: number | null;
|
|
350
|
+
status: 'decoded' | 'invalid_package' | 'missing_package';
|
|
351
|
+
seenOnNodes: PackageSeenOnNode[];
|
|
352
|
+
moduleCount: number;
|
|
353
|
+
templateCount: number;
|
|
354
|
+
dataTypeCount: number;
|
|
355
|
+
modules: string[];
|
|
356
|
+
templates: PackageTemplateSummary[];
|
|
357
|
+
dataTypes: PackageDataTypeSummary[];
|
|
358
|
+
}
|
|
359
|
+
export interface PackageFamilyEntry {
|
|
360
|
+
packageId: string;
|
|
361
|
+
name: string | null;
|
|
362
|
+
version: string | null;
|
|
363
|
+
uploadedAt: string | null;
|
|
364
|
+
packageSize: number | null;
|
|
365
|
+
}
|
|
366
|
+
export interface PackageFamilyResponse {
|
|
367
|
+
name: string;
|
|
368
|
+
packages: PackageFamilyEntry[];
|
|
369
|
+
}
|
|
370
|
+
export interface TemplateFilterEntry {
|
|
371
|
+
templateId: string;
|
|
372
|
+
}
|
|
373
|
+
export interface TemplateFilterResponse {
|
|
374
|
+
templates: TemplateFilterEntry[];
|
|
375
|
+
}
|
|
376
|
+
export interface NodeInstalledPackageEntry {
|
|
377
|
+
packageId: string;
|
|
378
|
+
version: string | null;
|
|
379
|
+
uploadedAt: string | null;
|
|
380
|
+
seenAt: string;
|
|
381
|
+
}
|
|
382
|
+
export interface NodeInstalledPackageGroup {
|
|
383
|
+
packageName: string;
|
|
384
|
+
packages: NodeInstalledPackageEntry[];
|
|
385
|
+
}
|
|
386
|
+
export type NodeParticipantStatusState = 'ok' | 'not_initialized' | 'grpc_not_configured' | 'grpc_error';
|
|
387
|
+
export type NodeParticipantStatusComponentSeverity = 'ok' | 'degraded' | 'failed' | 'fatal';
|
|
388
|
+
export type NodeParticipantSynchronizerHealth = 'unspecified' | 'healthy' | 'unhealthy';
|
|
389
|
+
export type NodeParticipantWaitingForExternalInput = 'unspecified' | 'id' | 'node_topology' | 'initialization';
|
|
390
|
+
export interface NodeParticipantStatusComponent {
|
|
391
|
+
name: string;
|
|
392
|
+
severity: NodeParticipantStatusComponentSeverity;
|
|
393
|
+
description: string | null;
|
|
394
|
+
}
|
|
395
|
+
export interface NodeParticipantTopologyQueues {
|
|
396
|
+
manager: number;
|
|
397
|
+
dispatcher: number;
|
|
398
|
+
clients: number;
|
|
399
|
+
}
|
|
400
|
+
export interface NodeParticipantConnectedSynchronizer {
|
|
401
|
+
physicalSynchronizerId: string | null;
|
|
402
|
+
health: NodeParticipantSynchronizerHealth;
|
|
403
|
+
}
|
|
404
|
+
export interface NodeParticipantStatusSummary {
|
|
405
|
+
uid: string | null;
|
|
406
|
+
uptime: string | null;
|
|
407
|
+
ports: Record<string, number>;
|
|
408
|
+
active: boolean;
|
|
409
|
+
commonStatusActive: boolean | null;
|
|
410
|
+
version: string | null;
|
|
411
|
+
supportedProtocolVersions: number[];
|
|
412
|
+
topologyQueues: NodeParticipantTopologyQueues | null;
|
|
413
|
+
components: NodeParticipantStatusComponent[];
|
|
414
|
+
connectedSynchronizers: NodeParticipantConnectedSynchronizer[];
|
|
415
|
+
}
|
|
416
|
+
export interface NodeParticipantNotInitializedSummary {
|
|
417
|
+
active: boolean;
|
|
418
|
+
waitingForExternalInput: NodeParticipantWaitingForExternalInput;
|
|
419
|
+
version: string | null;
|
|
420
|
+
}
|
|
421
|
+
export interface NodeParticipantStatusResponse {
|
|
422
|
+
nodeId: string;
|
|
423
|
+
label: string;
|
|
424
|
+
mode: NodeMode;
|
|
425
|
+
participantStatusStatus: NodeParticipantStatusState;
|
|
426
|
+
participantStatus: NodeParticipantStatusSummary | null;
|
|
427
|
+
notInitialized: NodeParticipantNotInitializedSummary | null;
|
|
428
|
+
participantStatusError: string | null;
|
|
429
|
+
participantStatusErrorCode: string | null;
|
|
430
|
+
participantStatusErrorDetails: string | null;
|
|
431
|
+
participantStatusErrorTid: string | null;
|
|
432
|
+
}
|
|
433
|
+
export interface NodePackagesResponse {
|
|
434
|
+
nodeId: string;
|
|
435
|
+
label: string;
|
|
436
|
+
packagesByName: NodeInstalledPackageGroup[];
|
|
437
|
+
}
|
|
438
|
+
export interface ActivePartiesNodeEntry {
|
|
439
|
+
nodeId: string;
|
|
440
|
+
label: string;
|
|
441
|
+
mode: NodeMode;
|
|
442
|
+
parties: string[];
|
|
443
|
+
localPartiesStatus?: 'ok' | 'grpc_not_configured' | 'grpc_error';
|
|
444
|
+
localPartiesError?: string | null;
|
|
445
|
+
localPartiesErrorCode?: string | null;
|
|
446
|
+
localPartiesErrorDetails?: string | null;
|
|
447
|
+
localPartiesErrorTid?: string | null;
|
|
448
|
+
}
|
|
449
|
+
export interface ActivePartiesResponse {
|
|
450
|
+
nodes: ActivePartiesNodeEntry[];
|
|
451
|
+
}
|
|
452
|
+
export interface NodePartyFingerprintsEntry {
|
|
453
|
+
nodeId: string;
|
|
454
|
+
label: string;
|
|
455
|
+
mode: NodeMode;
|
|
456
|
+
source: 'pqs' | 'grpc';
|
|
457
|
+
limit: number;
|
|
458
|
+
nextBefore: string | null;
|
|
459
|
+
nextAfter: string | null;
|
|
460
|
+
fingerprints: string[];
|
|
461
|
+
}
|
|
462
|
+
export interface PartyFingerprintsResponse {
|
|
463
|
+
source: 'pqs' | 'grpc';
|
|
464
|
+
limit: number;
|
|
465
|
+
nextBefore: string | null;
|
|
466
|
+
nextAfter: string | null;
|
|
467
|
+
fingerprints: string[];
|
|
468
|
+
}
|
|
469
|
+
export interface PartyNodeSummary {
|
|
470
|
+
nodeId: string;
|
|
471
|
+
label: string;
|
|
472
|
+
recentUpdateCount: number;
|
|
473
|
+
recentContractCount: number;
|
|
474
|
+
}
|
|
475
|
+
export interface PartyRecentUpdate {
|
|
476
|
+
nodeId: string;
|
|
477
|
+
label: string;
|
|
478
|
+
eventOffset: string;
|
|
479
|
+
updateId: string;
|
|
480
|
+
recordTime: string | null;
|
|
481
|
+
parties: string[];
|
|
482
|
+
}
|
|
483
|
+
export interface PartyRecentContract {
|
|
484
|
+
nodeId: string;
|
|
485
|
+
label: string;
|
|
486
|
+
contractId: string;
|
|
487
|
+
templateId: string | null;
|
|
488
|
+
packageId: string | null;
|
|
489
|
+
packageName: string | null;
|
|
490
|
+
packageVersion: string | null;
|
|
491
|
+
recordTime: string | null;
|
|
492
|
+
}
|
|
493
|
+
export interface PartyContractsResponse {
|
|
494
|
+
limit: number;
|
|
495
|
+
nextBefore: string | null;
|
|
496
|
+
nextAfter: string | null;
|
|
497
|
+
contracts: PartyRecentContract[];
|
|
498
|
+
}
|
|
499
|
+
export interface PartyTopologyParticipantMapping {
|
|
500
|
+
participantId: string | null;
|
|
501
|
+
participantUid: string | null;
|
|
502
|
+
permission: string | null;
|
|
503
|
+
threshold: number | null;
|
|
504
|
+
synchronizerIds: string[];
|
|
505
|
+
}
|
|
506
|
+
export interface PartyTopologyKeyMapping {
|
|
507
|
+
keyFingerprint: string | null;
|
|
508
|
+
publicKey: string | null;
|
|
509
|
+
purpose: string | null;
|
|
510
|
+
keyType: string | null;
|
|
511
|
+
keyFormat: string | null;
|
|
512
|
+
keySpec: string | null;
|
|
513
|
+
threshold: number | null;
|
|
514
|
+
synchronizerIds: string[];
|
|
515
|
+
}
|
|
516
|
+
export type PartyTopologyNodeStatus = 'ok' | 'grpc_not_configured' | 'grpc_error';
|
|
517
|
+
export interface PartyTopologyNodeEntry {
|
|
518
|
+
nodeId: string;
|
|
519
|
+
label: string;
|
|
520
|
+
status: PartyTopologyNodeStatus;
|
|
521
|
+
errorMessage: string | null;
|
|
522
|
+
isLocalParty?: boolean | null;
|
|
523
|
+
partyToParticipants: PartyTopologyParticipantMapping[];
|
|
524
|
+
partyToKeyMappings: PartyTopologyKeyMapping[];
|
|
525
|
+
}
|
|
526
|
+
export interface PartyDetailResponse {
|
|
527
|
+
partyId: string;
|
|
528
|
+
nodeCount: number;
|
|
529
|
+
recentUpdateCount: number;
|
|
530
|
+
recentContractCount: number;
|
|
531
|
+
nodes: PartyNodeSummary[];
|
|
532
|
+
recentUpdates: PartyRecentUpdate[];
|
|
533
|
+
recentContracts: PartyRecentContract[];
|
|
534
|
+
partyTopologyByNode: PartyTopologyNodeEntry[];
|
|
535
|
+
}
|
|
536
|
+
export interface NamespacePartySummary {
|
|
537
|
+
partyId: string;
|
|
538
|
+
}
|
|
539
|
+
export interface NamespacePartiesResponse {
|
|
540
|
+
namespaceId: string;
|
|
541
|
+
partyCount: number;
|
|
542
|
+
limit: number;
|
|
543
|
+
nextBefore: string | null;
|
|
544
|
+
nextAfter: string | null;
|
|
545
|
+
parties: NamespacePartySummary[];
|
|
546
|
+
}
|
|
547
|
+
export interface NamespaceNodeSummary {
|
|
548
|
+
nodeId: string;
|
|
549
|
+
label: string;
|
|
550
|
+
recentUpdateCount: number;
|
|
551
|
+
recentContractCount: number;
|
|
552
|
+
}
|
|
553
|
+
export interface NamespaceDetailResponse {
|
|
554
|
+
namespaceId: string;
|
|
555
|
+
partyCount: number;
|
|
556
|
+
nodeCount: number;
|
|
557
|
+
recentUpdateCount: number;
|
|
558
|
+
recentContractCount: number;
|
|
559
|
+
nodes: NamespaceNodeSummary[];
|
|
560
|
+
recentUpdates: PartyRecentUpdate[];
|
|
561
|
+
recentContracts: PartyRecentContract[];
|
|
562
|
+
topologyByNode: PartyTopologyNodeEntry[];
|
|
563
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.types.js","sourceRoot":"","sources":["../../../src/domain/node.types.ts"],"names":[],"mappings":""}
|