@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/README.md +4 -4
- package/dist/{chunk-L526MKG3.mjs → chunk-NKTSEXJB.mjs} +37 -5
- package/dist/{chunk-L526MKG3.mjs.map → chunk-NKTSEXJB.mjs.map} +1 -1
- package/dist/{chunk-LPJE2MN7.mjs → chunk-TGMRXUP2.mjs} +28 -3
- package/dist/chunk-TGMRXUP2.mjs.map +1 -0
- package/dist/index.cjs +194 -85
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +42 -11
- package/dist/index.d.ts +42 -11
- package/dist/index.mjs +153 -90
- package/dist/index.mjs.map +1 -1
- package/dist/protocolViewerParsers-3JGPLQGP.mjs +5 -0
- package/dist/{protocolViewerParsers-GGSM2243.mjs.map → protocolViewerParsers-3JGPLQGP.mjs.map} +1 -1
- package/dist/react.cjs +31 -16
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.mjs +6 -18
- package/dist/react.mjs.map +1 -1
- package/dist/{vaultUtils-CtNcKlpg.d.mts → vaultUtils-DOOl9QUP.d.mts} +15 -17
- package/dist/{vaultUtils-CtNcKlpg.d.ts → vaultUtils-DOOl9QUP.d.ts} +15 -17
- package/package.json +3 -3
- package/dist/chunk-LPJE2MN7.mjs.map +0 -1
- package/dist/protocolViewerParsers-GGSM2243.mjs +0 -5
package/dist/react.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Z as Zkp2pClient, P as PostDepositDetailsRequest,
|
|
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-
|
|
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,
|
|
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-
|
|
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-
|
|
2
|
-
export { ZERO_ADDRESS as VAULT_ZERO_ADDRESS, ZERO_RATE_MANAGER_ID, asErrorMessage, assertDelegationMethodSupport, classifyDelegationState, getDelegationRoute, isZeroRateManagerId, normalizeRateManagerId, normalizeRegistry } from './chunk-
|
|
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
|
-
|
|
172
|
-
|
|
173
|
-
const
|
|
174
|
-
|
|
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";
|