@zkp2p/sdk 0.2.4 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/index.cjs +148 -40
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +10 -6
- package/dist/index.d.ts +10 -6
- package/dist/index.mjs +147 -42
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/{vaultUtils-C2wT1ZYY.d.mts → vaultUtils-sodi4Xx-.d.mts} +74 -6
- package/dist/{vaultUtils-C2wT1ZYY.d.ts → vaultUtils-sodi4Xx-.d.ts} +74 -6
- package/package.json +2 -2
package/dist/react.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Z as Zkp2pClient, i as SignalIntentMethodParams,
|
|
2
|
-
export {
|
|
1
|
+
import { Z as Zkp2pClient, i as SignalIntentMethodParams, aj as PreparedTransaction, am as TakerTier, f as GetTakerTierRequest, g as GetTakerTierResponse, F as FulfillIntentMethodParams, bB as SendTransactionFn, bC as SendBatchFn, bz as DelegationDepositTarget, bA as BatchResult } from './vaultUtils-sodi4Xx-.mjs';
|
|
2
|
+
export { bx as DelegationRoute, by as DelegationState, bD as VAULT_ZERO_ADDRESS, br as ZERO_RATE_MANAGER_ID, bE as asErrorMessage, bF as assertDelegationMethodSupport, bw as classifyDelegationState, bv as getDelegationRoute, bs as isZeroRateManagerId, bt as normalizeRateManagerId, bu as normalizeRegistry } from './vaultUtils-sodi4Xx-.mjs';
|
|
3
3
|
import { Hash, Address, Hex } from 'viem';
|
|
4
4
|
import '@zkp2p/indexer-schema';
|
|
5
5
|
import 'abitype';
|
package/dist/react.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Z as Zkp2pClient, i as SignalIntentMethodParams,
|
|
2
|
-
export {
|
|
1
|
+
import { Z as Zkp2pClient, i as SignalIntentMethodParams, aj as PreparedTransaction, am as TakerTier, f as GetTakerTierRequest, g as GetTakerTierResponse, F as FulfillIntentMethodParams, bB as SendTransactionFn, bC as SendBatchFn, bz as DelegationDepositTarget, bA as BatchResult } from './vaultUtils-sodi4Xx-.js';
|
|
2
|
+
export { bx as DelegationRoute, by as DelegationState, bD as VAULT_ZERO_ADDRESS, br as ZERO_RATE_MANAGER_ID, bE as asErrorMessage, bF as assertDelegationMethodSupport, bw as classifyDelegationState, bv as getDelegationRoute, bs as isZeroRateManagerId, bt as normalizeRateManagerId, bu as normalizeRegistry } from './vaultUtils-sodi4Xx-.js';
|
|
3
3
|
import { Hash, Address, Hex } from 'viem';
|
|
4
4
|
import '@zkp2p/indexer-schema';
|
|
5
5
|
import 'abitype';
|
|
@@ -888,6 +888,27 @@ type QuoteRequest = {
|
|
|
888
888
|
/** Max suggestions per direction (1-10, default: 3) */
|
|
889
889
|
nearbyQuotesCount?: number;
|
|
890
890
|
};
|
|
891
|
+
type QuotesBestByPlatformRequest = {
|
|
892
|
+
fiatCurrency: string;
|
|
893
|
+
user: string;
|
|
894
|
+
recipient: string;
|
|
895
|
+
destinationChainId: number;
|
|
896
|
+
destinationToken: string;
|
|
897
|
+
referrer?: string;
|
|
898
|
+
referrerFeeConfig?: ReferrerFeeConfig;
|
|
899
|
+
amount: string;
|
|
900
|
+
isExactFiat?: boolean;
|
|
901
|
+
/** Optional filter: limit quotes to these escrow contracts */
|
|
902
|
+
escrowAddresses?: string[];
|
|
903
|
+
/** Minimum maker success rate in basis points (0-10000) */
|
|
904
|
+
minDepositSuccessRateBps?: number;
|
|
905
|
+
/** Whether quotes may include business accounts */
|
|
906
|
+
supportBusinessAccounts?: boolean;
|
|
907
|
+
/** Optional intent gating service address to filter by */
|
|
908
|
+
intentGatingService?: string;
|
|
909
|
+
/** Include whitelist-gated private orderbook deposits */
|
|
910
|
+
includePrivateOrderbooks?: boolean;
|
|
911
|
+
};
|
|
891
912
|
type FiatResponse = {
|
|
892
913
|
currencyCode: string;
|
|
893
914
|
currencyName: string;
|
|
@@ -1010,6 +1031,34 @@ type QuoteResponse = {
|
|
|
1010
1031
|
type GetQuoteResponse = Omit<QuoteResponse, 'responseObject'> & {
|
|
1011
1032
|
responseObject: GetQuoteResponseObject;
|
|
1012
1033
|
};
|
|
1034
|
+
type PlatformQuote = {
|
|
1035
|
+
platform: string;
|
|
1036
|
+
supported: boolean;
|
|
1037
|
+
available: boolean;
|
|
1038
|
+
bestQuote?: QuoteSingleResponse;
|
|
1039
|
+
};
|
|
1040
|
+
type GetPlatformQuote = Omit<PlatformQuote, 'bestQuote'> & {
|
|
1041
|
+
bestQuote?: GetQuoteSingleResponse;
|
|
1042
|
+
};
|
|
1043
|
+
type BestByPlatformResponseObject = {
|
|
1044
|
+
fiat: FiatResponse;
|
|
1045
|
+
token: TokenResponse;
|
|
1046
|
+
fees: QuoteFeesResponse;
|
|
1047
|
+
platformQuotes: PlatformQuote[];
|
|
1048
|
+
quoteExpiresAt: string;
|
|
1049
|
+
};
|
|
1050
|
+
type GetBestByPlatformResponseObject = Omit<BestByPlatformResponseObject, 'platformQuotes'> & {
|
|
1051
|
+
platformQuotes: GetPlatformQuote[];
|
|
1052
|
+
};
|
|
1053
|
+
type BestByPlatformResponse = {
|
|
1054
|
+
message: string;
|
|
1055
|
+
success: boolean;
|
|
1056
|
+
responseObject: BestByPlatformResponseObject;
|
|
1057
|
+
statusCode: number;
|
|
1058
|
+
};
|
|
1059
|
+
type GetBestByPlatformResponse = Omit<BestByPlatformResponse, 'responseObject'> & {
|
|
1060
|
+
responseObject: GetBestByPlatformResponseObject;
|
|
1061
|
+
};
|
|
1013
1062
|
/**
|
|
1014
1063
|
* Request to fetch payee details
|
|
1015
1064
|
* Prefer `processorName`; `platform` kept for backward compatibility.
|
|
@@ -1308,7 +1357,7 @@ type PaymentPlatformType = (typeof PAYMENT_PLATFORMS)[number];
|
|
|
1308
1357
|
* walletClient,
|
|
1309
1358
|
* chainId: 8453, // Base mainnet
|
|
1310
1359
|
* runtimeEnv: 'production',
|
|
1311
|
-
* apiKey: 'your-curator-api-key',
|
|
1360
|
+
* // apiKey: 'your-curator-api-key', // Optional: auto gating-signature fetches and quote enrichment
|
|
1312
1361
|
* indexerApiKey: 'your-indexer-key',
|
|
1313
1362
|
* };
|
|
1314
1363
|
* ```
|
|
@@ -1326,7 +1375,11 @@ type Zkp2pNextOptions = {
|
|
|
1326
1375
|
indexerUrl?: string;
|
|
1327
1376
|
/** Base API URL for ZKP2P services (defaults to https://api.zkp2p.xyz) */
|
|
1328
1377
|
baseApiUrl?: string;
|
|
1329
|
-
/**
|
|
1378
|
+
/**
|
|
1379
|
+
* Optional curator API key (sent as `x-api-key`) for auto-fetching
|
|
1380
|
+
* `signalIntent` gating signatures and authenticated quote enrichment.
|
|
1381
|
+
* Not used by `registerPayeeDetails` or `getTakerTier`.
|
|
1382
|
+
*/
|
|
1330
1383
|
apiKey?: string;
|
|
1331
1384
|
/** Optional bearer token for hybrid authentication */
|
|
1332
1385
|
authorizationToken?: string;
|
|
@@ -1495,7 +1548,6 @@ type OnchainCurrencyEntry = {
|
|
|
1495
1548
|
* const client = new OfframpClient({
|
|
1496
1549
|
* walletClient,
|
|
1497
1550
|
* chainId: base.id,
|
|
1498
|
-
* apiKey: 'your-api-key',
|
|
1499
1551
|
* });
|
|
1500
1552
|
*
|
|
1501
1553
|
* // Step 1: Register payee details (separate from deposit creation)
|
|
@@ -1577,7 +1629,7 @@ declare class Zkp2pClient {
|
|
|
1577
1629
|
readonly orchestratorRegistryAbi?: Abi;
|
|
1578
1630
|
/** Base API URL for ZKP2P services */
|
|
1579
1631
|
readonly baseApiUrl?: string;
|
|
1580
|
-
/** API key for
|
|
1632
|
+
/** Optional curator API key (`x-api-key`) for auto gating-signature fetches and quote enrichment */
|
|
1581
1633
|
readonly apiKey?: string;
|
|
1582
1634
|
/** Bearer token for hybrid authentication */
|
|
1583
1635
|
readonly authorizationToken?: string;
|
|
@@ -2536,7 +2588,9 @@ declare class Zkp2pClient {
|
|
|
2536
2588
|
* sending fiat payment to the deposit's payee.
|
|
2537
2589
|
*
|
|
2538
2590
|
* If `gatingServiceSignature` is not provided, the SDK will automatically
|
|
2539
|
-
* fetch one from
|
|
2591
|
+
* fetch one from curator `/v3/intent` when `apiKey` or `authorizationToken`
|
|
2592
|
+
* is available. Otherwise you must provide `gatingServiceSignature` and
|
|
2593
|
+
* `signatureExpiration` yourself.
|
|
2540
2594
|
*
|
|
2541
2595
|
* **Prepare Mode**: Use `.prepare()` to get the transaction calldata without sending:
|
|
2542
2596
|
* ```typescript
|
|
@@ -2785,6 +2839,20 @@ declare class Zkp2pClient {
|
|
|
2785
2839
|
baseApiUrl?: string;
|
|
2786
2840
|
timeoutMs?: number;
|
|
2787
2841
|
}): Promise<GetQuoteResponse>;
|
|
2842
|
+
/**
|
|
2843
|
+
* **Supporting Method** - Fetches the best available quote per supported payment platform.
|
|
2844
|
+
*
|
|
2845
|
+
* Returns one quote per platform when available. When authenticated, the API
|
|
2846
|
+
* returns payee details in each platform's best quote.
|
|
2847
|
+
*
|
|
2848
|
+
* @param req - Best-by-platform quote request parameters
|
|
2849
|
+
* @param opts - Optional overrides for API URL and timeout
|
|
2850
|
+
* @returns Best-by-platform quote response
|
|
2851
|
+
*/
|
|
2852
|
+
getQuotesBestByPlatform(req: QuotesBestByPlatformRequest, opts?: {
|
|
2853
|
+
baseApiUrl?: string;
|
|
2854
|
+
timeoutMs?: number;
|
|
2855
|
+
}): Promise<GetBestByPlatformResponse>;
|
|
2788
2856
|
/**
|
|
2789
2857
|
* **Supporting Method** - Fetches taker tier information for an address.
|
|
2790
2858
|
*
|
|
@@ -2960,4 +3028,4 @@ type SendBatchFn = (txs: Array<{
|
|
|
2960
3028
|
value?: bigint;
|
|
2961
3029
|
}>) => Promise<string>;
|
|
2962
3030
|
|
|
2963
|
-
export { type
|
|
3031
|
+
export { type NearbyQuote as $, type AuthorizationTokenProvider as A, type BestByPlatformResponse as B, type CurrencyType as C, type DepositWithRelations as D, type GetNearbyQuote as E, type FulfillIntentMethodParams as F, type GetPayeeDetailsRequest as G, type GetNearbySuggestions as H, type IntentEntity as I, type GetQuoteResponse as J, type GetQuoteResponseObject as K, type GetQuoteSingleResponse as L, type QuoteResponse as M, type QuoteResponseObject as N, type QuoteSingleResponse as O, type PostDepositDetailsRequest as P, type QuotesBestByPlatformRequest as Q, type ReferrerFeeConfig as R, type SignalIntentReferralFee as S, type TxOverrides as T, type QuoteIntentResponse as U, type ValidatePayeeDetailsRequest as V, type WithdrawDepositParams as W, type QuoteFeesResponse as X, type FiatResponse as Y, Zkp2pClient as Z, type TokenResponse as _, type ValidatePayeeDetailsResponse as a, type PaymentVerifiedRecord as a$, type NearbySuggestions as a0, type ApiDeposit as a1, type DepositVerifier as a2, type DepositVerifierCurrency as a3, type DepositStatus as a4, type GetDepositByIdRequest as a5, type GetDepositByIdResponse as a6, type Intent as a7, type ApiIntentStatus as a8, type GetOwnerIntentsRequest as a9, type DepositPaymentMethodEntity as aA, type MethodCurrencyEntity as aB, type IntentStatus as aC, type RateManagerEntity as aD, type RateManagerRateEntity as aE, type RateManagerDelegationEntity as aF, type ManagerAggregateStatsEntity as aG, type ManagerStatsEntity as aH, type ManagerDailySnapshotEntity as aI, type RateManagerListItem as aJ, type RateManagerDetail as aK, type ManualRateUpdateEntity as aL, type OracleConfigUpdateEntity as aM, type DepositFundActivityEntity as aN, type DepositDailySnapshotEntity as aO, type DepositFundActivityType as aP, type DepositFilter as aQ, type PaginationOptions as aR, type DepositOrderField as aS, type OrderDirection$1 as aT, type RateManagerFilter as aU, type RateManagerPaginationOptions as aV, type RateManagerDelegationPaginationOptions as aW, type RateManagerOrderField as aX, type OrderDirection as aY, type DeploymentEnv as aZ, type FulfillmentRecord as a_, type GetOwnerIntentsResponse as aa, type GetIntentsByDepositRequest as ab, type GetIntentsByDepositResponse as ac, type GetIntentByHashRequest as ad, type GetIntentByHashResponse as ae, type RegisterPayeeDetailsRequest as af, type RegisterPayeeDetailsResponse as ag, type OnchainCurrency as ah, type DepositVerifierData as ai, type PreparedTransaction as aj, type OrderStats as ak, type DepositIntentStatistics as al, type TakerTier as am, type TakerTierStats as an, type TakerTierLevel as ao, type PlatformLimit as ap, type PlatformRiskLevel as aq, IndexerClient as ar, defaultIndexerEndpoint as as, IndexerDepositService as at, IndexerRateManagerService as au, compareEventCursorIdsByRecency as av, fetchFulfillmentAndPayment as aw, type DepositEntity as ax, type IntentFulfilledEntity as ay, type IntentFulfillmentAmountsEntity as az, type PostDepositDetailsResponse as b, type FulfillmentAndPaymentResponse as b0, PAYMENT_PLATFORMS as b1, type PaymentPlatformType as b2, Currency as b3, currencyInfo as b4, getCurrencyInfoFromHash as b5, getCurrencyInfoFromCountryCode as b6, getCurrencyCodeFromHash as b7, isSupportedCurrencyHash as b8, mapConversionRatesToOnchainMinRate as b9, type BatchResult as bA, type SendTransactionFn as bB, type SendBatchFn as bC, ZERO_ADDRESS as bD, asErrorMessage as bE, assertDelegationMethodSupport as bF, type CurrencyData as ba, getContracts as bb, getRateManagerContracts as bc, getPaymentMethodsCatalog as bd, getGatingServiceAddress as be, type RuntimeEnv as bf, parseDepositView as bg, parseIntentView as bh, enrichPvDepositView as bi, enrichPvIntentView as bj, type PV_DepositView as bk, type PV_Deposit as bl, type PV_PaymentMethodData as bm, type PV_Currency as bn, type PV_ReferralFee as bo, type PV_IntentView as bp, type PV_Intent as bq, ZERO_RATE_MANAGER_ID as br, isZeroRateManagerId as bs, normalizeRateManagerId as bt, normalizeRegistry as bu, getDelegationRoute as bv, classifyDelegationState as bw, type DelegationRoute as bx, type DelegationState as by, type DelegationDepositTarget as bz, type GetPayeeDetailsResponse as c, type GetOwnerDepositsRequest as d, type GetOwnerDepositsResponse as e, type GetTakerTierRequest as f, type GetTakerTierResponse as g, type PaymentMethodCatalog as h, type SignalIntentMethodParams as i, type CancelIntentMethodParams as j, type Zkp2pNextOptions as k, type TimeoutConfig as l, type ActionCallback as m, type CreateDepositParams as n, type CreateDepositConversionRate as o, type Range as p, type SignalIntentParams as q, type FulfillIntentParams as r, type ReleaseFundsToPayerParams as s, type CancelIntentParams as t, type BestByPlatformResponseObject as u, type GetBestByPlatformResponse as v, type GetBestByPlatformResponseObject as w, type GetPlatformQuote as x, type PlatformQuote as y, type QuoteRequest as z };
|
|
@@ -888,6 +888,27 @@ type QuoteRequest = {
|
|
|
888
888
|
/** Max suggestions per direction (1-10, default: 3) */
|
|
889
889
|
nearbyQuotesCount?: number;
|
|
890
890
|
};
|
|
891
|
+
type QuotesBestByPlatformRequest = {
|
|
892
|
+
fiatCurrency: string;
|
|
893
|
+
user: string;
|
|
894
|
+
recipient: string;
|
|
895
|
+
destinationChainId: number;
|
|
896
|
+
destinationToken: string;
|
|
897
|
+
referrer?: string;
|
|
898
|
+
referrerFeeConfig?: ReferrerFeeConfig;
|
|
899
|
+
amount: string;
|
|
900
|
+
isExactFiat?: boolean;
|
|
901
|
+
/** Optional filter: limit quotes to these escrow contracts */
|
|
902
|
+
escrowAddresses?: string[];
|
|
903
|
+
/** Minimum maker success rate in basis points (0-10000) */
|
|
904
|
+
minDepositSuccessRateBps?: number;
|
|
905
|
+
/** Whether quotes may include business accounts */
|
|
906
|
+
supportBusinessAccounts?: boolean;
|
|
907
|
+
/** Optional intent gating service address to filter by */
|
|
908
|
+
intentGatingService?: string;
|
|
909
|
+
/** Include whitelist-gated private orderbook deposits */
|
|
910
|
+
includePrivateOrderbooks?: boolean;
|
|
911
|
+
};
|
|
891
912
|
type FiatResponse = {
|
|
892
913
|
currencyCode: string;
|
|
893
914
|
currencyName: string;
|
|
@@ -1010,6 +1031,34 @@ type QuoteResponse = {
|
|
|
1010
1031
|
type GetQuoteResponse = Omit<QuoteResponse, 'responseObject'> & {
|
|
1011
1032
|
responseObject: GetQuoteResponseObject;
|
|
1012
1033
|
};
|
|
1034
|
+
type PlatformQuote = {
|
|
1035
|
+
platform: string;
|
|
1036
|
+
supported: boolean;
|
|
1037
|
+
available: boolean;
|
|
1038
|
+
bestQuote?: QuoteSingleResponse;
|
|
1039
|
+
};
|
|
1040
|
+
type GetPlatformQuote = Omit<PlatformQuote, 'bestQuote'> & {
|
|
1041
|
+
bestQuote?: GetQuoteSingleResponse;
|
|
1042
|
+
};
|
|
1043
|
+
type BestByPlatformResponseObject = {
|
|
1044
|
+
fiat: FiatResponse;
|
|
1045
|
+
token: TokenResponse;
|
|
1046
|
+
fees: QuoteFeesResponse;
|
|
1047
|
+
platformQuotes: PlatformQuote[];
|
|
1048
|
+
quoteExpiresAt: string;
|
|
1049
|
+
};
|
|
1050
|
+
type GetBestByPlatformResponseObject = Omit<BestByPlatformResponseObject, 'platformQuotes'> & {
|
|
1051
|
+
platformQuotes: GetPlatformQuote[];
|
|
1052
|
+
};
|
|
1053
|
+
type BestByPlatformResponse = {
|
|
1054
|
+
message: string;
|
|
1055
|
+
success: boolean;
|
|
1056
|
+
responseObject: BestByPlatformResponseObject;
|
|
1057
|
+
statusCode: number;
|
|
1058
|
+
};
|
|
1059
|
+
type GetBestByPlatformResponse = Omit<BestByPlatformResponse, 'responseObject'> & {
|
|
1060
|
+
responseObject: GetBestByPlatformResponseObject;
|
|
1061
|
+
};
|
|
1013
1062
|
/**
|
|
1014
1063
|
* Request to fetch payee details
|
|
1015
1064
|
* Prefer `processorName`; `platform` kept for backward compatibility.
|
|
@@ -1308,7 +1357,7 @@ type PaymentPlatformType = (typeof PAYMENT_PLATFORMS)[number];
|
|
|
1308
1357
|
* walletClient,
|
|
1309
1358
|
* chainId: 8453, // Base mainnet
|
|
1310
1359
|
* runtimeEnv: 'production',
|
|
1311
|
-
* apiKey: 'your-curator-api-key',
|
|
1360
|
+
* // apiKey: 'your-curator-api-key', // Optional: auto gating-signature fetches and quote enrichment
|
|
1312
1361
|
* indexerApiKey: 'your-indexer-key',
|
|
1313
1362
|
* };
|
|
1314
1363
|
* ```
|
|
@@ -1326,7 +1375,11 @@ type Zkp2pNextOptions = {
|
|
|
1326
1375
|
indexerUrl?: string;
|
|
1327
1376
|
/** Base API URL for ZKP2P services (defaults to https://api.zkp2p.xyz) */
|
|
1328
1377
|
baseApiUrl?: string;
|
|
1329
|
-
/**
|
|
1378
|
+
/**
|
|
1379
|
+
* Optional curator API key (sent as `x-api-key`) for auto-fetching
|
|
1380
|
+
* `signalIntent` gating signatures and authenticated quote enrichment.
|
|
1381
|
+
* Not used by `registerPayeeDetails` or `getTakerTier`.
|
|
1382
|
+
*/
|
|
1330
1383
|
apiKey?: string;
|
|
1331
1384
|
/** Optional bearer token for hybrid authentication */
|
|
1332
1385
|
authorizationToken?: string;
|
|
@@ -1495,7 +1548,6 @@ type OnchainCurrencyEntry = {
|
|
|
1495
1548
|
* const client = new OfframpClient({
|
|
1496
1549
|
* walletClient,
|
|
1497
1550
|
* chainId: base.id,
|
|
1498
|
-
* apiKey: 'your-api-key',
|
|
1499
1551
|
* });
|
|
1500
1552
|
*
|
|
1501
1553
|
* // Step 1: Register payee details (separate from deposit creation)
|
|
@@ -1577,7 +1629,7 @@ declare class Zkp2pClient {
|
|
|
1577
1629
|
readonly orchestratorRegistryAbi?: Abi;
|
|
1578
1630
|
/** Base API URL for ZKP2P services */
|
|
1579
1631
|
readonly baseApiUrl?: string;
|
|
1580
|
-
/** API key for
|
|
1632
|
+
/** Optional curator API key (`x-api-key`) for auto gating-signature fetches and quote enrichment */
|
|
1581
1633
|
readonly apiKey?: string;
|
|
1582
1634
|
/** Bearer token for hybrid authentication */
|
|
1583
1635
|
readonly authorizationToken?: string;
|
|
@@ -2536,7 +2588,9 @@ declare class Zkp2pClient {
|
|
|
2536
2588
|
* sending fiat payment to the deposit's payee.
|
|
2537
2589
|
*
|
|
2538
2590
|
* If `gatingServiceSignature` is not provided, the SDK will automatically
|
|
2539
|
-
* fetch one from
|
|
2591
|
+
* fetch one from curator `/v3/intent` when `apiKey` or `authorizationToken`
|
|
2592
|
+
* is available. Otherwise you must provide `gatingServiceSignature` and
|
|
2593
|
+
* `signatureExpiration` yourself.
|
|
2540
2594
|
*
|
|
2541
2595
|
* **Prepare Mode**: Use `.prepare()` to get the transaction calldata without sending:
|
|
2542
2596
|
* ```typescript
|
|
@@ -2785,6 +2839,20 @@ declare class Zkp2pClient {
|
|
|
2785
2839
|
baseApiUrl?: string;
|
|
2786
2840
|
timeoutMs?: number;
|
|
2787
2841
|
}): Promise<GetQuoteResponse>;
|
|
2842
|
+
/**
|
|
2843
|
+
* **Supporting Method** - Fetches the best available quote per supported payment platform.
|
|
2844
|
+
*
|
|
2845
|
+
* Returns one quote per platform when available. When authenticated, the API
|
|
2846
|
+
* returns payee details in each platform's best quote.
|
|
2847
|
+
*
|
|
2848
|
+
* @param req - Best-by-platform quote request parameters
|
|
2849
|
+
* @param opts - Optional overrides for API URL and timeout
|
|
2850
|
+
* @returns Best-by-platform quote response
|
|
2851
|
+
*/
|
|
2852
|
+
getQuotesBestByPlatform(req: QuotesBestByPlatformRequest, opts?: {
|
|
2853
|
+
baseApiUrl?: string;
|
|
2854
|
+
timeoutMs?: number;
|
|
2855
|
+
}): Promise<GetBestByPlatformResponse>;
|
|
2788
2856
|
/**
|
|
2789
2857
|
* **Supporting Method** - Fetches taker tier information for an address.
|
|
2790
2858
|
*
|
|
@@ -2960,4 +3028,4 @@ type SendBatchFn = (txs: Array<{
|
|
|
2960
3028
|
value?: bigint;
|
|
2961
3029
|
}>) => Promise<string>;
|
|
2962
3030
|
|
|
2963
|
-
export { type
|
|
3031
|
+
export { type NearbyQuote as $, type AuthorizationTokenProvider as A, type BestByPlatformResponse as B, type CurrencyType as C, type DepositWithRelations as D, type GetNearbyQuote as E, type FulfillIntentMethodParams as F, type GetPayeeDetailsRequest as G, type GetNearbySuggestions as H, type IntentEntity as I, type GetQuoteResponse as J, type GetQuoteResponseObject as K, type GetQuoteSingleResponse as L, type QuoteResponse as M, type QuoteResponseObject as N, type QuoteSingleResponse as O, type PostDepositDetailsRequest as P, type QuotesBestByPlatformRequest as Q, type ReferrerFeeConfig as R, type SignalIntentReferralFee as S, type TxOverrides as T, type QuoteIntentResponse as U, type ValidatePayeeDetailsRequest as V, type WithdrawDepositParams as W, type QuoteFeesResponse as X, type FiatResponse as Y, Zkp2pClient as Z, type TokenResponse as _, type ValidatePayeeDetailsResponse as a, type PaymentVerifiedRecord as a$, type NearbySuggestions as a0, type ApiDeposit as a1, type DepositVerifier as a2, type DepositVerifierCurrency as a3, type DepositStatus as a4, type GetDepositByIdRequest as a5, type GetDepositByIdResponse as a6, type Intent as a7, type ApiIntentStatus as a8, type GetOwnerIntentsRequest as a9, type DepositPaymentMethodEntity as aA, type MethodCurrencyEntity as aB, type IntentStatus as aC, type RateManagerEntity as aD, type RateManagerRateEntity as aE, type RateManagerDelegationEntity as aF, type ManagerAggregateStatsEntity as aG, type ManagerStatsEntity as aH, type ManagerDailySnapshotEntity as aI, type RateManagerListItem as aJ, type RateManagerDetail as aK, type ManualRateUpdateEntity as aL, type OracleConfigUpdateEntity as aM, type DepositFundActivityEntity as aN, type DepositDailySnapshotEntity as aO, type DepositFundActivityType as aP, type DepositFilter as aQ, type PaginationOptions as aR, type DepositOrderField as aS, type OrderDirection$1 as aT, type RateManagerFilter as aU, type RateManagerPaginationOptions as aV, type RateManagerDelegationPaginationOptions as aW, type RateManagerOrderField as aX, type OrderDirection as aY, type DeploymentEnv as aZ, type FulfillmentRecord as a_, type GetOwnerIntentsResponse as aa, type GetIntentsByDepositRequest as ab, type GetIntentsByDepositResponse as ac, type GetIntentByHashRequest as ad, type GetIntentByHashResponse as ae, type RegisterPayeeDetailsRequest as af, type RegisterPayeeDetailsResponse as ag, type OnchainCurrency as ah, type DepositVerifierData as ai, type PreparedTransaction as aj, type OrderStats as ak, type DepositIntentStatistics as al, type TakerTier as am, type TakerTierStats as an, type TakerTierLevel as ao, type PlatformLimit as ap, type PlatformRiskLevel as aq, IndexerClient as ar, defaultIndexerEndpoint as as, IndexerDepositService as at, IndexerRateManagerService as au, compareEventCursorIdsByRecency as av, fetchFulfillmentAndPayment as aw, type DepositEntity as ax, type IntentFulfilledEntity as ay, type IntentFulfillmentAmountsEntity as az, type PostDepositDetailsResponse as b, type FulfillmentAndPaymentResponse as b0, PAYMENT_PLATFORMS as b1, type PaymentPlatformType as b2, Currency as b3, currencyInfo as b4, getCurrencyInfoFromHash as b5, getCurrencyInfoFromCountryCode as b6, getCurrencyCodeFromHash as b7, isSupportedCurrencyHash as b8, mapConversionRatesToOnchainMinRate as b9, type BatchResult as bA, type SendTransactionFn as bB, type SendBatchFn as bC, ZERO_ADDRESS as bD, asErrorMessage as bE, assertDelegationMethodSupport as bF, type CurrencyData as ba, getContracts as bb, getRateManagerContracts as bc, getPaymentMethodsCatalog as bd, getGatingServiceAddress as be, type RuntimeEnv as bf, parseDepositView as bg, parseIntentView as bh, enrichPvDepositView as bi, enrichPvIntentView as bj, type PV_DepositView as bk, type PV_Deposit as bl, type PV_PaymentMethodData as bm, type PV_Currency as bn, type PV_ReferralFee as bo, type PV_IntentView as bp, type PV_Intent as bq, ZERO_RATE_MANAGER_ID as br, isZeroRateManagerId as bs, normalizeRateManagerId as bt, normalizeRegistry as bu, getDelegationRoute as bv, classifyDelegationState as bw, type DelegationRoute as bx, type DelegationState as by, type DelegationDepositTarget as bz, type GetPayeeDetailsResponse as c, type GetOwnerDepositsRequest as d, type GetOwnerDepositsResponse as e, type GetTakerTierRequest as f, type GetTakerTierResponse as g, type PaymentMethodCatalog as h, type SignalIntentMethodParams as i, type CancelIntentMethodParams as j, type Zkp2pNextOptions as k, type TimeoutConfig as l, type ActionCallback as m, type CreateDepositParams as n, type CreateDepositConversionRate as o, type Range as p, type SignalIntentParams as q, type FulfillIntentParams as r, type ReleaseFundsToPayerParams as s, type CancelIntentParams as t, type BestByPlatformResponseObject as u, type GetBestByPlatformResponse as v, type GetBestByPlatformResponseObject as w, type GetPlatformQuote as x, type PlatformQuote as y, type QuoteRequest as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zkp2p/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
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,7 +88,7 @@
|
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
90
|
"@zkp2p/indexer-schema": "0.2.3",
|
|
91
|
-
"@zkp2p/contracts-v2": "0.2.
|
|
91
|
+
"@zkp2p/contracts-v2": "0.2.1",
|
|
92
92
|
"ethers": "^6.0.0",
|
|
93
93
|
"ox": "^0.11.1"
|
|
94
94
|
},
|