@pafi-dev/issuer 0.18.0 → 0.20.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.cts CHANGED
@@ -624,12 +624,33 @@ declare class RelayService {
624
624
  /**
625
625
  * Build a dummy `PartialUserOperation` for the mint scenario, suitable
626
626
  * for `feeManager.estimateGasFee({ partialUserOp, ... })`. NO signing —
627
- * uses a 65-byte zero signature in place of the real minter sig.
627
+ * uses a 65-byte zero signature placeholder.
628
628
  */
629
629
  previewMintUserOp(params: PreviewMintParams): PartialUserOperation;
630
630
  /** Burn-side mirror of `previewMintUserOp`. */
631
631
  previewBurnUserOp(params: PreviewBurnParams): PartialUserOperation;
632
632
  }
633
+ /**
634
+ * Inputs for `previewMintUserOp` — strict subset of `PrepareMintParams`
635
+ * that excludes the signing wallet, EIP-712 domain, and on-chain
636
+ * `mintRequestNonces` lookup since those don't affect calldata shape
637
+ * (the bundler estimate is shape-invariant under their values).
638
+ */
639
+ interface PreviewMintParams {
640
+ userAddress: Address;
641
+ aaNonce: bigint;
642
+ pointTokenAddress: Address;
643
+ amount: bigint;
644
+ deadline: bigint;
645
+ mintFeeWrapperAddress?: Address;
646
+ }
647
+ interface PreviewBurnParams {
648
+ userAddress: Address;
649
+ aaNonce: bigint;
650
+ pointTokenAddress: Address;
651
+ amount: bigint;
652
+ deadline: bigint;
653
+ }
633
654
  /**
634
655
  * Sig-gated `PointToken.mint(to, amount, deadline, minterSig)`.
635
656
  *
@@ -715,101 +736,88 @@ interface PrepareBurnParams {
715
736
  verificationGasLimit?: bigint;
716
737
  preVerificationGas?: bigint;
717
738
  }
739
+
718
740
  /**
719
- * Inputs for `previewMintUserOp` strict subset of `PrepareMintParams`
720
- * that excludes the signing wallet, EIP-712 domain, and on-chain nonce.
721
- * These don't affect calldata shape so the bundler estimate doesn't
722
- * need them.
741
+ * Caller-supplied fetch implementation, matching the WHATWG Fetch API
742
+ * shape. Defaults to `globalThis.fetch` when omitted; tests and
743
+ * non-browser/node environments can plug in their own.
723
744
  */
