@zkp2p/sdk 0.9.0 → 0.10.0-rc.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.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as ReferrerFeeConfig, S as SellerCredentialBundle, D as DepositWithRelations, I as IntentEntity, a as IdentityAttestationRequestBody, A as AttestationServiceIdentityResponse, B as BuyerTeeVerifyPaymentBody, b as AttestationServiceSellerVerifyResponse, c as SellerCredentialUploadInput, d as SellerCredentialUploadPlatform, e as SellerCredentialAttestationRuntime, f as AttestationServiceSellerCredentialUploadResponse, g as BuyerTeeSessionMaterialEncryptionInput, U as UploadSellerCredentialBundleParams, C as CuratorSellerCredentialUploadResponse, h as CreateReferralCodeRequest, i as ApiAdapterOptions, j as CreateReferralCodeResponse, k as ReferralReadRequest, l as ReferralDashboardResponse, m as ReferralEarningsResponse, n as ReferralCodeLookupResponse, o as RedeemReferralCodeRequest, p as RedeemReferralCodeResponse, q as UpdateReferralCodeRequest, r as UpdateReferralCodeResponse, G as GoogleOAuthSellerCredentialPlatform, s as GoogleOAuthSellerCredentialUploadBodyByPlatform, Q as QuotesBestByPlatformRequest, t as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, u as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, v as PostDepositDetailsResponse, w as GetPayeeDetailsRequest, x as GetPayeeDetailsResponse, y as GetOwnerDepositsRequest, z as GetOwnerDepositsResponse, E as GetTakerTierRequest, F as GetTakerTierResponse, H as GetDepositBundleParams, J as GetDepositBundleResponse, K as GetOrderbookParams, L as GetOrderbookResponse, M as GetOrderbookTableResponse, N as CurrencyType, T as TakerTierLevel, O as PaymentMethodCatalog, W as TxOverrides } from './vaultUtils-aJdIIILM.mjs';
2
- export { a8 as ActionCallback, aD as ApiDeposit, aK as ApiIntentStatus, bj as AttestationServiceSellerCredentialProbeResponse, a6 as AuthorizationTokenProvider, c_ as BatchResult, aj as BestByPlatformResponseObject, bk as BuyerTeePaymentParams, bl as BuyerTeePaymentProofInput, bm as BuyerTeeSessionMaterial, a3 as CancelIntentMethodParams, ai as CancelIntentParams, b1 as CashAppCredentialUploadInput, aV as CashAppSessionMaterial, ac as CreateDepositConversionRate, ab as CreateDepositParams, bn as CuratorSellerCredentialStatusResponse, bo as CuratorSellerVerifyResponse, ct as Currency, cA as CurrencyData, cZ as DelegationDepositTarget, cX as DelegationRoute, cY as DelegationState, cL as Deposit, cN as DepositCurrency, bI as DepositIntentStatistics, aG as DepositStatus, aE as DepositVerifier, aF as DepositVerifierCurrency, bF as DepositVerifierData, cK as DepositView, az as FiatResponse, bi as FulfillIntentAttestationResponse, a2 as FulfillIntentMethodParams, ag as FulfillIntentParams, ak as GetBestByPlatformResponse, al as GetBestByPlatformResponseObject, aH as GetDepositByIdRequest, aI as GetDepositByIdResponse, aP as GetIntentByHashRequest, aQ as GetIntentByHashResponse, aN as GetIntentsByDepositRequest, aO as GetIntentsByDepositResponse, ap as GetNearbyQuote, aq as GetNearbySuggestions, aL as GetOwnerIntentsRequest, aM as GetOwnerIntentsResponse, am as GetPlatformQuote, ar as GetQuoteResponse, as as GetQuoteResponseObject, at as GetQuoteSingleResponse, bt as GetSellerCredentialStatusParams, by as IdentityAttestationActionType, bz as IdentityAttestationOutput, bA as IdentityAttestationOutputFor, bB as IdentityAttestationParams, bR as IndexerClient, cn as IndexerDeploymentEnv, bX as IndexerDeposit, cc as IndexerDepositDailySnapshot, ce as IndexerDepositFilter, cb as IndexerDepositFundActivity, cd as IndexerDepositFundActivityType, ch as IndexerDepositOrderDirection, cg as IndexerDepositOrderField, cf as IndexerDepositPagination, b_ as IndexerDepositPaymentMethod, bT as IndexerDepositService, cq as IndexerFulfillmentAndPaymentResponse, co as IndexerFulfillmentRecord, bY as IndexerIntentFulfilled, bZ as IndexerIntentFulfillmentAmounts, c0 as IndexerIntentStatus, c4 as IndexerManagerAggregateStats, c6 as IndexerManagerDailySnapshot, c5 as IndexerManagerStats, c9 as IndexerManualRateUpdate, b$ as IndexerMethodCurrency, ca as IndexerOracleConfigUpdate, cp as IndexerPaymentVerifiedRecord, c1 as IndexerRateManager, c3 as IndexerRateManagerDelegation, ck as IndexerRateManagerDelegationPagination, c8 as IndexerRateManagerDetail, ci as IndexerRateManagerFilter, c7 as IndexerRateManagerListItem, cm as IndexerRateManagerOrderDirection, cl as IndexerRateManagerOrderField, cj as IndexerRateManagerPagination, c2 as IndexerRateManagerRate, bU as IndexerRateManagerService, aJ as Intent, cP as IntentView, bC as MakerIdentityAttestationRequestBody, bD as MakerIdentityPlatform, aB as NearbyQuote, aC as NearbySuggestions, Z as OfframpClient, bE as OnchainCurrency, cQ as OnchainIntent, bH as OrderStats, bP as OrderbookEntry, bQ as OrderbookTableRow, cr as PAYMENT_PLATFORMS, a_ as PayPalGoogleOAuthSellerCredentialUploadBody, cM as PaymentMethodData, cs as PaymentPlatformType, bN as PlatformLimit, an as PlatformQuote, bO as PlatformRiskLevel, bG as PreparedTransaction, ay as QuoteFeesResponse, ax as QuoteIntentResponse, ao as QuoteRequest, au as QuoteResponse, av as QuoteResponseObject, aw as QuoteSingleResponse, ad as Range, $ as RedeemReferralCodeSignatureOptions, X as ReferralBearerWriteOptions, cO as ReferralFee, Y as ReferralReadOptions, a9 as ReferralRedemption, aa as ReferralSignatureBody, _ as ReferralSignatureOptions, aR as RegisterPayeeDetailsRequest, aS as RegisterPayeeDetailsResponse, bp as RegisteredSellerCredentialPlatform, br as RegisteredUploadSellerCredentialParams, ah as ReleaseFundsToPayerParams, cF as RuntimeEnv, bg as SellerAttestationOutput, b4 as SellerCiphertextBundle, b9 as SellerCredentialBundleUpload, bh as SellerCredentialProbeResponse, bb as SellerCredentialStatus, ba as SellerCredentialStatusValue, b3 as SellerCredentialUploadInputByPlatform, bf as SellerPaymentTypedDataValue, aT as SellerPlatform, b8 as SellerProbeInput, b5 as SellerSignedCiphertextBundle, bd as SellerTypedDataField, be as SellerTypedDataSpec, b7 as SellerVerifyInput, b6 as SellerVerifyIntentDetails, bc as SellerVerifyProxyBody, d0 as SendBatchFn, c$ as SendTransactionFn, a1 as SignalIntentMethodParams, af as SignalIntentParams, a0 as SignalIntentReferralFee, bJ as TakerTier, bM as TakerTierSource, bL as TakerTierStats, bK as TakerTierVolumeBreakdown, a7 as TimeoutConfig, aA as TokenResponse, a4 as UpdateReferralCodeSignatureOptions, bw as UploadGoogleOAuthSellerCredentialParams, bu as UploadPayPalGoogleOAuthSellerCredentialParams, bs as UploadSellerCredentialOptions, bq as UploadSellerCredentialParams, bv as UploadVenmoGoogleOAuthSellerCredentialParams, b0 as VenmoCredentialUploadInput, a$ as VenmoGoogleOAuthSellerCredentialUploadBody, aU as VenmoSessionMaterial, bx as VerifySellerPaymentParams, b2 as WiseCredentialUploadInput, aX as WiseProfileInfo, aZ as WiseProfileNotFound, aY as WiseProfileSelectionRequired, aW as WiseSessionMaterial, ae as WithdrawDepositParams, cR as ZERO_RATE_MANAGER_ID, Z as Zkp2pClient, a5 as Zkp2pClientOptions, cW as classifyDelegationState, bV as compareEventCursorIdsByRecency, cu as currencyInfo, bS as defaultIndexerEndpoint, cI as enrichPvDepositView, cJ as enrichPvIntentView, bW as fetchIndexerFulfillmentAndPayment, cB as getContracts, cx as getCurrencyCodeFromHash, cw as getCurrencyInfoFromCountryCode, cv as getCurrencyInfoFromHash, cV as getDelegationRoute, cE as getGatingServiceAddress, cD as getPaymentMethodsCatalog, cC as getRateManagerContracts, cy as isSupportedCurrencyHash, cS as isZeroRateManagerId, cz as mapConversionRatesToOnchainMinRate, cT as normalizeRateManagerId, cU as normalizeRegistry, cG as parseDepositView, cH as parseIntentView } from './vaultUtils-aJdIIILM.mjs';
1
+ import { R as ReferrerFeeConfig, S as SellerCredentialBundle, D as DepositWithRelations, I as IntentEntity, a as IdentityAttestationRequestBody, A as AttestationServiceIdentityResponse, B as BuyerTeeVerifyPaymentBody, b as AttestationServiceSellerVerifyResponse, c as SellerCredentialUploadInput, d as SellerCredentialUploadPlatform, e as SellerCredentialAttestationRuntime, f as AttestationServiceSellerCredentialUploadResponse, g as BuyerTeeSessionMaterialEncryptionInput, U as UploadSellerCredentialBundleParams, C as CuratorSellerCredentialUploadResponse, h as CreateReferralCodeRequest, i as ApiAdapterOptions, j as CreateReferralCodeResponse, k as ReferralReadRequest, l as ReferralDashboardResponse, m as ReferralEarningsResponse, n as ReferralCodeLookupResponse, o as RedeemReferralCodeRequest, p as RedeemReferralCodeResponse, q as UpdateReferralCodeRequest, r as UpdateReferralCodeResponse, G as GoogleOAuthSellerCredentialPlatform, s as GoogleOAuthSellerCredentialUploadBodyByPlatform, Q as QuotesBestByPlatformRequest, t as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, u as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, v as PostDepositDetailsResponse, w as GetPayeeDetailsRequest, x as GetPayeeDetailsResponse, y as GetOwnerDepositsRequest, z as GetOwnerDepositsResponse, E as GetTakerStakeRequest, F as GetTakerStakeResponse, H as GetTakerCapacityRequest, J as GetTakerCapacityResponse, K as GetDepositBundleParams, L as GetDepositBundleResponse, M as GetOrderbookParams, N as GetOrderbookResponse, O as GetOrderbookTableResponse, T as CurrencyType, W as PaymentMethodCatalog, X as TxOverrides } from './vaultUtils-DtkWNsxi.mjs';
2
+ export { ae as ActionCallback, aJ as ApiDeposit, aQ as ApiIntentStatus, bp as AttestationServiceSellerCredentialProbeResponse, ac as AuthorizationTokenProvider, dn as BatchResult, ap as BestByPlatformResponseObject, c1 as BondedTakingCapacity, bq as BuyerTeePaymentParams, br as BuyerTeePaymentProofInput, bs as BuyerTeeSessionMaterial, a4 as CancelIntentMethodParams, ao as CancelIntentParams, b_ as CapacityWarning, bY as CapacityWarningCode, bZ as CapacityWarningSeverity, b7 as CashAppCredentialUploadInput, a$ as CashAppSessionMaterial, c4 as ChargebackCoverageStatus, ai as CreateDepositConversionRate, ah as CreateDepositParams, bt as CuratorSellerCredentialStatusResponse, bu as CuratorSellerVerifyResponse, cP as Currency, cW as CurrencyData, b$ as CurveTakingCapacity, dm as DelegationDepositTarget, dk as DelegationRoute, dl as DelegationState, d8 as Deposit, da as DepositCurrency, bO as DepositIntentStatistics, aM as DepositStatus, aK as DepositVerifier, aL as DepositVerifierCurrency, bL as DepositVerifierData, d7 as DepositView, aF as FiatResponse, bo as FulfillIntentAttestationResponse, a3 as FulfillIntentMethodParams, am as FulfillIntentParams, aq as GetBestByPlatformResponse, ar as GetBestByPlatformResponseObject, aN as GetDepositByIdRequest, aO as GetDepositByIdResponse, aV as GetIntentByHashRequest, aW as GetIntentByHashResponse, aT as GetIntentsByDepositRequest, aU as GetIntentsByDepositResponse, av as GetNearbyQuote, aw as GetNearbySuggestions, aR as GetOwnerIntentsRequest, aS as GetOwnerIntentsResponse, as as GetPlatformQuote, ax as GetQuoteResponse, ay as GetQuoteResponseObject, az as GetQuoteSingleResponse, bz as GetSellerCredentialStatusParams, bE as IdentityAttestationActionType, bF as IdentityAttestationOutput, bG as IdentityAttestationOutputFor, bH as IdentityAttestationParams, cb as IndexerClient, cJ as IndexerDeploymentEnv, ch as IndexerDeposit, cy as IndexerDepositDailySnapshot, cA as IndexerDepositFilter, cx as IndexerDepositFundActivity, cz as IndexerDepositFundActivityType, cD as IndexerDepositOrderDirection, cC as IndexerDepositOrderField, cB as IndexerDepositPagination, ck as IndexerDepositPaymentMethod, cd as IndexerDepositService, cM as IndexerFulfillmentAndPaymentResponse, cK as IndexerFulfillmentRecord, ci as IndexerIntentFulfilled, cj as IndexerIntentFulfillmentAmounts, cm as IndexerIntentStatus, cq as IndexerManagerAggregateStats, cs as IndexerManagerDailySnapshot, cr as IndexerManagerStats, cv as IndexerManualRateUpdate, cl as IndexerMethodCurrency, cw as IndexerOracleConfigUpdate, cL as IndexerPaymentVerifiedRecord, cn as IndexerRateManager, cp as IndexerRateManagerDelegation, cG as IndexerRateManagerDelegationPagination, cu as IndexerRateManagerDetail, cE as IndexerRateManagerFilter, ct as IndexerRateManagerListItem, cI as IndexerRateManagerOrderDirection, cH as IndexerRateManagerOrderField, cF as IndexerRateManagerPagination, co as IndexerRateManagerRate, ce as IndexerRateManagerService, aP as Intent, dc as IntentView, c0 as LimitingCurve, bI as MakerIdentityAttestationRequestBody, bJ as MakerIdentityPlatform, aH as NearbyQuote, aI as NearbySuggestions, Z as OfframpClient, bK as OnchainCurrency, dd as OnchainIntent, bN as OrderStats, c9 as OrderbookEntry, ca as OrderbookTableRow, cN as PAYMENT_PLATFORMS, b4 as PayPalGoogleOAuthSellerCredentialUploadBody, d9 as PaymentMethodData, cO as PaymentPlatformType, c6 as PlatformCapacity, c5 as PlatformChargebackCapacity, c2 as PlatformFreeTakes, c3 as PlatformGriefingCapacity, at as PlatformQuote, bM as PreparedTransaction, aE as QuoteFeesResponse, aD as QuoteIntentResponse, au as QuoteRequest, aA as QuoteResponse, aB as QuoteResponseObject, aC as QuoteSingleResponse, aj as Range, a0 as RedeemReferralCodeSignatureOptions, Y as ReferralBearerWriteOptions, db as ReferralFee, _ as ReferralReadOptions, af as ReferralRedemption, ag as ReferralSignatureBody, $ as ReferralSignatureOptions, aX as RegisterPayeeDetailsRequest, aY as RegisterPayeeDetailsResponse, bv as RegisteredSellerCredentialPlatform, bx as RegisteredUploadSellerCredentialParams, an as ReleaseFundsToPayerParams, d0 as RuntimeEnv, bm as SellerAttestationOutput, ba as SellerCiphertextBundle, bf as SellerCredentialBundleUpload, bn as SellerCredentialProbeResponse, bh as SellerCredentialStatus, bg as SellerCredentialStatusValue, b9 as SellerCredentialUploadInputByPlatform, bl as SellerPaymentTypedDataValue, aZ as SellerPlatform, be as SellerProbeInput, bb as SellerSignedCiphertextBundle, bj as SellerTypedDataField, bk as SellerTypedDataSpec, bd as SellerVerifyInput, bc as SellerVerifyIntentDetails, bi as SellerVerifyProxyBody, dq as SendBatchFn, dp as SendTransactionFn, a2 as SignalIntentMethodParams, al as SignalIntentParams, a1 as SignalIntentReferralFee, a7 as StakeExitRequest, bV as StakeReservation, bU as StakeReservationKind, bW as StakeReservations, a8 as StakeVaultState, a9 as StakeVaultWriteFunction, aa as StakeVaultWriteParams, ab as StakeWithdrawalRequest, c8 as TakerCapacity, bR as TakerDelegation, c7 as TakerOperationalGates, bX as TakerStake, bQ as TakerStakeAsset, bS as TakerStakeBalances, bT as TakerStakeExit, ad as TimeoutConfig, aG as TokenResponse, a5 as UpdateReferralCodeSignatureOptions, bC as UploadGoogleOAuthSellerCredentialParams, bA as UploadPayPalGoogleOAuthSellerCredentialParams, by as UploadSellerCredentialOptions, bw as UploadSellerCredentialParams, bB as UploadVenmoGoogleOAuthSellerCredentialParams, bP as UsdcAmount, d2 as V2ContractAbis, d1 as V2ContractAddresses, b6 as VenmoCredentialUploadInput, b5 as VenmoGoogleOAuthSellerCredentialUploadBody, a_ as VenmoSessionMaterial, bD as VerifySellerPaymentParams, b8 as WiseCredentialUploadInput, b1 as WiseProfileInfo, b3 as WiseProfileNotFound, b2 as WiseProfileSelectionRequired, b0 as WiseSessionMaterial, ak as WithdrawDepositParams, de as ZERO_RATE_MANAGER_ID, Z as Zkp2pClient, a6 as Zkp2pClientOptions, dj as classifyDelegationState, cf as compareEventCursorIdsByRecency, cQ as currencyInfo, cc as defaultIndexerEndpoint, d5 as enrichPvDepositView, d6 as enrichPvIntentView, cg as fetchIndexerFulfillmentAndPayment, cX as getContracts, cT as getCurrencyCodeFromHash, cS as getCurrencyInfoFromCountryCode, cR as getCurrencyInfoFromHash, di as getDelegationRoute, c$ as getGatingServiceAddress, c_ as getPaymentMethodsCatalog, cY as getRateManagerContracts, cZ as getStakeVaultContract, cU as isSupportedCurrencyHash, df as isZeroRateManagerId, cV as mapConversionRatesToOnchainMinRate, dg as normalizeRateManagerId, dh as normalizeRegistry, d3 as parseDepositView, d4 as parseIntentView } from './vaultUtils-DtkWNsxi.mjs';
3
3
  import { Address, Hash, Hex, WalletClient } from 'viem';
