@settlemint/dalp-sdk 3.0.0-main.27722521648 → 3.0.0-rc.2

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 +4 -82
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -70598,7 +70598,7 @@ var PublicConfigGetOutputSchema = z84.object({
70598
70598
  logLevel: z84.enum(["debug", "info", "warn", "error"])
70599
70599
  }),
70600
70600
  explorer: z84.object({
70601
- url: z84.string().url().optional()
70601
+ url: z84.string().url()
70602
70602
  }),
70603
70603
  auth: z84.object({
70604
70604
  enforce2fa: z84.boolean(),
@@ -70709,86 +70709,8 @@ function isDangerousCSS(value2) {
70709
70709
  const lower = value2.toLowerCase();
70710
70710
  return lower.includes("url(") || lower.includes("<") || lower.includes("javascript:") || lower.includes("expression(") || lower.includes("import");
70711
70711
  }
70712
- var NUMBER = /^[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/i;
70713
- var PERCENTAGE = /^[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?%$/i;
70714
- var ANGLE = /^[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?(?:deg|turn|rad|grad)$/i;
70715
- var isNumber = (token) => NUMBER.test(token);
70716
- var isPercentage = (token) => PERCENTAGE.test(token);
70717
- var isNumberOrPercentage = (token) => isNumber(token) || isPercentage(token);
70718
- var isHue = (token) => isNumber(token) || ANGLE.test(token);
70719
- function splitColorBody(body) {
70720
- const trimmed = body.trim();
70721
- if (trimmed === "") {
70722
- return;
70723
- }
70724
- if (trimmed.includes(",")) {
70725
- if (trimmed.includes("/")) {
70726
- return;
70727
- }
70728
- const components2 = trimmed.split(",").map((part) => part.trim());
70729
- if (components2.some((part) => part === "")) {
70730
- return;
70731
- }
70732
- return { components: components2, commaSyntax: true };
70733
- }
70734
- const slashParts = trimmed.split("/");
70735
- if (slashParts.length > 2) {
70736
- return;
70737
- }
70738
- const alpha = slashParts.length === 2 ? slashParts[1]?.trim() ?? "" : undefined;
70739
- if (alpha === "") {
70740
- return;
70741
- }
70742
- const components = (slashParts[0] ?? "").split(/\s+/).filter(Boolean);
70743
- if (alpha === undefined && components.length > 3) {
70744
- return;
70745
- }
70746
- if (alpha !== undefined) {
70747
- components.push(alpha);
70748
- }
70749
- return { components, commaSyntax: false };
70750
- }
70751
- function isNumericColorBody(fn, body) {
70752
- if (/[a-z][\w-]*\(/i.test(body)) {
70753
- return true;
70754
- }
70755
- const parsed = splitColorBody(body);
70756
- if (!parsed) {
70757
- return false;
70758
- }
70759
- const { components, commaSyntax } = parsed;
70760
- if (components.length < 3 || components.length > 4) {
70761
- return false;
70762
- }
70763
- const isNone = (token) => !commaSyntax && /^none$/i.test(token);
70764
- const alphaOk = components.length === 3 || isNumberOrPercentage(components[3] ?? "") || isNone(components[3] ?? "");
70765
- if (!alphaOk) {
70766
- return false;
70767
- }
70768
- const [first = "", second = "", third = ""] = components;
70769
- switch (fn.toLowerCase()) {
70770
- case "rgb":
70771
- case "rgba": {
70772
- return [first, second, third].every((c) => isNumberOrPercentage(c) || isNone(c));
70773
- }
70774
- case "hsl":
70775
- case "hsla": {
70776
- return (isHue(first) || isNone(first)) && (isPercentage(second) || isNone(second)) && (isPercentage(third) || isNone(third));
70777
- }
70778
- case "oklch": {
70779
- return (isNumberOrPercentage(first) || isNone(first)) && (isNumberOrPercentage(second) || isNone(second)) && (isHue(third) || isNone(third));
70780
- }
70781
- default: {
70782
- return false;
70783
- }
70784
- }
70785
- }
70786
70712
  function isValidCSSValue(value2) {
70787
- const numericFn = /^(oklch|hsl|rgba?)\((.+)\)$/i.exec(value2);
70788
- if (numericFn) {
70789
- return isNumericColorBody(numericFn[1] ?? "", numericFn[2] ?? "");
70790
- }
70791
- return /^#[\da-f]{3,8}$/i.test(value2) || /^var\(.+\)$/i.test(value2) || /^[\d.]+rem$/.test(value2) || /^linear-gradient\(.+\)$/i.test(value2);
70713
+ return /^#[\da-f]{3,8}$/i.test(value2) || /^oklch\(.+\)$/i.test(value2) || /^hsl\(.+\)$/i.test(value2) || /^rgb\(.+\)$/i.test(value2) || /^rgba\(.+\)$/i.test(value2) || /^var\(.+\)$/i.test(value2) || /^[\d.]+rem$/.test(value2) || /^linear-gradient\(.+\)$/i.test(value2);
70792
70714
  }
70793
70715
  var cssColor = z89.string().max(256, "CSS value must be at most 256 characters").refine((val) => !isDangerousCSS(val), {
70794
70716
  message: "CSS value contains potentially dangerous content"
@@ -80554,7 +80476,7 @@ var read12 = v2Contract.route({
80554
80476
  var upsert3 = v2Contract.route({
80555
80477
  method: "POST",
80556
80478
  path: "/contacts",
80557
- description: "Create or update a contact entry. Provide an id to update an existing contact; omit to create. When creating without an id and the wallet already belongs to an existing contact, a RESOURCE_ALREADY_EXISTS error is returned rather than overwriting the existing contact.",
80479
+ description: "Create or update a contact entry. Provide an id to update an existing contact; omit to create. When creating without an id and the wallet already belongs to an existing contact, the existing contact's name is silently updated.",
80558
80480
  successDescription: "Contact saved successfully.",
80559
80481
  tags: [V2_TAG.contacts]
80560
80482
  }).input(v2Input.body(ContactsV2UpsertInputSchema)).output(ContactsV2UpsertOutputSchema);
@@ -91903,7 +91825,7 @@ function normalizeDalpBaseUrl(url) {
91903
91825
  // package.json
91904
91826
  var package_default = {
91905
91827
  name: "@settlemint/dalp-sdk",
91906
- version: "3.0.0-main.27722521648",
91828
+ version: "3.0.0-rc.2",
91907
91829
  private: false,
91908
91830
  description: "Fully typed SDK for the DALP tokenization platform API",
91909
91831
  homepage: "https://settlemint.com",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@settlemint/dalp-sdk",
3
- "version": "3.0.0-main.27722521648",
3
+ "version": "3.0.0-rc.2",
4
4
  "private": false,
5
5
  "description": "Fully typed SDK for the DALP tokenization platform API",
6
6
  "homepage": "https://settlemint.com",