@distrohelena/canton-typescript-sdk 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +333 -1
- package/dist/client/canton-client-options.d.ts +3 -0
- package/dist/client/canton-client-options.js +2 -0
- package/dist/client/service-registry.js +4 -3
- package/dist/core/errors/grpc-transport-error.d.ts +14 -0
- package/dist/core/errors/grpc-transport-error.js +76 -0
- package/dist/core/signing/sign-command-request.d.ts +4 -0
- package/dist/core/signing/sign-command-request.js +4 -0
- package/dist/core/signing/sign-command-result.d.ts +2 -0
- package/dist/core/signing/sign-command-result.js +9 -0
- package/dist/core/transports/transport.interface.d.ts +2 -2
- package/dist/core/types/canton-hash-purpose.d.ts +2 -1
- package/dist/core/types/canton-hash-purpose.js +1 -0
- package/dist/core/types/commands/create-and-exercise-command.js +1 -1
- package/dist/core/types/commands/exercise-by-key-command.js +2 -2
- package/dist/core/types/commands/exercise-command.js +2 -2
- package/dist/core/types/daml-numeric.d.ts +6 -0
- package/dist/core/types/daml-numeric.js +14 -0
- package/dist/core/types/daml-party.d.ts +6 -0
- package/dist/core/types/daml-party.js +14 -0
- package/dist/core/types/requests/create-decentralized-party-request.d.ts +41 -0
- package/dist/core/types/requests/create-decentralized-party-request.js +82 -0
- package/dist/core/types/requests/create-external-party-request.d.ts +42 -0
- package/dist/core/types/requests/create-external-party-request.js +47 -0
- package/dist/core/types/requests/finalize-decentralized-party-request.d.ts +39 -0
- package/dist/core/types/requests/finalize-decentralized-party-request.js +42 -0
- package/dist/core/types/requests/get-active-contracts-page-request.d.ts +15 -2
- package/dist/core/types/requests/get-active-contracts-page-request.js +4 -0
- package/dist/core/types/requests/submit-command-request.d.ts +2 -0
- package/dist/core/types/requests/submit-command-request.js +2 -0
- package/dist/core/types/topology/topology-signature-format.d.ts +2 -1
- package/dist/core/types/topology/topology-signature-format.js +1 -0
- package/dist/daml-lf/container/dar-archive-entry.d.ts +8 -0
- package/dist/daml-lf/container/dar-archive-entry.js +8 -0
- package/dist/daml-lf/container/dar-archive-loader.js +14 -0
- package/dist/daml-lf/container/dar-archive.d.ts +6 -0
- package/dist/daml-lf/container/dar-archive.js +4 -0
- package/dist/daml-lf/container/dar-source-bundle-loader.d.ts +5 -0
- package/dist/daml-lf/container/dar-source-bundle-loader.js +33 -0
- package/dist/daml-lf/container/dar-source-bundle.d.ts +45 -0
- package/dist/daml-lf/container/dar-source-bundle.js +11 -0
- package/dist/daml-lf/container/dar-source-file-entry.d.ts +8 -0
- package/dist/daml-lf/container/dar-source-file-entry.js +8 -0
- package/dist/daml-lf/daml-lf-compilation.d.ts +12 -0
- package/dist/daml-lf/daml-lf-compilation.js +35 -0
- package/dist/daml-lf/index.d.ts +11 -0
- package/dist/daml-lf/index.js +10 -0
- package/dist/daml-lf/interpreter/daml-lf-builtin-dispatch.d.ts +43 -0
- package/dist/daml-lf/interpreter/daml-lf-builtin-dispatch.js +933 -0
- package/dist/daml-lf/interpreter/daml-lf-evaluator.d.ts +95 -0
- package/dist/daml-lf/interpreter/daml-lf-evaluator.js +1131 -0
- package/dist/daml-lf/interpreter/daml-lf-interpreter-scaffold.d.ts +3 -0
- package/dist/daml-lf/interpreter/daml-lf-interpreter-scaffold.js +6 -1
- package/dist/daml-lf/interpreter/daml-lf-lexical-scope.d.ts +13 -0
- package/dist/daml-lf/interpreter/daml-lf-lexical-scope.js +46 -0
- package/dist/daml-lf/interpreter/daml-lf-runtime-frame.d.ts +16 -0
- package/dist/daml-lf/interpreter/daml-lf-runtime-frame.js +15 -0
- package/dist/daml-lf/interpreter/daml-lf-runtime-value.d.ts +21 -0
- package/dist/daml-lf/interpreter/daml-lf-runtime-value.js +4 -1
- package/dist/daml-lf/interpreter/daml-lf-step-kind.d.ts +7 -0
- package/dist/daml-lf/interpreter/daml-lf-step-kind.js +8 -0
- package/dist/daml-lf/interpreter/daml-lf-trace-sink.interface.d.ts +30 -0
- package/dist/daml-lf/interpreter/daml-lf-trace-sink.interface.js +1 -0
- package/dist/daml-lf/model/daml-lf-builtin-type.d.ts +3 -0
- package/dist/daml-lf/model/daml-lf-builtin-type.js +3 -0
- package/dist/daml-lf/model/daml-lf-choice.d.ts +5 -0
- package/dist/daml-lf/model/daml-lf-choice.js +4 -0
- package/dist/daml-lf/model/daml-lf-expression-path.d.ts +2 -0
- package/dist/daml-lf/model/daml-lf-expression-path.js +81 -0
- package/dist/daml-lf/model/daml-lf-expression.d.ts +146 -0
- package/dist/daml-lf/model/daml-lf-expression.js +71 -0
- package/dist/daml-lf/model/daml-lf-template.d.ts +2 -0
- package/dist/daml-lf/model/daml-lf-template.js +2 -0
- package/dist/daml-lf/model/daml-lf-type.d.ts +2 -0
- package/dist/daml-lf/model/daml-lf-type.js +4 -0
- package/dist/daml-lf/model/lf-2-model-mapper.d.ts +5 -0
- package/dist/daml-lf/model/lf-2-model-mapper.js +445 -12
- package/dist/debugger/errors/replay-determinism.exception.d.ts +3 -0
- package/dist/debugger/errors/replay-determinism.exception.js +3 -0
- package/dist/debugger/errors/replay-missing-package.exception.d.ts +3 -0
- package/dist/debugger/errors/replay-missing-package.exception.js +3 -0
- package/dist/debugger/errors/replay-missing-source.exception.d.ts +3 -0
- package/dist/debugger/errors/replay-missing-source.exception.js +3 -0
- package/dist/debugger/errors/replay-source-map.exception.d.ts +3 -0
- package/dist/debugger/errors/replay-source-map.exception.js +3 -0
- package/dist/debugger/errors/replay-state-hydration.exception.d.ts +3 -0
- package/dist/debugger/errors/replay-state-hydration.exception.js +3 -0
- package/dist/debugger/errors/replay-unsupported-lf-construct.exception.d.ts +3 -0
- package/dist/debugger/errors/replay-unsupported-lf-construct.exception.js +3 -0
- package/dist/debugger/errors/replay-unsupported-update.exception.d.ts +3 -0
- package/dist/debugger/errors/replay-unsupported-update.exception.js +3 -0
- package/dist/debugger/index.d.ts +31 -0
- package/dist/debugger/index.js +31 -0
- package/dist/debugger/ledger-replay-debugger-client.d.ts +31 -0
- package/dist/debugger/ledger-replay-debugger-client.js +53 -0
- package/dist/debugger/replay/ledger-replay-environment-builder.d.ts +95 -0
- package/dist/debugger/replay/ledger-replay-environment-builder.js +249 -0
- package/dist/debugger/replay/ledger-replay-session-loader.d.ts +78 -0
- package/dist/debugger/replay/ledger-replay-session-loader.js +565 -0
- package/dist/debugger/replay/replay-artifact-resolver.d.ts +30 -0
- package/dist/debugger/replay/replay-artifact-resolver.js +210 -0
- package/dist/debugger/replay/replay-determinism-validator.d.ts +12 -0
- package/dist/debugger/replay/replay-determinism-validator.js +161 -0
- package/dist/debugger/replay/replay-entrypoint-definition-resolver.d.ts +40 -0
- package/dist/debugger/replay/replay-entrypoint-definition-resolver.js +337 -0
- package/dist/debugger/replay/replay-entrypoint.d.ts +22 -0
- package/dist/debugger/replay/replay-entrypoint.js +14 -0
- package/dist/debugger/replay/replay-ledger-value-normalizer.d.ts +7 -0
- package/dist/debugger/replay/replay-ledger-value-normalizer.js +194 -0
- package/dist/debugger/replay/replay-update-loader.d.ts +24 -0
- package/dist/debugger/replay/replay-update-loader.js +94 -0
- package/dist/debugger/replay/replay-update-visibility-validator.d.ts +19 -0
- package/dist/debugger/replay/replay-update-visibility-validator.js +19 -0
- package/dist/debugger/session/in-memory-replay-session-store.d.ts +27 -0
- package/dist/debugger/session/in-memory-replay-session-store.js +109 -0
- package/dist/debugger/session/replay-phase.d.ts +7 -0
- package/dist/debugger/session/replay-phase.js +8 -0
- package/dist/debugger/session/replay-scope.d.ts +10 -0
- package/dist/debugger/session/replay-scope.js +10 -0
- package/dist/debugger/session/replay-session-metadata.d.ts +10 -0
- package/dist/debugger/session/replay-session-metadata.js +10 -0
- package/dist/debugger/session/replay-session-request.d.ts +6 -0
- package/dist/debugger/session/replay-session-request.js +10 -0
- package/dist/debugger/session/replay-session.d.ts +12 -0
- package/dist/debugger/session/replay-session.js +10 -0
- package/dist/debugger/session/replay-source-location.d.ts +17 -0
- package/dist/debugger/session/replay-source-location.js +16 -0
- package/dist/debugger/session/replay-stack-frame.d.ts +8 -0
- package/dist/debugger/session/replay-stack-frame.js +8 -0
- package/dist/debugger/session/replay-state-delta.d.ts +29 -0
- package/dist/debugger/session/replay-state-delta.js +24 -0
- package/dist/debugger/session/replay-step-advance-result.d.ts +24 -0
- package/dist/debugger/session/replay-step-advance-result.js +16 -0
- package/dist/debugger/session/replay-step.d.ts +30 -0
- package/dist/debugger/session/replay-step.js +24 -0
- package/dist/debugger/session/replay-value-preview.d.ts +8 -0
- package/dist/debugger/session/replay-value-preview.js +15 -0
- package/dist/debugger/source/daml-source-mapper.d.ts +12 -0
- package/dist/debugger/source/daml-source-mapper.js +21 -0
- package/dist/debugger/source/dar-source-map-metadata.d.ts +26 -0
- package/dist/debugger/source/dar-source-map-metadata.js +10 -0
- package/dist/debugger/source/source-coverage-validator.d.ts +8 -0
- package/dist/debugger/source/source-coverage-validator.js +16 -0
- package/dist/debugger/source/source-indexed-compilation.d.ts +45 -0
- package/dist/debugger/source/source-indexed-compilation.js +110 -0
- package/dist/debugger/source/source-mapping-precision.d.ts +5 -0
- package/dist/debugger/source/source-mapping-precision.js +4 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +12 -0
- package/dist/query/cache/memory-query-cache.d.ts +9 -0
- package/dist/query/cache/memory-query-cache.js +24 -0
- package/dist/query/cache/query-cache-store.d.ts +5 -0
- package/dist/query/cache/query-cache-store.js +1 -0
- package/dist/query/canton-manager-options.d.ts +17 -0
- package/dist/query/canton-manager-options.js +1 -0
- package/dist/query/canton-manager.d.ts +11 -0
- package/dist/query/canton-manager.js +42 -0
- package/dist/query/errors/pqs-query-error.d.ts +10 -0
- package/dist/query/errors/pqs-query-error.js +11 -0
- package/dist/query/errors/pqs-schema-profile-error.d.ts +3 -0
- package/dist/query/errors/pqs-schema-profile-error.js +3 -0
- package/dist/query/errors/query-capability-error.d.ts +7 -0
- package/dist/query/errors/query-capability-error.js +10 -0
- package/dist/query/grpc/grpc-contract-query-client.d.ts +32 -0
- package/dist/query/grpc/grpc-contract-query-client.js +126 -0
- package/dist/query/model-types.d.ts +258 -0
- package/dist/query/model-types.js +14 -0
- package/dist/query/pqs/pqs-pool.d.ts +13 -0
- package/dist/query/pqs/pqs-pool.js +18 -0
- package/dist/query/pqs/pqs-query-client.d.ts +49 -0
- package/dist/query/pqs/pqs-query-client.js +324 -0
- package/dist/query/pqs/pqs-schema-profile.d.ts +25 -0
- package/dist/query/pqs/pqs-schema-profile.js +120 -0
- package/dist/query/pqs/pqs-sql-compiler.d.ts +7 -0
- package/dist/query/pqs/pqs-sql-compiler.js +132 -0
- package/dist/query/pqs/read-only-sql.d.ts +1 -0
- package/dist/query/pqs/read-only-sql.js +35 -0
- package/dist/query/query-client.d.ts +61 -0
- package/dist/query/query-client.js +1 -0
- package/dist/query/query-source.d.ts +4 -0
- package/dist/query/query-source.js +5 -0
- package/dist/services/commands/command-payload-builder.js +3 -3
- package/dist/services/commands/command-submission-pipeline.js +1 -7
- package/dist/services/party-management/decentralized-party-lifecycle.d.ts +6 -0
- package/dist/services/party-management/decentralized-party-lifecycle.js +82 -0
- package/dist/services/party-management/party-management-service-client.d.ts +16 -1
- package/dist/services/party-management/party-management-service-client.js +142 -1
- package/dist/services/topology-manager-write/topology-signed-transaction-assembler.js +4 -0
- package/dist/testing/campaign/campaign-artifact.d.ts +20 -0
- package/dist/testing/campaign/campaign-artifact.js +147 -0
- package/dist/testing/campaign/campaign-definition.d.ts +9 -0
- package/dist/testing/campaign/campaign-definition.js +78 -0
- package/dist/testing/campaign/campaign-metrics.d.ts +32 -0
- package/dist/testing/campaign/campaign-metrics.js +26 -0
- package/dist/testing/campaign/campaign-model.d.ts +11 -0
- package/dist/testing/campaign/campaign-model.js +21 -0
- package/dist/testing/campaign/campaign-runner.d.ts +99 -0
- package/dist/testing/campaign/campaign-runner.js +194 -0
- package/dist/testing/campaign/campaign-scheduler.d.ts +40 -0
- package/dist/testing/campaign/campaign-scheduler.js +75 -0
- package/dist/testing/campaign/campaign-types.d.ts +52 -0
- package/dist/testing/campaign/campaign-types.js +11 -0
- package/dist/testing/daml/daml-action-arbitrary.d.ts +13 -0
- package/dist/testing/daml/daml-action-arbitrary.js +24 -0
- package/dist/testing/daml/daml-choice-action-arbitrary.d.ts +18 -0
- package/dist/testing/daml/daml-choice-action-arbitrary.js +27 -0
- package/dist/testing/daml/daml-create-action-arbitrary.d.ts +19 -0
- package/dist/testing/daml/daml-create-action-arbitrary.js +34 -0
- package/dist/testing/daml/daml-testing-catalog.d.ts +38 -0
- package/dist/testing/daml/daml-testing-catalog.js +40 -0
- package/dist/testing/daml/daml-value-arbitrary.d.ts +8 -0
- package/dist/testing/daml/daml-value-arbitrary.js +43 -0
- package/dist/testing/daml/declarative-campaign-arbitrary.d.ts +15 -0
- package/dist/testing/daml/declarative-campaign-arbitrary.js +30 -0
- package/dist/testing/errors/invariant-campaign-failure.d.ts +24 -0
- package/dist/testing/errors/invariant-campaign-failure.js +37 -0
- package/dist/testing/errors/testing-configuration-error.d.ts +3 -0
- package/dist/testing/errors/testing-configuration-error.js +6 -0
- package/dist/testing/handlers/handler.d.ts +19 -0
- package/dist/testing/handlers/handler.js +31 -0
- package/dist/testing/index.d.ts +22 -0
- package/dist/testing/index.js +22 -0
- package/dist/testing/runtime/campaign-isolation.d.ts +14 -0
- package/dist/testing/runtime/campaign-isolation.js +23 -0
- package/dist/testing/runtime/canton-test-runtime.d.ts +58 -0
- package/dist/testing/runtime/canton-test-runtime.js +138 -0
- package/dist/testing/runtime/declarative-action-executor.d.ts +16 -0
- package/dist/testing/runtime/declarative-action-executor.js +41 -0
- package/dist/testing/targets/target.d.ts +49 -0
- package/dist/testing/targets/target.js +121 -0
- package/dist/transports/grpc/grpc-channel-factory.d.ts +4 -0
- package/dist/transports/grpc/grpc-channel-factory.js +42 -1
- package/dist/transports/grpc/grpc-transport.d.ts +2 -2
- package/dist/transports/grpc/grpc-transport.js +42 -3
- package/dist/transports/grpc/mappers/commands-mapper.d.ts +10 -2
- package/dist/transports/grpc/mappers/commands-mapper.js +30 -12
- package/dist/transports/grpc/mappers/contracts-mapper.d.ts +3 -1
- package/dist/transports/grpc/mappers/contracts-mapper.js +16 -3
- package/dist/transports/grpc/mappers/interactive-command-mapper.d.ts +15 -0
- package/dist/transports/grpc/mappers/interactive-command-mapper.js +54 -0
- package/dist/transports/grpc/mappers/topology-manager-write-mapper.js +59 -1
- package/dist/transports/json/json-transport.d.ts +2 -2
- package/dist/transports/json/json-transport.js +2 -2
- package/dist/transports/json/mappers/commands-mapper.js +23 -9
- package/node/.generated/start-local/additional-config.extra-participants.conf +37 -0
- package/node/.generated/start-local/additional-config.extra-validators.conf +35 -0
- package/node/.generated/start-local/compose-extra-participants.yaml +147 -0
- package/node/.generated/start-local/extra-participants.env +30 -0
- package/node/es256-jwt.mjs +177 -0
- package/node/start-local.sh +886 -0
- package/node/stop-local.sh +200 -0
- package/node/test-start-local.sh +354 -0
- package/node/test-stop-local.sh +112 -0
- package/package.json +21 -2
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { DamlLfChoice } from "./model/daml-lf-choice.js";
|
|
2
|
+
import { DamlLfModule } from "./model/daml-lf-module.js";
|
|
2
3
|
import { DamlLfTemplate } from "./model/daml-lf-template.js";
|
|
3
4
|
import { DamlLfTemplateId } from "./model/daml-lf-template-id.js";
|
|
5
|
+
import { DamlLfValueDefinition } from "./model/daml-lf-value-definition.js";
|
|
4
6
|
import { ModuleReference } from "./model/module-reference.js";
|
|
5
7
|
import { TypeConReference } from "./model/type-con-reference.js";
|
|
6
8
|
import { DamlLfSemanticModel } from "./semantics/daml-lf-semantic-model.js";
|
|
@@ -12,11 +14,20 @@ export declare class DamlLfCompilation {
|
|
|
12
14
|
private readonly moduleSymbols;
|
|
13
15
|
private readonly typeSymbols;
|
|
14
16
|
private readonly templates;
|
|
17
|
+
private readonly valueDefinitions;
|
|
18
|
+
private readonly valueDefinitionIdentities;
|
|
15
19
|
private constructor();
|
|
16
20
|
static createOrThrow(workspace: DamlLfWorkspace): DamlLfCompilation;
|
|
17
21
|
getModuleSymbolOrThrow(reference: ModuleReference): ModuleSymbol;
|
|
18
22
|
getTypeSymbolOrThrow(reference: TypeConReference): TypeSymbol;
|
|
19
23
|
createSemanticModel(): DamlLfSemanticModel;
|
|
24
|
+
getValueDefinitionOrThrow(packageId: string, moduleName: string, definitionName: string): DamlLfValueDefinition;
|
|
25
|
+
getModuleOrThrow(packageId: string, moduleName: string): DamlLfModule;
|
|
26
|
+
getValueDefinitionIdentityOrThrow(definition: DamlLfValueDefinition): {
|
|
27
|
+
packageId: string;
|
|
28
|
+
moduleName: string;
|
|
29
|
+
definitionName: string;
|
|
30
|
+
};
|
|
20
31
|
getTemplates(): readonly DamlLfTemplate[];
|
|
21
32
|
getTemplateChoicesOrThrow(templateId: DamlLfTemplateId): readonly DamlLfChoice[];
|
|
22
33
|
private buildIndexes;
|
|
@@ -24,6 +35,7 @@ export declare class DamlLfCompilation {
|
|
|
24
35
|
private validateTypeOrThrow;
|
|
25
36
|
private static createModuleKey;
|
|
26
37
|
private static createTypeKey;
|
|
38
|
+
private static createDefinitionKey;
|
|
27
39
|
private getTemplateOrThrow;
|
|
28
40
|
private static createTemplateKey;
|
|
29
41
|
}
|
|
@@ -3,6 +3,7 @@ import { DamlLfSemanticException } from "./errors/daml-lf-semantic.exception.js"
|
|
|
3
3
|
import { DamlLfDataType } from "./model/daml-lf-data-type.js";
|
|
4
4
|
import { DamlLfTemplate } from "./model/daml-lf-template.js";
|
|
5
5
|
import { DamlLfValueDefinition } from "./model/daml-lf-value-definition.js";
|
|
6
|
+
import { ModuleReference } from "./model/module-reference.js";
|
|
6
7
|
import { DamlLfSemanticModel } from "./semantics/daml-lf-semantic-model.js";
|
|
7
8
|
import { ModuleSymbol } from "./symbols/module-symbol.js";
|
|
8
9
|
import { TypeSymbol } from "./symbols/type-symbol.js";
|
|
@@ -11,6 +12,8 @@ export class DamlLfCompilation {
|
|
|
11
12
|
moduleSymbols = new Map();
|
|
12
13
|
typeSymbols = new Map();
|
|
13
14
|
templates = new Map();
|
|
15
|
+
valueDefinitions = new Map();
|
|
16
|
+
valueDefinitionIdentities = new Map();
|
|
14
17
|
constructor(workspace) {
|
|
15
18
|
this.workspace = workspace;
|
|
16
19
|
void this.workspace;
|
|
@@ -38,6 +41,26 @@ export class DamlLfCompilation {
|
|
|
38
41
|
createSemanticModel() {
|
|
39
42
|
return new DamlLfSemanticModel(this);
|
|
40
43
|
}
|
|
44
|
+
getValueDefinitionOrThrow(packageId, moduleName, definitionName) {
|
|
45
|
+
const definition = this.valueDefinitions.get(DamlLfCompilation.createDefinitionKey(packageId, moduleName, definitionName));
|
|
46
|
+
if (definition === undefined) {
|
|
47
|
+
throw new DamlLfResolutionException(`could not resolve value definition '${definitionName}' in module '${moduleName}'`);
|
|
48
|
+
}
|
|
49
|
+
return definition;
|
|
50
|
+
}
|
|
51
|
+
getModuleOrThrow(packageId, moduleName) {
|
|
52
|
+
return this.getModuleSymbolOrThrow(new ModuleReference({
|
|
53
|
+
packageId,
|
|
54
|
+
moduleName,
|
|
55
|
+
})).module;
|
|
56
|
+
}
|
|
57
|
+
getValueDefinitionIdentityOrThrow(definition) {
|
|
58
|
+
const identity = this.valueDefinitionIdentities.get(definition);
|
|
59
|
+
if (identity === undefined) {
|
|
60
|
+
throw new DamlLfResolutionException(`could not resolve identity for value definition '${definition.name}'`);
|
|
61
|
+
}
|
|
62
|
+
return identity;
|
|
63
|
+
}
|
|
41
64
|
getTemplates() {
|
|
42
65
|
return [...this.templates.values()];
|
|
43
66
|
}
|
|
@@ -58,6 +81,15 @@ export class DamlLfCompilation {
|
|
|
58
81
|
definition,
|
|
59
82
|
}));
|
|
60
83
|
}
|
|
84
|
+
if (definition instanceof DamlLfValueDefinition) {
|
|
85
|
+
const identity = {
|
|
86
|
+
packageId: pkg.packageId,
|
|
87
|
+
moduleName: module.name,
|
|
88
|
+
definitionName: definition.name,
|
|
89
|
+
};
|
|
90
|
+
this.valueDefinitions.set(DamlLfCompilation.createDefinitionKey(identity.packageId, identity.moduleName, identity.definitionName), definition);
|
|
91
|
+
this.valueDefinitionIdentities.set(definition, identity);
|
|
92
|
+
}
|
|
61
93
|
if (definition instanceof DamlLfTemplate) {
|
|
62
94
|
this.templates.set(DamlLfCompilation.createTemplateKey(definition.templateId), definition);
|
|
63
95
|
}
|
|
@@ -104,6 +136,9 @@ export class DamlLfCompilation {
|
|
|
104
136
|
static createTypeKey(packageId, moduleName, name) {
|
|
105
137
|
return `${packageId}::${moduleName}::${name}`;
|
|
106
138
|
}
|
|
139
|
+
static createDefinitionKey(packageId, moduleName, definitionName) {
|
|
140
|
+
return `${packageId}::${moduleName}::${definitionName}`;
|
|
141
|
+
}
|
|
107
142
|
getTemplateOrThrow(templateId) {
|
|
108
143
|
const template = this.templates.get(DamlLfCompilation.createTemplateKey(templateId));
|
|
109
144
|
if (template === undefined) {
|
package/dist/daml-lf/index.d.ts
CHANGED
|
@@ -6,13 +6,24 @@ export { DamlLfVersionNotSupportedException } from "./errors/daml-lf-version-not
|
|
|
6
6
|
export { DamlLfCompilation } from "./daml-lf-compilation.js";
|
|
7
7
|
export { DamlLfPackageLoader, DamlLfPackageLoadResult } from "./daml-lf-package-loader.js";
|
|
8
8
|
export { DamlLfWorkspace } from "./daml-lf-workspace.js";
|
|
9
|
+
export { DarArchiveEntry } from "./container/dar-archive-entry.js";
|
|
9
10
|
export { DarArchiveLoader } from "./container/dar-archive-loader.js";
|
|
11
|
+
export { DarSourceBundle } from "./container/dar-source-bundle.js";
|
|
12
|
+
export { DarSourceBundleLoader } from "./container/dar-source-bundle-loader.js";
|
|
13
|
+
export { DarSourceFileEntry } from "./container/dar-source-file-entry.js";
|
|
14
|
+
export { DamlLfLanguageVersion } from "./decoding/daml-lf-language-version.js";
|
|
10
15
|
export { DamlLfBuiltinDispatch } from "./interpreter/daml-lf-builtin-dispatch.js";
|
|
16
|
+
export { DamlLfEvaluator } from "./interpreter/daml-lf-evaluator.js";
|
|
11
17
|
export { DamlLfInterpreterScaffold } from "./interpreter/daml-lf-interpreter-scaffold.js";
|
|
18
|
+
export { DamlLfLexicalScope } from "./interpreter/daml-lf-lexical-scope.js";
|
|
19
|
+
export { DamlLfRuntimeFrame } from "./interpreter/daml-lf-runtime-frame.js";
|
|
20
|
+
export { DamlLfStepKind } from "./interpreter/daml-lf-step-kind.js";
|
|
21
|
+
export { IDamlLfTraceSink, IDamlLfTraceStep, } from "./interpreter/daml-lf-trace-sink.interface.js";
|
|
12
22
|
export { DamlLfBuiltinType } from "./model/daml-lf-builtin-type.js";
|
|
13
23
|
export { DamlLfChoice } from "./model/daml-lf-choice.js";
|
|
14
24
|
export { DamlLfChoiceParameter } from "./model/daml-lf-choice-parameter.js";
|
|
15
25
|
export { DamlLfDataType } from "./model/daml-lf-data-type.js";
|
|
26
|
+
export { DamlLfExpression } from "./model/daml-lf-expression.js";
|
|
16
27
|
export { DamlLfField } from "./model/daml-lf-field.js";
|
|
17
28
|
export { DamlLfModule } from "./model/daml-lf-module.js";
|
|
18
29
|
export { DamlLfNodeKind } from "./model/daml-lf-node-kind.js";
|
package/dist/daml-lf/index.js
CHANGED
|
@@ -6,13 +6,23 @@ export { DamlLfVersionNotSupportedException } from "./errors/daml-lf-version-not
|
|
|
6
6
|
export { DamlLfCompilation } from "./daml-lf-compilation.js";
|
|
7
7
|
export { DamlLfPackageLoader, DamlLfPackageLoadResult } from "./daml-lf-package-loader.js";
|
|
8
8
|
export { DamlLfWorkspace } from "./daml-lf-workspace.js";
|
|
9
|
+
export { DarArchiveEntry } from "./container/dar-archive-entry.js";
|
|
9
10
|
export { DarArchiveLoader } from "./container/dar-archive-loader.js";
|
|
11
|
+
export { DarSourceBundle } from "./container/dar-source-bundle.js";
|
|
12
|
+
export { DarSourceBundleLoader } from "./container/dar-source-bundle-loader.js";
|
|
13
|
+
export { DarSourceFileEntry } from "./container/dar-source-file-entry.js";
|
|
14
|
+
export { DamlLfLanguageVersion } from "./decoding/daml-lf-language-version.js";
|
|
10
15
|
export { DamlLfBuiltinDispatch } from "./interpreter/daml-lf-builtin-dispatch.js";
|
|
16
|
+
export { DamlLfEvaluator } from "./interpreter/daml-lf-evaluator.js";
|
|
11
17
|
export { DamlLfInterpreterScaffold } from "./interpreter/daml-lf-interpreter-scaffold.js";
|
|
18
|
+
export { DamlLfLexicalScope } from "./interpreter/daml-lf-lexical-scope.js";
|
|
19
|
+
export { DamlLfRuntimeFrame } from "./interpreter/daml-lf-runtime-frame.js";
|
|
20
|
+
export { DamlLfStepKind } from "./interpreter/daml-lf-step-kind.js";
|
|
12
21
|
export { DamlLfBuiltinType } from "./model/daml-lf-builtin-type.js";
|
|
13
22
|
export { DamlLfChoice } from "./model/daml-lf-choice.js";
|
|
14
23
|
export { DamlLfChoiceParameter } from "./model/daml-lf-choice-parameter.js";
|
|
15
24
|
export { DamlLfDataType } from "./model/daml-lf-data-type.js";
|
|
25
|
+
export { DamlLfExpression } from "./model/daml-lf-expression.js";
|
|
16
26
|
export { DamlLfField } from "./model/daml-lf-field.js";
|
|
17
27
|
export { DamlLfModule } from "./model/daml-lf-module.js";
|
|
18
28
|
export { DamlLfNodeKind } from "./model/daml-lf-node-kind.js";
|
|
@@ -1,2 +1,45 @@
|
|
|
1
|
+
import { IDamlLfRuntimeValue } from "./daml-lf-runtime-value.js";
|
|
2
|
+
interface IBuiltinRuntimeValue extends IDamlLfRuntimeValue {
|
|
3
|
+
readonly kind: "builtin";
|
|
4
|
+
readonly builtinFunction: string;
|
|
5
|
+
readonly appliedArguments: readonly IDamlLfRuntimeValue[];
|
|
6
|
+
}
|
|
1
7
|
export declare class DamlLfBuiltinDispatch {
|
|
8
|
+
applyOrThrow(builtin: IBuiltinRuntimeValue, argumentValues: readonly IDamlLfRuntimeValue[]): IDamlLfRuntimeValue;
|
|
9
|
+
private areEqual;
|
|
10
|
+
private readInt64;
|
|
11
|
+
private compareValues;
|
|
12
|
+
private readText;
|
|
13
|
+
private readPartyLike;
|
|
14
|
+
private readTextLike;
|
|
15
|
+
private readStringLikeOrUndefined;
|
|
16
|
+
private readContractIdLike;
|
|
17
|
+
private readExactDecimal;
|
|
18
|
+
private tryReadExactDecimal;
|
|
19
|
+
private parseExactDecimal;
|
|
20
|
+
private addExactDecimals;
|
|
21
|
+
private subtractExactDecimals;
|
|
22
|
+
private multiplyExactDecimals;
|
|
23
|
+
private divideExactDecimals;
|
|
24
|
+
private compareExactDecimals;
|
|
25
|
+
private normalizeExactDecimal;
|
|
26
|
+
private quantizeExactDecimal;
|
|
27
|
+
private shiftExactDecimal;
|
|
28
|
+
private quantizeQuotientToScale;
|
|
29
|
+
private roundHalfEvenQuotient;
|
|
30
|
+
private createExactDecimalFromScaledSignificand;
|
|
31
|
+
private formatExactDecimal;
|
|
32
|
+
private formatExactNumeric;
|
|
33
|
+
private truncateExactDecimalToInt64;
|
|
34
|
+
private readNumericScaleWitnessOrThrow;
|
|
35
|
+
private assertNumericBoundsOrThrow;
|
|
36
|
+
private pow10;
|
|
37
|
+
private readTextList;
|
|
38
|
+
private readTextMap;
|
|
39
|
+
private readGenMap;
|
|
40
|
+
private unwrapValue;
|
|
41
|
+
private hydrateValue;
|
|
42
|
+
private insertGenMapEntry;
|
|
43
|
+
private isNumericCompatible;
|
|
2
44
|
}
|
|
45
|
+
export {};
|