4
4
  import { Abi } from 'abitype';
5
5
  export { IdentityActionType, IdentityActionTypeByPlatform, IdentityParamsByPlatform, IdentityPlatform, NitroAttestationClient, NitroAttestationClientOptions, NitroAttestationEnvironment, VerifiedAttestation, VerifiedAttestationPayload, createNitroAttestationClient } from '@zkp2p/zkp2p-attestation';
@@ -278,9 +278,14 @@ declare function apiGetPayeeDetails(req: GetPayeeDetailsRequest, baseApiUrl: str
278
278
  declare function apiValidatePayeeDetails(req: ValidatePayeeDetailsRequest, baseApiUrl: string, timeoutMs?: number): Promise<ValidatePayeeDetailsResponse>;
279
279
  declare function apiGetOwnerDeposits(req: GetOwnerDepositsRequest, apiKey: string | undefined, baseApiUrl: string, authToken?: string, timeoutMs?: number): Promise<GetOwnerDepositsResponse>;
280
280
  /**
281
- * Get taker tier information for a specific address.
281
+ * Get the stake portfolio backing a taker (balances, reservations, exit state).
282
282
  */
283
- declare function apiGetTakerTier(req: GetTakerTierRequest, baseApiUrl: string, timeoutMs?: number): Promise<GetTakerTierResponse>;
283
+ declare function apiGetTakerStake(req: GetTakerStakeRequest, baseApiUrl: string, timeoutMs?: number): Promise<GetTakerStakeResponse>;
284
+ /**
285
+ * Get per-platform bonded taking capacity, free takes, and operational gates
286
+ * for a taker's shared stake portfolio.
287
+ */
288
+ declare function apiGetTakerCapacity(req: GetTakerCapacityRequest, baseApiUrl: string, timeoutMs?: number): Promise<GetTakerCapacityResponse>;
284
289
  declare function apiGetReferralDashboard(opts: ApiAdapterOptions & ReferralReadRequest): Promise<ReferralDashboardResponse>;
285
290
  declare function apiGetReferralEarnings(opts: ApiAdapterOptions & ReferralReadRequest): Promise<ReferralEarningsResponse>;
286
291
  declare function apiLookupReferralCode(code: string, opts: ApiAdapterOptions): Promise<ReferralCodeLookupResponse>;
@@ -515,61 +520,6 @@ declare const TOKEN_METADATA: {
515
520
  };
516
521
  };
