@pafi-dev/issuer 0.5.37 → 0.5.39

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
@@ -2,6 +2,40 @@ import { Address, Hex, PublicClient, WalletClient } from 'viem';
2
2
  import { PointTokenDomainConfig, PartialUserOperation, BurnRequest, PoolKey, UserOpTypedData, decodeBatchExecuteCalls, BROKER_HASHES, Eip7702AuthorizationJsonRpc, ENTRY_POINT_V08 } from '@pafi-dev/core';
3
3
  export { PAFI_SUBGRAPH_URL } from '@pafi-dev/core';
4
4
 
5
+ /**
6
+ * Base class for every typed error the SDK throws across handlers,
7
+ * orchestrators, and helpers. The shape is intentionally minimal so
8
+ * issuer controllers can map all SDK errors through a single funnel
9
+ * (`createSdkErrorMapper`) without listing each subclass.
10
+ *
11
+ * Subclasses must declare `code` (machine-readable identifier the FE
12
+ * can branch on) and may override `safeToRetry` (transient failures
13
+ * the FE should auto-retry — e.g. cap freed up between requests).
14
+ *
15
+ * `details` is `unknown` so subclasses can attach structured context
16
+ * (offending value, on-chain state snapshot, etc.) without locking
17
+ * the base shape.
18
+ *
19
+ * `httpStatus` is the recommended HTTP status the issuer's HTTP layer
20
+ * should surface. Kept on the SDK side because the SDK already knows
21
+ * the right status (e.g. `IssuerStateError` is always 422); leaving it
22
+ * to issuer controllers means each one re-implements the same mapping.
23
+ */
24
+ type SdkErrorHttpStatus = "not_found" | "forbidden" | "unprocessable" | "service_unavailable";
25
+ declare abstract class PafiSdkError extends Error {
26
+ abstract readonly code: string;
27
+ /**
28
+ * `true` when the FE should consider a retry safe — typically because
29
+ * the failure is transient (`MINT_CAP_EXCEEDED` may free up,
30
+ * `RELAY_FEE_EXCEEDS_AMOUNT` may drop on next quote). Defaults to
31
+ * `false` — subclasses opt in per-code.
32
+ */
33
+ readonly safeToRetry: boolean;
34
+ readonly details?: unknown;
35
+ abstract readonly httpStatus: SdkErrorHttpStatus;
36
+ constructor(message: string);
37
+ }
38
+
5
39
  /**
6
40
  * Lifecycle of a minting request as tracked by the issuer's point ledger.
7
41
  *
@@ -1182,6 +1216,13 @@ interface PTRedeemHandlerConfig {
1182
1216
  * provisioning time. Typically HSM/KMS-backed in prod.
1183
1217
  */
1184
1218
  burnerSignerWallet: WalletClient;
1219
+ /**
1220
+ * Optional — when wired, used to estimate the PT gas-reimbursement
1221
+ * fee. The handler self-computes `feeAmount` + `feeRecipient` so the
1222
+ * caller doesn't repeat the boilerplate at each endpoint. Pass
1223
+ * `feeAmount` on `PTRedeemRequest` to override.
1224
+ */
1225
+ feeService?: FeeManager;
1185
1226
  /**
1186
1227
  * How long the pending credit stays reserved if the burn never lands.
1187
1228
  * Default: 15 min — long enough for a bundler submission + confirmation.
@@ -1204,11 +1245,19 @@ interface PTRedeemRequest {
1204
1245
  /** ERC-4337 account nonce for the user's EOA. */
1205
1246
  aaNonce: bigint;
1206
1247
  /**
1207
- * Optional PT fee transfer appended after the burn (sponsored path).
1208
- * User must hold `amount + feeAmount` PT. Both fields together or neither.
1248
+ * Optional override — explicit PT fee transfer appended after the
1249
+ * burn (sponsored path). When omitted, the handler auto-computes
1250
+ * via `feeService.estimateGasFee()` (if configured) and resolves
1251
+ * the recipient from `getContractAddresses(chainId).pafiFeeRecipient`.
1209
1252
  */
1210
1253
  feeAmount?: bigint;
1211
1254
  feeRecipient?: Address;
