@zkp2p/sdk 0.5.2 → 0.5.5

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.
@@ -959,8 +959,6 @@ type TimeoutConfig = {
959
959
  type ApiAdapterOptions = {
960
960
  baseApiUrl: string;
961
961
  timeoutMs?: number;
962
- apiKey?: string;
963
- authToken?: string;
964
962
  };
965
963
  type AuthorizationTokenProvider = () => string | null | undefined | Promise<string | null | undefined>;
966
964
  /**
@@ -1922,7 +1920,7 @@ type PaymentPlatformType = (typeof PAYMENT_PLATFORMS)[number];
1922
1920
  * walletClient,
1923
1921
  * chainId: 8453, // Base mainnet
1924
1922
  * runtimeEnv: 'production',
1925
- * // apiKey: 'your-curator-api-key', // Optional: auto gating-signature fetches and quote enrichment
1923
+ * // apiKey: 'internal-curator-api-key', // Optional: internal seller verification only
1926
1924
  * indexerApiKey: 'your-indexer-key',
1927
1925
  * };
1928
1926
  * ```
@@ -1941,12 +1939,11 @@ type Zkp2pNextOptions = {
1941
1939
  /** Base API URL for ZKP2P services (defaults to https://api.zkp2p.xyz) */
1942
1940
  baseApiUrl?: string;
1943
1941
  /**
1944
- * Optional curator API key (sent as `x-api-key`) for auto-fetching
1945
- * `signalIntent` gating signatures and authenticated quote enrichment.
1946
- * Not used by `registerPayeeDetails` or `getTakerTier`.
1942
+ * Optional internal curator API key (sent as `x-api-key`) for internal seller verification.
1943
+ * Not used by public curator endpoints such as quotes, maker reads, or intent signing.
1947
1944
  */
1948
1945
  apiKey?: string;
1949
- /** Optional bearer token for hybrid authentication */
1946
+ /** Optional bearer token for indexer authentication */
1950
1947
  authorizationToken?: string;
1951
1948
  /** Optional async token provider for indexer auth in long-lived clients */
1952
1949
  getAuthorizationToken?: IndexerAuthTokenProvider;
@@ -2195,9 +2192,9 @@ declare class Zkp2pClient {
2195
2192
  readonly orchestratorRegistryAbi?: Abi;
2196
2193
  /** Base API URL for ZKP2P services */
2197
2194
  readonly baseApiUrl?: string;
2198
- /** Optional curator API key (`x-api-key`) for auto gating-signature fetches and quote enrichment */
2195
+ /** Optional internal curator API key (`x-api-key`) for internal seller verification */
2199
2196
  readonly apiKey?: string;
2200
- /** Bearer token for hybrid authentication */
2197
+ /** Bearer token for indexer authentication */
2201
2198
  readonly authorizationToken?: string;
2202
2199
  /** API timeout in milliseconds */
2203
2200
  readonly apiTimeoutMs: number;
@@ -3158,9 +3155,9 @@ declare class Zkp2pClient {
3158
3155
  * sending fiat payment to the deposit's payee.
3159
3156
  *
3160
3157
  * If `gatingServiceSignature` is not provided, the SDK will automatically
3161
- * fetch one from curator `/v3/intent/sign` when `apiKey` or `authorizationToken`
3162
- * is available. Otherwise you must provide `gatingServiceSignature` and
3163
- * `signatureExpiration` yourself.
3158
+ * fetch one from curator `/v3/intent/sign` when `baseApiUrl` is configured.
3159
+ * Otherwise you must provide `gatingServiceSignature` and `signatureExpiration`
3160
+ * yourself.
3164
3161
  *
3165
3162
  * **Prepare Mode**: Use `.prepare()` to get the transaction calldata without sending:
3166
3163
  * ```typescript
@@ -3412,8 +3409,8 @@ declare class Zkp2pClient {
3412
3409
  /**
3413
3410
  * **Supporting Method** - Fetches the best available quote per supported payment platform.
3414
3411
  *
3415
- * Returns one quote per platform when available. When authenticated, the API
3416
- * returns payee details in each platform's best quote.
3412
+ * Returns one quote per platform when available. The API returns payee details
3413
+ * in each platform's best quote when available.
3417
3414
  *
3418
3415
  * @param req - Best-by-platform quote request parameters
3419
3416
  * @param opts - Optional overrides for API URL and timeout
@@ -3480,8 +3477,8 @@ declare class Zkp2pClient {
3480
3477
  timeoutMs?: number;
3481
3478
  }): Promise<CuratorSellerCredentialStatusResponse>;
3482
3479
  /**
3483
- * Internal-use endpoint. The curator route requires an internal `x-api-key`; standard SDK consumer
3484
- * API keys will be rejected with 401. Returns 410 GONE when curator has marked the credential inactive
3480
+ * Internal-use endpoint. The curator route requires an internal `x-api-key`; non-internal
3481
+ * API keys will be rejected. Returns 410 GONE when curator has marked the credential inactive
3485
3482
  * or a stale credential fails its synchronous re-probe.
3486
3483
  *
3487
3484
  * Verify a seller payment via curator's seller-credential proxy.
@@ -3592,6 +3589,7 @@ declare class Zkp2pClient {
3592
3589
  intentTimestampMs: string;
3593
3590
  paymentMethodHash: `0x${string}`;
3594
3591
  paymentVerifier?: `0x${string}`;
3592
+ minimumReleaseAmount?: string;
3595
3593
  }>;
3596
3594
  }
3597
3595
 
@@ -3652,4 +3650,4 @@ type SendBatchFn = (txs: Array<{
3652
3650
  value?: bigint;
3653
3651
  }>) => Promise<string>;
3654
3652
 
3655
- export { type GetBestByPlatformResponse as $, type AttestationServiceIdentityResponse as A, type BuyerTeeSessionMaterialEncryptionInput as B, type CuratorSellerCredentialUploadResponse as C, type DepositWithRelations as D, type AuthorizationTokenProvider as E, type FulfillIntentMethodParams as F, type GoogleOAuthSellerCredentialPlatform as G, type TimeoutConfig as H, type IntentEntity$1 as I, type ActionCallback as J, type CreateDepositParams as K, type CreateDepositConversionRate as L, type Range as M, type SignalIntentParams as N, type FulfillIntentParams as O, type PostDepositDetailsRequest as P, type QuotesBestByPlatformRequest as Q, type ReferrerFeeConfig as R, type SellerCredentialBundle as S, type TxOverrides as T, type UploadSellerCredentialBundleParams as U, type ValidatePayeeDetailsRequest as V, type WithdrawDepositParams as W, type ReleaseFundsToPayerParams as X, type CancelIntentParams as Y, Zkp2pClient as Z, type BestByPlatformResponseObject as _, type IdentityAttestationRequestBody as a, type AttestationServiceSellerCredentialProbeResponse as a$, type GetBestByPlatformResponseObject as a0, type GetPlatformQuote as a1, type PlatformQuote as a2, type QuoteRequest as a3, type GetNearbyQuote as a4, type GetNearbySuggestions as a5, type GetQuoteResponse as a6, type GetQuoteResponseObject as a7, type GetQuoteSingleResponse as a8, type QuoteResponse as a9, type CashAppSessionMaterial as aA, type WiseSessionMaterial as aB, type WiseProfileInfo as aC, type WiseProfileSelectionRequired as aD, type WiseProfileNotFound as aE, type PayPalGoogleOAuthSellerCredentialUploadBody as aF, type VenmoGoogleOAuthSellerCredentialUploadBody as aG, type VenmoCredentialUploadInput as aH, type CashAppCredentialUploadInput as aI, type WiseCredentialUploadInput as aJ, type SellerCredentialUploadInputByPlatform as aK, type SellerCiphertextBundle as aL, type SellerSignedCiphertextBundle as aM, type SellerVerifyIntentDetails as aN, type SellerVerifyInput as aO, type SellerProbeInput as aP, type SellerCredentialBundleUpload as aQ, type SellerCredentialStatusValue as aR, type SellerCredentialStatus as aS, type SellerVerifyProxyBody as aT, type SellerTypedDataField as aU, type SellerTypedDataSpec as aV, type SellerPaymentTypedDataValue as aW, type SellerAttestationOutput as aX, type SellerCredentialProbeResponse as aY, type AttestationServiceSellerVerifyResponse as aZ, type FulfillIntentAttestationResponse as a_, type QuoteResponseObject as aa, type QuoteSingleResponse as ab, type QuoteIntentResponse as ac, type QuoteFeesResponse as ad, type FiatResponse as ae, type TokenResponse as af, type NearbyQuote as ag, type NearbySuggestions as ah, type ApiDeposit as ai, type DepositVerifier as aj, type DepositVerifierCurrency as ak, type DepositStatus as al, type GetDepositByIdRequest as am, type GetDepositByIdResponse as an, type Intent as ao, type ApiIntentStatus as ap, type GetOwnerIntentsRequest as aq, type GetOwnerIntentsResponse as ar, type GetIntentsByDepositRequest as as, type GetIntentsByDepositResponse as at, type GetIntentByHashRequest as au, type GetIntentByHashResponse as av, type RegisterPayeeDetailsRequest as aw, type RegisterPayeeDetailsResponse as ax, type SellerPlatform as ay, type VenmoSessionMaterial as az, type SellerCredentialUploadInput as b, type RateManagerOrderField as b$, type BuyerTeePaymentParams as b0, type BuyerTeePaymentProofInput as b1, type BuyerTeeSessionMaterial as b2, type CuratorSellerCredentialStatusResponse as b3, type CuratorSellerVerifyResponse as b4, type RegisteredSellerCredentialPlatform as b5, type UploadSellerCredentialParams as b6, type RegisteredUploadSellerCredentialParams as b7, type UploadSellerCredentialOptions as b8, type GetSellerCredentialStatusParams as b9, fetchFulfillmentAndPayment as bA, type DepositEntity$1 as bB, type IntentFulfilledEntity as bC, type IntentFulfillmentAmountsEntity as bD, type DepositPaymentMethodEntity$1 as bE, type MethodCurrencyEntity$1 as bF, type IntentStatus as bG, type RateManagerEntity as bH, type RateManagerRateEntity as bI, type RateManagerDelegationEntity as bJ, type ManagerAggregateStatsEntity as bK, type ManagerStatsEntity as bL, type ManagerDailySnapshotEntity as bM, type RateManagerListItem as bN, type RateManagerDetail as bO, type ManualRateUpdateEntity as bP, type OracleConfigUpdateEntity as bQ, type DepositFundActivityEntity$1 as bR, type DepositDailySnapshotEntity$1 as bS, type DepositFundActivityType$1 as bT, type DepositFilter as bU, type PaginationOptions as bV, type DepositOrderField as bW, type OrderDirection$1 as bX, type RateManagerFilter as bY, type RateManagerPaginationOptions as bZ, type RateManagerDelegationPaginationOptions as b_, type UploadPayPalGoogleOAuthSellerCredentialParams as ba, type UploadVenmoGoogleOAuthSellerCredentialParams as bb, type UploadGoogleOAuthSellerCredentialParams as bc, type VerifySellerPaymentParams as bd, type IdentityAttestationActionType as be, type IdentityAttestationOutput as bf, type IdentityAttestationOutputFor as bg, type IdentityAttestationParams as bh, type MakerIdentityAttestationRequestBody as bi, type MakerIdentityPlatform as bj, type OnchainCurrency as bk, type DepositVerifierData as bl, type PreparedTransaction as bm, type OrderStats as bn, type DepositIntentStatistics as bo, type TakerTier as bp, type TakerTierStats as bq, type TakerTierLevel as br, type PlatformLimit as bs, type PlatformRiskLevel as bt, type OrderbookEntry as bu, IndexerClient as bv, defaultIndexerEndpoint as bw, IndexerDepositService as bx, IndexerRateManagerService as by, compareEventCursorIdsByRecency as bz, type SellerCredentialUploadPlatform as c, type OrderDirection as c0, type DeploymentEnv as c1, type FulfillmentRecord as c2, type PaymentVerifiedRecord as c3, type FulfillmentAndPaymentResponse as c4, PAYMENT_PLATFORMS as c5, type PaymentPlatformType as c6, Currency as c7, currencyInfo as c8, getCurrencyInfoFromHash as c9, classifyDelegationState as cA, type DelegationRoute as cB, type DelegationState as cC, type DelegationDepositTarget as cD, type BatchResult as cE, type SendTransactionFn as cF, type SendBatchFn as cG, ZERO_ADDRESS as cH, asErrorMessage as cI, assertDelegationMethodSupport as cJ, getCurrencyInfoFromCountryCode as ca, getCurrencyCodeFromHash as cb, isSupportedCurrencyHash as cc, mapConversionRatesToOnchainMinRate as cd, type CurrencyData as ce, getContracts as cf, getRateManagerContracts as cg, getPaymentMethodsCatalog as ch, getGatingServiceAddress as ci, type RuntimeEnv as cj, parseDepositView as ck, parseIntentView as cl, enrichPvDepositView as cm, enrichPvIntentView as cn, type PV_DepositView as co, type PV_Deposit as cp, type PV_PaymentMethodData as cq, type PV_Currency as cr, type PV_ReferralFee as cs, type PV_IntentView as ct, type PV_Intent as cu, ZERO_RATE_MANAGER_ID as cv, isZeroRateManagerId as cw, normalizeRateManagerId as cx, normalizeRegistry as cy, getDelegationRoute as cz, type SellerCredentialAttestationRuntime as d, type AttestationServiceSellerCredentialUploadResponse as e, type GoogleOAuthSellerCredentialUploadBodyByPlatform as f, type BestByPlatformResponse as g, type ValidatePayeeDetailsResponse as h, type PostDepositDetailsResponse as i, type GetPayeeDetailsRequest as j, type GetPayeeDetailsResponse as k, type GetOwnerDepositsRequest as l, type GetOwnerDepositsResponse as m, type GetTakerTierRequest as n, type GetTakerTierResponse as o, type GetDepositBundleParams as p, type ApiAdapterOptions as q, type GetDepositBundleResponse as r, type GetOrderbookParams as s, type GetOrderbookResponse as t, type CurrencyType as u, type PaymentMethodCatalog as v, type SignalIntentReferralFee as w, type SignalIntentMethodParams as x, type CancelIntentMethodParams as y, type Zkp2pNextOptions as z };
3653
+ export { type BestByPlatformResponseObject as $, type AttestationServiceIdentityResponse as A, type BuyerTeeSessionMaterialEncryptionInput as B, type CuratorSellerCredentialUploadResponse as C, type DepositWithRelations as D, type Zkp2pNextOptions as E, type FulfillIntentMethodParams as F, type GoogleOAuthSellerCredentialPlatform as G, type AuthorizationTokenProvider as H, type IntentEntity$1 as I, type TimeoutConfig as J, type ActionCallback as K, type CreateDepositParams as L, type CreateDepositConversionRate as M, type Range as N, type SignalIntentParams as O, type PostDepositDetailsRequest as P, type QuotesBestByPlatformRequest as Q, type ReferrerFeeConfig as R, type SellerCredentialBundle as S, type TakerTierLevel as T, type UploadSellerCredentialBundleParams as U, type ValidatePayeeDetailsRequest as V, type WithdrawDepositParams as W, type FulfillIntentParams as X, type ReleaseFundsToPayerParams as Y, Zkp2pClient as Z, type CancelIntentParams as _, type IdentityAttestationRequestBody as a, type FulfillIntentAttestationResponse as a$, type GetBestByPlatformResponse as a0, type GetBestByPlatformResponseObject as a1, type GetPlatformQuote as a2, type PlatformQuote as a3, type QuoteRequest as a4, type GetNearbyQuote as a5, type GetNearbySuggestions as a6, type GetQuoteResponse as a7, type GetQuoteResponseObject as a8, type GetQuoteSingleResponse as a9, type VenmoSessionMaterial as aA, type CashAppSessionMaterial as aB, type WiseSessionMaterial as aC, type WiseProfileInfo as aD, type WiseProfileSelectionRequired as aE, type WiseProfileNotFound as aF, type PayPalGoogleOAuthSellerCredentialUploadBody as aG, type VenmoGoogleOAuthSellerCredentialUploadBody as aH, type VenmoCredentialUploadInput as aI, type CashAppCredentialUploadInput as aJ, type WiseCredentialUploadInput as aK, type SellerCredentialUploadInputByPlatform as aL, type SellerCiphertextBundle as aM, type SellerSignedCiphertextBundle as aN, type SellerVerifyIntentDetails as aO, type SellerVerifyInput as aP, type SellerProbeInput as aQ, type SellerCredentialBundleUpload as aR, type SellerCredentialStatusValue as aS, type SellerCredentialStatus as aT, type SellerVerifyProxyBody as aU, type SellerTypedDataField as aV, type SellerTypedDataSpec as aW, type SellerPaymentTypedDataValue as aX, type SellerAttestationOutput as aY, type SellerCredentialProbeResponse as aZ, type AttestationServiceSellerVerifyResponse as a_, type QuoteResponse as aa, type QuoteResponseObject as ab, type QuoteSingleResponse as ac, type QuoteIntentResponse as ad, type QuoteFeesResponse as ae, type FiatResponse as af, type TokenResponse as ag, type NearbyQuote as ah, type NearbySuggestions as ai, type ApiDeposit as aj, type DepositVerifier as ak, type DepositVerifierCurrency as al, type DepositStatus as am, type GetDepositByIdRequest as an, type GetDepositByIdResponse as ao, type Intent as ap, type ApiIntentStatus as aq, type GetOwnerIntentsRequest as ar, type GetOwnerIntentsResponse as as, type GetIntentsByDepositRequest as at, type GetIntentsByDepositResponse as au, type GetIntentByHashRequest as av, type GetIntentByHashResponse as aw, type RegisterPayeeDetailsRequest as ax, type RegisterPayeeDetailsResponse as ay, type SellerPlatform as az, type SellerCredentialUploadInput as b, type RateManagerOrderField as b$, type AttestationServiceSellerCredentialProbeResponse as b0, type BuyerTeePaymentParams as b1, type BuyerTeePaymentProofInput as b2, type BuyerTeeSessionMaterial as b3, type CuratorSellerCredentialStatusResponse as b4, type CuratorSellerVerifyResponse as b5, type RegisteredSellerCredentialPlatform as b6, type UploadSellerCredentialParams as b7, type RegisteredUploadSellerCredentialParams as b8, type UploadSellerCredentialOptions as b9, fetchFulfillmentAndPayment as bA, type DepositEntity$1 as bB, type IntentFulfilledEntity as bC, type IntentFulfillmentAmountsEntity as bD, type DepositPaymentMethodEntity$1 as bE, type MethodCurrencyEntity$1 as bF, type IntentStatus as bG, type RateManagerEntity as bH, type RateManagerRateEntity as bI, type RateManagerDelegationEntity as bJ, type ManagerAggregateStatsEntity as bK, type ManagerStatsEntity as bL, type ManagerDailySnapshotEntity as bM, type RateManagerListItem as bN, type RateManagerDetail as bO, type ManualRateUpdateEntity as bP, type OracleConfigUpdateEntity as bQ, type DepositFundActivityEntity$1 as bR, type DepositDailySnapshotEntity$1 as bS, type DepositFundActivityType$1 as bT, type DepositFilter as bU, type PaginationOptions as bV, type DepositOrderField as bW, type OrderDirection$1 as bX, type RateManagerFilter as bY, type RateManagerPaginationOptions as bZ, type RateManagerDelegationPaginationOptions as b_, type GetSellerCredentialStatusParams as ba, type UploadPayPalGoogleOAuthSellerCredentialParams as bb, type UploadVenmoGoogleOAuthSellerCredentialParams as bc, type UploadGoogleOAuthSellerCredentialParams as bd, type VerifySellerPaymentParams as be, type IdentityAttestationActionType as bf, type IdentityAttestationOutput as bg, type IdentityAttestationOutputFor as bh, type IdentityAttestationParams as bi, type MakerIdentityAttestationRequestBody as bj, type MakerIdentityPlatform as bk, type OnchainCurrency as bl, type DepositVerifierData as bm, type PreparedTransaction as bn, type OrderStats as bo, type DepositIntentStatistics as bp, type TakerTier as bq, type TakerTierStats as br, type PlatformLimit as bs, type PlatformRiskLevel as bt, type OrderbookEntry as bu, IndexerClient as bv, defaultIndexerEndpoint as bw, IndexerDepositService as bx, IndexerRateManagerService as by, compareEventCursorIdsByRecency as bz, type SellerCredentialUploadPlatform as c, type OrderDirection as c0, type DeploymentEnv as c1, type FulfillmentRecord as c2, type PaymentVerifiedRecord as c3, type FulfillmentAndPaymentResponse as c4, PAYMENT_PLATFORMS as c5, type PaymentPlatformType as c6, Currency as c7, currencyInfo as c8, getCurrencyInfoFromHash as c9, classifyDelegationState as cA, type DelegationRoute as cB, type DelegationState as cC, type DelegationDepositTarget as cD, type BatchResult as cE, type SendTransactionFn as cF, type SendBatchFn as cG, ZERO_ADDRESS as cH, asErrorMessage as cI, assertDelegationMethodSupport as cJ, getCurrencyInfoFromCountryCode as ca, getCurrencyCodeFromHash as cb, isSupportedCurrencyHash as cc, mapConversionRatesToOnchainMinRate as cd, type CurrencyData as ce, getContracts as cf, getRateManagerContracts as cg, getPaymentMethodsCatalog as ch, getGatingServiceAddress as ci, type RuntimeEnv as cj, parseDepositView as ck, parseIntentView as cl, enrichPvDepositView as cm, enrichPvIntentView as cn, type PV_DepositView as co, type PV_Deposit as cp, type PV_PaymentMethodData as cq, type PV_Currency as cr, type PV_ReferralFee as cs, type PV_IntentView as ct, type PV_Intent as cu, ZERO_RATE_MANAGER_ID as cv, isZeroRateManagerId as cw, normalizeRateManagerId as cx, normalizeRegistry as cy, getDelegationRoute as cz, type SellerCredentialAttestationRuntime as d, type AttestationServiceSellerCredentialUploadResponse as e, type GoogleOAuthSellerCredentialUploadBodyByPlatform as f, type BestByPlatformResponse as g, type ValidatePayeeDetailsResponse as h, type PostDepositDetailsResponse as i, type GetPayeeDetailsRequest as j, type GetPayeeDetailsResponse as k, type GetOwnerDepositsRequest as l, type GetOwnerDepositsResponse as m, type GetTakerTierRequest as n, type GetTakerTierResponse as o, type GetDepositBundleParams as p, type ApiAdapterOptions as q, type GetDepositBundleResponse as r, type GetOrderbookParams as s, type GetOrderbookResponse as t, type CurrencyType as u, type PaymentMethodCatalog as v, type TxOverrides as w, type SignalIntentReferralFee as x, type SignalIntentMethodParams as y, type CancelIntentMethodParams as z };
@@ -959,8 +959,6 @@ type TimeoutConfig = {
959
959
  type ApiAdapterOptions = {
960
960
  baseApiUrl: string;
961
961
  timeoutMs?: number;
962
- apiKey?: string;
963
- authToken?: string;
964
962
  };
965
963
  type AuthorizationTokenProvider = () => string | null | undefined | Promise<string | null | undefined>;
966
964
  /**
@@ -1922,7 +1920,7 @@ type PaymentPlatformType = (typeof PAYMENT_PLATFORMS)[number];
1922
1920
  * walletClient,
1923
1921
  * chainId: 8453, // Base mainnet
1924
1922
  * runtimeEnv: 'production',
1925
- * // apiKey: 'your-curator-api-key', // Optional: auto gating-signature fetches and quote enrichment
1923
+ * // apiKey: 'internal-curator-api-key', // Optional: internal seller verification only
1926
1924
  * indexerApiKey: 'your-indexer-key',
1927
1925
  * };
1928
1926
  * ```
@@ -1941,12 +1939,11 @@ type Zkp2pNextOptions = {
1941
1939
  /** Base API URL for ZKP2P services (defaults to https://api.zkp2p.xyz) */
1942
1940
  baseApiUrl?: string;
1943
1941
  /**
1944
- * Optional curator API key (sent as `x-api-key`) for auto-fetching
1945
- * `signalIntent` gating signatures and authenticated quote enrichment.
1946
- * Not used by `registerPayeeDetails` or `getTakerTier`.
1942
+ * Optional internal curator API key (sent as `x-api-key`) for internal seller verification.
1943
+ * Not used by public curator endpoints such as quotes, maker reads, or intent signing.
1947
1944
  */
1948
1945
  apiKey?: string;
1949
- /** Optional bearer token for hybrid authentication */
1946
+ /** Optional bearer token for indexer authentication */
1950
1947
  authorizationToken?: string;
1951
1948
  /** Optional async token provider for indexer auth in long-lived clients */
1952
1949
  getAuthorizationToken?: IndexerAuthTokenProvider;
@@ -2195,9 +2192,9 @@ declare class Zkp2pClient {
2195
2192
  readonly orchestratorRegistryAbi?: Abi;
2196
2193
  /** Base API URL for ZKP2P services */
2197
2194
  readonly baseApiUrl?: string;
2198
- /** Optional curator API key (`x-api-key`) for auto gating-signature fetches and quote enrichment */
2195
+ /** Optional internal curator API key (`x-api-key`) for internal seller verification */
2199
2196
  readonly apiKey?: string;
2200
- /** Bearer token for hybrid authentication */
2197
+ /** Bearer token for indexer authentication */
2201
2198
  readonly authorizationToken?: string;
2202
2199
  /** API timeout in milliseconds */
2203
2200
  readonly apiTimeoutMs: number;
@@ -3158,9 +3155,9 @@ declare class Zkp2pClient {
3158
3155
  * sending fiat payment to the deposit's payee.
3159
3156
  *
3160
3157
  * If `gatingServiceSignature` is not provided, the SDK will automatically
3161
- * fetch one from curator `/v3/intent/sign` when `apiKey` or `authorizationToken`
3162
- * is available. Otherwise you must provide `gatingServiceSignature` and
3163
- * `signatureExpiration` yourself.
3158
+ * fetch one from curator `/v3/intent/sign` when `baseApiUrl` is configured.
3159
+ * Otherwise you must provide `gatingServiceSignature` and `signatureExpiration`
3160
+ * yourself.
3164
3161
  *
3165
3162
  * **Prepare Mode**: Use `.prepare()` to get the transaction calldata without sending:
3166
3163
  * ```typescript
@@ -3412,8 +3409,8 @@ declare class Zkp2pClient {
3412
3409
  /**
3413
3410
  * **Supporting Method** - Fetches the best available quote per supported payment platform.
3414
3411
  *
3415
- * Returns one quote per platform when available. When authenticated, the API
3416
- * returns payee details in each platform's best quote.
3412
+ * Returns one quote per platform when available. The API returns payee details
3413
+ * in each platform's best quote when available.
3417
3414
  *
3418
3415
  * @param req - Best-by-platform quote request parameters
3419
3416
  * @param opts - Optional overrides for API URL and timeout
@@ -3480,8 +3477,8 @@ declare class Zkp2pClient {
3480
3477
  timeoutMs?: number;
3481
3478
  }): Promise<CuratorSellerCredentialStatusResponse>;
3482
3479
  /**
3483
- * Internal-use endpoint. The curator route requires an internal `x-api-key`; standard SDK consumer
3484
- * API keys will be rejected with 401. Returns 410 GONE when curator has marked the credential inactive
3480
+ * Internal-use endpoint. The curator route requires an internal `x-api-key`; non-internal
3481
+ * API keys will be rejected. Returns 410 GONE when curator has marked the credential inactive
3485
3482
  * or a stale credential fails its synchronous re-probe.
3486
3483
  *
3487
3484
  * Verify a seller payment via curator's seller-credential proxy.
@@ -3592,6 +3589,7 @@ declare class Zkp2pClient {
3592
3589
  intentTimestampMs: string;
3593
3590
  paymentMethodHash: `0x${string}`;
3594
3591
  paymentVerifier?: `0x${string}`;
3592
+ minimumReleaseAmount?: string;
3595
3593
  }>;
3596
3594
  }
3597
3595
 
@@ -3652,4 +3650,4 @@ type SendBatchFn = (txs: Array<{
3652
3650
  value?: bigint;
3653
3651
  }>) => Promise<string>;
3654
3652
 
3655
- export { type GetBestByPlatformResponse as $, type AttestationServiceIdentityResponse as A, type BuyerTeeSessionMaterialEncryptionInput as B, type CuratorSellerCredentialUploadResponse as C, type DepositWithRelations as D, type AuthorizationTokenProvider as E, type FulfillIntentMethodParams as F, type GoogleOAuthSellerCredentialPlatform as G, type TimeoutConfig as H, type IntentEntity$1 as I, type ActionCallback as J, type CreateDepositParams as K, type CreateDepositConversionRate as L, type Range as M, type SignalIntentParams as N, type FulfillIntentParams as O, type PostDepositDetailsRequest as P, type QuotesBestByPlatformRequest as Q, type ReferrerFeeConfig as R, type SellerCredentialBundle as S, type TxOverrides as T, type UploadSellerCredentialBundleParams as U, type ValidatePayeeDetailsRequest as V, type WithdrawDepositParams as W, type ReleaseFundsToPayerParams as X, type CancelIntentParams as Y, Zkp2pClient as Z, type BestByPlatformResponseObject as _, type IdentityAttestationRequestBody as a, type AttestationServiceSellerCredentialProbeResponse as a$, type GetBestByPlatformResponseObject as a0, type GetPlatformQuote as a1, type PlatformQuote as a2, type QuoteRequest as a3, type GetNearbyQuote as a4, type GetNearbySuggestions as a5, type GetQuoteResponse as a6, type GetQuoteResponseObject as a7, type GetQuoteSingleResponse as a8, type QuoteResponse as a9, type CashAppSessionMaterial as aA, type WiseSessionMaterial as aB, type WiseProfileInfo as aC, type WiseProfileSelectionRequired as aD, type WiseProfileNotFound as aE, type PayPalGoogleOAuthSellerCredentialUploadBody as aF, type VenmoGoogleOAuthSellerCredentialUploadBody as aG, type VenmoCredentialUploadInput as aH, type CashAppCredentialUploadInput as aI, type WiseCredentialUploadInput as aJ, type SellerCredentialUploadInputByPlatform as aK, type SellerCiphertextBundle as aL, type SellerSignedCiphertextBundle as aM, type SellerVerifyIntentDetails as aN, type SellerVerifyInput as aO, type SellerProbeInput as aP, type SellerCredentialBundleUpload as aQ, type SellerCredentialStatusValue as aR, type SellerCredentialStatus as aS, type SellerVerifyProxyBody as aT, type SellerTypedDataField as aU, type SellerTypedDataSpec as aV, type SellerPaymentTypedDataValue as aW, type SellerAttestationOutput as aX, type SellerCredentialProbeResponse as aY, type AttestationServiceSellerVerifyResponse as aZ, type FulfillIntentAttestationResponse as a_, type QuoteResponseObject as aa, type QuoteSingleResponse as ab, type QuoteIntentResponse as ac, type QuoteFeesResponse as ad, type FiatResponse as ae, type TokenResponse as af, type NearbyQuote as ag, type NearbySuggestions as ah, type ApiDeposit as ai, type DepositVerifier as aj, type DepositVerifierCurrency as ak, type DepositStatus as al, type GetDepositByIdRequest as am, type GetDepositByIdResponse as an, type Intent as ao, type ApiIntentStatus as ap, type GetOwnerIntentsRequest as aq, type GetOwnerIntentsResponse as ar, type GetIntentsByDepositRequest as as, type GetIntentsByDepositResponse as at, type GetIntentByHashRequest as au, type GetIntentByHashResponse as av, type RegisterPayeeDetailsRequest as aw, type RegisterPayeeDetailsResponse as ax, type SellerPlatform as ay, type VenmoSessionMaterial as az, type SellerCredentialUploadInput as b, type RateManagerOrderField as b$, type BuyerTeePaymentParams as b0, type BuyerTeePaymentProofInput as b1, type BuyerTeeSessionMaterial as b2, type CuratorSellerCredentialStatusResponse as b3, type CuratorSellerVerifyResponse as b4, type RegisteredSellerCredentialPlatform as b5, type UploadSellerCredentialParams as b6, type RegisteredUploadSellerCredentialParams as b7, type UploadSellerCredentialOptions as b8, type GetSellerCredentialStatusParams as b9, fetchFulfillmentAndPayment as bA, type DepositEntity$1 as bB, type IntentFulfilledEntity as bC, type IntentFulfillmentAmountsEntity as bD, type DepositPaymentMethodEntity$1 as bE, type MethodCurrencyEntity$1 as bF, type IntentStatus as bG, type RateManagerEntity as bH, type RateManagerRateEntity as bI, type RateManagerDelegationEntity as bJ, type ManagerAggregateStatsEntity as bK, type ManagerStatsEntity as bL, type ManagerDailySnapshotEntity as bM, type RateManagerListItem as bN, type RateManagerDetail as bO, type ManualRateUpdateEntity as bP, type OracleConfigUpdateEntity as bQ, type DepositFundActivityEntity$1 as bR, type DepositDailySnapshotEntity$1 as bS, type DepositFundActivityType$1 as bT, type DepositFilter as bU, type PaginationOptions as bV, type DepositOrderField as bW, type OrderDirection$1 as bX, type RateManagerFilter as bY, type RateManagerPaginationOptions as bZ, type RateManagerDelegationPaginationOptions as b_, type UploadPayPalGoogleOAuthSellerCredentialParams as ba, type UploadVenmoGoogleOAuthSellerCredentialParams as bb, type UploadGoogleOAuthSellerCredentialParams as bc, type VerifySellerPaymentParams as bd, type IdentityAttestationActionType as be, type IdentityAttestationOutput as bf, type IdentityAttestationOutputFor as bg, type IdentityAttestationParams as bh, type MakerIdentityAttestationRequestBody as bi, type MakerIdentityPlatform as bj, type OnchainCurrency as bk, type DepositVerifierData as bl, type PreparedTransaction as bm, type OrderStats as bn, type DepositIntentStatistics as bo, type TakerTier as bp, type TakerTierStats as bq, type TakerTierLevel as br, type PlatformLimit as bs, type PlatformRiskLevel as bt, type OrderbookEntry as bu, IndexerClient as bv, defaultIndexerEndpoint as bw, IndexerDepositService as bx, IndexerRateManagerService as by, compareEventCursorIdsByRecency as bz, type SellerCredentialUploadPlatform as c, type OrderDirection as c0, type DeploymentEnv as c1, type FulfillmentRecord as c2, type PaymentVerifiedRecord as c3, type FulfillmentAndPaymentResponse as c4, PAYMENT_PLATFORMS as c5, type PaymentPlatformType as c6, Currency as c7, currencyInfo as c8, getCurrencyInfoFromHash as c9, classifyDelegationState as cA, type DelegationRoute as cB, type DelegationState as cC, type DelegationDepositTarget as cD, type BatchResult as cE, type SendTransactionFn as cF, type SendBatchFn as cG, ZERO_ADDRESS as cH, asErrorMessage as cI, assertDelegationMethodSupport as cJ, getCurrencyInfoFromCountryCode as ca, getCurrencyCodeFromHash as cb, isSupportedCurrencyHash as cc, mapConversionRatesToOnchainMinRate as cd, type CurrencyData as ce, getContracts as cf, getRateManagerContracts as cg, getPaymentMethodsCatalog as ch, getGatingServiceAddress as ci, type RuntimeEnv as cj, parseDepositView as ck, parseIntentView as cl, enrichPvDepositView as cm, enrichPvIntentView as cn, type PV_DepositView as co, type PV_Deposit as cp, type PV_PaymentMethodData as cq, type PV_Currency as cr, type PV_ReferralFee as cs, type PV_IntentView as ct, type PV_Intent as cu, ZERO_RATE_MANAGER_ID as cv, isZeroRateManagerId as cw, normalizeRateManagerId as cx, normalizeRegistry as cy, getDelegationRoute as cz, type SellerCredentialAttestationRuntime as d, type AttestationServiceSellerCredentialUploadResponse as e, type GoogleOAuthSellerCredentialUploadBodyByPlatform as f, type BestByPlatformResponse as g, type ValidatePayeeDetailsResponse as h, type PostDepositDetailsResponse as i, type GetPayeeDetailsRequest as j, type GetPayeeDetailsResponse as k, type GetOwnerDepositsRequest as l, type GetOwnerDepositsResponse as m, type GetTakerTierRequest as n, type GetTakerTierResponse as o, type GetDepositBundleParams as p, type ApiAdapterOptions as q, type GetDepositBundleResponse as r, type GetOrderbookParams as s, type GetOrderbookResponse as t, type CurrencyType as u, type PaymentMethodCatalog as v, type SignalIntentReferralFee as w, type SignalIntentMethodParams as x, type CancelIntentMethodParams as y, type Zkp2pNextOptions as z };
3653
+ export { type BestByPlatformResponseObject as $, type AttestationServiceIdentityResponse as A, type BuyerTeeSessionMaterialEncryptionInput as B, type CuratorSellerCredentialUploadResponse as C, type DepositWithRelations as D, type Zkp2pNextOptions as E, type FulfillIntentMethodParams as F, type GoogleOAuthSellerCredentialPlatform as G, type AuthorizationTokenProvider as H, type IntentEntity$1 as I, type TimeoutConfig as J, type ActionCallback as K, type CreateDepositParams as L, type CreateDepositConversionRate as M, type Range as N, type SignalIntentParams as O, type PostDepositDetailsRequest as P, type QuotesBestByPlatformRequest as Q, type ReferrerFeeConfig as R, type SellerCredentialBundle as S, type TakerTierLevel as T, type UploadSellerCredentialBundleParams as U, type ValidatePayeeDetailsRequest as V, type WithdrawDepositParams as W, type FulfillIntentParams as X, type ReleaseFundsToPayerParams as Y, Zkp2pClient as Z, type CancelIntentParams as _, type IdentityAttestationRequestBody as a, type FulfillIntentAttestationResponse as a$, type GetBestByPlatformResponse as a0, type GetBestByPlatformResponseObject as a1, type GetPlatformQuote as a2, type PlatformQuote as a3, type QuoteRequest as a4, type GetNearbyQuote as a5, type GetNearbySuggestions as a6, type GetQuoteResponse as a7, type GetQuoteResponseObject as a8, type GetQuoteSingleResponse as a9, type VenmoSessionMaterial as aA, type CashAppSessionMaterial as aB, type WiseSessionMaterial as aC, type WiseProfileInfo as aD, type WiseProfileSelectionRequired as aE, type WiseProfileNotFound as aF, type PayPalGoogleOAuthSellerCredentialUploadBody as aG, type VenmoGoogleOAuthSellerCredentialUploadBody as aH, type VenmoCredentialUploadInput as aI, type CashAppCredentialUploadInput as aJ, type WiseCredentialUploadInput as aK, type SellerCredentialUploadInputByPlatform as aL, type SellerCiphertextBundle as aM, type SellerSignedCiphertextBundle as aN, type SellerVerifyIntentDetails as aO, type SellerVerifyInput as aP, type SellerProbeInput as aQ, type SellerCredentialBundleUpload as aR, type SellerCredentialStatusValue as aS, type SellerCredentialStatus as aT, type SellerVerifyProxyBody as aU, type SellerTypedDataField as aV, type SellerTypedDataSpec as aW, type SellerPaymentTypedDataValue as aX, type SellerAttestationOutput as aY, type SellerCredentialProbeResponse as aZ, type AttestationServiceSellerVerifyResponse as a_, type QuoteResponse as aa, type QuoteResponseObject as ab, type QuoteSingleResponse as ac, type QuoteIntentResponse as ad, type QuoteFeesResponse as ae, type FiatResponse as af, type TokenResponse as ag, type NearbyQuote as ah, type NearbySuggestions as ai, type ApiDeposit as aj, type DepositVerifier as ak, type DepositVerifierCurrency as al, type DepositStatus as am, type GetDepositByIdRequest as an, type GetDepositByIdResponse as ao, type Intent as ap, type ApiIntentStatus as aq, type GetOwnerIntentsRequest as ar, type GetOwnerIntentsResponse as as, type GetIntentsByDepositRequest as at, type GetIntentsByDepositResponse as au, type GetIntentByHashRequest as av, type GetIntentByHashResponse as aw, type RegisterPayeeDetailsRequest as ax, type RegisterPayeeDetailsResponse as ay, type SellerPlatform as az, type SellerCredentialUploadInput as b, type RateManagerOrderField as b$, type AttestationServiceSellerCredentialProbeResponse as b0, type BuyerTeePaymentParams as b1, type BuyerTeePaymentProofInput as b2, type BuyerTeeSessionMaterial as b3, type CuratorSellerCredentialStatusResponse as b4, type CuratorSellerVerifyResponse as b5, type RegisteredSellerCredentialPlatform as b6, type UploadSellerCredentialParams as b7, type RegisteredUploadSellerCredentialParams as b8, type UploadSellerCredentialOptions as b9, fetchFulfillmentAndPayment as bA, type DepositEntity$1 as bB, type IntentFulfilledEntity as bC, type IntentFulfillmentAmountsEntity as bD, type DepositPaymentMethodEntity$1 as bE, type MethodCurrencyEntity$1 as bF, type IntentStatus as bG, type RateManagerEntity as bH, type RateManagerRateEntity as bI, type RateManagerDelegationEntity as bJ, type ManagerAggregateStatsEntity as bK, type ManagerStatsEntity as bL, type ManagerDailySnapshotEntity as bM, type RateManagerListItem as bN, type RateManagerDetail as bO, type ManualRateUpdateEntity as bP, type OracleConfigUpdateEntity as bQ, type DepositFundActivityEntity$1 as bR, type DepositDailySnapshotEntity$1 as bS, type DepositFundActivityType$1 as bT, type DepositFilter as bU, type PaginationOptions as bV, type DepositOrderField as bW, type OrderDirection$1 as bX, type RateManagerFilter as bY, type RateManagerPaginationOptions as bZ, type RateManagerDelegationPaginationOptions as b_, type GetSellerCredentialStatusParams as ba, type UploadPayPalGoogleOAuthSellerCredentialParams as bb, type UploadVenmoGoogleOAuthSellerCredentialParams as bc, type UploadGoogleOAuthSellerCredentialParams as bd, type VerifySellerPaymentParams as be, type IdentityAttestationActionType as bf, type IdentityAttestationOutput as bg, type IdentityAttestationOutputFor as bh, type IdentityAttestationParams as bi, type MakerIdentityAttestationRequestBody as bj, type MakerIdentityPlatform as bk, type OnchainCurrency as bl, type DepositVerifierData as bm, type PreparedTransaction as bn, type OrderStats as bo, type DepositIntentStatistics as bp, type TakerTier as bq, type TakerTierStats as br, type PlatformLimit as bs, type PlatformRiskLevel as bt, type OrderbookEntry as bu, IndexerClient as bv, defaultIndexerEndpoint as bw, IndexerDepositService as bx, IndexerRateManagerService as by, compareEventCursorIdsByRecency as bz, type SellerCredentialUploadPlatform as c, type OrderDirection as c0, type DeploymentEnv as c1, type FulfillmentRecord as c2, type PaymentVerifiedRecord as c3, type FulfillmentAndPaymentResponse as c4, PAYMENT_PLATFORMS as c5, type PaymentPlatformType as c6, Currency as c7, currencyInfo as c8, getCurrencyInfoFromHash as c9, classifyDelegationState as cA, type DelegationRoute as cB, type DelegationState as cC, type DelegationDepositTarget as cD, type BatchResult as cE, type SendTransactionFn as cF, type SendBatchFn as cG, ZERO_ADDRESS as cH, asErrorMessage as cI, assertDelegationMethodSupport as cJ, getCurrencyInfoFromCountryCode as ca, getCurrencyCodeFromHash as cb, isSupportedCurrencyHash as cc, mapConversionRatesToOnchainMinRate as cd, type CurrencyData as ce, getContracts as cf, getRateManagerContracts as cg, getPaymentMethodsCatalog as ch, getGatingServiceAddress as ci, type RuntimeEnv as cj, parseDepositView as ck, parseIntentView as cl, enrichPvDepositView as cm, enrichPvIntentView as cn, type PV_DepositView as co, type PV_Deposit as cp, type PV_PaymentMethodData as cq, type PV_Currency as cr, type PV_ReferralFee as cs, type PV_IntentView as ct, type PV_Intent as cu, ZERO_RATE_MANAGER_ID as cv, isZeroRateManagerId as cw, normalizeRateManagerId as cx, normalizeRegistry as cy, getDelegationRoute as cz, type SellerCredentialAttestationRuntime as d, type AttestationServiceSellerCredentialUploadResponse as e, type GoogleOAuthSellerCredentialUploadBodyByPlatform as f, type BestByPlatformResponse as g, type ValidatePayeeDetailsResponse as h, type PostDepositDetailsResponse as i, type GetPayeeDetailsRequest as j, type GetPayeeDetailsResponse as k, type GetOwnerDepositsRequest as l, type GetOwnerDepositsResponse as m, type GetTakerTierRequest as n, type GetTakerTierResponse as o, type GetDepositBundleParams as p, type ApiAdapterOptions as q, type GetDepositBundleResponse as r, type GetOrderbookParams as s, type GetOrderbookResponse as t, type CurrencyType as u, type PaymentMethodCatalog as v, type TxOverrides as w, type SignalIntentReferralFee as x, type SignalIntentMethodParams as y, type CancelIntentMethodParams as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zkp2p/sdk",
3
- "version": "0.5.2",
3
+ "version": "0.5.5",
4
4
  "description": "ZKP2P Client SDK - TypeScript SDK for deposit management, liquidity provision, and onramping",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.cjs",
@@ -88,8 +88,8 @@
88
88
  },
89
89
  "dependencies": {
90
90
  "@zkp2p/indexer-schema": "0.2.3",
91
- "@zkp2p/contracts-v2": "0.2.2",
92
- "@zkp2p/zkp2p-attestation": "1.5.1",
91
+ "@zkp2p/contracts-v2": "0.2.4",
92
+ "@zkp2p/zkp2p-attestation": "1.6.2",
93
93
  "ethers": "^6.0.0",
94
94
  "ox": "^0.11.1"
95
95
  },
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/react/hooks/vaultUtils.ts"],"names":[],"mappings":"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","file":"chunk-LPJE2MN7.mjs","sourcesContent":["import type { Address, Hex } from 'viem';\nimport type { PreparedTransaction } from '../../types/prepared';\n\n// ---------------------------------------------------------------------------\n// Constants\n// ---------------------------------------------------------------------------\n\nexport const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000' as const;\nexport const ZERO_RATE_MANAGER_ID =\n '0x0000000000000000000000000000000000000000000000000000000000000000' as const;\n\n// ---------------------------------------------------------------------------\n// Normalizers\n// ---------------------------------------------------------------------------\n\nexport const normalizeRateManagerId = (value?: string | null): string =>\n (value ?? ZERO_RATE_MANAGER_ID).toLowerCase();\n\nexport const normalizeRegistry = (value?: string | null): string =>\n (value ?? ZERO_ADDRESS).toLowerCase();\n\nexport const isZeroRateManagerId = (value?: string | null): boolean => {\n if (!value) return true;\n const normalized = value.toLowerCase();\n return normalized === ZERO_ADDRESS || normalized === ZERO_RATE_MANAGER_ID;\n};\n\n// ---------------------------------------------------------------------------\n// Error helper\n// ---------------------------------------------------------------------------\n\nexport const asErrorMessage = (error: unknown): string => {\n if (!error) return 'Unknown error';\n if (error instanceof Error) return error.message;\n if (typeof error === 'string') return error;\n\n const anyErr = error as Record<string, unknown>;\n if (typeof anyErr.shortMessage === 'string') return anyErr.shortMessage;\n if (typeof anyErr.details === 'string') return anyErr.details;\n if (typeof anyErr.message === 'string') return anyErr.message;\n\n try {\n return JSON.stringify(error);\n } catch {\n return String(error);\n }\n};\n\n// ---------------------------------------------------------------------------\n// Delegation state classification\n// ---------------------------------------------------------------------------\n\nexport type DelegationState = 'delegated_here' | 'delegated_elsewhere' | 'not_delegated';\n\n/**\n * Classify whether a deposit is delegated to the target vault, delegated\n * elsewhere, or not delegated at all.\n *\n * @param currentRateManagerId The deposit's current rateManagerId (from indexer)\n * @param currentRegistry The deposit's current rateManagerAddress / registry (from indexer)\n * @param targetRateManagerId The vault's rateManagerId we're comparing against\n * @param targetRegistry The vault's registry address we're comparing against\n */\nexport const classifyDelegationState = (\n currentRateManagerId: string | null | undefined,\n currentRegistry: string | null | undefined,\n targetRateManagerId: string,\n targetRegistry: string | null | undefined,\n): DelegationState => {\n if (isZeroRateManagerId(currentRateManagerId)) {\n return 'not_delegated';\n }\n\n const normalizedCurrent = normalizeRateManagerId(currentRateManagerId);\n const normalizedTarget = targetRateManagerId.toLowerCase();\n const normalizedCurrentRegistry = normalizeRegistry(currentRegistry);\n const normalizedTargetRegistry = targetRegistry ? targetRegistry.toLowerCase() : '';\n\n const idsMatch = normalizedCurrent === normalizedTarget;\n const registryMatches = normalizedTargetRegistry\n ? normalizedCurrentRegistry === normalizedTargetRegistry\n : true;\n\n if (idsMatch && registryMatches) {\n return 'delegated_here';\n }\n\n return 'delegated_elsewhere';\n};\n\nexport const assertAtomicDelegationSwitchSupport = (\n requiresSwitch: boolean,\n canBatch: boolean,\n): void => {\n if (!requiresSwitch || canBatch) return;\n throw new Error(\n 'Switching delegation targets requires smart-account batching. Clear the existing delegation first.',\n );\n};\n\n// ---------------------------------------------------------------------------\n// Contract routing\n// ---------------------------------------------------------------------------\n\nexport type DelegationRoute = 'v2';\n\nexport const getDelegationRoute = (_client: unknown, _escrow: Address): DelegationRoute => 'v2';\n\ntype DelegationMethodSupportClient = Partial<\n Record<'setRateManager' | 'clearRateManager', { prepare?: unknown }>\n>;\n\nexport const assertDelegationMethodSupport = (\n client: DelegationMethodSupportClient,\n _route: DelegationRoute,\n action: 'set' | 'clear',\n): void => {\n const method = action === 'set' ? 'setRateManager' : 'clearRateManager';\n if (client?.[method]?.prepare) return;\n throw new Error(`Delegation requires SDK ${method} support`);\n};\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\nexport interface DelegationDepositTarget {\n compositeDepositId: string;\n escrow: Address;\n depositId: bigint;\n currentRateManagerId?: string | null;\n currentRateManagerRegistry?: string | null;\n}\n\nexport interface BatchResult {\n hashes: string[];\n failed: Array<{ compositeDepositId: string; error: string }>;\n}\n\n/**\n * Callback the consumer provides for sending a single prepared transaction.\n * Returns the transaction hash.\n */\nexport type SendTransactionFn = (tx: { to: Address; data: Hex; value?: bigint }) => Promise<string>;\n\n/**\n * Optional callback for batching multiple calls in a single user operation\n * (e.g. via a smart account). If not provided, transactions are sent\n * sequentially via sendTransaction.\n */\nexport type SendBatchFn = (\n txs: Array<{ to: Address; data: Hex; value?: bigint }>,\n) => Promise<string>;\n\n// ---------------------------------------------------------------------------\n// Prepare helpers (used internally by hooks)\n// ---------------------------------------------------------------------------\n\nexport const prepareClearDelegationTx = async (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n client: any,\n params: { escrow: Address; depositId: bigint },\n referrer?: string | string[],\n): Promise<PreparedTransaction> => {\n const route = getDelegationRoute(client, params.escrow);\n assertDelegationMethodSupport(client, route, 'clear');\n return client.clearRateManager.prepare({\n escrowAddress: params.escrow,\n depositId: params.depositId,\n ...(referrer ? { txOverrides: { referrer } } : {}),\n });\n};\n\nexport const prepareSetDelegationTx = async (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n client: any,\n params: {\n escrow: Address;\n depositId: bigint;\n registry: Address;\n rateManagerId: Hex;\n },\n referrer?: string | string[],\n): Promise<PreparedTransaction> => {\n const route = getDelegationRoute(client, params.escrow);\n assertDelegationMethodSupport(client, route, 'set');\n return client.setRateManager.prepare({\n escrowAddress: params.escrow,\n depositId: params.depositId,\n rateManagerAddress: params.registry,\n rateManagerId: params.rateManagerId,\n ...(referrer ? { txOverrides: { referrer } } : {}),\n });\n};\n"]}
@@ -1,5 +0,0 @@
1
- export { enrichPvDepositView, enrichPvIntentView, parseDepositView, parseIntentView } from './chunk-L526MKG3.mjs';
2
- import './chunk-ZFBH4HD7.mjs';
3
- import './chunk-J5LGTIGS.mjs';
4
- //# sourceMappingURL=protocolViewerParsers-GGSM2243.mjs.map
5
- //# sourceMappingURL=protocolViewerParsers-GGSM2243.mjs.map