@zkp2p/sdk 0.10.0-rc.6 → 0.10.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/README.md +63 -110
- package/dist/{chunk-3XY3E4VH.mjs → chunk-JRLUSPR3.mjs} +5062 -36836
- package/dist/chunk-JRLUSPR3.mjs.map +1 -0
- package/dist/chunk-WXEP544Y.mjs +281 -0
- package/dist/chunk-WXEP544Y.mjs.map +1 -0
- package/dist/index.cjs +7517 -38935
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +61 -47
- package/dist/index.d.ts +61 -47
- package/dist/index.mjs +453 -329
- package/dist/index.mjs.map +1 -1
- package/dist/protocolViewerParsers-QMHI74AA.mjs +5 -0
- package/dist/{protocolViewerParsers-HMOHJWSP.mjs.map → protocolViewerParsers-QMHI74AA.mjs.map} +1 -1
- package/dist/react.cjs +237 -97
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.mts +46 -33
- package/dist/react.d.ts +46 -33
- package/dist/react.mjs +191 -99
- package/dist/react.mjs.map +1 -1
- package/dist/{vaultUtils-B2FVQeaS.d.mts → vaultUtils-DeUFIx3l.d.mts} +479 -308
- package/dist/{vaultUtils-B2FVQeaS.d.ts → vaultUtils-DeUFIx3l.d.ts} +479 -308
- package/package.json +3 -3
- package/dist/chunk-3XY3E4VH.mjs.map +0 -1
- package/dist/chunk-LPJE2MN7.mjs +0 -75
- package/dist/chunk-LPJE2MN7.mjs.map +0 -1
- package/dist/protocolViewerParsers-HMOHJWSP.mjs +0 -5
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
|
|
2
|
-
export {
|
|
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-DeUFIx3l.mjs';
|
|
2
|
+
export { df as AccessPolicyDiff, d7 as AccessPolicyOperations, dg as AccessPolicyOrdering, dh as AccessPolicyPlan, di as AccessPolicyPlanStep, dj as AccessPolicyState, d8 as AccessPolicyUnsupportedError, dk as AccessPolicyViolation, ae as ActionCallback, aJ as ApiDeposit, aQ as ApiIntentStatus, bo as AttestationServiceSellerCredentialProbeResponse, ac as AuthorizationTokenProvider, d4 as BatchResult, ap as BestByPlatformResponseObject, bp as BuyerTeePaymentParams, bq as BuyerTeePaymentProofInput, br as BuyerTeeSessionMaterial, a3 as CancelIntentMethodParams, ao as CancelIntentParams, b6 as CashAppCredentialUploadInput, a$ as CashAppSessionMaterial, ai as CreateDepositConversionRate, ah as CreateDepositParams, bs as CuratorSellerCredentialStatusResponse, bt as CuratorSellerVerifyResponse, cx as Currency, cE as CurrencyData, d3 as DelegationDepositTarget, d1 as DelegationRoute, d2 as DelegationState, cR as Deposit, cT as DepositCurrency, bM as DepositIntentStatistics, aM as DepositStatus, aK as DepositVerifier, aL as DepositVerifierCurrency, bJ as DepositVerifierData, cQ as DepositView, aF as FiatResponse, bn as FulfillIntentAttestationResponse, a2 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, by as GetSellerCredentialStatusParams, bC as IdentityAttestationActionType, bD as IdentityAttestationOutput, bE as IdentityAttestationOutputFor, bF as IdentityAttestationParams, bV as IndexerClient, cr as IndexerDeploymentEnv, b$ as IndexerDeposit, cg as IndexerDepositDailySnapshot, ci as IndexerDepositFilter, cf as IndexerDepositFundActivity, ch as IndexerDepositFundActivityType, cl as IndexerDepositOrderDirection, ck as IndexerDepositOrderField, cj as IndexerDepositPagination, c2 as IndexerDepositPaymentMethod, bX as IndexerDepositService, cu as IndexerFulfillmentAndPaymentResponse, cs as IndexerFulfillmentRecord, c0 as IndexerIntentFulfilled, c1 as IndexerIntentFulfillmentAmounts, c4 as IndexerIntentStatus, c8 as IndexerManagerAggregateStats, ca as IndexerManagerDailySnapshot, c9 as IndexerManagerStats, cd as IndexerManualRateUpdate, c3 as IndexerMethodCurrency, ce as IndexerOracleConfigUpdate, ct as IndexerPaymentVerifiedRecord, c5 as IndexerRateManager, c7 as IndexerRateManagerDelegation, co as IndexerRateManagerDelegationPagination, cc as IndexerRateManagerDetail, cm as IndexerRateManagerFilter, cb as IndexerRateManagerListItem, cq as IndexerRateManagerOrderDirection, cp as IndexerRateManagerOrderField, cn as IndexerRateManagerPagination, c6 as IndexerRateManagerRate, bY as IndexerRateManagerService, aP as Intent, aa as IntentGuardianErrorCode, a6 as IntentGuardianPolicy, a7 as IntentGuardianQuote, a8 as IntentGuardianWriteFunction, a9 as IntentGuardianWriteParams, cV as IntentView, da as MAX_ADDRESSES_PER_CALL, d9 as MAX_GROUPS_PER_DEPOSIT, db as MAX_WHITELISTED_ADDRESSES, bG as MakerIdentityAttestationRequestBody, bH as MakerIdentityPlatform, aH as NearbyQuote, aI as NearbySuggestions, Z as OfframpClient, bI as OnchainCurrency, cW as OnchainIntent, bL as OrderStats, bT as OrderbookEntry, bU as OrderbookTableRow, cv as PAYMENT_PLATFORMS, b4 as PayPalGoogleOAuthSellerCredentialUploadBody, cS as PaymentMethodData, cw as PaymentPlatformType, bR as PlatformLimit, at as PlatformQuote, bS as PlatformRiskLevel, bK as PreparedTransaction, aE as QuoteFeesResponse, aD as QuoteIntentResponse, au as QuoteRequest, aA as QuoteResponse, aB as QuoteResponseObject, aC as QuoteSingleResponse, aj as Range, $ as RedeemReferralCodeSignatureOptions, X as ReferralBearerWriteOptions, cU as ReferralFee, Y as ReferralReadOptions, af as ReferralRedemption, ag as ReferralSignatureBody, _ as ReferralSignatureOptions, aX as RegisterPayeeDetailsRequest, aY as RegisterPayeeDetailsResponse, bu as RegisteredSellerCredentialPlatform, bw as RegisteredUploadSellerCredentialParams, an as ReleaseFundsToPayerParams, cL as RuntimeEnv, bl as SellerAttestationOutput, b9 as SellerCiphertextBundle, be as SellerCredentialBundleUpload, bm as SellerCredentialProbeResponse, bg as SellerCredentialStatus, bf as SellerCredentialStatusValue, b8 as SellerCredentialUploadInputByPlatform, bk as SellerPaymentTypedDataValue, aZ as SellerPlatform, bd as SellerProbeInput, ba as SellerSignedCiphertextBundle, bi as SellerTypedDataField, bj as SellerTypedDataSpec, bc as SellerVerifyInput, bb as SellerVerifyIntentDetails, bh as SellerVerifyProxyBody, d6 as SendBatchFn, d5 as SendTransactionFn, a1 as SignalIntentMethodParams, al as SignalIntentParams, a0 as SignalIntentReferralFee, bN as TakerTier, bQ as TakerTierSource, bP as TakerTierStats, bO as TakerTierVolumeBreakdown, ad as TimeoutConfig, aG as TokenResponse, a4 as UpdateReferralCodeSignatureOptions, bA as UploadGoogleOAuthSellerCredentialParams, bz as UploadPayPalGoogleOAuthSellerCredentialParams, bx as UploadSellerCredentialOptions, bv as UploadSellerCredentialParams, b5 as VenmoCredentialUploadInput, a_ as VenmoSessionMaterial, bB as VerifySellerPaymentParams, b7 as WiseCredentialUploadInput, b1 as WiseProfileInfo, b3 as WiseProfileNotFound, b2 as WiseProfileSelectionRequired, b0 as WiseSessionMaterial, ak as WithdrawDepositParams, cX as ZERO_RATE_MANAGER_ID, Z as Zkp2pClient, a5 as Zkp2pClientOptions, d0 as classifyDelegationState, ab as classifyIntentGuardianError, bZ as compareEventCursorIdsByRecency, cy as currencyInfo, bW as defaultIndexerEndpoint, dc as diffAccessPolicy, cO as enrichPvDepositView, cP as enrichPvIntentView, b_ as fetchIndexerFulfillmentAndPayment, cF as getContracts, cB as getCurrencyCodeFromHash, cA as getCurrencyInfoFromCountryCode, cz as getCurrencyInfoFromHash, c$ as getDelegationRoute, cK as getGatingServiceAddress, cG as getIntentGuardianContract, cJ as getPaymentMethodsCatalog, cI as getRateManagerContracts, cH as hasIntentGuardian, cC as isSupportedCurrencyHash, cY as isZeroRateManagerId, cD as mapConversionRatesToOnchainMinRate, dd as normalizeAccessPolicyState, cZ as normalizeRateManagerId, c_ as normalizeRegistry, cM as parseDepositView, cN as parseIntentView, de as planAccessPolicyUpdate } from './vaultUtils-DeUFIx3l.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';
|
|
@@ -131,7 +131,7 @@ interface EscrowContractContext {
|
|
|
131
131
|
interface OrchestratorContractContext {
|
|
132
132
|
address: Address;
|
|
133
133
|
abi: Abi;
|
|
134
|
-
version: 'v2'
|
|
134
|
+
version: 'v2';
|
|
135
135
|
}
|
|
136
136
|
interface ContractRouterConfig {
|
|
137
137
|
escrowAddress: Address;
|
|
@@ -143,8 +143,6 @@ interface ContractRouterConfig {
|
|
|
143
143
|
orchestratorAbi?: Abi;
|
|
144
144
|
orchestratorV2Address?: Address;
|
|
145
145
|
orchestratorV2Abi?: Abi;
|
|
146
|
-
orchestratorV3Address?: Address;
|
|
147
|
-
orchestratorV3Abi?: Abi;
|
|
148
146
|
orchestratorAddresses: Address[];
|
|
149
147
|
}
|
|
150
148
|
declare class ContractRouter {
|
|
@@ -159,8 +157,6 @@ declare class ContractRouter {
|
|
|
159
157
|
readonly orchestratorAbi?: Abi;
|
|
160
158
|
readonly orchestratorV2Address?: Address;
|
|
161
159
|
readonly orchestratorV2Abi?: Abi;
|
|
162
|
-
readonly orchestratorV3Address?: Address;
|
|
163
|
-
readonly orchestratorV3Abi?: Abi;
|
|
164
160
|
readonly orchestratorAddresses: Address[];
|
|
165
161
|
constructor(config: ContractRouterConfig);
|
|
166
162
|
private _registerContexts;
|
|
@@ -282,15 +278,9 @@ declare function apiGetPayeeDetails(req: GetPayeeDetailsRequest, baseApiUrl: str
|
|
|
282
278
|
declare function apiValidatePayeeDetails(req: ValidatePayeeDetailsRequest, baseApiUrl: string, timeoutMs?: number): Promise<ValidatePayeeDetailsResponse>;
|
|
283
279
|
declare function apiGetOwnerDeposits(req: GetOwnerDepositsRequest, apiKey: string | undefined, baseApiUrl: string, authToken?: string, timeoutMs?: number): Promise<GetOwnerDepositsResponse>;
|
|
284
280
|
/**
|
|
285
|
-
* Get
|
|
286
|
-
*/
|
|
287
|
-
declare function apiGetTakerStake(req: GetTakerStakeRequest, baseApiUrl: string, timeoutMs?: number): Promise<GetTakerStakeResponse>;
|
|
288
|
-
/**
|
|
289
|
-
* Get per-platform risk policy and 1:1 stake-backed taking capacity for the
|
|
290
|
-
* taker's effective stake owner (post-PR #200 full-gross model). Platform
|
|
291
|
-
* entries share one stake portfolio and must never be summed.
|
|
281
|
+
* Get taker tier information for a specific address.
|
|
292
282
|
*/
|
|
293
|
-
declare function
|
|
283
|
+
declare function apiGetTakerTier(req: GetTakerTierRequest, baseApiUrl: string, timeoutMs?: number): Promise<GetTakerTierResponse>;
|
|
294
284
|
declare function apiGetReferralDashboard(opts: ApiAdapterOptions & ReferralReadRequest): Promise<ReferralDashboardResponse>;
|
|
295
285
|
declare function apiGetReferralEarnings(opts: ApiAdapterOptions & ReferralReadRequest): Promise<ReferralEarningsResponse>;
|
|
296
286
|
declare function apiLookupReferralCode(code: string, opts: ApiAdapterOptions): Promise<ReferralCodeLookupResponse>;
|
|
@@ -525,6 +515,61 @@ declare const TOKEN_METADATA: {
|
|
|
525
515
|
};
|
|
526
516
|
};
|
|
527
517
|
|
|
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
|
+
|
|
528
573
|
/**
|
|
529
574
|
* Payment method resolution utilities.
|
|
530
575
|
*
|
|
@@ -614,37 +659,6 @@ declare function resolvePaymentMethodHashFromCatalog(processorName: string, cata
|
|
|
614
659
|
*/
|
|
615
660
|
declare function resolvePaymentMethodNameFromHash(hash: string, catalog: PaymentMethodCatalog): string | undefined;
|
|
616
661
|
|
|
617
|
-
/**
|
|
618
|
-
* Exact client-side counterparts of RiskManager's integer formulas
|
|
619
|
-
* (post-PR #200 full-gross generation).
|
|
620
|
-
*
|
|
621
|
-
* Kept inside the public SDK so its generated declarations and runtime remain
|
|
622
|
-
* self-contained for external consumers. PR #200 removed reserve ratios and
|
|
623
|
-
* capacity inversion: chargebackable admission locks the full intent amount
|
|
624
|
-
* 1:1, so stake-backed capacity IS the effective owner's free stake.
|
|
625
|
-
*/
|
|
626
|
-
type IntegerLike = bigint | number | string | {
|
|
627
|
-
toString(): string;
|
|
628
|
-
};
|
|
629
|
-
type RiskMode = 'UNBONDED' | 'STAKE_BACKED' | 'DEFERRED_PAYOUT';
|
|
630
|
-
interface IntentExtensionPenalty {
|
|
631
|
-
penalty: bigint;
|
|
632
|
-
chargeableTime: bigint;
|
|
633
|
-
}
|
|
634
|
-
declare const RISK_BPS_DENOMINATOR = 10000n;
|
|
635
|
-
declare const RISK_SECONDS_PER_HOUR = 3600n;
|
|
636
|
-
declare const RISK_EXTENSION_DENOMINATOR: bigint;
|
|
637
|
-
/** ceil(A * s * T / (10_000 * 1 hour)); returns zero when the curve is disabled. */
|
|
638
|
-
declare function calculateIntentExtensionCost(intentAmount: IntegerLike, extensionTime: IntegerLike, extensionPenaltyBpsPerHour: IntegerLike): bigint;
|
|
639
|
-
/** Charges elapsed post-expiry time, capped by the exact duration purchased. */
|
|
640
|
-
declare function calculateIntentExtensionPenalty(intentAmount: IntegerLike, baseIntentExpiry: IntegerLike, terminalAt: IntegerLike, totalExtensionTime: IntegerLike, extensionPenaltyBpsPerHour: IntegerLike): IntentExtensionPenalty;
|
|
641
|
-
/** Full-gross coverage required at admission; zero when chargebacks are disabled. */
|
|
642
|
-
declare function calculateRequiredCoverage(amount: IntegerLike, chargebackable: boolean): bigint;
|
|
643
|
-
/** Maximum chargebackable intent amount that can use existing stake. */
|
|
644
|
-
declare function calculateStakeBackedCapacity(freeStake: IntegerLike): bigint;
|
|
645
|
-
/** Exact admission mode selected by RiskManager's full-gross policy. */
|
|
646
|
-
declare function selectRiskMode(amount: IntegerLike, freeStake: IntegerLike, chargebackable: boolean, deferredPayoutEnabled: boolean): RiskMode;
|
|
647
|
-
|
|
648
662
|
/**
|
|
649
663
|
* Ensure a value is 32 bytes hex (0x + 64 nibbles). If ascii, keccak256 by default when hash=true.
|
|
650
664
|
*/
|
|
@@ -833,4 +847,4 @@ declare class ContractError extends ZKP2PError {
|
|
|
833
847
|
constructor(message: string, details?: unknown);
|
|
834
848
|
}
|
|
835
849
|
|
|
836
|
-
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,
|
|
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 };
|
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
|
|
2
|
-
export {
|
|
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-DeUFIx3l.js';
|
|
2
|
+
export { df as AccessPolicyDiff, d7 as AccessPolicyOperations, dg as AccessPolicyOrdering, dh as AccessPolicyPlan, di as AccessPolicyPlanStep, dj as AccessPolicyState, d8 as AccessPolicyUnsupportedError, dk as AccessPolicyViolation, ae as ActionCallback, aJ as ApiDeposit, aQ as ApiIntentStatus, bo as AttestationServiceSellerCredentialProbeResponse, ac as AuthorizationTokenProvider, d4 as BatchResult, ap as BestByPlatformResponseObject, bp as BuyerTeePaymentParams, bq as BuyerTeePaymentProofInput, br as BuyerTeeSessionMaterial, a3 as CancelIntentMethodParams, ao as CancelIntentParams, b6 as CashAppCredentialUploadInput, a$ as CashAppSessionMaterial, ai as CreateDepositConversionRate, ah as CreateDepositParams, bs as CuratorSellerCredentialStatusResponse, bt as CuratorSellerVerifyResponse, cx as Currency, cE as CurrencyData, d3 as DelegationDepositTarget, d1 as DelegationRoute, d2 as DelegationState, cR as Deposit, cT as DepositCurrency, bM as DepositIntentStatistics, aM as DepositStatus, aK as DepositVerifier, aL as DepositVerifierCurrency, bJ as DepositVerifierData, cQ as DepositView, aF as FiatResponse, bn as FulfillIntentAttestationResponse, a2 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, by as GetSellerCredentialStatusParams, bC as IdentityAttestationActionType, bD as IdentityAttestationOutput, bE as IdentityAttestationOutputFor, bF as IdentityAttestationParams, bV as IndexerClient, cr as IndexerDeploymentEnv, b$ as IndexerDeposit, cg as IndexerDepositDailySnapshot, ci as IndexerDepositFilter, cf as IndexerDepositFundActivity, ch as IndexerDepositFundActivityType, cl as IndexerDepositOrderDirection, ck as IndexerDepositOrderField, cj as IndexerDepositPagination, c2 as IndexerDepositPaymentMethod, bX as IndexerDepositService, cu as IndexerFulfillmentAndPaymentResponse, cs as IndexerFulfillmentRecord, c0 as IndexerIntentFulfilled, c1 as IndexerIntentFulfillmentAmounts, c4 as IndexerIntentStatus, c8 as IndexerManagerAggregateStats, ca as IndexerManagerDailySnapshot, c9 as IndexerManagerStats, cd as IndexerManualRateUpdate, c3 as IndexerMethodCurrency, ce as IndexerOracleConfigUpdate, ct as IndexerPaymentVerifiedRecord, c5 as IndexerRateManager, c7 as IndexerRateManagerDelegation, co as IndexerRateManagerDelegationPagination, cc as IndexerRateManagerDetail, cm as IndexerRateManagerFilter, cb as IndexerRateManagerListItem, cq as IndexerRateManagerOrderDirection, cp as IndexerRateManagerOrderField, cn as IndexerRateManagerPagination, c6 as IndexerRateManagerRate, bY as IndexerRateManagerService, aP as Intent, aa as IntentGuardianErrorCode, a6 as IntentGuardianPolicy, a7 as IntentGuardianQuote, a8 as IntentGuardianWriteFunction, a9 as IntentGuardianWriteParams, cV as IntentView, da as MAX_ADDRESSES_PER_CALL, d9 as MAX_GROUPS_PER_DEPOSIT, db as MAX_WHITELISTED_ADDRESSES, bG as MakerIdentityAttestationRequestBody, bH as MakerIdentityPlatform, aH as NearbyQuote, aI as NearbySuggestions, Z as OfframpClient, bI as OnchainCurrency, cW as OnchainIntent, bL as OrderStats, bT as OrderbookEntry, bU as OrderbookTableRow, cv as PAYMENT_PLATFORMS, b4 as PayPalGoogleOAuthSellerCredentialUploadBody, cS as PaymentMethodData, cw as PaymentPlatformType, bR as PlatformLimit, at as PlatformQuote, bS as PlatformRiskLevel, bK as PreparedTransaction, aE as QuoteFeesResponse, aD as QuoteIntentResponse, au as QuoteRequest, aA as QuoteResponse, aB as QuoteResponseObject, aC as QuoteSingleResponse, aj as Range, $ as RedeemReferralCodeSignatureOptions, X as ReferralBearerWriteOptions, cU as ReferralFee, Y as ReferralReadOptions, af as ReferralRedemption, ag as ReferralSignatureBody, _ as ReferralSignatureOptions, aX as RegisterPayeeDetailsRequest, aY as RegisterPayeeDetailsResponse, bu as RegisteredSellerCredentialPlatform, bw as RegisteredUploadSellerCredentialParams, an as ReleaseFundsToPayerParams, cL as RuntimeEnv, bl as SellerAttestationOutput, b9 as SellerCiphertextBundle, be as SellerCredentialBundleUpload, bm as SellerCredentialProbeResponse, bg as SellerCredentialStatus, bf as SellerCredentialStatusValue, b8 as SellerCredentialUploadInputByPlatform, bk as SellerPaymentTypedDataValue, aZ as SellerPlatform, bd as SellerProbeInput, ba as SellerSignedCiphertextBundle, bi as SellerTypedDataField, bj as SellerTypedDataSpec, bc as SellerVerifyInput, bb as SellerVerifyIntentDetails, bh as SellerVerifyProxyBody, d6 as SendBatchFn, d5 as SendTransactionFn, a1 as SignalIntentMethodParams, al as SignalIntentParams, a0 as SignalIntentReferralFee, bN as TakerTier, bQ as TakerTierSource, bP as TakerTierStats, bO as TakerTierVolumeBreakdown, ad as TimeoutConfig, aG as TokenResponse, a4 as UpdateReferralCodeSignatureOptions, bA as UploadGoogleOAuthSellerCredentialParams, bz as UploadPayPalGoogleOAuthSellerCredentialParams, bx as UploadSellerCredentialOptions, bv as UploadSellerCredentialParams, b5 as VenmoCredentialUploadInput, a_ as VenmoSessionMaterial, bB as VerifySellerPaymentParams, b7 as WiseCredentialUploadInput, b1 as WiseProfileInfo, b3 as WiseProfileNotFound, b2 as WiseProfileSelectionRequired, b0 as WiseSessionMaterial, ak as WithdrawDepositParams, cX as ZERO_RATE_MANAGER_ID, Z as Zkp2pClient, a5 as Zkp2pClientOptions, d0 as classifyDelegationState, ab as classifyIntentGuardianError, bZ as compareEventCursorIdsByRecency, cy as currencyInfo, bW as defaultIndexerEndpoint, dc as diffAccessPolicy, cO as enrichPvDepositView, cP as enrichPvIntentView, b_ as fetchIndexerFulfillmentAndPayment, cF as getContracts, cB as getCurrencyCodeFromHash, cA as getCurrencyInfoFromCountryCode, cz as getCurrencyInfoFromHash, c$ as getDelegationRoute, cK as getGatingServiceAddress, cG as getIntentGuardianContract, cJ as getPaymentMethodsCatalog, cI as getRateManagerContracts, cH as hasIntentGuardian, cC as isSupportedCurrencyHash, cY as isZeroRateManagerId, cD as mapConversionRatesToOnchainMinRate, dd as normalizeAccessPolicyState, cZ as normalizeRateManagerId, c_ as normalizeRegistry, cM as parseDepositView, cN as parseIntentView, de as planAccessPolicyUpdate } from './vaultUtils-DeUFIx3l.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';
|
|
@@ -131,7 +131,7 @@ interface EscrowContractContext {
|
|
|
131
131
|
interface OrchestratorContractContext {
|
|
132
132
|
address: Address;
|
|
133
133
|
abi: Abi;
|
|
134
|
-
version: 'v2'
|
|
134
|
+
version: 'v2';
|
|
135
135
|
}
|
|
136
136
|
interface ContractRouterConfig {
|
|
137
137
|
escrowAddress: Address;
|
|
@@ -143,8 +143,6 @@ interface ContractRouterConfig {
|
|
|
143
143
|
orchestratorAbi?: Abi;
|
|
144
144
|
orchestratorV2Address?: Address;
|
|
145
145
|
orchestratorV2Abi?: Abi;
|
|
146
|
-
orchestratorV3Address?: Address;
|
|
147
|
-
orchestratorV3Abi?: Abi;
|
|
148
146
|
orchestratorAddresses: Address[];
|
|
149
147
|
}
|
|
150
148
|
declare class ContractRouter {
|
|
@@ -159,8 +157,6 @@ declare class ContractRouter {
|
|
|
159
157
|
readonly orchestratorAbi?: Abi;
|
|
160
158
|
readonly orchestratorV2Address?: Address;
|
|
161
159
|
readonly orchestratorV2Abi?: Abi;
|
|
162
|
-
readonly orchestratorV3Address?: Address;
|
|
163
|
-
readonly orchestratorV3Abi?: Abi;
|
|
164
160
|
readonly orchestratorAddresses: Address[];
|
|
165
161
|
constructor(config: ContractRouterConfig);
|
|
166
162
|
private _registerContexts;
|
|
@@ -282,15 +278,9 @@ declare function apiGetPayeeDetails(req: GetPayeeDetailsRequest, baseApiUrl: str
|
|
|
282
278
|
declare function apiValidatePayeeDetails(req: ValidatePayeeDetailsRequest, baseApiUrl: string, timeoutMs?: number): Promise<ValidatePayeeDetailsResponse>;
|
|
283
279
|
declare function apiGetOwnerDeposits(req: GetOwnerDepositsRequest, apiKey: string | undefined, baseApiUrl: string, authToken?: string, timeoutMs?: number): Promise<GetOwnerDepositsResponse>;
|
|
284
280
|
/**
|
|
285
|
-
* Get
|
|
286
|
-
*/
|
|
287
|
-
declare function apiGetTakerStake(req: GetTakerStakeRequest, baseApiUrl: string, timeoutMs?: number): Promise<GetTakerStakeResponse>;
|
|
288
|
-
/**
|
|
289
|
-
* Get per-platform risk policy and 1:1 stake-backed taking capacity for the
|
|
290
|
-
* taker's effective stake owner (post-PR #200 full-gross model). Platform
|
|
291
|
-
* entries share one stake portfolio and must never be summed.
|
|
281
|
+
* Get taker tier information for a specific address.
|
|
292
282
|
*/
|
|
293
|
-
declare function
|
|
283
|
+
declare function apiGetTakerTier(req: GetTakerTierRequest, baseApiUrl: string, timeoutMs?: number): Promise<GetTakerTierResponse>;
|
|
294
284
|
declare function apiGetReferralDashboard(opts: ApiAdapterOptions & ReferralReadRequest): Promise<ReferralDashboardResponse>;
|
|
295
285
|
declare function apiGetReferralEarnings(opts: ApiAdapterOptions & ReferralReadRequest): Promise<ReferralEarningsResponse>;
|
|
296
286
|
declare function apiLookupReferralCode(code: string, opts: ApiAdapterOptions): Promise<ReferralCodeLookupResponse>;
|
|
@@ -525,6 +515,61 @@ declare const TOKEN_METADATA: {
|
|
|
525
515
|
};
|
|
526
516
|
};
|
|
527
517
|
|
|
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
|
+
|
|
528
573
|
/**
|
|
529
574
|
* Payment method resolution utilities.
|
|
530
575
|
*
|
|
@@ -614,37 +659,6 @@ declare function resolvePaymentMethodHashFromCatalog(processorName: string, cata
|
|
|
614
659
|
*/
|
|
615
660
|
declare function resolvePaymentMethodNameFromHash(hash: string, catalog: PaymentMethodCatalog): string | undefined;
|
|
616
661
|
|
|
617
|
-
/**
|
|
618
|
-
* Exact client-side counterparts of RiskManager's integer formulas
|
|
619
|
-
* (post-PR #200 full-gross generation).
|
|
620
|
-
*
|
|
621
|
-
* Kept inside the public SDK so its generated declarations and runtime remain
|
|
622
|
-
* self-contained for external consumers. PR #200 removed reserve ratios and
|
|
623
|
-
* capacity inversion: chargebackable admission locks the full intent amount
|
|
624
|
-
* 1:1, so stake-backed capacity IS the effective owner's free stake.
|
|
625
|
-
*/
|
|
626
|
-
type IntegerLike = bigint | number | string | {
|
|
627
|
-
toString(): string;
|
|
628
|
-
};
|
|
629
|
-
type RiskMode = 'UNBONDED' | 'STAKE_BACKED' | 'DEFERRED_PAYOUT';
|
|
630
|
-
interface IntentExtensionPenalty {
|
|
631
|
-
penalty: bigint;
|
|
632
|
-
chargeableTime: bigint;
|
|
633
|
-
}
|
|
634
|
-
declare const RISK_BPS_DENOMINATOR = 10000n;
|
|
635
|
-
declare const RISK_SECONDS_PER_HOUR = 3600n;
|
|
636
|
-
declare const RISK_EXTENSION_DENOMINATOR: bigint;
|
|
637
|
-
/** ceil(A * s * T / (10_000 * 1 hour)); returns zero when the curve is disabled. */
|
|
638
|
-
declare function calculateIntentExtensionCost(intentAmount: IntegerLike, extensionTime: IntegerLike, extensionPenaltyBpsPerHour: IntegerLike): bigint;
|
|
639
|
-
/** Charges elapsed post-expiry time, capped by the exact duration purchased. */
|
|
640
|
-
declare function calculateIntentExtensionPenalty(intentAmount: IntegerLike, baseIntentExpiry: IntegerLike, terminalAt: IntegerLike, totalExtensionTime: IntegerLike, extensionPenaltyBpsPerHour: IntegerLike): IntentExtensionPenalty;
|
|
641
|
-
/** Full-gross coverage required at admission; zero when chargebacks are disabled. */
|
|
642
|
-
declare function calculateRequiredCoverage(amount: IntegerLike, chargebackable: boolean): bigint;
|
|
643
|
-
/** Maximum chargebackable intent amount that can use existing stake. */
|
|
644
|
-
declare function calculateStakeBackedCapacity(freeStake: IntegerLike): bigint;
|
|
645
|
-
/** Exact admission mode selected by RiskManager's full-gross policy. */
|
|
646
|
-
declare function selectRiskMode(amount: IntegerLike, freeStake: IntegerLike, chargebackable: boolean, deferredPayoutEnabled: boolean): RiskMode;
|
|
647
|
-
|
|
648
662
|
/**
|
|
649
663
|
* Ensure a value is 32 bytes hex (0x + 64 nibbles). If ascii, keccak256 by default when hash=true.
|
|
650
664
|
*/
|
|
@@ -833,4 +847,4 @@ declare class ContractError extends ZKP2PError {
|
|
|
833
847
|
constructor(message: string, details?: unknown);
|
|
834
848
|
}
|
|
835
849
|
|
|
836
|
-
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,
|
|
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 };
|