@pafi-dev/core 0.5.21 → 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 +215 -166
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.d.cts +116 -48
  18. package/dist/index.d.ts +116 -48
  19. package/dist/index.js +197 -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]
@@ -586,6 +682,37 @@ function toMinimalHex(n) {
586
682
  return `0x${hex.length % 2 === 0 ? hex : "0" + hex}`;
587
683
  }
588
684
 
685
+ // src/delegation/eip7702Authorization.ts
686
+ function splitAuthorizationSig(authSig) {
687
+ const raw = authSig.startsWith("0x") ? authSig.slice(2) : authSig;
688
+ if (raw.length !== 130) {
689
+ throw new Error(
690
+ `splitAuthorizationSig: expected 65-byte signature (130 hex chars), got ${raw.length}`
691
+ );
692
+ }
693
+ const r = `0x${raw.slice(0, 64)}`;
694
+ const s = `0x${raw.slice(64, 128)}`;
695
+ const v = parseInt(raw.slice(128, 130), 16);
696
+ const yParity = v === 27 ? 0 : v === 28 ? 1 : v;
697
+ if (yParity !== 0 && yParity !== 1) {
698
+ throw new Error(
699
+ `splitAuthorizationSig: invalid recovery byte ${v} (expected 0/1/27/28)`
700
+ );
701
+ }
702
+ return { r, s, yParity };
703
+ }
704
+ function buildEip7702Authorization(params) {
705
+ const { r, s, yParity } = splitAuthorizationSig(params.authSig);
706
+ return {
707
+ chainId: `0x${params.chainId.toString(16)}`,
708
+ address: params.address,
709
+ nonce: `0x${params.nonce.toString(16)}`,
710
+ r,
711
+ s,
712
+ yParity: `0x${yParity}`
713
+ };
714
+ }
715
+
589
716
  // src/transport/proxyTransport.ts
590
717
 
591
718
  function createPafiProxyTransport(params) {
@@ -595,7 +722,7 @@ function createPafiProxyTransport(params) {
595
722
  // fetchFn intercepts every fetch call the viem http transport makes,
596
723
  // injecting the auth headers before the request leaves the browser.
597
724
  fetchFn: (input, init) => {
598
- const headers = new Headers(_optionalChain([init, 'optionalAccess', _19 => _19.headers]));
725
+ const headers = new Headers(_optionalChain([init, 'optionalAccess', _29 => _29.headers]));
599
726
  const token = getIdentityToken();
600
727
  if (token) {
601
728
  headers.set("authorization", `Bearer ${token}`);
@@ -608,7 +735,7 @@ function createPafiProxyTransport(params) {
608
735
 
609
736
  // src/transport/paymasterFallback.ts
610
737
  function isPaymasterError(err) {
611
- 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();
612
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");
613
740
  }
614
741
  async function sendWithPaymasterFallback(params) {
@@ -617,8 +744,8 @@ async function sendWithPaymasterFallback(params) {
617
744
  return await primaryClient.sendTransaction(txParams);
618
745
  } catch (err) {
619
746
  if (isPaymasterError(err) && fallbackClient) {
620
- const msg = _nullishCoalesce(_optionalChain([err, 'optionalAccess', _21 => _21.message]), () => ( String(err)));
621
- _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)]);
622
749
  return await fallbackClient.sendTransaction(_nullishCoalesce(txParamsFallback, () => ( txParams)));
623
750
  }
624
751
  throw err;
@@ -676,7 +803,7 @@ async function fetchPafiPools(_chainId, pointTokenAddress, subgraphUrl = PAFI_SU
676
803
  );
677
804
  return [];
678
805
  }
679
- 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]);
680
807
  if (!pool) return [];
681
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))) {
682
809
  console.error("[fetchPafiPools] invalid pool data in subgraph response \u2014 skipping");
@@ -835,10 +962,10 @@ async function getPtPerUsdt18dec(fetchImpl, subgraphUrl, pointTokenAddress, fall
835
962
  });
836
963
  if (!response.ok) throw new Error(`subgraph HTTP ${response.status}`);
837
964
  const json = await response.json();
838
- if (_optionalChain([json, 'access', _26 => _26.errors, 'optionalAccess', _27 => _27.length])) {
965
+ if (_optionalChain([json, 'access', _36 => _36.errors, 'optionalAccess', _37 => _37.length])) {
839
966
  throw new Error(json.errors.map((e) => e.message).join("; "));
840
967
  }
841
- 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]);
842
969
  if (!pool) throw new Error("pafiToken or pool not found");
843
970
  const isPtToken0 = pool.token0.id.toLowerCase() === pointTokenAddress.toLowerCase();
844
971
  const priceStr = isPtToken0 ? pool.token0Price : pool.token1Price;
@@ -883,8 +1010,8 @@ function openWebPopup(url, options = {}) {
883
1010
  const width = _nullishCoalesce(options.width, () => ( DEFAULT_WIDTH));
884
1011
  const height = _nullishCoalesce(options.height, () => ( DEFAULT_HEIGHT));
885
1012
  const name = _nullishCoalesce(options.windowName, () => ( DEFAULT_NAME));
886
- const screenW = _nullishCoalesce(_optionalChain([window, 'access', _31 => _31.screen, 'optionalAccess', _32 => _32.availWidth]), () => ( window.innerWidth));
887
- 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));
888
1015
  const left = Math.max(0, Math.floor((screenW - width) / 2));
