payid 0.5.7 → 0.5.8

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.
@@ -2,10 +2,10 @@ import {
2
2
  evaluate,
3
3
  generateDecisionProof,
4
4
  resolveRule
5
- } from "./chunk-LHLJP2TB.js";
5
+ } from "./chunk-PAJYP7JI.js";
6
6
  import {
7
7
  __export
8
- } from "./chunk-R5U7XKVJ.js";
8
+ } from "./chunk-MLKGABMK.js";
9
9
 
10
10
  // src/core/server/index.ts
11
11
  var server_exports = {};
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-YKCMGGYB.js";
7
7
  import {
8
8
  __export
9
- } from "./chunk-R5U7XKVJ.js";
9
+ } from "./chunk-MLKGABMK.js";
10
10
 
11
11
  // src/context/index.ts
12
12
  var context_exports = {};
@@ -6,10 +6,10 @@ import {
6
6
  } from "./chunk-6VPSJFO4.js";
7
7
  import {
8
8
  randomHex
9
- } from "./chunk-5ZEKI5Y2.js";
9
+ } from "./chunk-KDC67LIN.js";
10
10
  import {
11
11
  __export
12
- } from "./chunk-R5U7XKVJ.js";
12
+ } from "./chunk-MLKGABMK.js";
13
13
 
14
14
  // src/sessionPolicy/index.ts
15
15
  var sessionPolicy_exports = {};
@@ -0,0 +1,13 @@
1
+ // src/utils/randomHex.ts
2
+ function randomHex(bytes) {
3
+ if (!globalThis.crypto?.getRandomValues) {
4
+ throw new Error("Crypto API not available in this environment");
5
+ }
6
+ const arr = new Uint8Array(bytes);
7
+ globalThis.crypto.getRandomValues(arr);
8
+ return "0x" + Array.from(arr, (b) => b.toString(16).padStart(2, "0")).join("");
9
+ }
10
+
11
+ export {
12
+ randomHex
13
+ };
@@ -0,0 +1,9 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __export = (target, all) => {
3
+ for (var name in all)
4
+ __defProp(target, name, { get: all[name], enumerable: true });
5
+ };
6
+
7
+ export {
8
+ __export
9
+ };
@@ -1,9 +1,6 @@
1
1
  import {
2
2
  randomHex
3
- } from "./chunk-5ZEKI5Y2.js";
4
- import {
5
- __require
6
- } from "./chunk-R5U7XKVJ.js";
3
+ } from "./chunk-KDC67LIN.js";
7
4
 
8
5
  // src/evaluate.ts
9
6
  import { executeRule, preprocessContextV2 } from "payid-rule-engine";
@@ -180,7 +177,7 @@ async function evaluate(context, ruleConfig, options, wasmBinary) {
180
177
  }
181
178
 
182
179
  // src/utils/subtle.ts
183
- var subtleCrypto = globalThis.crypto?.subtle ?? __require("crypto").webcrypto.subtle;
180
+ var subtleCrypto = globalThis.crypto.subtle;
184
181
 
185
182
  // src/utils/fetchJson.ts
186
183
  async function fetchJsonWithHashCheck(url, expectedHash) {
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-6VPSJFO4.js";
7
7
  import {
8
8
  __export
9
- } from "./chunk-R5U7XKVJ.js";
9
+ } from "./chunk-MLKGABMK.js";
10
10
 
11
11
  // src/rule/index.ts
12
12
  var rule_exports = {};
@@ -8,10 +8,10 @@ import {
8
8
  evaluate,
9
9
  generateDecisionProof,
10
10
  resolveRule
11
- } from "./chunk-LHLJP2TB.js";
11
+ } from "./chunk-PAJYP7JI.js";
12
12
  import {
13
13
  __export
14
- } from "./chunk-R5U7XKVJ.js";
14
+ } from "./chunk-MLKGABMK.js";
15
15
 
16
16
  // src/core/client/index.ts
17
17
  var client_exports = {};
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-YKCMGGYB.js";
8
8
  import {
9
9
  __export
10
- } from "./chunk-R5U7XKVJ.js";
10
+ } from "./chunk-MLKGABMK.js";
11
11
 
12
12
  // src/issuer/index.ts
13
13
  var issuer_exports = {};
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  buildContextV2
3
- } from "../chunk-RICUEGTH.js";
3
+ } from "../chunk-BFCPKJ46.js";
4
4
  import "../chunk-YKCMGGYB.js";
5
- import "../chunk-R5U7XKVJ.js";
5
+ import "../chunk-MLKGABMK.js";
6
6
  export {
7
7
  buildContextV2
8
8
  };
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  createPayID
3
- } from "../../chunk-KUWSOJU7.js";
3
+ } from "../../chunk-ROBSNIIZ.js";
4
4
  import "../../chunk-GG34PNTF.js";
5
5
  import "../../chunk-MXKZJKXE.js";
6
6
  import "../../chunk-6VPSJFO4.js";
7
- import "../../chunk-LHLJP2TB.js";
8
- import "../../chunk-5ZEKI5Y2.js";
9
- import "../../chunk-R5U7XKVJ.js";
7
+ import "../../chunk-PAJYP7JI.js";
8
+ import "../../chunk-KDC67LIN.js";
9
+ import "../../chunk-MLKGABMK.js";
10
10
  export {
11
11
  createPayID
12
12
  };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createPayID
