@zkp2p/sdk 0.0.14 → 0.0.15
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/dist/{Zkp2pClient-DtccQ-2U.d.mts → Zkp2pClient-ccA0cKOA.d.mts} +11 -1
- package/dist/{Zkp2pClient-DtccQ-2U.d.ts → Zkp2pClient-ccA0cKOA.d.ts} +11 -1
- package/dist/{chunk-MIPASRUG.mjs → chunk-MMPINPEZ.mjs} +3 -3
- package/dist/{chunk-MIPASRUG.mjs.map → chunk-MMPINPEZ.mjs.map} +1 -1
- package/dist/{chunk-DZ2TBIN7.mjs → chunk-RNJWFEXN.mjs} +2 -2
- package/dist/{chunk-DZ2TBIN7.mjs.map → chunk-RNJWFEXN.mjs.map} +1 -1
- package/dist/index.cjs +68 -31
- 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 +80 -43
- package/dist/index.mjs.map +1 -1
- package/dist/{paymentResolution-TNEMSVSH.mjs → paymentResolution-2MMBIGI5.mjs} +3 -3
- package/dist/{paymentResolution-TNEMSVSH.mjs.map → paymentResolution-2MMBIGI5.mjs.map} +1 -1
- package/dist/protocolViewerParsers-QSUXBGWT.mjs +6 -0
- package/dist/{protocolViewerParsers-SPLFTUWM.mjs.map → protocolViewerParsers-QSUXBGWT.mjs.map} +1 -1
- package/dist/react.d.mts +1 -1
- package/dist/react.d.ts +1 -1
- package/package.json +1 -1
- package/dist/protocolViewerParsers-SPLFTUWM.mjs +0 -6
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as DepositWithRelations, I as IntentEntity, V as ValidatePayeeDetailsRequest, a as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, b as PostDepositDetailsResponse, G as GetPayeeDetailsRequest, c as GetPayeeDetailsResponse, d as GetOwnerDepositsRequest, e as GetOwnerDepositsResponse, f as GetTakerTierRequest, g as GetTakerTierResponse, h as PaymentMethodCatalog, T as TxOverrides } from './Zkp2pClient-
|
|
2
|
-
export { k as ActionCallback, z as ApiDeposit, M as ApiIntentStatus, A as AuthorizationTokenProvider, C as CancelIntentMethodParams, q as CancelIntentParams, m as CreateDepositConversionRate, l as CreateDepositParams,
|
|
1
|
+
import { D as DepositWithRelations, I as IntentEntity, V as ValidatePayeeDetailsRequest, a as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, b as PostDepositDetailsResponse, G as GetPayeeDetailsRequest, c as GetPayeeDetailsResponse, d as GetOwnerDepositsRequest, e as GetOwnerDepositsResponse, f as GetTakerTierRequest, g as GetTakerTierResponse, h as PaymentMethodCatalog, T as TxOverrides } from './Zkp2pClient-ccA0cKOA.mjs';
|
|
2
|
+
export { k as ActionCallback, z as ApiDeposit, M as ApiIntentStatus, A as AuthorizationTokenProvider, C as CancelIntentMethodParams, q as CancelIntentParams, m as CreateDepositConversionRate, l as CreateDepositParams, aw as Currency, aE as CurrencyData, aD as CurrencyType, aO as Deposit, aQ as DepositCurrency, a6 as DepositIntentStatistics, H as DepositStatus, B as DepositVerifier, E as DepositVerifierCurrency, a3 as DepositVerifierData, aN as DepositView, w as FiatResponse, F as FulfillIntentMethodParams, o as FulfillIntentParams, J as GetDepositByIdRequest, K as GetDepositByIdResponse, _ as GetIntentByHashRequest, $ as GetIntentByHashResponse, X as GetIntentsByDepositRequest, Y as GetIntentsByDepositResponse, O as GetOwnerIntentsRequest, U as GetOwnerIntentsResponse, ac as IndexerClient, aq as IndexerDeploymentEnv, ag as IndexerDeposit, am as IndexerDepositFilter, ap as IndexerDepositOrderDirection, ao as IndexerDepositOrderField, an as IndexerDepositPagination, aj as IndexerDepositPaymentMethod, ae as IndexerDepositService, at as IndexerFulfillmentAndPaymentResponse, ar as IndexerFulfillmentRecord, ah as IndexerIntentFulfilled, ai as IndexerIntentFulfillmentAmounts, al as IndexerIntentStatus, ak as IndexerMethodCurrency, as as IndexerPaymentVerifiedRecord, L as Intent, aR as IntentView, N as NearbyQuote, y as NearbySuggestions, Z as OfframpClient, a2 as OnchainCurrency, aS as OnchainIntent, a5 as OrderStats, au as PAYMENT_PLATFORMS, aP as PaymentMethodData, av as PaymentPlatformType, aa as PlatformLimit, ab as PlatformRiskLevel, a4 as PreparedTransaction, v as QuoteFeesResponse, u as QuoteIntentResponse, Q as QuoteRequest, r as QuoteResponse, s as QuoteResponseObject, t as QuoteSingleResponse, R as Range, a0 as RegisterPayeeDetailsRequest, a1 as RegisterPayeeDetailsResponse, p as ReleaseFundsToPayerParams, aI as RuntimeEnv, S as SignalIntentMethodParams, n as SignalIntentParams, a7 as TakerTier, a9 as TakerTierLevel, a8 as TakerTierStats, j as TimeoutConfig, x as TokenResponse, W as WithdrawDepositParams, Z as Zkp2pClient, i as Zkp2pClientOptions, ax as currencyInfo, ad as defaultIndexerEndpoint, aL as enrichPvDepositView, aM as enrichPvIntentView, af as fetchIndexerFulfillmentAndPayment, aF as getContracts, aA as getCurrencyCodeFromHash, az as getCurrencyInfoFromCountryCode, ay as getCurrencyInfoFromHash, aH as getGatingServiceAddress, aG as getPaymentMethodsCatalog, aB as isSupportedCurrencyHash, aC as mapConversionRatesToOnchainMinRate, aJ as parseDepositView, aK as parseIntentView } from './Zkp2pClient-ccA0cKOA.mjs';
|
|
3
3
|
import { Abi } from 'abitype';
|
|
4
4
|
import { Hex, WalletClient, Hash } from 'viem';
|
|
5
5
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as DepositWithRelations, I as IntentEntity, V as ValidatePayeeDetailsRequest, a as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, b as PostDepositDetailsResponse, G as GetPayeeDetailsRequest, c as GetPayeeDetailsResponse, d as GetOwnerDepositsRequest, e as GetOwnerDepositsResponse, f as GetTakerTierRequest, g as GetTakerTierResponse, h as PaymentMethodCatalog, T as TxOverrides } from './Zkp2pClient-
|
|
2
|
-
export { k as ActionCallback, z as ApiDeposit, M as ApiIntentStatus, A as AuthorizationTokenProvider, C as CancelIntentMethodParams, q as CancelIntentParams, m as CreateDepositConversionRate, l as CreateDepositParams,
|
|
1
|
+
import { D as DepositWithRelations, I as IntentEntity, V as ValidatePayeeDetailsRequest, a as ValidatePayeeDetailsResponse, P as PostDepositDetailsRequest, b as PostDepositDetailsResponse, G as GetPayeeDetailsRequest, c as GetPayeeDetailsResponse, d as GetOwnerDepositsRequest, e as GetOwnerDepositsResponse, f as GetTakerTierRequest, g as GetTakerTierResponse, h as PaymentMethodCatalog, T as TxOverrides } from './Zkp2pClient-ccA0cKOA.js';
|
|
2
|
+
export { k as ActionCallback, z as ApiDeposit, M as ApiIntentStatus, A as AuthorizationTokenProvider, C as CancelIntentMethodParams, q as CancelIntentParams, m as CreateDepositConversionRate, l as CreateDepositParams, aw as Currency, aE as CurrencyData, aD as CurrencyType, aO as Deposit, aQ as DepositCurrency, a6 as DepositIntentStatistics, H as DepositStatus, B as DepositVerifier, E as DepositVerifierCurrency, a3 as DepositVerifierData, aN as DepositView, w as FiatResponse, F as FulfillIntentMethodParams, o as FulfillIntentParams, J as GetDepositByIdRequest, K as GetDepositByIdResponse, _ as GetIntentByHashRequest, $ as GetIntentByHashResponse, X as GetIntentsByDepositRequest, Y as GetIntentsByDepositResponse, O as GetOwnerIntentsRequest, U as GetOwnerIntentsResponse, ac as IndexerClient, aq as IndexerDeploymentEnv, ag as IndexerDeposit, am as IndexerDepositFilter, ap as IndexerDepositOrderDirection, ao as IndexerDepositOrderField, an as IndexerDepositPagination, aj as IndexerDepositPaymentMethod, ae as IndexerDepositService, at as IndexerFulfillmentAndPaymentResponse, ar as IndexerFulfillmentRecord, ah as IndexerIntentFulfilled, ai as IndexerIntentFulfillmentAmounts, al as IndexerIntentStatus, ak as IndexerMethodCurrency, as as IndexerPaymentVerifiedRecord, L as Intent, aR as IntentView, N as NearbyQuote, y as NearbySuggestions, Z as OfframpClient, a2 as OnchainCurrency, aS as OnchainIntent, a5 as OrderStats, au as PAYMENT_PLATFORMS, aP as PaymentMethodData, av as PaymentPlatformType, aa as PlatformLimit, ab as PlatformRiskLevel, a4 as PreparedTransaction, v as QuoteFeesResponse, u as QuoteIntentResponse, Q as QuoteRequest, r as QuoteResponse, s as QuoteResponseObject, t as QuoteSingleResponse, R as Range, a0 as RegisterPayeeDetailsRequest, a1 as RegisterPayeeDetailsResponse, p as ReleaseFundsToPayerParams, aI as RuntimeEnv, S as SignalIntentMethodParams, n as SignalIntentParams, a7 as TakerTier, a9 as TakerTierLevel, a8 as TakerTierStats, j as TimeoutConfig, x as TokenResponse, W as WithdrawDepositParams, Z as Zkp2pClient, i as Zkp2pClientOptions, ax as currencyInfo, ad as defaultIndexerEndpoint, aL as enrichPvDepositView, aM as enrichPvIntentView, af as fetchIndexerFulfillmentAndPayment, aF as getContracts, aA as getCurrencyCodeFromHash, az as getCurrencyInfoFromCountryCode, ay as getCurrencyInfoFromHash, aH as getGatingServiceAddress, aG as getPaymentMethodsCatalog, aB as isSupportedCurrencyHash, aC as mapConversionRatesToOnchainMinRate, aJ as parseDepositView, aK as parseIntentView } from './Zkp2pClient-ccA0cKOA.js';
|
|
3
3
|
import { Abi } from 'abitype';
|
|
4
4
|
import { Hex, WalletClient, Hash } from 'viem';
|
|
5
5
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ValidationError, APIError, NetworkError } from './chunk-GHQK65J2.mjs';
|
|
2
2
|
export { APIError, ContractError, ErrorCode, NetworkError, ValidationError, ZKP2PError } from './chunk-GHQK65J2.mjs';
|
|
3
3
|
export { PAYMENT_PLATFORMS, PLATFORM_METADATA, SUPPORTED_CHAIN_IDS, TOKEN_METADATA } from './chunk-RFTOKPSA.mjs';
|
|
4
|
-
import { getContracts, getPaymentMethodsCatalog, getGatingServiceAddress } from './chunk-
|
|
5
|
-
export { enrichPvDepositView, enrichPvIntentView, getContracts, getGatingServiceAddress, getPaymentMethodsCatalog, parseDepositView, parseIntentView } from './chunk-
|
|
6
|
-
import { resolvePaymentMethodHashFromCatalog, resolveFiatCurrencyBytes32 } from './chunk-
|
|
7
|
-
export { asciiToBytes32, ensureBytes32, resolveFiatCurrencyBytes32, resolvePaymentMethodHash, resolvePaymentMethodHashFromCatalog, resolvePaymentMethodNameFromHash } from './chunk-
|
|
4
|
+
import { getContracts, getPaymentMethodsCatalog, getGatingServiceAddress } from './chunk-MMPINPEZ.mjs';
|
|
5
|
+
export { enrichPvDepositView, enrichPvIntentView, getContracts, getGatingServiceAddress, getPaymentMethodsCatalog, parseDepositView, parseIntentView } from './chunk-MMPINPEZ.mjs';
|
|
6
|
+
import { resolvePaymentMethodHashFromCatalog, resolveFiatCurrencyBytes32 } from './chunk-RNJWFEXN.mjs';
|
|
7
|
+
export { asciiToBytes32, ensureBytes32, resolveFiatCurrencyBytes32, resolvePaymentMethodHash, resolvePaymentMethodHashFromCatalog, resolvePaymentMethodNameFromHash } from './chunk-RNJWFEXN.mjs';
|
|
8
8
|
export { Currency, currencyInfo, getCurrencyCodeFromHash, getCurrencyInfoFromCountryCode, getCurrencyInfoFromHash, isSupportedCurrencyHash, mapConversionRatesToOnchainMinRate } from './chunk-MDLTLKWK.mjs';
|
|
9
9
|
import { currencyKeccak256 } from './chunk-37HJPVJE.mjs';
|
|
10
10
|
import { concatHex, encodeFunctionData, createPublicClient, http } from 'viem';
|
|
@@ -254,10 +254,7 @@ var DEPOSIT_RELATIONS_QUERY = (
|
|
|
254
254
|
var PAYMENT_METHODS_BY_PAYEE_HASH_QUERY = (
|
|
255
255
|
/* GraphQL */
|
|
256
256
|
`
|
|
257
|
-
query GetPaymentMethodsByPayeeHash(
|
|
258
|
-
$where: DepositPaymentMethod_bool_exp!
|
|
259
|
-
$limit: Int
|
|
260
|
-
) {
|
|
257
|
+
query GetPaymentMethodsByPayeeHash($where: DepositPaymentMethod_bool_exp!, $limit: Int) {
|
|
261
258
|
DepositPaymentMethod(where: $where, limit: $limit) {
|
|
262
259
|
id
|
|
263
260
|
chainId
|
|
@@ -346,11 +343,7 @@ var INTENTS_QUERY = (
|
|
|
346
343
|
var EXPIRED_INTENTS_QUERY = (
|
|
347
344
|
/* GraphQL */
|
|
348
345
|
`
|
|
349
|
-
query GetExpiredIntents(
|
|
350
|
-
$now: numeric!
|
|
351
|
-
$limit: Int
|
|
352
|
-
$depositIds: [String!]
|
|
353
|
-
) {
|
|
346
|
+
query GetExpiredIntents($now: numeric!, $limit: Int, $depositIds: [String!]) {
|
|
354
347
|
Intent(
|
|
355
348
|
where: {
|
|
356
349
|
status: { _eq: "SIGNALED" }
|
|
@@ -378,9 +371,7 @@ var INTENT_FULFILLMENTS_QUERY = (
|
|
|
378
371
|
/* GraphQL */
|
|
379
372
|
`
|
|
380
373
|
query GetFulfilledIntents($intentHashes: [String!]) {
|
|
381
|
-
Orchestrator_V21_IntentFulfilled(
|
|
382
|
-
where: { intentHash: { _in: $intentHashes } }
|
|
383
|
-
) {
|
|
374
|
+
Orchestrator_V21_IntentFulfilled(where: { intentHash: { _in: $intentHashes } }) {
|
|
384
375
|
intentHash
|
|
385
376
|
isManualRelease
|
|
386
377
|
fundsTransferredTo
|
|
@@ -388,22 +379,30 @@ var INTENT_FULFILLMENTS_QUERY = (
|
|
|
388
379
|
}
|
|
389
380
|
`
|
|
390
381
|
);
|
|
382
|
+
var INTENT_FULFILLMENT_AMOUNTS_QUERY = (
|
|
383
|
+
/* GraphQL */
|
|
384
|
+
`
|
|
385
|
+
query GetFulfillmentAmounts($intentHash: String!) {
|
|
386
|
+
Intent(where: { intentHash: { _eq: $intentHash } }, limit: 1) {
|
|
387
|
+
intentHash
|
|
388
|
+
releasedAmount
|
|
389
|
+
takerAmountNetFees
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
`
|
|
393
|
+
);
|
|
391
394
|
var FULFILLMENT_AND_PAYMENT_QUERY = (
|
|
392
395
|
/* GraphQL */
|
|
393
396
|
`
|
|
394
397
|
query PaymentVerificationForFulfilledIntent($intentHash: String!) {
|
|
395
|
-
Orchestrator_V21_IntentFulfilled(
|
|
396
|
-
where: { intentHash: { _eq: $intentHash } }
|
|
397
|
-
) {
|
|
398
|
+
Orchestrator_V21_IntentFulfilled(where: { intentHash: { _eq: $intentHash } }) {
|
|
398
399
|
id
|
|
399
400
|
intentHash
|
|
400
401
|
amount
|
|
401
402
|
isManualRelease
|
|
402
403
|
fundsTransferredTo
|
|
403
404
|
}
|
|
404
|
-
UnifiedVerifier_V21_PaymentVerified(
|
|
405
|
-
where: { intentHash: { _eq: $intentHash } }
|
|
406
|
-
) {
|
|
405
|
+
UnifiedVerifier_V21_PaymentVerified(where: { intentHash: { _eq: $intentHash } }) {
|
|
407
406
|
id
|
|
408
407
|
intentHash
|
|
409
408
|
method
|
|
@@ -541,7 +540,8 @@ var IndexerDepositService = class {
|
|
|
541
540
|
} else if (filter.escrowAddress) {
|
|
542
541
|
where.escrowAddress = { _ilike: filter.escrowAddress };
|
|
543
542
|
}
|
|
544
|
-
if (filter.acceptingIntents !== void 0)
|
|
543
|
+
if (filter.acceptingIntents !== void 0)
|
|
544
|
+
where.acceptingIntents = { _eq: filter.acceptingIntents };
|
|
545
545
|
if (filter.minLiquidity) where.remainingDeposits = { _gte: filter.minLiquidity };
|
|
546
546
|
return Object.keys(where).length ? where : void 0;
|
|
547
547
|
}
|
|
@@ -570,7 +570,12 @@ var IndexerDepositService = class {
|
|
|
570
570
|
if (!Object.keys(where).length) return [];
|
|
571
571
|
const result = await this.client.query({
|
|
572
572
|
query: INTENTS_QUERY,
|
|
573
|
-
variables: {
|
|
573
|
+
variables: {
|
|
574
|
+
where,
|
|
575
|
+
order_by: [{ signalTimestamp: "desc" }],
|
|
576
|
+
limit: params.limit,
|
|
577
|
+
offset: params.offset
|
|
578
|
+
}
|
|
574
579
|
});
|
|
575
580
|
return result.Intent ?? [];
|
|
576
581
|
}
|
|
@@ -610,7 +615,10 @@ var IndexerDepositService = class {
|
|
|
610
615
|
}
|
|
611
616
|
async fetchDepositsByIds(ids) {
|
|
612
617
|
if (!ids.length) return [];
|
|
613
|
-
const result = await this.client.query({
|
|
618
|
+
const result = await this.client.query({
|
|
619
|
+
query: DEPOSITS_BY_IDS_QUERY,
|
|
620
|
+
variables: { ids }
|
|
621
|
+
});
|
|
614
622
|
return result.Deposit ?? [];
|
|
615
623
|
}
|
|
616
624
|
async fetchDepositsByIdsWithRelations(ids, options = {}) {
|
|
@@ -629,9 +637,16 @@ var IndexerDepositService = class {
|
|
|
629
637
|
const result = await this.client.query({ query: DEPOSIT_WITH_RELATIONS_QUERY, variables: { id } });
|
|
630
638
|
const deposit = result.Deposit_by_pk;
|
|
631
639
|
if (!deposit) return null;
|
|
632
|
-
const base2 = {
|
|
640
|
+
const base2 = {
|
|
641
|
+
...deposit,
|
|
642
|
+
paymentMethods: result.DepositPaymentMethod ?? [],
|
|
643
|
+
currencies: result.MethodCurrency ?? []
|
|
644
|
+
};
|
|
633
645
|
if (!options.includeIntents) return base2;
|
|
634
|
-
const intents = await this.fetchIntents({
|
|
646
|
+
const intents = await this.fetchIntents({
|
|
647
|
+
depositIds: [deposit.id],
|
|
648
|
+
statuses: options.intentStatuses
|
|
649
|
+
});
|
|
635
650
|
return { ...base2, intents };
|
|
636
651
|
}
|
|
637
652
|
async fetchExpiredIntents(params) {
|
|
@@ -657,10 +672,20 @@ var IndexerDepositService = class {
|
|
|
657
672
|
});
|
|
658
673
|
return result.Orchestrator_V21_IntentFulfilled ?? [];
|
|
659
674
|
}
|
|
675
|
+
async fetchIntentFulfillmentAmounts(intentHash) {
|
|
676
|
+
if (!intentHash) return null;
|
|
677
|
+
const normalizedIntentHash = intentHash.toLowerCase();
|
|
678
|
+
const result = await this.client.query({
|
|
679
|
+
query: INTENT_FULFILLMENT_AMOUNTS_QUERY,
|
|
680
|
+
variables: { intentHash: normalizedIntentHash }
|
|
681
|
+
});
|
|
682
|
+
return result.Intent?.[0] ?? null;
|
|
683
|
+
}
|
|
660
684
|
async resolvePayeeHash(params) {
|
|
661
685
|
try {
|
|
662
686
|
const { escrowAddress, depositId, paymentMethodHash } = params;
|
|
663
|
-
if (!escrowAddress || depositId === null || depositId === void 0 || !paymentMethodHash)
|
|
687
|
+
if (!escrowAddress || depositId === null || depositId === void 0 || !paymentMethodHash)
|
|
688
|
+
return null;
|
|
664
689
|
const compositeId = createCompositeDepositId(
|
|
665
690
|
escrowAddress,
|
|
666
691
|
typeof depositId === "bigint" ? depositId : depositId?.toString() ?? ""
|
|
@@ -668,7 +693,9 @@ var IndexerDepositService = class {
|
|
|
668
693
|
const detail = await this.fetchDepositWithRelations(compositeId, { includeIntents: false });
|
|
669
694
|
if (!detail?.paymentMethods?.length) return null;
|
|
670
695
|
const target = paymentMethodHash.toLowerCase();
|
|
671
|
-
const match = detail.paymentMethods.find(
|
|
696
|
+
const match = detail.paymentMethods.find(
|
|
697
|
+
(pm) => (pm.paymentMethodHash ?? "").toLowerCase() === target
|
|
698
|
+
);
|
|
672
699
|
return match?.payeeDetailsHash ?? null;
|
|
673
700
|
} catch {
|
|
674
701
|
return null;
|
|
@@ -681,12 +708,16 @@ var IndexerDepositService = class {
|
|
|
681
708
|
payeeDetailsHash: { _ilike: normalizedHash }
|
|
682
709
|
};
|
|
683
710
|
if (options.paymentMethodHash) {
|
|
684
|
-
where.paymentMethodHash = {
|
|
711
|
+
where.paymentMethodHash = {
|
|
712
|
+
_eq: options.paymentMethodHash.toLowerCase?.() ?? options.paymentMethodHash
|
|
713
|
+
};
|
|
685
714
|
}
|
|
686
|
-
const result = await this.client.query(
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
715
|
+
const result = await this.client.query(
|
|
716
|
+
{
|
|
717
|
+
query: PAYMENT_METHODS_BY_PAYEE_HASH_QUERY,
|
|
718
|
+
variables: { where, limit: options.limit }
|
|
719
|
+
}
|
|
720
|
+
);
|
|
690
721
|
const seen = /* @__PURE__ */ new Set();
|
|
691
722
|
const depositIds = [];
|
|
692
723
|
for (const pm of result.DepositPaymentMethod ?? []) {
|
|
@@ -1884,6 +1915,12 @@ var Zkp2pClient = class {
|
|
|
1884
1915
|
getFulfilledIntentEvents: (intentHashes) => {
|
|
1885
1916
|
return service.fetchFulfilledIntentEvents(intentHashes);
|
|
1886
1917
|
},
|
|
1918
|
+
/**
|
|
1919
|
+
* Fetches gross and net fulfillment amounts for an intent.
|
|
1920
|
+
*/
|
|
1921
|
+
getIntentFulfillmentAmounts: (intentHash) => {
|
|
1922
|
+
return service.fetchIntentFulfillmentAmounts(intentHash);
|
|
1923
|
+
},
|
|
1887
1924
|
/**
|
|
1888
1925
|
* Fetches both the fulfillment record and payment verification for an intent.
|
|
1889
1926
|
*/
|
|
@@ -2336,7 +2373,7 @@ var Zkp2pClient = class {
|
|
|
2336
2373
|
const paymentMethodHash = inputs.paymentMethodHash || "0x";
|
|
2337
2374
|
const timestampBufferMs = params.timestampBufferMs ?? "300000";
|
|
2338
2375
|
const catalog = getPaymentMethodsCatalog(this.chainId, this.runtimeEnv);
|
|
2339
|
-
const { resolvePaymentMethodNameFromHash: resolvePaymentMethodNameFromHash2 } = await import('./paymentResolution-
|
|
2376
|
+
const { resolvePaymentMethodNameFromHash: resolvePaymentMethodNameFromHash2 } = await import('./paymentResolution-2MMBIGI5.mjs');
|
|
2340
2377
|
const platformName = resolvePaymentMethodNameFromHash2(paymentMethodHash, catalog);
|
|
2341
2378
|
if (!platformName)
|
|
2342
2379
|
throw new Error("Unknown paymentMethodHash for this network/env; update SDK catalogs.");
|
|
@@ -2521,7 +2558,7 @@ var Zkp2pClient = class {
|
|
|
2521
2558
|
functionName: "getDeposit",
|
|
2522
2559
|
args: [id]
|
|
2523
2560
|
});
|
|
2524
|
-
const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-
|
|
2561
|
+
const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-QSUXBGWT.mjs');
|
|
2525
2562
|
return parseDepositView2(raw);
|
|
2526
2563
|
} catch (e) {
|
|
2527
2564
|
const raw = await this.publicClient.readContract({
|
|
@@ -2530,7 +2567,7 @@ var Zkp2pClient = class {
|
|
|
2530
2567
|
functionName: "getDeposit",
|
|
2531
2568
|
args: [id]
|
|
2532
2569
|
});
|
|
2533
|
-
const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-
|
|
2570
|
+
const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-QSUXBGWT.mjs');
|
|
2534
2571
|
return parseDepositView2(raw);
|
|
2535
2572
|
}
|
|
2536
2573
|
}
|
|
@@ -2542,7 +2579,7 @@ var Zkp2pClient = class {
|
|
|
2542
2579
|
*/
|
|
2543
2580
|
async getPvDepositsFromIds(ids) {
|
|
2544
2581
|
if (!this.protocolViewerAddress || !this.protocolViewerAbi) {
|
|
2545
|
-
const { parseDepositView: parseDepositView3 } = await import('./protocolViewerParsers-
|
|
2582
|
+
const { parseDepositView: parseDepositView3 } = await import('./protocolViewerParsers-QSUXBGWT.mjs');
|
|
2546
2583
|
const results = [];
|
|
2547
2584
|
for (const id of ids) {
|
|
2548
2585
|
const raw2 = await this.publicClient.readContract({
|
|
@@ -2562,7 +2599,7 @@ var Zkp2pClient = class {
|
|
|
2562
2599
|
functionName: "getDepositFromIds",
|
|
2563
2600
|
args: [bn]
|
|
2564
2601
|
});
|
|
2565
|
-
const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-
|
|
2602
|
+
const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-QSUXBGWT.mjs');
|
|
2566
2603
|
return raw.map(parseDepositView2);
|
|
2567
2604
|
}
|
|
2568
2605
|
/**
|
|
@@ -2580,7 +2617,7 @@ var Zkp2pClient = class {
|
|
|
2580
2617
|
functionName: "getAccountDeposits",
|
|
2581
2618
|
args: [owner]
|
|
2582
2619
|
});
|
|
2583
|
-
const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-
|
|
2620
|
+
const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-QSUXBGWT.mjs');
|
|
2584
2621
|
return raw.map(parseDepositView2);
|
|
2585
2622
|
} catch (e) {
|
|
2586
2623
|
const raw = await this.publicClient.readContract({
|
|
@@ -2589,7 +2626,7 @@ var Zkp2pClient = class {
|
|
|
2589
2626
|
functionName: "getAccountDeposits",
|
|
2590
2627
|
args: [owner]
|
|
2591
2628
|
});
|
|
2592
|
-
const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-
|
|
2629
|
+
const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-QSUXBGWT.mjs');
|
|
2593
2630
|
return raw.map(parseDepositView2);
|
|
2594
2631
|
}
|
|
2595
2632
|
}
|
|
@@ -2608,7 +2645,7 @@ var Zkp2pClient = class {
|
|
|
2608
2645
|
functionName: "getAccountIntents",
|
|
2609
2646
|
args: [owner]
|
|
2610
2647
|
});
|
|
2611
|
-
const { parseIntentView: parseIntentView2 } = await import('./protocolViewerParsers-
|
|
2648
|
+
const { parseIntentView: parseIntentView2 } = await import('./protocolViewerParsers-QSUXBGWT.mjs');
|
|
2612
2649
|
return raw.map(parseIntentView2);
|
|
2613
2650
|
}
|
|
2614
2651
|
/**
|
|
@@ -2625,7 +2662,7 @@ var Zkp2pClient = class {
|
|
|
2625
2662
|
functionName: "getIntent",
|
|
2626
2663
|
args: [intentHash]
|
|
2627
2664
|
});
|
|
2628
|
-
const { parseIntentView: parseIntentView2 } = await import('./protocolViewerParsers-
|
|
2665
|
+
const { parseIntentView: parseIntentView2 } = await import('./protocolViewerParsers-QSUXBGWT.mjs');
|
|
2629
2666
|
return parseIntentView2(raw);
|
|
2630
2667
|
}
|
|
2631
2668
|
// ╔═══════════════════════════════════════════════════════════════════════════╗
|