@pafi-dev/core 0.5.17 → 0.5.19

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
@@ -611,19 +611,89 @@ function isPaymasterError(err) {
611
611
  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");
612
612
  }
613
613
  async function sendWithPaymasterFallback(params) {
614
- const { primaryClient, fallbackClient, txParams, onFallback } = params;
614
+ const { primaryClient, fallbackClient, txParams, txParamsFallback, onFallback } = params;
615
615
  try {
616
616
  return await primaryClient.sendTransaction(txParams);
617
617
  } catch (err) {
618
618
  if (isPaymasterError(err) && fallbackClient) {
619
619
  const msg = _nullishCoalesce(_optionalChain([err, 'optionalAccess', _21 => _21.message]), () => ( String(err)));
620
620
  _optionalChain([onFallback, 'optionalCall', _22 => _22(msg)]);
621
- return await fallbackClient.sendTransaction(txParams);
621
+ return await fallbackClient.sendTransaction(_nullishCoalesce(txParamsFallback, () => ( txParams)));
622
622
  }
623
623
  throw err;
624
624
  }
625
625
  }
626
626
 
627
+ // src/fee/operatorFeeQuoter.ts
628
+
629
+
630
+ // src/subgraph/pools.ts
631
+
632
+ var PAFI_SUBGRAPH_URL = "https://graph-base-mainnet.pacificfinance.org/subgraphs/name/pafi-subgraph-v2";
633
+ var POOL_QUERY = `
634
+ query GetPoolForPointToken($id: ID!) {
635
+ pafiToken(id: $id) {
636
+ id
637
+ pool {
638
+ id
639
+ feeTier
640
+ tickSpacing
641
+ hooks
642
+ token0 { id }
643
+ token1 { id }
644
+ }
645
+ }
646
+ }
647
+ `;
648
+ function sortCurrencies(a, b) {
649
+ return a.toLowerCase() < b.toLowerCase() ? [a, b] : [b, a];
650
+ }
651
+ async function fetchPafiPools(_chainId, pointTokenAddress, subgraphUrl = PAFI_SUBGRAPH_URL) {
652
+ let response;
653
+ try {
654
+ response = await fetch(subgraphUrl, {
655
+ method: "POST",
656
+ headers: { "Content-Type": "application/json" },
657
+ body: JSON.stringify({
658
+ query: POOL_QUERY,
659
+ variables: { id: pointTokenAddress.toLowerCase() }
660
+ })
661
+ });
662
+ } catch (err) {
663
+ console.warn("[fetchPafiPools] subgraph unreachable:", err.message);
664
+ return [];
665
+ }
666
+ if (!response.ok) {
667
+ console.warn(`[fetchPafiPools] subgraph returned ${response.status}`);
668
+ return [];
669
+ }
670
+ const json = await response.json();
671
+ if (json.errors && json.errors.length > 0) {
672
+ console.warn(
673
+ "[fetchPafiPools] subgraph errors:",
674
+ json.errors.map((e) => e.message).join("; ")
675
+ );
676
+ return [];
677
+ }
678
+ const pool = _optionalChain([json, 'access', _23 => _23.data, 'optionalAccess', _24 => _24.pafiToken, 'optionalAccess', _25 => _25.pool]);
679
+ if (!pool) return [];
680
+ 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))) {
681
+ console.error("[fetchPafiPools] invalid pool data in subgraph response \u2014 skipping");
682
+ return [];
683
+ }
684
+ const [currency0, currency1] = sortCurrencies(
685
+ pool.token0.id,
686
+ pool.token1.id
687
+ );
688
+ return [{
689
+ currency0,
690
+ currency1,
691
+ fee: Number(pool.feeTier),
692
+ tickSpacing: Number(pool.tickSpacing),
693
+ hooks: pool.hooks
694
+ }];
695
+ }
696
+
627
697
  // src/contracts/real/addresses.ts
628
698
  var PLACEHOLDER_DEAD = (suffix) => `0x000000000000000000000000000000000000${suffix.toLowerCase().padStart(4, "0")}`;