3
- } from "../../chunk-5WO2F5HT.js";
4
- import "../../chunk-LHLJP2TB.js";
5
- import "../../chunk-5ZEKI5Y2.js";
6
- import "../../chunk-R5U7XKVJ.js";
3
+ } from "../../chunk-AYJYFAXJ.js";
4
+ import "../../chunk-PAJYP7JI.js";
5
+ import "../../chunk-KDC67LIN.js";
6
+ import "../../chunk-MLKGABMK.js";
7
7
  export {
8
8
  createPayID
9
9
  };
package/dist/index.js CHANGED
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  context_exports
3
- } from "./chunk-RICUEGTH.js";
3
+ } from "./chunk-BFCPKJ46.js";
4
4
  import {
5
5
  issuer_exports
6
- } from "./chunk-J3SM3HWZ.js";
6
+ } from "./chunk-SSO66YQI.js";
7
7
  import "./chunk-YKCMGGYB.js";
8
8
  import {
9
9
  rule_exports
10
- } from "./chunk-U7PPUJJH.js";
10
+ } from "./chunk-QC24X74O.js";
11
11
  import {
12
12
  sessionPolicy_exports
13
- } from "./chunk-Y75PSD7U.js";
13
+ } from "./chunk-IQNCMOIE.js";
14
14
  import {
15
15
  client_exports
16
- } from "./chunk-KUWSOJU7.js";
16
+ } from "./chunk-ROBSNIIZ.js";
17
17
  import "./chunk-GG34PNTF.js";
18
18
  import "./chunk-MXKZJKXE.js";
19
19
  import "./chunk-6VPSJFO4.js";
@@ -22,16 +22,16 @@ import {
22
22
  buildPayETHCallData,
23
23
  buildUserOperation,
24
24
  server_exports
25
- } from "./chunk-5WO2F5HT.js";
25
+ } from "./chunk-AYJYFAXJ.js";
26
26
  import {
27
27
  evaluate,
28
28
  generateDecisionProof,
29
29
  resolveRule
30
- } from "./chunk-LHLJP2TB.js";
31
- import "./chunk-5ZEKI5Y2.js";
30
+ } from "./chunk-PAJYP7JI.js";
31
+ import "./chunk-KDC67LIN.js";
32
32
  import {
33
33
  __export
34
- } from "./chunk-R5U7XKVJ.js";
34
+ } from "./chunk-MLKGABMK.js";
35
35
 
36
36
  // src/core/payid.ts
37
37
  function isRuleSource(rule) {
@@ -1,4 +1,4 @@
1
- import "../chunk-J3SM3HWZ.js";
1
+ import "../chunk-SSO66YQI.js";
2
2
  import {
3
3
  issueEnvContext,
4
4
  issueOracleContext,
@@ -6,7 +6,7 @@ import {
6
6
  issueStateContext,
7
7
  signAttestation
8
8
  } from "../chunk-YKCMGGYB.js";
9
- import "../chunk-R5U7XKVJ.js";
9
+ import "../chunk-MLKGABMK.js";
10
10
  export {
11
11
  issueEnvContext,
12
12
  issueOracleContext,
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  hashRuleSet
3
- } from "../chunk-U7PPUJJH.js";
3
+ } from "../chunk-QC24X74O.js";
4
4
  import {
5
5
  combineRules
6
6
  } from "../chunk-GG34PNTF.js";
7
7
  import {
8
8
  canonicalizeRuleSet
9
9
  } from "../chunk-6VPSJFO4.js";
10
- import "../chunk-R5U7XKVJ.js";
10
+ import "../chunk-MLKGABMK.js";
11
11
  export {
12
12
  canonicalizeRuleSet,
13
13
  combineRules,
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  createSessionPolicyPayload
3
- } from "../chunk-Y75PSD7U.js";
3
+ } from "../chunk-IQNCMOIE.js";
4
4
  import {
5
5
  decodeSessionPolicy
6
6
  } from "../chunk-MXKZJKXE.js";
7
7
  import "../chunk-6VPSJFO4.js";
8
- import "../chunk-5ZEKI5Y2.js";
9
- import "../chunk-R5U7XKVJ.js";
8
+ import "../chunk-KDC67LIN.js";
9
+ import "../chunk-MLKGABMK.js";
10
10
  export {
11
11
  createSessionPolicyPayload,
12
12
  decodeSessionPolicy
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payid",
3
- "version": "0.5.7",
3
+ "version": "0.5.8",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,18 +0,0 @@
1
- import {
2
- __require
3
- } from "./chunk-R5U7XKVJ.js";
4
-
5
- // src/utils/randomHex.ts
6
- function randomHex(bytes) {
7
- if (typeof globalThis.crypto !== "undefined" && crypto.getRandomValues) {
8
- const arr = new Uint8Array(bytes);
9
- crypto.getRandomValues(arr);
10
- return "0x" + Array.from(arr, (b) => b.toString(16).padStart(2, "0")).join("");
11
- }
12
- const { randomBytes } = __require("crypto");
13
- return "0x" + randomBytes(bytes).toString("hex");
14
- }
15
-
16
- export {
17
- randomHex
18
- };
@@ -1,16 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
3
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
4
- }) : x)(function(x) {
5
- if (typeof require !== "undefined") return require.apply(this, arguments);
6
- throw Error('Dynamic require of "' + x + '" is not supported');
7
- });
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
-
13
- export {
14
- __require,
15
- __export
16
- };