@pafi-dev/issuer 0.39.3 → 0.40.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
@@ -1,4 +1,4 @@
1
- import { PafiSdkError, SdkErrorHttpStatus, PointTokenDomainConfig, PartialUserOperation, BurnRequest, PoolKey, RedemptionPolicy, RedemptionPolicySource, RedemptionPreview, RedemptionDecision, RedemptionDenialCode, UserOpTypedData, decodeBatchExecuteCalls, BROKER_HASHES, PafiErrorType, BuiltSponsorAuth, ENTRY_POINT_V08 } from '@pafi-dev/core';
1
+ import { PafiSdkError, SdkErrorHttpStatus, PointTokenDomainConfig, PartialUserOperation, BurnRequest, PoolKey, RedemptionPolicy, RedemptionPolicySource, RedemptionPreview, RedemptionDecision, RedemptionDenialCode, decodeKernelExecuteCalls, BROKER_HASHES, PafiErrorType, BuiltSponsorAuth, ENTRY_POINT_V08 } from '@pafi-dev/core';
2
2
  export { PAFI_SUBGRAPH_URL, PafiErrorType, PafiSdkError, SDK_ERROR_HTTP_STATUS_CODE, SdkErrorHttpStatus, ValidationError, defaultErrorTypeForStatus } from '@pafi-dev/core';
3
3
  export { GenericHttpExceptionDescriptor, NormalizeContext, PafiErrorEnvelope, PafiErrorPayload, buildErrorEnvelope, payloadFromGenericError, payloadFromHttpException, payloadFromPafiSdkError } from './http/index.cjs';
4
4
  import { Address, Hex, PublicClient, WalletClient } from 'viem';
@@ -1392,14 +1392,12 @@ interface ApiConfigResponse {
1392
1392
  usdt?: Address;
1393
1393
  /**
1394
1394
  * EIP-7702 delegation target — the single contract every user's
1395
- * EOA must delegate to before submitting sponsored UserOps. On
1396
- * Base mainnet this is Pimlico's `Simple7702Account` at
1397
- * `0xe6Cae83BdE06E4c305530e199D7217f42808555B` (swapped in
1398
- * 2026-04-27 to replace the earlier Coinbase Smart Wallet v2
1399
- * BatchExecutor, which had a SignatureWrapper incompatibility
1400
- * surfacing as AA23 0x3c10b94e during validateUserOp).
1395
+ * EOA delegates to (folded-in with the first sponsored UserOp).
1396
+ * On Base mainnet this is the ZeroDev Kernel v3.3 account impl
1397
+ * (`getContractAddresses(chainId).kernel`), replacing the earlier
1398
+ * Pimlico `Simple7702Account` BatchExecutor.
1401
1399
  */
1402
- batchExecutor?: Address;
1400
+ kernel?: Address;
1403
1401
  /**
1404
1402
  * Single global MintFeeWrapper that skims a fee on every
1405
1403
  * sig-gated mint and distributes across the configured recipients.
@@ -2408,33 +2406,6 @@ declare class MemoryPendingUserOpStore implements IPendingUserOpStore {
2408
2406
  delete(lockId: string): Promise<void>;
2409
2407
  }
2410
2408
 
2411
- /**
2412
- * Re-shape `UserOpTypedData` so all `bigint` fields become hex strings —
2413
- * required for JSON transport over HTTP. Mirrors the inverse of what
2414
- * `walletClient.signTypedData` accepts on the client (it auto-coerces hex
2415
- * strings back to bigints for `uint256` fields).
2416
- */
2417
- type SerializedUserOpTypedData = {
2418
- domain: UserOpTypedData["domain"];
2419
- types: UserOpTypedData["types"];
2420
- primaryType: UserOpTypedData["primaryType"];
2421
- message: {
2422
- sender: Address;
2423
- nonce: Hex;
2424
- initCode: Hex;
2425
- callData: Hex;
2426
- accountGasLimits: Hex;
2427
- preVerificationGas: Hex;
2428
- gasFees: Hex;
2429
- paymasterAndData: Hex;
2430
- };
2431
- };
2432
- /**
2433
- * Convert a `UserOpTypedData` payload into the JSON-safe wire form
2434
- * (bigint → hex string). The mobile client passes this directly to
2435
- * `eth_signTypedData_v4` / viem's `signTypedData`.
2436
- */
2437
- declare function serializeUserOpTypedData(td: UserOpTypedData): SerializedUserOpTypedData;
2438
2409
  /**
2439
2410
  * Merge Pimlico's paymaster-sponsorship response into a UserOp
2440
2411
  * skeleton, applying only fields that are actually defined.
@@ -2485,14 +2456,16 @@ interface PreparedUserOp {
2485
2456
  paymasterVerificationGasLimit?: bigint;
2486
2457
  paymasterPostOpGasLimit?: bigint;
2487
2458
  };
2488
- /** Hex-encoded EIP-712 digest. Equals `EntryPoint.getUserOpHash`. */
2459
+ /**
2460
+ * ERC-4337 v0.7 userOpHash (Kernel). Equals `EntryPoint.getUserOpHash`.
2461
+ * Mobile signs it via `personal_sign(userOpHash)` i.e.
2462
+ * `signMessage({ message: { raw: userOpHash } })`.
2463
+ */
2489
2464
  userOpHash: Hex;
2490
- /** Typed-data payload — pass directly to `eth_signTypedData_v4`. */
2491
- typedData: SerializedUserOpTypedData;
2492
2465
  }