517
522
 
518
- /**
519
- * Canonical taker tier schedule — the single client-side source of truth for
520
- * per-intent caps and volume thresholds. Mirrors the curator's authoritative
521
- * tier engine (curator `src/common/services/tier/tierConstants.ts`), which is
522
- * what the backend actually enforces.
523
- *
524
- * The live qualification signal is Peer Pay volume. Historical maker tiers
525
- * earned before July 1, 2026 UTC are preserved; after that cutoff, only Peer
526
- * Pay volume moves the tier. Curator keeps the response field name
527
- * `peerPayVolume` for compatibility.
528
- *
529
- * A user's *live* tier, cap, and progression always come from the taker-tier
530
- * API payload (`TakerTier.perIntentCapBaseUnits`, `minVolumeForTier`,
531
- * `volumeToNextTier`, `peerPayVolume`). Those values are DB-backed and
532
- * server-authoritative — they vary per environment (e.g. preprod runs
533
- * different thresholds than these). This static schedule is ONLY a
534
- * documented-default reference for displays that must show every tier at once
535
- * (the Fees & Tiers ladder) when no live payload is available; never gate or
536
- * compute a user's real cap from it.
537
- *
538
- * Volume bands track the live tuned qualification thresholds — PEER $1k,
539
- * PLUS $10k, PRO $50k, PLATINUM $100k. Caps ($100/$250/$1k/$2.5k/$5k) are unchanged.
540
- * Read the live per-user values from the API: curator can change qualification
541
- * inputs behind the compatibility fields without changing this reference table.
542
- *
543
- * Ordered highest tier → lowest (PLATINUM first) to match UI display order.
544
- */
545
- interface TakerTierScheduleEntry {
546
- tier: TakerTierLevel;
547
- /** Per-intent order cap in whole USD (base, before platform risk multipliers). */
548
- perIntentCapUsd: number;
549
- /** Inclusive lower bound of Peer Pay volume (USD) that qualifies for this tier. */
550
- minVolumeUsd: number;
551
- /** Inclusive upper bound of Peer Pay volume (USD); `Infinity` for the top tier. */
552
- maxVolumeUsd: number;
553
- }
554
- declare const TAKER_TIER_SCHEDULE: readonly TakerTierScheduleEntry[];
555
- /** Volume-based tier order, lowest → highest, for next-tier progression. */
556
- declare const TAKER_TIER_ORDER: readonly TakerTierLevel[];
557
- /** Per-intent caps (whole USD) keyed by tier, derived from the schedule. */
558
- declare const TAKER_TIER_CAPS: Readonly<Record<string, number>>;
559
- /**
560
- * Default take-fee discount (in basis points) applied per tier, mirroring
561
- * curator `TIER_FEE_DISCOUNT_BPS`. The discount is subtracted from the base
562
- * service fee server-side at quote and sign time — it is NOT returned by the
563
- * tier endpoint. These are documented defaults for reference fee displays only;
564
- * the curator DB control-plane can override them, so prefer the fee shown on a
565
- * live quote when one is available.
566
- */
567
- declare const TAKER_TIER_FEE_DISCOUNT_BPS: Readonly<Record<TakerTierLevel, number>>;
568
- /** The default fee-discount (bps) for a tier, or 0 for unknown tiers. */
569
- declare function getTakerTierFeeDiscountBps(tier: string | undefined): number;
570
- /** The next tier up from `currentTier`, or `null` at the top / for unknown tiers. */
571
- declare function getNextTakerTier(currentTier: string | undefined): TakerTierLevel | null;
572
-
573
523
  /**
574
524
  * Payment method resolution utilities.
575
525
  *
@@ -659,6 +609,55 @@ declare function resolvePaymentMethodHashFromCatalog(processorName: string, cata
659
609
  */
660
610
  declare function resolvePaymentMethodNameFromHash(hash: string, catalog: PaymentMethodCatalog): string | undefined;
661
611
 
612
+ /**
613
+ * Exact client-side counterparts of RiskManager's integer formulas.
614
+ *
615
+ * Kept inside the public SDK so its generated declarations and runtime remain
616
+ * self-contained for external consumers.
617
+ */
618
+ type IntegerLike = bigint | number | string | {
619
+ toString(): string;
620
+ };
621
+ interface GriefingTerms {
622
+ maxIntentPeriod: IntegerLike;
623
+ griefingCliff: IntegerLike;
624
+ griefingPenaltyBpsPerHour: IntegerLike;
625
+ }
626
+ interface RiskCapacity {
627
+ /** null means this disabled curve does not constrain capacity. */
628
+ griefingCapacity: bigint | null;
629
+ /** null means this disabled curve does not constrain capacity. */
630
+ chargebackCapacity: bigint | null;
631
+ /** null means both curves are disabled and bonded capacity is unbounded. */
632
+ bondedTakingCapacity: bigint | null;
633
+ }
634
+ interface FreeTakeCapacity {
635
+ remainingFreeTakes: bigint;
636
+ freeTakingCapacity: bigint;
637
+ }
638
+ interface GriefingPenalty {
639
+ penalty: bigint;
640
+ effectiveElapsed: bigint;
641
+ }
642
+ declare const RISK_BPS_DENOMINATOR = 10000n;
643
+ declare const RISK_SECONDS_PER_HOUR = 3600n;
644
+ declare const RISK_GRIEFING_DENOMINATOR: bigint;
645
+ /** ceil(A * s * (T - C) / (10_000 * 1 hour)); returns zero when the curve is disabled. */
646
+ declare function calculateMaxGriefingBond(amount: IntegerLike, terms: GriefingTerms): bigint;
647
+ /** ceil(A * r / 10_000); returns zero when chargeback coverage is disabled. */
648
+ declare function calculateChargebackReserve(amount: IntegerLike, reserveBps: IntegerLike): bigint;
649
+ /** max(maxGriefingBond, chargebackReserve), never their sum. */
650
+ declare function calculateRequiredReservation(amount: IntegerLike, terms: GriefingTerms, reserveBps: IntegerLike): bigint;
651
+ /** Capped, upward-rounded time-linear penalty used for cancellation and reconciliation. */
652
+ declare function calculateGriefingPenalty(amount: IntegerLike, createdAt: IntegerLike, cancelledAt: IntegerLike, terms: GriefingTerms): GriefingPenalty;
653
+ /**
654
+ * Inverts the exact rounded reservation curves. A null capacity denotes a disabled constraint.
655
+ * Because ceil(A*n/d) <= S iff A*n <= S*d, each inverse uses floor(S*d/n).
656
+ */
657
+ declare function calculateBondedTakingCapacity(freeStake: IntegerLike, terms: GriefingTerms, reserveBps: IntegerLike): RiskCapacity;
658
+ /** Computes remaining separate free intents and their aggregate display capacity. */
659
+ declare function calculateFreeTakeCapacity(freeTakeCount: IntegerLike, freeTakesUsed: IntegerLike, freeTakeAmount: IntegerLike): FreeTakeCapacity;
660
+
662
661
  /**
663
662
  * Ensure a value is 32 bytes hex (0x + 64 nibbles). If ascii, keccak256 by default when hash=true.
664
663
  */
@@ -847,4 +846,4 @@ declare class ContractError extends ZKP2PError {
847
846
  constructor(message: string, details?: unknown);
848
847
  }
849
848
 
