@zkp2p/sdk 0.14.10 → 0.15.0-rc.1
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 +211 -28
- package/dist/build-metadata.json +3 -3
- package/dist/chunk-FCGUBJAP.mjs +12 -0
- package/dist/chunk-FCGUBJAP.mjs.map +1 -0
- package/dist/{chunk-PLUTAOT5.mjs → chunk-KWAYQB7K.mjs} +74222 -54270
- package/dist/chunk-KWAYQB7K.mjs.map +1 -0
- package/dist/{currency-74LZHM6Q.mjs → currency-THZHOZ5A.mjs} +3 -3
- package/dist/{currency-74LZHM6Q.mjs.map → currency-THZHOZ5A.mjs.map} +1 -1
- package/dist/index.cjs +80787 -59614
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +48 -65
- package/dist/index.d.ts +48 -65
- package/dist/index.mjs +9062 -7954
- package/dist/index.mjs.map +1 -1
- package/dist/protocolViewerParsers-SPW7UPEH.mjs +5 -0
- package/dist/{protocolViewerParsers-6BOFKH3F.mjs.map → protocolViewerParsers-SPW7UPEH.mjs.map} +1 -1
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.mts +3 -2
- package/dist/react.d.ts +3 -2
- package/dist/react.mjs +1 -1
- package/dist/react.mjs.map +1 -1
- package/dist/{timeout-WX76D6NU.mjs → timeout-JJJQO4B3.mjs} +3 -3
- package/dist/{timeout-WX76D6NU.mjs.map → timeout-JJJQO4B3.mjs.map} +1 -1
- package/dist/{vaultUtils-PRhZBjwX.d.mts → vaultUtils-BJhHYqte.d.mts} +335 -52
- package/dist/{vaultUtils-PRhZBjwX.d.ts → vaultUtils-BJhHYqte.d.ts} +335 -52
- package/package.json +3 -3
- package/dist/chunk-DIHRDN2W.mjs +0 -12
- package/dist/chunk-DIHRDN2W.mjs.map +0 -1
- package/dist/chunk-PLUTAOT5.mjs.map +0 -1
- package/dist/protocolViewerParsers-6BOFKH3F.mjs +0 -5
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { R as ReferrerFeeConfig, S as SellerCredentialBundle, D as DepositWithRelations,
|
|
2
|
-
export {
|
|
3
|
-
import {
|
|
1
|
+
import { I as IndexerClient, R as ReferrerFeeConfig, S as SellerCredentialBundle, D as DepositWithRelations, a as IntentEntity, b as IdentityAttestationRequestBody, A as AttestationServiceIdentityResponse, B as BuyerTeeVerifyPaymentBody, c as AttestationServiceSellerVerifyResponse, d as SellerCredentialUploadInput, e as SellerCredentialUploadPlatform, f as SellerCredentialAttestationRuntime, g as AttestationServiceSellerCredentialUploadResponse, h as BuyerTeeSessionMaterialEncryptionInput, U as UploadSellerCredentialBundleParams, C as CuratorSellerCredentialUploadResponse, i as CreateReferralCodeRequest, j as ApiAdapterOptions, k as CreateReferralCodeResponse, l as ReferralReadRequest, m as ReferralDashboardResponse, n as ReferralEarningsResponse, o as ReferralCodeLookupResponse, p as RedeemReferralCodeRequest, q as RedeemReferralCodeResponse, r as UpdateReferralCodeRequest, s as UpdateReferralCodeResponse, G as GoogleOAuthSellerCredentialPlatform, t as GoogleOAuthSellerCredentialUploadBodyByPlatform, M as MicrosoftOAuthSellerCredentialUploadBodyByPlatform, u as SellerPlatform, v as CuratorSellerCredentialStatusResponse, Q as QuotesBestByPlatformRequest, w as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, x as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, y as PostDepositDetailsResponse, z as GetPayeeDetailsRequest, E as GetPayeeDetailsResponse, F as GetOwnerDepositsRequest, H as GetOwnerDepositsResponse, J as GetDepositBundleParams, K as GetDepositBundleResponse, L as GetOrderbookParams, N as GetOrderbookResponse, O as GetOrderbookTableResponse, T as QuoteRequest, W as QuoteResponse, X as CuratorMetadata, Y as CurrencyType, Z as PaymentMethodCatalog, _ as TxOverrides, $ as RuntimeEnv$1, a0 as DisputeProtectionIntentV2, a1 as DisputeProtectionIntent } from './vaultUtils-BJhHYqte.mjs';
|
|
2
|
+
export { dU as AccessPolicyOperations, dV as AccessPolicyUnsupportedError, ay as ActionCallback, e2 as ActiveDisputeProtectionStack, bh as AmazonPayCredentialUploadInput, bi as AmazonPayIdentityAttestationOutput, b1 as ApiDeposit, b8 as ApiIntentStatus, bL as AttestationServiceSellerCredentialProbeResponse, aw as AuthorizationTokenProvider, dR as BatchResult, aJ as BestByPlatformResponseObject, bM as BuyerTeePaymentParams, bN as BuyerTeePaymentProofInput, bO as BuyerTeeSessionMaterial, aa as CancelIntentMethodParams, aI as CancelIntentParams, bt as CashAppCredentialUploadInput, bk as CashAppSessionMaterial, e4 as CollateralSource, as as ContractRouter, av as ContractRouterConfig, aC as CreateDepositConversionRate, aB as CreateDepositParams, bP as CuratorSellerVerifyResponse, da as Currency, dh as CurrencyData, dt as DISPUTE_PROTECTION_POLICY_ABI, ei as DISPUTE_PROTECTION_POLICY_V2_ABI, eb as DeferredPayout, ec as DeferredPayoutLog, dQ as DelegationDepositTarget, dO as DelegationRoute, dP as DelegationState, dC as Deposit, dE as DepositCurrency, c9 as DepositIntentStatistics, b4 as DepositStatus, b2 as DepositVerifier, b3 as DepositVerifierCurrency, c6 as DepositVerifierData, dB as DepositView, ah as DisputeAttestationConfig, cF as DisputeProtectionIntentPage, cG as DisputeProtectionIntentPageParams, e0 as DisputeProtectionIntentStatus, e3 as DisputeProtectionIntentStatusV2, aj as DisputeProtectionReadinessOptions, ak as DisputeProtectionReadinessResult, ai as DisputeProtectionVerifiedStack, at as EscrowContractContext, aZ as FiatResponse, bK as FulfillIntentAttestationResponse, a9 as FulfillIntentMethodParams, aG as FulfillIntentParams, aK as GetBestByPlatformResponse, aL as GetBestByPlatformResponseObject, b5 as GetDepositByIdRequest, b6 as GetDepositByIdResponse, bd as GetIntentByHashRequest, be as GetIntentByHashResponse, bb as GetIntentsByDepositRequest, bc as GetIntentsByDepositResponse, aP as GetNearbyQuote, aQ as GetNearbySuggestions, b9 as GetOwnerIntentsRequest, ba as GetOwnerIntentsResponse, aM as GetPlatformQuote, aR as GetQuoteResponse, aS as GetQuoteResponseObject, aT as GetQuoteSingleResponse, bU as GetSellerCredentialStatusParams, dW as ICloudMailCredentialError, dY as ICloudMailCredentialErrorReason, dZ as ICloudMailSellerPlatform, b$ as IdentityAttestationActionType, c0 as IdentityAttestationOutput, c1 as IdentityAttestationOutputFor, c2 as IdentityAttestationParams, cH as IndexedDisputeProtectionIntent, cI as IndexedPage, cJ as IndexedPageAsOf, cK as IndexedRiskWindow, cL as IndexedStakeActivity, cN as IndexedStakeLock, cM as IndexedStakeTotals, cO as IndexedStakingRowFreshness, cP as IndexedStakingState, cQ as IndexedStakingStateParams, cR as IndexedTakerAuthorization, cS as IndexedTakerStakeAuthorization, d4 as IndexerDeploymentEnv, cm as IndexerDeposit, cD as IndexerDepositDailySnapshot, cX as IndexerDepositFilter, cC as IndexerDepositFundActivity, cE as IndexerDepositFundActivityType, c_ as IndexerDepositOrderDirection, cZ as IndexerDepositOrderField, cY as IndexerDepositPagination, cp as IndexerDepositPaymentMethod, cg as IndexerDepositService, d7 as IndexerFulfillmentAndPaymentResponse, d5 as IndexerFulfillmentRecord, cn as IndexerIntentFulfilled, co as IndexerIntentFulfillmentAmounts, cr as IndexerIntentStatus, cv as IndexerManagerAggregateStats, cx as IndexerManagerDailySnapshot, cw as IndexerManagerStats, cA as IndexerManualRateUpdate, cq as IndexerMethodCurrency, cB as IndexerOracleConfigUpdate, d6 as IndexerPaymentVerifiedRecord, cs as IndexerRateManager, cu as IndexerRateManagerDelegation, d1 as IndexerRateManagerDelegationPagination, cz as IndexerRateManagerDetail, c$ as IndexerRateManagerFilter, cy as IndexerRateManagerListItem, d3 as IndexerRateManagerOrderDirection, d2 as IndexerRateManagerOrderField, d0 as IndexerRateManagerPagination, ct as IndexerRateManagerRate, ch as IndexerRateManagerService, ck as IndexerStakingService, b7 as Intent, aq as IntentGuardianErrorCode, am as IntentGuardianPolicy, an as IntentGuardianQuote, ao as IntentGuardianWriteFunction, ap as IntentGuardianWriteParams, dG as IntentView, c3 as MakerIdentityAttestationRequestBody, c4 as MakerIdentityPlatform, a$ as NearbyQuote, b0 as NearbySuggestions, ds as ORCHESTRATOR_V3_ABI, eh as ORCHESTRATOR_V4_ABI, a2 as OfframpClient, c5 as OnchainCurrency, dH as OnchainIntent, au as OrchestratorContractContext, c8 as OrderStats, cd as OrderbookEntry, ce as OrderbookTableRow, d8 as PAYMENT_PLATFORMS, bp as PayPalGoogleOAuthSellerCredentialUploadBody, dD as PaymentMethodData, d9 as PaymentPlatformType, ea as PayoutSettlement, e5 as PayoutState, e9 as PayoutStatus, aN as PlatformQuote, c7 as PreparedTransaction, aY as QuoteFeesResponse, aX as QuoteIntentResponse, aV as QuoteMakerIdentity, aO as QuotePreference, aU as QuoteResponseObject, aW as QuoteSingleResponse, aD as Range, al as ReadDisputeAttestationConfigParams, a6 as RedeemReferralCodeSignatureOptions, a3 as ReferralBearerWriteOptions, dF as ReferralFee, a4 as ReferralReadOptions, az as ReferralRedemption, aA as ReferralSignatureBody, a5 as ReferralSignatureOptions, bf as RegisterPayeeDetailsRequest, bg as RegisterPayeeDetailsResponse, bQ as RegisteredSellerCredentialPlatform, bS as RegisteredUploadSellerCredentialParams, aH as ReleaseFundsToPayerParams, du as STAKE_VAULT_ABI, eg as STAKE_VAULT_V2_ABI, bI as SellerAttestationOutput, bw as SellerCiphertextBundle, bB as SellerCredentialBundleUpload, bJ as SellerCredentialProbeResponse, bD as SellerCredentialStatus, bC as SellerCredentialStatusValue, bv as SellerCredentialUploadInputByPlatform, bH as SellerPaymentTypedDataValue, bA as SellerProbeInput, bx as SellerSignedCiphertextBundle, bF as SellerTypedDataField, bG as SellerTypedDataSpec, bz as SellerVerifyInput, by as SellerVerifyIntentDetails, bE as SellerVerifyProxyBody, dT as SendBatchFn, dS as SendTransactionFn, a8 as SignalIntentMethodParams, aF as SignalIntentParams, a7 as SignalIntentReferralFee, cT as StakeActivityPageParams, cb as StakeEnvironment, cU as StakeLockPageParams, ad as StakeVaultState, ae as StakeVaultWriteFunction, af as StakeVaultWriteParams, cV as StakingEntityIds, cW as TakerStakeAuthorizationPageParams, cc as TakerStakeBalances, ax as TimeoutConfig, a_ as TokenResponse, ab as UpdateReferralCodeSignatureOptions, bY as UploadGoogleOAuthSellerCredentialParams, d_ as UploadICloudMailSellerCredentialOptions, d$ as UploadICloudMailSellerCredentialParams, bZ as UploadMicrosoftOAuthSellerCredentialParams, bV as UploadPayPalGoogleOAuthSellerCredentialParams, bT as UploadSellerCredentialOptions, bR as UploadSellerCredentialParams, bW as UploadVenmoGoogleOAuthSellerCredentialParams, bX as UploadXMoneyGoogleOAuthSellerCredentialParams, ca as UsdcAmount, dw as V2ContractAbis, dv as V2ContractAddresses, bs as VenmoCredentialUploadInput, bq as VenmoGoogleOAuthSellerCredentialUploadBody, bj as VenmoSessionMaterial, b_ as VerifySellerPaymentParams, bu as WiseCredentialUploadInput, bm as WiseProfileInfo, bo as WiseProfileNotFound, bn as WiseProfileSelectionRequired, bl as WiseSessionMaterial, aE as WithdrawDepositParams, br as XMoneyGoogleOAuthSellerCredentialUploadBody, dI as ZERO_RATE_MANAGER_ID, a2 as Zkp2pClient, ac as Zkp2pClientOptions, cj as buildStakingEntityIds, dN as classifyDelegationState, ar as classifyIntentGuardianError, ci as compareEventCursorIdsByRecency, db as currencyInfo, cf as defaultIndexerEndpoint, dz as enrichPvDepositView, dA as enrichPvIntentView, cl as fetchIndexerFulfillmentAndPayment, di as getContracts, de as getCurrencyCodeFromHash, dd as getCurrencyInfoFromCountryCode, dc as getCurrencyInfoFromHash, dM as getDelegationRoute, dp as getDisputeProtectionPolicyContract, ee as getDisputeProtectionPolicyV2Contract, dr as getGatingServiceAddress, dj as getIntentGuardianContract, dn as getOrchestratorV3Contract, ed as getOrchestratorV4Contract, dq as getPaymentMethodsCatalog, dl as getRateManagerContracts, dm as getStakeVaultContract, ef as getStakeVaultV2Contract, dk as hasIntentGuardian, dX as isMailboxSellerCredentialType, df as isSupportedCurrencyHash, dJ as isZeroRateManagerId, dg as mapConversionRatesToOnchainMinRate, dK as normalizeRateManagerId, dL as normalizeRegistry, e7 as parseDeferredPayoutFromLogs, dx as parseDepositView, e1 as parseDisputeProtectionIntent, e6 as parseDisputeProtectionIntentV2, dy as parseIntentView, e8 as parsePayoutSettlementFromLogs, ag as readDisputeAttestationConfig } from './vaultUtils-BJhHYqte.mjs';
|
|
3
|
+
import { DisputeWindowPaymentMethod } from '@zkp2p/zkp2p-attestation';
|
|
4
|
+
export { DISPUTE_WINDOW_POLICY, DisputeActionTypeByPlatform, DisputeAttestationOutput, DisputeAttestationOutputFor, DisputeDetails, DisputePlatform, DisputeWindowPaymentMethod, IdentityActionType, IdentityActionTypeByPlatform, IdentityParamsByPlatform, IdentityPlatform, NitroAttestationClient, NitroAttestationClientOptions, NitroAttestationEnvironment, VerifiedAttestation, VerifiedAttestationPayload, createNitroAttestationClient, getDefaultDisputeWindow, verifyDisputeAttestation } from '@zkp2p/zkp2p-attestation';
|
|
5
|
+
import { Hash, Address, Hex, WalletClient, PublicClient } from 'viem';
|
|
4
6
|
import { Abi } from 'abitype';
|
|
5
|
-
export { DisputeActionTypeByPlatform, DisputeAttestationOutput, DisputeAttestationOutputFor, DisputeDetails, DisputePlatform, IdentityActionType, IdentityActionTypeByPlatform, IdentityParamsByPlatform, IdentityPlatform, NitroAttestationClient, NitroAttestationClientOptions, NitroAttestationEnvironment, VerifiedAttestation, VerifiedAttestationPayload, createNitroAttestationClient, verifyDisputeAttestation } from '@zkp2p/zkp2p-attestation';
|
|
6
7
|
import '@zkp2p/indexer-schema';
|
|
7
8
|
|
|
9
|
+
type SettlementPolicyIndexer = Pick<IndexerClient, 'query'>;
|
|
10
|
+
|
|
8
11
|
interface EscrowRange {
|
|
9
12
|
min: bigint;
|
|
10
13
|
max: bigint;
|
|
@@ -146,66 +149,6 @@ declare const REFERRAL_SIGNATURE_TYPES: {
|
|
|
146
149
|
}];
|
|
147
150
|
};
|
|
148
151
|
|
|
149
|
-
interface EscrowContractContext {
|
|
150
|
-
address: Address;
|
|
151
|
-
abi: Abi;
|
|
152
|
-
orchestratorAddress?: Address;
|
|
153
|
-
orchestratorAbi?: Abi;
|
|
154
|
-
version: 'v2';
|
|
155
|
-
}
|
|
156
|
-
interface OrchestratorContractContext {
|
|
157
|
-
address: Address;
|
|
158
|
-
abi: Abi;
|
|
159
|
-
version: 'v2' | 'v3';
|
|
160
|
-
}
|
|
161
|
-
interface ContractRouterConfig {
|
|
162
|
-
escrowAddress: Address;
|
|
163
|
-
escrowAbi: Abi;
|
|
164
|
-
escrowV2Address?: Address;
|
|
165
|
-
escrowV2Abi?: Abi;
|
|
166
|
-
escrowAddresses: Address[];
|
|
167
|
-
orchestratorAddress?: Address;
|
|
168
|
-
orchestratorAbi?: Abi;
|
|
169
|
-
orchestratorV2Address?: Address;
|
|
170
|
-
orchestratorV2Abi?: Abi;
|
|
171
|
-
orchestratorV3Address?: Address;
|
|
172
|
-
orchestratorV3Abi?: Abi;
|
|
173
|
-
orchestratorAddresses: Address[];
|
|
174
|
-
}
|
|
175
|
-
declare class ContractRouter {
|
|
176
|
-
private readonly _escrowContextsByAddress;
|
|
177
|
-
private readonly _orchestratorContextsByAddress;
|
|
178
|
-
readonly escrowAddress: Address;
|
|
179
|
-
readonly escrowAbi: Abi;
|
|
180
|
-
readonly escrowV2Address?: Address;
|
|
181
|
-
readonly escrowV2Abi?: Abi;
|
|
182
|
-
readonly escrowAddresses: Address[];
|
|
183
|
-
readonly orchestratorAddress?: Address;
|
|
184
|
-
readonly orchestratorAbi?: Abi;
|
|
185
|
-
readonly orchestratorV2Address?: Address;
|
|
186
|
-
readonly orchestratorV2Abi?: Abi;
|
|
187
|
-
readonly orchestratorV3Address?: Address;
|
|
188
|
-
readonly orchestratorV3Abi?: Abi;
|
|
189
|
-
readonly orchestratorAddresses: Address[];
|
|
190
|
-
constructor(config: ContractRouterConfig);
|
|
191
|
-
private _registerContexts;
|
|
192
|
-
getEscrowContextByAddress(address?: Address): EscrowContractContext | undefined;
|
|
193
|
-
getOrchestratorContextByAddress(address?: Address): OrchestratorContractContext | undefined;
|
|
194
|
-
resolveEscrowContext(options?: {
|
|
195
|
-
escrowAddress?: Address;
|
|
196
|
-
depositId?: bigint | number | string;
|
|
197
|
-
}): EscrowContractContext;
|
|
198
|
-
getEscrowContexts(): EscrowContractContext[];
|
|
199
|
-
resolveOrchestratorForEscrow(escrowAddress?: Address): OrchestratorContractContext | undefined;
|
|
200
|
-
buildProtocolViewerContexts(options?: {
|
|
201
|
-
escrowAddress?: Address;
|
|
202
|
-
orchestratorAddress?: Address;
|
|
203
|
-
}): Array<{
|
|
204
|
-
escrow: Address;
|
|
205
|
-
orchestrator: Address;
|
|
206
|
-
}>;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
152
|
type PeerConnectionStatus = 'connected' | 'disconnected' | 'pending';
|
|
210
153
|
type PeerMetadataCaptureMode = 'buyerTee' | 'sellerCredential';
|
|
211
154
|
type PeerAuthenticateParams = {
|
|
@@ -1029,6 +972,29 @@ declare function openVenmoGmailConnect(options: Omit<Parameters<typeof getVenmoG
|
|
|
1029
972
|
popup?: VenmoGmailPopupOptions;
|
|
1030
973
|
}): Promise<VenmoGmailConnectResult>;
|
|
1031
974
|
|
|
975
|
+
declare enum PolicyGeneration {
|
|
976
|
+
V2 = "v2",
|
|
977
|
+
V1 = "v1"
|
|
978
|
+
}
|
|
979
|
+
type DisputeProtectionIntentLookup = {
|
|
980
|
+
generation: PolicyGeneration.V2;
|
|
981
|
+
policyAddress: Address;
|
|
982
|
+
intent: DisputeProtectionIntentV2;
|
|
983
|
+
} | {
|
|
984
|
+
generation: PolicyGeneration.V1;
|
|
985
|
+
policyAddress: Address;
|
|
986
|
+
intent: DisputeProtectionIntent;
|
|
987
|
+
};
|
|
988
|
+
/** Search each generation at the same block; failed reads never mean no protection. */
|
|
989
|
+
declare function findDisputeProtectionIntent({ publicClient, chainId, environment, intentHash, blockNumber, indexer, }: {
|
|
990
|
+
publicClient: PublicClient;
|
|
991
|
+
chainId: number;
|
|
992
|
+
environment?: RuntimeEnv$1;
|
|
993
|
+
intentHash: Hex;
|
|
994
|
+
blockNumber?: bigint;
|
|
995
|
+
indexer?: SettlementPolicyIndexer;
|
|
996
|
+
}): Promise<DisputeProtectionIntentLookup | null>;
|
|
997
|
+
|
|
1032
998
|
declare class XMoneyConnectError extends Error {
|
|
1033
999
|
readonly code: string;
|
|
1034
1000
|
constructor(code: string, message: string);
|
|
@@ -1051,4 +1017,21 @@ declare function openXMoneyConnect(options: Omit<XMoneyConnectOptions, 'returnUr
|
|
|
1051
1017
|
popup?: VenmoGmailPopupOptions;
|
|
1052
1018
|
}): Promise<XMoneyConnectResult>;
|
|
1053
1019
|
|
|
1054
|
-
|
|
1020
|
+
/** Quote-time possibility only; the attestor signs the actual window at fulfilment. */
|
|
1021
|
+
declare function mayRequireDisputeProtection({ paymentMethod, depositToken, stakeToken, whitelistEnabled, takerIsRelayer, relayerBypassOptedOut, }: {
|
|
1022
|
+
paymentMethod: DisputeWindowPaymentMethod;
|
|
1023
|
+
depositToken: Address;
|
|
1024
|
+
/** The vault's stake token (USDC), resolved for the target environment. */
|
|
1025
|
+
stakeToken: Address;
|
|
1026
|
+
/** Whether the deposit+method whitelist is enabled, independent of membership. */
|
|
1027
|
+
whitelistEnabled: boolean;
|
|
1028
|
+
/**
|
|
1029
|
+
* isWhitelistedRelayer(taker) on OrchestratorV4's current relayerRegistry(), read at the same
|
|
1030
|
+
* block as other quote inputs. The policy reads that registry at settlement; not whitelist membership.
|
|
1031
|
+
*/
|
|
1032
|
+
takerIsRelayer: boolean;
|
|
1033
|
+
/** Deposit-wide opt-out; the on-chain and indexer default is false. */
|
|
1034
|
+
relayerBypassOptedOut: boolean;
|
|
1035
|
+
}): boolean;
|
|
1036
|
+
|
|
1037
|
+
export { APIError, ApiAdapterOptions, AttestationServiceIdentityResponse, AttestationServiceSellerCredentialUploadResponse, AttestationServiceSellerVerifyResponse, BASE_BUILDER_CODE, BestByPlatformResponse, BuyerTeeSessionMaterialEncryptionInput, BuyerTeeVerifyPaymentBody, CHAINLINK_ORACLE_ADAPTER, CHAINLINK_ORACLE_FEEDS, ContractError, CreateReferralCodeRequest, CreateReferralCodeResponse, CuratorSellerCredentialStatusResponse, CuratorSellerCredentialUploadResponse, CurrencyType, DEFAULT_ORACLE_MAX_STALENESS_SECONDS, DisputeProtectionIntent, type DisputeProtectionIntentLookup, DisputeProtectionIntentV2, ErrorCode, type EscrowDepositView, type EscrowIntentView, GetDepositBundleParams, GetDepositBundleResponse, GetOrderbookParams, GetOrderbookResponse, GetOrderbookTableResponse, GetOwnerDepositsRequest, GetOwnerDepositsResponse, GetPayeeDetailsRequest, GetPayeeDetailsResponse, GoogleOAuthSellerCredentialPlatform, GoogleOAuthSellerCredentialUploadBodyByPlatform, IdentityAttestationRequestBody, IndexerClient, DepositWithRelations as IndexerDepositWithRelations, IntentEntity as IndexerIntent, type IntegerLike, type LogLevel, MicrosoftOAuthSellerCredentialUploadBodyByPlatform, type MulticallClient, NetworkError, type OracleAdapterOverrides, type OracleKind, 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 PeerMetadataRow, type PeerSarCredentialCapture, PolicyGeneration, PostDepositDetailsRequest, PostDepositDetailsResponse, type PythFeedConfig, QuoteRequest, QuoteResponse, QuotesBestByPlatformRequest, REFERRAL_SIGNATURE_DOMAIN, REFERRAL_SIGNATURE_TYPES, RISK_BPS_DENOMINATOR, RedeemReferralCodeRequest, RedeemReferralCodeResponse, ReferralCodeLookupResponse, ReferralDashboardResponse, ReferralEarningsResponse, ReferralReadRequest, ReferrerFeeConfig, type RiskMode, RuntimeEnv$1 as RuntimeEnv, SDK_BUILD_METADATA, SPREAD_ORACLE_FEEDS, SUPPORTED_CHAIN_IDS, type SdkBuildMetadata, SellerCredentialAttestationRuntime, SellerCredentialBundle, SellerCredentialUploadInput, SellerCredentialUploadPlatform, SellerPlatform, type SignIntentApiOptions, type SignIntentV3ReferralFee, type SignIntentV3Request, type SignIntentV3ResponseObject, type SignIntentV3Result, type SpreadOracleConfig, type SpreadOracleFeedConfig, type SupportedChainId, TOKEN_METADATA, TxOverrides, UpdateReferralCodeRequest, UpdateReferralCodeResponse, UploadSellerCredentialBundleParams, ValidatePayeeDetailsRequest, ValidatePayeeDetailsResponse, ValidationError, type VenmoGmailAppearance, VenmoGmailConnectError, type VenmoGmailConnectResult, type VenmoGmailPopupOptions, XMoneyConnectError, type XMoneyConnectOptions, type XMoneyConnectResult, ZKP2PError, ZKP2P_ANDROID_REFERRER, ZKP2P_IOS_REFERRER, apiCreateReferralCode, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOrderbookTable, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuote, apiGetQuotesBestByPlatform, apiGetReferralDashboard, apiGetReferralEarnings, apiGetSellerCredentialStatus, apiLookupReferralCode, apiPostDepositDetails, apiRedeemReferralCode, apiRequestIdentityAttestation, apiSignIntentV3, apiSignIntentV3Raw, apiUpdateReferralCode, apiUploadGoogleOAuthSellerCredential, apiUploadMicrosoftOAuthSellerCredential, apiUploadSellerCredentialBundle, apiValidatePayeeDetails, apiVerifyBuyerTeePayment, appendAttributionToCalldata, asciiToBytes32, assertValidReferrerFeeConfig, calculateRequiredCoverage, calculateStakeBackedCapacity, convertDepositsForLiquidity, convertIndexerDepositToEscrowView, convertIndexerIntentsToEscrowViews, createCompositeDepositId, createEncryptedBuyerTeeSessionMaterial, createPeerExtensionSdk, encodePythAdapterConfig, encodeSpreadOracleAdapterConfig, encodeWithAttribution, ensureBytes32, findDisputeProtectionIntent, getAmazonPaySellerIdentity, getAttributionDataSuffix, getPeerExtensionState, getSpreadOracleConfig, getVenmoGmailConnectUrl, getXMoneyConnectUrl, isPeerExtensionAvailable, isValidReferralCode, isValidReferrerFeeBps, isValidReferrerFeeRecipient, logger, mayRequireDisputeProtection, normalizeReferralCode, openPeerExtensionInstallPage, openVenmoGmailConnect, openXMoneyConnect, parseReferrerFeeConfig, parseVenmoGmailAppearance, peerExtensionSdk, referrerFeeConfigToPreciseUnits, resolveFiatCurrencyBytes32, resolvePaymentMethodHash, resolvePaymentMethodHashFromCatalog, resolvePaymentMethodNameFromHash, selectRiskMode, sendTransactionWithAttribution, setLogLevel, validateOracleFeedsOnChain };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { R as ReferrerFeeConfig, S as SellerCredentialBundle, D as DepositWithRelations,
|
|
2
|
-
export {
|
|
3
|
-
import {
|
|
1
|
+
import { I as IndexerClient, R as ReferrerFeeConfig, S as SellerCredentialBundle, D as DepositWithRelations, a as IntentEntity, b as IdentityAttestationRequestBody, A as AttestationServiceIdentityResponse, B as BuyerTeeVerifyPaymentBody, c as AttestationServiceSellerVerifyResponse, d as SellerCredentialUploadInput, e as SellerCredentialUploadPlatform, f as SellerCredentialAttestationRuntime, g as AttestationServiceSellerCredentialUploadResponse, h as BuyerTeeSessionMaterialEncryptionInput, U as UploadSellerCredentialBundleParams, C as CuratorSellerCredentialUploadResponse, i as CreateReferralCodeRequest, j as ApiAdapterOptions, k as CreateReferralCodeResponse, l as ReferralReadRequest, m as ReferralDashboardResponse, n as ReferralEarningsResponse, o as ReferralCodeLookupResponse, p as RedeemReferralCodeRequest, q as RedeemReferralCodeResponse, r as UpdateReferralCodeRequest, s as UpdateReferralCodeResponse, G as GoogleOAuthSellerCredentialPlatform, t as GoogleOAuthSellerCredentialUploadBodyByPlatform, M as MicrosoftOAuthSellerCredentialUploadBodyByPlatform, u as SellerPlatform, v as CuratorSellerCredentialStatusResponse, Q as QuotesBestByPlatformRequest, w as BestByPlatformResponse, V as ValidatePayeeDetailsRequest, x as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, y as PostDepositDetailsResponse, z as GetPayeeDetailsRequest, E as GetPayeeDetailsResponse, F as GetOwnerDepositsRequest, H as GetOwnerDepositsResponse, J as GetDepositBundleParams, K as GetDepositBundleResponse, L as GetOrderbookParams, N as GetOrderbookResponse, O as GetOrderbookTableResponse, T as QuoteRequest, W as QuoteResponse, X as CuratorMetadata, Y as CurrencyType, Z as PaymentMethodCatalog, _ as TxOverrides, $ as RuntimeEnv$1, a0 as DisputeProtectionIntentV2, a1 as DisputeProtectionIntent } from './vaultUtils-BJhHYqte.js';
|
|
2
|
+
export { dU as AccessPolicyOperations, dV as AccessPolicyUnsupportedError, ay as ActionCallback, e2 as ActiveDisputeProtectionStack, bh as AmazonPayCredentialUploadInput, bi as AmazonPayIdentityAttestationOutput, b1 as ApiDeposit, b8 as ApiIntentStatus, bL as AttestationServiceSellerCredentialProbeResponse, aw as AuthorizationTokenProvider, dR as BatchResult, aJ as BestByPlatformResponseObject, bM as BuyerTeePaymentParams, bN as BuyerTeePaymentProofInput, bO as BuyerTeeSessionMaterial, aa as CancelIntentMethodParams, aI as CancelIntentParams, bt as CashAppCredentialUploadInput, bk as CashAppSessionMaterial, e4 as CollateralSource, as as ContractRouter, av as ContractRouterConfig, aC as CreateDepositConversionRate, aB as CreateDepositParams, bP as CuratorSellerVerifyResponse, da as Currency, dh as CurrencyData, dt as DISPUTE_PROTECTION_POLICY_ABI, ei as DISPUTE_PROTECTION_POLICY_V2_ABI, eb as DeferredPayout, ec as DeferredPayoutLog, dQ as DelegationDepositTarget, dO as DelegationRoute, dP as DelegationState, dC as Deposit, dE as DepositCurrency, c9 as DepositIntentStatistics, b4 as DepositStatus, b2 as DepositVerifier, b3 as DepositVerifierCurrency, c6 as DepositVerifierData, dB as DepositView, ah as DisputeAttestationConfig, cF as DisputeProtectionIntentPage, cG as DisputeProtectionIntentPageParams, e0 as DisputeProtectionIntentStatus, e3 as DisputeProtectionIntentStatusV2, aj as DisputeProtectionReadinessOptions, ak as DisputeProtectionReadinessResult, ai as DisputeProtectionVerifiedStack, at as EscrowContractContext, aZ as FiatResponse, bK as FulfillIntentAttestationResponse, a9 as FulfillIntentMethodParams, aG as FulfillIntentParams, aK as GetBestByPlatformResponse, aL as GetBestByPlatformResponseObject, b5 as GetDepositByIdRequest, b6 as GetDepositByIdResponse, bd as GetIntentByHashRequest, be as GetIntentByHashResponse, bb as GetIntentsByDepositRequest, bc as GetIntentsByDepositResponse, aP as GetNearbyQuote, aQ as GetNearbySuggestions, b9 as GetOwnerIntentsRequest, ba as GetOwnerIntentsResponse, aM as GetPlatformQuote, aR as GetQuoteResponse, aS as GetQuoteResponseObject, aT as GetQuoteSingleResponse, bU as GetSellerCredentialStatusParams, dW as ICloudMailCredentialError, dY as ICloudMailCredentialErrorReason, dZ as ICloudMailSellerPlatform, b$ as IdentityAttestationActionType, c0 as IdentityAttestationOutput, c1 as IdentityAttestationOutputFor, c2 as IdentityAttestationParams, cH as IndexedDisputeProtectionIntent, cI as IndexedPage, cJ as IndexedPageAsOf, cK as IndexedRiskWindow, cL as IndexedStakeActivity, cN as IndexedStakeLock, cM as IndexedStakeTotals, cO as IndexedStakingRowFreshness, cP as IndexedStakingState, cQ as IndexedStakingStateParams, cR as IndexedTakerAuthorization, cS as IndexedTakerStakeAuthorization, d4 as IndexerDeploymentEnv, cm as IndexerDeposit, cD as IndexerDepositDailySnapshot, cX as IndexerDepositFilter, cC as IndexerDepositFundActivity, cE as IndexerDepositFundActivityType, c_ as IndexerDepositOrderDirection, cZ as IndexerDepositOrderField, cY as IndexerDepositPagination, cp as IndexerDepositPaymentMethod, cg as IndexerDepositService, d7 as IndexerFulfillmentAndPaymentResponse, d5 as IndexerFulfillmentRecord, cn as IndexerIntentFulfilled, co as IndexerIntentFulfillmentAmounts, cr as IndexerIntentStatus, cv as IndexerManagerAggregateStats, cx as IndexerManagerDailySnapshot, cw as IndexerManagerStats, cA as IndexerManualRateUpdate, cq as IndexerMethodCurrency, cB as IndexerOracleConfigUpdate, d6 as IndexerPaymentVerifiedRecord, cs as IndexerRateManager, cu as IndexerRateManagerDelegation, d1 as IndexerRateManagerDelegationPagination, cz as IndexerRateManagerDetail, c$ as IndexerRateManagerFilter, cy as IndexerRateManagerListItem, d3 as IndexerRateManagerOrderDirection, d2 as IndexerRateManagerOrderField, d0 as IndexerRateManagerPagination, ct as IndexerRateManagerRate, ch as IndexerRateManagerService, ck as IndexerStakingService, b7 as Intent, aq as IntentGuardianErrorCode, am as IntentGuardianPolicy, an as IntentGuardianQuote, ao as IntentGuardianWriteFunction, ap as IntentGuardianWriteParams, dG as IntentView, c3 as MakerIdentityAttestationRequestBody, c4 as MakerIdentityPlatform, a$ as NearbyQuote, b0 as NearbySuggestions, ds as ORCHESTRATOR_V3_ABI, eh as ORCHESTRATOR_V4_ABI, a2 as OfframpClient, c5 as OnchainCurrency, dH as OnchainIntent, au as OrchestratorContractContext, c8 as OrderStats, cd as OrderbookEntry, ce as OrderbookTableRow, d8 as PAYMENT_PLATFORMS, bp as PayPalGoogleOAuthSellerCredentialUploadBody, dD as PaymentMethodData, d9 as PaymentPlatformType, ea as PayoutSettlement, e5 as PayoutState, e9 as PayoutStatus, aN as PlatformQuote, c7 as PreparedTransaction, aY as QuoteFeesResponse, aX as QuoteIntentResponse, aV as QuoteMakerIdentity, aO as QuotePreference, aU as QuoteResponseObject, aW as QuoteSingleResponse, aD as Range, al as ReadDisputeAttestationConfigParams, a6 as RedeemReferralCodeSignatureOptions, a3 as ReferralBearerWriteOptions, dF as ReferralFee, a4 as ReferralReadOptions, az as ReferralRedemption, aA as ReferralSignatureBody, a5 as ReferralSignatureOptions, bf as RegisterPayeeDetailsRequest, bg as RegisterPayeeDetailsResponse, bQ as RegisteredSellerCredentialPlatform, bS as RegisteredUploadSellerCredentialParams, aH as ReleaseFundsToPayerParams, du as STAKE_VAULT_ABI, eg as STAKE_VAULT_V2_ABI, bI as SellerAttestationOutput, bw as SellerCiphertextBundle, bB as SellerCredentialBundleUpload, bJ as SellerCredentialProbeResponse, bD as SellerCredentialStatus, bC as SellerCredentialStatusValue, bv as SellerCredentialUploadInputByPlatform, bH as SellerPaymentTypedDataValue, bA as SellerProbeInput, bx as SellerSignedCiphertextBundle, bF as SellerTypedDataField, bG as SellerTypedDataSpec, bz as SellerVerifyInput, by as SellerVerifyIntentDetails, bE as SellerVerifyProxyBody, dT as SendBatchFn, dS as SendTransactionFn, a8 as SignalIntentMethodParams, aF as SignalIntentParams, a7 as SignalIntentReferralFee, cT as StakeActivityPageParams, cb as StakeEnvironment, cU as StakeLockPageParams, ad as StakeVaultState, ae as StakeVaultWriteFunction, af as StakeVaultWriteParams, cV as StakingEntityIds, cW as TakerStakeAuthorizationPageParams, cc as TakerStakeBalances, ax as TimeoutConfig, a_ as TokenResponse, ab as UpdateReferralCodeSignatureOptions, bY as UploadGoogleOAuthSellerCredentialParams, d_ as UploadICloudMailSellerCredentialOptions, d$ as UploadICloudMailSellerCredentialParams, bZ as UploadMicrosoftOAuthSellerCredentialParams, bV as UploadPayPalGoogleOAuthSellerCredentialParams, bT as UploadSellerCredentialOptions, bR as UploadSellerCredentialParams, bW as UploadVenmoGoogleOAuthSellerCredentialParams, bX as UploadXMoneyGoogleOAuthSellerCredentialParams, ca as UsdcAmount, dw as V2ContractAbis, dv as V2ContractAddresses, bs as VenmoCredentialUploadInput, bq as VenmoGoogleOAuthSellerCredentialUploadBody, bj as VenmoSessionMaterial, b_ as VerifySellerPaymentParams, bu as WiseCredentialUploadInput, bm as WiseProfileInfo, bo as WiseProfileNotFound, bn as WiseProfileSelectionRequired, bl as WiseSessionMaterial, aE as WithdrawDepositParams, br as XMoneyGoogleOAuthSellerCredentialUploadBody, dI as ZERO_RATE_MANAGER_ID, a2 as Zkp2pClient, ac as Zkp2pClientOptions, cj as buildStakingEntityIds, dN as classifyDelegationState, ar as classifyIntentGuardianError, ci as compareEventCursorIdsByRecency, db as currencyInfo, cf as defaultIndexerEndpoint, dz as enrichPvDepositView, dA as enrichPvIntentView, cl as fetchIndexerFulfillmentAndPayment, di as getContracts, de as getCurrencyCodeFromHash, dd as getCurrencyInfoFromCountryCode, dc as getCurrencyInfoFromHash, dM as getDelegationRoute, dp as getDisputeProtectionPolicyContract, ee as getDisputeProtectionPolicyV2Contract, dr as getGatingServiceAddress, dj as getIntentGuardianContract, dn as getOrchestratorV3Contract, ed as getOrchestratorV4Contract, dq as getPaymentMethodsCatalog, dl as getRateManagerContracts, dm as getStakeVaultContract, ef as getStakeVaultV2Contract, dk as hasIntentGuardian, dX as isMailboxSellerCredentialType, df as isSupportedCurrencyHash, dJ as isZeroRateManagerId, dg as mapConversionRatesToOnchainMinRate, dK as normalizeRateManagerId, dL as normalizeRegistry, e7 as parseDeferredPayoutFromLogs, dx as parseDepositView, e1 as parseDisputeProtectionIntent, e6 as parseDisputeProtectionIntentV2, dy as parseIntentView, e8 as parsePayoutSettlementFromLogs, ag as readDisputeAttestationConfig } from './vaultUtils-BJhHYqte.js';
|
|
3
|
+
import { DisputeWindowPaymentMethod } from '@zkp2p/zkp2p-attestation';
|
|
4
|
+
export { DISPUTE_WINDOW_POLICY, DisputeActionTypeByPlatform, DisputeAttestationOutput, DisputeAttestationOutputFor, DisputeDetails, DisputePlatform, DisputeWindowPaymentMethod, IdentityActionType, IdentityActionTypeByPlatform, IdentityParamsByPlatform, IdentityPlatform, NitroAttestationClient, NitroAttestationClientOptions, NitroAttestationEnvironment, VerifiedAttestation, VerifiedAttestationPayload, createNitroAttestationClient, getDefaultDisputeWindow, verifyDisputeAttestation } from '@zkp2p/zkp2p-attestation';
|
|
5
|
+
import { Hash, Address, Hex, WalletClient, PublicClient } from 'viem';
|
|
4
6
|
import { Abi } from 'abitype';
|
|
5
|
-
export { DisputeActionTypeByPlatform, DisputeAttestationOutput, DisputeAttestationOutputFor, DisputeDetails, DisputePlatform, IdentityActionType, IdentityActionTypeByPlatform, IdentityParamsByPlatform, IdentityPlatform, NitroAttestationClient, NitroAttestationClientOptions, NitroAttestationEnvironment, VerifiedAttestation, VerifiedAttestationPayload, createNitroAttestationClient, verifyDisputeAttestation } from '@zkp2p/zkp2p-attestation';
|
|
6
7
|
import '@zkp2p/indexer-schema';
|
|
7
8
|
|
|
9
|
+
type SettlementPolicyIndexer = Pick<IndexerClient, 'query'>;
|
|
10
|
+
|
|
8
11
|
interface EscrowRange {
|
|
9
12
|
min: bigint;
|
|
10
13
|
max: bigint;
|
|
@@ -146,66 +149,6 @@ declare const REFERRAL_SIGNATURE_TYPES: {
|
|
|
146
149
|
}];
|
|
147
150
|
};
|
|
148
151
|
|
|
149
|
-
interface EscrowContractContext {
|
|
150
|
-
address: Address;
|
|
151
|
-
abi: Abi;
|
|
152
|
-
orchestratorAddress?: Address;
|
|
153
|
-
orchestratorAbi?: Abi;
|
|
154
|
-
version: 'v2';
|
|
155
|
-
}
|
|
156
|
-
interface OrchestratorContractContext {
|
|
157
|
-
address: Address;
|
|
158
|
-
abi: Abi;
|
|
159
|
-
version: 'v2' | 'v3';
|
|
160
|
-
}
|
|
161
|
-
interface ContractRouterConfig {
|
|
162
|
-
escrowAddress: Address;
|
|
163
|
-
escrowAbi: Abi;
|
|
164
|
-
escrowV2Address?: Address;
|
|
165
|
-
escrowV2Abi?: Abi;
|
|
166
|
-
escrowAddresses: Address[];
|
|
167
|
-
orchestratorAddress?: Address;
|
|
168
|
-
orchestratorAbi?: Abi;
|
|
169
|
-
orchestratorV2Address?: Address;
|
|
170
|
-
orchestratorV2Abi?: Abi;
|
|
171
|
-
orchestratorV3Address?: Address;
|
|
172
|
-
orchestratorV3Abi?: Abi;
|
|
173
|
-
orchestratorAddresses: Address[];
|
|
174
|
-
}
|
|
175
|
-
declare class ContractRouter {
|
|
176
|
-
private readonly _escrowContextsByAddress;
|
|
177
|
-
private readonly _orchestratorContextsByAddress;
|
|
178
|
-
readonly escrowAddress: Address;
|
|
179
|
-
readonly escrowAbi: Abi;
|
|
180
|
-
readonly escrowV2Address?: Address;
|
|
181
|
-
readonly escrowV2Abi?: Abi;
|
|
182
|
-
readonly escrowAddresses: Address[];
|
|
183
|
-
readonly orchestratorAddress?: Address;
|
|
184
|
-
readonly orchestratorAbi?: Abi;
|
|
185
|
-
readonly orchestratorV2Address?: Address;
|
|
186
|
-
readonly orchestratorV2Abi?: Abi;
|
|
187
|
-
readonly orchestratorV3Address?: Address;
|
|
188
|
-
readonly orchestratorV3Abi?: Abi;
|
|
189
|
-
readonly orchestratorAddresses: Address[];
|
|
190
|
-
constructor(config: ContractRouterConfig);
|
|
191
|
-
private _registerContexts;
|
|
192
|
-
getEscrowContextByAddress(address?: Address): EscrowContractContext | undefined;
|
|
193
|
-
getOrchestratorContextByAddress(address?: Address): OrchestratorContractContext | undefined;
|
|
194
|
-
resolveEscrowContext(options?: {
|
|
195
|
-
escrowAddress?: Address;
|
|
196
|
-
depositId?: bigint | number | string;
|
|
197
|
-
}): EscrowContractContext;
|
|
198
|
-
getEscrowContexts(): EscrowContractContext[];
|
|
199
|
-
resolveOrchestratorForEscrow(escrowAddress?: Address): OrchestratorContractContext | undefined;
|
|
200
|
-
buildProtocolViewerContexts(options?: {
|
|
201
|
-
escrowAddress?: Address;
|
|
202
|
-
orchestratorAddress?: Address;
|
|
203
|
-
}): Array<{
|
|
204
|
-
escrow: Address;
|
|
205
|
-
orchestrator: Address;
|
|
206
|
-
}>;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
152
|
type PeerConnectionStatus = 'connected' | 'disconnected' | 'pending';
|
|
210
153
|
type PeerMetadataCaptureMode = 'buyerTee' | 'sellerCredential';
|
|
211
154
|
type PeerAuthenticateParams = {
|
|
@@ -1029,6 +972,29 @@ declare function openVenmoGmailConnect(options: Omit<Parameters<typeof getVenmoG
|
|
|
1029
972
|
popup?: VenmoGmailPopupOptions;
|
|
1030
973
|
}): Promise<VenmoGmailConnectResult>;
|
|
1031
974
|
|
|
975
|
+
declare enum PolicyGeneration {
|
|
976
|
+
V2 = "v2",
|
|
977
|
+
V1 = "v1"
|
|
978
|
+
}
|
|
979
|
+
type DisputeProtectionIntentLookup = {
|
|
980
|
+
generation: PolicyGeneration.V2;
|
|
981
|
+
policyAddress: Address;
|
|
982
|
+
intent: DisputeProtectionIntentV2;
|
|
983
|
+
} | {
|
|
984
|
+
generation: PolicyGeneration.V1;
|
|
985
|
+
policyAddress: Address;
|
|
986
|
+
intent: DisputeProtectionIntent;
|
|
987
|
+
};
|
|
988
|
+
/** Search each generation at the same block; failed reads never mean no protection. */
|
|
989
|
+
declare function findDisputeProtectionIntent({ publicClient, chainId, environment, intentHash, blockNumber, indexer, }: {
|
|
990
|
+
publicClient: PublicClient;
|
|
991
|
+
chainId: number;
|
|
992
|
+
environment?: RuntimeEnv$1;
|
|
993
|
+
intentHash: Hex;
|
|
994
|
+
blockNumber?: bigint;
|
|
995
|
+
indexer?: SettlementPolicyIndexer;
|
|
996
|
+
}): Promise<DisputeProtectionIntentLookup | null>;
|
|
997
|
+
|
|
1032
998
|
declare class XMoneyConnectError extends Error {
|
|
1033
999
|
readonly code: string;
|
|
1034
1000
|
constructor(code: string, message: string);
|
|
@@ -1051,4 +1017,21 @@ declare function openXMoneyConnect(options: Omit<XMoneyConnectOptions, 'returnUr
|
|
|
1051
1017
|
popup?: VenmoGmailPopupOptions;
|
|
1052
1018
|
}): Promise<XMoneyConnectResult>;
|
|
1053
1019
|
|
|
1054
|
-
|
|
1020
|
+
/** Quote-time possibility only; the attestor signs the actual window at fulfilment. */
|
|
1021
|
+
declare function mayRequireDisputeProtection({ paymentMethod, depositToken, stakeToken, whitelistEnabled, takerIsRelayer, relayerBypassOptedOut, }: {
|
|
1022
|
+
paymentMethod: DisputeWindowPaymentMethod;
|
|
1023
|
+
depositToken: Address;
|
|
1024
|
+
/** The vault's stake token (USDC), resolved for the target environment. */
|
|
1025
|
+
stakeToken: Address;
|
|
1026
|
+
/** Whether the deposit+method whitelist is enabled, independent of membership. */
|
|
1027
|
+
whitelistEnabled: boolean;
|
|
1028
|
+
/**
|
|
1029
|
+
* isWhitelistedRelayer(taker) on OrchestratorV4's current relayerRegistry(), read at the same
|
|
1030
|
+
* block as other quote inputs. The policy reads that registry at settlement; not whitelist membership.
|
|
1031
|
+
*/
|
|
1032
|
+
takerIsRelayer: boolean;
|
|
1033
|
+
/** Deposit-wide opt-out; the on-chain and indexer default is false. */
|
|
1034
|
+
relayerBypassOptedOut: boolean;
|
|
1035
|
+
}): boolean;
|
|
1036
|
+
|
|
1037
|
+
export { APIError, ApiAdapterOptions, AttestationServiceIdentityResponse, AttestationServiceSellerCredentialUploadResponse, AttestationServiceSellerVerifyResponse, BASE_BUILDER_CODE, BestByPlatformResponse, BuyerTeeSessionMaterialEncryptionInput, BuyerTeeVerifyPaymentBody, CHAINLINK_ORACLE_ADAPTER, CHAINLINK_ORACLE_FEEDS, ContractError, CreateReferralCodeRequest, CreateReferralCodeResponse, CuratorSellerCredentialStatusResponse, CuratorSellerCredentialUploadResponse, CurrencyType, DEFAULT_ORACLE_MAX_STALENESS_SECONDS, DisputeProtectionIntent, type DisputeProtectionIntentLookup, DisputeProtectionIntentV2, ErrorCode, type EscrowDepositView, type EscrowIntentView, GetDepositBundleParams, GetDepositBundleResponse, GetOrderbookParams, GetOrderbookResponse, GetOrderbookTableResponse, GetOwnerDepositsRequest, GetOwnerDepositsResponse, GetPayeeDetailsRequest, GetPayeeDetailsResponse, GoogleOAuthSellerCredentialPlatform, GoogleOAuthSellerCredentialUploadBodyByPlatform, IdentityAttestationRequestBody, IndexerClient, DepositWithRelations as IndexerDepositWithRelations, IntentEntity as IndexerIntent, type IntegerLike, type LogLevel, MicrosoftOAuthSellerCredentialUploadBodyByPlatform, type MulticallClient, NetworkError, type OracleAdapterOverrides, type OracleKind, 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 PeerMetadataRow, type PeerSarCredentialCapture, PolicyGeneration, PostDepositDetailsRequest, PostDepositDetailsResponse, type PythFeedConfig, QuoteRequest, QuoteResponse, QuotesBestByPlatformRequest, REFERRAL_SIGNATURE_DOMAIN, REFERRAL_SIGNATURE_TYPES, RISK_BPS_DENOMINATOR, RedeemReferralCodeRequest, RedeemReferralCodeResponse, ReferralCodeLookupResponse, ReferralDashboardResponse, ReferralEarningsResponse, ReferralReadRequest, ReferrerFeeConfig, type RiskMode, RuntimeEnv$1 as RuntimeEnv, SDK_BUILD_METADATA, SPREAD_ORACLE_FEEDS, SUPPORTED_CHAIN_IDS, type SdkBuildMetadata, SellerCredentialAttestationRuntime, SellerCredentialBundle, SellerCredentialUploadInput, SellerCredentialUploadPlatform, SellerPlatform, type SignIntentApiOptions, type SignIntentV3ReferralFee, type SignIntentV3Request, type SignIntentV3ResponseObject, type SignIntentV3Result, type SpreadOracleConfig, type SpreadOracleFeedConfig, type SupportedChainId, TOKEN_METADATA, TxOverrides, UpdateReferralCodeRequest, UpdateReferralCodeResponse, UploadSellerCredentialBundleParams, ValidatePayeeDetailsRequest, ValidatePayeeDetailsResponse, ValidationError, type VenmoGmailAppearance, VenmoGmailConnectError, type VenmoGmailConnectResult, type VenmoGmailPopupOptions, XMoneyConnectError, type XMoneyConnectOptions, type XMoneyConnectResult, ZKP2PError, ZKP2P_ANDROID_REFERRER, ZKP2P_IOS_REFERRER, apiCreateReferralCode, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOrderbookTable, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuote, apiGetQuotesBestByPlatform, apiGetReferralDashboard, apiGetReferralEarnings, apiGetSellerCredentialStatus, apiLookupReferralCode, apiPostDepositDetails, apiRedeemReferralCode, apiRequestIdentityAttestation, apiSignIntentV3, apiSignIntentV3Raw, apiUpdateReferralCode, apiUploadGoogleOAuthSellerCredential, apiUploadMicrosoftOAuthSellerCredential, apiUploadSellerCredentialBundle, apiValidatePayeeDetails, apiVerifyBuyerTeePayment, appendAttributionToCalldata, asciiToBytes32, assertValidReferrerFeeConfig, calculateRequiredCoverage, calculateStakeBackedCapacity, convertDepositsForLiquidity, convertIndexerDepositToEscrowView, convertIndexerIntentsToEscrowViews, createCompositeDepositId, createEncryptedBuyerTeeSessionMaterial, createPeerExtensionSdk, encodePythAdapterConfig, encodeSpreadOracleAdapterConfig, encodeWithAttribution, ensureBytes32, findDisputeProtectionIntent, getAmazonPaySellerIdentity, getAttributionDataSuffix, getPeerExtensionState, getSpreadOracleConfig, getVenmoGmailConnectUrl, getXMoneyConnectUrl, isPeerExtensionAvailable, isValidReferralCode, isValidReferrerFeeBps, isValidReferrerFeeRecipient, logger, mayRequireDisputeProtection, normalizeReferralCode, openPeerExtensionInstallPage, openVenmoGmailConnect, openXMoneyConnect, parseReferrerFeeConfig, parseVenmoGmailAppearance, peerExtensionSdk, referrerFeeConfigToPreciseUnits, resolveFiatCurrencyBytes32, resolvePaymentMethodHash, resolvePaymentMethodHashFromCatalog, resolvePaymentMethodNameFromHash, selectRiskMode, sendTransactionWithAttribution, setLogLevel, validateOracleFeedsOnChain };
|