2493
2466
  /**
2494
- * Atomic "merge paymaster fields + compute hash + build typed data"
2495
- * the only place the SDK should be doing all three operations.
2467
+ * Atomic "merge paymaster fields + compute hash" the only place the
2468
+ * SDK should be doing both operations.
2496
2469
  *
2497
2470
  * Why bundled into one call:
2498
2471
  *
@@ -2509,28 +2482,25 @@ interface PreparedUserOp {
2509
2482
  * Splitting "merge" and "hash" into two free functions invites
2510
2483
  * exactly this bug: each call site has to reinvent the merge logic,
2511
2484
  * and any drift between sites silently produces stale hashes.
2512
- * Returning all three pieces (`userOp`, `userOpHash`, `typedData`)
2513
- * from a single call makes "hash before merge" structurally
2514
- * impossible: there is no intermediate userOp to compute a stale
2515
- * hash over.
2485
+ * Returning both pieces (`userOp`, `userOpHash`) from a single call
2486
+ * makes "hash before merge" structurally impossible: there is no
2487
+ * intermediate userOp to compute a stale hash over.
2488
+ *
2489
+ * `computeUserOpHash` returns the ERC-4337 v0.7 userOpHash (Kernel);
2490
+ * mobile signs it via `personal_sign(userOpHash)` — no typed-data
2491
+ * envelope is produced anymore.
2516
2492
  *
2517
2493
  * Behaviour:
2518
2494
  * - When `paymasterFields` is undefined (paymaster declined / Path
2519
- * C self-pay), the result is just the hash + typed-data of the
2520
- * caller's `partialUserOp` — no fields are touched.
2495
+ * C self-pay), the result is just the hash of the caller's
2496
+ * `partialUserOp` — no fields are touched.
2521
2497
  * - When provided, only defined keys in `paymasterFields` overwrite
2522
2498
  * the matching fields. Original gas/fee estimates survive when
2523
2499
  * the paymaster did not re-estimate.
2524
2500
  *
2525
- * Replaces:
2526
- * - manual spread merges (e.g. previous `delegateHandler.ts`)
2527
- * - `mergePaymasterFields` + separate `computeUserOpHash` +
2528
- * `buildUserOpTypedData` triplets in any new call site.
2529
- *
2530
2501
  * Note: the original `mergePaymasterFields` and the raw
2531
- * `computeUserOpHash` / `buildUserOpTypedData` exports remain
2532
- * available — use this helper unless you have a specific reason to
2533
- * stage the operations.
2502
+ * `computeUserOpHash` exports remain available — use this helper
2503
+ * unless you have a specific reason to stage the operations.
2534
2504
  */
