@settlemint/dalp-cli 3.0.6-main.28313870639 → 3.0.6-main.28314181581

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 +106 -2
  2. package/package.json +1 -1
package/dist/dalp.js CHANGED
@@ -121236,7 +121236,16 @@ var TokenSupplyLimitValuesSchema = exports_external.object({
121236
121236
  }
121237
121237
  ]
121238
121238
  });
121239
+ var StrictTokenSupplyLimitValuesSchema = TokenSupplyLimitValuesSchema.extend({
121240
+ maxSupply: TokenSupplyLimitValuesSchema.shape.maxSupply.refine((value22) => value22 > 0n, {
121241
+ message: "maxSupply must be greater than zero"
121242
+ })
121243
+ }).refine((data2) => !data2.rolling || data2.periodLength > 0, {
121244
+ message: "Rolling window requires periodLength > 0",
121245
+ path: ["periodLength"]
121246
+ });
121239
121247
  var tokenSupplyLimitValues = () => TokenSupplyLimitValuesSchema;
121248
+ var strictTokenSupplyLimitValues = () => StrictTokenSupplyLimitValuesSchema;
121240
121249
  var IssuanceVolumeLimitValuesSchema = exports_external.object({
121241
121250
  maxSupply: apiBigInt.refine((value22) => value22 > 0n, {
121242
121251
  message: "maxSupply must be greater than zero"
@@ -121299,7 +121308,26 @@ var InvestorCountValuesSchema = exports_external.object({
121299
121308
  }
121300
121309
  ]
121301
121310
  });
121311
+ var StrictInvestorCountValuesSchema = InvestorCountValuesSchema.superRefine((data2, ctx) => {
121312
+ if (data2.countryCodes.length !== data2.countryLimits.length) {
121313
+ ctx.addIssue({
121314
+ code: "custom",
121315
+ message: "countryCodes and countryLimits must have the same length",
121316
+ path: ["countryLimits"]
121317
+ });
121318
+ }
121319
+ data2.countryLimits.forEach((limit, index2) => {
121320
+ if (limit <= 0) {
121321
+ ctx.addIssue({
121322
+ code: "custom",
121323
+ message: "Country limit must be greater than zero",
121324
+ path: ["countryLimits", index2]
121325
+ });
121326
+ }
121327
+ });
121328
+ });
121302
121329
  var investorCountValues = () => InvestorCountValuesSchema;
121330
+ var strictInvestorCountValues = () => StrictInvestorCountValuesSchema;
121303
121331
  var InvestorCountV2ValuesSchema = exports_external.object({
121304
121332
  maxInvestors: exports_external.number().int().min(0).meta({
121305
121333
  description: "Maximum total investors per instance (0 = no limit). Country targeting handled by ModuleScope.",
@@ -121423,7 +121451,13 @@ var CappedValuesSchema = exports_external.object({
121423
121451
  description: "Capped parameters",
121424
121452
  examples: [{ maxSupply: "1000000000000000000000000" }]
121425
121453
  });
121454
+ var StrictCappedValuesSchema = CappedValuesSchema.extend({
121455
+ maxSupply: CappedValuesSchema.shape.maxSupply.refine((value22) => value22 > 0n, {
121456
+ message: "maxSupply must be greater than zero"
121457
+ })
121458
+ });
121426
121459
  var cappedValues = () => CappedValuesSchema;
121460
+ var strictCappedValues = () => StrictCappedValuesSchema;
121427
121461
  var CapitalRaiseLimitClientValuesSchema = exports_external.object({
121428
121462
  maxSupply: apiBigInt.meta({
121429
121463
  description: "Maximum allowed gross raised fiat in the window, as a raw bigint with 18 decimals (e.g. 8000000e18 for EUR 8M).",
@@ -121523,6 +121557,24 @@ var ComplianceParamsSchema = exports_external.object({
121523
121557
  }
121524
121558
  ]
121525
121559
  });
121560
+ var StrictComplianceParamsSchema = ComplianceParamsSchema.superRefine((data2, ctx) => {
121561
+ const validators = {
121562
+ capped: strictCappedValues(),
121563
+ "capped-v2": strictCappedValues(),
121564
+ "investor-count": strictInvestorCountValues(),
121565
+ "token-supply-limit": strictTokenSupplyLimitValues()
121566
+ };
121567
+ const validator2 = validators[data2.typeId];
121568
+ if (!validator2) {
121569
+ return;
121570
+ }
121571
+ const result = validator2.safeParse(data2.values);
121572
+ if (!result.success) {
121573
+ for (const issue2 of result.error.issues) {
121574
+ ctx.addIssue({ ...issue2, path: ["values", ...issue2.path] });
121575
+ }
121576
+ }
121577
+ });
121526
121578
  var complianceParams = () => ComplianceParamsSchema;
121527
121579
  var ComplianceModulePairSchema = exports_external.intersection(ComplianceParamsSchema, exports_external.object({
121528
121580
  scope: exports_external.lazy(() => moduleScopeValues()).optional().meta({
@@ -143926,7 +143978,7 @@ function normalizeDalpBaseUrl(url2) {
143926
143978
  }
143927
143979
  var package_default = {
143928
143980
  name: "@settlemint/dalp-sdk",
143929
- version: "3.0.6-main.28313870639",
143981
+ version: "3.0.6-main.28314181581",
143930
143982
  private: false,
143931
143983
  description: "Fully typed SDK for the DALP tokenization platform API",
143932
143984
  homepage: "https://settlemint.com",
@@ -145146,7 +145198,7 @@ var failedStateSet = new Set(FAILED_TRANSACTION_STATES);
145146
145198
  // package.json
145147
145199
  var package_default2 = {
145148
145200
  name: "@settlemint/dalp-cli",
145149
- version: "3.0.6-main.28313870639",
145201
+ version: "3.0.6-main.28314181581",
145150
145202
  private: false,
145151
145203
  description: "CLI for the Digital Asset Lifecycle Platform — manage tokens, identities, compliance, and more from the command line.",
145152
145204
  homepage: "https://settlemint.com",
@@ -212014,7 +212066,16 @@ var TokenSupplyLimitValuesSchema2 = exports_external.object({
212014
212066
  }
212015
212067
  ]
212016
212068
  });
212069
+ var StrictTokenSupplyLimitValuesSchema2 = TokenSupplyLimitValuesSchema2.extend({
212070
+ maxSupply: TokenSupplyLimitValuesSchema2.shape.maxSupply.refine((value3) => value3 > 0n, {
212071
+ message: "maxSupply must be greater than zero"
212072
+ })
212073
+ }).refine((data2) => !data2.rolling || data2.periodLength > 0, {
212074
+ message: "Rolling window requires periodLength > 0",
212075
+ path: ["periodLength"]
212076
+ });
212017
212077
  var tokenSupplyLimitValues2 = () => TokenSupplyLimitValuesSchema2;
212078
+ var strictTokenSupplyLimitValues2 = () => StrictTokenSupplyLimitValuesSchema2;
212018
212079
  var IssuanceVolumeLimitValuesSchema2 = exports_external.object({
212019
212080
  maxSupply: apiBigInt2.refine((value3) => value3 > 0n, {
212020
212081
  message: "maxSupply must be greater than zero"
@@ -212077,7 +212138,26 @@ var InvestorCountValuesSchema2 = exports_external.object({
212077
212138
  }
212078
212139
  ]
212079
212140
  });
212141
+ var StrictInvestorCountValuesSchema2 = InvestorCountValuesSchema2.superRefine((data2, ctx) => {
212142
+ if (data2.countryCodes.length !== data2.countryLimits.length) {
212143
+ ctx.addIssue({
212144
+ code: "custom",
212145
+ message: "countryCodes and countryLimits must have the same length",
212146
+ path: ["countryLimits"]
212147
+ });
212148
+ }
212149
+ data2.countryLimits.forEach((limit, index2) => {
212150
+ if (limit <= 0) {
212151
+ ctx.addIssue({
212152
+ code: "custom",
212153
+ message: "Country limit must be greater than zero",
212154
+ path: ["countryLimits", index2]
212155
+ });
212156
+ }
212157
+ });
212158
+ });
212080
212159
  var investorCountValues2 = () => InvestorCountValuesSchema2;
212160
+ var strictInvestorCountValues2 = () => StrictInvestorCountValuesSchema2;
212081
212161
  var InvestorCountV2ValuesSchema2 = exports_external.object({
212082
212162
  maxInvestors: exports_external.number().int().min(0).meta({
212083
212163
  description: "Maximum total investors per instance (0 = no limit). Country targeting handled by ModuleScope.",
@@ -212201,7 +212281,13 @@ var CappedValuesSchema2 = exports_external.object({
212201
212281
  description: "Capped parameters",
212202
212282
  examples: [{ maxSupply: "1000000000000000000000000" }]
212203
212283
  });
212284
+ var StrictCappedValuesSchema2 = CappedValuesSchema2.extend({
212285
+ maxSupply: CappedValuesSchema2.shape.maxSupply.refine((value3) => value3 > 0n, {
212286
+ message: "maxSupply must be greater than zero"
212287
+ })
212288
+ });
212204
212289
  var cappedValues2 = () => CappedValuesSchema2;
212290
+ var strictCappedValues2 = () => StrictCappedValuesSchema2;
212205
212291
  var CapitalRaiseLimitClientValuesSchema2 = exports_external.object({
212206
212292
  maxSupply: apiBigInt2.meta({
212207
212293
  description: "Maximum allowed gross raised fiat in the window, as a raw bigint with 18 decimals (e.g. 8000000e18 for EUR 8M).",
@@ -212301,6 +212387,24 @@ var ComplianceParamsSchema2 = exports_external.object({
212301
212387
  }
212302
212388
  ]
212303
212389
  });
212390
+ var StrictComplianceParamsSchema2 = ComplianceParamsSchema2.superRefine((data2, ctx) => {
212391
+ const validators = {
212392
+ capped: strictCappedValues2(),
212393
+ "capped-v2": strictCappedValues2(),
212394
+ "investor-count": strictInvestorCountValues2(),
212395
+ "token-supply-limit": strictTokenSupplyLimitValues2()
212396
+ };
212397
+ const validator2 = validators[data2.typeId];
212398
+ if (!validator2) {
212399
+ return;
212400
+ }
212401
+ const result = validator2.safeParse(data2.values);
212402
+ if (!result.success) {
212403
+ for (const issue3 of result.error.issues) {
212404
+ ctx.addIssue({ ...issue3, path: ["values", ...issue3.path] });
212405
+ }
212406
+ }
212407
+ });
212304
212408
  var ComplianceModulePairSchema2 = exports_external.intersection(ComplianceParamsSchema2, exports_external.object({
212305
212409
  scope: exports_external.lazy(() => moduleScopeValues2()).optional().meta({
212306
212410
  description: "Optional per-instance scope for V2 compliance modules. When omitted, the dapi defaults to an empty scope (all transfers). V1 tokens ignore this field."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@settlemint/dalp-cli",
3
- "version": "3.0.6-main.28313870639",
3
+ "version": "3.0.6-main.28314181581",
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",