850
- export { APIError, ApiAdapterOptions, AttestationServiceIdentityResponse, AttestationServiceSellerCredentialUploadResponse, AttestationServiceSellerVerifyResponse, BASE_BUILDER_CODE, BestByPlatformResponse, BuyerTeeSessionMaterialEncryptionInput, BuyerTeeVerifyPaymentBody, CHAINLINK_ORACLE_ADAPTER, CHAINLINK_ORACLE_FEEDS, ContractError, ContractRouter, type ContractRouterConfig, CreateReferralCodeRequest, CreateReferralCodeResponse, CuratorSellerCredentialUploadResponse, CurrencyType, DEFAULT_ORACLE_MAX_STALENESS_SECONDS, ErrorCode, type EscrowContractContext, type EscrowDepositView, type EscrowIntentView, GetDepositBundleParams, GetDepositBundleResponse, GetOrderbookParams, GetOrderbookResponse, GetOrderbookTableResponse, GetOwnerDepositsRequest, GetOwnerDepositsResponse, GetPayeeDetailsRequest, GetPayeeDetailsResponse, GetTakerTierRequest, GetTakerTierResponse, GoogleOAuthSellerCredentialPlatform, GoogleOAuthSellerCredentialUploadBodyByPlatform, IdentityAttestationRequestBody, DepositWithRelations as IndexerDepositWithRelations, IntentEntity as IndexerIntent, type LogLevel, type MulticallClient, NetworkError, type OracleAdapterOverrides, type OracleKind, type OrchestratorContractContext, PEER_EXTENSION_CHROME_URL, PLATFORM_METADATA, PYTH_CONTRACT_BASE, PYTH_ORACLE_ADAPTER, PYTH_ORACLE_FEEDS, PaymentMethodCatalog, type PeerAuthenticateParams, type PeerBuyerTeePaymentCapture, type PeerBuyerTeePaymentParams, type PeerConnectionStatus, type PeerExtensionApi, type PeerExtensionSdk, type PeerExtensionSdkOptions, type PeerExtensionState, type PeerExtensionWindow, type PeerMetadataCaptureMode, type PeerMetadataMessage, type PeerMetadataMessageCallback, type PeerMetadataProviderConfig, type PeerMetadataRow, type PeerSarCredentialCapture, PostDepositDetailsRequest, PostDepositDetailsResponse, type PythFeedConfig, QuotesBestByPlatformRequest, REFERRAL_SIGNATURE_DOMAIN, REFERRAL_SIGNATURE_TYPES, RedeemReferralCodeRequest, RedeemReferralCodeResponse, ReferralCodeLookupResponse, ReferralDashboardResponse, ReferralEarningsResponse, ReferralReadRequest, ReferrerFeeConfig, SPREAD_ORACLE_FEEDS, SUPPORTED_CHAIN_IDS, SellerCredentialAttestationRuntime, SellerCredentialBundle, SellerCredentialUploadInput, SellerCredentialUploadPlatform, type SpreadOracleConfig, type SpreadOracleFeedConfig, type SupportedChainId, TAKER_TIER_CAPS, TAKER_TIER_FEE_DISCOUNT_BPS, TAKER_TIER_ORDER, TAKER_TIER_SCHEDULE, TOKEN_METADATA, TakerTierLevel, type TakerTierScheduleEntry, TxOverrides, UpdateReferralCodeRequest, UpdateReferralCodeResponse, UploadSellerCredentialBundleParams, ValidatePayeeDetailsRequest, ValidatePayeeDetailsResponse, ValidationError, ZKP2PError, ZKP2P_ANDROID_REFERRER, ZKP2P_IOS_REFERRER, apiCreateReferralCode, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOrderbookTable, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuotesBestByPlatform, apiGetReferralDashboard, apiGetReferralEarnings, apiGetTakerTier, apiLookupReferralCode, apiPostDepositDetails, apiRedeemReferralCode, apiRequestIdentityAttestation, apiUpdateReferralCode, apiUploadGoogleOAuthSellerCredential, apiUploadSellerCredentialBundle, apiValidatePayeeDetails, apiVerifyBuyerTeePayment, appendAttributionToCalldata, asciiToBytes32, assertValidReferrerFeeConfig, convertDepositsForLiquidity, convertIndexerDepositToEscrowView, convertIndexerIntentsToEscrowViews, createCompositeDepositId, createEncryptedBuyerTeeSessionMaterial, createPeerExtensionSdk, encodePythAdapterConfig, encodeSpreadOracleAdapterConfig, encodeWithAttribution, ensureBytes32, getAttributionDataSuffix, getNextTakerTier, getPeerExtensionState, getSpreadOracleConfig, getTakerTierFeeDiscountBps, isPeerExtensionAvailable, isValidReferralCode, isValidReferrerFeeBps, isValidReferrerFeeRecipient, logger, normalizeReferralCode, openPeerExtensionInstallPage, parseReferrerFeeConfig, peerExtensionSdk, referrerFeeConfigToPreciseUnits, resolveFiatCurrencyBytes32, resolvePaymentMethodHash, resolvePaymentMethodHashFromCatalog, resolvePaymentMethodNameFromHash, sendTransactionWithAttribution, setLogLevel, validateOracleFeedsOnChain };
849
+ export { APIError, ApiAdapterOptions, AttestationServiceIdentityResponse, AttestationServiceSellerCredentialUploadResponse, AttestationServiceSellerVerifyResponse, BASE_BUILDER_CODE, BestByPlatformResponse, BuyerTeeSessionMaterialEncryptionInput, BuyerTeeVerifyPaymentBody, CHAINLINK_ORACLE_ADAPTER, CHAINLINK_ORACLE_FEEDS, ContractError, ContractRouter, type ContractRouterConfig, CreateReferralCodeRequest, CreateReferralCodeResponse, CuratorSellerCredentialUploadResponse, CurrencyType, DEFAULT_ORACLE_MAX_STALENESS_SECONDS, ErrorCode, type EscrowContractContext, type EscrowDepositView, type EscrowIntentView, type FreeTakeCapacity, GetDepositBundleParams, GetDepositBundleResponse, GetOrderbookParams, GetOrderbookResponse, GetOrderbookTableResponse, GetOwnerDepositsRequest, GetOwnerDepositsResponse, GetPayeeDetailsRequest, GetPayeeDetailsResponse, GetTakerCapacityRequest, GetTakerCapacityResponse, GetTakerStakeRequest, GetTakerStakeResponse, GoogleOAuthSellerCredentialPlatform, GoogleOAuthSellerCredentialUploadBodyByPlatform, type GriefingPenalty, type GriefingTerms, IdentityAttestationRequestBody, DepositWithRelations as IndexerDepositWithRelations, IntentEntity as IndexerIntent, type IntegerLike, type LogLevel, type MulticallClient, NetworkError, type OracleAdapterOverrides, type OracleKind, type OrchestratorContractContext, PEER_EXTENSION_CHROME_URL, PLATFORM_METADATA, PYTH_CONTRACT_BASE, PYTH_ORACLE_ADAPTER, PYTH_ORACLE_FEEDS, PaymentMethodCatalog, type PeerAuthenticateParams, type PeerBuyerTeePaymentCapture, type PeerBuyerTeePaymentParams, type PeerConnectionStatus, type PeerExtensionApi, type PeerExtensionSdk, type PeerExtensionSdkOptions, type PeerExtensionState, type PeerExtensionWindow, type PeerMetadataCaptureMode, type PeerMetadataMessage, type PeerMetadataMessageCallback, type PeerMetadataProviderConfig, type PeerMetadataRow, type PeerSarCredentialCapture, PostDepositDetailsRequest, PostDepositDetailsResponse, type PythFeedConfig, QuotesBestByPlatformRequest, REFERRAL_SIGNATURE_DOMAIN, REFERRAL_SIGNATURE_TYPES, RISK_BPS_DENOMINATOR, RISK_GRIEFING_DENOMINATOR, RISK_SECONDS_PER_HOUR, RedeemReferralCodeRequest, RedeemReferralCodeResponse, ReferralCodeLookupResponse, ReferralDashboardResponse, ReferralEarningsResponse, ReferralReadRequest, ReferrerFeeConfig, type RiskCapacity, SPREAD_ORACLE_FEEDS, SUPPORTED_CHAIN_IDS, SellerCredentialAttestationRuntime, SellerCredentialBundle, SellerCredentialUploadInput, SellerCredentialUploadPlatform, type SpreadOracleConfig, type SpreadOracleFeedConfig, type SupportedChainId, TOKEN_METADATA, TxOverrides, UpdateReferralCodeRequest, UpdateReferralCodeResponse, UploadSellerCredentialBundleParams, ValidatePayeeDetailsRequest, ValidatePayeeDetailsResponse, ValidationError, ZKP2PError, ZKP2P_ANDROID_REFERRER, ZKP2P_IOS_REFERRER, apiCreateReferralCode, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOrderbookTable, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuotesBestByPlatform, apiGetReferralDashboard, apiGetReferralEarnings, apiGetTakerCapacity, apiGetTakerStake, apiLookupReferralCode, apiPostDepositDetails, apiRedeemReferralCode, apiRequestIdentityAttestation, apiUpdateReferralCode, apiUploadGoogleOAuthSellerCredential, apiUploadSellerCredentialBundle, apiValidatePayeeDetails, apiVerifyBuyerTeePayment, appendAttributionToCalldata, asciiToBytes32, assertValidReferrerFeeConfig, calculateBondedTakingCapacity, calculateChargebackReserve, calculateFreeTakeCapacity, calculateGriefingPenalty, calculateMaxGriefingBond, calculateRequiredReservation, convertDepositsForLiquidity, convertIndexerDepositToEscrowView, convertIndexerIntentsToEscrowViews, createCompositeDepositId, createEncryptedBuyerTeeSessionMaterial, createPeerExtensionSdk, encodePythAdapterConfig, encodeSpreadOracleAdapterConfig, encodeWithAttribution, ensureBytes32, getAttributionDataSuffix, getPeerExtensionState, getSpreadOracleConfig, isPeerExtensionAvailable, isValidReferralCode, isValidReferrerFeeBps, isValidReferrerFeeRecipient, logger, normalizeReferralCode, openPeerExtensionInstallPage, parseReferrerFeeConfig, peerExtensionSdk, referrerFeeConfigToPreciseUnits, resolveFiatCurrencyBytes32, resolvePaymentMethodHash, resolvePaymentMethodHashFromCatalog, resolvePaymentMethodNameFromHash, sendTransactionWithAttribution, setLogLevel, validateOracleFeedsOnChain };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as ReferrerFeeConfig, S as SellerCredentialBundle, D as DepositWithRelations, I as IntentEntity, a as IdentityAttestationRequestBody, A as AttestationServiceIdentityResponse, B as BuyerTeeVerifyPaymentBody, b as AttestationServiceSellerVerifyResponse, c as SellerCredentialUploadInput, d as SellerCredentialUploadPlatform, e as SellerCredentialAttestationRuntime, f as AttestationServiceSellerCredentialUploadResponse, g as BuyerTeeSessionMaterialEncryptionInput, U as UploadSellerCredentialBundleParams, C as CuratorSellerCredentialUploadResponse, h as CreateReferralCodeRequest, i as ApiAdapterOptions, j as CreateReferralCodeResponse, k as ReferralReadRequest, l as ReferralDashboardResponse, m as ReferralEarningsResponse, n as ReferralCodeLookupResponse, o as RedeemReferralCodeRequest, p as RedeemReferralCodeResponse, q as UpdateReferralCodeRequest, r as UpdateReferralCodeResponse, G as GoogleOAuthSellerCredentialPlatform, s as GoogleOAuthSellerCredentialUploadBodyByPlatform, Q as QuotesBestByPlatformRequest, t as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, u as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, v as PostDepositDetailsResponse, w as GetPayeeDetailsRequest, x as GetPayeeDetailsResponse, y as GetOwnerDepositsRequest, z as GetOwnerDepositsResponse, E as GetTakerTierRequest, F as GetTakerTierResponse, H as GetDepositBundleParams, J as GetDepositBundleResponse, K as GetOrderbookParams, L as GetOrderbookResponse, M as GetOrderbookTableResponse, N as CurrencyType, T as TakerTierLevel, O as PaymentMethodCatalog, W as TxOverrides } from './vaultUtils-aJdIIILM.js';
2
- export { a8 as ActionCallback, aD as ApiDeposit, aK as ApiIntentStatus, bj as AttestationServiceSellerCredentialProbeResponse, a6 as AuthorizationTokenProvider, c_ as BatchResult, aj as BestByPlatformResponseObject, bk as BuyerTeePaymentParams, bl as BuyerTeePaymentProofInput, bm as BuyerTeeSessionMaterial, a3 as CancelIntentMethodParams, ai as CancelIntentParams, b1 as CashAppCredentialUploadInput, aV as CashAppSessionMaterial, ac as CreateDepositConversionRate, ab as CreateDepositParams, bn as CuratorSellerCredentialStatusResponse, bo as CuratorSellerVerifyResponse, ct as Currency, cA as CurrencyData, cZ as DelegationDepositTarget, cX as DelegationRoute, cY as DelegationState, cL as Deposit, cN as DepositCurrency, bI as DepositIntentStatistics, aG as DepositStatus, aE as DepositVerifier, aF as DepositVerifierCurrency, bF as DepositVerifierData, cK as DepositView, az as FiatResponse, bi as FulfillIntentAttestationResponse, a2 as FulfillIntentMethodParams, ag as FulfillIntentParams, ak as GetBestByPlatformResponse, al as GetBestByPlatformResponseObject, aH as GetDepositByIdRequest, aI as GetDepositByIdResponse, aP as GetIntentByHashRequest, aQ as GetIntentByHashResponse, aN as GetIntentsByDepositRequest, aO as GetIntentsByDepositResponse, ap as GetNearbyQuote, aq as GetNearbySuggestions, aL as GetOwnerIntentsRequest, aM as GetOwnerIntentsResponse, am as GetPlatformQuote, ar as GetQuoteResponse, as as GetQuoteResponseObject, at as GetQuoteSingleResponse, bt as GetSellerCredentialStatusParams, by as IdentityAttestationActionType, bz as IdentityAttestationOutput, bA as IdentityAttestationOutputFor, bB as IdentityAttestationParams, bR as IndexerClient, cn as IndexerDeploymentEnv, bX as IndexerDeposit, cc as IndexerDepositDailySnapshot, ce as IndexerDepositFilter, cb as IndexerDepositFundActivity, cd as IndexerDepositFundActivityType, ch as IndexerDepositOrderDirection, cg as IndexerDepositOrderField, cf as IndexerDepositPagination, b_ as IndexerDepositPaymentMethod, bT as IndexerDepositService, cq as IndexerFulfillmentAndPaymentResponse, co as IndexerFulfillmentRecord, bY as IndexerIntentFulfilled, bZ as IndexerIntentFulfillmentAmounts, c0 as IndexerIntentStatus, c4 as IndexerManagerAggregateStats, c6 as IndexerManagerDailySnapshot, c5 as IndexerManagerStats, c9 as IndexerManualRateUpdate, b$ as IndexerMethodCurrency, ca as IndexerOracleConfigUpdate, cp as IndexerPaymentVerifiedRecord, c1 as IndexerRateManager, c3 as IndexerRateManagerDelegation, ck as IndexerRateManagerDelegationPagination, c8 as IndexerRateManagerDetail, ci as IndexerRateManagerFilter, c7 as IndexerRateManagerListItem, cm as IndexerRateManagerOrderDirection, cl as IndexerRateManagerOrderField, cj as IndexerRateManagerPagination, c2 as IndexerRateManagerRate, bU as IndexerRateManagerService, aJ as Intent, cP as IntentView, bC as MakerIdentityAttestationRequestBody, bD as MakerIdentityPlatform, aB as NearbyQuote, aC as NearbySuggestions, Z as OfframpClient, bE as OnchainCurrency, cQ as OnchainIntent, bH as OrderStats, bP as OrderbookEntry, bQ as OrderbookTableRow, cr as PAYMENT_PLATFORMS, a_ as PayPalGoogleOAuthSellerCredentialUploadBody, cM as PaymentMethodData, cs as PaymentPlatformType, bN as PlatformLimit, an as PlatformQuote, bO as PlatformRiskLevel, bG as PreparedTransaction, ay as QuoteFeesResponse, ax as QuoteIntentResponse, ao as QuoteRequest, au as QuoteResponse, av as QuoteResponseObject, aw as QuoteSingleResponse, ad as Range, $ as RedeemReferralCodeSignatureOptions, X as ReferralBearerWriteOptions, cO as ReferralFee, Y as ReferralReadOptions, a9 as ReferralRedemption, aa as ReferralSignatureBody, _ as ReferralSignatureOptions, aR as RegisterPayeeDetailsRequest, aS as RegisterPayeeDetailsResponse, bp as RegisteredSellerCredentialPlatform, br as RegisteredUploadSellerCredentialParams, ah as ReleaseFundsToPayerParams, cF as RuntimeEnv, bg as SellerAttestationOutput, b4 as SellerCiphertextBundle, b9 as SellerCredentialBundleUpload, bh as SellerCredentialProbeResponse, bb as SellerCredentialStatus, ba as SellerCredentialStatusValue, b3 as SellerCredentialUploadInputByPlatform, bf as SellerPaymentTypedDataValue, aT as SellerPlatform, b8 as SellerProbeInput, b5 as SellerSignedCiphertextBundle, bd as SellerTypedDataField, be as SellerTypedDataSpec, b7 as SellerVerifyInput, b6 as SellerVerifyIntentDetails, bc as SellerVerifyProxyBody, d0 as SendBatchFn, c$ as SendTransactionFn, a1 as SignalIntentMethodParams, af as SignalIntentParams, a0 as SignalIntentReferralFee, bJ as TakerTier, bM as TakerTierSource, bL as TakerTierStats, bK as TakerTierVolumeBreakdown, a7 as TimeoutConfig, aA as TokenResponse, a4 as UpdateReferralCodeSignatureOptions, bw as UploadGoogleOAuthSellerCredentialParams, bu as UploadPayPalGoogleOAuthSellerCredentialParams, bs as UploadSellerCredentialOptions, bq as UploadSellerCredentialParams, bv as UploadVenmoGoogleOAuthSellerCredentialParams, b0 as VenmoCredentialUploadInput, a$ as VenmoGoogleOAuthSellerCredentialUploadBody, aU as VenmoSessionMaterial, bx as VerifySellerPaymentParams, b2 as WiseCredentialUploadInput, aX as WiseProfileInfo, aZ as WiseProfileNotFound, aY as WiseProfileSelectionRequired, aW as WiseSessionMaterial, ae as WithdrawDepositParams, cR as ZERO_RATE_MANAGER_ID, Z as Zkp2pClient, a5 as Zkp2pClientOptions, cW as classifyDelegationState, bV as compareEventCursorIdsByRecency, cu as currencyInfo, bS as defaultIndexerEndpoint, cI as enrichPvDepositView, cJ as enrichPvIntentView, bW as fetchIndexerFulfillmentAndPayment, cB as getContracts, cx as getCurrencyCodeFromHash, cw as getCurrencyInfoFromCountryCode, cv as getCurrencyInfoFromHash, cV as getDelegationRoute, cE as getGatingServiceAddress, cD as getPaymentMethodsCatalog, cC as getRateManagerContracts, cy as isSupportedCurrencyHash, cS as isZeroRateManagerId, cz as mapConversionRatesToOnchainMinRate, cT as normalizeRateManagerId, cU as normalizeRegistry, cG as parseDepositView, cH as parseIntentView } from './vaultUtils-aJdIIILM.js';
1
+ import { R as ReferrerFeeConfig, S as SellerCredentialBundle, D as DepositWithRelations, I as IntentEntity, a as IdentityAttestationRequestBody, A as AttestationServiceIdentityResponse, B as BuyerTeeVerifyPaymentBody, b as AttestationServiceSellerVerifyResponse, c as SellerCredentialUploadInput, d as SellerCredentialUploadPlatform, e as SellerCredentialAttestationRuntime, f as AttestationServiceSellerCredentialUploadResponse, g as BuyerTeeSessionMaterialEncryptionInput, U as UploadSellerCredentialBundleParams, C as CuratorSellerCredentialUploadResponse, h as CreateReferralCodeRequest, i as ApiAdapterOptions, j as CreateReferralCodeResponse, k as ReferralReadRequest, l as ReferralDashboardResponse, m as ReferralEarningsResponse, n as ReferralCodeLookupResponse, o as RedeemReferralCodeRequest, p as RedeemReferralCodeResponse, q as UpdateReferralCodeRequest, r as UpdateReferralCodeResponse, G as GoogleOAuthSellerCredentialPlatform, s as GoogleOAuthSellerCredentialUploadBodyByPlatform, Q as QuotesBestByPlatformRequest, t as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, u as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, v as PostDepositDetailsResponse, w as GetPayeeDetailsRequest, x as GetPayeeDetailsResponse, y as GetOwnerDepositsRequest, z as GetOwnerDepositsResponse, E as GetTakerStakeRequest, F as GetTakerStakeResponse, H as GetTakerCapacityRequest, J as GetTakerCapacityResponse, K as GetDepositBundleParams, L as GetDepositBundleResponse, M as GetOrderbookParams, N as GetOrderbookResponse, O as GetOrderbookTableResponse, T as CurrencyType, W as PaymentMethodCatalog, X as TxOverrides } from './vaultUtils-DtkWNsxi.js';
2
+ export { ae as ActionCallback, aJ as ApiDeposit, aQ as ApiIntentStatus, bp as AttestationServiceSellerCredentialProbeResponse, ac as AuthorizationTokenProvider, dn as BatchResult, ap as BestByPlatformResponseObject, c1 as BondedTakingCapacity, bq as BuyerTeePaymentParams, br as BuyerTeePaymentProofInput, bs as BuyerTeeSessionMaterial, a4 as CancelIntentMethodParams, ao as CancelIntentParams, b_ as CapacityWarning, bY as CapacityWarningCode, bZ as CapacityWarningSeverity, b7 as CashAppCredentialUploadInput, a$ as CashAppSessionMaterial, c4 as ChargebackCoverageStatus, ai as CreateDepositConversionRate, ah as CreateDepositParams, bt as CuratorSellerCredentialStatusResponse, bu as CuratorSellerVerifyResponse, cP as Currency, cW as CurrencyData, b$ as CurveTakingCapacity, dm as DelegationDepositTarget, dk as DelegationRoute, dl as DelegationState, d8 as Deposit, da as DepositCurrency, bO as DepositIntentStatistics, aM as DepositStatus, aK as DepositVerifier, aL as DepositVerifierCurrency, bL as DepositVerifierData, d7 as DepositView, aF as FiatResponse, bo as FulfillIntentAttestationResponse, a3 as FulfillIntentMethodParams, am as FulfillIntentParams, aq as GetBestByPlatformResponse, ar as GetBestByPlatformResponseObject, aN as GetDepositByIdRequest, aO as GetDepositByIdResponse, aV as GetIntentByHashRequest, aW as GetIntentByHashResponse, aT as GetIntentsByDepositRequest, aU as GetIntentsByDepositResponse, av as GetNearbyQuote, aw as GetNearbySuggestions, aR as GetOwnerIntentsRequest, aS as GetOwnerIntentsResponse, as as GetPlatformQuote, ax as GetQuoteResponse, ay as GetQuoteResponseObject, az as GetQuoteSingleResponse, bz as GetSellerCredentialStatusParams, bE as IdentityAttestationActionType, bF as IdentityAttestationOutput, bG as IdentityAttestationOutputFor, bH as IdentityAttestationParams, cb as IndexerClient, cJ as IndexerDeploymentEnv, ch as IndexerDeposit, cy as IndexerDepositDailySnapshot, cA as IndexerDepositFilter, cx as IndexerDepositFundActivity, cz as IndexerDepositFundActivityType, cD as IndexerDepositOrderDirection, cC as IndexerDepositOrderField, cB as IndexerDepositPagination, ck as IndexerDepositPaymentMethod, cd as IndexerDepositService, cM as IndexerFulfillmentAndPaymentResponse, cK as IndexerFulfillmentRecord, ci as IndexerIntentFulfilled, cj as IndexerIntentFulfillmentAmounts, cm as IndexerIntentStatus, cq as IndexerManagerAggregateStats, cs as IndexerManagerDailySnapshot, cr as IndexerManagerStats, cv as IndexerManualRateUpdate, cl as IndexerMethodCurrency, cw as IndexerOracleConfigUpdate, cL as IndexerPaymentVerifiedRecord, cn as IndexerRateManager, cp as IndexerRateManagerDelegation, cG as IndexerRateManagerDelegationPagination, cu as IndexerRateManagerDetail, cE as IndexerRateManagerFilter, ct as IndexerRateManagerListItem, cI as IndexerRateManagerOrderDirection, cH as IndexerRateManagerOrderField, cF as IndexerRateManagerPagination, co as IndexerRateManagerRate, ce as IndexerRateManagerService, aP as Intent, dc as IntentView, c0 as LimitingCurve, bI as MakerIdentityAttestationRequestBody, bJ as MakerIdentityPlatform, aH as NearbyQuote, aI as NearbySuggestions, Z as OfframpClient, bK as OnchainCurrency, dd as OnchainIntent, bN as OrderStats, c9 as OrderbookEntry, ca as OrderbookTableRow, cN as PAYMENT_PLATFORMS, b4 as PayPalGoogleOAuthSellerCredentialUploadBody, d9 as PaymentMethodData, cO as PaymentPlatformType, c6 as PlatformCapacity, c5 as PlatformChargebackCapacity, c2 as PlatformFreeTakes, c3 as PlatformGriefingCapacity, at as PlatformQuote, bM as PreparedTransaction, aE as QuoteFeesResponse, aD as QuoteIntentResponse, au as QuoteRequest, aA as QuoteResponse, aB as QuoteResponseObject, aC as QuoteSingleResponse, aj as Range, a0 as RedeemReferralCodeSignatureOptions, Y as ReferralBearerWriteOptions, db as ReferralFee, _ as ReferralReadOptions, af as ReferralRedemption, ag as ReferralSignatureBody, $ as ReferralSignatureOptions, aX as RegisterPayeeDetailsRequest, aY as RegisterPayeeDetailsResponse, bv as RegisteredSellerCredentialPlatform, bx as RegisteredUploadSellerCredentialParams, an as ReleaseFundsToPayerParams, d0 as RuntimeEnv, bm as SellerAttestationOutput, ba as SellerCiphertextBundle, bf as SellerCredentialBundleUpload, bn as SellerCredentialProbeResponse, bh as SellerCredentialStatus, bg as SellerCredentialStatusValue, b9 as SellerCredentialUploadInputByPlatform, bl as SellerPaymentTypedDataValue, aZ as SellerPlatform, be as SellerProbeInput, bb as SellerSignedCiphertextBundle, bj as SellerTypedDataField, bk as SellerTypedDataSpec, bd as SellerVerifyInput, bc as SellerVerifyIntentDetails, bi as SellerVerifyProxyBody, dq as SendBatchFn, dp as SendTransactionFn, a2 as SignalIntentMethodParams, al as SignalIntentParams, a1 as SignalIntentReferralFee, a7 as StakeExitRequest, bV as StakeReservation, bU as StakeReservationKind, bW as StakeReservations, a8 as StakeVaultState, a9 as StakeVaultWriteFunction, aa as StakeVaultWriteParams, ab as StakeWithdrawalRequest, c8 as TakerCapacity, bR as TakerDelegation, c7 as TakerOperationalGates, bX as TakerStake, bQ as TakerStakeAsset, bS as TakerStakeBalances, bT as TakerStakeExit, ad as TimeoutConfig, aG as TokenResponse, a5 as UpdateReferralCodeSignatureOptions, bC as UploadGoogleOAuthSellerCredentialParams, bA as UploadPayPalGoogleOAuthSellerCredentialParams, by as UploadSellerCredentialOptions, bw as UploadSellerCredentialParams, bB as UploadVenmoGoogleOAuthSellerCredentialParams, bP as UsdcAmount, d2 as V2ContractAbis, d1 as V2ContractAddresses, b6 as VenmoCredentialUploadInput, b5 as VenmoGoogleOAuthSellerCredentialUploadBody, a_ as VenmoSessionMaterial, bD as VerifySellerPaymentParams, b8 as WiseCredentialUploadInput, b1 as WiseProfileInfo, b3 as WiseProfileNotFound, b2 as WiseProfileSelectionRequired, b0 as WiseSessionMaterial, ak as WithdrawDepositParams, de as ZERO_RATE_MANAGER_ID, Z as Zkp2pClient, a6 as Zkp2pClientOptions, dj as classifyDelegationState, cf as compareEventCursorIdsByRecency, cQ as currencyInfo, cc as defaultIndexerEndpoint, d5 as enrichPvDepositView, d6 as enrichPvIntentView, cg as fetchIndexerFulfillmentAndPayment, cX as getContracts, cT as getCurrencyCodeFromHash, cS as getCurrencyInfoFromCountryCode, cR as getCurrencyInfoFromHash, di as getDelegationRoute, c$ as getGatingServiceAddress, c_ as getPaymentMethodsCatalog, cY as getRateManagerContracts, cZ as getStakeVaultContract, cU as isSupportedCurrencyHash, df as isZeroRateManagerId, cV as mapConversionRatesToOnchainMinRate, dg as normalizeRateManagerId, dh as normalizeRegistry, d3 as parseDepositView, d4 as parseIntentView } from './vaultUtils-DtkWNsxi.js';
3
3
  import { Address, Hash, Hex, WalletClient } from 'viem';