2535
2505
  declare function applyPaymasterGasEstimates(partialUserOp: PartialUserOperation & {
2536
2506
  maxFeePerGas: bigint;
@@ -2627,11 +2597,11 @@ interface PrepareMobileUserOpResult {
2627
2597
  * What this does, end-to-end:
2628
2598
  * 1. Merge Pimlico's paymaster sponsorship + re-quoted gas into the
2629
2599
  * caller's `partialUserOp` skeleton.
2630
- * 2. Compute the EIP-712 userOpHash + the typed-data payload (in
2631
- * JSON-safe form for HTTP transport).
2600
+ * 2. Compute the ERC-4337 v0.7 userOpHash (Kernel) mobile signs it
2601
+ * via `personal_sign(userOpHash)`.
2632
2602
  * 3. (Optional) Repeat for the `partialUserOpFallback` skeleton with
2633
- * no paymaster fields — produces a separate hash + typed-data so
2634
- * the client can re-sign if it falls back.
2603
+ * no paymaster fields — produces a separate hash so the client can
2604
+ * re-sign if it falls back.
2635
2605
  * 4. Persist a single store entry containing BOTH callData variants
2636
2606
  * keyed by lockId. `serializeEntryToJsonRpc` reads the `variant`
2637
2607
  * param at submit time.
@@ -2797,7 +2767,7 @@ declare function handleMobileSubmit(params: HandleMobileSubmitParams): Promise<{
2797
2767
  userOpHash: Hex;
2798
2768
  }>;
2799
2769
 
2800
- type DecodedCall$1 = ReturnType<typeof decodeBatchExecuteCalls>[number];
2770
+ type DecodedCall$1 = ReturnType<typeof decodeKernelExecuteCalls>[number];
2801
2771
 
2802
2772
  /**
2803
2773
  * Structural shape — accepts both the raw `IssuerStateValidator` from
@@ -2919,7 +2889,7 @@ declare class PTClaimHandler {
2919
2889
  handle(request: PTClaimRequest): Promise<PTClaimResponse>;
2920
2890
  }
2921
2891
 
2922
- type DecodedCall = ReturnType<typeof decodeBatchExecuteCalls>[number];
2892
+ type DecodedCall = ReturnType<typeof decodeKernelExecuteCalls>[number];
2923
2893
 
2924
2894
  /**
2925
2895
  * Orderly perp-deposit handler — builds the sponsored + fallback
@@ -2995,32 +2965,6 @@ declare class PerpDepositHandler {
2995
2965
  handle(request: PerpDepositRequest): Promise<PerpDepositResponse>;
2996
2966
  }
2997
2967
 
2998
- interface HandleDelegateSubmitParams {
2999
- lockId: string;
3000
- /** Authenticated user EOA — must match the entry's `sender`. */
3001
- authenticatedAddress: Address;
3002
- /** User signature over the persisted userOpHash. */
3003
- userOpSig: Hex;
3004
- store: IPendingUserOpStore;
3005
- pafiBackendClient?: PafiBackendClient | null;
3006
- /** Defaults to `ENTRY_POINT_V08`. */
3007
- entryPoint?: string;
3008
- }
3009
- interface HandleDelegateSubmitResult {
3010
- userOpHash: Hex;
3011
- }
3012
- /**
3013
- * Retrieve the persisted delegate UserOp, embed the user's signature,
3014
- * and submit to the bundler with the cached `eip7702Auth` field.
3015
- *
3016
- * Throws:
3017
- * - `PendingUserOpNotFoundError` — entry expired or already submitted (404)
3018
- * - `PendingUserOpForbiddenError` — sender mismatch (403)
3019
- * - `BundlerNotConfiguredError` — `pafiBackendClient` missing (503)
3020
- * - `BundlerRejectedError` — bundler rejected the UserOp (422)
3021
- */
3022
- declare function handleDelegateSubmit(params: HandleDelegateSubmitParams): Promise<HandleDelegateSubmitResult>;
3023
-
3024
2968
  /**
3025
2969
  * Normalized HTTP status the issuer controller should surface for a
3026
2970
  * given SDK error. Mirrors `SdkErrorHttpStatus` on `PafiSdkError`.
@@ -3127,7 +3071,7 @@ interface IssuerServiceConfig {
3127
3071
  pointTokenAddresses?: Address[];
3128
3072
  /**
3129
3073
  * Issuer-specific contract addresses merged into the `/config` response.
3130
- * PAFI-owned addresses (batchExecutor, usdt, issuerRegistry, mintingOracle,
3074
+ * PAFI-owned addresses (kernel, usdt, issuerRegistry, mintingOracle,
3131
3075
  * mintFeeWrapper, …) are auto-resolved from `getContractAddresses(chainId)`
3132
3076
  * and can be omitted. Only `pointToken` / `pointTokens` must be provided.
3133
3077
  */
@@ -3303,7 +3247,6 @@ declare function createIssuerService(config: IssuerServiceConfig): Promise<Issue
3303
3247
  * (bigint → string, etc.)
3304
3248
  * - Composing handler.handle() output with sponsorAuth + decoded calls
3305
3249
  * - Wiring handleMobilePrepare / handleMobileSubmit / handleClaimStatus
3306
- * - Building the EIP-7702 delegate UserOp + relay
3307
3250
  * - Quoting PT → USDT for the cashout preview
3308
3251
  *
3309
3252
  * What stays in the issuer controller:
@@ -3332,7 +3275,7 @@ interface IssuerApiAdapterConfig {
3332
3275
  perpHandler?: PerpDepositHandler | null;
3333
3276
  /** Pending UserOp store — required for mobile prepare/submit. */
3334
3277
  pendingUserOpStore: IPendingUserOpStore;
3335
- /** PAFI backend client — required for mobile submit + delegate submit + status fallback. */
3278
+ /** PAFI backend client — required for mobile submit + status fallback. */
3336
3279
  pafiBackendClient?: PafiBackendClient | null;
3337
3280
  /** Optional logger surface for non-fatal warnings. */
3338
3281
  onWarning?: (msg: string) => void;
@@ -3396,9 +3339,7 @@ interface PerpDepositDto {
3396
3339
  interface MobilePrepareDto {
3397
3340
  lockId: string;
3398
3341
  userOpHash: Hex;
3399
- typedData: SerializedUserOpTypedData;
3400
3342
  userOpHashFallback?: Hex;
3401
- typedDataFallback?: SerializedUserOpTypedData;
3402
3343
  feeAmount: string;
3403
3344
  signatureDeadline: string;
3404
3345
  expiresInSeconds: number;
@@ -3418,42 +3359,6 @@ interface RedeemPrepareDto extends MobilePrepareDto {
3418
3359
  interface MobileSubmitDto {
3419
3360
  userOpHash: Hex;
3420
3361
  }
3421
- interface DelegateStatusDto {
3422
- isDelegated: boolean;
3423
- batchExecutorAddress: Address;
3424
- /**
3425
- * EOA tx count fetched on-chain via `getTransactionCount(blockTag: 'pending')`.
3426
- * Mobile passes this VERBATIM into Privy `signAuthorization({ ..., nonce })` —
3427
- * MUST NOT hardcode `0` or fetch independently. For a fresh embedded wallet
3428
- * it will be `"0"`, but re-delegation or post-activity wallets will be > 0.
3429
- * Returned as decimal string (preserves bigint precision over JSON).
3430
- */
3431
- delegationNonce: string;
3432
- chainId: number;
3433
- }
3434
- interface DelegatePrepareDto {
3435
- /**
3436
- * v0.7.7 — refactored to mobile prepare/submit pattern. Mobile signs
3437
- * the EIP-7702 authorization LOCALLY (Privy `signAuthorization`),
3438
- * then signs `userOpHash` (or `typedData`) BEFORE submit. See
3439
- * `handleDelegatePrepare` for rationale.
3440
- *
3441
- * Pre-v0.7.7 callers expected `{ authorizationHash, delegationNonce,
3442
- * batchExecutorAddress, chainId }` — `delegationNonce` +
3443
- * `batchExecutorAddress` retained for back-compat so mobile can
3444
- * compute the authorization hash if needed; `authorizationHash`
3445
- * removed (mobile's Privy hook computes it locally).
3446
- */
3447
- lockId: string;
3448
- userOpHash: Hex;
3449
- typedData: SerializedUserOpTypedData;
3450
- expiresInSeconds: number;
3451
- isSponsored: boolean;
3452
- /** Echoed for mobile to recompute the authorization hash if desired. */
3453
- delegationNonce: string;
3454
- batchExecutorAddress: Address;
3455
- chainId: number;
3456
- }
3457
3362
  declare class AdapterMisconfiguredError extends Error {
3458
3363
  readonly code: "ADAPTER_MISCONFIGURED";
3459
3364
  constructor(message: string);
@@ -3540,34 +3445,6 @@ declare class IssuerApiAdapter {
3540
3445
  }): Promise<MobileSubmitDto>;
3541
3446
  claimStatus(authenticatedAddress: Address, lockId: string): Promise<MintStatusResponse>;
3542
3447
  redeemStatus(authenticatedAddress: Address, lockId: string): Promise<BurnStatusResponse>;
3543
- delegateStatus(authenticatedAddress: Address, chainId: number): Promise<DelegateStatusDto>;
3544
- /**
3545
- * Build the delegation-anchor UserOp + obtain paymaster sponsorship
3546
- * + persist as a pending entry. Mobile must:
3547
- *
3548
- * 1. Sign EIP-7702 authorization LOCALLY (Privy `signAuthorization`
3549
- * with `{contractAddress: batchExecutorAddress, chainId,
3550
- * nonce: delegationNonce}`) → 65-byte authSig hex.
3551
- * 2. POST `/delegate/prepare` with `{ chainId, delegationNonce,
3552
- * authSig }` → this method.
3553
- * 3. Sign returned `userOpHash` LOCALLY (`signTypedData(typedData)`).
3554
- * 4. POST `/delegate/submit` with `{ lockId, userOpSig }`.
3555
- *
3556
- * v0.7.7 — replaces single-shot delegateSubmit that tried to relay
3557
- * a UserOp with empty `signature: "0x"` (Simple7702Account's
3558
- * validateUserOp reverts `ECDSAInvalidSignatureLength` 0xfce698f7).
3559
- */
3560
- delegatePrepare(authenticatedAddress: Address, input: {
3561
- chainId: number;
3562
- delegationNonce: bigint;
3563
- authSig: Hex | string;
3564
- aaNonce: bigint;
3565
- }): Promise<DelegatePrepareDto>;
3566
- delegateSubmit(input: {
3567
- authenticatedAddress: Address;
3568
- lockId: string;
3569
- userOpSig: Hex;
3570
- }): Promise<MobileSubmitDto>;
3571
3448
  /**
3572
3449
  * Build + sign a SponsorAuth payload. Returns `undefined` when no
3573
3450
  * issuer id is configured, so the controller can skip the field.
@@ -4090,4 +3967,4 @@ declare class MemoryRedemptionHistoryStore implements IRedemptionHistoryStore {
4090
3967
 
4091
3968
  declare const PAFI_ISSUER_SDK_VERSION: string;
4092
3969
 
4093
- 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, BurnIndexerFinalizeError, 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, type ISingletonLock, 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, PointIndexerFinalizeError, PointTokenDomainResolver, type PointTokenDomainResolverConfig, type PolicyDecision, type PolicyEvalRequest, PolicyProvider, type PolicyProviderConfig, type PoolsDto, type PoolsProvider, type PostgresQueryRunner, 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 SingletonLockHandle, 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, makePostgresSingletonLock, mergePaymasterFields, prepareMobileUserOp, relayUserOp, requestPaymaster, serializeEntryToJsonRpc, serializeUserOpTypedData };
3970
+ 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, BurnIndexerFinalizeError, type BurnStatusParams, type BurnStatusResponse, type ClaimDto, type ConfigDto, ConfigurationError, DEFAULT_REDEMPTION_POLICY, type DecodedCallDto, DefaultPolicyEngine, type DefaultPolicyEngineOptions, type EstimateGasFeeOptions, type EvaluateInput, FeeManager, type FeeManagerConfig, type FeeManagerMetrics, type FetchFailureReason, type FetchImpl, type FetchResult, type GasFeeDto, type GasFeeSource, type HandleMobilePrepareParams, type HandleMobilePrepareResult, type HandleMobileSubmitParams, type IIndexerCursorStore, type IPendingUserOpStore, type IPointLedger, type IPolicyEngine, type IRateLimiter, type IRedemptionHistoryStore, type ISessionStore, type ISingletonLock, 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, PointIndexerFinalizeError, PointTokenDomainResolver, type PointTokenDomainResolverConfig, type PolicyDecision, type PolicyEvalRequest, PolicyProvider, type PolicyProviderConfig, type PoolsDto, type PoolsProvider, type PostgresQueryRunner, 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 Session, SettlementClient, type SettlementClientConfig, type SingletonLockHandle, 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, handleMobilePrepare, handleMobileSubmit, handleRedeemStatus, makePostgresSingletonLock, mergePaymasterFields, prepareMobileUserOp, relayUserOp, requestPaymaster, serializeEntryToJsonRpc };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { PafiSdkError, SdkErrorHttpStatus, PointTokenDomainConfig, PartialUserOperation, BurnRequest, PoolKey, RedemptionPolicy, RedemptionPolicySource, RedemptionPreview, RedemptionDecision, RedemptionDenialCode, UserOpTypedData, decodeBatchExecuteCalls, BROKER_HASHES, PafiErrorType, BuiltSponsorAuth, ENTRY_POINT_V08 } from '@pafi-dev/core';
1
+ import { PafiSdkError, SdkErrorHttpStatus, PointTokenDomainConfig, PartialUserOperation, BurnRequest, PoolKey, RedemptionPolicy, RedemptionPolicySource, RedemptionPreview, RedemptionDecision, RedemptionDenialCode, decodeKernelExecuteCalls, BROKER_HASHES, PafiErrorType, BuiltSponsorAuth, ENTRY_POINT_V08 } from '@pafi-dev/core';
2
2
  export { PAFI_SUBGRAPH_URL, PafiErrorType, PafiSdkError, SDK_ERROR_HTTP_STATUS_CODE, SdkErrorHttpStatus, ValidationError, defaultErrorTypeForStatus } from '@pafi-dev/core';
3
3
  export { GenericHttpExceptionDescriptor, NormalizeContext, PafiErrorEnvelope, PafiErrorPayload, buildErrorEnvelope, payloadFromGenericError, payloadFromHttpException, payloadFromPafiSdkError } from './http/index.js';
4
4
  import { Address, Hex, PublicClient, WalletClient } from 'viem';
@@ -1392,14 +1392,12 @@ interface ApiConfigResponse {
1392
1392
  usdt?: Address;
1393
1393
  /**
1394
1394
  * EIP-7702 delegation target — the single contract every user's
1395
- * EOA must delegate to before submitting sponsored UserOps. On
1396
- * Base mainnet this is Pimlico's `Simple7702Account` at
1397
- * `0xe6Cae83BdE06E4c305530e199D7217f42808555B` (swapped in
1398
- * 2026-04-27 to replace the earlier Coinbase Smart Wallet v2
1399
- * BatchExecutor, which had a SignatureWrapper incompatibility
1400
- * surfacing as AA23 0x3c10b94e during validateUserOp).
1395
+ * EOA delegates to (folded-in with the first sponsored UserOp).
1396
+ * On Base mainnet this is the ZeroDev Kernel v3.3 account impl
1397
+ * (`getContractAddresses(chainId).kernel`), replacing the earlier
1398
+ * Pimlico `Simple7702Account` BatchExecutor.
1401
1399
  */
1402
- batchExecutor?: Address;
1400
+ kernel?: Address;
1403
1401
  /**
1404
1402
  * Single global MintFeeWrapper that skims a fee on every
1405
1403
  * sig-gated mint and distributes across the configured recipients.
@@ -2408,33 +2406,6 @@ declare class MemoryPendingUserOpStore implements IPendingUserOpStore {
2408
2406
  delete(lockId: string): Promise<void>;
2409
2407
  }
2410
2408
 
2411
- /**
2412
- * Re-shape `UserOpTypedData` so all `bigint` fields become hex strings —
2413
- * required for JSON transport over HTTP. Mirrors the inverse of what
2414
- * `walletClient.signTypedData` accepts on the client (it auto-coerces hex
2415
- * strings back to bigints for `uint256` fields).
2416
- */
2417
- type SerializedUserOpTypedData = {
2418
- domain: UserOpTypedData["domain"];
2419
- types: UserOpTypedData["types"];
2420
- primaryType: UserOpTypedData["primaryType"];
2421
- message: {
2422
- sender: Address;
2423
- nonce: Hex;
2424
- initCode: Hex;
2425
- callData: Hex;
2426
- accountGasLimits: Hex;
2427
- preVerificationGas: Hex;
2428
- gasFees: Hex;
2429
- paymasterAndData: Hex;
2430
- };
2431
- };
2432
- /**
2433
- * Convert a `UserOpTypedData` payload into the JSON-safe wire form
2434
- * (bigint → hex string). The mobile client passes this directly to
2435
- * `eth_signTypedData_v4` / viem's `signTypedData`.
2436
- */
2437
- declare function serializeUserOpTypedData(td: UserOpTypedData): SerializedUserOpTypedData;
2438
2409
  /**
2439
2410
  * Merge Pimlico's paymaster-sponsorship response into a UserOp
2440
2411
  * skeleton, applying only fields that are actually defined.
@@ -2485,14 +2456,16 @@ interface PreparedUserOp {
2485
2456
  paymasterVerificationGasLimit?: bigint;
2486
2457
  paymasterPostOpGasLimit?: bigint;
2487
2458
  };
2488
- /** Hex-encoded EIP-712 digest. Equals `EntryPoint.getUserOpHash`. */
2459
+ /**
2460
+ * ERC-4337 v0.7 userOpHash (Kernel). Equals `EntryPoint.getUserOpHash`.
2461
+ * Mobile signs it via `personal_sign(userOpHash)` i.e.
2462
+ * `signMessage({ message: { raw: userOpHash } })`.
2463
+ */
2489
2464
  userOpHash: Hex;
2490
- /** Typed-data payload — pass directly to `eth_signTypedData_v4`. */
2491
- typedData: SerializedUserOpTypedData;
2492
2465
  }
2493
2466
  /**
2494
- * Atomic "merge paymaster fields + compute hash + build typed data"
2495
- * the only place the SDK should be doing all three operations.
2467
+ * Atomic "merge paymaster fields + compute hash" the only place the
2468
+ * SDK should be doing both operations.
2496
2469
  *
2497
2470
  * Why bundled into one call:
2498
2471
  *
@@ -2509,28 +2482,25 @@ interface PreparedUserOp {
2509
2482
  * Splitting "merge" and "hash" into two free functions invites
2510
2483
  * exactly this bug: each call site has to reinvent the merge logic,
2511
2484
  * and any drift between sites silently produces stale hashes.
2512
- * Returning all three pieces (`userOp`, `userOpHash`, `typedData`)
2513
- * from a single call makes "hash before merge" structurally
2514
- * impossible: there is no intermediate userOp to compute a stale
2515
- * hash over.
2485
+ * Returning both pieces (`userOp`, `userOpHash`) from a single call
2486
+ * makes "hash before merge" structurally impossible: there is no
2487
+ * intermediate userOp to compute a stale hash over.
2488
+ *
2489
+ * `computeUserOpHash` returns the ERC-4337 v0.7 userOpHash (Kernel);
2490
+ * mobile signs it via `personal_sign(userOpHash)` — no typed-data
2491
+ * envelope is produced anymore.
2516
2492
  *
2517
2493
  * Behaviour:
2518
2494
  * - When `paymasterFields` is undefined (paymaster declined / Path
2519
- * C self-pay), the result is just the hash + typed-data of the
2520
- * caller's `partialUserOp` — no fields are touched.
2495
+ * C self-pay), the result is just the hash of the caller's
2496
+ * `partialUserOp` — no fields are touched.
2521
2497
  * - When provided, only defined keys in `paymasterFields` overwrite
2522
2498
  * the matching fields. Original gas/fee estimates survive when
2523
2499
  * the paymaster did not re-estimate.
2524
2500
  *
2525
- * Replaces:
2526
- * - manual spread merges (e.g. previous `delegateHandler.ts`)
2527
- * - `mergePaymasterFields` + separate `computeUserOpHash` +
2528
- * `buildUserOpTypedData` triplets in any new call site.
2529
- *
2530
2501
  * Note: the original `mergePaymasterFields` and the raw
2531
- * `computeUserOpHash` / `buildUserOpTypedData` exports remain
2532
- * available — use this helper unless you have a specific reason to
2533
- * stage the operations.
2502
+ * `computeUserOpHash` exports remain available — use this helper
2503
+ * unless you have a specific reason to stage the operations.
2534
2504
  */
2535
2505
  declare function applyPaymasterGasEstimates(partialUserOp: PartialUserOperation & {
2536
2506
  maxFeePerGas: bigint;
@@ -2627,11 +2597,11 @@ interface PrepareMobileUserOpResult {
2627
2597
  * What this does, end-to-end:
2628
2598
  * 1. Merge Pimlico's paymaster sponsorship + re-quoted gas into the
2629
2599
  * caller's `partialUserOp` skeleton.
2630
- * 2. Compute the EIP-712 userOpHash + the typed-data payload (in
2631
- * JSON-safe form for HTTP transport).
2600
+ * 2. Compute the ERC-4337 v0.7 userOpHash (Kernel) mobile signs it
2601
+ * via `personal_sign(userOpHash)`.
2632
2602
  * 3. (Optional) Repeat for the `partialUserOpFallback` skeleton with
2633
- * no paymaster fields — produces a separate hash + typed-data so
2634
- * the client can re-sign if it falls back.
2603
+ * no paymaster fields — produces a separate hash so the client can
2604
+ * re-sign if it falls back.
2635
2605
  * 4. Persist a single store entry containing BOTH callData variants
2636
2606
  * keyed by lockId. `serializeEntryToJsonRpc` reads the `variant`
2637
2607
  * param at submit time.
@@ -2797,7 +2767,7 @@ declare function handleMobileSubmit(params: HandleMobileSubmitParams): Promise<{
2797
2767
  userOpHash: Hex;
2798
2768
  }>;
2799
2769
 
2800
- type DecodedCall$1 = ReturnType<typeof decodeBatchExecuteCalls>[number];
2770
+ type DecodedCall$1 = ReturnType<typeof decodeKernelExecuteCalls>[number];
2801
2771
 
2802
2772
  /**
2803
2773
  * Structural shape — accepts both the raw `IssuerStateValidator` from
@@ -2919,7 +2889,7 @@ declare class PTClaimHandler {
2919
2889
  handle(request: PTClaimRequest): Promise<PTClaimResponse>;
2920
2890
  }
2921
2891
 
2922
- type DecodedCall = ReturnType<typeof decodeBatchExecuteCalls>[number];
2892
+ type DecodedCall = ReturnType<typeof decodeKernelExecuteCalls>[number];
2923
2893
 
2924
2894
  /**
2925
2895
  * Orderly perp-deposit handler — builds the sponsored + fallback
@@ -2995,32 +2965,6 @@ declare class PerpDepositHandler {
2995
2965
  handle(request: PerpDepositRequest): Promise<PerpDepositResponse>;
2996
2966
  }
2997
2967
 
2998
- interface HandleDelegateSubmitParams {
2999
- lockId: string;
3000
- /** Authenticated user EOA — must match the entry's `sender`. */
3001
- authenticatedAddress: Address;
3002
- /** User signature over the persisted userOpHash. */
3003
- userOpSig: Hex;
3004
- store: IPendingUserOpStore;
3005
- pafiBackendClient?: PafiBackendClient | null;
3006
- /** Defaults to `ENTRY_POINT_V08`. */
3007
- entryPoint?: string;
3008
- }
3009
- interface HandleDelegateSubmitResult {
3010
- userOpHash: Hex;
3011
- }
3012
- /**
3013
- * Retrieve the persisted delegate UserOp, embed the user's signature,
3014
- * and submit to the bundler with the cached `eip7702Auth` field.
3015
- *
3016
- * Throws:
3017
- * - `PendingUserOpNotFoundError` — entry expired or already submitted (404)
3018
- * - `PendingUserOpForbiddenError` — sender mismatch (403)
3019
- * - `BundlerNotConfiguredError` — `pafiBackendClient` missing (503)
3020
- * - `BundlerRejectedError` — bundler rejected the UserOp (422)
3021
- */
3022
- declare function handleDelegateSubmit(params: HandleDelegateSubmitParams): Promise<HandleDelegateSubmitResult>;
3023
-
3024
2968
  /**
3025
2969
  * Normalized HTTP status the issuer controller should surface for a
3026
2970
  * given SDK error. Mirrors `SdkErrorHttpStatus` on `PafiSdkError`.
@@ -3127,7 +3071,7 @@ interface IssuerServiceConfig {
3127
3071
  pointTokenAddresses?: Address[];
3128
3072
  /**
3129
3073
  * Issuer-specific contract addresses merged into the `/config` response.
3130
- * PAFI-owned addresses (batchExecutor, usdt, issuerRegistry, mintingOracle,
3074
+ * PAFI-owned addresses (kernel, usdt, issuerRegistry, mintingOracle,
3131
3075
  * mintFeeWrapper, …) are auto-resolved from `getContractAddresses(chainId)`
3132
3076
  * and can be omitted. Only `pointToken` / `pointTokens` must be provided.
3133
3077
  */
@@ -3303,7 +3247,6 @@ declare function createIssuerService(config: IssuerServiceConfig): Promise<Issue
3303
3247
  * (bigint → string, etc.)
3304
3248
  * - Composing handler.handle() output with sponsorAuth + decoded calls
3305
3249
  * - Wiring handleMobilePrepare / handleMobileSubmit / handleClaimStatus
3306
- * - Building the EIP-7702 delegate UserOp + relay
3307
3250
  * - Quoting PT → USDT for the cashout preview
3308
3251
  *
3309
3252
  * What stays in the issuer controller:
@@ -3332,7 +3275,7 @@ interface IssuerApiAdapterConfig {
3332
3275
  perpHandler?: PerpDepositHandler | null;
3333
3276
  /** Pending UserOp store — required for mobile prepare/submit. */
3334
3277
  pendingUserOpStore: IPendingUserOpStore;
3335
- /** PAFI backend client — required for mobile submit + delegate submit + status fallback. */
3278
+ /** PAFI backend client — required for mobile submit + status fallback. */
3336
3279
  pafiBackendClient?: PafiBackendClient | null;
3337
3280
  /** Optional logger surface for non-fatal warnings. */
3338
3281
  onWarning?: (msg: string) => void;
@@ -3396,9 +3339,7 @@ interface PerpDepositDto {
3396
3339
  interface MobilePrepareDto {
3397
3340
  lockId: string;
3398
3341
  userOpHash: Hex;
3399
- typedData: SerializedUserOpTypedData;
3400
3342
  userOpHashFallback?: Hex;
3401
- typedDataFallback?: SerializedUserOpTypedData;
3402
3343
  feeAmount: string;
3403
3344
  signatureDeadline: string;
3404
3345
  expiresInSeconds: number;
@@ -3418,42 +3359,6 @@ interface RedeemPrepareDto extends MobilePrepareDto {
3418
3359
  interface MobileSubmitDto {
3419
3360
  userOpHash: Hex;
3420
3361
  }
3421
- interface DelegateStatusDto {
3422
- isDelegated: boolean;
3423
- batchExecutorAddress: Address;
3424
- /**
3425
- * EOA tx count fetched on-chain via `getTransactionCount(blockTag: 'pending')`.
3426
- * Mobile passes this VERBATIM into Privy `signAuthorization({ ..., nonce })` —
3427
- * MUST NOT hardcode `0` or fetch independently. For a fresh embedded wallet
3428
- * it will be `"0"`, but re-delegation or post-activity wallets will be > 0.
3429
- * Returned as decimal string (preserves bigint precision over JSON).
3430
- */
3431
- delegationNonce: string;
3432
- chainId: number;
3433
- }
3434
- interface DelegatePrepareDto {
3435
- /**
3436
- * v0.7.7 — refactored to mobile prepare/submit pattern. Mobile signs
3437
- * the EIP-7702 authorization LOCALLY (Privy `signAuthorization`),
3438
- * then signs `userOpHash` (or `typedData`) BEFORE submit. See
3439
- * `handleDelegatePrepare` for rationale.
3440
- *
3441
- * Pre-v0.7.7 callers expected `{ authorizationHash, delegationNonce,
3442
- * batchExecutorAddress, chainId }` — `delegationNonce` +
3443
- * `batchExecutorAddress` retained for back-compat so mobile can
3444
- * compute the authorization hash if needed; `authorizationHash`
3445
- * removed (mobile's Privy hook computes it locally).
3446
- */
3447
- lockId: string;
3448
- userOpHash: Hex;
3449
- typedData: SerializedUserOpTypedData;
3450
- expiresInSeconds: number;
3451
- isSponsored: boolean;
3452
- /** Echoed for mobile to recompute the authorization hash if desired. */
3453
- delegationNonce: string;
3454
- batchExecutorAddress: Address;
3455
- chainId: number;
3456
- }
3457
3362
  declare class AdapterMisconfiguredError extends Error {
3458
3363
  readonly code: "ADAPTER_MISCONFIGURED";
3459
3364
  constructor(message: string);
@@ -3540,34 +3445,6 @@ declare class IssuerApiAdapter {
3540
3445
  }): Promise<MobileSubmitDto>;
3541
3446
  claimStatus(authenticatedAddress: Address, lockId: string): Promise<MintStatusResponse>;
3542
3447
  redeemStatus(authenticatedAddress: Address, lockId: string): Promise<BurnStatusResponse>;
3543
- delegateStatus(authenticatedAddress: Address, chainId: number): Promise<DelegateStatusDto>;
3544
- /**
3545
- * Build the delegation-anchor UserOp + obtain paymaster sponsorship
3546
- * + persist as a pending entry. Mobile must:
3547
- *
3548
- * 1. Sign EIP-7702 authorization LOCALLY (Privy `signAuthorization`
3549
- * with `{contractAddress: batchExecutorAddress, chainId,
3550
- * nonce: delegationNonce}`) → 65-byte authSig hex.
3551
- * 2. POST `/delegate/prepare` with `{ chainId, delegationNonce,
3552
- * authSig }` → this method.
3553
- * 3. Sign returned `userOpHash` LOCALLY (`signTypedData(typedData)`).
3554
- * 4. POST `/delegate/submit` with `{ lockId, userOpSig }`.
3555
- *
3556
- * v0.7.7 — replaces single-shot delegateSubmit that tried to relay
3557
- * a UserOp with empty `signature: "0x"` (Simple7702Account's
3558
- * validateUserOp reverts `ECDSAInvalidSignatureLength` 0xfce698f7).
3559
- */
3560
- delegatePrepare(authenticatedAddress: Address, input: {
3561
- chainId: number;
3562
- delegationNonce: bigint;
3563
- authSig: Hex | string;
3564
- aaNonce: bigint;
3565
- }): Promise<DelegatePrepareDto>;
3566
- delegateSubmit(input: {
3567
- authenticatedAddress: Address;
3568
- lockId: string;
3569
- userOpSig: Hex;
3570
- }): Promise<MobileSubmitDto>;
3571
3448
  /**
3572
3449
  * Build + sign a SponsorAuth payload. Returns `undefined` when no
3573
3450
  * issuer id is configured, so the controller can skip the field.
@@ -4090,4 +3967,4 @@ declare class MemoryRedemptionHistoryStore implements IRedemptionHistoryStore {
4090
3967
 
4091
3968
  declare const PAFI_ISSUER_SDK_VERSION: string;
4092
3969
 
4093
- 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, BurnIndexerFinalizeError, 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, type ISingletonLock, 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, PointIndexerFinalizeError, PointTokenDomainResolver, type PointTokenDomainResolverConfig, type PolicyDecision, type PolicyEvalRequest, PolicyProvider, type PolicyProviderConfig, type PoolsDto, type PoolsProvider, type PostgresQueryRunner, 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 SingletonLockHandle, 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, makePostgresSingletonLock, mergePaymasterFields, prepareMobileUserOp, relayUserOp, requestPaymaster, serializeEntryToJsonRpc, serializeUserOpTypedData };
3970
+ 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, BurnIndexerFinalizeError, type BurnStatusParams, type BurnStatusResponse, type ClaimDto, type ConfigDto, ConfigurationError, DEFAULT_REDEMPTION_POLICY, type DecodedCallDto, DefaultPolicyEngine, type DefaultPolicyEngineOptions, type EstimateGasFeeOptions, type EvaluateInput, FeeManager, type FeeManagerConfig, type FeeManagerMetrics, type FetchFailureReason, type FetchImpl, type FetchResult, type GasFeeDto, type GasFeeSource, type HandleMobilePrepareParams, type HandleMobilePrepareResult, type HandleMobileSubmitParams, type IIndexerCursorStore, type IPendingUserOpStore, type IPointLedger, type IPolicyEngine, type IRateLimiter, type IRedemptionHistoryStore, type ISessionStore, type ISingletonLock, 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, PointIndexerFinalizeError, PointTokenDomainResolver, type PointTokenDomainResolverConfig, type PolicyDecision, type PolicyEvalRequest, PolicyProvider, type PolicyProviderConfig, type PoolsDto, type PoolsProvider, type PostgresQueryRunner, 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 Session, SettlementClient, type SettlementClientConfig, type SingletonLockHandle, 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, handleMobilePrepare, handleMobileSubmit, handleRedeemStatus, makePostgresSingletonLock, mergePaymasterFields, prepareMobileUserOp, relayUserOp, requestPaymaster, serializeEntryToJsonRpc };