@pafi-dev/core 0.5.22 → 0.6.0

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 (60) hide show
  1. package/dist/abi/index.cjs +3 -7
  2. package/dist/abi/index.cjs.map +1 -1
  3. package/dist/abi/index.js +6 -10
  4. package/dist/chunk-3QDZFDEL.cjs +223 -0
  5. package/dist/chunk-3QDZFDEL.cjs.map +1 -0
  6. package/dist/{chunk-Y2MZ7MKJ.js → chunk-6CXTFOIH.js} +196 -2
  7. package/dist/chunk-6CXTFOIH.js.map +1 -0
  8. package/dist/{chunk-R6OFGVMP.cjs → chunk-Q6WCDZXI.cjs} +196 -2
  9. package/dist/chunk-Q6WCDZXI.cjs.map +1 -0
  10. package/dist/{chunk-TXA4GK5C.js → chunk-UOKI5GG6.js} +87 -7
  11. package/dist/chunk-UOKI5GG6.js.map +1 -0
  12. package/dist/eip712/index.cjs +2 -3
  13. package/dist/eip712/index.cjs.map +1 -1
  14. package/dist/eip712/index.js +1 -2
  15. package/dist/index.cjs +184 -168
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.d.cts +69 -48
  18. package/dist/index.d.ts +69 -48
  19. package/dist/index.js +164 -148
  20. package/dist/index.js.map +1 -1
  21. package/package.json +1 -31
  22. package/dist/chunk-2PIXFXA2.js +0 -135
  23. package/dist/chunk-2PIXFXA2.js.map +0 -1
  24. package/dist/chunk-CL3QSI4O.cjs +0 -65
  25. package/dist/chunk-CL3QSI4O.cjs.map +0 -1
  26. package/dist/chunk-DX73FB4P.cjs +0 -143
  27. package/dist/chunk-DX73FB4P.cjs.map +0 -1
  28. package/dist/chunk-IPXARZ6F.cjs +0 -135
  29. package/dist/chunk-IPXARZ6F.cjs.map +0 -1
  30. package/dist/chunk-JJ2LGENO.cjs +0 -373
  31. package/dist/chunk-JJ2LGENO.cjs.map +0 -1
  32. package/dist/chunk-KFWZRL7I.js +0 -65
  33. package/dist/chunk-KFWZRL7I.js.map +0 -1
  34. package/dist/chunk-L5UHQQVC.cjs +0 -136
  35. package/dist/chunk-L5UHQQVC.cjs.map +0 -1
  36. package/dist/chunk-R6OFGVMP.cjs.map +0 -1
  37. package/dist/chunk-TXA4GK5C.js.map +0 -1
  38. package/dist/chunk-VG23GIWQ.js +0 -373
  39. package/dist/chunk-VG23GIWQ.js.map +0 -1
  40. package/dist/chunk-WAFUL62X.js +0 -136
  41. package/dist/chunk-WAFUL62X.js.map +0 -1
  42. package/dist/chunk-X2JZFK4C.cjs +0 -87
  43. package/dist/chunk-X2JZFK4C.cjs.map +0 -1
  44. package/dist/chunk-Y2MZ7MKJ.js.map +0 -1
  45. package/dist/chunk-Y3HMGOYW.js +0 -87
  46. package/dist/chunk-Y3HMGOYW.js.map +0 -1
  47. package/dist/index-3C_HdEIm.d.cts +0 -227
  48. package/dist/index-DKtVEoRC.d.ts +0 -227
  49. package/dist/quoting/index.cjs +0 -19
  50. package/dist/quoting/index.cjs.map +0 -1
  51. package/dist/quoting/index.d.cts +0 -59
  52. package/dist/quoting/index.d.ts +0 -59
  53. package/dist/quoting/index.js +0 -19
  54. package/dist/quoting/index.js.map +0 -1
  55. package/dist/swap/index.cjs +0 -31
  56. package/dist/swap/index.cjs.map +0 -1
  57. package/dist/swap/index.d.cts +0 -3
  58. package/dist/swap/index.d.ts +0 -3
  59. package/dist/swap/index.js +0 -31
  60. package/dist/swap/index.js.map +0 -1
package/dist/index.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkR6OFGVMPcjs = require('./chunk-R6OFGVMP.cjs');
4
3
 
5
4
 
6
5
 
7
6
 
7
+ var _chunkQ6WCDZXIcjs = require('./chunk-Q6WCDZXI.cjs');
8
8
 
9
9
 
10
10
 
@@ -13,53 +13,11 @@ var _chunkR6OFGVMPcjs = require('./chunk-R6OFGVMP.cjs');
13
13
 
14
14
 
15
15
 
16
- var _chunkRZDG6SRRcjs = require('./chunk-RZDG6SRR.cjs');
17
-
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
-
27
-
28
-
29
-
30
- var _chunkCLPRSQT2cjs = require('./chunk-CLPRSQT2.cjs');
31
-
32
-
33
-
34
-
35
- var _chunkLRHY7GORcjs = require('./chunk-LRHY7GOR.cjs');
36
-
37
-
38
-
39
-
40
-
41
-
42
-
43
-
44
-
45
-
46
-
47
- var _chunkDX73FB4Pcjs = require('./chunk-DX73FB4P.cjs');
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
- var _chunkL5UHQQVCcjs = require('./chunk-L5UHQQVC.cjs');
56
-
57
-
58
- var _chunkCL3QSI4Ocjs = require('./chunk-CL3QSI4O.cjs');
59
16
 
60
17
 
61
18
 
62
19
 
20
+ var _chunkRZDG6SRRcjs = require('./chunk-RZDG6SRR.cjs');
63
21
 
64
22
 
65
23
 
@@ -73,22 +31,22 @@ var _chunkCL3QSI4Ocjs = require('./chunk-CL3QSI4O.cjs');
73
31
 
74
32
 
75
33
 
34
+ var _chunkCLPRSQT2cjs = require('./chunk-CLPRSQT2.cjs');
76
35
 
77
36
 
78
37
 
79
38
 
39
+ var _chunkLRHY7GORcjs = require('./chunk-LRHY7GOR.cjs');
80
40
 
81
41
 
82
42
 
83
43
 
84
44
 
85
45
 
86
- var _chunkJJ2LGENOcjs = require('./chunk-JJ2LGENO.cjs');
87
46
 
88
47
 
89
48
 
90
49
 
91
- var _chunkIPXARZ6Fcjs = require('./chunk-IPXARZ6F.cjs');
92
50
 
93
51
 
94
52
 
@@ -102,11 +60,49 @@ var _chunkIPXARZ6Fcjs = require('./chunk-IPXARZ6F.cjs');
102
60
 
103
61
 
104
62
 
105
- var _chunkX2JZFK4Ccjs = require('./chunk-X2JZFK4C.cjs');
63
+ var _chunk3QDZFDELcjs = require('./chunk-3QDZFDEL.cjs');
106
64
 
107
65
  // src/index.ts
108
66
  var _viem = require('viem');
109
67
 
