@zkp2p/sdk 0.2.3 → 0.2.4

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/react.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { Z as Zkp2pClient, i as SignalIntentMethodParams, ac as PreparedTransaction, af as TakerTier, f as GetTakerTierRequest, g as GetTakerTierResponse, F as FulfillIntentMethodParams, bu as SendTransactionFn, bv as SendBatchFn, bs as DelegationDepositTarget, bt as BatchResult } from './vaultUtils-DiAumiXp.mjs';
2
- export { bq as DelegationRoute, br as DelegationState, bw as VAULT_ZERO_ADDRESS, bk as ZERO_RATE_MANAGER_ID, bx as asErrorMessage, by as assertDelegationMethodSupport, bp as classifyDelegationState, bo as getDelegationRoute, bl as isZeroRateManagerId, bm as normalizeRateManagerId, bn as normalizeRegistry } from './vaultUtils-DiAumiXp.mjs';
1
+ import { Z as Zkp2pClient, i as SignalIntentMethodParams, ac as PreparedTransaction, af as TakerTier, f as GetTakerTierRequest, g as GetTakerTierResponse, F as FulfillIntentMethodParams, bu as SendTransactionFn, bv as SendBatchFn, bs as DelegationDepositTarget, bt as BatchResult } from './vaultUtils-C2wT1ZYY.mjs';
2
+ export { bq as DelegationRoute, br as DelegationState, bw as VAULT_ZERO_ADDRESS, bk as ZERO_RATE_MANAGER_ID, bx as asErrorMessage, by as assertDelegationMethodSupport, bp as classifyDelegationState, bo as getDelegationRoute, bl as isZeroRateManagerId, bm as normalizeRateManagerId, bn as normalizeRegistry } from './vaultUtils-C2wT1ZYY.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, ac as PreparedTransaction, af as TakerTier, f as GetTakerTierRequest, g as GetTakerTierResponse, F as FulfillIntentMethodParams, bu as SendTransactionFn, bv as SendBatchFn, bs as DelegationDepositTarget, bt as BatchResult } from './vaultUtils-DiAumiXp.js';
2
- export { bq as DelegationRoute, br as DelegationState, bw as VAULT_ZERO_ADDRESS, bk as ZERO_RATE_MANAGER_ID, bx as asErrorMessage, by as assertDelegationMethodSupport, bp as classifyDelegationState, bo as getDelegationRoute, bl as isZeroRateManagerId, bm as normalizeRateManagerId, bn as normalizeRegistry } from './vaultUtils-DiAumiXp.js';
1
+ import { Z as Zkp2pClient, i as SignalIntentMethodParams, ac as PreparedTransaction, af as TakerTier, f as GetTakerTierRequest, g as GetTakerTierResponse, F as FulfillIntentMethodParams, bu as SendTransactionFn, bv as SendBatchFn, bs as DelegationDepositTarget, bt as BatchResult } from './vaultUtils-C2wT1ZYY.js';
2
+ export { bq as DelegationRoute, br as DelegationState, bw as VAULT_ZERO_ADDRESS, bk as ZERO_RATE_MANAGER_ID, bx as asErrorMessage, by as assertDelegationMethodSupport, bp as classifyDelegationState, bo as getDelegationRoute, bl as isZeroRateManagerId, bm as normalizeRateManagerId, bn as normalizeRegistry } from './vaultUtils-C2wT1ZYY.js';
3
3
  import { Hash, Address, Hex } from 'viem';
4
4
  import '@zkp2p/indexer-schema';
5
5
  import 'abitype';
@@ -1,5 +1,5 @@
1
1
  import * as _zkp2p_indexer_schema from '@zkp2p/indexer-schema';
2
- import { Deposit, DepositStatus as DepositStatus$2, IntentStatus as IntentStatus$1, DepositPaymentMethod, MethodCurrency, Intent as Intent$1, RateManager, ManagerAggregateStats, RateManagerRate, ManagerStats, DepositFundActivity, DepositDailySnapshot, ManagerDailySnapshot } from '@zkp2p/indexer-schema';
2
+ import { Deposit, DepositStatus as DepositStatus$2, IntentStatus as IntentStatus$1, DepositPaymentMethod, MethodCurrency, Intent as Intent$1, MakerProfitSnapshot, RateManager, ManagerAggregateStats, RateManagerRate, ManagerStats, DepositFundActivity, DepositDailySnapshot, ManagerDailySnapshot } from '@zkp2p/indexer-schema';
3
3
  import { Address, Hex, AccessList, AuthorizationList, Hash, WalletClient, PublicClient } from 'viem';
