@pafi-dev/core 0.3.0-beta.8 → 0.4.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/dist/index.d.ts CHANGED
@@ -1,14 +1,14 @@
1
- import { Address, Hex, PublicClient, WalletClient } from 'viem';
1
+ import { Address, Hex, PublicClient, HttpTransport, WalletClient } from 'viem';
2
2
  import { P as PoolKey, C as ChainConfig, a as PafiSDKConfig, b as PointTokenDomainConfig, M as MintRequest, R as ReceiverConsent, E as EIP712Signature, S as SignatureVerification, B as BestQuote, Q as QuoteResult } from './types-b5_Tokjl.js';
3
3
  export { c as BurnRequest, I as Issuer, d as PathKey } from './types-b5_Tokjl.js';
4
4
  export { erc20Abi, issuerRegistryAbi, mintingOracleAbi, permit2Abi, pointTokenAbi, pointTokenFactoryAbi, universalRouterAbi, v4QuoterAbi } from './abi/index.js';
5
5
  export { buildBurnRequestTypedData, buildDomain, buildMintRequestTypedData, buildReceiverConsentTypedData, signBurnRequest, signMintRequest, signReceiverConsent, verifyBurnRequest, verifyMintRequest, verifyReceiverConsent } from './eip712/index.js';
6
6
  export { getIssuer, getMintRequestNonce, getPointTokenBalance, getPointTokenIssuer, getPointTokenIssuerAddress, getReceiverConsentNonce, getTokenName, isActiveIssuer, isMinter, verifyMintCap } from './contract/index.js';
7
7
  export { buildAllPaths, combineRoutes, findBestQuote, quoteBestRoute, quoteExactInput, quoteExactInputSingle } from './quoting/index.js';
8
- import { P as PartialUserOperation, O as Operation, U as UserOperation, S as SwapSimulationResult } from './index-B06IJlHe.js';
9
- export { B as BuildSwapWithGasDeductionParams, E as ENTRY_POINT_V07, a as PaymasterFields, b as SETTLE_ALL, c as SWAP_EXACT_IN, T as TAKE_ALL, d as UserOpReceipt, V as V4_SWAP, Z as ZERO_VALUE, e as buildErc20ApprovalCalldata, f as buildPermit2ApprovalCalldata, g as buildSwapFromQuote, h as buildSwapWithGasDeduction, i as buildUniversalRouterExecuteArgs, j as buildV4SwapInput, k as checkAllowance, s as simulateSwap } from './index-B06IJlHe.js';
8
+ import { P as PartialUserOperation, O as Operation, U as UserOperation, S as SwapSimulationResult } from './index-C1FGQ004.js';
9
+ export { B as BuildSwapWithGasDeductionParams, E as ENTRY_POINT_V07, a as PaymasterFields, b as SETTLE_ALL, c as SWAP_EXACT_IN, T as TAKE_ALL, d as UserOpReceipt, V as V4_SWAP, Z as ZERO_VALUE, e as buildErc20ApprovalCalldata, f as buildPermit2ApprovalCalldata, g as buildSwapFromQuote, h as buildSwapWithGasDeduction, i as buildUniversalRouterExecuteArgs, j as buildV4SwapInput, k as checkAllowance, s as simulateSwap } from './index-C1FGQ004.js';
10
10
  import { LoginMessageParams } from './auth/index.js';
11
- export { VerifyLoginResult, createLoginMessage, parseLoginMessage, verifyLoginMessage } from './auth/index.js';
11
+ export { SPONSOR_AUTH_DOMAIN_NAME, SPONSOR_AUTH_TYPES, SponsorAuthPayload, SponsorAuthVerifyResult, VerifyLoginResult, buildSponsorAuthDomain, buildSponsorAuthTypedData, computeCallDataHash, createLoginMessage, parseLoginMessage, signSponsorAuth, verifyLoginMessage, verifySponsorAuth } from './auth/index.js';
12
12
 
