@settlemint/dalp-sdk 2.1.7-main.26734411582 → 2.1.7-main.26736239582

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/index.js +10 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -11182,6 +11182,12 @@ function isHex(value2) {
11182
11182
  return /^0x[0-9a-fA-F]*$/.test(value2);
11183
11183
  }
11184
11184
  var SECRET_MIN_LENGTH = 32;
11185
+ var XVP_CREATE_NAME_MAX_LENGTH = 255;
11186
+ var XVP_CREATE_FLOWS_MAX_LENGTH = 100;
11187
+ var XVP_CREATE_NAME_VISIBLE_CHARACTER_PATTERN = String.raw`[^\p{White_Space}\p{Default_Ignorable_Code_Point}\p{Control}\p{Format}]`;
11188
+ var XVP_CREATE_NAME_HAS_VISIBLE_CHARACTER = new RegExp(XVP_CREATE_NAME_VISIBLE_CHARACTER_PATTERN, "u");
11189
+ var XVP_CREATE_FLOWS_MIN_LENGTH_MESSAGE = "At least one flow is required";
11190
+ var XVP_CREATE_FLOWS_MAX_LENGTH_MESSAGE = `At most ${XVP_CREATE_FLOWS_MAX_LENGTH} flows are supported`;
11185
11191
  var LocalFlowSchema = z25.object({
11186
11192
  type: z25.literal("local"),
11187
11193
  assetId: ethereumAddress.meta({
@@ -11217,6 +11223,7 @@ var ExternalFlowSchema = z25.object({
11217
11223
  externalAssetDecimals: decimals().meta({ description: "Asset decimals on external chain", examples: [18, 6, 8] })
11218
11224
  });
11219
11225
  var XvpSettlementFlowSchema = z25.discriminatedUnion("type", [LocalFlowSchema, ExternalFlowSchema]);
11226
+ var XvpSettlementFlowsSchema = z25.array(XvpSettlementFlowSchema).min(1, XVP_CREATE_FLOWS_MIN_LENGTH_MESSAGE).max(XVP_CREATE_FLOWS_MAX_LENGTH, XVP_CREATE_FLOWS_MAX_LENGTH_MESSAGE);
11220
11227
  var RawSecretSchema = z25.string().min(SECRET_MIN_LENGTH, `Secret must be at least ${SECRET_MIN_LENGTH} characters`).meta({
11221
11228
  description: "Raw HTLC secret pre-image (plain text string).",
11222
11229
  examples: ["my-super-secret-preimage-for-htlc-swap"]
@@ -11244,12 +11251,12 @@ var XvpCreateBaseSchema = MutationInputSchema.extend({
11244
11251
  description: "The XvP addon factory contract address",
11245
11252
  examples: ["0x71C7656EC7ab88b098defB751B7401B5f6d8976F"]
11246
11253
  }),
11247
- name: z25.string(),
11254
+ name: z25.string().min(1, "Name is required").max(XVP_CREATE_NAME_MAX_LENGTH, `Name must be at most ${XVP_CREATE_NAME_MAX_LENGTH} characters`).regex(XVP_CREATE_NAME_HAS_VISIBLE_CHARACTER, "Name is required"),
11248
11255
  autoExecute: z25.boolean().default(false),
11249
11256
  cutoffDate: blocktime({ future: true }).meta({ description: "Settlement cutoff", examples: [1735689600] }),
11250
11257
  secret: RawSecretSchema.optional(),
11251
11258
  hashlock: HashlockSchema.optional(),
11252
- flows: z25.array(XvpSettlementFlowSchema),
11259
+ flows: XvpSettlementFlowsSchema,
11253
11260
  country: isoCountryCodeNumeric.optional().meta({
11254
11261
  description: "ISO 3166-1 numeric country code for the settlement contract identity (required for V3 factories with identity registration)",
11255
11262
  examples: [840, 276, 756]
@@ -34783,7 +34790,7 @@ function normalizeDalpBaseUrl(url) {
34783
34790
  // package.json
34784
34791
  var package_default = {
34785
34792
  name: "@settlemint/dalp-sdk",
34786
- version: "2.1.7-main.26734411582",
34793
+ version: "2.1.7-main.26736239582",
34787
34794
  private: false,
34788
34795
  description: "Fully typed SDK for the DALP tokenization platform API",
34789
34796
  homepage: "https://settlemint.com",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@settlemint/dalp-sdk",
3
- "version": "2.1.7-main.26734411582",
3
+ "version": "2.1.7-main.26736239582",
4
4
  "private": false,
5
5
  "description": "Fully typed SDK for the DALP tokenization platform API",
6
6
  "homepage": "https://settlemint.com",