@arcblock/validator 1.30.1 → 1.30.3

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.
package/esm/v/bn.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as v from "valibot";
2
- import BN from "bn.js";
2
+ import { BN } from "@ocap/util";
3
3
 
4
4
  //#region src/v/bn.ts
5
5
  const BN_ZERO = new BN(0);
package/lib/v/bn.cjs CHANGED
@@ -1,11 +1,10 @@
1
1
  const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
2
  let valibot = require("valibot");
3
3
  valibot = require_rolldown_runtime.__toESM(valibot);
4
- let bn_js = require("bn.js");
5
- bn_js = require_rolldown_runtime.__toESM(bn_js);
4
+ let _ocap_util = require("@ocap/util");
6
5
 
7
6
  //#region src/v/bn.ts
8
- const BN_ZERO = new bn_js.default(0);
7
+ const BN_ZERO = new _ocap_util.BN(0);
9
8
  const bnOps = {
10
9
  gte: (a, b) => a.gte(b),
11
10
  lte: (a, b) => a.lte(b),
@@ -19,7 +18,7 @@ const opLabels = {
19
18
  lt: "<"
20
19
  };
21
20
  function bnCompare(op, threshold) {
22
- const t = bn_js.default.isBN(threshold) ? threshold : new bn_js.default(threshold);
21
+ const t = _ocap_util.BN.isBN(threshold) ? threshold : new _ocap_util.BN(threshold);
23
22
  return valibot.check((value) => bnOps[op](value, t), `Value must be ${opLabels[op]} ${t.toString(10)}`);
24
23
  }
25
24
  const vBNMin = (t) => bnCompare("gte", t);
@@ -35,7 +34,7 @@ const vBNLt = vBNLess;
35
34
  function safeBN(input) {
36
35
  if (input === null || input === void 0 || typeof input === "number" && Number.isNaN(input)) return false;
37
36
  try {
38
- const bn = new bn_js.default(input);
37
+ const bn = new _ocap_util.BN(input);
39
38
  bn.toString(10);
40
39
  return bn;
41
40
  } catch {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "type": "module",
7
- "version": "1.30.1",
7
+ "version": "1.30.3",
8
8
  "description": "",
9
9
  "sideEffects": false,
10
10
  "main": "./lib/index.cjs",
@@ -41,15 +41,12 @@
41
41
  "clean": "rm -rf lib esm"
42
42
  },
43
43
  "dependencies": {
44
- "@arcblock/did": "1.30.1",
45
- "@ocap/mcrypto": "1.30.1",
46
- "@ocap/util": "1.30.1",
47
- "bn.js": "5.2.3",
44
+ "@arcblock/did": "1.30.3",
45
+ "@ocap/mcrypto": "1.30.3",
46
+ "@ocap/util": "1.30.3",
48
47
  "valibot": "^1.3.1"
49
48
  },
50
- "resolutions": {
51
- "bn.js": "5.2.3"
52
- },
49
+ "resolutions": {},
53
50
  "devDependencies": {
54
51
  "tsdown": "^0.18.4",
55
52
  "type-fest": "^3.1.0"