68
+ // src/errors.ts
69
+ var PafiSDKError = class extends Error {
70
+ constructor(message) {
71
+ super(message);
72
+ this.name = "PafiSDKError";
73
+ }
74
+ };
75
+ var ConfigurationError = class extends PafiSDKError {
76
+ constructor(message) {
77
+ super(message);
78
+ this.name = "ConfigurationError";
79
+ }
80
+ };
81
+ var SigningError = class extends PafiSDKError {
82
+ constructor(message) {
83
+ super(message);
84
+ this.name = "SigningError";
85
+ }
86
+ };
87
+ var SimulationError = class extends PafiSDKError {
88
+ constructor(operation, reason) {
89
+ super(`Simulation failed for ${operation}: ${reason}`);
90
+ this.operation = operation;
91
+ this.reason = reason;
92
+ this.name = "SimulationError";
93
+ }
94
+
95
+
96
+ };
97
+ var ApiError = class extends PafiSDKError {
98
+ constructor(message, status) {
99
+ super(message);
100
+ this.status = status;
101
+ this.name = "ApiError";
102
+ }
103
+
104
+ };
105
+
110
106
  // src/perp/buildPerpDepositWithGasDeduction.ts
111
107
 
112
108
 
@@ -199,6 +195,106 @@ var ORDERLY_VAULT_ABI = [
199
195
  }
200
196
  ];
201
197
 
198
+ // src/userop/operations.ts
199
+
200
+ var ERC20_BURNABLE_ABI = _viem.parseAbi.call(void 0, ["function burn(uint256 amount)"]);
201
+ function erc20TransferOp(token, to, amount) {
202
+ return {
203
+ target: token,
204
+ value: 0n,
205
+ data: _viem.encodeFunctionData.call(void 0, {
206
+ abi: _viem.erc20Abi,
207
+ functionName: "transfer",
208
+ args: [to, amount]
209
+ })
210
+ };
211
+ }
212
+ function erc20ApproveOp(token, spender, amount) {
213
+ return {
214
+ target: token,
215
+ value: 0n,
216
+ data: _viem.encodeFunctionData.call(void 0, {
217
+ abi: _viem.erc20Abi,
218
+ functionName: "approve",
219
+ args: [spender, amount]
220
+ })
221
+ };
222
+ }
223
+ function erc20BurnOp(token, amount) {
224
+ return {
225
+ target: token,
226
+ value: 0n,
227
+ data: _viem.encodeFunctionData.call(void 0, {
228
+ abi: ERC20_BURNABLE_ABI,
229
+ functionName: "burn",
230
+ args: [amount]
231
+ })
232
+ };
233
+ }
234
+ function rawCallOp(target, data, value = 0n) {
235
+ return { target, value, data };
236
+ }
237
+
238
+ // src/userop/batchExecute.ts
239
+
240
+ var BATCH_EXECUTOR_ABI = _viem.parseAbi.call(void 0, [
241
+ "function executeBatch((address target, uint256 value, bytes data)[] calls)"
242
+ ]);
243
+ function encodeBatchExecute(operations) {
244
+ if (operations.length === 0) {
245
+ throw new Error("encodeBatchExecute: operations array must not be empty");
246
+ }
247
+ return _viem.encodeFunctionData.call(void 0, {
248
+ abi: BATCH_EXECUTOR_ABI,
249
+ functionName: "executeBatch",
250
+ args: [
251
+ operations.map((op) => ({
252
+ target: op.target,
253
+ value: op.value,
254
+ data: op.data
255
+ }))
256
+ ]
257
+ });
258
+ }
259
+ function decodeBatchExecuteCalls(callData) {
260
+ const { args } = _viem.decodeFunctionData.call(void 0, {
261
+ abi: BATCH_EXECUTOR_ABI,
262
+ data: callData
263
+ });
264
+ return args[0].map((c) => ({
265
+ to: c.target,
266
+ data: c.data,
267
+ value: c.value.toString()
268
+ }));
269
+ }
270
+
271
+ // src/userop/buildUserOperation.ts
272
+ var DEFAULT_CALL_GAS_LIMIT = 500000n;
273
+ var DEFAULT_VERIFICATION_GAS_LIMIT = 150000n;
274
+ var DEFAULT_PRE_VERIFICATION_GAS = 50000n;
275
+ function buildPartialUserOperation(params) {
276
+ return {
277
+ sender: params.sender,
278
+ nonce: params.nonce,
279
+ callData: encodeBatchExecute(params.operations),
280
+ callGasLimit: _nullishCoalesce(_optionalChain([params, 'access', _ => _.gasLimits, 'optionalAccess', _2 => _2.callGasLimit]), () => ( DEFAULT_CALL_GAS_LIMIT)),
281
+ verificationGasLimit: _nullishCoalesce(_optionalChain([params, 'access', _3 => _3.gasLimits, 'optionalAccess', _4 => _4.verificationGasLimit]), () => ( DEFAULT_VERIFICATION_GAS_LIMIT)),
282
+ preVerificationGas: _nullishCoalesce(_optionalChain([params, 'access', _5 => _5.gasLimits, 'optionalAccess', _6 => _6.preVerificationGas]), () => ( DEFAULT_PRE_VERIFICATION_GAS)),
283
+ maxFeePerGas: _nullishCoalesce(_optionalChain([params, 'access', _7 => _7.feeOverrides, 'optionalAccess', _8 => _8.maxFeePerGas]), () => ( 0n)),
284
+ maxPriorityFeePerGas: _nullishCoalesce(_optionalChain([params, 'access', _9 => _9.feeOverrides, 'optionalAccess', _10 => _10.maxPriorityFeePerGas]), () => ( 0n))
285
+ };
286
+ }
287
+ function assembleUserOperation(partial, paymaster, signature) {
288
+ return {
289
+ ...partial,
290
+ paymaster: paymaster.paymaster,
291
+ paymasterData: paymaster.paymasterData,
292
+ paymasterVerificationGasLimit: paymaster.paymasterVerificationGasLimit,
293
+ paymasterPostOpGasLimit: paymaster.paymasterPostOpGasLimit,
294
+ signature
295
+ };
296
+ }
297
+
202
298
  // src/perp/buildPerpDepositWithGasDeduction.ts
203
299
  function buildPerpDepositWithGasDeduction(params) {
204
300
  if (params.amount <= 0n) {
@@ -226,23 +322,23 @@ function buildPerpDepositWithGasDeduction(params) {
226
322
  args: [params.depositData]
227
323
  });
228
324
  const operations = [
229
- _chunkJJ2LGENOcjs.erc20ApproveOp.call(void 0, params.usdcAddress, vault, params.amount),
325
+ erc20ApproveOp(params.usdcAddress, vault, params.amount),
230
326
  {
231
- ..._chunkJJ2LGENOcjs.rawCallOp.call(void 0, vault, depositCallData),
327
+ ...rawCallOp(vault, depositCallData),
232
328
  // BatchExecutor passes `value` from the inner call along; this
233
329
  // becomes the LayerZero fee. The aggregated `msg.value` for the
234
330
  // top-level UserOp must equal the sum of inner `value`s.
235
331
  value: params.layerZeroFee
236
332
  }
237
333
  ];
238
- return _chunkJJ2LGENOcjs.buildPartialUserOperation.call(void 0, {
334
+ return buildPartialUserOperation({
239
335
  sender: params.userAddress,
240
336
  nonce: params.aaNonce,
241
337
  operations,
242
338
  gasLimits: {
243
- callGasLimit: _nullishCoalesce(_optionalChain([params, 'access', _ => _.gasLimits, 'optionalAccess', _2 => _2.callGasLimit]), () => ( 800000n)),
244
- verificationGasLimit: _nullishCoalesce(_optionalChain([params, 'access', _3 => _3.gasLimits, 'optionalAccess', _4 => _4.verificationGasLimit]), () => ( 150000n)),
245
- preVerificationGas: _nullishCoalesce(_optionalChain([params, 'access', _5 => _5.gasLimits, 'optionalAccess', _6 => _6.preVerificationGas]), () => ( 50000n))
339
+ callGasLimit: _nullishCoalesce(_optionalChain([params, 'access', _11 => _11.gasLimits, 'optionalAccess', _12 => _12.callGasLimit]), () => ( 800000n)),
340
+ verificationGasLimit: _nullishCoalesce(_optionalChain([params, 'access', _13 => _13.gasLimits, 'optionalAccess', _14 => _14.verificationGasLimit]), () => ( 150000n)),
341
+ preVerificationGas: _nullishCoalesce(_optionalChain([params, 'access', _15 => _15.gasLimits, 'optionalAccess', _16 => _16.preVerificationGas]), () => ( 50000n))
246
342
  }
247
343
  });
248
344
  }
@@ -322,7 +418,7 @@ function buildPerpDepositViaRelay(params) {
322
418
  });
323
419
  }