4
4
  import { Abi } from 'abitype';
5
5
  export { IdentityActionType, IdentityActionTypeByPlatform, IdentityParamsByPlatform, IdentityPlatform, NitroAttestationClient, NitroAttestationClientOptions, NitroAttestationEnvironment, VerifiedAttestation, VerifiedAttestationPayload, createNitroAttestationClient } from '@zkp2p/zkp2p-attestation';
@@ -278,9 +278,14 @@ declare function apiGetPayeeDetails(req: GetPayeeDetailsRequest, baseApiUrl: str
278
278
  declare function apiValidatePayeeDetails(req: ValidatePayeeDetailsRequest, baseApiUrl: string, timeoutMs?: number): Promise<ValidatePayeeDetailsResponse>;
279
279
  declare function apiGetOwnerDeposits(req: GetOwnerDepositsRequest, apiKey: string | undefined, baseApiUrl: string, authToken?: string, timeoutMs?: number): Promise<GetOwnerDepositsResponse>;
280
280
  /**
281
- * Get taker tier information for a specific address.
281
+ * Get the stake portfolio backing a taker (balances, reservations, exit state).
282
282
  */
283
- declare function apiGetTakerTier(req: GetTakerTierRequest, baseApiUrl: string, timeoutMs?: number): Promise<GetTakerTierResponse>;
283
+ declare function apiGetTakerStake(req: GetTakerStakeRequest, baseApiUrl: string, timeoutMs?: number): Promise<GetTakerStakeResponse>;
284
+ /**
285
+ * Get per-platform bonded taking capacity, free takes, and operational gates
286
+ * for a taker's shared stake portfolio.
287
+ */
288
+ declare function apiGetTakerCapacity(req: GetTakerCapacityRequest, baseApiUrl: string, timeoutMs?: number): Promise<GetTakerCapacityResponse>;
284
289
  declare function apiGetReferralDashboard(opts: ApiAdapterOptions & ReferralReadRequest): Promise<ReferralDashboardResponse>;
285
290
  declare function apiGetReferralEarnings(opts: ApiAdapterOptions & ReferralReadRequest): Promise<ReferralEarningsResponse>;
286
291
  declare function apiLookupReferralCode(code: string, opts: ApiAdapterOptions): Promise<ReferralCodeLookupResponse>;
@@ -515,61 +520,6 @@ declare const TOKEN_METADATA: {
515
520
  };
516
521
  };
