@settlemint/dalp-cli 2.1.7-main.23442422201 → 2.1.7-main.23445298463

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 +85 -6
  2. package/package.json +1 -1
package/dist/dalp.js CHANGED
@@ -66622,6 +66622,10 @@ var FeatureConfigsInputSchema = exports_external.object({
66622
66622
  });
66623
66623
  var DALPAssetTokenSchema = TokenBaseSchema.extend({
66624
66624
  type: exports_external.literal(AssetFactoryTypeIdEnum.dalpAsset),
66625
+ templateId: exports_external.string().min(1, "Template ID cannot be empty").meta({
66626
+ description: "ID of the instrument template used to create this token",
66627
+ examples: ["template-bond-standard"]
66628
+ }),
66625
66629
  priceCurrency: fiatCurrency().optional().meta({
66626
66630
  description: "The fiat currency code for valuation (e.g., USD, EUR)",
66627
66631
  examples: ["USD", "EUR", "GBP"]
@@ -66630,9 +66634,41 @@ var DALPAssetTokenSchema = TokenBaseSchema.extend({
66630
66634
  description: "The fiat value per token in the price currency",
66631
66635
  examples: ["1.00", "100.00"]
66632
66636
  }),
66633
- templateId: exports_external.string().min(1, "Template ID cannot be empty").meta({
66634
- description: "ID of the instrument template used to create this token",
66635
- examples: ["template-bond-standard"]
66637
+ cap: assetAmount.optional().meta({
66638
+ description: "Maximum supply cap (bonds, stablecoins, deposits)",
66639
+ examples: ["1000000000000000000000000"]
66640
+ }),
66641
+ faceValue: assetAmount.optional().meta({
66642
+ description: "Face value per bond in denomination asset units",
66643
+ examples: ["1000000000000000000"]
66644
+ }),
66645
+ maturityDate: blocktime({ future: true }).optional().meta({
66646
+ description: "Bond maturity date as unix timestamp",
66647
+ examples: [1735689600]
66648
+ }),
66649
+ denominationAsset: ethereumAddress.optional().meta({
66650
+ description: "ERC-20 token used as denomination asset for bonds",
66651
+ examples: ["0x71C7656EC7ab88b098defB751B7401B5f6d8976F"]
66652
+ }),
66653
+ uniqueIdentifier: exports_external.string().optional().meta({
66654
+ description: "ISIN or other security identifier",
66655
+ examples: ["US0378331005"]
66656
+ }),
66657
+ managementFeeBps: basisPoints().optional().meta({
66658
+ description: "Annual management fee in basis points",
66659
+ examples: [100, 250]
66660
+ }),
66661
+ maximumFractions: assetAmount.optional().meta({
66662
+ description: "Maximum number of fractions for real-estate tokens",
66663
+ examples: ["1000000000000000000000"]
66664
+ }),
66665
+ premintRecipient: ethereumAddress.optional().meta({
66666
+ description: "Recipient of preminted real-estate fractions",
66667
+ examples: ["0x71C7656EC7ab88b098defB751B7401B5f6d8976F"]
66668
+ }),
66669
+ collateralRatioBps: exports_external.number().int().min(0).max(20000).optional().meta({
66670
+ description: "Collateral ratio in basis points (10000 = 100%)",
66671
+ examples: [1e4]
66636
66672
  }),
66637
66673
  metadataValues: exports_external.record(exports_external.string(), exports_external.union([exports_external.string(), exports_external.number().finite()])).optional().meta({
66638
66674
  description: "Custom metadata values from the instrument template",
@@ -69095,10 +69131,52 @@ function buildSortSchema(sortFields) {
69095
69131
  }
69096
69132
  return exports_external.enum(values);
69097
69133
  }
69134
+ function buildFlatFormatPreprocess(filterFieldNames) {
69135
+ return (input) => {
69136
+ if (typeof input !== "object" || input === null || Array.isArray(input)) {
69137
+ return input;
69138
+ }
69139
+ const raw = input;
69140
+ if (raw.filter !== undefined || raw.page !== undefined || raw.sort !== undefined) {
69141
+ return input;
69142
+ }
69143
+ const hasFilterField = Object.keys(raw).some((key) => filterFieldNames.has(key));
69144
+ const hasPaginationField = raw.limit !== undefined || raw.offset !== undefined;
69145
+ const hasSortField = raw.sortBy !== undefined;
69146
+ if (!hasFilterField && !hasPaginationField && !hasSortField) {
69147
+ return input;
69148
+ }
69149
+ const filter = {};
69150
+ const page = {};
69151
+ let sort;
69152
+ for (const [key, value22] of Object.entries(raw)) {
69153
+ if (filterFieldNames.has(key) && value22 !== undefined) {
69154
+ filter[key] = typeof value22 === "boolean" ? String(value22) : value22;
69155
+ } else if (key === "limit" || key === "offset") {
69156
+ page[key] = value22;
69157
+ } else if (key === "sortBy" && typeof value22 === "string") {
69158
+ const dir = raw.sortDirection === "desc" ? "-" : "";
69159
+ sort = `${dir}${value22}`;
69160
+ }
69161
+ }
69162
+ const result = {};
69163
+ if (Object.keys(filter).length > 0) {
69164
+ result.filter = filter;
69165
+ }
69166
+ if (Object.keys(page).length > 0) {
69167
+ result.page = page;
69168
+ }
69169
+ if (sort !== undefined) {
69170
+ result.sort = sort;
69171
+ }
69172
+ return result;
69173
+ };
69174
+ }
69098
69175
  function createCollectionInputSchema(fields, options) {
69099
69176
  const sortFields = sortableFieldNames(fields);
69100
69177
  const sortDescription = `JSON:API sort param. Prefix with - for descending. Sortable fields: ${sortFields.join(", ")}`;
69101
69178
  const filterShape = buildFilterShape(fields, options.globalSearch ?? false);
69179
+ const filterFieldNames = new Set(Object.keys(filterShape));
69102
69180
  const sortSchema = buildSortSchema(sortFields);
69103
69181
  const rawSchema = exports_external.object({
69104
69182
  sort: sortSchema.optional().meta({ description: sortDescription }),
@@ -69110,7 +69188,8 @@ function createCollectionInputSchema(fields, options) {
69110
69188
  description: "JSON:API filter params. Use filter[field]=value (shorthand) or filter[field][operator]=value (explicit)."
69111
69189
  })
69112
69190
  });
69113
- return rawSchema.transform((raw) => {
69191
+ const preprocess2 = buildFlatFormatPreprocess(filterFieldNames);
69192
+ return exports_external.preprocess(preprocess2, rawSchema).transform((raw) => {
69114
69193
  const rawSort = typeof raw.sort === "string" ? raw.sort : undefined;
69115
69194
  const sorting = parseJsonApiSort(rawSort, fields, options.defaultSort);
69116
69195
  const filterInput = raw.filter;
@@ -79379,7 +79458,7 @@ var timestampSerializer = {
79379
79458
  };
79380
79459
  var package_default = {
79381
79460
  name: "@settlemint/dalp-sdk",
79382
- version: "2.1.7-main.23442422201",
79461
+ version: "2.1.7-main.23445298463",
79383
79462
  private: false,
79384
79463
  description: "Fully typed SDK for the DALP tokenization platform API",
79385
79464
  homepage: "https://settlemint.com",
@@ -79522,7 +79601,7 @@ function createDalpClient(config3) {
79522
79601
  // package.json
79523
79602
  var package_default2 = {
79524
79603
  name: "@settlemint/dalp-cli",
79525
- version: "2.1.7-main.23442422201",
79604
+ version: "2.1.7-main.23445298463",
79526
79605
  private: false,
79527
79606
  description: "CLI for the Digital Asset Lifecycle Platform — manage tokens, identities, compliance, and more from the command line.",
79528
79607
  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.23442422201",
3
+ "version": "2.1.7-main.23445298463",
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",