@xyo-network/hash 5.3.13 → 5.3.16

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.
@@ -9729,7 +9729,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9729
9729
  const nibbleBoundary = bitsToNibbles(byteSize);
9730
9730
  const unEvened = (value.startsWith("0x") ? value.slice(2) : value).toLowerCase();
9731
9731
  if (isHex(unEvened)) {
9732
- const evenCharacters = unEvened.padStart(unEvened.length + unEvened.length % nibbleBoundary, "0");
9732
+ const evenCharacters = unEvened.padStart(Math.ceil(unEvened.length / nibbleBoundary) * nibbleBoundary, "0");
9733
9733
  const padded = isNumber(bitLength) ? evenCharacters.padStart(bitLength / 4, "0") : evenCharacters;
9734
9734
  return (prefix ? `0x${padded}` : padded).toLowerCase();
9735
9735
  } else {
@@ -9771,7 +9771,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9771
9771
  const { prefix = false } = config2;
9772
9772
  return hexFrom(value, { prefix, ...config2 });
9773
9773
  };
9774
- var AddressValidationZod = string2().refine((x) => HexZod.safeParse(x)).refine((x) => x.length === ADDRESS_LENGTH, { error: (e) => new Error(`Address must have 40 characters [${e.input}]`) }).transform((v) => v);
9774
+ var AddressValidationZod = string2().refine((x) => HexZod.safeParse(x).success).refine((x) => x.length === ADDRESS_LENGTH, { error: (e) => new Error(`Address must have 40 characters [${e.input}]`) }).transform((v) => v);
9775
9775
  var AddressTransformZod = union([string2(), bigint2(), number2()]).transform((value) => {
9776
9776
  switch (typeof value) {
9777
9777
  case "bigint": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/hash",
3
- "version": "5.3.13",
3
+ "version": "5.3.16",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -57,17 +57,19 @@
57
57
  "wasmHashBundle": "esbuild src/worker/wasmHash.ts --bundle --outfile=dist/browser/worker/wasmHash-bundle.mjs --target=chrome120,firefox120,safari14,edge120"
58
58
  },
59
59
  "dependencies": {
60
- "@xylabs/threads": "~5.0.80",
61
- "@xyo-network/wasm": "~5.3.13",
60
+ "@xylabs/threads": "~5.0.86",
61
+ "@xyo-network/wasm": "~5.3.16",
62
62
  "hash-wasm": "~4.12.0"
63
63
  },
64
64
  "devDependencies": {
65
- "@xylabs/sdk-js": "^5.0.80",
66
- "@xylabs/ts-scripts-yarn3": "~7.3.2",
67
- "@xylabs/tsconfig": "~7.3.2",
68
- "@xylabs/vitest-extended": "~5.0.80",
65
+ "@xylabs/hex": "^5.0.86",
66
+ "@xylabs/platform": "^5.0.86",
67
+ "@xylabs/sdk-js": "^5.0.86",
68
+ "@xylabs/ts-scripts-yarn3": "~7.4.17",
69
+ "@xylabs/tsconfig": "~7.4.17",
70
+ "@xylabs/vitest-extended": "~5.0.86",
69
71
  "esbuild": "~0.27.3",
70
- "publint": "~0.3.17",
72
+ "publint": "~0.3.18",
71
73
  "typescript": "~5.9.3",
72
74
  "vitest": "~4.0.18",
73
75
  "zod": "^4.3.6"