517
522
 
518
- /**
519
- * Canonical taker tier schedule — the single client-side source of truth for
520
- * per-intent caps and volume thresholds. Mirrors the curator's authoritative
521
- * tier engine (curator `src/common/services/tier/tierConstants.ts`), which is
522
- * what the backend actually enforces.
523
- *
524
- * The live qualification signal is Peer Pay volume. Historical maker tiers
525
- * earned before July 1, 2026 UTC are preserved; after that cutoff, only Peer
526
- * Pay volume moves the tier. Curator keeps the response field name
527
- * `peerPayVolume` for compatibility.
528
- *
529
- * A user's *live* tier, cap, and progression always come from the taker-tier
530
- * API payload (`TakerTier.perIntentCapBaseUnits`, `minVolumeForTier`,
531
- * `volumeToNextTier`, `peerPayVolume`). Those values are DB-backed and
532
- * server-authoritative — they vary per environment (e.g. preprod runs
533
- * different thresholds than these). This static schedule is ONLY a
534
- * documented-default reference for displays that must show every tier at once
535
- * (the Fees & Tiers ladder) when no live payload is available; never gate or
536
- * compute a user's real cap from it.
537
- *
538
- * Volume bands track the live tuned qualification thresholds — PEER $1k,
539
- * PLUS $10k, PRO $50k, PLATINUM $100k. Caps ($100/$250/$1k/$2.5k/$5k) are unchanged.
540
- * Read the live per-user values from the API: curator can change qualification
541
- * inputs behind the compatibility fields without changing this reference table.
542
- *
543
- * Ordered highest tier → lowest (PLATINUM first) to match UI display order.
544
- */
545
- interface TakerTierScheduleEntry {
546
- tier: TakerTierLevel;
547
- /** Per-intent order cap in whole USD (base, before platform risk multipliers). */
548
- perIntentCapUsd: number;
549
- /** Inclusive lower bound of Peer Pay volume (USD) that qualifies for this tier. */
550
- minVolumeUsd: number;
551
- /** Inclusive upper bound of Peer Pay volume (USD); `Infinity` for the top tier. */
552
- maxVolumeUsd: number;
553
- }
554
- declare const TAKER_TIER_SCHEDULE: readonly TakerTierScheduleEntry[];
555
- /** Volume-based tier order, lowest → highest, for next-tier progression. */
556
- declare const TAKER_TIER_ORDER: readonly TakerTierLevel[];
557
- /** Per-intent caps (whole USD) keyed by tier, derived from the schedule. */
558
- declare const TAKER_TIER_CAPS: Readonly<Record<string, number>>;
559
- /**
560
- * Default take-fee discount (in basis points) applied per tier, mirroring
561
- * curator `TIER_FEE_DISCOUNT_BPS`. The discount is subtracted from the base
562
- * service fee server-side at quote and sign time — it is NOT returned by the
563
- * tier endpoint. These are documented defaults for reference fee displays only;
564
- * the curator DB control-plane can override them, so prefer the fee shown on a
565
- * live quote when one is available.
566
- */
567
- declare const TAKER_TIER_FEE_DISCOUNT_BPS: Readonly<Record<TakerTierLevel, number>>;
568
- /** The default fee-discount (bps) for a tier, or 0 for unknown tiers. */
569
- declare function getTakerTierFeeDiscountBps(tier: string | undefined): number;
570
- /** The next tier up from `currentTier`, or `null` at the top / for unknown tiers. */
571
- declare function getNextTakerTier(currentTier: string | undefined): TakerTierLevel | null;
572
-
573
523
  /**
574
524
  * Payment method resolution utilities.
575
525
  *
@@ -659,6 +609,55 @@ declare function resolvePaymentMethodHashFromCatalog(processorName: string, cata
659
609
  */