889
1016
  const top = Math.max(0, Math.floor((screenH - height) / 2));
890
1017
  const features = [
@@ -917,7 +1044,7 @@ function openWebPopup(url, options = {}) {
917
1044
  window.removeEventListener("message", messageListener);
918
1045
  messageListener = null;
919
1046
  }
920
- _optionalChain([options, 'access', _35 => _35.onClose, 'optionalCall', _36 => _36()]);
1047
+ _optionalChain([options, 'access', _45 => _45.onClose, 'optionalCall', _46 => _46()]);
921
1048
  };
922
1049
  pollId = setInterval(() => {
923
1050
  if (popup.closed) {
@@ -1005,8 +1132,6 @@ var PafiSDK = class {
1005
1132
 
1006
1133
 
1007
1134
 
1008
-
1009
-
1010
1135
  constructor(config) {
1011
1136
  this._pointTokenAddress = config.pointTokenAddress;
1012
1137
  this._signer = config.signer;
@@ -1030,13 +1155,6 @@ var PafiSDK = class {
1030
1155
  verify: this.verifyReceiverConsent.bind(this),
1031
1156
  getNonce: this.getReceiverConsentNonce.bind(this)
1032
1157
  };
1033
- this.swap = {
1034
- buildFromQuote: this.buildSwapFromQuote.bind(this),
1035
- simulate: this.simulateSwap.bind(this)
1036
- };
1037
- this.quote = {
1038
- findBest: this.findBestQuote.bind(this)
1039
- };
1040
1158
  this.auth = {
1041
1159
  createLoginMessage: this.createLoginMessage.bind(this),
1042
1160
  signMessage: this.signLoginMessage.bind(this)
@@ -1059,25 +1177,25 @@ var PafiSDK = class {
1059
1177
  // -------------------------------------------------------------------------
1060
1178
  requirePointToken() {
1061
1179
  if (!this._pointTokenAddress) {
1062
- throw new (0, _chunkJJ2LGENOcjs.ConfigurationError)("pointTokenAddress not set");
1180
+ throw new ConfigurationError("pointTokenAddress not set");
1063
1181
  }
1064
1182
  return this._pointTokenAddress;
1065
1183
  }
1066
1184
  requireProvider() {
1067
1185
  if (!this._provider) {
1068
- throw new (0, _chunkJJ2LGENOcjs.ConfigurationError)("provider not set");
1186
+ throw new ConfigurationError("provider not set");
1069
1187
  }
1070
1188
  return this._provider;
1071
1189
  }
1072
1190
  requireSigner() {
1073
1191
  if (!this._signer) {
1074
- throw new (0, _chunkJJ2LGENOcjs.ConfigurationError)("signer not set");
1192
+ throw new ConfigurationError("signer not set");
1075
1193
  }
1076
1194
  return this._signer;
1077
1195
  }
1078
1196
  requireChainId() {
1079
1197
  if (this._chainId === void 0) {
1080
- throw new (0, _chunkJJ2LGENOcjs.ConfigurationError)("chainId not set");
1198
+ throw new ConfigurationError("chainId not set");
1081
1199
  }
1082
1200
  return this._chainId;
1083
1201
  }
@@ -1096,27 +1214,27 @@ var PafiSDK = class {
1096
1214
  // -------------------------------------------------------------------------
1097
1215
  async buildMintRequestTypedData(message) {
1098
1216
  const domain = await this.getDomain();
1099
- return _chunkDX73FB4Pcjs.buildMintRequestTypedData.call(void 0, domain, message);
1217
+ return _chunk3QDZFDELcjs.buildMintRequestTypedData.call(void 0, domain, message);
1100
1218
  }
1101
1219
  async buildReceiverConsentTypedData(message) {
1102
1220
  const domain = await this.getDomain();
1103
- return _chunkDX73FB4Pcjs.buildReceiverConsentTypedData.call(void 0, domain, message);
1221
+ return _chunk3QDZFDELcjs.buildReceiverConsentTypedData.call(void 0, domain, message);
1104
1222
  }
1105
1223
  async signMintRequest(message) {
1106
1224
  const domain = await this.getDomain();
1107
- return _chunkDX73FB4Pcjs.signMintRequest.call(void 0, this.requireSigner(), domain, message);
1225
+ return _chunk3QDZFDELcjs.signMintRequest.call(void 0, this.requireSigner(), domain, message);
1108
1226
  }
1109
1227
  async verifyMintRequest(message, signature, expectedMinter) {
1110
1228
  const domain = await this.getDomain();
1111
- return _chunkDX73FB4Pcjs.verifyMintRequest.call(void 0, domain, message, signature, expectedMinter);
1229
+ return _chunk3QDZFDELcjs.verifyMintRequest.call(void 0, domain, message, signature, expectedMinter);
1112
1230
  }
1113
1231
  async signReceiverConsent(message) {
1114
1232
  const domain = await this.getDomain();
1115
- return _chunkDX73FB4Pcjs.signReceiverConsent.call(void 0, this.requireSigner(), domain, message);
1233
+ return _chunk3QDZFDELcjs.signReceiverConsent.call(void 0, this.requireSigner(), domain, message);
1116
1234
  }
1117
1235
  async verifyReceiverConsent(message, signature, expectedReceiver) {
1118
1236
  const domain = await this.getDomain();
1119
- return _chunkDX73FB4Pcjs.verifyReceiverConsent.call(void 0, domain, message, signature, expectedReceiver);
1237
+ return _chunk3QDZFDELcjs.verifyReceiverConsent.call(void 0, domain, message, signature, expectedReceiver);
1120
1238
  }
1121
1239
  // -------------------------------------------------------------------------
1122
1240
  // Contract reads
@@ -1136,59 +1254,6 @@ var PafiSDK = class {
1136
1254
  );
1137
1255
  }
1138
1256
  // -------------------------------------------------------------------------
1139
- // Quoting — delegates to pure functions
1140
- // -------------------------------------------------------------------------
1141
- /**
1142
- * Find the best swap route from `tokenIn` to `tokenOut`.
1143
- * Merges `pools` with COMMON_POOLS for the configured chain, builds all
1144
- * paths, and quotes via a single multicall RPC call.
1145
- */
1146
- async findBestQuote(tokenIn, tokenOut, exactAmount, pools = [], quoterAddress, maxHops) {
1147
- return _chunkL5UHQQVCcjs.findBestQuote.call(void 0,
1148
- this.requireProvider(),
1149
- this.requireChainId(),
1150
- tokenIn,
1151
- tokenOut,
1152
- exactAmount,
1153
- pools,
1154
- quoterAddress,
1155
- maxHops
1156
- );
1157
- }
1158
- // -------------------------------------------------------------------------
1159
- // Swap building — delegates to pure functions
1160
- // -------------------------------------------------------------------------
1161
- /**
1162
- * Build UniversalRouter execute args from a quote result.
1163
- * The caller provides `minAmountOut` after applying their own slippage.
1164
- */
1165
- buildSwapFromQuote(params) {
1166
- return _chunkJJ2LGENOcjs.buildSwapFromQuote.call(void 0, params);
1167
- }
1168
- // -------------------------------------------------------------------------
1169
- // Simulation — dry-run via eth_call (no gas spent)
1170
- // -------------------------------------------------------------------------
1171
- /**
1172
- * Simulate a UniversalRouter.execute swap call. Catches reverts (bad
1173
- * approvals, insufficient balance, pool errors) before submitting.
1174
- *
1175
- * @param routerAddress - UniversalRouter contract address
1176
- * @param commands - Packed command bytes (from buildSwapFromQuote)
1177
- * @param inputs - Encoded inputs (from buildSwapFromQuote)
1178
- * @param deadline - Unix timestamp
1179
- * @param from - Address that will execute the swap
1180
- */
1181
- async simulateSwap(routerAddress, commands, inputs, deadline, from) {
1182
- return _chunkJJ2LGENOcjs.simulateSwap.call(void 0,
1183
- this.requireProvider(),
1184
- routerAddress,
1185
- commands,
1186
- inputs,
1187
- deadline,
1188
- from
1189
- );
1190
- }
1191
- // -------------------------------------------------------------------------
1192
1257
  // Auth — EIP-4361 login helpers (offline, stateless)
1193
1258
  // -------------------------------------------------------------------------
1194
1259
  async createLoginMessage(params) {
@@ -1196,7 +1261,7 @@ var PafiSDK = class {
1196
1261
  const chainId = this.requireChainId();
1197
1262
  const account = signer.account;
1198
1263
  if (!account) {
1199
- throw new (0, _chunkJJ2LGENOcjs.ConfigurationError)("signer has no account attached");
1264
+ throw new ConfigurationError("signer has no account attached");
1200
1265
  }
1201
1266
  return _chunkRZDG6SRRcjs.createLoginMessage.call(void 0, { ...params, address: account.address, chainId });
1202
1267
  }
@@ -1205,7 +1270,7 @@ var PafiSDK = class {
1205
1270
  const signer = this.requireSigner();
1206
1271
  const account = signer.account;
1207
1272
  if (!account) {
1208
- throw new (0, _chunkJJ2LGENOcjs.ConfigurationError)("signer has no account attached");
1273
+ throw new ConfigurationError("signer has no account attached");
1209
1274
  }
1210
1275
  return signer.signMessage({ account, message });
1211
1276
  }
@@ -1329,21 +1394,5 @@ var PafiSDK = class {
1329
1394
 
1330
1395
 
1331
1396
 
1332
-
1333
-
1334
-
1335
-
1336
-
1337
-
1338
-
1339
-
1340
-
1341
-
1342
-
1343
-
1344
-
1345
-
1346
-
1347
-
1348
- 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.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.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;
1349
1398
  //# sourceMappingURL=index.cjs.map