@pafi-dev/core 0.17.0 → 0.19.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.
package/README.md CHANGED
@@ -74,7 +74,8 @@ import { getContractAddresses } from "@pafi-dev/core";
74
74
 
75
75
  const addr = getContractAddresses(8453); // Base mainnet
76
76
  // addr.issuerRegistry, addr.mintingOracle, addr.mintFeeWrapper,
77
- // addr.usdt, addr.batchExecutor, addr.pafiFeeRecipient,
77
+ // addr.usdt, addr.usdc (optional, perp-deposit + sponsor-relayer stable fee),
78
+ // addr.batchExecutor, addr.pafiFeeRecipient,
78
79
  // addr.chainlinkEthUsd, addr.orderlyRelay, addr.universalRouter
79
80
  ```
80
81
 
@@ -162,8 +163,15 @@ Both return `bigint` raw units. Fallback prices (`0.1 USDT/PT` default,
162
163
  is true. Sponsor-relayer's `FeeValidator` runs the same math server-side
163
164
  with a 5% tolerance window.
164
165
 
165
- See [`docs/FEE_FLOW.md`](../../../docs/FEE_FLOW.md) in the main repo for
166
- full math derivation.
166
+ Fee math (raw bigint, no scaling shortcuts):
167
+
168
+ ```
169
+ withPremium = gasUnits × gasPrice × premiumBps / 10000 (wei)
170
+ fee_USDT_6dec = withPremium × ethPrice_8dec / 10^(18+8-6)
171
+ fee_PT_18dec = withPremium × ethPrice_8dec × ptPerUsdt_18dec / 10^26
172
+ ```
173
+
174
+ Where `ptPerUsdt_18dec` comes from the V3 subgraph (`token0Price` / `token1Price`) inverted to PT-per-USDT and scaled to 18 decimals.
167
175
 
168
176
  ---
169
177
 
@@ -274,7 +282,6 @@ const authorized = await isMinter(provider, pointToken, signerAddress);
274
282
  ## References
275
283
 
276
284
  - Architecture: [`ARCHITECTURE.md`](../../ARCHITECTURE.md) at SDK root
277
- - Fee math: [`docs/FEE_FLOW.md`](../../../docs/FEE_FLOW.md)
278
285
 
279
286
  ## License
280
287
 
package/dist/index.cjs CHANGED
@@ -532,6 +532,43 @@ function buildPerpDepositViaRelay(params) {
532
532
  });
533
533
  }
534
534
 
535
+ // src/transfer/buildErc20Transfer.ts
536
+ function buildErc20TransferUserOp(params) {
537
+ if (params.amount <= 0n) {
538
+ throw new Error("buildErc20TransferUserOp: amount must be positive");
539
+ }
540
+ const operations = [];
541
+ if (params.feeAmount && params.feeAmount > 0n) {
542
+ if (!params.feeRecipient) {
543
+ throw new Error(
544
+ "buildErc20TransferUserOp: feeRecipient required when feeAmount > 0"
545
+ );
546
+ }
547
+ operations.push(
548
+ erc20TransferOp(
549
+ params.tokenAddress,
550
+ params.feeRecipient,
551
+ params.feeAmount
552
+ )
553
+ );
554
+ }
555
+ operations.push(
556
+ erc20TransferOp(params.tokenAddress, params.recipient, params.amount)
557
+ );
558
+ return buildPartialUserOperation({
559
+ sender: params.userAddress,
560
+ nonce: params.aaNonce,
561
+ operations,
562
+ gasLimits: {
563
+ // 2 simple ERC-20 transfers + 7702 batch overhead. ~70-90k actual;
564
+ // 200k matches the `delegate` scenario budget and covers premium.
565
+ callGasLimit: _nullishCoalesce(_optionalChain([params, 'access', _25 => _25.gasLimits, 'optionalAccess', _26 => _26.callGasLimit]), () => ( 200000n)),
566
+ verificationGasLimit: _nullishCoalesce(_optionalChain([params, 'access', _27 => _27.gasLimits, 'optionalAccess', _28 => _28.verificationGasLimit]), () => ( 150000n)),
567
+ preVerificationGas: _nullishCoalesce(_optionalChain([params, 'access', _29 => _29.gasLimits, 'optionalAccess', _30 => _30.preVerificationGas]), () => ( 50000n))
568
+ }
569
+ });
570
+ }
571
+
535
572
  // src/userop/types.ts
536
573
  var ZERO_VALUE = 0n;
537
574
 
@@ -746,9 +783,9 @@ function buildDelegationUserOp(params) {
746
783
  }
747
784
  ],
748
785
  gasLimits: {
749
- callGasLimit: _nullishCoalesce(_optionalChain([params, 'access', _25 => _25.gasLimits, 'optionalAccess', _26 => _26.callGasLimit]), () => ( 50000n)),
750
- verificationGasLimit: _nullishCoalesce(_optionalChain([params, 'access', _27 => _27.gasLimits, 'optionalAccess', _28 => _28.verificationGasLimit]), () => ( 150000n)),
751
- preVerificationGas: _nullishCoalesce(_optionalChain([params, 'access', _29 => _29.gasLimits, 'optionalAccess', _30 => _30.preVerificationGas]), () => ( 50000n))
786
+ callGasLimit: _nullishCoalesce(_optionalChain([params, 'access', _31 => _31.gasLimits, 'optionalAccess', _32 => _32.callGasLimit]), () => ( 50000n)),
787
+ verificationGasLimit: _nullishCoalesce(_optionalChain([params, 'access', _33 => _33.gasLimits, 'optionalAccess', _34 => _34.verificationGasLimit]), () => ( 150000n)),
788
+ preVerificationGas: _nullishCoalesce(_optionalChain([params, 'access', _35 => _35.gasLimits, 'optionalAccess', _36 => _36.preVerificationGas]), () => ( 50000n))
752
789
  }
753
790
  });
754
791
  }
@@ -843,7 +880,13 @@ var CONTRACT_ADDRESSES = {
843
880
  // (`0x6fF5693b...`). The PAFI fork has its own factory + poolInitCodeHash,
844
881
  // so only this UR can route through PAFI v3 fork pools. Keep in sync with
845
882
  // `UNIVERSAL_ROUTER_ADDRESSES` in `chains.ts`.
846
- universalRouter: "0x008887C992A5bDC24097E717Bfb71CE89483c5A2"
883
+ universalRouter: "0x008887C992A5bDC24097E717Bfb71CE89483c5A2",
884
+ // PAFI fork Permit2 — DIFFERS from Uniswap canonical Permit2
885
+ // (`0x000000000022D473...`). PAFI's UR was deployed against this
886
+ // Permit2, so swaps signed against the canonical Permit2 fail
887
+ // signature verification. Keep in sync with `PERMIT2_ADDRESS`
888
+ // top-level export.
889
+ permit2: "0xEB450d21ae68D3303Cf5775A54Cc84EE7c3fC8eC"
847
890
  },
848
891
  // Base Sepolia — not in active use; placeholders kept so the map
849
892
  // compiles for tooling that enumerates chains.
@@ -856,7 +899,8 @@ var CONTRACT_ADDRESSES = {
856
899
  chainlinkEthUsd: PLACEHOLDER_DEAD("de02"),
857
900
  orderlyRelay: PLACEHOLDER_DEAD("de03"),
858
901
  pafiFeeRecipient: PLACEHOLDER_DEAD("de04"),
859
- universalRouter: PLACEHOLDER_DEAD("de05")
902
+ universalRouter: PLACEHOLDER_DEAD("de05"),
903
+ permit2: PLACEHOLDER_DEAD("de06")
860
904
  }
861
905
  };
862
906
  var POINT_TOKEN_FACTORY_ADDRESSES = {
@@ -942,7 +986,7 @@ async function delegateDirect(params) {
942
986
  hash: txHash
943
987
  });
944
988
  } catch (err) {
945
- _optionalChain([params, 'access', _31 => _31.onWarning, 'optionalCall', _32 => _32(
989
+ _optionalChain([params, 'access', _37 => _37.onWarning, 'optionalCall', _38 => _38(
946
990
  `delegateDirect: tx ${txHash} sent but receipt fetch failed: ${err instanceof Error ? err.message : String(err)}`
947
991
  )]);
948
992
  }
@@ -970,7 +1014,7 @@ function createPafiProxyTransport(params) {
970
1014
  // fetchFn intercepts every fetch call the viem http transport makes,
971
1015
  // injecting the auth headers before the request leaves the browser.
972
1016
  fetchFn: (input, init) => {
973
- const headers = new Headers(_optionalChain([init, 'optionalAccess', _33 => _33.headers]));
1017
+ const headers = new Headers(_optionalChain([init, 'optionalAccess', _39 => _39.headers]));
974
1018
  const token = getIdentityToken();
975
1019
  if (token) {
976
1020
  headers.set("authorization", `Bearer ${token}`);
@@ -994,7 +1038,7 @@ var PAYMASTER_PATTERNS = [
994
1038
  function isPaymasterError(err) {
995
1039
  if (err == null || typeof err !== "object") return false;
996
1040
  const e = err;
997
- const status = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(e.status, () => ( e.statusCode)), () => ( _optionalChain([e, 'access', _34 => _34.response, 'optionalAccess', _35 => _35.status]))), () => ( _optionalChain([e, 'access', _36 => _36.cause, 'optionalAccess', _37 => _37.status])));
1041
+ const status = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(e.status, () => ( e.statusCode)), () => ( _optionalChain([e, 'access', _40 => _40.response, 'optionalAccess', _41 => _41.status]))), () => ( _optionalChain([e, 'access', _42 => _42.cause, 'optionalAccess', _43 => _43.status])));
998
1042
  if (typeof status === "number" && PAYMASTER_HTTP_STATUSES.has(status)) {
999
1043
  return true;
1000
1044
  }
@@ -1007,8 +1051,8 @@ async function sendWithPaymasterFallback(params) {
1007
1051
  return await primaryClient.sendTransaction(txParams);
1008
1052
  } catch (err) {
1009
1053
  if (isPaymasterError(err) && fallbackClient) {
1010
- const msg = _nullishCoalesce(_optionalChain([err, 'optionalAccess', _38 => _38.message]), () => ( String(err)));
1011
- _optionalChain([onFallback, 'optionalCall', _39 => _39(msg)]);
1054
+ const msg = _nullishCoalesce(_optionalChain([err, 'optionalAccess', _44 => _44.message]), () => ( String(err)));
1055
+ _optionalChain([onFallback, 'optionalCall', _45 => _45(msg)]);
1012
1056
  return await fallbackClient.sendTransaction(_nullishCoalesce(txParamsFallback, () => ( txParams)));
1013
1057
  }
1014
1058
  throw err;
@@ -1073,7 +1117,7 @@ async function fetchPafiPools(_chainId, pointTokenAddress, subgraphUrl = PAFI_SU
1073
1117
  );
1074
1118
  return [];
1075
1119
  }
1076
- const pool = _optionalChain([json, 'access', _40 => _40.data, 'optionalAccess', _41 => _41.pafiToken, 'optionalAccess', _42 => _42.pool]);
1120
+ const pool = _optionalChain([json, 'access', _46 => _46.data, 'optionalAccess', _47 => _47.pafiToken, 'optionalAccess', _48 => _48.pool]);
1077
1121
  if (!pool) return [];
1078
1122
  if (!_viem.isAddress.call(void 0, pool.token0.id) || !_viem.isAddress.call(void 0, pool.token1.id) || !Number.isFinite(Number(pool.feeTier))) {
1079
1123
  console.error("[fetchPafiPools] invalid pool data in subgraph response \u2014 skipping");
@@ -1112,7 +1156,11 @@ var SCENARIO_GAS_UNITS = {
1112
1156
  burn: 500000n,
1113
1157
  swap: 700000n,
1114
1158
  "perp-deposit": 800000n,
1115
- delegate: 200000n
1159
+ delegate: 200000n,
1160
+ // 2-call batch: 1 ERC-20 fee transfer + 1 ERC-20 transfer + 7702
1161
+ // delegation overhead. ~70-90k empirical; 200k matches `delegate`
1162
+ // budget and gives headroom for premium variance.
1163
+ "erc20-transfer": 200000n
1116
1164
  };
1117
1165
  var DEFAULT_GAS_UNITS = 500000n;
1118
1166
  var DEFAULT_PREMIUM_BPS = 12e3;
@@ -1177,6 +1225,42 @@ async function quoteOperatorFeePt(config) {
1177
1225
  ]);
1178
1226
  return withPremium * ethPrice8dec * ptPerUsdt18dec / 10n ** 26n;
1179
1227
  }
1228
+ async function quoteOperatorFeeForTransfer(config) {
1229
+ const { provider, chainId, tokenAddress } = config;
1230
+ const { usdc, usdt } = getContractAddresses(chainId);
1231
+ const tokenLower = tokenAddress.toLowerCase();
1232
+ const isStable = usdc && tokenLower === usdc.toLowerCase() || tokenLower === usdt.toLowerCase();
1233
+ if (isStable) {
1234
+ return quoteOperatorFeeUsdt({
1235
+ provider,
1236
+ chainId,
1237
+ scenario: "erc20-transfer",
1238
+ gasUnits: config.gasUnits,
1239
+ premiumBps: config.premiumBps,
1240
+ chainlinkFeedAddress: config.chainlinkFeedAddress,
1241
+ usdtDecimals: config.usdtDecimals,
1242
+ allowStaleFallback: config.allowStaleFallback,
1243
+ fallbackEthPriceUsd: config.fallbackEthPriceUsd,
1244
+ onFallback: config.onFallback
1245
+ });
1246
+ }
1247
+ return quoteOperatorFeePt({
1248
+ provider,
1249
+ chainId,
1250
+ pointTokenAddress: tokenAddress,
1251
+ scenario: "erc20-transfer",
1252
+ gasUnits: config.gasUnits,
1253
+ premiumBps: config.premiumBps,
1254
+ chainlinkFeedAddress: config.chainlinkFeedAddress,
1255
+ subgraphUrl: config.subgraphUrl,
1256
+ usdtDecimals: config.usdtDecimals,
1257
+ allowStaleFallback: config.allowStaleFallback,
1258
+ fallbackEthPriceUsd: config.fallbackEthPriceUsd,
1259
+ fallbackPtPriceUsdt: config.fallbackPtPriceUsdt,
1260
+ onFallback: config.onFallback,
1261
+ fetchImpl: config.fetchImpl
1262
+ });
1263
+ }
1180
1264
  async function getEthPrice8dec(provider, feed, fallback, onFallback) {
1181
1265
  try {
1182
1266
  const result = await provider.readContract({
@@ -1220,10 +1304,10 @@ async function getPtPerUsdt18dec(fetchImpl, subgraphUrl, pointTokenAddress, fall
1220
1304
  });
1221
1305
  if (!response.ok) throw new Error(`subgraph HTTP ${response.status}`);
1222
1306
  const json = await response.json();
1223
- if (_optionalChain([json, 'access', _43 => _43.errors, 'optionalAccess', _44 => _44.length])) {
1307
+ if (_optionalChain([json, 'access', _49 => _49.errors, 'optionalAccess', _50 => _50.length])) {
1224
1308
  throw new Error(json.errors.map((e) => e.message).join("; "));
1225
1309
  }
1226
- const pool = _optionalChain([json, 'access', _45 => _45.data, 'optionalAccess', _46 => _46.pafiToken, 'optionalAccess', _47 => _47.pool]);
1310
+ const pool = _optionalChain([json, 'access', _51 => _51.data, 'optionalAccess', _52 => _52.pafiToken, 'optionalAccess', _53 => _53.pool]);
1227
1311
  if (!pool) throw new Error("pafiToken or pool not found");
1228
1312
  const isPtToken0 = pool.token0.id.toLowerCase() === pointTokenAddress.toLowerCase();
1229
1313
  let ptPerUsdtHumanStr;
@@ -1312,8 +1396,8 @@ function openWebPopup(url, options = {}) {
1312
1396
  const width = _nullishCoalesce(options.width, () => ( DEFAULT_WIDTH));
1313
1397
  const height = _nullishCoalesce(options.height, () => ( DEFAULT_HEIGHT));
1314
1398
  const name = _nullishCoalesce(options.windowName, () => ( DEFAULT_NAME));
1315
- const screenW = _nullishCoalesce(_optionalChain([window, 'access', _48 => _48.screen, 'optionalAccess', _49 => _49.availWidth]), () => ( window.innerWidth));
1316
- const screenH = _nullishCoalesce(_optionalChain([window, 'access', _50 => _50.screen, 'optionalAccess', _51 => _51.availHeight]), () => ( window.innerHeight));
1399
+ const screenW = _nullishCoalesce(_optionalChain([window, 'access', _54 => _54.screen, 'optionalAccess', _55 => _55.availWidth]), () => ( window.innerWidth));
1400
+ const screenH = _nullishCoalesce(_optionalChain([window, 'access', _56 => _56.screen, 'optionalAccess', _57 => _57.availHeight]), () => ( window.innerHeight));
1317
1401
  const left = Math.max(0, Math.floor((screenW - width) / 2));
1318
1402
  const top = Math.max(0, Math.floor((screenH - height) / 2));
1319
1403
  const features = [
@@ -1346,7 +1430,7 @@ function openWebPopup(url, options = {}) {
1346
1430
  window.removeEventListener("message", messageListener);
1347
1431
  messageListener = null;
1348
1432
  }
1349
- _optionalChain([options, 'access', _52 => _52.onClose, 'optionalCall', _53 => _53()]);
1433
+ _optionalChain([options, 'access', _58 => _58.onClose, 'optionalCall', _59 => _59()]);
1350
1434
  };
1351
1435
  pollId = setInterval(() => {
1352
1436
  if (popup.closed) {
@@ -1695,5 +1779,8 @@ var PafiSDK = class {
1695
1779
 
1696
1780
 
1697
1781
 
1698
- 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 = _chunkUZUDJXKEcjs.COMMON_POOLS; exports.COMMON_TOKENS = _chunkUZUDJXKEcjs.COMMON_TOKENS; exports.CONTRACT_ADDRESSES = CONTRACT_ADDRESSES; exports.ConfigurationError = ConfigurationError; exports.DUMMY_SIGNATURE_V07 = DUMMY_SIGNATURE_V07; exports.ENTRY_POINT_V07 = _chunkUZUDJXKEcjs.ENTRY_POINT_V07; exports.ENTRY_POINT_V08 = _chunkUZUDJXKEcjs.ENTRY_POINT_V08; exports.Eip712DomainMismatchError = _chunkUZUDJXKEcjs.Eip712DomainMismatchError; 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.OracleStaleError = OracleStaleError; exports.PAFI_SERVICE_URLS = PAFI_SERVICE_URLS; exports.PAFI_SUBGRAPH_URL = PAFI_SUBGRAPH_URL; exports.PERMIT2_ADDRESS = _chunkUZUDJXKEcjs.PERMIT2_ADDRESS; exports.POINT_TOKEN_ABI = _chunkKRHGFUDIcjs.pointTokenAbi; exports.POINT_TOKEN_FACTORY_ADDRESSES = POINT_TOKEN_FACTORY_ADDRESSES; exports.POINT_TOKEN_IMPL_ADDRESSES = POINT_TOKEN_IMPL_ADDRESSES; exports.POINT_TOKEN_POOLS = _chunkUZUDJXKEcjs.POINT_TOKEN_POOLS; exports.PafiSDK = PafiSDK; exports.PafiSdkError = PafiSdkError; exports.QUOTER_V2_ADDRESSES = _chunkUZUDJXKEcjs.QUOTER_V2_ADDRESSES; exports.SDK_ERROR_HTTP_STATUS_CODE = SDK_ERROR_HTTP_STATUS_CODE; exports.SIMPLE_7702_IMPL_BASE_MAINNET = SIMPLE_7702_IMPL_BASE_MAINNET; exports.SPONSOR_AUTH_DOMAIN_ANCHOR_BASE_MAINNET = _chunk75JWR5SAcjs.SPONSOR_AUTH_DOMAIN_ANCHOR_BASE_MAINNET; exports.SPONSOR_AUTH_DOMAIN_NAME = _chunk75JWR5SAcjs.SPONSOR_AUTH_DOMAIN_NAME; exports.SPONSOR_AUTH_TYPES = _chunk75JWR5SAcjs.SPONSOR_AUTH_TYPES; exports.SUPPORTED_CHAINS = _chunkUZUDJXKEcjs.SUPPORTED_CHAINS; exports.SigningError = SigningError; exports.SimulationError = SimulationError; exports.TOKEN_HASHES = TOKEN_HASHES; exports.UNIVERSAL_ROUTER_ADDRESSES = _chunkUZUDJXKEcjs.UNIVERSAL_ROUTER_ADDRESSES; exports.V3_FACTORY_ADDRESSES = _chunkUZUDJXKEcjs.V3_FACTORY_ADDRESSES; exports.V3_POOL_INIT_CODE_HASH = _chunkUZUDJXKEcjs.V3_POOL_INIT_CODE_HASH; exports.V3_SWAP_ROUTER_ADDRESSES = _chunkUZUDJXKEcjs.V3_SWAP_ROUTER_ADDRESSES; exports.ValidationError = ValidationError; exports.ZERO_VALUE = ZERO_VALUE; exports.assembleUserOperation = assembleUserOperation; exports.assertDomainMatchesContract = _chunkUZUDJXKEcjs.assertDomainMatchesContract; exports.buildAndSignSponsorAuth = _chunk75JWR5SAcjs.buildAndSignSponsorAuth; exports.buildBurnRequestTypedData = _chunkUZUDJXKEcjs.buildBurnRequestTypedData; exports.buildDelegationUserOp = buildDelegationUserOp; exports.buildDomain = _chunkUZUDJXKEcjs.buildDomain; exports.buildEip7702Authorization = buildEip7702Authorization; exports.buildMintRequestTypedData = _chunkUZUDJXKEcjs.buildMintRequestTypedData; exports.buildPartialUserOperation = buildPartialUserOperation; exports.buildPerpDepositViaRelay = buildPerpDepositViaRelay; exports.buildPerpDepositWithGasDeduction = buildPerpDepositWithGasDeduction; exports.buildSponsorAuthDomain = _chunk75JWR5SAcjs.buildSponsorAuthDomain; exports.buildSponsorAuthTypedData = _chunk75JWR5SAcjs.buildSponsorAuthTypedData; exports.buildUserOpTypedData = buildUserOpTypedData; exports.burnRequestTypes = _chunkUZUDJXKEcjs.burnRequestTypes; exports.checkDelegation = checkDelegation; exports.checkEthAndBranch = checkEthAndBranch; exports.computeAccountId = computeAccountId; exports.computeAuthorizationHash = computeAuthorizationHash; exports.computeCallDataHash = _chunk75JWR5SAcjs.computeCallDataHash; exports.computeUserOpHash = computeUserOpHash; exports.computeV3PoolAddress = computeV3PoolAddress; exports.createLoginMessage = _chunk75JWR5SAcjs.createLoginMessage; exports.createPafiProxyTransport = createPafiProxyTransport; exports.decodeBatchExecuteCalls = decodeBatchExecuteCalls; exports.defaultErrorTypeForStatus = defaultErrorTypeForStatus; exports.delegateDirect = delegateDirect; exports.detectDelegateImpl = detectDelegateImpl; exports.encodeBatchExecute = encodeBatchExecute; exports.encodeV3Path = encodeV3Path; exports.encodeV3PathReversed = encodeV3PathReversed; exports.erc20Abi = _chunkXXLIIWIFcjs.erc20Abi; exports.erc20ApproveOp = erc20ApproveOp; exports.erc20BurnOp = erc20BurnOp; exports.erc20TransferOp = erc20TransferOp; exports.fetchPafiPools = fetchPafiPools; exports.generateSponsorAuthNonce = _chunk75JWR5SAcjs.generateSponsorAuthNonce; exports.getAaNonce = getAaNonce; exports.getBurnRequestNonce = _chunkTRYGIC2Icjs.getBurnRequestNonce; exports.getContractAddresses = getContractAddresses; exports.getDummySignatureFor7702 = getDummySignatureFor7702; exports.getIssuer = _chunkTRYGIC2Icjs.getIssuer2; exports.getMintFeeBps = _chunkTRYGIC2Icjs.getMintFeeBps; exports.getMintFeeRecipients = _chunkTRYGIC2Icjs.getMintFeeRecipients; exports.getMintRequestNonce = _chunkTRYGIC2Icjs.getMintRequestNonce; exports.getPafiServiceUrls = getPafiServiceUrls; exports.getPafiWebModalAdapter = getPafiWebModalAdapter; exports.getPointTokenBalance = _chunkTRYGIC2Icjs.getPointTokenBalance; exports.getPointTokenIssuer = _chunkTRYGIC2Icjs.getPointTokenIssuer; exports.getPointTokenIssuerAddress = _chunkTRYGIC2Icjs.getIssuer; exports.getSponsorAuthDomainAnchor = _chunk75JWR5SAcjs.getSponsorAuthDomainAnchor; exports.getTokenCap = _chunkTRYGIC2Icjs.getTokenCap; exports.getTokenName = _chunkTRYGIC2Icjs.getTokenName; exports.isActiveIssuer = _chunkTRYGIC2Icjs.isActiveIssuer; exports.isDelegatedTo = isDelegatedTo; exports.isDelegatedToTarget = isDelegatedToTarget; exports.isMinter = _chunkTRYGIC2Icjs.isMinter; exports.isPaymasterError = isPaymasterError; exports.issuerRegistryAbi = _chunkC7VB6WTLcjs.issuerRegistryAbi; exports.issuerRegistryGetIssuerFlatAbi = _chunkTRYGIC2Icjs.issuerRegistryGetIssuerFlatAbi; exports.mintFeeWrapperAbi = _chunkC7VB6WTLcjs.mintFeeWrapperAbi; exports.mintRequestTypes = _chunkUZUDJXKEcjs.mintRequestTypes; exports.mintingOracleAbi = _chunkC7VB6WTLcjs.mintingOracleAbi; exports.openPafiWebModal = openPafiWebModal; exports.openWebPopup = openWebPopup; exports.parseEip7702DelegatedAddress = parseEip7702DelegatedAddress; exports.parseLoginMessage = _chunk75JWR5SAcjs.parseLoginMessage; exports.permit2Abi = _chunkXXLIIWIFcjs.permit2Abi; exports.pointTokenAbi = _chunkKRHGFUDIcjs.pointTokenAbi; exports.pointTokenFactoryAbi = _chunkXXLIIWIFcjs.pointTokenFactoryAbi; exports.quoteOperatorFeePt = quoteOperatorFeePt; exports.quoteOperatorFeeUsdt = quoteOperatorFeeUsdt; exports.rawCallOp = rawCallOp; exports.sendWithPaymasterFallback = sendWithPaymasterFallback; exports.serializeUserOpToJsonRpc = serializeUserOpToJsonRpc; exports.setPafiWebModalAdapter = setPafiWebModalAdapter; exports.signBurnRequest = _chunkUZUDJXKEcjs.signBurnRequest; exports.signMintRequest = _chunkUZUDJXKEcjs.signMintRequest; exports.signSponsorAuth = _chunk75JWR5SAcjs.signSponsorAuth; exports.splitAuthorizationSig = splitAuthorizationSig; exports.universalRouterAbi = _chunkXXLIIWIFcjs.universalRouterAbi; exports.v3QuoterV2Abi = _chunkXXLIIWIFcjs.v3QuoterV2Abi; exports.verifyBurnRequest = _chunkUZUDJXKEcjs.verifyBurnRequest; exports.verifyLoginMessage = _chunk75JWR5SAcjs.verifyLoginMessage; exports.verifyMintCap = _chunkTRYGIC2Icjs.verifyMintCap; exports.verifyMintRequest = _chunkUZUDJXKEcjs.verifyMintRequest; exports.verifySponsorAuth = _chunk75JWR5SAcjs.verifySponsorAuth; exports.webPopupAdapter = webPopupAdapter;
1782
+
1783
+
1784
+
1785
+ 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 = _chunkUZUDJXKEcjs.COMMON_POOLS; exports.COMMON_TOKENS = _chunkUZUDJXKEcjs.COMMON_TOKENS; exports.CONTRACT_ADDRESSES = CONTRACT_ADDRESSES; exports.ConfigurationError = ConfigurationError; exports.DUMMY_SIGNATURE_V07 = DUMMY_SIGNATURE_V07; exports.ENTRY_POINT_V07 = _chunkUZUDJXKEcjs.ENTRY_POINT_V07; exports.ENTRY_POINT_V08 = _chunkUZUDJXKEcjs.ENTRY_POINT_V08; exports.Eip712DomainMismatchError = _chunkUZUDJXKEcjs.Eip712DomainMismatchError; 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.OracleStaleError = OracleStaleError; exports.PAFI_SERVICE_URLS = PAFI_SERVICE_URLS; exports.PAFI_SUBGRAPH_URL = PAFI_SUBGRAPH_URL; exports.PERMIT2_ADDRESS = _chunkUZUDJXKEcjs.PERMIT2_ADDRESS; exports.POINT_TOKEN_ABI = _chunkKRHGFUDIcjs.pointTokenAbi; exports.POINT_TOKEN_FACTORY_ADDRESSES = POINT_TOKEN_FACTORY_ADDRESSES; exports.POINT_TOKEN_IMPL_ADDRESSES = POINT_TOKEN_IMPL_ADDRESSES; exports.POINT_TOKEN_POOLS = _chunkUZUDJXKEcjs.POINT_TOKEN_POOLS; exports.PafiSDK = PafiSDK; exports.PafiSdkError = PafiSdkError; exports.QUOTER_V2_ADDRESSES = _chunkUZUDJXKEcjs.QUOTER_V2_ADDRESSES; exports.SCENARIO_GAS_UNITS = SCENARIO_GAS_UNITS; exports.SDK_ERROR_HTTP_STATUS_CODE = SDK_ERROR_HTTP_STATUS_CODE; exports.SIMPLE_7702_IMPL_BASE_MAINNET = SIMPLE_7702_IMPL_BASE_MAINNET; exports.SPONSOR_AUTH_DOMAIN_ANCHOR_BASE_MAINNET = _chunk75JWR5SAcjs.SPONSOR_AUTH_DOMAIN_ANCHOR_BASE_MAINNET; exports.SPONSOR_AUTH_DOMAIN_NAME = _chunk75JWR5SAcjs.SPONSOR_AUTH_DOMAIN_NAME; exports.SPONSOR_AUTH_TYPES = _chunk75JWR5SAcjs.SPONSOR_AUTH_TYPES; exports.SUPPORTED_CHAINS = _chunkUZUDJXKEcjs.SUPPORTED_CHAINS; exports.SigningError = SigningError; exports.SimulationError = SimulationError; exports.TOKEN_HASHES = TOKEN_HASHES; exports.UNIVERSAL_ROUTER_ADDRESSES = _chunkUZUDJXKEcjs.UNIVERSAL_ROUTER_ADDRESSES; exports.V3_FACTORY_ADDRESSES = _chunkUZUDJXKEcjs.V3_FACTORY_ADDRESSES; exports.V3_POOL_INIT_CODE_HASH = _chunkUZUDJXKEcjs.V3_POOL_INIT_CODE_HASH; exports.V3_SWAP_ROUTER_ADDRESSES = _chunkUZUDJXKEcjs.V3_SWAP_ROUTER_ADDRESSES; exports.ValidationError = ValidationError; exports.ZERO_VALUE = ZERO_VALUE; exports.assembleUserOperation = assembleUserOperation; exports.assertDomainMatchesContract = _chunkUZUDJXKEcjs.assertDomainMatchesContract; exports.buildAndSignSponsorAuth = _chunk75JWR5SAcjs.buildAndSignSponsorAuth; exports.buildBurnRequestTypedData = _chunkUZUDJXKEcjs.buildBurnRequestTypedData; exports.buildDelegationUserOp = buildDelegationUserOp; exports.buildDomain = _chunkUZUDJXKEcjs.buildDomain; exports.buildEip7702Authorization = buildEip7702Authorization; exports.buildErc20TransferUserOp = buildErc20TransferUserOp; exports.buildMintRequestTypedData = _chunkUZUDJXKEcjs.buildMintRequestTypedData; exports.buildPartialUserOperation = buildPartialUserOperation; exports.buildPerpDepositViaRelay = buildPerpDepositViaRelay; exports.buildPerpDepositWithGasDeduction = buildPerpDepositWithGasDeduction; exports.buildSponsorAuthDomain = _chunk75JWR5SAcjs.buildSponsorAuthDomain; exports.buildSponsorAuthTypedData = _chunk75JWR5SAcjs.buildSponsorAuthTypedData; exports.buildUserOpTypedData = buildUserOpTypedData; exports.burnRequestTypes = _chunkUZUDJXKEcjs.burnRequestTypes; exports.checkDelegation = checkDelegation; exports.checkEthAndBranch = checkEthAndBranch; exports.computeAccountId = computeAccountId; exports.computeAuthorizationHash = computeAuthorizationHash; exports.computeCallDataHash = _chunk75JWR5SAcjs.computeCallDataHash; exports.computeUserOpHash = computeUserOpHash; exports.computeV3PoolAddress = computeV3PoolAddress; exports.createLoginMessage = _chunk75JWR5SAcjs.createLoginMessage; exports.createPafiProxyTransport = createPafiProxyTransport; exports.decodeBatchExecuteCalls = decodeBatchExecuteCalls; exports.defaultErrorTypeForStatus = defaultErrorTypeForStatus; exports.delegateDirect = delegateDirect; exports.detectDelegateImpl = detectDelegateImpl; exports.encodeBatchExecute = encodeBatchExecute; exports.encodeV3Path = encodeV3Path; exports.encodeV3PathReversed = encodeV3PathReversed; exports.erc20Abi = _chunkXXLIIWIFcjs.erc20Abi; exports.erc20ApproveOp = erc20ApproveOp; exports.erc20BurnOp = erc20BurnOp; exports.erc20TransferOp = erc20TransferOp; exports.fetchPafiPools = fetchPafiPools; exports.generateSponsorAuthNonce = _chunk75JWR5SAcjs.generateSponsorAuthNonce; exports.getAaNonce = getAaNonce; exports.getBurnRequestNonce = _chunkTRYGIC2Icjs.getBurnRequestNonce; exports.getContractAddresses = getContractAddresses; exports.getDummySignatureFor7702 = getDummySignatureFor7702; exports.getIssuer = _chunkTRYGIC2Icjs.getIssuer2; exports.getMintFeeBps = _chunkTRYGIC2Icjs.getMintFeeBps; exports.getMintFeeRecipients = _chunkTRYGIC2Icjs.getMintFeeRecipients; exports.getMintRequestNonce = _chunkTRYGIC2Icjs.getMintRequestNonce; exports.getPafiServiceUrls = getPafiServiceUrls; exports.getPafiWebModalAdapter = getPafiWebModalAdapter; exports.getPointTokenBalance = _chunkTRYGIC2Icjs.getPointTokenBalance; exports.getPointTokenIssuer = _chunkTRYGIC2Icjs.getPointTokenIssuer; exports.getPointTokenIssuerAddress = _chunkTRYGIC2Icjs.getIssuer; exports.getSponsorAuthDomainAnchor = _chunk75JWR5SAcjs.getSponsorAuthDomainAnchor; exports.getTokenCap = _chunkTRYGIC2Icjs.getTokenCap; exports.getTokenName = _chunkTRYGIC2Icjs.getTokenName; exports.isActiveIssuer = _chunkTRYGIC2Icjs.isActiveIssuer; exports.isDelegatedTo = isDelegatedTo; exports.isDelegatedToTarget = isDelegatedToTarget; exports.isMinter = _chunkTRYGIC2Icjs.isMinter; exports.isPaymasterError = isPaymasterError; exports.issuerRegistryAbi = _chunkC7VB6WTLcjs.issuerRegistryAbi; exports.issuerRegistryGetIssuerFlatAbi = _chunkTRYGIC2Icjs.issuerRegistryGetIssuerFlatAbi; exports.mintFeeWrapperAbi = _chunkC7VB6WTLcjs.mintFeeWrapperAbi; exports.mintRequestTypes = _chunkUZUDJXKEcjs.mintRequestTypes; exports.mintingOracleAbi = _chunkC7VB6WTLcjs.mintingOracleAbi; exports.openPafiWebModal = openPafiWebModal; exports.openWebPopup = openWebPopup; exports.parseEip7702DelegatedAddress = parseEip7702DelegatedAddress; exports.parseLoginMessage = _chunk75JWR5SAcjs.parseLoginMessage; exports.permit2Abi = _chunkXXLIIWIFcjs.permit2Abi; exports.pointTokenAbi = _chunkKRHGFUDIcjs.pointTokenAbi; exports.pointTokenFactoryAbi = _chunkXXLIIWIFcjs.pointTokenFactoryAbi; exports.quoteOperatorFeeForTransfer = quoteOperatorFeeForTransfer; exports.quoteOperatorFeePt = quoteOperatorFeePt; exports.quoteOperatorFeeUsdt = quoteOperatorFeeUsdt; exports.rawCallOp = rawCallOp; exports.sendWithPaymasterFallback = sendWithPaymasterFallback; exports.serializeUserOpToJsonRpc = serializeUserOpToJsonRpc; exports.setPafiWebModalAdapter = setPafiWebModalAdapter; exports.signBurnRequest = _chunkUZUDJXKEcjs.signBurnRequest; exports.signMintRequest = _chunkUZUDJXKEcjs.signMintRequest; exports.signSponsorAuth = _chunk75JWR5SAcjs.signSponsorAuth; exports.splitAuthorizationSig = splitAuthorizationSig; exports.universalRouterAbi = _chunkXXLIIWIFcjs.universalRouterAbi; exports.v3QuoterV2Abi = _chunkXXLIIWIFcjs.v3QuoterV2Abi; exports.verifyBurnRequest = _chunkUZUDJXKEcjs.verifyBurnRequest; exports.verifyLoginMessage = _chunk75JWR5SAcjs.verifyLoginMessage; exports.verifyMintCap = _chunkTRYGIC2Icjs.verifyMintCap; exports.verifyMintRequest = _chunkUZUDJXKEcjs.verifyMintRequest; exports.verifySponsorAuth = _chunk75JWR5SAcjs.verifySponsorAuth; exports.webPopupAdapter = webPopupAdapter;
1699
1786
  //# sourceMappingURL=index.cjs.map