@pafi-dev/core 0.6.2 → 0.7.1

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/dist/index.cjs CHANGED
@@ -102,6 +102,16 @@ var ApiError = class extends PafiSDKError {
102
102
  }
103
103
 
104
104
  };
105
+ var OracleStaleError = class extends PafiSDKError {
106
+
107
+
108
+ constructor(source, reason) {
109
+ super(`Oracle ${source} unavailable: ${reason}`);
110
+ this.name = "OracleStaleError";
111
+ this.source = source;
112
+ this.reason = reason;
113
+ }
114
+ };
105
115
 
106
116
  // src/perp/buildPerpDepositWithGasDeduction.ts
107
117
 
@@ -396,26 +406,19 @@ function buildPerpDepositViaRelay(params) {
396
406
  throw new Error("buildPerpDepositViaRelay: relayAddress required");
397
407
  }
398
408
  const operations = [];
399
- if (params.gasFeePt && params.gasFeePt > 0n) {
400
- if (!params.pointTokenAddress) {
401
- throw new Error(
402
- "buildPerpDepositViaRelay: pointTokenAddress required when gasFeePt > 0"
403
- );
404
- }
405
- if (!params.gasFeePtRecipient) {
409
+ if (params.gasFeeUsdc && params.gasFeeUsdc > 0n) {
410
+ if (!params.gasFeeUsdcRecipient) {
406
411
  throw new Error(
407
- "buildPerpDepositViaRelay: gasFeePtRecipient required when gasFeePt > 0"
412
+ "buildPerpDepositViaRelay: gasFeeUsdcRecipient required when gasFeeUsdc > 0"
408
413
  );
409
414
  }
410
- operations.push({
411
- target: params.pointTokenAddress,
412
- value: 0n,
413
- data: _viem.encodeFunctionData.call(void 0, {
414
- abi: _viem.erc20Abi,
415
- functionName: "transfer",
416
- args: [params.gasFeePtRecipient, params.gasFeePt]
417
- })
418
- });
415
+ operations.push(
416
+ erc20TransferOp(
417
+ params.request.token,
418
+ params.gasFeeUsdcRecipient,
419
+ params.gasFeeUsdc
420
+ )
421
+ );
419
422
  }
420
423
  operations.push(
421
424
  erc20ApproveOp(
@@ -601,11 +604,9 @@ function parseEip7702DelegatedAddress(code) {
601
604
  if (!code || code === "0x" || code === "0x0") return null;
602
605
  const normalized = code.toLowerCase();
603
606
  const magic = EIP7702_MAGIC.toLowerCase();
604
- const idx = normalized.indexOf(magic);
605
- if (idx === -1) return null;
606
- const raw = normalized.slice(idx + magic.length, idx + magic.length + 40);
607
- if (raw.length !== 40) return null;
608
- return `0x${raw}`;
607
+ if (!normalized.startsWith(magic)) return null;
608
+ if (normalized.length !== magic.length + 40) return null;
609
+ return `0x${normalized.slice(magic.length)}`;
609
610
  }
610
611
  async function checkDelegation(client, address) {
611
612
  const code = await client.getCode({ address });
@@ -734,9 +735,24 @@ function createPafiProxyTransport(params) {
734
735
  }
735
736
 
736
737
  // src/transport/paymasterFallback.ts
738
+ var PAYMASTER_HTTP_STATUSES = /* @__PURE__ */ new Set([401, 403, 429, 503]);
739
+ var PAYMASTER_PATTERNS = [
740
+ /\bAA3[1-4]\b/i,
741
+ /\bpaymaster\b/i,
742
+ /\bsponsorship\b/i,
743
+ /\bpm_\w+/i,
744
+ /\brate ?limit\b/i,
745
+ /\bunauthorized\b/i
746
+ ];
737
747
  function isPaymasterError(err) {
738
- const msg = (_nullishCoalesce(_optionalChain([err, 'optionalAccess', _30 => _30.message]), () => ( String(err)))).toLowerCase();
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");
748
+ if (err == null || typeof err !== "object") return false;
749
+ const e = err;
750
+ const status = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(e.status, () => ( e.statusCode)), () => ( _optionalChain([e, 'access', _30 => _30.response, 'optionalAccess', _31 => _31.status]))), () => ( _optionalChain([e, 'access', _32 => _32.cause, 'optionalAccess', _33 => _33.status])));
751
+ if (typeof status === "number" && PAYMASTER_HTTP_STATUSES.has(status)) {
752
+ return true;
753
+ }
754
+ const msg = _nullishCoalesce(e.message, () => ( String(err)));
755
+ return PAYMASTER_PATTERNS.some((re) => re.test(msg));
740
756
  }
741
757
  async function sendWithPaymasterFallback(params) {
742
758
  const { primaryClient, fallbackClient, txParams, txParamsFallback, onFallback } = params;
@@ -744,8 +760,8 @@ async function sendWithPaymasterFallback(params) {
744
760
  return await primaryClient.sendTransaction(txParams);
745
761
  } catch (err) {
746
762
  if (isPaymasterError(err) && fallbackClient) {
747
- const msg = _nullishCoalesce(_optionalChain([err, 'optionalAccess', _31 => _31.message]), () => ( String(err)));
748
- _optionalChain([onFallback, 'optionalCall', _32 => _32(msg)]);
763
+ const msg = _nullishCoalesce(_optionalChain([err, 'optionalAccess', _34 => _34.message]), () => ( String(err)));
764
+ _optionalChain([onFallback, 'optionalCall', _35 => _35(msg)]);
749
765
  return await fallbackClient.sendTransaction(_nullishCoalesce(txParamsFallback, () => ( txParams)));
750
766
  }
751
767
  throw err;
@@ -803,7 +819,7 @@ async function fetchPafiPools(_chainId, pointTokenAddress, subgraphUrl = PAFI_SU
803
819
  );
804
820
  return [];
805
821
  }
806
- const pool = _optionalChain([json, 'access', _33 => _33.data, 'optionalAccess', _34 => _34.pafiToken, 'optionalAccess', _35 => _35.pool]);
822
+ const pool = _optionalChain([json, 'access', _36 => _36.data, 'optionalAccess', _37 => _37.pafiToken, 'optionalAccess', _38 => _38.pool]);
807
823
  if (!pool) return [];
808
824
  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))) {
809
825
  console.error("[fetchPafiPools] invalid pool data in subgraph response \u2014 skipping");
@@ -906,6 +922,7 @@ async function quoteOperatorFeeUsdt(config) {
906
922
  gasUnits = DEFAULT_GAS_UNITS,
907
923
  premiumBps = DEFAULT_PREMIUM_BPS,
908
924
  usdtDecimals = DEFAULT_USDT_DECIMALS,
925
+ allowStaleFallback = false,
909
926
  fallbackEthPriceUsd = 3e3
910
927
  } = config;
911
928
  const chainlinkFeedAddress = _nullishCoalesce(config.chainlinkFeedAddress, () => ( getContractAddresses(chainId).chainlinkEthUsd));
@@ -915,7 +932,7 @@ async function quoteOperatorFeeUsdt(config) {
915
932
  const ethPrice8dec = await getEthPrice8dec(
916
933
  provider,
917
934
  chainlinkFeedAddress,
918
- fallbackEthPriceUsd
935
+ allowStaleFallback ? fallbackEthPriceUsd : null
919
936
  );
920
937
  const denomExp = 18 + 8 - usdtDecimals;
921
938
  return withPremium * ethPrice8dec / 10n ** BigInt(denomExp);
@@ -929,6 +946,7 @@ async function quoteOperatorFeePt(config) {
929
946
  premiumBps = DEFAULT_PREMIUM_BPS,
930
947
  subgraphUrl = PAFI_SUBGRAPH_URL,
931
948
  usdtDecimals = DEFAULT_USDT_DECIMALS,
949
+ allowStaleFallback = false,
932
950
  fallbackEthPriceUsd = 3e3,
933
951
  fallbackPtPriceUsdt = 0.1,
934
952
  fetchImpl = globalThis.fetch
@@ -938,12 +956,16 @@ async function quoteOperatorFeePt(config) {
938
956
  const nativeCost = gasPrice * gasUnits;
939
957
  const withPremium = nativeCost * BigInt(premiumBps) / 10000n;
940
958
  const [ethPrice8dec, ptPerUsdt18dec] = await Promise.all([
941
- getEthPrice8dec(provider, chainlinkFeedAddress, fallbackEthPriceUsd),
959
+ getEthPrice8dec(
960
+ provider,
961
+ chainlinkFeedAddress,
962
+ allowStaleFallback ? fallbackEthPriceUsd : null
963
+ ),
942
964
  getPtPerUsdt18dec(
943
965
  fetchImpl,
944
966
  subgraphUrl,
945
967
  pointTokenAddress,
946
- fallbackPtPriceUsdt
968
+ allowStaleFallback ? fallbackPtPriceUsdt : null
947
969
  )
948
970
  ]);
949
971
  return withPremium * ethPrice8dec * ptPerUsdt18dec / 10n ** 26n;
@@ -964,9 +986,13 @@ async function getEthPrice8dec(provider, feed, fallback) {
964
986
  }
965
987
  return answer;
966
988
  } catch (err) {
989
+ const reason = err instanceof Error ? err.message : String(err);
990
+ if (fallback === null) {
991
+ throw new OracleStaleError("chainlink", reason);
992
+ }
967
993
  console.warn(
968
- "[quoteOperatorFeePt] Chainlink unavailable, using fallback:",
969
- err.message
994
+ "[quoteOperatorFee] Chainlink unavailable, using opt-in fallback:",
995
+ reason
970
996
  );
971
997
  return BigInt(Math.round(fallback * 1e8));
972
998
  }
@@ -983,10 +1009,10 @@ async function getPtPerUsdt18dec(fetchImpl, subgraphUrl, pointTokenAddress, fall
983
1009
  });
984
1010
  if (!response.ok) throw new Error(`subgraph HTTP ${response.status}`);
985
1011
  const json = await response.json();
986
- if (_optionalChain([json, 'access', _36 => _36.errors, 'optionalAccess', _37 => _37.length])) {
1012
+ if (_optionalChain([json, 'access', _39 => _39.errors, 'optionalAccess', _40 => _40.length])) {
987
1013
  throw new Error(json.errors.map((e) => e.message).join("; "));
988
1014
  }
989
- const pool = _optionalChain([json, 'access', _38 => _38.data, 'optionalAccess', _39 => _39.pafiToken, 'optionalAccess', _40 => _40.pool]);
1015
+ const pool = _optionalChain([json, 'access', _41 => _41.data, 'optionalAccess', _42 => _42.pafiToken, 'optionalAccess', _43 => _43.pool]);
990
1016
  if (!pool) throw new Error("pafiToken or pool not found");
991
1017
  const isPtToken0 = pool.token0.id.toLowerCase() === pointTokenAddress.toLowerCase();
992
1018
  const priceStr = isPtToken0 ? pool.token0Price : pool.token1Price;
@@ -999,9 +1025,13 @@ async function getPtPerUsdt18dec(fetchImpl, subgraphUrl, pointTokenAddress, fall
999
1025
  }
1000
1026
  return 10n ** 24n / raw;
1001
1027
  } catch (err) {
1028
+ const reason = err instanceof Error ? err.message : String(err);
1029
+ if (fallbackPtPriceUsdt === null) {
1030
+ throw new OracleStaleError("subgraph", reason);
1031
+ }
1002
1032
  console.warn(
1003
- "[quoteOperatorFeePt] subgraph unavailable, using fallback:",
1004
- err.message
1033
+ "[quoteOperatorFeePt] subgraph unavailable, using opt-in fallback:",
1034
+ reason
1005
1035
  );
1006
1036
  const ptPerUsdtHuman = 1 / fallbackPtPriceUsdt;
1007
1037
  return parseBigDecimalTo18(ptPerUsdtHuman.toFixed(18));
@@ -1031,8 +1061,8 @@ function openWebPopup(url, options = {}) {
1031
1061
  const width = _nullishCoalesce(options.width, () => ( DEFAULT_WIDTH));
1032
1062
  const height = _nullishCoalesce(options.height, () => ( DEFAULT_HEIGHT));
1033
1063
  const name = _nullishCoalesce(options.windowName, () => ( DEFAULT_NAME));
1034
- const screenW = _nullishCoalesce(_optionalChain([window, 'access', _41 => _41.screen, 'optionalAccess', _42 => _42.availWidth]), () => ( window.innerWidth));
1035
- const screenH = _nullishCoalesce(_optionalChain([window, 'access', _43 => _43.screen, 'optionalAccess', _44 => _44.availHeight]), () => ( window.innerHeight));
1064
+ const screenW = _nullishCoalesce(_optionalChain([window, 'access', _44 => _44.screen, 'optionalAccess', _45 => _45.availWidth]), () => ( window.innerWidth));
1065
+ const screenH = _nullishCoalesce(_optionalChain([window, 'access', _46 => _46.screen, 'optionalAccess', _47 => _47.availHeight]), () => ( window.innerHeight));
1036
1066
  const left = Math.max(0, Math.floor((screenW - width) / 2));
1037
1067
  const top = Math.max(0, Math.floor((screenH - height) / 2));
1038
1068
  const features = [
@@ -1065,7 +1095,7 @@ function openWebPopup(url, options = {}) {
1065
1095
  window.removeEventListener("message", messageListener);
1066
1096
  messageListener = null;
1067
1097
  }
1068
- _optionalChain([options, 'access', _45 => _45.onClose, 'optionalCall', _46 => _46()]);
1098
+ _optionalChain([options, 'access', _48 => _48.onClose, 'optionalCall', _49 => _49()]);
1069
1099
  };
1070
1100
  pollId = setInterval(() => {
1071
1101
  if (popup.closed) {
@@ -1416,5 +1446,6 @@ var PafiSDK = class {
1416
1446
 
1417
1447
 
1418
1448
 
1419
- 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.quoteOperatorFeeUsdt = quoteOperatorFeeUsdt; 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;
1449
+
1450
+ 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.OracleStaleError = OracleStaleError; 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.quoteOperatorFeeUsdt = quoteOperatorFeeUsdt; 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;
1420
1451
  //# sourceMappingURL=index.cjs.map