724
- interface PreviewMintParams {
725
- userAddress: Address;
726
- aaNonce: bigint;
727
- pointTokenAddress: Address;
728
- amount: bigint;
729
- deadline: bigint;
730
- mintFeeWrapperAddress?: Address;
731
- }
732
- interface PreviewBurnParams {
733
- userAddress: Address;
734
- aaNonce: bigint;
735
- pointTokenAddress: Address;
736
- amount: bigint;
737
- deadline: bigint;
738
- }
739
-
745
+ type FetchImpl = (input: string, init?: RequestInit) => Promise<Response>;
740
746
  /**
741
- * In-memory cache for bundler-estimated gas units, keyed by
742
- * `(scenario, contractCodehash, paymaster)`.
743
- *
744
- * Why these key components:
745
- * - `scenario` — distinguishes mint vs burn vs swap; their UserOps
746
- * differ in calldata shape so estimates differ.
747
- * - `contractCodehash` fetched from the SC address via `eth_getCode`,
748
- * cached separately for 1h. When the SC is upgraded
749
- * the codehash changes the gas key auto-invalidates
750
- * (no manual purge needed).
751
- * - `paymaster` — paymaster contract version affects postOp gas;
752
- * rotating paymaster naturally invalidates.
753
- *
754
- * Bound: max `maxEntries` to defend against unbounded growth on
755
- * long-running issuer backends; eldest evicted first (LRU-by-insertion).
756
- */
757
- interface GasUnitsCacheConfig {
758
- /** Gas-units cache TTL in ms. Default 5 minutes. */
759
- ttlMs?: number;
760
- /** Codehash cache TTL in ms. Default 1 hour. */
761
- codehashTtlMs?: number;
762
- /** Max entries before LRU eviction. Default 100. */
763
- maxEntries?: number;
764
- }
765
- declare class GasUnitsCache {
766
- private readonly entries;
767
- private readonly codehashEntries;
768
- private readonly ttlMs;
769
- private readonly codehashTtlMs;
770
- private readonly maxEntries;
771
- constructor(config?: GasUnitsCacheConfig);
772
- buildKey(params: {
747
+ * Duck-typed estimator interface. `FeeManager` accepts any object
748
+ * satisfying this surface so the SDK stays decoupled from where the
749
+ * bundler estimate physically lives (PAFI sponsor-relayer in production,
750
+ * a mock in tests, a local Pimlico proxy in dev).
751
+ *
752
+ * The estimator's job: given the preview UserOp shape, return the gas
753
+ * units to multiply by `gasPrice` and feed into the caller's fee
754
+ * quoter. Premium and PM overhead are the estimator's responsibility,
755
+ * NOT the SDK's preventing double-padding.
756
+ */
757
+ interface BundlerEstimatorClient {
758
+ /**
759
+ * Resolve gas units for a sponsored UserOp.
760
+ *
761
+ * @throws implementations should throw on transport / auth /
762
+ * protocol errors so `FeeManager` can degrade to its hardcoded
763
+ * fallback. Network failures must NOT silently return a default,
764
+ * since that would mask a misconfiguration as a successful estimate.
765
+ */
766
+ getGasUnits(input: {
773
767
  scenario: string;
774
768
  contractAddress: Address;
775
769
  paymasterAddress?: Address;
776
- provider: PublicClient;
777
- }): Promise<string>;
778
- get(key: string, now?: number): bigint | null;
779
- set(key: string, gasUnits: bigint, now?: number): void;
780
- invalidate(): void;
781
- size(): number;
782
- private getCodehash;
783
- }
784
-
785
- /**
786
- * Minimal duck-typed shape of an ERC-4337 bundler client supporting
787
- * `eth_estimateUserOperationGas`. Compatible with `permissionless`'s
788
- * `createBundlerClient` and any spec-compliant bundler (Pimlico, Alchemy,
789
- * StackUp, Biconomy). The SDK does NOT add `permissionless` as a hard
790
- * dependency — callers pass whatever client they already use.
791
- */
792
- interface BundlerEstimatorClient {
793
- estimateUserOperationGas(args: {
794
- sender: Address;
795
- nonce: bigint;
796
- callData: Hex;
797
- signature?: Hex;
798
- paymaster?: Address;
799
- paymasterData?: Hex;
770
+ partialUserOp: {
771
+ sender: Address;
772
+ nonce: bigint;
773
+ callData: Hex;
774
+ signature?: Hex;
775
+ };
800
776
  }): Promise<{
801
- callGasLimit: bigint;
802
- verificationGasLimit: bigint;
803
- preVerificationGas: bigint;
804
- paymasterVerificationGasLimit?: bigint;
805
- paymasterPostOpGasLimit?: bigint;
777
+ gasUnits: bigint;
778
+ source: "cache" | "bundler" | "fallback";
779
+ expiresAt: number;
806
780
  }>;
807
781
  }
808
- type GasFeeSource = "cache" | "bundler" | "fallback";
782
+ interface PafiEstimatorClientConfig {
783
+ /**
784
+ * Base URL of the PAFI sponsor-relayer (no trailing slash). The
785
+ * adapter appends `/v1/estimate-gas-fee` — issuer infrastructure
786
+ * never talks to Pimlico directly.
787
+ */
788
+ baseUrl: string;
789
+ /** Issuer's PAFI API key — the same one used for `/paymaster/sponsor`. */
790
+ apiKey: string;
791
+ /** Issuer ID used in `X-Issuer-Id` header. */
792
+ issuerId: string;
793
+ /** Custom fetch (e.g. `undici` in tests). Defaults to `globalThis.fetch`. */
794
+ fetchImpl?: FetchImpl;
795
+ }
796
+ declare class PafiEstimatorHttpError extends Error {
797
+ readonly status: number;
798
+ readonly body: unknown;
799
+ constructor(status: number, body: unknown, message?: string);
800
+ }
809
801
  /**
810
- * Hooks called by `FeeManager` so callers can wire their own
811
- * observability (Pino logger, Prometheus counters, ...). All hooks are
812
- * synchronous and best-effortthey MUST NOT throw.
802
+ * HTTP adapter that hits PAFI sponsor-relayer's `/v1/estimate-gas-fee`
803
+ * endpoint. The SDK never imports Pimlico-specific code or holds the
804
+ * Pimlico API keythe bundler call happens server-side at PAFI.
805
+ *
806
+ * Authentication mirrors `/paymaster/sponsor`:
807
+ * - `Authorization: Bearer <apiKey>`
808
+ * - `X-Issuer-Id: <issuerId>`
809
+ *
810
+ * Issuers wire this once at boot via `createPafiEstimatorClient({
811
+ * baseUrl, apiKey, issuerId })` and pass it to `FeeManager` as
812
+ * `bundlerClient`. The same `baseUrl`/`apiKey`/`issuerId` already
813
+ * authenticate other PAFI calls — no new secrets required.
814
+ */
815
+ declare function createPafiEstimatorClient(config: PafiEstimatorClientConfig): BundlerEstimatorClient;
816
+
817
+ type GasFeeSource = "estimator" | "fallback" | "cached-fee";
818
+ /**
819
+ * Hooks for observability. Sync, best-effort — errors thrown by hooks
820
+ * are swallowed so they cannot break the user-facing fee flow.
813
821
  */
814
822
  interface FeeManagerMetrics {
815
823
  onEstimate?: (info: {
@@ -818,148 +826,114 @@ interface FeeManagerMetrics {
818
826
  gasUnits: bigint;
819
827
  latencyMs: number;
820
828
  }) => void;
821
- onBundlerError?: (info: {
829
+ onEstimatorError?: (info: {
822
830
  scenario?: string;
823
831
  reason: string;
824
832
  }) => void;
825
833
  }
826
834
  interface FeeManagerConfig {
827
- /** Provider used for gas price reads + codehash lookup. */
835
+ /** Provider used for gas-price reads. */
828
836
  provider: PublicClient;
829
837
  /**
830
- * Hardcoded fallback gas units, used when (a) `bundlerClient` is not
831
- * configured OR (b) the bundler call fails. Default: 500_000.
838
+ * Hardcoded fallback gas units, used when (a) no `bundlerClient` is
839
+ * configured, OR (b) the bundler call fails and `partialUserOp` was
840
+ * not supplied. Default: 500_000n. Sized as a safe over-estimate vs
841
+ * the historically observed mint/burn cost so a fallback never
842
+ * under-charges the sponsor.
832
843
  */
833
844
  gasUnits?: bigint;
834
845
  /**
835
- * Safety margin applied on top of the bundler/fallback estimate, in
836
- * basis points. 10_000 = 100% (no extra). Default: 10_000.
837
- *
838
- * Pimlico's `eth_estimateUserOperationGas` already adds ~10-15% safety
839
- * margin internally, so a second SDK-side premium just pads padding
840
- * and over-charges users. We dropped the historical 12_000 (120%)
841
- * default after measuring `actualGasUsed / estimate ≈ 0.92` across
842
- * 100 dev mints.
846
+ * SDK-side premium in basis points. Default: 10_000 (100% = no extra
847
+ * padding). Pimlico's bundler pads ~10-15% internally, and PAFI
848
+ * sponsor-relayer applies its own premium (110%) before returning
849
+ * gasUnits, so adding more here would compound the over-charge that
850
+ * the v0.20 refactor was designed to remove. Override only when the
851
+ * caller's `bundlerClient` returns raw bundler values without a
852
+ * premium applied.
843
853
  */
844
854
  gasPremiumBps?: number;
845
855
  /**
846
856
  * Quote function — given an amount of native wei, return the
847
- * equivalent amount in the fee currency (typically PT raw units;
848
- * USDT 6-decimal for swap / perp deposit flows).
849
- *
850
- * Injected so the manager stays chain- and token-agnostic. Issuers
851
- * wire it to `@pafi-dev/core` Quoter helpers, a PAFI subgraph query,
852
- * or an oracle feed.
857
+ * equivalent amount in the fee currency (PT raw units for mint/burn,
858
+ * USDT/USDC 6-decimal for swap / perp deposit). Chain- and
859
+ * token-agnostic by design; wire to `createNativePtQuoter` for PT or
860
+ * `quoteOperatorFeeUsdt` for stables.
853
861
  */
854
862
  quoteNativeToFee: (amountNative: bigint) => Promise<bigint>;
855
863
  /**
856
- * Optional ERC-4337 bundler client. When set, `estimateGasFee({
857
- * partialUserOp, ... })` will call `eth_estimateUserOperationGas`
858
- * (cached) for per-UserOp accuracy. Omit to keep the legacy hardcoded
859
- * path.
864
+ * Optional bundler-driven gas-units estimator. When set,
865
+ * `estimateGasFee({ partialUserOp, scenario, contractAddress })` calls
866
+ * the estimator for per-UserOp accuracy. When unset, the legacy
867
+ * hardcoded path runs — backward-compatible with v0.16/0.19 callers.
860
868
  */
861
869
  bundlerClient?: BundlerEstimatorClient;
862
- /** Gas-units cache config see `GasUnitsCache`. */
863
- cache?: GasUnitsCacheConfig;
864
- /**
865
- * Fixed overhead added to bundler estimates to account for paymaster
866
- * verification + postOp gas, since we estimate WITHOUT paymaster
867
- * context (chicken-and-egg: paymaster data depends on gas limits).
868
- * Default: 80_000 — covers Pimlico singleton paymaster v0.7 postOp.
869
- */
870
- paymasterOverheadGas?: bigint;
871
- /** Optional observability hooks. */
870
+ /** Optional observability hooks. Throws inside hooks are swallowed. */
872
871
  metrics?: FeeManagerMetrics;
873
872
  }
874
873
  /**
875
- * Parameters for a single bundler-driven `estimateGasFee` call.
876
- *
877
- * All fields optional for backwards compat: when `partialUserOp` is
878
- * omitted, FeeManager falls back to the legacy `gasUnits × gasPrice`
879
- * path.
874
+ * Parameters for a single bundler-driven `estimateGasFee` call. All
875
+ * fields optional for backwards compatibility — when `partialUserOp` is
876
+ * absent the SDK falls back to the hardcoded path.
880
877
  */
881
878
  interface EstimateGasFeeOptions {
882
- /**
883
- * Partial UserOperation to simulate. The bundler runs the calldata in
884
- * a virtual EVM and returns gas limits. Pass `signature` as a 65-byte
885
- * dummy when the user hasn't signed yet.
886
- *
887
- * Estimate WITHOUT paymaster fields (paymaster/paymasterData omitted)
888
- * to avoid the chicken-and-egg with paymasterData generation —
889
- * `paymasterOverheadGas` is added afterwards.
890
- */
891
879
  partialUserOp?: {
892
880
  sender: Address;
893
881
  nonce: bigint;
894
882
  callData: Hex;
895
883
  signature?: Hex;
896
884
  };
897
- /**
898
- * Contract address being called — used for cache key (codehash
899
- * lookup). Typically the PointToken address for mint/burn.
900
- */
901
- contractAddress?: Address;
902
- /** Scenario label used in the cache key (e.g. 'mint', 'burn'). */
903
885
  scenario?: string;
904
- /**
905
- * Paymaster address used in the cache key. When omitted, '0x0' is
906
- * used — fine if a single paymaster is used across the deployment.
907
- */
886
+ contractAddress?: Address;
908
887
  paymasterAddress?: Address;
909
888
  }
910
889
  /**
911
- * Computes how much fee to collect from the user to cover the gas cost
912
- * of a sponsored UserOp.
890
+ * Computes the operator fee the issuer charges users for sponsored gas.
891
+ *
892
+ * Fee currency is whatever the injected `quoteNativeToFee` returns —
893
+ * PT for mint/burn, USDT/USDC for swap & perp deposit.
913
894
  *
914
- * The fee is expressed in the **fee currency** chosen by the caller
915
- * (PT for mint/burn, USDT for swap/perp_deposit) — not hardcoded.
895
+ * Two execution paths:
916
896
  *
917
- * Two paths:
918
- * 1. Legacy (no `bundlerClient`): gasUnits × gasPrice × premium
919
- * 2. Bundler (recommended): bundler.estimateUserOperationGas
920
- * sum gas limits × gasPrice × premium
897
+ * 1. **Estimator path** (recommended) — caller wires `bundlerClient`
898
+ * (typically `createPafiEstimatorClient`). Each call hits the PAFI
899
+ * sponsor-relayer's `/v1/estimate-gas-fee` which caches by
900
+ * `(scenario, contract codehash, paymaster)` and applies its own
901
+ * premium. Result is the most accurate fee available and matches
902
+ * what sponsor-relayer's verify path expects, eliminating
903
+ * `INSUFFICIENT_FEE` rejects from formula drift.
921
904
  *
922
- * The bundler path caches by `(scenario, contractCodehash, paymaster)`
923
- * for ~99% hit rate after warm-up; cache invalidates automatically on
924
- * SC upgrade via codehash change.
905
+ * 2. **Fallback path** — no bundler client OR estimator threw. Use
906
+ * hardcoded `gasUnits × premium`. Same shape as v0.16/0.19 so
907
+ * legacy integrations get identical behaviour.
925
908
  *
926
- * **No operator rebalancing.** The operator does not hold ETH directly;
927
- * gas is paid by PAFI sponsor-relayer via the paymaster-proxy. The fee
928
- * collected here is an application-level ERC-20 transfer inside the same
929
- * UserOp batch, not a reimbursement to a wallet that needs topping up.
909
+ * **No operator rebalancing**: the operator does NOT hold ETH; gas is
910
+ * paid by PAFI's Pimlico paymaster. The fee here is an
911
+ * application-level ERC-20 transfer in the same UserOp batch.
930
912
  */
931
913
  declare class FeeManager {
932
914
  private readonly provider;
933
- private readonly gasUnits;
915
+ private readonly fallbackGasUnits;
934
916
  private readonly gasPremiumBps;
935
917
  private readonly quoteNativeToFee;
936
918
  private readonly bundlerClient;
937
- private readonly cache;
938
- private readonly paymasterOverheadGas;
939
919
  private readonly metrics;
940
920
  private cachedFee;
941
921
  private cacheExpiresAt;
942
922
  private static readonly FEE_CACHE_TTL_MS;
943
923
  constructor(config: FeeManagerConfig);
944
924
  /**
945
- * Estimate the fee (in the caller's fee currency) to charge for the
946
- * next sponsored UserOp.
925
+ * Estimate the operator fee for the next sponsored UserOp.
947
926
  *
948
- * gasUnits = bundler-estimated (cached) or hardcoded fallback
949
- * nativeCost = gasUnits × gasPrice
950
- * withPremium = nativeCost × premiumBps / 10_000
951
- * fee = quoteNativeToFee(withPremium)
927
+ * Without `opts` → legacy path: `gasUnits × gasPrice × premium
928
+ * quoteNativeToFee`. Cached for 10 s to absorb bursts.
952
929
  *
953
- * When `opts.partialUserOp` is omitted, behaves exactly like v0.16.x:
954
- * uses the hardcoded `gasUnits` default.
930
+ * With `opts` AND `bundlerClient` estimator path. Each call may
931
+ * hit a different bundler-cached result; the SDK does NOT add its
932
+ * own value cache because the estimator's cache TTL is the source
933
+ * of truth for "how long is this estimate good for".
955
934
  */
956
935
  estimateGasFee(opts?: EstimateGasFeeOptions): Promise<bigint>;
957
- /**
958
- * Manually purge the per-scenario gas-units cache. Useful after an SC
959
- * upgrade when ops wants the next estimate to refresh immediately
960
- * (the codehash check would catch it on the NEXT call anyway, but
961
- * this forces it now).
962
- */
936
+ /** Manually purge the legacy 10s fee cache. */
963
937
  invalidateCache(): void;
964
938
  private resolveGasUnits;
965
939
  private safeEmit;
@@ -3682,4 +3656,4 @@ declare class MemoryRedemptionHistoryStore implements IRedemptionHistoryStore {
3682
3656
 
3683
3657
  declare const PAFI_ISSUER_SDK_VERSION: string;
3684
3658
 
3685
- export { AdapterMisconfiguredError, type ApiConfigResponse, type ApiGasFeeResponse, type ApiLoginRequest, type ApiLoginResponse, type ApiNonceResponse, type ApiPoolsRequest, type ApiPoolsResponse, type ApiRedemptionEvaluateRequest, type ApiRedemptionEvaluateResponse, type ApiRedemptionPreviewRequest, type ApiRedemptionPreviewResponse, type ApiUserRequest, type ApiUserResponse, type AuthContext, AuthError, type AuthErrorCode, AuthService, type AuthServiceConfig, type BundlerEstimatorClient, BundlerNotConfiguredError, BundlerRejectedError, type BurnEvent, BurnIndexer, type BurnIndexerConfig, type BurnStatusParams, type BurnStatusResponse, type ClaimDto, type ConfigDto, ConfigurationError, DEFAULT_REDEMPTION_POLICY, type DecodedCallDto, DefaultPolicyEngine, type DefaultPolicyEngineOptions, type DelegatePrepareDto, type DelegateStatusDto, type EstimateGasFeeOptions, type EvaluateInput, FeeManager, type FeeManagerConfig, type FeeManagerMetrics, type FetchFailureReason, type FetchResult, type GasFeeDto, type GasFeeSource, GasUnitsCache, type GasUnitsCacheConfig, type HandleDelegateSubmitParams, type HandleDelegateSubmitResult, type HandleMobilePrepareParams, type HandleMobilePrepareResult, type HandleMobileSubmitParams, type IIndexerCursorStore, type IPendingUserOpStore, type IPointLedger, type IPolicyEngine, type IRateLimiter, type IRedemptionHistoryStore, type ISessionStore, InMemoryCursorStore, IssuerApiAdapter, type IssuerApiAdapterConfig, IssuerApiHandlers, type IssuerApiHandlersConfig, type IssuerRegistryRecord, type IssuerService, type IssuerServiceConfig, IssuerStateError, IssuerStateValidator, LockNotFoundError, type LockedMintRequest, type LoginResult, MemoryPendingUserOpStore, MemoryRateLimiter, MemoryRedemptionHistoryStore, MemorySessionStore, type MemorySessionStoreOptions, type MintEvent, type MintStatusParams, type MintStatusResponse, type MintingStatus, type MobilePrepareDto, type MobileSubmitDto, type NativePtQuoterConfig, NonceManager, NoopRateLimiter, PAFI_ISSUER_SDK_VERSION, PTClaimError, PTClaimHandler, type PTClaimHandlerConfig, type PTClaimRequest, type PTClaimResponse, PTRedeemError, PTRedeemHandler, type PTRedeemHandlerConfig, type PTRedeemRequest, type PTRedeemResponse, PafiBackendClient, type PafiBackendConfig, PafiBackendError, type PafiBackendErrorCode, type PaymasterGasEstimates, type PendingCredit, type PendingUserOpEntry, PendingUserOpForbiddenError, PendingUserOpNotFoundError, type PerpDepositDto, PerpDepositError, PerpDepositHandler, type PerpDepositHandlerConfig, type PerpDepositRequest, type PerpDepositResponse, PointIndexer, type PointIndexerConfig, type PolicyDecision, type PolicyEvalRequest, PolicyProvider, type PolicyProviderConfig, type PoolsDto, type PoolsProvider, type PreValidateMintResult, type PrepareBurnParams, type PrepareMintParams, type PrepareMobileUserOpParams, type PrepareMobileUserOpResult, type PreparedUserOp, type PreviewBurnParams, type PreviewMintParams, REDEMPTION_HISTORY_WINDOW_SEC, type RateLimitAction, type RateLimiterConfig, type RedeemDto, type RedeemPrepareDto, RedemptionService, type RedemptionServiceConfig, RelayError, type RelayErrorCode, RelayService, type RelayUserOpParams, type RelayUserOpRequest, type RelayUserOpResponse, type RequestPaymasterParams, type ResolvedPolicy, type RetryConfig, type SdkErrorBody, type SdkErrorMapperFactories, type SdkErrorStatus, type SerializedUserOpTypedData, type Session, SettlementClient, type SettlementClientConfig, type SponsorshipRequest, type SponsorshipResponse, type SponsorshipTarget, type SponsorshipUserOp, type SubgraphNativeUsdtQuoterConfig, type SubgraphPoolsProviderConfig, type UserDto, type UserHistory, applyPaymasterGasEstimates, authenticateRequest, buildSdkErrorBody, createIssuerService, createNativePtQuoter, createSdkErrorMapper, createSubgraphNativeUsdtQuoter, createSubgraphPoolsProvider, defaultPolicyFor, evaluateRedemption, handleClaimStatus, handleDelegateSubmit, handleMobilePrepare, handleMobileSubmit, handleRedeemStatus, mergePaymasterFields, prepareMobileUserOp, relayUserOp, requestPaymaster, serializeEntryToJsonRpc, serializeUserOpTypedData };
3659
+ export { AdapterMisconfiguredError, type ApiConfigResponse, type ApiGasFeeResponse, type ApiLoginRequest, type ApiLoginResponse, type ApiNonceResponse, type ApiPoolsRequest, type ApiPoolsResponse, type ApiRedemptionEvaluateRequest, type ApiRedemptionEvaluateResponse, type ApiRedemptionPreviewRequest, type ApiRedemptionPreviewResponse, type ApiUserRequest, type ApiUserResponse, type AuthContext, AuthError, type AuthErrorCode, AuthService, type AuthServiceConfig, type BundlerEstimatorClient, BundlerNotConfiguredError, BundlerRejectedError, type BurnEvent, BurnIndexer, type BurnIndexerConfig, type BurnStatusParams, type BurnStatusResponse, type ClaimDto, type ConfigDto, ConfigurationError, DEFAULT_REDEMPTION_POLICY, type DecodedCallDto, DefaultPolicyEngine, type DefaultPolicyEngineOptions, type DelegatePrepareDto, type DelegateStatusDto, type EstimateGasFeeOptions, type EvaluateInput, FeeManager, type FeeManagerConfig, type FeeManagerMetrics, type FetchFailureReason, type FetchImpl, type FetchResult, type GasFeeDto, type GasFeeSource, type HandleDelegateSubmitParams, type HandleDelegateSubmitResult, type HandleMobilePrepareParams, type HandleMobilePrepareResult, type HandleMobileSubmitParams, type IIndexerCursorStore, type IPendingUserOpStore, type IPointLedger, type IPolicyEngine, type IRateLimiter, type IRedemptionHistoryStore, type ISessionStore, InMemoryCursorStore, IssuerApiAdapter, type IssuerApiAdapterConfig, IssuerApiHandlers, type IssuerApiHandlersConfig, type IssuerRegistryRecord, type IssuerService, type IssuerServiceConfig, IssuerStateError, IssuerStateValidator, LockNotFoundError, type LockedMintRequest, type LoginResult, MemoryPendingUserOpStore, MemoryRateLimiter, MemoryRedemptionHistoryStore, MemorySessionStore, type MemorySessionStoreOptions, type MintEvent, type MintStatusParams, type MintStatusResponse, type MintingStatus, type MobilePrepareDto, type MobileSubmitDto, type NativePtQuoterConfig, NonceManager, NoopRateLimiter, PAFI_ISSUER_SDK_VERSION, PTClaimError, PTClaimHandler, type PTClaimHandlerConfig, type PTClaimRequest, type PTClaimResponse, PTRedeemError, PTRedeemHandler, type PTRedeemHandlerConfig, type PTRedeemRequest, type PTRedeemResponse, PafiBackendClient, type PafiBackendConfig, PafiBackendError, type PafiBackendErrorCode, type PafiEstimatorClientConfig, PafiEstimatorHttpError, type PaymasterGasEstimates, type PendingCredit, type PendingUserOpEntry, PendingUserOpForbiddenError, PendingUserOpNotFoundError, type PerpDepositDto, PerpDepositError, PerpDepositHandler, type PerpDepositHandlerConfig, type PerpDepositRequest, type PerpDepositResponse, PointIndexer, type PointIndexerConfig, type PolicyDecision, type PolicyEvalRequest, PolicyProvider, type PolicyProviderConfig, type PoolsDto, type PoolsProvider, type PreValidateMintResult, type PrepareBurnParams, type PrepareMintParams, type PrepareMobileUserOpParams, type PrepareMobileUserOpResult, type PreparedUserOp, type PreviewBurnParams, type PreviewMintParams, REDEMPTION_HISTORY_WINDOW_SEC, type RateLimitAction, type RateLimiterConfig, type RedeemDto, type RedeemPrepareDto, RedemptionService, type RedemptionServiceConfig, RelayError, type RelayErrorCode, RelayService, type RelayUserOpParams, type RelayUserOpRequest, type RelayUserOpResponse, type RequestPaymasterParams, type ResolvedPolicy, type RetryConfig, type SdkErrorBody, type SdkErrorMapperFactories, type SdkErrorStatus, type SerializedUserOpTypedData, type Session, SettlementClient, type SettlementClientConfig, type SponsorshipRequest, type SponsorshipResponse, type SponsorshipTarget, type SponsorshipUserOp, type SubgraphNativeUsdtQuoterConfig, type SubgraphPoolsProviderConfig, type UserDto, type UserHistory, applyPaymasterGasEstimates, authenticateRequest, buildSdkErrorBody, createIssuerService, createNativePtQuoter, createPafiEstimatorClient, createSdkErrorMapper, createSubgraphNativeUsdtQuoter, createSubgraphPoolsProvider, defaultPolicyFor, evaluateRedemption, handleClaimStatus, handleDelegateSubmit, handleMobilePrepare, handleMobileSubmit, handleRedeemStatus, mergePaymasterFields, prepareMobileUserOp, relayUserOp, requestPaymaster, serializeEntryToJsonRpc, serializeUserOpTypedData };