660
610
  declare function resolvePaymentMethodNameFromHash(hash: string, catalog: PaymentMethodCatalog): string | undefined;
661
611
 
612
+ /**
613
+ * Exact client-side counterparts of RiskManager's integer formulas.
614
+ *
615
+ * Kept inside the public SDK so its generated declarations and runtime remain
616
+ * self-contained for external consumers.
617
+ */
618
+ type IntegerLike = bigint | number | string | {
619
+ toString(): string;
620
+ };
621
+ interface GriefingTerms {
622
+ maxIntentPeriod: IntegerLike;
623
+ griefingCliff: IntegerLike;
624
+ griefingPenaltyBpsPerHour: IntegerLike;
625
+ }
626
+ interface RiskCapacity {
627
+ /** null means this disabled curve does not constrain capacity. */
628
+ griefingCapacity: bigint | null;
629
+ /** null means this disabled curve does not constrain capacity. */
630
+ chargebackCapacity: bigint | null;
631
+ /** null means both curves are disabled and bonded capacity is unbounded. */
632
+ bondedTakingCapacity: bigint | null;
633
+ }
634
+ interface FreeTakeCapacity {
635
+ remainingFreeTakes: bigint;
636
+ freeTakingCapacity: bigint;
637
+ }
638
+ interface GriefingPenalty {
639
+ penalty: bigint;
640
+ effectiveElapsed: bigint;
641
+ }
642
+ declare const RISK_BPS_DENOMINATOR = 10000n;
643
+ declare const RISK_SECONDS_PER_HOUR = 3600n;
644
+ declare const RISK_GRIEFING_DENOMINATOR: bigint;
645
+ /** ceil(A * s * (T - C) / (10_000 * 1 hour)); returns zero when the curve is disabled. */
646
+ declare function calculateMaxGriefingBond(amount: IntegerLike, terms: GriefingTerms): bigint;
647
+ /** ceil(A * r / 10_000); returns zero when chargeback coverage is disabled. */
648
+ declare function calculateChargebackReserve(amount: IntegerLike, reserveBps: IntegerLike): bigint;
649
+ /** max(maxGriefingBond, chargebackReserve), never their sum. */
650
+ declare function calculateRequiredReservation(amount: IntegerLike, terms: GriefingTerms, reserveBps: IntegerLike): bigint;
651
+ /** Capped, upward-rounded time-linear penalty used for cancellation and reconciliation. */
652
+ declare function calculateGriefingPenalty(amount: IntegerLike, createdAt: IntegerLike, cancelledAt: IntegerLike, terms: GriefingTerms): GriefingPenalty;
653
+ /**
654
+ * Inverts the exact rounded reservation curves. A null capacity denotes a disabled constraint.
655
+ * Because ceil(A*n/d) <= S iff A*n <= S*d, each inverse uses floor(S*d/n).
656
+ */
657
+ declare function calculateBondedTakingCapacity(freeStake: IntegerLike, terms: GriefingTerms, reserveBps: IntegerLike): RiskCapacity;
658
+ /** Computes remaining separate free intents and their aggregate display capacity. */
659
+ declare function calculateFreeTakeCapacity(freeTakeCount: IntegerLike, freeTakesUsed: IntegerLike, freeTakeAmount: IntegerLike): FreeTakeCapacity;
660
+
662
661
  /**
663
662
  * Ensure a value is 32 bytes hex (0x + 64 nibbles). If ascii, keccak256 by default when hash=true.
664
663
  */
@@ -847,4 +846,4 @@ declare class ContractError extends ZKP2PError {
847
846
  constructor(message: string, details?: unknown);
848
847
  }
849
848
 