4
4
  import { Abi } from 'abitype';
5
5
 
@@ -485,6 +485,7 @@ type ManagerAggregateStatsEntity = WithOverrides<ManagerAggregateStats, {
485
485
  }>;
486
486
  type ManagerStatsEntity = ManagerStats;
487
487
  type ManagerDailySnapshotEntity = ManagerDailySnapshot;
488
+ type MakerProfitSnapshotEntity = MakerProfitSnapshot;
488
489
  interface ManualRateUpdateEntity {
489
490
  id: string;
490
491
  rateManagerId: string;
@@ -570,6 +571,7 @@ declare class IndexerDepositService {
570
571
  }): Promise<DepositWithRelations[]>;
571
572
  fetchIntentsForDeposits(depositIds: string[], statuses?: IntentStatus[]): Promise<IntentEntity[]>;
572
573
  fetchIntentsByOwner(owner: string, statuses?: IntentStatus[]): Promise<IntentEntity[]>;
574
+ fetchIntentsByRateManager(rateManagerId: string, statuses?: IntentStatus[]): Promise<IntentEntity[]>;
573
575
  fetchIntentByHash(intentHash: string): Promise<IntentEntity | null>;
574
576
  fetchDepositWithRelations(id: string, options?: {
575
577
  includeIntents?: boolean;
@@ -609,6 +611,7 @@ declare class IndexerDepositService {
609
611
  * Fetch daily snapshots for a deposit, ordered by day ascending.
610
612
  */
611
613
  fetchDepositDailySnapshots(compositeDepositId: string, limit?: number): Promise<DepositDailySnapshotEntity[]>;
614
+ fetchProfitSnapshotsByDeposits(depositIds: string[]): Promise<MakerProfitSnapshotEntity[]>;
612
615
  }
613
616
 
614
617
  type OrderDirection = 'asc' | 'desc';
@@ -1798,6 +1801,10 @@ declare class Zkp2pClient {
1798
1801
  * Fetches all intents created by a specific owner address.
1799
1802
  */
1800
1803
  getOwnerIntents: (owner: string, statuses?: IntentStatus[]) => Promise<IntentEntity[]>;
1804
+ /**
1805
+ * Fetches fulfilled intents for a vault by rate manager ID.
1806
+ */
1807
+ getIntentsByRateManager: (rateManagerId: string, statuses?: IntentStatus[]) => Promise<IntentEntity[]>;
1801
1808
  /**
1802
1809
  * Fetches a single intent by hash.
1803
1810
  */
@@ -1844,6 +1851,10 @@ declare class Zkp2pClient {
1844
1851
  includeIntents?: boolean;
1845
1852
  intentStatuses?: IntentStatus[];
1846
1853
  }) => Promise<DepositWithRelations[]>;
1854
+ /**
1855
+ * Fetches maker profit snapshots for the provided deposits.
1856
+ */
1857
+ getProfitSnapshotsByDeposits: (depositIds: string[]) => Promise<MakerProfitSnapshotEntity[]>;
1847
1858
  /**
1848
1859
  * Fetches rate managers (vaults) with aggregate stats.
1849
1860
  */
@@ -1,5 +1,5 @@
1
1
  import * as _zkp2p_indexer_schema from '@zkp2p/indexer-schema';
2
- import { Deposit, DepositStatus as DepositStatus$2, IntentStatus as IntentStatus$1, DepositPaymentMethod, MethodCurrency, Intent as Intent$1, RateManager, ManagerAggregateStats, RateManagerRate, ManagerStats, DepositFundActivity, DepositDailySnapshot, ManagerDailySnapshot } from '@zkp2p/indexer-schema';
2
+ import { Deposit, DepositStatus as DepositStatus$2, IntentStatus as IntentStatus$1, DepositPaymentMethod, MethodCurrency, Intent as Intent$1, MakerProfitSnapshot, RateManager, ManagerAggregateStats, RateManagerRate, ManagerStats, DepositFundActivity, DepositDailySnapshot, ManagerDailySnapshot } from '@zkp2p/indexer-schema';
3
3
  import { Address, Hex, AccessList, AuthorizationList, Hash, WalletClient, PublicClient } from 'viem';
4
4
  import { Abi } from 'abitype';
5
5
 
@@ -485,6 +485,7 @@ type ManagerAggregateStatsEntity = WithOverrides<ManagerAggregateStats, {
485
485
  }>;
486
486
  type ManagerStatsEntity = ManagerStats;
487
487
  type ManagerDailySnapshotEntity = ManagerDailySnapshot;
488
+ type MakerProfitSnapshotEntity = MakerProfitSnapshot;
488
489
  interface ManualRateUpdateEntity {
489
490
  id: string;
490
491
  rateManagerId: string;
@@ -570,6 +571,7 @@ declare class IndexerDepositService {
570
571
  }): Promise<DepositWithRelations[]>;
571
572
  fetchIntentsForDeposits(depositIds: string[], statuses?: IntentStatus[]): Promise<IntentEntity[]>;
572
573
  fetchIntentsByOwner(owner: string, statuses?: IntentStatus[]): Promise<IntentEntity[]>;
574
+ fetchIntentsByRateManager(rateManagerId: string, statuses?: IntentStatus[]): Promise<IntentEntity[]>;
573
575
  fetchIntentByHash(intentHash: string): Promise<IntentEntity | null>;
574
576
  fetchDepositWithRelations(id: string, options?: {
575
577
  includeIntents?: boolean;
@@ -609,6 +611,7 @@ declare class IndexerDepositService {
609
611
  * Fetch daily snapshots for a deposit, ordered by day ascending.
610
612
  */
611
613
  fetchDepositDailySnapshots(compositeDepositId: string, limit?: number): Promise<DepositDailySnapshotEntity[]>;
614
+ fetchProfitSnapshotsByDeposits(depositIds: string[]): Promise<MakerProfitSnapshotEntity[]>;
612
615
  }
613
616
 
614
617
  type OrderDirection = 'asc' | 'desc';
@@ -1798,6 +1801,10 @@ declare class Zkp2pClient {
1798
1801
  * Fetches all intents created by a specific owner address.
1799
1802
  */
1800
1803
  getOwnerIntents: (owner: string, statuses?: IntentStatus[]) => Promise<IntentEntity[]>;
1804
+ /**
1805
+ * Fetches fulfilled intents for a vault by rate manager ID.
1806
+ */
1807
+ getIntentsByRateManager: (rateManagerId: string, statuses?: IntentStatus[]) => Promise<IntentEntity[]>;
1801
1808
  /**
1802
1809
  * Fetches a single intent by hash.
1803
1810
  */
@@ -1844,6 +1851,10 @@ declare class Zkp2pClient {
1844
1851
  includeIntents?: boolean;
1845
1852
  intentStatuses?: IntentStatus[];
1846
1853
  }) => Promise<DepositWithRelations[]>;
1854
+ /**
1855
+ * Fetches maker profit snapshots for the provided deposits.
1856
+ */
1857
+ getProfitSnapshotsByDeposits: (depositIds: string[]) => Promise<MakerProfitSnapshotEntity[]>;
1847
1858
  /**
1848
1859
  * Fetches rate managers (vaults) with aggregate stats.
1849
1860
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zkp2p/sdk",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
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",
@@ -44,6 +44,7 @@
44
44
  "format": "prettier --check .",
45
45
  "format:write": "prettier --write .",
46
46
  "test": "vitest run",
47
+ "test:regression": "vitest run --config vitest.regression.config.mts",
47
48
  "test:coverage": "vitest run --coverage",
48
49
  "test:watch": "vitest",
49
50
  "release": "release-it",
@@ -86,7 +87,7 @@
86
87
  "node": ">=22"
87
88
  },
88
89
  "dependencies": {
89
- "@zkp2p/indexer-schema": "0.2.2",
90
+ "@zkp2p/indexer-schema": "0.2.3",
90
91
  "@zkp2p/contracts-v2": "0.2.0",
91
92
  "ethers": "^6.0.0",
92
93
  "ox": "^0.11.1"