1255
+ /**
1256
+ * Optional — required only when the handler self-computes the
1257
+ * recipient. When the caller passes an explicit `feeRecipient`, this
1258
+ * is ignored.
1259
+ */
1260
+ chainId?: number;
1212
1261
  }
1213
1262
  interface PTRedeemResponse {
1214
1263
  /**
@@ -1220,6 +1269,12 @@ interface PTRedeemResponse {
1220
1269
  userOp: PartialUserOperation;
1221
1270
  /** = request.amount - feeAmount. What BurnIndexer credits off-chain on sponsored fire. */
1222
1271
  netCreditAmount: bigint;
1272
+ /**
1273
+ * Resolved fee — computed via `feeService.estimateGasFee()` when the
1274
+ * caller didn't override on the request, else echoed back from the
1275
+ * request override. Useful for the FE confirmation screen.
1276
+ */
1277
+ feeAmount: bigint;
1223
1278
  /**
1224
1279
  * Fallback path — UserOp with NO fee transfer. BurnRequest signed for
1225
1280
  * full `request.amount`. User pays gas in ETH directly. Present only
@@ -1240,14 +1295,17 @@ interface PTRedeemResponse {
1240
1295
  /** The BurnRequest deadline (unix seconds) — FE uses this to surface a countdown. */
1241
1296
  signatureDeadline: bigint;
1242
1297
  }