850
- export { APIError, ApiAdapterOptions, AttestationServiceIdentityResponse, AttestationServiceSellerCredentialUploadResponse, AttestationServiceSellerVerifyResponse, BASE_BUILDER_CODE, BestByPlatformResponse, BuyerTeeSessionMaterialEncryptionInput, BuyerTeeVerifyPaymentBody, CHAINLINK_ORACLE_ADAPTER, CHAINLINK_ORACLE_FEEDS, ContractError, ContractRouter, type ContractRouterConfig, CreateReferralCodeRequest, CreateReferralCodeResponse, CuratorSellerCredentialUploadResponse, CurrencyType, DEFAULT_ORACLE_MAX_STALENESS_SECONDS, ErrorCode, type EscrowContractContext, type EscrowDepositView, type EscrowIntentView, GetDepositBundleParams, GetDepositBundleResponse, GetOrderbookParams, GetOrderbookResponse, GetOrderbookTableResponse, GetOwnerDepositsRequest, GetOwnerDepositsResponse, GetPayeeDetailsRequest, GetPayeeDetailsResponse, GetTakerTierRequest, GetTakerTierResponse, GoogleOAuthSellerCredentialPlatform, GoogleOAuthSellerCredentialUploadBodyByPlatform, IdentityAttestationRequestBody, DepositWithRelations as IndexerDepositWithRelations, IntentEntity as IndexerIntent, type LogLevel, type MulticallClient, NetworkError, type OracleAdapterOverrides, type OracleKind, type OrchestratorContractContext, PEER_EXTENSION_CHROME_URL, PLATFORM_METADATA, PYTH_CONTRACT_BASE, PYTH_ORACLE_ADAPTER, PYTH_ORACLE_FEEDS, PaymentMethodCatalog, type PeerAuthenticateParams, type PeerBuyerTeePaymentCapture, type PeerBuyerTeePaymentParams, type PeerConnectionStatus, type PeerExtensionApi, type PeerExtensionSdk, type PeerExtensionSdkOptions, type PeerExtensionState, type PeerExtensionWindow, type PeerMetadataCaptureMode, type PeerMetadataMessage, type PeerMetadataMessageCallback, type PeerMetadataProviderConfig, type PeerMetadataRow, type PeerSarCredentialCapture, PostDepositDetailsRequest, PostDepositDetailsResponse, type PythFeedConfig, QuotesBestByPlatformRequest, REFERRAL_SIGNATURE_DOMAIN, REFERRAL_SIGNATURE_TYPES, RedeemReferralCodeRequest, RedeemReferralCodeResponse, ReferralCodeLookupResponse, ReferralDashboardResponse, ReferralEarningsResponse, ReferralReadRequest, ReferrerFeeConfig, SPREAD_ORACLE_FEEDS, SUPPORTED_CHAIN_IDS, SellerCredentialAttestationRuntime, SellerCredentialBundle, SellerCredentialUploadInput, SellerCredentialUploadPlatform, type SpreadOracleConfig, type SpreadOracleFeedConfig, type SupportedChainId, TAKER_TIER_CAPS, TAKER_TIER_FEE_DISCOUNT_BPS, TAKER_TIER_ORDER, TAKER_TIER_SCHEDULE, TOKEN_METADATA, TakerTierLevel, type TakerTierScheduleEntry, TxOverrides, UpdateReferralCodeRequest, UpdateReferralCodeResponse, UploadSellerCredentialBundleParams, ValidatePayeeDetailsRequest, ValidatePayeeDetailsResponse, ValidationError, ZKP2PError, ZKP2P_ANDROID_REFERRER, ZKP2P_IOS_REFERRER, apiCreateReferralCode, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOrderbookTable, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuotesBestByPlatform, apiGetReferralDashboard, apiGetReferralEarnings, apiGetTakerTier, apiLookupReferralCode, apiPostDepositDetails, apiRedeemReferralCode, apiRequestIdentityAttestation, apiUpdateReferralCode, apiUploadGoogleOAuthSellerCredential, apiUploadSellerCredentialBundle, apiValidatePayeeDetails, apiVerifyBuyerTeePayment, appendAttributionToCalldata, asciiToBytes32, assertValidReferrerFeeConfig, convertDepositsForLiquidity, convertIndexerDepositToEscrowView, convertIndexerIntentsToEscrowViews, createCompositeDepositId, createEncryptedBuyerTeeSessionMaterial, createPeerExtensionSdk, encodePythAdapterConfig, encodeSpreadOracleAdapterConfig, encodeWithAttribution, ensureBytes32, getAttributionDataSuffix, getNextTakerTier, getPeerExtensionState, getSpreadOracleConfig, getTakerTierFeeDiscountBps, isPeerExtensionAvailable, isValidReferralCode, isValidReferrerFeeBps, isValidReferrerFeeRecipient, logger, normalizeReferralCode, openPeerExtensionInstallPage, parseReferrerFeeConfig, peerExtensionSdk, referrerFeeConfigToPreciseUnits, resolveFiatCurrencyBytes32, resolvePaymentMethodHash, resolvePaymentMethodHashFromCatalog, resolvePaymentMethodNameFromHash, sendTransactionWithAttribution, setLogLevel, validateOracleFeedsOnChain };
849
+ export { APIError, ApiAdapterOptions, AttestationServiceIdentityResponse, AttestationServiceSellerCredentialUploadResponse, AttestationServiceSellerVerifyResponse, BASE_BUILDER_CODE, BestByPlatformResponse, BuyerTeeSessionMaterialEncryptionInput, BuyerTeeVerifyPaymentBody, CHAINLINK_ORACLE_ADAPTER, CHAINLINK_ORACLE_FEEDS, ContractError, ContractRouter, type ContractRouterConfig, CreateReferralCodeRequest, CreateReferralCodeResponse, CuratorSellerCredentialUploadResponse, CurrencyType, DEFAULT_ORACLE_MAX_STALENESS_SECONDS, ErrorCode, type EscrowContractContext, type EscrowDepositView, type EscrowIntentView, type FreeTakeCapacity, GetDepositBundleParams, GetDepositBundleResponse, GetOrderbookParams, GetOrderbookResponse, GetOrderbookTableResponse, GetOwnerDepositsRequest, GetOwnerDepositsResponse, GetPayeeDetailsRequest, GetPayeeDetailsResponse, GetTakerCapacityRequest, GetTakerCapacityResponse, GetTakerStakeRequest, GetTakerStakeResponse, GoogleOAuthSellerCredentialPlatform, GoogleOAuthSellerCredentialUploadBodyByPlatform, type GriefingPenalty, type GriefingTerms, IdentityAttestationRequestBody, DepositWithRelations as IndexerDepositWithRelations, IntentEntity as IndexerIntent, type IntegerLike, type LogLevel, type MulticallClient, NetworkError, type OracleAdapterOverrides, type OracleKind, type OrchestratorContractContext, PEER_EXTENSION_CHROME_URL, PLATFORM_METADATA, PYTH_CONTRACT_BASE, PYTH_ORACLE_ADAPTER, PYTH_ORACLE_FEEDS, PaymentMethodCatalog, type PeerAuthenticateParams, type PeerBuyerTeePaymentCapture, type PeerBuyerTeePaymentParams, type PeerConnectionStatus, type PeerExtensionApi, type PeerExtensionSdk, type PeerExtensionSdkOptions, type PeerExtensionState, type PeerExtensionWindow, type PeerMetadataCaptureMode, type PeerMetadataMessage, type PeerMetadataMessageCallback, type PeerMetadataProviderConfig, type PeerMetadataRow, type PeerSarCredentialCapture, PostDepositDetailsRequest, PostDepositDetailsResponse, type PythFeedConfig, QuotesBestByPlatformRequest, REFERRAL_SIGNATURE_DOMAIN, REFERRAL_SIGNATURE_TYPES, RISK_BPS_DENOMINATOR, RISK_GRIEFING_DENOMINATOR, RISK_SECONDS_PER_HOUR, RedeemReferralCodeRequest, RedeemReferralCodeResponse, ReferralCodeLookupResponse, ReferralDashboardResponse, ReferralEarningsResponse, ReferralReadRequest, ReferrerFeeConfig, type RiskCapacity, SPREAD_ORACLE_FEEDS, SUPPORTED_CHAIN_IDS, SellerCredentialAttestationRuntime, SellerCredentialBundle, SellerCredentialUploadInput, SellerCredentialUploadPlatform, type SpreadOracleConfig, type SpreadOracleFeedConfig, type SupportedChainId, TOKEN_METADATA, TxOverrides, UpdateReferralCodeRequest, UpdateReferralCodeResponse, UploadSellerCredentialBundleParams, ValidatePayeeDetailsRequest, ValidatePayeeDetailsResponse, ValidationError, ZKP2PError, ZKP2P_ANDROID_REFERRER, ZKP2P_IOS_REFERRER, apiCreateReferralCode, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOrderbookTable, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuotesBestByPlatform, apiGetReferralDashboard, apiGetReferralEarnings, apiGetTakerCapacity, apiGetTakerStake, apiLookupReferralCode, apiPostDepositDetails, apiRedeemReferralCode, apiRequestIdentityAttestation, apiUpdateReferralCode, apiUploadGoogleOAuthSellerCredential, apiUploadSellerCredentialBundle, apiValidatePayeeDetails, apiVerifyBuyerTeePayment, appendAttributionToCalldata, asciiToBytes32, assertValidReferrerFeeConfig, calculateBondedTakingCapacity, calculateChargebackReserve, calculateFreeTakeCapacity, calculateGriefingPenalty, calculateMaxGriefingBond, calculateRequiredReservation, convertDepositsForLiquidity, convertIndexerDepositToEscrowView, convertIndexerIntentsToEscrowViews, createCompositeDepositId, createEncryptedBuyerTeeSessionMaterial, createPeerExtensionSdk, encodePythAdapterConfig, encodeSpreadOracleAdapterConfig, encodeWithAttribution, ensureBytes32, getAttributionDataSuffix, getPeerExtensionState, getSpreadOracleConfig, isPeerExtensionAvailable, isValidReferralCode, isValidReferrerFeeBps, isValidReferrerFeeRecipient, logger, normalizeReferralCode, openPeerExtensionInstallPage, parseReferrerFeeConfig, peerExtensionSdk, referrerFeeConfigToPreciseUnits, resolveFiatCurrencyBytes32, resolvePaymentMethodHash, resolvePaymentMethodHashFromCatalog, resolvePaymentMethodNameFromHash, sendTransactionWithAttribution, setLogLevel, validateOracleFeedsOnChain };