13
13
  declare const mintRequestTypes: {
14
14
  readonly MintRequest: readonly [{
@@ -117,7 +117,7 @@ declare class ApiError extends PafiSDKError {
117
117
  *
118
118
  * ## Sponsored vs direct
119
119
  *
120
- * Coinbase Paymaster sponsors GAS, not `msg.value`. So even on the
120
+ * ERC-4337 paymasters sponsor GAS, not `msg.value`. Even on the
121
121
  * sponsored path the user MUST hold enough native ETH on Base to cover
122
122
  * `getDepositFee()` (typically ~0.0002 ETH at quiet times).
123
123
  */
@@ -539,200 +539,180 @@ interface CheckEthAndBranchParams {
539
539
  declare function checkEthAndBranch(params: CheckEthAndBranchParams): Promise<SubmissionPath>;
540
540
 
541
541
  /**
542
- * Identifies the user-flow scenario the sponsorship covers. Used by
543
- * sponsor-relayer for per-scenario rate limits + by Privy verifier
544
- * to log sponsorship reason.
542
+ * Parse the implementation address out of an EIP-7702 delegation designator.
545
543
  *
546
- * Keep in sync with `SponsorshipScenario` in the paymaster module —
547
- * SponsorAuth replaces the Coinbase paymaster flow but reuses the
548
- * scenario taxonomy.
544
+ * Returns `null` when:
545
+ * - `code` is undefined / empty / `"0x"` (plain EOA, no code)
546
+ * - `code` does not contain the EIP-7702 magic prefix (regular contract)
547
+ *
548
+ * @param code - bytecode returned by `eth_getCode` / `client.getCode()`
549
+ * @returns the 20-byte implementation address (checksummed), or `null`
550
+ *
551
+ * @example
552
+ * const code = await client.getCode({ address });
553
+ * const impl = parseEip7702DelegatedAddress(code);
554
+ * // null → not delegated
555
+ * // '0x7702cb554e6bFb442cb743A7dF23154544a7176C' → delegated to BatchExecutor
549
556
  */
550
- type SponsorAuthScenario = "mint" | "burn" | "swap" | "perp_deposit";
557
+ declare function parseEip7702DelegatedAddress(code: Hex | string | null | undefined): Address | null;
551
558
  /**
552
- * Canonical SponsorAuth payload — the EIP-712 message that PAFI
553
- * sponsor-relayer signs and Privy native verifies before funding gas.
559
+ * Read the EIP-7702 delegation status of an EOA from the chain.
554
560
  *
555
- * See `SPONSOR_AUTH_DESIGN.md` for full architecture.
561
+ * @param client - viem PublicClient (any provider — only `eth_getCode` is called)
562
+ * @param address - EOA address to inspect
563
+ * @returns the implementation address the EOA is delegated to, or `null`
556
564
  *
557
- * ## Replay protection layers
565
+ * @example
566
+ * const impl = await checkDelegation(publicClient, userAddress);
567
+ * if (impl === null) {
568
+ * // show "Setup Wallet" button
569
+ * } else {
570
+ * // EOA already delegated; safe to send UserOps
571
+ * }
572
+ */
573
+ declare function checkDelegation(client: PublicClient, address: Address): Promise<Address | null>;
574
+ /**
575
+ * Return `true` when the EOA at `address` is currently delegated to `target`.
558
576
  *
559
- * - `nonce` — per-(sender, scenario), allocated by sponsor-relayer
560
- * - `expiresAt` — short window (60-120s recommended)
561
- * - `callDataHash` — binds payload to ONE specific UserOp callData
562
- * - `sender` — binds to one EOA
563
- * - `chainId` — binds to one chain
577
+ * Useful for asserting that the delegation points specifically at the expected
578
+ * BatchExecutor rather than some other implementation (e.g. old deployment).
564
579
  *
565
- * Mutation of any field invalidates the signature.
580
+ * @example
581
+ * import { BATCH_EXECUTOR_ADDRESS_BASE_MAINNET } from '@pafi-dev/core';
582
+ * const ok = await isDelegatedTo(client, userAddress, BATCH_EXECUTOR_ADDRESS_BASE_MAINNET);
566
583
  */
567
- interface SponsorAuthPayload {
568
- chainId: number;
569
- sender: Address;
570
- /** keccak256(userOp.callData) — caller computes from the UserOp they intend to submit. */
571
- callDataHash: Hex;
572
- /** Per-(sender, scenario) monotonic counter from sponsor-relayer. */
573
- nonce: bigint;
574
- /** Unix seconds. After this, Privy verifier rejects. */
575
- expiresAt: number;
576
- scenario: SponsorAuthScenario;
577
- /** Issuer that originated this sponsorship request (e.g. "gg56"). */
578
- issuerId: string;
579
- }
584
+ declare function isDelegatedTo(client: PublicClient, address: Address, target: Address): Promise<boolean>;
585
+
580
586
  /**
581
- * Optional extension fields keep separate so the canonical payload
582
- * stays minimal. Privy verifier may or may not enforce these depending
583
- * on dashboard config.
587
+ * Parameters for building a delegation-only UserOperation.
588
+ *
589
+ * This UserOp carries no calldata — its sole purpose is to anchor the
590
+ * EIP-7702 authorization (signed externally via `signAuthorization`) into
591
+ * a sponsored transaction so the user doesn't need native ETH to delegate.
584
592
  */
585
- interface SponsorAuthPayloadExtended extends SponsorAuthPayload {
586
- /** Max gas (units) sponsor-relayer pre-approved. */
587
- maxGasLimit?: bigint;
588
- /** Max gas price (wei) sponsor-relayer pre-approved. */
589
- maxGasPrice?: bigint;
590
- /** Audit metadata — surfaced in logs only, not used for verification. */
591
- intent?: {
592
- amount?: string;
593
- pointToken?: Address;
594
- targetContract?: Address;
593
+ interface BuildDelegationUserOpParams {
594
+ /** User EOA to delegate. */
595
+ userAddress: Address;
596
+ /** ERC-4337 account nonce fetched from EntryPoint. Pass 0n on first ever op. */
597
+ aaNonce: bigint;
598
+ gasLimits?: {
599
+ callGasLimit?: bigint;
600
+ verificationGasLimit?: bigint;
601
+ preVerificationGas?: bigint;
595
602
  };
596
603
  }
597
604
  /**
598
- * EIP-712 domain for SponsorAuth signatures.
605
+ * Build the minimal `PartialUserOperation` used to sponsor the one-time
606
+ * EIP-7702 delegation.
599
607
  *
600
- * `verifyingContract` is `0x0` because verification is OFF-CHAIN
601
- * (Privy native verifier reads sig + payload, recovers signer,
602
- * compares with PAFI public key registered in Privy dashboard).
603
- * The domain is still EIP-712 to leverage existing tooling.
604
- */
605
- declare const SPONSOR_AUTH_DOMAIN_NAME: "PAFI SponsorAuth";
606
- declare const SPONSOR_AUTH_DOMAIN_VERSION: "1";
607
- /** EIP-712 typed-data shape matches `SponsorAuthPayload` field order. */
608
- declare const SPONSOR_AUTH_TYPES: {
609
- readonly SponsorAuth: readonly [{
610
- readonly name: "chainId";
611
- readonly type: "uint256";
612
- }, {
613
- readonly name: "sender";
614
- readonly type: "address";
615
- }, {
616
- readonly name: "callDataHash";
617
- readonly type: "bytes32";
618
- }, {
619
- readonly name: "nonce";
620
- readonly type: "uint256";
621
- }, {
622
- readonly name: "expiresAt";
623
- readonly type: "uint256";
624
- }, {
625
- readonly name: "scenario";
626
- readonly type: "string";
627
- }, {
628
- readonly name: "issuerId";
629
- readonly type: "string";
630
- }];
631
- };
632
- /**
633
- * Build the EIP-712 domain object Privy verifier expects. Same
634
- * `chainId` as the SponsorAuth payload.
608
+ * The caller must:
609
+ * 1. Sign the EIP-7702 authorization via `signAuthorization()` (Privy hook).
610
+ * 2. Pass the authorization as `authorization` alongside `calls` (or alone)
611
+ * to `smartClient.sendTransaction()`.
612
+ *
613
+ * The permissionless SDK + Pimlico bundler handle the rest: they detect the
614
+ * `authorization` field and submit an EIP-7702 type-4 transaction that sets
615
+ * the EOA's bytecode to `0xef0100<batchExecutorAddress>`.
616
+ *
617
+ * This builder is a convenience wrapper — in practice you can also pass
618
+ * `{ to: userAddress, value: 0n, data: '0x', authorization }` directly to
619
+ * `smartClient.sendTransaction()` without calling this function at all.
620
+ * Use it when you need a `PartialUserOperation` struct for inspection or
621
+ * custom paymaster flows.
622
+ *
623
+ * @example
624
+ * // Typical flow — no need to call this builder directly:
625
+ * const nonce = await publicClient.getTransactionCount({ address, blockTag: 'pending' });
626
+ * const authorization = await signAuthorization({ contractAddress: BATCH_EXECUTOR, chainId: 8453, nonce });
627
+ * const txHash = await smartClient.sendTransaction({
628
+ * to: address,
629
+ * value: 0n,
630
+ * data: '0x',
631
+ * authorization,
632
+ * paymasterContext: { sponsorshipPolicyId },
633
+ * });
635
634
  */
636
- declare function buildSponsorAuthDomain(chainId: number): {
637
- readonly name: "PAFI SponsorAuth";
638
- readonly version: "1";
639
- readonly chainId: number;
640
- readonly verifyingContract: Address;
641
- };
642
-
635
+ declare function buildDelegationUserOp(params: BuildDelegationUserOpParams): PartialUserOperation;
643
636
  /**
644
- * Build the EIP-712 typed data object for a SponsorAuth payload.
645
- * Returned shape is compatible with `walletClient.signTypedData()`,
646
- * `viem.recoverTypedDataAddress()`, and any other EIP-712 tooling.
637
+ * Fetch the AA nonce for a user EOA from the EntryPoint v0.7.
638
+ *
639
+ * Convenience helper so callers don't need to import the EntryPoint ABI
640
+ * themselves when building the delegation UserOp.
647
641
  *
648
- * Use this when you need the full typed-data object (e.g. to display
649
- * to a hardware-wallet user, or to feed into an off-chain audit log).
650
- * Most callers only need `signSponsorAuth` / `verifySponsorAuth` below.
642
+ * @param client - viem PublicClient
643
+ * @param userAddress - EOA to query
644
+ * @returns bigint nonce (0n on first-ever UserOp)
651
645
  */
652
- declare function buildSponsorAuthTypedData(payload: SponsorAuthPayload): {
653
- domain: {
654
- readonly name: "PAFI SponsorAuth";
655
- readonly version: "1";
656
- readonly chainId: number;
657
- readonly verifyingContract: Address;
658
- };
659
- types: {
660
- readonly SponsorAuth: readonly [{
661
- readonly name: "chainId";
662
- readonly type: "uint256";
663
- }, {
664
- readonly name: "sender";
665
- readonly type: "address";
666
- }, {
667
- readonly name: "callDataHash";
668
- readonly type: "bytes32";
669
- }, {
670
- readonly name: "nonce";
671
- readonly type: "uint256";
672
- }, {
673
- readonly name: "expiresAt";
674
- readonly type: "uint256";
675
- }, {
676
- readonly name: "scenario";
677
- readonly type: "string";
678
- }, {
679
- readonly name: "issuerId";
680
- readonly type: "string";
681
- }];
682
- };
683
- primaryType: "SponsorAuth";
684
- message: {
685
- chainId: bigint;
686
- sender: `0x${string}`;
687
- callDataHash: `0x${string}`;
688
- nonce: bigint;
689
- expiresAt: bigint;
690
- scenario: SponsorAuthScenario;
691
- issuerId: string;
692
- };
693
- };
646
+ declare function getAaNonce(client: PublicClient, userAddress: Address): Promise<bigint>;
647
+
694
648
  /**
695
- * Sign a SponsorAuth payload using a viem `WalletClient`. Production
696
- * sponsor-relayer should use a KMS-backed signer instead — this helper
697
- * is for tests + local dev where you hold a raw private key.
698
- *
699
- * Returns the **serialized 65-byte signature** ready to put into
700
- * `SponsorAuthResponse.sponsorAuth`.
649
+ * Parameters for `createPafiProxyTransport`.
701
650
  */
702
- declare function signSponsorAuth(walletClient: WalletClient, payload: SponsorAuthPayload): Promise<Hex>;
651
+ interface PafiProxyTransportParams {
652
+ /**
653
+ * Full URL of the PAFI sponsor-relayer Pimlico proxy endpoint.
654
+ * @example "https://sponsor-relayer.pacificfinance.org/pimlico"
655
+ * @example "http://localhost:4000/pimlico"
656
+ */
657
+ proxyUrl: string;
658
+ /**
659
+ * Called on every request to get the current Privy identity token.
660
+ * Use a getter (or a ref's `.current`) so the transport always sends
661
+ * the latest token without needing to be rebuilt when it rotates.
662
+ *
663
+ * @example () => identityTokenRef.current
664
+ * @example () => privyHook.identityToken
665
+ */
666
+ getIdentityToken: () => string | null | undefined;
667
+ /**
668
+ * Issuer ID sent as `X-Issuer-Id` header.
669
+ * sponsor-relayer uses this to look up per-issuer rate limits and policy.
670
+ * Obtain from PAFI team during onboarding.
671
+ */
672
+ issuerId: string;
673
+ }
703
674
  /**
704
- * Verify a SponsorAuth signature offline. Use to:
705
- *
706
- * - Smoke-test that sponsor-relayer's output is well-formed (FE)
707
- * - Unit tests in SDK
708
- * - Defense-in-depth check before submitting to Privy
675
+ * Create a viem `HttpTransport` that proxies all Pimlico JSON-RPC calls
676
+ * through the PAFI sponsor-relayer (`POST /pimlico`).
709
677
  *
710
- * Privy verifier does the same check on their side — this is NOT a
711
- * substitute for Privy verification. It exists so consumers can fail
712
- * fast on a mangled sig before round-tripping through Privy.
678
+ * The transport:
679
+ * - Sets `Authorization: Bearer <identityToken>` on every request
680
+ * - Sets `X-Issuer-Id: <issuerId>` on every request
681
+ * - Reads the identity token lazily via `getIdentityToken()` so it is
682
+ * always fresh without rebuilding the SmartAccountClient on each rotation
713
683
  *
714
- * @param payload The exact payload PAFI BE returned
715
- * @param signature The serialized signature (sponsorAuth field)
716
- * @param expectedSigner PAFI's SponsorAuth signing-key address
717
- * (registered in Privy dashboard)
684
+ * Pass the returned transport to both `createPimlicoClient` and
685
+ * `createSmartAccountClient` so ALL Pimlico RPC calls (paymaster + bundler)
686
+ * go through the proxy with auth headers attached.
718
687
  *
719
- * @returns `true` if signature recovers to `expectedSigner`,
720
- * and the payload hasn't expired (`expiresAt > now`).
721
- * Returns `false` on any failure does NOT throw.
722
- */
723
- declare function verifySponsorAuth(payload: SponsorAuthPayload, signature: Hex, expectedSigner: Address): Promise<{
724
- ok: boolean;
725
- reason?: "INVALID_SIGNER" | "EXPIRED" | "INVALID_SIGNATURE_FORMAT";
726
- recoveredAddress?: Address;
727
- }>;
728
- /**
729
- * Helper — compute `callDataHash` from a UserOperation's `callData`.
730
- * Same hash function (`keccak256`) Privy verifier uses.
688
+ * @example
689
+ * ```ts
690
+ * import { createPafiProxyTransport, BATCH_EXECUTOR_ADDRESS_BASE_MAINNET } from '@pafi-dev/core';
691
+ * import { createSmartAccountClient } from 'permissionless';
692
+ * import { createPimlicoClient } from 'permissionless/clients/pimlico';
693
+ * import { useIdentityToken } from '@privy-io/react-auth';
694
+ *
695
+ * const { identityToken } = useIdentityToken();
696
+ * const identityTokenRef = useRef<string | null>(null);
697
+ * useEffect(() => { identityTokenRef.current = identityToken; }, [identityToken]);
698
+ *
699
+ * const proxyTransport = createPafiProxyTransport({
700
+ * proxyUrl: process.env.NEXT_PUBLIC_PIMLICO_PROXY_URL!,
701
+ * getIdentityToken: () => identityTokenRef.current,
702
+ * issuerId: process.env.NEXT_PUBLIC_ISSUER_ID!,
703
+ * });
731
704
  *
732
- * Bind this hash into the SponsorAuth payload BEFORE signing, so the
733
- * sig is invalid for any other UserOp.
705
+ * const pimlicoClient = createPimlicoClient({ chain: base, transport: proxyTransport });
706
+ * const smartClient = createSmartAccountClient({
707
+ * client: publicClient,
708
+ * chain: base,
709
+ * account,
710
+ * paymaster: pimlicoClient,
711
+ * bundlerTransport: proxyTransport,
712
+ * });
713
+ * ```
734
714
  */
735
- declare function computeCallDataHash(callData: Hex): Hex;
715
+ declare function createPafiProxyTransport(params: PafiProxyTransportParams): HttpTransport;
736
716
 
737
717
  /**
738
718
  * Real `PointToken` ABI — matches the contract deployed on Base mainnet
@@ -1489,4 +1469,4 @@ declare class PafiSDK {
1489
1469
  signLoginMessage(message: string): Promise<Hex>;
1490
1470
  }
1491
1471
 
1492
- export { ApiError, BATCH_EXECUTOR_ABI, BATCH_EXECUTOR_ADDRESS_BASE_MAINNET, BATCH_EXECUTOR_ADDRESS_BASE_SEPOLIA, BROKER_HASHES, BestQuote, type BuildPartialUserOpParams, type BuildPerpDepositWithGasDeductionParams, COMMON_POOLS, COMMON_TOKENS, CONTRACT_ADDRESSES, ChainConfig, type CheckEthAndBranchParams, ConfigurationError, type ContractAddresses, EIP712Signature, LoginMessageParams, MintRequest, type ModalOpenOptions, ORDERLY_VAULT_ABI, ORDERLY_VAULT_ADDRESSES, ORDERLY_VAULT_BASE_MAINNET, Operation, POINT_TOKEN_FACTORY_ADDRESSES, POINT_TOKEN_IMPL_ADDRESSES, POINT_TOKEN_POOLS, POINT_TOKEN_ABI as POINT_TOKEN_V2_ABI, PafiSDK, PafiSDKConfig, PafiSDKError, type PafiWebModalAdapter, type PafiWebModalHandle, PartialUserOperation, type PaymasterConfig, PointTokenDomainConfig, PoolKey, QuoteResult, ReceiverConsent, SPONSOR_AUTH_DOMAIN_NAME, SPONSOR_AUTH_DOMAIN_VERSION, SPONSOR_AUTH_TYPES, SUPPORTED_CHAINS, type SignatureStruct, SignatureVerification, SigningError, SimulationError, type SponsorAuthPayload, type SponsorAuthPayloadExtended, type SponsorAuthScenario, type SponsorshipScenario, type SubmissionPath, SwapSimulationResult, TOKEN_HASHES, UNIVERSAL_ROUTER_ADDRESSES, UserOperation, V4_QUOTER_ADDRESSES, type VaultDepositFE, _resetPaymasterConfigForTests, assembleUserOperation, buildPartialUserOperation, buildPerpDepositWithGasDeduction, buildSponsorAuthDomain, buildSponsorAuthTypedData, burnRequestTypes, checkEthAndBranch, computeAccountId, computeCallDataHash, encodeBatchExecute, erc20ApproveOp, erc20BurnOp, erc20TransferOp, getContractAddresses, getPafiWebModalAdapter, getPaymasterConfig, isPaymasterConfigured, mintRequestTypes, openPafiWebModal, openWebPopup, rawCallOp, receiverConsentTypes, setPafiWebModalAdapter, setPaymasterConfig, signSponsorAuth, verifySponsorAuth, webPopupAdapter };
1472
+ export { ApiError, BATCH_EXECUTOR_ABI, BATCH_EXECUTOR_ADDRESS_BASE_MAINNET, BATCH_EXECUTOR_ADDRESS_BASE_SEPOLIA, BROKER_HASHES, BestQuote, type BuildDelegationUserOpParams, type BuildPartialUserOpParams, type BuildPerpDepositWithGasDeductionParams, COMMON_POOLS, COMMON_TOKENS, CONTRACT_ADDRESSES, ChainConfig, type CheckEthAndBranchParams, ConfigurationError, type ContractAddresses, EIP712Signature, LoginMessageParams, MintRequest, type ModalOpenOptions, ORDERLY_VAULT_ABI, ORDERLY_VAULT_ADDRESSES, ORDERLY_VAULT_BASE_MAINNET, Operation, POINT_TOKEN_FACTORY_ADDRESSES, POINT_TOKEN_IMPL_ADDRESSES, POINT_TOKEN_POOLS, POINT_TOKEN_ABI as POINT_TOKEN_V2_ABI, type PafiProxyTransportParams, PafiSDK, PafiSDKConfig, PafiSDKError, type PafiWebModalAdapter, type PafiWebModalHandle, PartialUserOperation, type PaymasterConfig, PointTokenDomainConfig, PoolKey, QuoteResult, ReceiverConsent, SUPPORTED_CHAINS, type SignatureStruct, SignatureVerification, SigningError, SimulationError, type SponsorshipScenario, type SubmissionPath, SwapSimulationResult, TOKEN_HASHES, UNIVERSAL_ROUTER_ADDRESSES, UserOperation, V4_QUOTER_ADDRESSES, type VaultDepositFE, _resetPaymasterConfigForTests, assembleUserOperation, buildDelegationUserOp, buildPartialUserOperation, buildPerpDepositWithGasDeduction, burnRequestTypes, checkDelegation, checkEthAndBranch, computeAccountId, createPafiProxyTransport, encodeBatchExecute, erc20ApproveOp, erc20BurnOp, erc20TransferOp, getAaNonce, getContractAddresses, getPafiWebModalAdapter, getPaymasterConfig, isDelegatedTo, isPaymasterConfigured, mintRequestTypes, openPafiWebModal, openWebPopup, parseEip7702DelegatedAddress, rawCallOp, receiverConsentTypes, setPafiWebModalAdapter, setPaymasterConfig, webPopupAdapter };