@zkp2p/sdk 0.3.0 → 0.3.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 +6 -6
- package/dist/index.cjs +137 -41
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +137 -41
- package/dist/index.mjs.map +1 -1
- package/dist/react.cjs +4 -1
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.mts +4 -10
- package/dist/react.d.ts +4 -10
- package/dist/react.mjs +4 -1
- package/dist/react.mjs.map +1 -1
- package/dist/{vaultUtils-sodi4Xx-.d.mts → vaultUtils-DATqc35J.d.mts} +52 -35
- package/dist/{vaultUtils-sodi4Xx-.d.ts → vaultUtils-DATqc35J.d.ts} +52 -35
- package/package.json +1 -1
|
@@ -423,6 +423,7 @@ type IntentStatus = `${IntentStatus$1}`;
|
|
|
423
423
|
type DepositEntity = WithOverrides<Deposit, {
|
|
424
424
|
status: DepositStatus$1;
|
|
425
425
|
retainOnEmpty?: boolean;
|
|
426
|
+
whitelistHookAddress?: string | null;
|
|
426
427
|
}>;
|
|
427
428
|
type DepositPaymentMethodEntity = DepositPaymentMethod;
|
|
428
429
|
type MethodCurrencyEntity = MethodCurrency;
|
|
@@ -773,6 +774,16 @@ type ReferrerFeeConfig = {
|
|
|
773
774
|
recipient: `0x${string}`;
|
|
774
775
|
feeBps: number;
|
|
775
776
|
};
|
|
777
|
+
type CuratorPayeeData = {
|
|
778
|
+
offchainId: string;
|
|
779
|
+
telegramUsername: string | null;
|
|
780
|
+
metadata: Record<string, string> | null;
|
|
781
|
+
};
|
|
782
|
+
type CuratorPayeeDataInput = {
|
|
783
|
+
offchainId: string;
|
|
784
|
+
telegramUsername?: string | null;
|
|
785
|
+
metadata?: Record<string, string> | null;
|
|
786
|
+
};
|
|
776
787
|
/**
|
|
777
788
|
* Parameters for fulfilling an intent with payment attestation
|
|
778
789
|
*/
|
|
@@ -836,10 +847,12 @@ type SignalIntentParams = {
|
|
|
836
847
|
* Request structure for posting deposit details
|
|
837
848
|
*/
|
|
838
849
|
type PostDepositDetailsRequest = {
|
|
839
|
-
/**
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
850
|
+
/** Primary offchain payment identifier for the processor */
|
|
851
|
+
offchainId: string;
|
|
852
|
+
/** Optional Telegram username associated with the payee */
|
|
853
|
+
telegramUsername?: string | null;
|
|
854
|
+
/** Optional processor-specific metadata */
|
|
855
|
+
metadata?: Record<string, string> | null;
|
|
843
856
|
/** Payment processor name */
|
|
844
857
|
processorName: string;
|
|
845
858
|
};
|
|
@@ -853,9 +866,9 @@ type PostDepositDetailsResponse = {
|
|
|
853
866
|
responseObject: {
|
|
854
867
|
id: number;
|
|
855
868
|
processorName: string;
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
869
|
+
offchainId: string;
|
|
870
|
+
telegramUsername: string | null;
|
|
871
|
+
metadata: Record<string, string> | null;
|
|
859
872
|
hashedOnchainId: string;
|
|
860
873
|
createdAt: string;
|
|
861
874
|
};
|
|
@@ -887,6 +900,8 @@ type QuoteRequest = {
|
|
|
887
900
|
nearbySearchRange?: number;
|
|
888
901
|
/** Max suggestions per direction (1-10, default: 3) */
|
|
889
902
|
nearbyQuotesCount?: number;
|
|
903
|
+
/** Include whitelist-gated private orderbook deposits scoped to the requesting user */
|
|
904
|
+
includePrivateOrderbooks?: boolean;
|
|
890
905
|
};
|
|
891
906
|
type QuotesBestByPlatformRequest = {
|
|
892
907
|
fiatCurrency: string;
|
|
@@ -957,7 +972,7 @@ type QuoteSingleResponse = {
|
|
|
957
972
|
conversionRate: string;
|
|
958
973
|
takerConversionRate?: string;
|
|
959
974
|
intent: QuoteIntentResponse;
|
|
960
|
-
payeeData?:
|
|
975
|
+
payeeData?: CuratorPayeeData;
|
|
961
976
|
};
|
|
962
977
|
type GetQuoteSingleResponse = QuoteSingleResponse & {
|
|
963
978
|
referrerFeeAmount?: string;
|
|
@@ -1073,9 +1088,9 @@ type GetPayeeDetailsResponse = {
|
|
|
1073
1088
|
responseObject: {
|
|
1074
1089
|
id: number;
|
|
1075
1090
|
processorName: string;
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1091
|
+
offchainId: string;
|
|
1092
|
+
telegramUsername: string | null;
|
|
1093
|
+
metadata: Record<string, string> | null;
|
|
1079
1094
|
hashedOnchainId: string;
|
|
1080
1095
|
createdAt: string;
|
|
1081
1096
|
};
|
|
@@ -1083,9 +1098,9 @@ type GetPayeeDetailsResponse = {
|
|
|
1083
1098
|
};
|
|
1084
1099
|
type ValidatePayeeDetailsRequest = {
|
|
1085
1100
|
processorName: string;
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1101
|
+
offchainId: string;
|
|
1102
|
+
telegramUsername?: string | null;
|
|
1103
|
+
metadata?: Record<string, string> | null;
|
|
1089
1104
|
};
|
|
1090
1105
|
type ValidatePayeeDetailsResponse = {
|
|
1091
1106
|
success: boolean;
|
|
@@ -1125,9 +1140,13 @@ type CreateDepositParams = {
|
|
|
1125
1140
|
intentAmountRange: Range;
|
|
1126
1141
|
conversionRates: CreateDepositConversionRate[][];
|
|
1127
1142
|
processorNames: string[];
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1143
|
+
/**
|
|
1144
|
+
* Required when the SDK needs to register payee details with the curator.
|
|
1145
|
+
* Optional when reusing `payeeDetailsHashes` or supplying the full override arrays.
|
|
1146
|
+
*/
|
|
1147
|
+
payeeData?: CuratorPayeeDataInput[];
|
|
1148
|
+
/** @deprecated Use `payeeData` instead. */
|
|
1149
|
+
depositData?: CuratorPayeeDataInput[];
|
|
1131
1150
|
payeeDetailsHashes?: string[];
|
|
1132
1151
|
paymentMethodsOverride?: `0x${string}`[];
|
|
1133
1152
|
paymentMethodDataOverride?: DepositVerifierData[];
|
|
@@ -1553,7 +1572,7 @@ type OnchainCurrencyEntry = {
|
|
|
1553
1572
|
* // Step 1: Register payee details (separate from deposit creation)
|
|
1554
1573
|
* const { hashedOnchainIds } = await client.registerPayeeDetails({
|
|
1555
1574
|
* processorNames: ['wise'],
|
|
1556
|
-
*
|
|
1575
|
+
* payeeData: [{ offchainId: 'you@example.com' }],
|
|
1557
1576
|
* });
|
|
1558
1577
|
*
|
|
1559
1578
|
* // Step 2: Create a 1000 USDC deposit accepting Wise payments
|
|
@@ -1562,7 +1581,7 @@ type OnchainCurrencyEntry = {
|
|
|
1562
1581
|
* amount: 1000_000000n,
|
|
1563
1582
|
* intentAmountRange: { min: 10_000000n, max: 500_000000n },
|
|
1564
1583
|
* processorNames: ['wise'],
|
|
1565
|
-
*
|
|
1584
|
+
* payeeData: [{ offchainId: 'you@example.com' }],
|
|
1566
1585
|
* conversionRates: [[
|
|
1567
1586
|
* { currency: 'USD', conversionRate: '1020000000000000000' },
|
|
1568
1587
|
* { currency: 'EUR', conversionRate: '1100000000000000000' },
|
|
@@ -2011,23 +2030,22 @@ declare class Zkp2pClient {
|
|
|
2011
2030
|
* register maker payment details with the curator service.
|
|
2012
2031
|
*
|
|
2013
2032
|
* @param params.processorNames - Payment platforms (e.g., ['wise', 'revolut'])
|
|
2014
|
-
* @param params.
|
|
2033
|
+
* @param params.payeeData - Payee details per processor (e.g., [{ offchainId: 'you@example.com' }]). Required when the SDK needs to register payee details with the curator.
|
|
2015
2034
|
* @returns The posted deposit details and their corresponding hashed on-chain IDs
|
|
2016
2035
|
*
|
|
2017
2036
|
* @example
|
|
2018
2037
|
* ```typescript
|
|
2019
2038
|
* const { hashedOnchainIds } = await client.registerPayeeDetails({
|
|
2020
2039
|
* processorNames: ['wise'],
|
|
2021
|
-
*
|
|
2040
|
+
* payeeData: [{ offchainId: 'you@example.com' }],
|
|
2022
2041
|
* });
|
|
2023
2042
|
* // Then pass hashedOnchainIds to createDeposit
|
|
2024
2043
|
* ```
|
|
2025
2044
|
*/
|
|
2026
2045
|
registerPayeeDetails(params: {
|
|
2027
2046
|
processorNames: string[];
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
}[];
|
|
2047
|
+
payeeData?: CuratorPayeeDataInput[];
|
|
2048
|
+
depositData?: CuratorPayeeDataInput[];
|
|
2031
2049
|
}): Promise<{
|
|
2032
2050
|
depositDetails: PostDepositDetailsRequest[];
|
|
2033
2051
|
hashedOnchainIds: string[];
|
|
@@ -2045,16 +2063,17 @@ declare class Zkp2pClient {
|
|
|
2045
2063
|
* @param params.amount - Total deposit amount in token units (6 decimals for USDC)
|
|
2046
2064
|
* @param params.intentAmountRange - Min/max amount per intent
|
|
2047
2065
|
* @param params.processorNames - Payment platforms to accept (e.g., ['wise', 'revolut'])
|
|
2048
|
-
* @param params.
|
|
2066
|
+
* @param params.payeeData - Payee details per processor (e.g., [{ offchainId: 'you@example.com' }])
|
|
2049
2067
|
* @param params.conversionRates - Conversion rates per processor, grouped by currency
|
|
2050
2068
|
* @param params.payeeDetailsHashes - Pre-computed hashed on-chain IDs (from registerPayeeDetails). When provided, skips the curator API call entirely.
|
|
2051
2069
|
* @param params.delegate - Optional delegate address that can manage the deposit
|
|
2052
2070
|
* @param params.intentGuardian - Optional guardian for intent approval
|
|
2053
2071
|
* @param params.retainOnEmpty - Keep deposit active when balance reaches zero
|
|
2054
2072
|
* @param params.txOverrides - Optional viem transaction overrides
|
|
2055
|
-
* @returns The deposit details posted to API and the transaction hash
|
|
2073
|
+
* @returns The deposit details posted to API (empty when payee registration is skipped) and the transaction hash
|
|
2056
2074
|
*
|
|
2057
|
-
* @throws Error if processorNames,
|
|
2075
|
+
* @throws Error if processorNames, payeeData, and conversionRates lengths don't match
|
|
2076
|
+
* @throws Error if payeeData is missing and neither payeeDetailsHashes nor full payment method overrides are provided
|
|
2058
2077
|
* @throws Error if a currency is not supported by the specified processor
|
|
2059
2078
|
*
|
|
2060
2079
|
* @example
|
|
@@ -2065,7 +2084,7 @@ declare class Zkp2pClient {
|
|
|
2065
2084
|
* amount: 1000_000000n,
|
|
2066
2085
|
* intentAmountRange: { min: 10_000000n, max: 500_000000n },
|
|
2067
2086
|
* processorNames: ['wise'],
|
|
2068
|
-
*
|
|
2087
|
+
* payeeData: [{ offchainId: 'you@example.com' }],
|
|
2069
2088
|
* conversionRates: [[
|
|
2070
2089
|
* { currency: 'USD', conversionRate: '1020000000000000000' }, // 1.02
|
|
2071
2090
|
* { currency: 'EUR', conversionRate: '1100000000000000000' }, // 1.10
|
|
@@ -2082,9 +2101,8 @@ declare class Zkp2pClient {
|
|
|
2082
2101
|
max: bigint;
|
|
2083
2102
|
};
|
|
2084
2103
|
processorNames: string[];
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
}[];
|
|
2104
|
+
payeeData?: CuratorPayeeDataInput[];
|
|
2105
|
+
depositData?: CuratorPayeeDataInput[];
|
|
2088
2106
|
conversionRates: {
|
|
2089
2107
|
currency: string;
|
|
2090
2108
|
conversionRate: string;
|
|
@@ -2120,9 +2138,8 @@ declare class Zkp2pClient {
|
|
|
2120
2138
|
max: bigint;
|
|
2121
2139
|
};
|
|
2122
2140
|
processorNames: string[];
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
}[];
|
|
2141
|
+
payeeData?: CuratorPayeeDataInput[];
|
|
2142
|
+
depositData?: CuratorPayeeDataInput[];
|
|
2126
2143
|
conversionRates: {
|
|
2127
2144
|
currency: string;
|
|
2128
2145
|
conversionRate: string;
|
|
@@ -2588,7 +2605,7 @@ declare class Zkp2pClient {
|
|
|
2588
2605
|
* sending fiat payment to the deposit's payee.
|
|
2589
2606
|
*
|
|
2590
2607
|
* If `gatingServiceSignature` is not provided, the SDK will automatically
|
|
2591
|
-
* fetch one from curator `/v3/intent` when `apiKey` or `authorizationToken`
|
|
2608
|
+
* fetch one from curator `/v3/intent/sign` when `apiKey` or `authorizationToken`
|
|
2592
2609
|
* is available. Otherwise you must provide `gatingServiceSignature` and
|
|
2593
2610
|
* `signatureExpiration` yourself.
|
|
2594
2611
|
*
|
|
@@ -423,6 +423,7 @@ type IntentStatus = `${IntentStatus$1}`;
|
|
|
423
423
|
type DepositEntity = WithOverrides<Deposit, {
|
|
424
424
|
status: DepositStatus$1;
|
|
425
425
|
retainOnEmpty?: boolean;
|
|
426
|
+
whitelistHookAddress?: string | null;
|
|
426
427
|
}>;
|
|
427
428
|
type DepositPaymentMethodEntity = DepositPaymentMethod;
|
|
428
429
|
type MethodCurrencyEntity = MethodCurrency;
|
|
@@ -773,6 +774,16 @@ type ReferrerFeeConfig = {
|
|
|
773
774
|
recipient: `0x${string}`;
|
|
774
775
|
feeBps: number;
|
|
775
776
|
};
|
|
777
|
+
type CuratorPayeeData = {
|
|
778
|
+
offchainId: string;
|
|
779
|
+
telegramUsername: string | null;
|
|
780
|
+
metadata: Record<string, string> | null;
|
|
781
|
+
};
|
|
782
|
+
type CuratorPayeeDataInput = {
|
|
783
|
+
offchainId: string;
|
|
784
|
+
telegramUsername?: string | null;
|
|
785
|
+
metadata?: Record<string, string> | null;
|
|
786
|
+
};
|
|
776
787
|
/**
|
|
777
788
|
* Parameters for fulfilling an intent with payment attestation
|
|
778
789
|
*/
|
|
@@ -836,10 +847,12 @@ type SignalIntentParams = {
|
|
|
836
847
|
* Request structure for posting deposit details
|
|
837
848
|
*/
|
|
838
849
|
type PostDepositDetailsRequest = {
|
|
839
|
-
/**
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
850
|
+
/** Primary offchain payment identifier for the processor */
|
|
851
|
+
offchainId: string;
|
|
852
|
+
/** Optional Telegram username associated with the payee */
|
|
853
|
+
telegramUsername?: string | null;
|
|
854
|
+
/** Optional processor-specific metadata */
|
|
855
|
+
metadata?: Record<string, string> | null;
|
|
843
856
|
/** Payment processor name */
|
|
844
857
|
processorName: string;
|
|
845
858
|
};
|
|
@@ -853,9 +866,9 @@ type PostDepositDetailsResponse = {
|
|
|
853
866
|
responseObject: {
|
|
854
867
|
id: number;
|
|
855
868
|
processorName: string;
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
869
|
+
offchainId: string;
|
|
870
|
+
telegramUsername: string | null;
|
|
871
|
+
metadata: Record<string, string> | null;
|
|
859
872
|
hashedOnchainId: string;
|
|
860
873
|
createdAt: string;
|
|
861
874
|
};
|
|
@@ -887,6 +900,8 @@ type QuoteRequest = {
|
|
|
887
900
|
nearbySearchRange?: number;
|
|
888
901
|
/** Max suggestions per direction (1-10, default: 3) */
|
|
889
902
|
nearbyQuotesCount?: number;
|
|
903
|
+
/** Include whitelist-gated private orderbook deposits scoped to the requesting user */
|
|
904
|
+
includePrivateOrderbooks?: boolean;
|
|
890
905
|
};
|
|
891
906
|
type QuotesBestByPlatformRequest = {
|
|
892
907
|
fiatCurrency: string;
|
|
@@ -957,7 +972,7 @@ type QuoteSingleResponse = {
|
|
|
957
972
|
conversionRate: string;
|
|
958
973
|
takerConversionRate?: string;
|
|
959
974
|
intent: QuoteIntentResponse;
|
|
960
|
-
payeeData?:
|
|
975
|
+
payeeData?: CuratorPayeeData;
|
|
961
976
|
};
|
|
962
977
|
type GetQuoteSingleResponse = QuoteSingleResponse & {
|
|
963
978
|
referrerFeeAmount?: string;
|
|
@@ -1073,9 +1088,9 @@ type GetPayeeDetailsResponse = {
|
|
|
1073
1088
|
responseObject: {
|
|
1074
1089
|
id: number;
|
|
1075
1090
|
processorName: string;
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1091
|
+
offchainId: string;
|
|
1092
|
+
telegramUsername: string | null;
|
|
1093
|
+
metadata: Record<string, string> | null;
|
|
1079
1094
|
hashedOnchainId: string;
|
|
1080
1095
|
createdAt: string;
|
|
1081
1096
|
};
|
|
@@ -1083,9 +1098,9 @@ type GetPayeeDetailsResponse = {
|
|
|
1083
1098
|
};
|
|
1084
1099
|
type ValidatePayeeDetailsRequest = {
|
|
1085
1100
|
processorName: string;
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1101
|
+
offchainId: string;
|
|
1102
|
+
telegramUsername?: string | null;
|
|
1103
|
+
metadata?: Record<string, string> | null;
|
|
1089
1104
|
};
|
|
1090
1105
|
type ValidatePayeeDetailsResponse = {
|
|
1091
1106
|
success: boolean;
|
|
@@ -1125,9 +1140,13 @@ type CreateDepositParams = {
|
|
|
1125
1140
|
intentAmountRange: Range;
|
|
1126
1141
|
conversionRates: CreateDepositConversionRate[][];
|
|
1127
1142
|
processorNames: string[];
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1143
|
+
/**
|
|
1144
|
+
* Required when the SDK needs to register payee details with the curator.
|
|
1145
|
+
* Optional when reusing `payeeDetailsHashes` or supplying the full override arrays.
|
|
1146
|
+
*/
|
|
1147
|
+
payeeData?: CuratorPayeeDataInput[];
|
|
1148
|
+
/** @deprecated Use `payeeData` instead. */
|
|
1149
|
+
depositData?: CuratorPayeeDataInput[];
|
|
1131
1150
|
payeeDetailsHashes?: string[];
|
|
1132
1151
|
paymentMethodsOverride?: `0x${string}`[];
|
|
1133
1152
|
paymentMethodDataOverride?: DepositVerifierData[];
|
|
@@ -1553,7 +1572,7 @@ type OnchainCurrencyEntry = {
|
|
|
1553
1572
|
* // Step 1: Register payee details (separate from deposit creation)
|
|
1554
1573
|
* const { hashedOnchainIds } = await client.registerPayeeDetails({
|
|
1555
1574
|
* processorNames: ['wise'],
|
|
1556
|
-
*
|
|
1575
|
+
* payeeData: [{ offchainId: 'you@example.com' }],
|
|
1557
1576
|
* });
|
|
1558
1577
|
*
|
|
1559
1578
|
* // Step 2: Create a 1000 USDC deposit accepting Wise payments
|
|
@@ -1562,7 +1581,7 @@ type OnchainCurrencyEntry = {
|
|
|
1562
1581
|
* amount: 1000_000000n,
|
|
1563
1582
|
* intentAmountRange: { min: 10_000000n, max: 500_000000n },
|
|
1564
1583
|
* processorNames: ['wise'],
|
|
1565
|
-
*
|
|
1584
|
+
* payeeData: [{ offchainId: 'you@example.com' }],
|
|
1566
1585
|
* conversionRates: [[
|
|
1567
1586
|
* { currency: 'USD', conversionRate: '1020000000000000000' },
|
|
1568
1587
|
* { currency: 'EUR', conversionRate: '1100000000000000000' },
|
|
@@ -2011,23 +2030,22 @@ declare class Zkp2pClient {
|
|
|
2011
2030
|
* register maker payment details with the curator service.
|
|
2012
2031
|
*
|
|
2013
2032
|
* @param params.processorNames - Payment platforms (e.g., ['wise', 'revolut'])
|
|
2014
|
-
* @param params.
|
|
2033
|
+
* @param params.payeeData - Payee details per processor (e.g., [{ offchainId: 'you@example.com' }]). Required when the SDK needs to register payee details with the curator.
|
|
2015
2034
|
* @returns The posted deposit details and their corresponding hashed on-chain IDs
|
|
2016
2035
|
*
|
|
2017
2036
|
* @example
|
|
2018
2037
|
* ```typescript
|
|
2019
2038
|
* const { hashedOnchainIds } = await client.registerPayeeDetails({
|
|
2020
2039
|
* processorNames: ['wise'],
|
|
2021
|
-
*
|
|
2040
|
+
* payeeData: [{ offchainId: 'you@example.com' }],
|
|
2022
2041
|
* });
|
|
2023
2042
|
* // Then pass hashedOnchainIds to createDeposit
|
|
2024
2043
|
* ```
|
|
2025
2044
|
*/
|
|
2026
2045
|
registerPayeeDetails(params: {
|
|
2027
2046
|
processorNames: string[];
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
}[];
|
|
2047
|
+
payeeData?: CuratorPayeeDataInput[];
|
|
2048
|
+
depositData?: CuratorPayeeDataInput[];
|
|
2031
2049
|
}): Promise<{
|
|
2032
2050
|
depositDetails: PostDepositDetailsRequest[];
|
|
2033
2051
|
hashedOnchainIds: string[];
|
|
@@ -2045,16 +2063,17 @@ declare class Zkp2pClient {
|
|
|
2045
2063
|
* @param params.amount - Total deposit amount in token units (6 decimals for USDC)
|
|
2046
2064
|
* @param params.intentAmountRange - Min/max amount per intent
|
|
2047
2065
|
* @param params.processorNames - Payment platforms to accept (e.g., ['wise', 'revolut'])
|
|
2048
|
-
* @param params.
|
|
2066
|
+
* @param params.payeeData - Payee details per processor (e.g., [{ offchainId: 'you@example.com' }])
|
|
2049
2067
|
* @param params.conversionRates - Conversion rates per processor, grouped by currency
|
|
2050
2068
|
* @param params.payeeDetailsHashes - Pre-computed hashed on-chain IDs (from registerPayeeDetails). When provided, skips the curator API call entirely.
|
|
2051
2069
|
* @param params.delegate - Optional delegate address that can manage the deposit
|
|
2052
2070
|
* @param params.intentGuardian - Optional guardian for intent approval
|
|
2053
2071
|
* @param params.retainOnEmpty - Keep deposit active when balance reaches zero
|
|
2054
2072
|
* @param params.txOverrides - Optional viem transaction overrides
|
|
2055
|
-
* @returns The deposit details posted to API and the transaction hash
|
|
2073
|
+
* @returns The deposit details posted to API (empty when payee registration is skipped) and the transaction hash
|
|
2056
2074
|
*
|
|
2057
|
-
* @throws Error if processorNames,
|
|
2075
|
+
* @throws Error if processorNames, payeeData, and conversionRates lengths don't match
|
|
2076
|
+
* @throws Error if payeeData is missing and neither payeeDetailsHashes nor full payment method overrides are provided
|
|
2058
2077
|
* @throws Error if a currency is not supported by the specified processor
|
|
2059
2078
|
*
|
|
2060
2079
|
* @example
|
|
@@ -2065,7 +2084,7 @@ declare class Zkp2pClient {
|
|
|
2065
2084
|
* amount: 1000_000000n,
|
|
2066
2085
|
* intentAmountRange: { min: 10_000000n, max: 500_000000n },
|
|
2067
2086
|
* processorNames: ['wise'],
|
|
2068
|
-
*
|
|
2087
|
+
* payeeData: [{ offchainId: 'you@example.com' }],
|
|
2069
2088
|
* conversionRates: [[
|
|
2070
2089
|
* { currency: 'USD', conversionRate: '1020000000000000000' }, // 1.02
|
|
2071
2090
|
* { currency: 'EUR', conversionRate: '1100000000000000000' }, // 1.10
|
|
@@ -2082,9 +2101,8 @@ declare class Zkp2pClient {
|
|
|
2082
2101
|
max: bigint;
|
|
2083
2102
|
};
|
|
2084
2103
|
processorNames: string[];
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
}[];
|
|
2104
|
+
payeeData?: CuratorPayeeDataInput[];
|
|
2105
|
+
depositData?: CuratorPayeeDataInput[];
|
|
2088
2106
|
conversionRates: {
|
|
2089
2107
|
currency: string;
|
|
2090
2108
|
conversionRate: string;
|
|
@@ -2120,9 +2138,8 @@ declare class Zkp2pClient {
|
|
|
2120
2138
|
max: bigint;
|
|
2121
2139
|
};
|
|
2122
2140
|
processorNames: string[];
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
}[];
|
|
2141
|
+
payeeData?: CuratorPayeeDataInput[];
|
|
2142
|
+
depositData?: CuratorPayeeDataInput[];
|
|
2126
2143
|
conversionRates: {
|
|
2127
2144
|
currency: string;
|
|
2128
2145
|
conversionRate: string;
|
|
@@ -2588,7 +2605,7 @@ declare class Zkp2pClient {
|
|
|
2588
2605
|
* sending fiat payment to the deposit's payee.
|
|
2589
2606
|
*
|
|
2590
2607
|
* If `gatingServiceSignature` is not provided, the SDK will automatically
|
|
2591
|
-
* fetch one from curator `/v3/intent` when `apiKey` or `authorizationToken`
|
|
2608
|
+
* fetch one from curator `/v3/intent/sign` when `apiKey` or `authorizationToken`
|
|
2592
2609
|
* is available. Otherwise you must provide `gatingServiceSignature` and
|
|
2593
2610
|
* `signatureExpiration` yourself.
|
|
2594
2611
|
*
|