324
420
  operations.push(
325
- _chunkJJ2LGENOcjs.erc20ApproveOp.call(void 0,
421
+ erc20ApproveOp(
326
422
  params.request.token,
327
423
  params.relayAddress,
328
424
  params.request.totalAmount
@@ -341,15 +437,15 @@ function buildPerpDepositViaRelay(params) {
341
437
  }
342
438
  ]
343
439
  });
344
- operations.push(_chunkJJ2LGENOcjs.rawCallOp.call(void 0, params.relayAddress, depositCallData));
345
- return _chunkJJ2LGENOcjs.buildPartialUserOperation.call(void 0, {
440
+ operations.push(rawCallOp(params.relayAddress, depositCallData));
441
+ return buildPartialUserOperation({
346
442
  sender: params.userAddress,
347
443
  nonce: params.aaNonce,
348
444
  operations,
349
445
  gasLimits: {
350
- callGasLimit: _nullishCoalesce(_optionalChain([params, 'access', _7 => _7.gasLimits, 'optionalAccess', _8 => _8.callGasLimit]), () => ( 800000n)),
351
- verificationGasLimit: _nullishCoalesce(_optionalChain([params, 'access', _9 => _9.gasLimits, 'optionalAccess', _10 => _10.verificationGasLimit]), () => ( 150000n)),
352
- preVerificationGas: _nullishCoalesce(_optionalChain([params, 'access', _11 => _11.gasLimits, 'optionalAccess', _12 => _12.preVerificationGas]), () => ( 50000n))
446
+ callGasLimit: _nullishCoalesce(_optionalChain([params, 'access', _17 => _17.gasLimits, 'optionalAccess', _18 => _18.callGasLimit]), () => ( 800000n)),
447
+ verificationGasLimit: _nullishCoalesce(_optionalChain([params, 'access', _19 => _19.gasLimits, 'optionalAccess', _20 => _20.verificationGasLimit]), () => ( 150000n)),
448
+ preVerificationGas: _nullishCoalesce(_optionalChain([params, 'access', _21 => _21.gasLimits, 'optionalAccess', _22 => _22.preVerificationGas]), () => ( 50000n))
353
449
  }
354
450
  });
355
451
  }
@@ -415,7 +511,7 @@ function buildUserOpTypedData(userOp, chainId) {
415
511
  name: "ERC4337",
416
512
  version: "1",
417
513
  chainId,
418
- verifyingContract: _chunkX2JZFK4Ccjs.ENTRY_POINT_V08
514
+ verifyingContract: _chunk3QDZFDELcjs.ENTRY_POINT_V08
419
515
  },
420
516
  types: PACKED_USER_OPERATION_TYPES,
421
517
  primaryType: "PackedUserOperation",
@@ -523,7 +619,7 @@ async function isDelegatedTo(client, address, target) {
523
619
 
524
620
  // src/delegation/buildDelegationUserOp.ts
525
621
  function buildDelegationUserOp(params) {
526
- return _chunkJJ2LGENOcjs.buildPartialUserOperation.call(void 0, {
622
+ return buildPartialUserOperation({
527
623
  sender: params.userAddress,
528
624
  nonce: params.aaNonce,
529
625
  operations: [
@@ -538,9 +634,9 @@ function buildDelegationUserOp(params) {
538
634
  }
539
635
  ],
540
636
  gasLimits: {
541
- callGasLimit: _nullishCoalesce(_optionalChain([params, 'access', _13 => _13.gasLimits, 'optionalAccess', _14 => _14.callGasLimit]), () => ( 50000n)),
542
- verificationGasLimit: _nullishCoalesce(_optionalChain([params, 'access', _15 => _15.gasLimits, 'optionalAccess', _16 => _16.verificationGasLimit]), () => ( 150000n)),
543
- preVerificationGas: _nullishCoalesce(_optionalChain([params, 'access', _17 => _17.gasLimits, 'optionalAccess', _18 => _18.preVerificationGas]), () => ( 50000n))
637
+ callGasLimit: _nullishCoalesce(_optionalChain([params, 'access', _23 => _23.gasLimits, 'optionalAccess', _24 => _24.callGasLimit]), () => ( 50000n)),
638
+ verificationGasLimit: _nullishCoalesce(_optionalChain([params, 'access', _25 => _25.gasLimits, 'optionalAccess', _26 => _26.verificationGasLimit]), () => ( 150000n)),
639
+ preVerificationGas: _nullishCoalesce(_optionalChain([params, 'access', _27 => _27.gasLimits, 'optionalAccess', _28 => _28.preVerificationGas]), () => ( 50000n))
544
640
  }
545
641
  });
546
642
  }
@@ -558,7 +654,7 @@ async function getAaNonce(client, userAddress) {
558
654
  }
559
655
  ];
560
656
  return client.readContract({
561
- address: _chunkX2JZFK4Ccjs.ENTRY_POINT_V08,
657
+ address: _chunk3QDZFDELcjs.ENTRY_POINT_V08,
562
658
  abi: NONCE_ABI,
563
659
  functionName: "getNonce",
564
660
  args: [userAddress, 0n]
@@ -626,7 +722,7 @@ function createPafiProxyTransport(params) {
626
722
  // fetchFn intercepts every fetch call the viem http transport makes,
627
723
  // injecting the auth headers before the request leaves the browser.
628
724
  fetchFn: (input, init) => {
629
- const headers = new Headers(_optionalChain([init, 'optionalAccess', _19 => _19.headers]));
725
+ const headers = new Headers(_optionalChain([init, 'optionalAccess', _29 => _29.headers]));
630
726
  const token = getIdentityToken();
631
727
  if (token) {
632
728
  headers.set("authorization", `Bearer ${token}`);
@@ -639,7 +735,7 @@ function createPafiProxyTransport(params) {
639
735
 
640
736
  // src/transport/paymasterFallback.ts
641
737
  function isPaymasterError(err) {
642
- const msg = (_nullishCoalesce(_optionalChain([err, 'optionalAccess', _20 => _20.message]), () => ( String(err)))).toLowerCase();
738
+ const msg = (_nullishCoalesce(_optionalChain([err, 'optionalAccess', _30 => _30.message]), () => ( String(err)))).toLowerCase();
643
739
  return msg.includes("paymaster") || msg.includes("sponsorship") || msg.includes("aa31") || msg.includes("aa32") || msg.includes("aa33") || msg.includes("aa34") || msg.includes("pm_") || msg.includes("rate limit") || msg.includes("unauthorized") || msg.includes("403") || msg.includes("429") || msg.includes("503");
644
740
  }
645
741
  async function sendWithPaymasterFallback(params) {
@@ -648,8 +744,8 @@ async function sendWithPaymasterFallback(params) {
648
744
  return await primaryClient.sendTransaction(txParams);
649
745
  } catch (err) {
650
746
  if (isPaymasterError(err) && fallbackClient) {
651
- const msg = _nullishCoalesce(_optionalChain([err, 'optionalAccess', _21 => _21.message]), () => ( String(err)));
652
- _optionalChain([onFallback, 'optionalCall', _22 => _22(msg)]);
747
+ const msg = _nullishCoalesce(_optionalChain([err, 'optionalAccess', _31 => _31.message]), () => ( String(err)));
748
+ _optionalChain([onFallback, 'optionalCall', _32 => _32(msg)]);
653
749
  return await fallbackClient.sendTransaction(_nullishCoalesce(txParamsFallback, () => ( txParams)));
654
750
  }
655
751
  throw err;
@@ -707,7 +803,7 @@ async function fetchPafiPools(_chainId, pointTokenAddress, subgraphUrl = PAFI_SU
707
803
  );
708
804
  return [];
709
805
  }
710
- const pool = _optionalChain([json, 'access', _23 => _23.data, 'optionalAccess', _24 => _24.pafiToken, 'optionalAccess', _25 => _25.pool]);
806
+ const pool = _optionalChain([json, 'access', _33 => _33.data, 'optionalAccess', _34 => _34.pafiToken, 'optionalAccess', _35 => _35.pool]);
711
807
  if (!pool) return [];
712
808
  if (!_viem.isAddress.call(void 0, pool.hooks) || !_viem.isAddress.call(void 0, pool.token0.id) || !_viem.isAddress.call(void 0, pool.token1.id) || !Number.isFinite(Number(pool.feeTier)) || !Number.isFinite(Number(pool.tickSpacing))) {
713
809
  console.error("[fetchPafiPools] invalid pool data in subgraph response \u2014 skipping");
@@ -866,10 +962,10 @@ async function getPtPerUsdt18dec(fetchImpl, subgraphUrl, pointTokenAddress, fall
866
962
  });
867
963
  if (!response.ok) throw new Error(`subgraph HTTP ${response.status}`);
868
964
  const json = await response.json();
869
- if (_optionalChain([json, 'access', _26 => _26.errors, 'optionalAccess', _27 => _27.length])) {
965
+ if (_optionalChain([json, 'access', _36 => _36.errors, 'optionalAccess', _37 => _37.length])) {
870
966
  throw new Error(json.errors.map((e) => e.message).join("; "));
871
967
  }
872
- const pool = _optionalChain([json, 'access', _28 => _28.data, 'optionalAccess', _29 => _29.pafiToken, 'optionalAccess', _30 => _30.pool]);
968
+ const pool = _optionalChain([json, 'access', _38 => _38.data, 'optionalAccess', _39 => _39.pafiToken, 'optionalAccess', _40 => _40.pool]);
873
969
  if (!pool) throw new Error("pafiToken or pool not found");
874
970
  const isPtToken0 = pool.token0.id.toLowerCase() === pointTokenAddress.toLowerCase();
875
971
  const priceStr = isPtToken0 ? pool.token0Price : pool.token1Price;
@@ -914,8 +1010,8 @@ function openWebPopup(url, options = {}) {
914
1010
  const width = _nullishCoalesce(options.width, () => ( DEFAULT_WIDTH));
915
1011
  const height = _nullishCoalesce(options.height, () => ( DEFAULT_HEIGHT));
916
1012
  const name = _nullishCoalesce(options.windowName, () => ( DEFAULT_NAME));
917
- const screenW = _nullishCoalesce(_optionalChain([window, 'access', _31 => _31.screen, 'optionalAccess', _32 => _32.availWidth]), () => ( window.innerWidth));
918
- const screenH = _nullishCoalesce(_optionalChain([window, 'access', _33 => _33.screen, 'optionalAccess', _34 => _34.availHeight]), () => ( window.innerHeight));
1013
+ const screenW = _nullishCoalesce(_optionalChain([window, 'access', _41 => _41.screen, 'optionalAccess', _42 => _42.availWidth]), () => ( window.innerWidth));
1014
+ const screenH = _nullishCoalesce(_optionalChain([window, 'access', _43 => _43.screen, 'optionalAccess', _44 => _44.availHeight]), () => ( window.innerHeight));
919
1015
  const left = Math.max(0, Math.floor((screenW - width) / 2));
920
1016
  const top = Math.max(0, Math.floor((screenH - height) / 2));
921
1017
  const features = [
@@ -948,7 +1044,7 @@ function openWebPopup(url, options = {}) {
948
1044
  window.removeEventListener("message", messageListener);
949
1045
  messageListener = null;
950
1046
  }
951
- _optionalChain([options, 'access', _35 => _35.onClose, 'optionalCall', _36 => _36()]);
1047
+ _optionalChain([options, 'access', _45 => _45.onClose, 'optionalCall', _46 => _46()]);
952
1048
  };
953
1049
  pollId = setInterval(() => {
954
1050
  if (popup.closed) {
@@ -1036,8 +1132,6 @@ var PafiSDK = class {
1036
1132
 
1037
1133
 
1038
1134
 
1039
-
1040
-
1041
1135
  constructor(config) {
1042
1136
  this._pointTokenAddress = config.pointTokenAddress;
1043
1137
  this._signer = config.signer;
@@ -1061,13 +1155,6 @@ var PafiSDK = class {
1061
1155
  verify: this.verifyReceiverConsent.bind(this),
1062
1156
  getNonce: this.getReceiverConsentNonce.bind(this)
1063
1157
  };
1064
- this.swap = {
1065
- buildFromQuote: this.buildSwapFromQuote.bind(this),
1066
- simulate: this.simulateSwap.bind(this)
1067
- };
1068
- this.quote = {
1069
- findBest: this.findBestQuote.bind(this)
1070
- };
1071
1158
  this.auth = {
1072
1159
  createLoginMessage: this.createLoginMessage.bind(this),
1073
1160
  signMessage: this.signLoginMessage.bind(this)
@@ -1090,25 +1177,25 @@ var PafiSDK = class {
1090
1177
  // -------------------------------------------------------------------------
1091
1178
  requirePointToken() {
1092
1179
  if (!this._pointTokenAddress) {
1093
- throw new (0, _chunkJJ2LGENOcjs.ConfigurationError)("pointTokenAddress not set");
1180
+ throw new ConfigurationError("pointTokenAddress not set");
1094
1181
  }
1095
1182
  return this._pointTokenAddress;
1096
1183
  }
1097
1184
  requireProvider() {
1098
1185
  if (!this._provider) {
1099
- throw new (0, _chunkJJ2LGENOcjs.ConfigurationError)("provider not set");
1186
+ throw new ConfigurationError("provider not set");
1100
1187
  }
1101
1188
  return this._provider;
1102
1189
  }
1103
1190
  requireSigner() {
1104
1191
  if (!this._signer) {
1105
- throw new (0, _chunkJJ2LGENOcjs.ConfigurationError)("signer not set");
1192
+ throw new ConfigurationError("signer not set");
1106
1193
  }
1107
1194
  return this._signer;
1108
1195
  }
1109
1196
  requireChainId() {
1110
1197
  if (this._chainId === void 0) {
1111
- throw new (0, _chunkJJ2LGENOcjs.ConfigurationError)("chainId not set");
1198
+ throw new ConfigurationError("chainId not set");
1112
1199
  }
1113
1200
  return this._chainId;
1114
1201
  }
@@ -1127,27 +1214,27 @@ var PafiSDK = class {
1127
1214
  // -------------------------------------------------------------------------
1128
1215
  async buildMintRequestTypedData(message) {
1129
1216
  const domain = await this.getDomain();
1130
- return _chunkDX73FB4Pcjs.buildMintRequestTypedData.call(void 0, domain, message);
1217
+ return _chunk3QDZFDELcjs.buildMintRequestTypedData.call(void 0, domain, message);
1131
1218
  }
1132
1219
  async buildReceiverConsentTypedData(message) {
1133
1220
  const domain = await this.getDomain();
1134
- return _chunkDX73FB4Pcjs.buildReceiverConsentTypedData.call(void 0, domain, message);
1221
+ return _chunk3QDZFDELcjs.buildReceiverConsentTypedData.call(void 0, domain, message);
1135
1222
  }
1136
1223
  async signMintRequest(message) {
1137
1224
  const domain = await this.getDomain();
1138
- return _chunkDX73FB4Pcjs.signMintRequest.call(void 0, this.requireSigner(), domain, message);
1225
+ return _chunk3QDZFDELcjs.signMintRequest.call(void 0, this.requireSigner(), domain, message);
1139
1226
  }
1140
1227
  async verifyMintRequest(message, signature, expectedMinter) {
1141
1228
  const domain = await this.getDomain();
1142
- return _chunkDX73FB4Pcjs.verifyMintRequest.call(void 0, domain, message, signature, expectedMinter);
1229
+ return _chunk3QDZFDELcjs.verifyMintRequest.call(void 0, domain, message, signature, expectedMinter);
1143
1230
  }
1144
1231
  async signReceiverConsent(message) {
1145
1232
  const domain = await this.getDomain();
1146
- return _chunkDX73FB4Pcjs.signReceiverConsent.call(void 0, this.requireSigner(), domain, message);
1233
+ return _chunk3QDZFDELcjs.signReceiverConsent.call(void 0, this.requireSigner(), domain, message);
1147
1234
  }
1148
1235
  async verifyReceiverConsent(message, signature, expectedReceiver) {
1149
1236
  const domain = await this.getDomain();
1150
- return _chunkDX73FB4Pcjs.verifyReceiverConsent.call(void 0, domain, message, signature, expectedReceiver);
1237
+ return _chunk3QDZFDELcjs.verifyReceiverConsent.call(void 0, domain, message, signature, expectedReceiver);
1151
1238
  }
1152
1239
  // -------------------------------------------------------------------------
1153
1240
  // Contract reads
@@ -1167,59 +1254,6 @@ var PafiSDK = class {
1167
1254
  );
1168
1255
  }
1169
1256
  // -------------------------------------------------------------------------
1170
- // Quoting — delegates to pure functions
1171
- // -------------------------------------------------------------------------
1172
- /**
1173
- * Find the best swap route from `tokenIn` to `tokenOut`.
1174
- * Merges `pools` with COMMON_POOLS for the configured chain, builds all
1175
- * paths, and quotes via a single multicall RPC call.
1176
- */
1177
- async findBestQuote(tokenIn, tokenOut, exactAmount, pools = [], quoterAddress, maxHops) {
1178
- return _chunkL5UHQQVCcjs.findBestQuote.call(void 0,
1179
- this.requireProvider(),
1180
- this.requireChainId(),
1181
- tokenIn,
1182
- tokenOut,
1183
- exactAmount,
1184
- pools,
1185
- quoterAddress,
1186
- maxHops
1187
- );
1188
- }
1189
- // -------------------------------------------------------------------------
1190
- // Swap building — delegates to pure functions
1191
- // -------------------------------------------------------------------------
1192
- /**
1193
- * Build UniversalRouter execute args from a quote result.
1194
- * The caller provides `minAmountOut` after applying their own slippage.
1195
- */
1196
- buildSwapFromQuote(params) {
1197
- return _chunkJJ2LGENOcjs.buildSwapFromQuote.call(void 0, params);
1198
- }
1199
- // -------------------------------------------------------------------------
1200
- // Simulation — dry-run via eth_call (no gas spent)
1201
- // -------------------------------------------------------------------------
1202
- /**
1203
- * Simulate a UniversalRouter.execute swap call. Catches reverts (bad
1204
- * approvals, insufficient balance, pool errors) before submitting.
1205
- *
1206
- * @param routerAddress - UniversalRouter contract address
1207
- * @param commands - Packed command bytes (from buildSwapFromQuote)
1208
- * @param inputs - Encoded inputs (from buildSwapFromQuote)
1209
- * @param deadline - Unix timestamp
1210
- * @param from - Address that will execute the swap
1211
- */
1212
- async simulateSwap(routerAddress, commands, inputs, deadline, from) {
1213
- return _chunkJJ2LGENOcjs.simulateSwap.call(void 0,
1214
- this.requireProvider(),
1215
- routerAddress,
1216
- commands,
1217
- inputs,
1218
- deadline,
1219
- from
1220
- );
1221
- }
1222
- // -------------------------------------------------------------------------
1223
1257
  // Auth — EIP-4361 login helpers (offline, stateless)
1224
1258
  // -------------------------------------------------------------------------
1225
1259
  async createLoginMessage(params) {
@@ -1227,7 +1261,7 @@ var PafiSDK = class {
1227
1261
  const chainId = this.requireChainId();
1228
1262
  const account = signer.account;
1229
1263
  if (!account) {
1230
- throw new (0, _chunkJJ2LGENOcjs.ConfigurationError)("signer has no account attached");
1264
+ throw new ConfigurationError("signer has no account attached");
1231
1265
  }
1232
1266
  return _chunkRZDG6SRRcjs.createLoginMessage.call(void 0, { ...params, address: account.address, chainId });
1233
1267
  }
@@ -1236,7 +1270,7 @@ var PafiSDK = class {
1236
1270
  const signer = this.requireSigner();
1237
1271
  const account = signer.account;
1238
1272
  if (!account) {
1239
- throw new (0, _chunkJJ2LGENOcjs.ConfigurationError)("signer has no account attached");
1273
+ throw new ConfigurationError("signer has no account attached");
1240
1274
  }
1241
1275
  return signer.signMessage({ account, message });
1242
1276
  }
@@ -1360,23 +1394,5 @@ var PafiSDK = class {
1360
1394
 
1361
1395
 
1362
1396
 
1363
-
1364
-
1365
-
1366
-
1367
-
1368
-
1369
-
1370
-
1371
-
1372
-
1373
-
1374
-
1375
-
1376
-
1377
-
1378
-
1379
-
1380
-
1381
- exports.ApiError = _chunkJJ2LGENOcjs.ApiError; exports.BATCH_EXECUTOR_7702_IMPL = BATCH_EXECUTOR_7702_IMPL; exports.BATCH_EXECUTOR_ABI = _chunkJJ2LGENOcjs.BATCH_EXECUTOR_ABI; exports.BATCH_EXECUTOR_ADDRESS_BASE_MAINNET = BATCH_EXECUTOR_ADDRESS_BASE_MAINNET; exports.BATCH_EXECUTOR_ADDRESS_BASE_SEPOLIA = BATCH_EXECUTOR_ADDRESS_BASE_SEPOLIA; exports.BROKER_HASHES = BROKER_HASHES; exports.COMMON_POOLS = _chunkX2JZFK4Ccjs.COMMON_POOLS; exports.COMMON_TOKENS = _chunkX2JZFK4Ccjs.COMMON_TOKENS; exports.CONTRACT_ADDRESSES = CONTRACT_ADDRESSES; exports.ConfigurationError = _chunkJJ2LGENOcjs.ConfigurationError; exports.DUMMY_SIGNATURE_V07 = DUMMY_SIGNATURE_V07; exports.ENTRY_POINT_V07 = _chunkX2JZFK4Ccjs.ENTRY_POINT_V07; exports.ENTRY_POINT_V08 = _chunkX2JZFK4Ccjs.ENTRY_POINT_V08; exports.ORDERLY_RELAY_ABI = ORDERLY_RELAY_ABI; exports.ORDERLY_VAULT_ABI = ORDERLY_VAULT_ABI; exports.ORDERLY_VAULT_ADDRESSES = ORDERLY_VAULT_ADDRESSES; exports.ORDERLY_VAULT_BASE_MAINNET = ORDERLY_VAULT_BASE_MAINNET; exports.PAFI_SUBGRAPH_URL = PAFI_SUBGRAPH_URL; exports.PERMIT2_ADDRESS = _chunkX2JZFK4Ccjs.PERMIT2_ADDRESS; exports.POINT_TOKEN_FACTORY_ADDRESSES = POINT_TOKEN_FACTORY_ADDRESSES; exports.POINT_TOKEN_IMPL_ADDRESSES = POINT_TOKEN_IMPL_ADDRESSES; exports.POINT_TOKEN_POOLS = _chunkX2JZFK4Ccjs.POINT_TOKEN_POOLS; exports.POINT_TOKEN_V2_ABI = _chunkLRHY7GORcjs.pointTokenAbi; exports.PafiSDK = PafiSDK; exports.PafiSDKError = _chunkJJ2LGENOcjs.PafiSDKError; exports.SETTLE_ALL = _chunkJJ2LGENOcjs.SETTLE_ALL; exports.SIMPLE_7702_IMPL_BASE_MAINNET = SIMPLE_7702_IMPL_BASE_MAINNET; exports.SPONSOR_AUTH_DOMAIN_NAME = _chunkRZDG6SRRcjs.SPONSOR_AUTH_DOMAIN_NAME; exports.SPONSOR_AUTH_TYPES = _chunkRZDG6SRRcjs.SPONSOR_AUTH_TYPES; exports.SUPPORTED_CHAINS = _chunkX2JZFK4Ccjs.SUPPORTED_CHAINS; exports.SWAP_EXACT_IN = _chunkJJ2LGENOcjs.SWAP_EXACT_IN; exports.SigningError = _chunkJJ2LGENOcjs.SigningError; exports.SimulationError = _chunkJJ2LGENOcjs.SimulationError; exports.TAKE_ALL = _chunkJJ2LGENOcjs.TAKE_ALL; exports.TOKEN_HASHES = TOKEN_HASHES; exports.UNIVERSAL_ROUTER_ADDRESSES = _chunkX2JZFK4Ccjs.UNIVERSAL_ROUTER_ADDRESSES; exports.V4_QUOTER_ADDRESSES = _chunkX2JZFK4Ccjs.V4_QUOTER_ADDRESSES; exports.V4_SWAP = _chunkJJ2LGENOcjs.V4_SWAP; exports.ZERO_VALUE = ZERO_VALUE; exports._resetPaymasterConfigForTests = _resetPaymasterConfigForTests; exports.assembleUserOperation = _chunkJJ2LGENOcjs.assembleUserOperation; exports.buildAllPaths = _chunkL5UHQQVCcjs.buildAllPaths; exports.buildAndSignSponsorAuth = _chunkRZDG6SRRcjs.buildAndSignSponsorAuth; exports.buildBurnRequestTypedData = _chunkDX73FB4Pcjs.buildBurnRequestTypedData; exports.buildDelegationUserOp = buildDelegationUserOp; exports.buildDomain = _chunkDX73FB4Pcjs.buildDomain; exports.buildEip7702Authorization = buildEip7702Authorization; exports.buildErc20ApprovalCalldata = _chunkJJ2LGENOcjs.buildErc20ApprovalCalldata; exports.buildMintRequestTypedData = _chunkDX73FB4Pcjs.buildMintRequestTypedData; exports.buildPartialUserOperation = _chunkJJ2LGENOcjs.buildPartialUserOperation; exports.buildPermit2ApprovalCalldata = _chunkJJ2LGENOcjs.buildPermit2ApprovalCalldata; exports.buildPerpDepositViaRelay = buildPerpDepositViaRelay; exports.buildPerpDepositWithGasDeduction = buildPerpDepositWithGasDeduction; exports.buildReceiverConsentTypedData = _chunkDX73FB4Pcjs.buildReceiverConsentTypedData; exports.buildSponsorAuthDomain = _chunkRZDG6SRRcjs.buildSponsorAuthDomain; exports.buildSponsorAuthTypedData = _chunkRZDG6SRRcjs.buildSponsorAuthTypedData; exports.buildSwapFromQuote = _chunkJJ2LGENOcjs.buildSwapFromQuote; exports.buildSwapWithGasDeduction = _chunkJJ2LGENOcjs.buildSwapWithGasDeduction; exports.buildUniversalRouterExecuteArgs = _chunkJJ2LGENOcjs.buildUniversalRouterExecuteArgs; exports.buildUserOpTypedData = buildUserOpTypedData; exports.buildV4SwapInput = _chunkJJ2LGENOcjs.buildV4SwapInput; exports.burnRequestTypes = _chunkX2JZFK4Ccjs.burnRequestTypes; exports.checkAllowance = _chunkJJ2LGENOcjs.checkAllowance; exports.checkDelegation = checkDelegation; exports.checkEthAndBranch = checkEthAndBranch; exports.combineRoutes = _chunkL5UHQQVCcjs.combineRoutes; exports.computeAccountId = computeAccountId; exports.computeAuthorizationHash = computeAuthorizationHash; exports.computeCallDataHash = _chunkRZDG6SRRcjs.computeCallDataHash; exports.computeUserOpHash = computeUserOpHash; exports.createLoginMessage = _chunkRZDG6SRRcjs.createLoginMessage; exports.createPafiProxyTransport = createPafiProxyTransport; exports.decodeBatchExecuteCalls = _chunkJJ2LGENOcjs.decodeBatchExecuteCalls; exports.detectDelegateImpl = detectDelegateImpl; exports.encodeBatchExecute = _chunkJJ2LGENOcjs.encodeBatchExecute; exports.erc20Abi = _chunkIPXARZ6Fcjs.erc20Abi; exports.erc20ApproveOp = _chunkJJ2LGENOcjs.erc20ApproveOp; exports.erc20BurnOp = _chunkJJ2LGENOcjs.erc20BurnOp; exports.erc20TransferOp = _chunkJJ2LGENOcjs.erc20TransferOp; exports.fetchPafiPools = fetchPafiPools; exports.findBestQuote = _chunkL5UHQQVCcjs.findBestQuote; exports.getAaNonce = getAaNonce; exports.getBurnRequestNonce = _chunkCLPRSQT2cjs.getBurnRequestNonce; exports.getContractAddresses = getContractAddresses; exports.getDummySignatureFor7702 = getDummySignatureFor7702; exports.getIssuer = _chunkCLPRSQT2cjs.getIssuer2; exports.getMintRequestNonce = _chunkCLPRSQT2cjs.getMintRequestNonce; exports.getPafiWebModalAdapter = getPafiWebModalAdapter; exports.getPaymasterConfig = getPaymasterConfig; exports.getPointTokenBalance = _chunkCLPRSQT2cjs.getPointTokenBalance; exports.getPointTokenIssuer = _chunkCLPRSQT2cjs.getPointTokenIssuer; exports.getPointTokenIssuerAddress = _chunkCLPRSQT2cjs.getIssuer; exports.getReceiverConsentNonce = _chunkCLPRSQT2cjs.getReceiverConsentNonce; exports.getTokenName = _chunkCLPRSQT2cjs.getTokenName; exports.isActiveIssuer = _chunkCLPRSQT2cjs.isActiveIssuer; exports.isDelegatedTo = isDelegatedTo; exports.isDelegatedToTarget = isDelegatedToTarget; exports.isMinter = _chunkCLPRSQT2cjs.isMinter; exports.isPaymasterConfigured = isPaymasterConfigured; exports.isPaymasterError = isPaymasterError; exports.issuerRegistryAbi = _chunkLRHY7GORcjs.issuerRegistryAbi; exports.issuerRegistryGetIssuerFlatAbi = _chunkCLPRSQT2cjs.issuerRegistryGetIssuerFlatAbi; exports.mintRequestTypes = _chunkX2JZFK4Ccjs.mintRequestTypes; exports.mintingOracleAbi = _chunkLRHY7GORcjs.mintingOracleAbi; exports.openPafiWebModal = openPafiWebModal; exports.openWebPopup = openWebPopup; exports.parseEip7702DelegatedAddress = parseEip7702DelegatedAddress; exports.parseLoginMessage = _chunkRZDG6SRRcjs.parseLoginMessage; exports.permit2Abi = _chunkIPXARZ6Fcjs.permit2Abi; exports.pointTokenAbi = _chunkLRHY7GORcjs.pointTokenAbi; exports.pointTokenFactoryAbi = _chunkR6OFGVMPcjs.pointTokenFactoryAbi; exports.quoteBestRoute = _chunkL5UHQQVCcjs.quoteBestRoute; exports.quoteExactInput = _chunkL5UHQQVCcjs.quoteExactInput; exports.quoteExactInputSingle = _chunkL5UHQQVCcjs.quoteExactInputSingle; exports.quoteOperatorFeePt = quoteOperatorFeePt; exports.rawCallOp = _chunkJJ2LGENOcjs.rawCallOp; exports.receiverConsentTypes = _chunkX2JZFK4Ccjs.receiverConsentTypes; exports.sendWithPaymasterFallback = sendWithPaymasterFallback; exports.serializeUserOpToJsonRpc = serializeUserOpToJsonRpc; exports.setPafiWebModalAdapter = setPafiWebModalAdapter; exports.setPaymasterConfig = setPaymasterConfig; exports.signBurnRequest = _chunkDX73FB4Pcjs.signBurnRequest; exports.signMintRequest = _chunkDX73FB4Pcjs.signMintRequest; exports.signReceiverConsent = _chunkDX73FB4Pcjs.signReceiverConsent; exports.signSponsorAuth = _chunkRZDG6SRRcjs.signSponsorAuth; exports.simulateSwap = _chunkJJ2LGENOcjs.simulateSwap; exports.splitAuthorizationSig = splitAuthorizationSig; exports.universalRouterAbi = _chunkIPXARZ6Fcjs.universalRouterAbi; exports.v4QuoterAbi = _chunkCL3QSI4Ocjs.v4QuoterAbi; exports.verifyBurnRequest = _chunkDX73FB4Pcjs.verifyBurnRequest; exports.verifyLoginMessage = _chunkRZDG6SRRcjs.verifyLoginMessage; exports.verifyMintCap = _chunkCLPRSQT2cjs.verifyMintCap; exports.verifyMintRequest = _chunkDX73FB4Pcjs.verifyMintRequest; exports.verifyReceiverConsent = _chunkDX73FB4Pcjs.verifyReceiverConsent; exports.verifySponsorAuth = _chunkRZDG6SRRcjs.verifySponsorAuth; exports.webPopupAdapter = webPopupAdapter;
1397
+ exports.ApiError = ApiError; exports.BATCH_EXECUTOR_7702_IMPL = BATCH_EXECUTOR_7702_IMPL; exports.BATCH_EXECUTOR_ABI = BATCH_EXECUTOR_ABI; exports.BATCH_EXECUTOR_ADDRESS_BASE_MAINNET = BATCH_EXECUTOR_ADDRESS_BASE_MAINNET; exports.BATCH_EXECUTOR_ADDRESS_BASE_SEPOLIA = BATCH_EXECUTOR_ADDRESS_BASE_SEPOLIA; exports.BROKER_HASHES = BROKER_HASHES; exports.COMMON_POOLS = _chunk3QDZFDELcjs.COMMON_POOLS; exports.COMMON_TOKENS = _chunk3QDZFDELcjs.COMMON_TOKENS; exports.CONTRACT_ADDRESSES = CONTRACT_ADDRESSES; exports.ConfigurationError = ConfigurationError; exports.DUMMY_SIGNATURE_V07 = DUMMY_SIGNATURE_V07; exports.ENTRY_POINT_V07 = _chunk3QDZFDELcjs.ENTRY_POINT_V07; exports.ENTRY_POINT_V08 = _chunk3QDZFDELcjs.ENTRY_POINT_V08; exports.ORDERLY_RELAY_ABI = ORDERLY_RELAY_ABI; exports.ORDERLY_VAULT_ABI = ORDERLY_VAULT_ABI; exports.ORDERLY_VAULT_ADDRESSES = ORDERLY_VAULT_ADDRESSES; exports.ORDERLY_VAULT_BASE_MAINNET = ORDERLY_VAULT_BASE_MAINNET; exports.PAFI_SUBGRAPH_URL = PAFI_SUBGRAPH_URL; exports.PERMIT2_ADDRESS = _chunk3QDZFDELcjs.PERMIT2_ADDRESS; exports.POINT_TOKEN_FACTORY_ADDRESSES = POINT_TOKEN_FACTORY_ADDRESSES; exports.POINT_TOKEN_IMPL_ADDRESSES = POINT_TOKEN_IMPL_ADDRESSES; exports.POINT_TOKEN_POOLS = _chunk3QDZFDELcjs.POINT_TOKEN_POOLS; exports.POINT_TOKEN_V2_ABI = _chunkLRHY7GORcjs.pointTokenAbi; exports.PafiSDK = PafiSDK; exports.PafiSDKError = PafiSDKError; exports.SIMPLE_7702_IMPL_BASE_MAINNET = SIMPLE_7702_IMPL_BASE_MAINNET; exports.SPONSOR_AUTH_DOMAIN_NAME = _chunkRZDG6SRRcjs.SPONSOR_AUTH_DOMAIN_NAME; exports.SPONSOR_AUTH_TYPES = _chunkRZDG6SRRcjs.SPONSOR_AUTH_TYPES; exports.SUPPORTED_CHAINS = _chunk3QDZFDELcjs.SUPPORTED_CHAINS; exports.SigningError = SigningError; exports.SimulationError = SimulationError; exports.TOKEN_HASHES = TOKEN_HASHES; exports.UNIVERSAL_ROUTER_ADDRESSES = _chunk3QDZFDELcjs.UNIVERSAL_ROUTER_ADDRESSES; exports.V4_QUOTER_ADDRESSES = _chunk3QDZFDELcjs.V4_QUOTER_ADDRESSES; exports.ZERO_VALUE = ZERO_VALUE; exports._resetPaymasterConfigForTests = _resetPaymasterConfigForTests; exports.assembleUserOperation = assembleUserOperation; exports.buildAndSignSponsorAuth = _chunkRZDG6SRRcjs.buildAndSignSponsorAuth; exports.buildBurnRequestTypedData = _chunk3QDZFDELcjs.buildBurnRequestTypedData; exports.buildDelegationUserOp = buildDelegationUserOp; exports.buildDomain = _chunk3QDZFDELcjs.buildDomain; exports.buildEip7702Authorization = buildEip7702Authorization; exports.buildMintRequestTypedData = _chunk3QDZFDELcjs.buildMintRequestTypedData; exports.buildPartialUserOperation = buildPartialUserOperation; exports.buildPerpDepositViaRelay = buildPerpDepositViaRelay; exports.buildPerpDepositWithGasDeduction = buildPerpDepositWithGasDeduction; exports.buildReceiverConsentTypedData = _chunk3QDZFDELcjs.buildReceiverConsentTypedData; exports.buildSponsorAuthDomain = _chunkRZDG6SRRcjs.buildSponsorAuthDomain; exports.buildSponsorAuthTypedData = _chunkRZDG6SRRcjs.buildSponsorAuthTypedData; exports.buildUserOpTypedData = buildUserOpTypedData; exports.burnRequestTypes = _chunk3QDZFDELcjs.burnRequestTypes; exports.checkDelegation = checkDelegation; exports.checkEthAndBranch = checkEthAndBranch; exports.computeAccountId = computeAccountId; exports.computeAuthorizationHash = computeAuthorizationHash; exports.computeCallDataHash = _chunkRZDG6SRRcjs.computeCallDataHash; exports.computeUserOpHash = computeUserOpHash; exports.createLoginMessage = _chunkRZDG6SRRcjs.createLoginMessage; exports.createPafiProxyTransport = createPafiProxyTransport; exports.decodeBatchExecuteCalls = decodeBatchExecuteCalls; exports.detectDelegateImpl = detectDelegateImpl; exports.encodeBatchExecute = encodeBatchExecute; exports.erc20Abi = _chunkQ6WCDZXIcjs.erc20Abi; exports.erc20ApproveOp = erc20ApproveOp; exports.erc20BurnOp = erc20BurnOp; exports.erc20TransferOp = erc20TransferOp; exports.fetchPafiPools = fetchPafiPools; exports.getAaNonce = getAaNonce; exports.getBurnRequestNonce = _chunkCLPRSQT2cjs.getBurnRequestNonce; exports.getContractAddresses = getContractAddresses; exports.getDummySignatureFor7702 = getDummySignatureFor7702; exports.getIssuer = _chunkCLPRSQT2cjs.getIssuer2; exports.getMintRequestNonce = _chunkCLPRSQT2cjs.getMintRequestNonce; exports.getPafiWebModalAdapter = getPafiWebModalAdapter; exports.getPaymasterConfig = getPaymasterConfig; exports.getPointTokenBalance = _chunkCLPRSQT2cjs.getPointTokenBalance; exports.getPointTokenIssuer = _chunkCLPRSQT2cjs.getPointTokenIssuer; exports.getPointTokenIssuerAddress = _chunkCLPRSQT2cjs.getIssuer; exports.getReceiverConsentNonce = _chunkCLPRSQT2cjs.getReceiverConsentNonce; exports.getTokenName = _chunkCLPRSQT2cjs.getTokenName; exports.isActiveIssuer = _chunkCLPRSQT2cjs.isActiveIssuer; exports.isDelegatedTo = isDelegatedTo; exports.isDelegatedToTarget = isDelegatedToTarget; exports.isMinter = _chunkCLPRSQT2cjs.isMinter; exports.isPaymasterConfigured = isPaymasterConfigured; exports.isPaymasterError = isPaymasterError; exports.issuerRegistryAbi = _chunkLRHY7GORcjs.issuerRegistryAbi; exports.issuerRegistryGetIssuerFlatAbi = _chunkCLPRSQT2cjs.issuerRegistryGetIssuerFlatAbi; exports.mintRequestTypes = _chunk3QDZFDELcjs.mintRequestTypes; exports.mintingOracleAbi = _chunkLRHY7GORcjs.mintingOracleAbi; exports.openPafiWebModal = openPafiWebModal; exports.openWebPopup = openWebPopup; exports.parseEip7702DelegatedAddress = parseEip7702DelegatedAddress; exports.parseLoginMessage = _chunkRZDG6SRRcjs.parseLoginMessage; exports.permit2Abi = _chunkQ6WCDZXIcjs.permit2Abi; exports.pointTokenAbi = _chunkLRHY7GORcjs.pointTokenAbi; exports.pointTokenFactoryAbi = _chunkQ6WCDZXIcjs.pointTokenFactoryAbi; exports.quoteOperatorFeePt = quoteOperatorFeePt; exports.rawCallOp = rawCallOp; exports.receiverConsentTypes = _chunk3QDZFDELcjs.receiverConsentTypes; exports.sendWithPaymasterFallback = sendWithPaymasterFallback; exports.serializeUserOpToJsonRpc = serializeUserOpToJsonRpc; exports.setPafiWebModalAdapter = setPafiWebModalAdapter; exports.setPaymasterConfig = setPaymasterConfig; exports.signBurnRequest = _chunk3QDZFDELcjs.signBurnRequest; exports.signMintRequest = _chunk3QDZFDELcjs.signMintRequest; exports.signReceiverConsent = _chunk3QDZFDELcjs.signReceiverConsent; exports.signSponsorAuth = _chunkRZDG6SRRcjs.signSponsorAuth; exports.splitAuthorizationSig = splitAuthorizationSig; exports.universalRouterAbi = _chunkQ6WCDZXIcjs.universalRouterAbi; exports.v4QuoterAbi = _chunkQ6WCDZXIcjs.v4QuoterAbi; exports.verifyBurnRequest = _chunk3QDZFDELcjs.verifyBurnRequest; exports.verifyLoginMessage = _chunkRZDG6SRRcjs.verifyLoginMessage; exports.verifyMintCap = _chunkCLPRSQT2cjs.verifyMintCap; exports.verifyMintRequest = _chunk3QDZFDELcjs.verifyMintRequest; exports.verifyReceiverConsent = _chunk3QDZFDELcjs.verifyReceiverConsent; exports.verifySponsorAuth = _chunkRZDG6SRRcjs.verifySponsorAuth; exports.webPopupAdapter = webPopupAdapter;
1382
1398
  //# sourceMappingURL=index.cjs.map