@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.
package/dist/react.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { Z as Zkp2pClient, P as PostDepositDetailsRequest, x as SignalIntentMethodParams, bm as PreparedTransaction, bp as TakerTier, n as GetTakerTierRequest, o as GetTakerTierResponse, F as FulfillIntentMethodParams, cF as SendTransactionFn, cG as SendBatchFn, cD as DelegationDepositTarget, cE as BatchResult } from './vaultUtils-CtNcKlpg.mjs';
2
- export { cB as DelegationRoute, cC as DelegationState, cH as VAULT_ZERO_ADDRESS, cv as ZERO_RATE_MANAGER_ID, cI as asErrorMessage, cJ as assertDelegationMethodSupport, cA as classifyDelegationState, cz as getDelegationRoute, cw as isZeroRateManagerId, cx as normalizeRateManagerId, cy as normalizeRegistry } from './vaultUtils-CtNcKlpg.mjs';
1
+ import { Z as Zkp2pClient, P as PostDepositDetailsRequest, y as SignalIntentMethodParams, bn as PreparedTransaction, bq as TakerTier, n as GetTakerTierRequest, o as GetTakerTierResponse, F as FulfillIntentMethodParams, cF as SendTransactionFn, cG as SendBatchFn, cD as DelegationDepositTarget, cE as BatchResult } from './vaultUtils-DOOl9QUP.mjs';
2
+ export { cB as DelegationRoute, cC as DelegationState, cH as VAULT_ZERO_ADDRESS, cv as ZERO_RATE_MANAGER_ID, cI as asErrorMessage, cJ as assertDelegationMethodSupport, cA as classifyDelegationState, cz as getDelegationRoute, cw as isZeroRateManagerId, cx as normalizeRateManagerId, cy as normalizeRegistry } from './vaultUtils-DOOl9QUP.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, P as PostDepositDetailsRequest, x as SignalIntentMethodParams, bm as PreparedTransaction, bp as TakerTier, n as GetTakerTierRequest, o as GetTakerTierResponse, F as FulfillIntentMethodParams, cF as SendTransactionFn, cG as SendBatchFn, cD as DelegationDepositTarget, cE as BatchResult } from './vaultUtils-CtNcKlpg.js';
2
- export { cB as DelegationRoute, cC as DelegationState, cH as VAULT_ZERO_ADDRESS, cv as ZERO_RATE_MANAGER_ID, cI as asErrorMessage, cJ as assertDelegationMethodSupport, cA as classifyDelegationState, cz as getDelegationRoute, cw as isZeroRateManagerId, cx as normalizeRateManagerId, cy as normalizeRegistry } from './vaultUtils-CtNcKlpg.js';
1
+ import { Z as Zkp2pClient, P as PostDepositDetailsRequest, y as SignalIntentMethodParams, bn as PreparedTransaction, bq as TakerTier, n as GetTakerTierRequest, o as GetTakerTierResponse, F as FulfillIntentMethodParams, cF as SendTransactionFn, cG as SendBatchFn, cD as DelegationDepositTarget, cE as BatchResult } from './vaultUtils-DOOl9QUP.js';
2
+ export { cB as DelegationRoute, cC as DelegationState, cH as VAULT_ZERO_ADDRESS, cv as ZERO_RATE_MANAGER_ID, cI as asErrorMessage, cJ as assertDelegationMethodSupport, cA as classifyDelegationState, cz as getDelegationRoute, cw as isZeroRateManagerId, cx as normalizeRateManagerId, cy as normalizeRegistry } from './vaultUtils-DOOl9QUP.js';
3
3
  import { Hash, Address, Hex } from 'viem';
4
4
  import '@zkp2p/indexer-schema';
5
5
  import 'abitype';
package/dist/react.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { asErrorMessage, ZERO_ADDRESS, getDelegationRoute, assertDelegationMethodSupport, prepareClearDelegationTx, normalizeRateManagerId, normalizeRegistry, isZeroRateManagerId, assertAtomicDelegationSwitchSupport, prepareSetDelegationTx } from './chunk-LPJE2MN7.mjs';
2
- export { ZERO_ADDRESS as VAULT_ZERO_ADDRESS, ZERO_RATE_MANAGER_ID, asErrorMessage, assertDelegationMethodSupport, classifyDelegationState, getDelegationRoute, isZeroRateManagerId, normalizeRateManagerId, normalizeRegistry } from './chunk-LPJE2MN7.mjs';
1
+ import { getNextTakerTier, TAKER_TIER_CAPS, asErrorMessage, ZERO_ADDRESS, getDelegationRoute, assertDelegationMethodSupport, prepareClearDelegationTx, normalizeRateManagerId, normalizeRegistry, isZeroRateManagerId, assertAtomicDelegationSwitchSupport, prepareSetDelegationTx } from './chunk-TGMRXUP2.mjs';
2
+ export { ZERO_ADDRESS as VAULT_ZERO_ADDRESS, ZERO_RATE_MANAGER_ID, asErrorMessage, assertDelegationMethodSupport, classifyDelegationState, getDelegationRoute, isZeroRateManagerId, normalizeRateManagerId, normalizeRegistry } from './chunk-TGMRXUP2.mjs';
3
3
  import './chunk-J5LGTIGS.mjs';
4
4
  import { useState, useCallback, useMemo, useEffect } from 'react';
5
5
  import { formatUnits } from 'viem';
@@ -160,23 +160,11 @@ function useGetTakerTier({
160
160
  [getTakerTier, takerTier, isLoading, error]
161
161
  );
162
162
  }
163
- var TIER_CAPS = {
164
- PEASANT: 100,
165
- PEER: 500,
166
- PLUS: 5e3,
167
- PRO: 1e4,
168
- PLATINUM: 25e3
169
- };
170
163
  function getNextTierCap(currentTier) {
171
- if (!currentTier) return null;
172
- const tierOrder = ["PEASANT", "PEER", "PLUS", "PRO", "PLATINUM"];
173
- const currentIndex = tierOrder.indexOf(currentTier);
174
- if (currentIndex === -1 || currentIndex >= tierOrder.length - 1) {
175
- return null;
176
- }
177
- const nextTier = tierOrder[currentIndex + 1];
178
- const nextCap = TIER_CAPS[nextTier];
179
- return nextCap ? `$${nextCap.toLocaleString()}` : null;
164
+ const nextTier = getNextTakerTier(currentTier);
165
+ if (!nextTier) return null;
166
+ const nextCap = TAKER_TIER_CAPS[nextTier];
167
+ return nextCap != null ? `$${nextCap.toLocaleString()}` : null;
180
168
  }
181
169
  function formatCapFromBaseUnits(baseUnits) {
182
170
  if (!baseUnits || baseUnits === "") return "$0";