629
699
  var CONTRACT_ADDRESSES = {
@@ -679,6 +749,120 @@ function getContractAddresses(chainId) {
679
749
  return addrs;
680
750
  }
681
751
 
752
+ // src/fee/operatorFeeQuoter.ts
753
+ var CHAINLINK_ABI = _viem.parseAbi.call(void 0, [
754
+ "function latestRoundData() external view returns (uint80, int256, uint256, uint256, uint80)"
755
+ ]);
756
+ var CHAINLINK_MAX_AGE_S = 3600n;
757
+ var POOL_PRICE_QUERY = `
758
+ query GetPoolPrice($id: ID!) {
759
+ pafiToken(id: $id) {
760
+ pool {
761
+ token0 { id }
762
+ token1 { id }
763
+ token0Price
764
+ token1Price
765
+ }
766
+ }
767
+ }
768
+ `;
769
+ var DEFAULT_GAS_UNITS = 500000n;
770
+ var DEFAULT_PREMIUM_BPS = 12e3;
771
+ var DEFAULT_USDT_DECIMALS = 6;
772
+ async function quoteOperatorFeePt(config) {
773
+ const {
774
+ provider,
775
+ chainId,
776
+ pointTokenAddress,
777
+ gasUnits = DEFAULT_GAS_UNITS,
778
+ premiumBps = DEFAULT_PREMIUM_BPS,
779
+ subgraphUrl = PAFI_SUBGRAPH_URL,
780
+ usdtDecimals = DEFAULT_USDT_DECIMALS,
781
+ fallbackEthPriceUsd = 3e3,
782
+ fallbackPtPriceUsdt = 0.1,
783
+ fetchImpl = globalThis.fetch
784
+ } = config;
785
+ const chainlinkFeedAddress = _nullishCoalesce(config.chainlinkFeedAddress, () => ( getContractAddresses(chainId).chainlinkEthUsd));
786
+ const gasPrice = await provider.getGasPrice();
787
+ const nativeCost = gasPrice * gasUnits;
788
+ const withPremium = nativeCost * BigInt(premiumBps) / 10000n;
789
+ const [ethPrice8dec, ptPerUsdt18dec] = await Promise.all([
790
+ getEthPrice8dec(provider, chainlinkFeedAddress, fallbackEthPriceUsd),
791
+ getPtPerUsdt18dec(
792
+ fetchImpl,
793
+ subgraphUrl,
794
+ pointTokenAddress,
795
+ fallbackPtPriceUsdt
796
+ )
797
+ ]);
798
+ return withPremium * ethPrice8dec * ptPerUsdt18dec / 10n ** 26n;
799
+ }
800
+ async function getEthPrice8dec(provider, feed, fallback) {
801
+ try {
802
+ const result = await provider.readContract({
803
+ address: feed,
804
+ abi: CHAINLINK_ABI,
805
+ functionName: "latestRoundData"
806
+ });
807
+ const answer = result[1];
808
+ const updatedAt = result[3];
809
+ if (answer <= 0n) throw new Error("Chainlink: non-positive price");
810
+ const ageS = BigInt(Math.floor(Date.now() / 1e3)) - updatedAt;
811
+ if (ageS > CHAINLINK_MAX_AGE_S) {
812
+ throw new Error(`Chainlink: price stale by ${ageS}s`);
813
+ }
814
+ return answer;
815
+ } catch (err) {
816
+ console.warn(
817
+ "[quoteOperatorFeePt] Chainlink unavailable, using fallback:",
818
+ err.message
819
+ );
820
+ return BigInt(Math.round(fallback * 1e8));
821
+ }
822
+ }
823
+ async function getPtPerUsdt18dec(fetchImpl, subgraphUrl, pointTokenAddress, fallbackPtPriceUsdt) {
824
+ try {
825
+ const response = await fetchImpl(subgraphUrl, {
826
+ method: "POST",
827
+ headers: { "Content-Type": "application/json" },
828
+ body: JSON.stringify({
829
+ query: POOL_PRICE_QUERY,
830
+ variables: { id: pointTokenAddress.toLowerCase() }
831
+ })
832
+ });
833
+ if (!response.ok) throw new Error(`subgraph HTTP ${response.status}`);
834
+ const json = await response.json();
835
+ if (_optionalChain([json, 'access', _26 => _26.errors, 'optionalAccess', _27 => _27.length])) {
836
+ throw new Error(json.errors.map((e) => e.message).join("; "));
837
+ }
838
+ const pool = _optionalChain([json, 'access', _28 => _28.data, 'optionalAccess', _29 => _29.pafiToken, 'optionalAccess', _30 => _30.pool]);
839
+ if (!pool) throw new Error("pafiToken or pool not found");
840
+ const isPtToken0 = pool.token0.id.toLowerCase() === pointTokenAddress.toLowerCase();
841
+ const priceStr = isPtToken0 ? pool.token0Price : pool.token1Price;
842
+ if (!priceStr || Number(priceStr) <= 0) {
843
+ throw new Error(`invalid pool price from subgraph: ${priceStr}`);
844
+ }
845
+ const raw = parseBigDecimalTo18(priceStr);
846
+ if (raw === 0n) {
847
+ throw new Error(`pool price parsed to zero: ${priceStr}`);
848
+ }
849
+ return 10n ** 24n / raw;
850
+ } catch (err) {
851
+ console.warn(
852
+ "[quoteOperatorFeePt] subgraph unavailable, using fallback:",
853
+ err.message
854
+ );
855
+ const ptPerUsdtHuman = 1 / fallbackPtPriceUsdt;
856
+ return parseBigDecimalTo18(ptPerUsdtHuman.toFixed(18));
857
+ }
858
+ }
859
+ function parseBigDecimalTo18(s) {
860
+ const SCALE = 18;
861
+ const [whole = "0", frac = ""] = s.split(".");
862
+ const padded = (frac + "0".repeat(SCALE)).slice(0, SCALE);
863
+ return BigInt(whole + padded);
864
+ }
865
+
682
866
  // src/contracts/real/batchExecutor.ts
683
867
  var BATCH_EXECUTOR_ADDRESS_BASE_MAINNET = getContractAddresses(8453).batchExecutor;
684
868
  var BATCH_EXECUTOR_ADDRESS_BASE_SEPOLIA = getContractAddresses(84532).batchExecutor;
@@ -696,8 +880,8 @@ function openWebPopup(url, options = {}) {
696
880
  const width = _nullishCoalesce(options.width, () => ( DEFAULT_WIDTH));
697
881
  const height = _nullishCoalesce(options.height, () => ( DEFAULT_HEIGHT));
698
882
  const name = _nullishCoalesce(options.windowName, () => ( DEFAULT_NAME));
699
- const screenW = _nullishCoalesce(_optionalChain([window, 'access', _23 => _23.screen, 'optionalAccess', _24 => _24.availWidth]), () => ( window.innerWidth));
700
- const screenH = _nullishCoalesce(_optionalChain([window, 'access', _25 => _25.screen, 'optionalAccess', _26 => _26.availHeight]), () => ( window.innerHeight));
883
+ const screenW = _nullishCoalesce(_optionalChain([window, 'access', _31 => _31.screen, 'optionalAccess', _32 => _32.availWidth]), () => ( window.innerWidth));
884
+ const screenH = _nullishCoalesce(_optionalChain([window, 'access', _33 => _33.screen, 'optionalAccess', _34 => _34.availHeight]), () => ( window.innerHeight));
701
885
  const left = Math.max(0, Math.floor((screenW - width) / 2));
702
886
  const top = Math.max(0, Math.floor((screenH - height) / 2));
703
887
  const features = [
@@ -730,7 +914,7 @@ function openWebPopup(url, options = {}) {
730
914
  window.removeEventListener("message", messageListener);
731
915
  messageListener = null;
732
916
  }
733
- _optionalChain([options, 'access', _27 => _27.onClose, 'optionalCall', _28 => _28()]);
917
+ _optionalChain([options, 'access', _35 => _35.onClose, 'optionalCall', _36 => _36()]);
734
918
  };
735
919
  pollId = setInterval(() => {
736
920
  if (popup.closed) {
@@ -804,73 +988,6 @@ async function openPafiWebModal(url, options = {}) {
804
988
  );
805
989
  }
806
990
 
807
- // src/subgraph/pools.ts
808
-
809
- var PAFI_SUBGRAPH_URL = "https://graph-base-mainnet.pacificfinance.org/subgraphs/name/pafi-subgraph-v2";
810
- var POOL_QUERY = `
811
- query GetPoolForPointToken($id: ID!) {
812
- pafiToken(id: $id) {
813
- id
814
- pool {
815
- id
816
- feeTier
817
- tickSpacing
818
- hooks
819
- token0 { id }
820
- token1 { id }
821
- }
822
- }
823
- }
824
- `;
825
- function sortCurrencies(a, b) {
826
- return a.toLowerCase() < b.toLowerCase() ? [a, b] : [b, a];
827
- }
828
- async function fetchPafiPools(_chainId, pointTokenAddress, subgraphUrl = PAFI_SUBGRAPH_URL) {
829
- let response;
830
- try {
831
- response = await fetch(subgraphUrl, {
832
- method: "POST",
833
- headers: { "Content-Type": "application/json" },
834
- body: JSON.stringify({
835
- query: POOL_QUERY,
836
- variables: { id: pointTokenAddress.toLowerCase() }
837
- })
838
- });
839
- } catch (err) {
840
- console.warn("[fetchPafiPools] subgraph unreachable:", err.message);
841
- return [];
842
- }
843
- if (!response.ok) {
844
- console.warn(`[fetchPafiPools] subgraph returned ${response.status}`);
845
- return [];
846
- }
847
- const json = await response.json();
848
- if (json.errors && json.errors.length > 0) {
849
- console.warn(
850
- "[fetchPafiPools] subgraph errors:",
851
- json.errors.map((e) => e.message).join("; ")
852
- );
853
- return [];
854
- }
855
- const pool = _optionalChain([json, 'access', _29 => _29.data, 'optionalAccess', _30 => _30.pafiToken, 'optionalAccess', _31 => _31.pool]);
856
- if (!pool) return [];
857
- 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))) {
858
- console.error("[fetchPafiPools] invalid pool data in subgraph response \u2014 skipping");
859
- return [];
860
- }
861
- const [currency0, currency1] = sortCurrencies(
862
- pool.token0.id,
863
- pool.token1.id
864
- );
865
- return [{
866
- currency0,
867
- currency1,
868
- fee: Number(pool.feeTier),
869
- tickSpacing: Number(pool.tickSpacing),
870
- hooks: pool.hooks
871
- }];
872
- }
873
-
874
991
  // src/index.ts
875
992
  var PafiSDK = class {
876
993
 
@@ -1223,5 +1340,6 @@ var PafiSDK = class {
1223
1340
 
1224
1341
 
1225
1342
 
1226
- 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 = _chunkFNJZUNK3cjs.SPONSOR_AUTH_DOMAIN_NAME; exports.SPONSOR_AUTH_TYPES = _chunkFNJZUNK3cjs.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.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 = _chunkFNJZUNK3cjs.buildSponsorAuthDomain; exports.buildSponsorAuthTypedData = _chunkFNJZUNK3cjs.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 = _chunkFNJZUNK3cjs.computeCallDataHash; exports.computeUserOpHash = computeUserOpHash; exports.createLoginMessage = _chunkFNJZUNK3cjs.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 = _chunkFNJZUNK3cjs.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.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 = _chunkFNJZUNK3cjs.signSponsorAuth; exports.simulateSwap = _chunkJJ2LGENOcjs.simulateSwap; exports.universalRouterAbi = _chunkIPXARZ6Fcjs.universalRouterAbi; exports.v4QuoterAbi = _chunkCL3QSI4Ocjs.v4QuoterAbi; exports.verifyBurnRequest = _chunkDX73FB4Pcjs.verifyBurnRequest; exports.verifyLoginMessage = _chunkFNJZUNK3cjs.verifyLoginMessage; exports.verifyMintCap = _chunkCLPRSQT2cjs.verifyMintCap; exports.verifyMintRequest = _chunkDX73FB4Pcjs.verifyMintRequest; exports.verifyReceiverConsent = _chunkDX73FB4Pcjs.verifyReceiverConsent; exports.verifySponsorAuth = _chunkFNJZUNK3cjs.verifySponsorAuth; exports.webPopupAdapter = webPopupAdapter;
1343
+
1344
+ 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 = _chunkFNJZUNK3cjs.SPONSOR_AUTH_DOMAIN_NAME; exports.SPONSOR_AUTH_TYPES = _chunkFNJZUNK3cjs.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.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 = _chunkFNJZUNK3cjs.buildSponsorAuthDomain; exports.buildSponsorAuthTypedData = _chunkFNJZUNK3cjs.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 = _chunkFNJZUNK3cjs.computeCallDataHash; exports.computeUserOpHash = computeUserOpHash; exports.createLoginMessage = _chunkFNJZUNK3cjs.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 = _chunkFNJZUNK3cjs.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 = _chunkFNJZUNK3cjs.signSponsorAuth; exports.simulateSwap = _chunkJJ2LGENOcjs.simulateSwap; exports.universalRouterAbi = _chunkIPXARZ6Fcjs.universalRouterAbi; exports.v4QuoterAbi = _chunkCL3QSI4Ocjs.v4QuoterAbi; exports.verifyBurnRequest = _chunkDX73FB4Pcjs.verifyBurnRequest; exports.verifyLoginMessage = _chunkFNJZUNK3cjs.verifyLoginMessage; exports.verifyMintCap = _chunkCLPRSQT2cjs.verifyMintCap; exports.verifyMintRequest = _chunkDX73FB4Pcjs.verifyMintRequest; exports.verifyReceiverConsent = _chunkDX73FB4Pcjs.verifyReceiverConsent; exports.verifySponsorAuth = _chunkFNJZUNK3cjs.verifySponsorAuth; exports.webPopupAdapter = webPopupAdapter;
1227
1345
  //# sourceMappingURL=index.cjs.map