1243
- declare class PTRedeemError extends Error {
1244
- code: "UNAUTHORIZED" | "INVALID_AMOUNT" | "NONCE_READ_FAILED" | "NONCE_IN_FLIGHT" | "LEDGER_NOT_SUPPORTED" | "SIGNING_FAILED";
1245
- constructor(code: "UNAUTHORIZED" | "INVALID_AMOUNT" | "NONCE_READ_FAILED" | "NONCE_IN_FLIGHT" | "LEDGER_NOT_SUPPORTED" | "SIGNING_FAILED", message: string);
1298
+ type PTRedeemErrorCode = "UNAUTHORIZED" | "INVALID_AMOUNT" | "NONCE_READ_FAILED" | "NONCE_IN_FLIGHT" | "LEDGER_NOT_SUPPORTED" | "SIGNING_FAILED";
1299
+ declare class PTRedeemError extends PafiSdkError {
1300
+ readonly httpStatus: "unprocessable";
1301
+ readonly code: PTRedeemErrorCode;
1302
+ constructor(code: PTRedeemErrorCode, message: string);
1246
1303
  }
1247
1304
  declare class PTRedeemHandler {
1248
1305
  private readonly ledger;
1249
1306
  private readonly relayService;
1250
1307
  private readonly provider;
1308
+ private readonly feeService?;
1251
1309
  private readonly pointTokenAddress;
1252
1310
  private readonly batchExecutorAddress;
1253
1311
  private readonly chainId;
@@ -1489,7 +1547,7 @@ interface MintStatusParams {
1489
1547
  * `PointIndexer`'s amount-based race (multiple PENDING locks with
1490
1548
  * the same amount can be matched to the wrong tx_hash).
1491
1549
  */
1492
- pafiBackendClient?: PafiBackendClient;
1550
+ pafiBackendClient?: PafiBackendClient | null;
1493
1551
  /** Optional logger for "ledger update failed" warnings. */
1494
1552
  onWarning?: (msg: string) => void;
1495
1553
  }
@@ -1497,11 +1555,12 @@ interface BurnStatusParams {
1497
1555
  lockId: string;
1498
1556
  userAddress: Address;
1499
1557
  ledger: IPointLedger;
1500
- pafiBackendClient?: PafiBackendClient;
1558
+ pafiBackendClient?: PafiBackendClient | null;
1501
1559
  onWarning?: (msg: string) => void;
1502
1560
  }
1503
- declare class LockNotFoundError extends Error {
1561
+ declare class LockNotFoundError extends PafiSdkError {
1504
1562
  readonly code = "LOCK_NOT_FOUND";
1563
+ readonly httpStatus: "not_found";
1505
1564
  constructor();
1506
1565
  }
1507
1566
 
@@ -1756,8 +1815,25 @@ declare function prepareMobileUserOp(params: PrepareMobileUserOpParams): Promise
1756
1815
  * Issuer controllers shrink to ~30 LoC each — wire the handler that
1757
1816
  * produces `partialUserOp[+ fallback]`, hand off to these.
1758
1817
  */
1759
- declare class PendingUserOpNotFoundError extends Error {
1818
+ declare class PendingUserOpNotFoundError extends PafiSdkError {
1760
1819
  readonly code = "PENDING_USEROP_NOT_FOUND";
1820
+ readonly httpStatus: "not_found";
1821
+ constructor(lockId: string);
1822
+ }
1823
+ /**
1824
+ * Thrown when the authenticated user attempts to submit a pending
1825
+ * UserOp that belongs to a different sender. Map to 403.
1826
+ *
1827
+ * The pending-userop store is keyed by `lockId` (a UUID), but lockIds
1828
+ * are predictable by anyone who logs them — without this check, user A
1829
+ * could submit user B's UserOp once they leak/guess the lockId. The
1830
+ * UserOp signature itself recovers to user B (so on-chain it would
1831
+ * fail), but the issuer would still bind the bundler hash to user B's
1832
+ * lock and consume relay quota, enabling DoS / state pollution.
1833
+ */
1834
+ declare class PendingUserOpForbiddenError extends PafiSdkError {
1835
+ readonly code = "PENDING_USEROP_FORBIDDEN";
1836
+ readonly httpStatus: "forbidden";
1761
1837
  constructor(lockId: string);
1762
1838
  }
1763
1839
  interface HandleMobilePrepareParams {
@@ -1817,6 +1893,13 @@ interface HandleMobilePrepareResult extends PrepareMobileUserOpResult {
1817
1893
  declare function handleMobilePrepare(params: HandleMobilePrepareParams): Promise<HandleMobilePrepareResult>;
1818
1894
  interface HandleMobileSubmitParams {
1819
1895
  lockId: string;
1896
+ /**
1897
+ * Authenticated user EOA — extracted from the JWT / session by the
1898
+ * caller. Enforces ownership: the helper rejects with
1899
+ * `PendingUserOpForbiddenError` when `entry.sender !==
1900
+ * authenticatedAddress`.
1901
+ */
1902
+ authenticatedAddress: Address;
1820
1903
  /** User signature over `userOpHash` (or `userOpHashFallback`). */
1821
1904
  signature: Hex;
1822
1905
  /** Which variant the user actually signed. Defaults to `'sponsored'`. */
@@ -1840,6 +1923,8 @@ interface HandleMobileSubmitParams {
1840
1923
  * Throws:
1841
1924
  * - `PendingUserOpNotFoundError` — entry expired or already submitted.
1842
1925
  * Map to 404.
1926
+ * - `PendingUserOpForbiddenError` — `entry.sender` doesn't match the
1927
+ * authenticated user. Map to 403.
1843
1928
  * - `BundlerNotConfiguredError` — `pafiBackendClient` missing. Map to 503.
1844
1929
  * - `BundlerRejectedError` — bundler rejected the UserOp. Map to 422.
1845
1930
  */
@@ -1870,10 +1955,12 @@ interface IssuerStateValidatorLike {
1870
1955
  * own composer — gg56 uses a timestamp-key 2D nonce). Caller layers
1871
1956
  * paymaster sponsorship + sponsorAuth on top of the returned UserOps.
1872
1957
  */
1873
- declare class PTClaimError extends Error {
1874
- code: "INVALID_AMOUNT" | "VALIDATION_FAILED" | "BUILD_FAILED";
1875
- details?: Record<string, unknown> | undefined;
1876
- constructor(code: "INVALID_AMOUNT" | "VALIDATION_FAILED" | "BUILD_FAILED", message: string, details?: Record<string, unknown> | undefined);
1958
+ type PTClaimErrorCode = "INVALID_AMOUNT" | "VALIDATION_FAILED" | "BUILD_FAILED";
1959
+ declare class PTClaimError extends PafiSdkError {
1960
+ readonly httpStatus: "unprocessable";
1961
+ readonly code: PTClaimErrorCode;
1962
+ readonly details?: Record<string, unknown>;
1963
+ constructor(code: PTClaimErrorCode, message: string, details?: Record<string, unknown>);
1877
1964
  }
1878
1965
  interface PTClaimHandlerConfig {
1879
1966
  ledger: IPointLedger;
@@ -1953,9 +2040,11 @@ type DecodedCall$1 = ReturnType<typeof decodeBatchExecuteCalls>[number];
1953
2040
  * userOp. No off-chain ledger state is touched — swap is purely
1954
2041
  * on-chain.
1955
2042
  */
1956
- declare class SwapError extends Error {
1957
- code: "QUOTE_UNAVAILABLE" | "FEE_EXCEEDS_AMOUNT" | "INVALID_AMOUNT";
1958
- constructor(code: "QUOTE_UNAVAILABLE" | "FEE_EXCEEDS_AMOUNT" | "INVALID_AMOUNT", message: string);
2043
+ type SwapErrorCode = "QUOTE_UNAVAILABLE" | "FEE_EXCEEDS_AMOUNT" | "INVALID_AMOUNT";
2044
+ declare class SwapError extends PafiSdkError {
2045
+ readonly httpStatus: "unprocessable";
2046
+ readonly code: SwapErrorCode;
2047
+ constructor(code: SwapErrorCode, message: string);
1959
2048
  }
1960
2049
  interface SwapHandlerConfig {
1961
2050
  provider: PublicClient;
@@ -2024,9 +2113,12 @@ type DecodedCall = ReturnType<typeof decodeBatchExecuteCalls>[number];
2024
2113
  * USD-pricing during the inclusion window. If the actual fee at
2025
2114
  * execution exceeds maxFee the Relay reverts (`FeeExceedsMax`).
2026
2115
  */
2027
- declare class PerpDepositError extends Error {
2028
- code: "PERP_DEPOSIT_UNAVAILABLE" | "BROKER_NOT_WHITELISTED" | "RELAY_FEE_EXCEEDS_AMOUNT" | "FEE_EXCEEDS_AMOUNT" | "INVALID_AMOUNT";
2029
- constructor(code: "PERP_DEPOSIT_UNAVAILABLE" | "BROKER_NOT_WHITELISTED" | "RELAY_FEE_EXCEEDS_AMOUNT" | "FEE_EXCEEDS_AMOUNT" | "INVALID_AMOUNT", message: string);
2116
+ type PerpDepositErrorCode = "PERP_DEPOSIT_UNAVAILABLE" | "BROKER_NOT_WHITELISTED" | "RELAY_FEE_EXCEEDS_AMOUNT" | "FEE_EXCEEDS_AMOUNT" | "INVALID_AMOUNT";
2117
+ declare class PerpDepositError extends PafiSdkError {
2118
+ readonly httpStatus: "unprocessable";
2119
+ readonly code: PerpDepositErrorCode;
2120
+ readonly safeToRetry: boolean;
2121
+ constructor(code: PerpDepositErrorCode, message: string);
2030
2122
  }
2031
2123
  interface PerpDepositHandlerConfig {
2032
2124
  provider: PublicClient;
@@ -2156,6 +2248,62 @@ interface QuotePointTokenToUsdtResult {
2156
2248
  }
2157
2249
  declare function quotePointTokenToUsdt(params: QuotePointTokenToUsdtParams): Promise<QuotePointTokenToUsdtResult>;
2158
2250
 
2251
+ /**
2252
+ * Normalized HTTP status the issuer controller should surface for a
2253
+ * given SDK error. Mirrors `SdkErrorHttpStatus` on `PafiSdkError`.
2254
+ */
2255
+ type SdkErrorStatus = SdkErrorHttpStatus;
2256
+ /**
2257
+ * Structured body the issuer controller passes to its
2258
+ * framework-specific exception class. Mirrors the shape every PAFI
2259
+ * issuer surfaces over HTTP today.
2260
+ */
2261
+ interface SdkErrorBody {
2262
+ code: string;
2263
+ message: string;
2264
+ details?: unknown;
2265
+ safeToRetry: boolean;
2266
+ }
2267
+ /**
2268
+ * Per-status exception factories. The issuer's controller wires one
2269
+ * factory per status to its preferred framework's exception class
2270
+ * (NestJS `UnprocessableEntityException`, Fastify `httpErrors.badData`,
2271
+ * etc). The factory must return an Error — `createSdkErrorMapper`
2272
+ * uses `throw factory(body)`.
2273
+ */
2274
+ interface SdkErrorMapperFactories {
2275
+ notFound: (body: SdkErrorBody) => Error;
2276
+ forbidden: (body: SdkErrorBody) => Error;
2277
+ unprocessable: (body: SdkErrorBody) => Error;
2278
+ serviceUnavailable: (body: SdkErrorBody) => Error;
2279
+ }
2280
+ /**
2281
+ * Build a single error-mapping function that converts any `PafiSdkError`
2282
+ * into the issuer's framework-specific HTTP exception. Status, code,
2283
+ * `safeToRetry`, and `details` come straight off the error class —
2284
+ * the mapper is a dumb funnel, no per-error business logic.
2285
+ *
2286
+ * Any non-`PafiSdkError` is re-thrown unchanged so unexpected runtime
2287
+ * errors propagate to the framework's default 500 handler.
2288
+ *
2289
+ * Usage (NestJS):
2290
+ *
2291
+ * ```ts
2292
+ * const mapSdkError = createSdkErrorMapper({
2293
+ * notFound: (body) => new NotFoundException(body),
2294
+ * forbidden: (body) => new ForbiddenException(body),
2295
+ * unprocessable: (body) => new UnprocessableEntityException(body),
2296
+ * serviceUnavailable: (body) => new ServiceUnavailableException(body),
2297
+ * });
2298
+ *
2299
+ * try { ... } catch (err) { mapSdkError(err); }
2300
+ * ```
2301
+ *
2302
+ * Returns `never` so call sites in `try/catch` propagate the throw
2303
+ * without a redundant `throw` keyword.
2304
+ */
2305
+ declare function createSdkErrorMapper(factories: SdkErrorMapperFactories): (err: unknown) => never;
2306
+
2159
2307
  /**
2160
2308
  * Config for `createSubgraphPoolsProvider`.
2161
2309
  */
@@ -2379,12 +2527,14 @@ declare class BalanceAggregator {
2379
2527
  * here because the SDK is framework-agnostic; the consuming controller
2380
2528
  * wraps each one in its preferred exception class.
2381
2529
  */
2382
- declare class BundlerNotConfiguredError extends Error {
2530
+ declare class BundlerNotConfiguredError extends PafiSdkError {
2383
2531
  readonly code = "BUNDLER_NOT_CONFIGURED";
2532
+ readonly httpStatus: "service_unavailable";
2384
2533
  constructor();
2385
2534
  }
2386
- declare class BundlerRejectedError extends Error {
2535
+ declare class BundlerRejectedError extends PafiSdkError {
2387
2536
  readonly code = "BUNDLER_REJECTED";
2537
+ readonly httpStatus: "unprocessable";
2388
2538
  readonly cause: unknown;
2389
2539
  constructor(message: string, cause: unknown);
2390
2540
  }
@@ -2611,11 +2761,18 @@ interface PreValidateMintResult {
2611
2761
  /**
2612
2762
  * Thrown by `IssuerStateValidator.preValidateMint()`.
2613
2763
  * `code` maps 1:1 to the HTTP error the issuer API surfaces to clients.
2764
+ *
2765
+ * `MINT_CAP_EXCEEDED` is `safeToRetry: true` because the cap may free
2766
+ * up between requests as other mints expire or settle. The other two
2767
+ * codes are configuration-time states — the FE can't recover by retry.
2614
2768
  */
2615
- declare class IssuerStateError extends Error {
2616
- readonly code: "ISSUER_NOT_REGISTERED" | "ISSUER_INACTIVE" | "MINT_CAP_EXCEEDED";
2617
- readonly details?: Record<string, unknown> | undefined;
2618
- constructor(code: "ISSUER_NOT_REGISTERED" | "ISSUER_INACTIVE" | "MINT_CAP_EXCEEDED", message: string, details?: Record<string, unknown> | undefined);
2769
+ type IssuerStateErrorCode = "ISSUER_NOT_REGISTERED" | "ISSUER_INACTIVE" | "MINT_CAP_EXCEEDED";
2770
+ declare class IssuerStateError extends PafiSdkError {
2771
+ readonly httpStatus: "unprocessable";
2772
+ readonly code: IssuerStateErrorCode;
2773
+ readonly details?: Record<string, unknown>;
2774
+ readonly safeToRetry: boolean;
2775
+ constructor(code: IssuerStateErrorCode, message: string, details?: Record<string, unknown>);
2619
2776
  }
2620
2777
 
2621
2778
  /**
@@ -2680,4 +2837,4 @@ declare class IssuerStateValidator {
2680
2837
  /** SDK package version — bumped on every release */
2681
2838
  declare const PAFI_ISSUER_SDK_VERSION = "0.4.0";
2682
2839
 
2683
- export { type ApiClaimRequest, type ApiClaimResponse, type ApiConfigResponse, type ApiGasFeeResponse, type ApiLoginRequest, type ApiLoginResponse, type ApiNonceResponse, type ApiPoolsRequest, type ApiPoolsResponse, type ApiRedeemRequest, type ApiRedeemResponse, type ApiTopUpRequest, type ApiTopUpResponse, type ApiUserRequest, type ApiUserResponse, type AuthContext, AuthError, type AuthErrorCode, AuthService, type AuthServiceConfig, BalanceAggregator, type BalanceAggregatorConfig, BundlerNotConfiguredError, BundlerRejectedError, type BurnEvent, BurnIndexer, type BurnIndexerConfig, type BurnStatusParams, type BurnStatusResponse, type CombinedBalance, DefaultPolicyEngine, type DefaultPolicyEngineOptions, FeeManager, type FeeManagerConfig, type HandleDelegateSubmitParams, type HandleDelegateSubmitResult, type HandleMobilePrepareParams, type HandleMobilePrepareResult, type HandleMobileSubmitParams, type IIndexerCursorStore, type IPendingUserOpStore, type IPointLedger, type IPolicyEngine, type ISessionStore, InMemoryCursorStore, IssuerApiHandlers, type IssuerApiHandlersConfig, type IssuerRegistryRecord, type IssuerService, type IssuerServiceConfig, IssuerStateError, IssuerStateValidator, LockNotFoundError, type LockedMintRequest, type LoginResult, MemorySessionStore, type MemorySessionStoreOptions, type MintEvent, type MintStatusParams, type MintStatusResponse, type MintingStatus, type NativePtQuoterConfig, NonceManager, 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 PendingCredit, type PendingUserOpEntry, PendingUserOpNotFoundError, PerpDepositError, PerpDepositHandler, type PerpDepositHandlerConfig, type PerpDepositRequest, type PerpDepositResponse, PointIndexer, type PointIndexerConfig, type PolicyDecision, type PolicyEvalRequest, type PoolsProvider, type PreValidateMintResult, type PrepareBurnDirectParams, type PrepareBurnParams, type PrepareBurnWithSigParams, type PrepareMintParams, type PrepareMobileUserOpParams, type PrepareMobileUserOpResult, type PreparedUserOp, type QuotePointTokenToUsdtParams, type QuotePointTokenToUsdtResult, RelayError, type RelayErrorCode, RelayService, type RelayUserOpParams, type RelayUserOpRequest, type RelayUserOpResponse, type RequestPaymasterParams, type RetryConfig, type SerializedUserOpTypedData, type Session, type SponsorshipRequest, type SponsorshipResponse, type SponsorshipTarget, type SponsorshipUserOp, type SubgraphNativeUsdtQuoterConfig, type SubgraphPoolsProviderConfig, SwapError, SwapHandler, type SwapHandlerConfig, type SwapRequest, type SwapResponse, TopUpRedemptionError, TopUpRedemptionHandler, type TopUpRedemptionHandlerConfig, type TopUpRedemptionRequest, type TopUpRedemptionResponse, authenticateRequest, createIssuerService, createNativePtQuoter, createSubgraphNativeUsdtQuoter, createSubgraphPoolsProvider, handleClaimStatus, handleDelegateSubmit, handleMobilePrepare, handleMobileSubmit, handleRedeemStatus, mergePaymasterFields, prepareMobileUserOp, quotePointTokenToUsdt, relayUserOp, requestPaymaster, serializeEntryToJsonRpc, serializeUserOpTypedData };
2840
+ export { type ApiClaimRequest, type ApiClaimResponse, type ApiConfigResponse, type ApiGasFeeResponse, type ApiLoginRequest, type ApiLoginResponse, type ApiNonceResponse, type ApiPoolsRequest, type ApiPoolsResponse, type ApiRedeemRequest, type ApiRedeemResponse, type ApiTopUpRequest, type ApiTopUpResponse, type ApiUserRequest, type ApiUserResponse, type AuthContext, AuthError, type AuthErrorCode, AuthService, type AuthServiceConfig, BalanceAggregator, type BalanceAggregatorConfig, BundlerNotConfiguredError, BundlerRejectedError, type BurnEvent, BurnIndexer, type BurnIndexerConfig, type BurnStatusParams, type BurnStatusResponse, type CombinedBalance, DefaultPolicyEngine, type DefaultPolicyEngineOptions, FeeManager, type FeeManagerConfig, type HandleDelegateSubmitParams, type HandleDelegateSubmitResult, type HandleMobilePrepareParams, type HandleMobilePrepareResult, type HandleMobileSubmitParams, type IIndexerCursorStore, type IPendingUserOpStore, type IPointLedger, type IPolicyEngine, type ISessionStore, InMemoryCursorStore, IssuerApiHandlers, type IssuerApiHandlersConfig, type IssuerRegistryRecord, type IssuerService, type IssuerServiceConfig, IssuerStateError, IssuerStateValidator, LockNotFoundError, type LockedMintRequest, type LoginResult, MemorySessionStore, type MemorySessionStoreOptions, type MintEvent, type MintStatusParams, type MintStatusResponse, type MintingStatus, type NativePtQuoterConfig, NonceManager, 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, PafiSdkError, type PendingCredit, type PendingUserOpEntry, PendingUserOpForbiddenError, PendingUserOpNotFoundError, PerpDepositError, PerpDepositHandler, type PerpDepositHandlerConfig, type PerpDepositRequest, type PerpDepositResponse, PointIndexer, type PointIndexerConfig, type PolicyDecision, type PolicyEvalRequest, type PoolsProvider, type PreValidateMintResult, type PrepareBurnDirectParams, type PrepareBurnParams, type PrepareBurnWithSigParams, type PrepareMintParams, type PrepareMobileUserOpParams, type PrepareMobileUserOpResult, type PreparedUserOp, type QuotePointTokenToUsdtParams, type QuotePointTokenToUsdtResult, RelayError, type RelayErrorCode, RelayService, type RelayUserOpParams, type RelayUserOpRequest, type RelayUserOpResponse, type RequestPaymasterParams, type RetryConfig, type SdkErrorBody, type SdkErrorHttpStatus, type SdkErrorMapperFactories, type SdkErrorStatus, type SerializedUserOpTypedData, type Session, type SponsorshipRequest, type SponsorshipResponse, type SponsorshipTarget, type SponsorshipUserOp, type SubgraphNativeUsdtQuoterConfig, type SubgraphPoolsProviderConfig, SwapError, SwapHandler, type SwapHandlerConfig, type SwapRequest, type SwapResponse, TopUpRedemptionError, TopUpRedemptionHandler, type TopUpRedemptionHandlerConfig, type TopUpRedemptionRequest, type TopUpRedemptionResponse, authenticateRequest, createIssuerService, createNativePtQuoter, createSdkErrorMapper, createSubgraphNativeUsdtQuoter, createSubgraphPoolsProvider, handleClaimStatus, handleDelegateSubmit, handleMobilePrepare, handleMobileSubmit, handleRedeemStatus, mergePaymasterFields, prepareMobileUserOp, quotePointTokenToUsdt, relayUserOp, requestPaymaster, serializeEntryToJsonRpc, serializeUserOpTypedData };