@settlemint/dalp-cli 2.1.7-main.25382520783 → 2.1.7-main.25383770828

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.
Files changed (2) hide show
  1. package/dist/dalp.js +87 -2
  2. package/package.json +1 -1
package/dist/dalp.js CHANGED
@@ -56041,6 +56041,22 @@ var DAPI_ROUTE_ERROR_ENTRIES = [
56041
56041
  expectedClientError: true
56042
56042
  })
56043
56043
  },
56044
+ {
56045
+ code: "SETTINGS_COMPLIANCE_TEMPLATE_INCOMPATIBLE_MODULE_SET",
56046
+ definition: dapiError({
56047
+ id: "DALP-0462",
56048
+ category: "domain",
56049
+ status: 422,
56050
+ message: "Compliance template includes controls only available for legacy asset types.",
56051
+ why: "The selected compliance controls are only supported by legacy asset types, but the template targets the current module set.",
56052
+ fix: "Enable Legacy template for this policy, or remove the legacy-only controls and save again.",
56053
+ retryable: false,
56054
+ expectedClientError: true,
56055
+ data: exports_external.object({
56056
+ typeIds: exports_external.array(exports_external.string())
56057
+ })
56058
+ })
56059
+ },
56044
56060
  {
56045
56061
  code: "SETTINGS_COMPLIANCE_TEMPLATES_CANNOT_PUBLISHED",
56046
56062
  definition: dapiError({
@@ -62669,6 +62685,34 @@ var ModuleScopeSchema = exports_external.object({
62669
62685
  ]
62670
62686
  });
62671
62687
  var moduleScopeValues = () => ModuleScopeSchema;
62688
+ var complianceTypeIdHashEntries = [
62689
+ { name: "address-block-list", hashInput: "address-block-list", isExperimental: false },
62690
+ { name: "address-block-list-v2", hashInput: "address-block-list-v2__experimental__", isExperimental: true },
62691
+ { name: "capital-raise-limit", hashInput: "capital-raise-limit__experimental__", isExperimental: true },
62692
+ { name: "capped", hashInput: "capped", isExperimental: false },
62693
+ { name: "capped-v2", hashInput: "capped-v2__experimental__", isExperimental: true },
62694
+ { name: "collateral", hashInput: "collateral", isExperimental: false },
62695
+ { name: "collateral-v2", hashInput: "collateral-v2__experimental__", isExperimental: true },
62696
+ { name: "country-allow-list", hashInput: "country-allow-list", isExperimental: false },
62697
+ { name: "country-allow-list-v2", hashInput: "country-allow-list-v2__experimental__", isExperimental: true },
62698
+ { name: "country-block-list", hashInput: "country-block-list", isExperimental: false },
62699
+ { name: "country-block-list-v2", hashInput: "country-block-list-v2__experimental__", isExperimental: true },
62700
+ { name: "identity-allow-list", hashInput: "identity-allow-list", isExperimental: false },
62701
+ { name: "identity-allow-list-v2", hashInput: "identity-allow-list-v2__experimental__", isExperimental: true },
62702
+ { name: "identity-block-list", hashInput: "identity-block-list", isExperimental: false },
62703
+ { name: "identity-block-list-v2", hashInput: "identity-block-list-v2__experimental__", isExperimental: true },
62704
+ { name: "identity-verification", hashInput: "identity-verification", isExperimental: false },
62705
+ { name: "identity-verification-v2", hashInput: "identity-verification-v2__experimental__", isExperimental: true },
62706
+ { name: "investor-count", hashInput: "investor-count", isExperimental: false },
62707
+ { name: "investor-count-v2", hashInput: "investor-count-v2__experimental__", isExperimental: true },
62708
+ { name: "issuance-volume-limit", hashInput: "issuance-volume-limit__experimental__", isExperimental: true },
62709
+ { name: "time-lock", hashInput: "time-lock", isExperimental: false },
62710
+ { name: "time-lock-v2", hashInput: "time-lock-v2__experimental__", isExperimental: true },
62711
+ { name: "token-supply-limit", hashInput: "token-supply-limit", isExperimental: false },
62712
+ { name: "transfer-approval", hashInput: "transfer-approval", isExperimental: false },
62713
+ { name: "transfer-approval-v2", hashInput: "transfer-approval-v2__experimental__", isExperimental: true }
62714
+ ];
62715
+ var COMPLIANCE_TYPE_ID_BY_HASH = new Map(complianceTypeIdHashEntries.map((entry) => [keccak256(toHex(entry.hashInput)).toLowerCase(), entry.name]));
62672
62716
  var ethereumCompositeId = exports_external.string().meta({
62673
62717
  description: "A valid Ethereum Composite ID (82 characters, starting with 0x)",
62674
62718
  examples: ["0x1234567890abcdef1234567890abcdef12345678901234567890abcdef1234567890abcdef12345678"]
@@ -63301,6 +63345,11 @@ var global = v1Contract.route({
63301
63345
  tags: [V1_TAG.search]
63302
63346
  }).input(GlobalSearchInputSchema).output(GlobalSearchOutputSchema);
63303
63347
  var CURRENT_MODULE_SET_VERSION = 2;
63348
+ var V1_ONLY_COMPLIANCE_TYPE_IDS = [
63349
+ "issuance-volume-limit",
63350
+ "token-supply-limit"
63351
+ ];
63352
+ var V1_ONLY_COMPLIANCE_TYPE_ID_SET = new Set(V1_ONLY_COMPLIANCE_TYPE_IDS);
63304
63353
  var GLEIF_SPECIAL_CODES = ["EU", "UN"];
63305
63354
  var JurisdictionCodeSchema = exports_external.union([isoCountryCode, exports_external.enum(GLEIF_SPECIAL_CODES)]).meta({
63306
63355
  description: "GLEIF-compatible jurisdiction code (ISO 3166-1 alpha-2 or EU/UN)",
@@ -63484,6 +63533,28 @@ var TemplateModuleConfigSchema = exports_external.discriminatedUnion("typeId", [
63484
63533
  description: "Module configuration within a compliance template",
63485
63534
  examples: [{ parameters: { typeId: "country-allow-list", values: [840, 826] } }]
63486
63535
  });
63536
+ function isLegacyModuleSetVersion(moduleSetVersion) {
63537
+ return moduleSetVersion !== undefined && moduleSetVersion < CURRENT_MODULE_SET_VERSION;
63538
+ }
63539
+ function isV1OnlyComplianceTypeId(typeId) {
63540
+ return V1_ONLY_COMPLIANCE_TYPE_ID_SET.has(typeId);
63541
+ }
63542
+ function uniqueV1OnlyTypeIds(typeIds) {
63543
+ return [...new Set(typeIds.filter((typeId) => isV1OnlyComplianceTypeId(typeId)))];
63544
+ }
63545
+ function getV1OnlyTypeIdsByFieldForNonLegacyTemplate({
63546
+ moduleSetVersion,
63547
+ modules = [],
63548
+ requiredControls = []
63549
+ }) {
63550
+ if (moduleSetVersion === undefined || isLegacyModuleSetVersion(moduleSetVersion)) {
63551
+ return { modules: [], requiredControls: [] };
63552
+ }
63553
+ return {
63554
+ modules: uniqueV1OnlyTypeIds(modules.map((module) => module.typeId)),
63555
+ requiredControls: uniqueV1OnlyTypeIds(requiredControls)
63556
+ };
63557
+ }
63487
63558
  var ComplianceTemplateSchema = exports_external.object({
63488
63559
  id: exports_external.string().min(1),
63489
63560
  name: exports_external.string().min(1).max(255),
@@ -63521,6 +63592,20 @@ var ComplianceTemplateCreateInputSchema = exports_external.object({
63521
63592
  return { ...rest, moduleSetVersion: legacy ? 1 : CURRENT_MODULE_SET_VERSION };
63522
63593
  }
63523
63594
  return { ...rest, moduleSetVersion: CURRENT_MODULE_SET_VERSION };
63595
+ }).superRefine((value22, ctx) => {
63596
+ const invalidTypeIdsByField = getV1OnlyTypeIdsByFieldForNonLegacyTemplate(value22);
63597
+ for (const [path4, invalidTypeIds] of [
63598
+ ["modules", invalidTypeIdsByField.modules],
63599
+ ["requiredControls", invalidTypeIdsByField.requiredControls]
63600
+ ]) {
63601
+ if (invalidTypeIds.length > 0) {
63602
+ ctx.addIssue({
63603
+ code: "custom",
63604
+ path: [path4],
63605
+ message: `Legacy-only compliance controls require a legacy template: ${invalidTypeIds.join(", ")}`
63606
+ });
63607
+ }
63608
+ }
63524
63609
  }).meta({
63525
63610
  description: "Input schema for creating a compliance template"
63526
63611
  });
@@ -77837,7 +77922,7 @@ function normalizeDalpBaseUrl(url3) {
77837
77922
  }
77838
77923
  var package_default = {
77839
77924
  name: "@settlemint/dalp-sdk",
77840
- version: "2.1.7-main.25382520783",
77925
+ version: "2.1.7-main.25383770828",
77841
77926
  private: false,
77842
77927
  description: "Fully typed SDK for the DALP tokenization platform API",
77843
77928
  homepage: "https://settlemint.com",
@@ -78388,7 +78473,7 @@ function trimConfigValue(name, value3) {
78388
78473
  // package.json
78389
78474
  var package_default2 = {
78390
78475
  name: "@settlemint/dalp-cli",
78391
- version: "2.1.7-main.25382520783",
78476
+ version: "2.1.7-main.25383770828",
78392
78477
  private: false,
78393
78478
  description: "CLI for the Digital Asset Lifecycle Platform — manage tokens, identities, compliance, and more from the command line.",
78394
78479
  homepage: "https://settlemint.com",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@settlemint/dalp-cli",
3
- "version": "2.1.7-main.25382520783",
3
+ "version": "2.1.7-main.25383770828",
4
4
  "private": false,
5
5
  "description": "CLI for the Digital Asset Lifecycle Platform — manage tokens, identities, compliance, and more from the command line.",
6
6
  "homepage": "https://settlemint.com",