@pear-protocol/symmio-client 0.3.27-alpha.1 → 0.3.28
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/index.d.mts
CHANGED
|
@@ -9,6 +9,7 @@ import { UseMutationOptions, useQueryClient, UseMutationResult, UseQueryResult }
|
|
|
9
9
|
import * as node_modules_viem__types_actions_siwe_verifySiweMessage from 'node_modules/viem/_types/actions/siwe/verifySiweMessage';
|
|
10
10
|
import * as abitype from 'abitype';
|
|
11
11
|
import * as node_modules_viem__types_utils_ccip from 'node_modules/viem/_types/utils/ccip';
|
|
12
|
+
import * as _pear_protocol_symm_shared from '@pear-protocol/symm-shared';
|
|
12
13
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
13
14
|
import * as node_modules__pear_protocol_symm_core_dist_types from 'node_modules/@pear-protocol/symm-core/dist/types';
|
|
14
15
|
import * as zustand from 'zustand';
|
|
@@ -8390,7 +8391,7 @@ declare function useSymmCancelClose(options?: {
|
|
|
8390
8391
|
accountAddress?: Address;
|
|
8391
8392
|
overrideChainId?: number;
|
|
8392
8393
|
}>;
|
|
8393
|
-
}): _tanstack_react_query.UseMutationResult<
|
|
8394
|
+
}): _tanstack_react_query.UseMutationResult<_pear_protocol_symm_shared.ApiResponse<unknown>, Error, {
|
|
8394
8395
|
quoteId: string;
|
|
8395
8396
|
authToken?: string;
|
|
8396
8397
|
accountAddress?: Address;
|
|
@@ -9309,7 +9310,7 @@ declare function useSymmCloseAllPositionsMutation(options?: {
|
|
|
9309
9310
|
*/
|
|
9310
9311
|
declare function useSymmCancelOpenMutation(options?: {
|
|
9311
9312
|
mutation?: SymmMutationConfig<unknown, Error, CancelOpenRequest>;
|
|
9312
|
-
}): _tanstack_react_query.UseMutationResult<
|
|
9313
|
+
}): _tanstack_react_query.UseMutationResult<_pear_protocol_symm_shared.ApiResponse<unknown>, Error, CancelOpenRequest, unknown>;
|
|
9313
9314
|
/**
|
|
9314
9315
|
* Use case: Update position settings with automatic auth-token resolution.
|
|
9315
9316
|
*/
|
|
@@ -9365,7 +9366,7 @@ declare function useSymmSetTpslMutation(options?: {
|
|
|
9365
9366
|
*/
|
|
9366
9367
|
declare function useSymmCancelTpslMutation(options?: {
|
|
9367
9368
|
mutation?: SymmMutationConfig<unknown, Error, CancelTpslRequest>;
|
|
9368
|
-
}): _tanstack_react_query.UseMutationResult<
|
|
9369
|
+
}): _tanstack_react_query.UseMutationResult<_pear_protocol_symm_shared.ApiResponse<unknown>, Error, CancelTpslRequest, unknown>;
|
|
9369
9370
|
|
|
9370
9371
|
type UseSymmTpslOrdersParams = {
|
|
9371
9372
|
accountAddress?: Address;
|
|
@@ -9497,7 +9498,7 @@ declare function useSymmLockedParams(params: {
|
|
|
9497
9498
|
leverage?: number;
|
|
9498
9499
|
chainId?: number;
|
|
9499
9500
|
query?: SymmQueryConfig;
|
|
9500
|
-
}): _tanstack_react_query.UseQueryResult<
|
|
9501
|
+
}): _tanstack_react_query.UseQueryResult<_pear_protocol_symm_shared.LockedParams, Error>;
|
|
9501
9502
|
|
|
9502
9503
|
type UseSymmHedgerMarketsParams = GetSymmHedgerMarketsRequest & {
|
|
9503
9504
|
/** @deprecated Use `query.enabled` instead. */
|
package/dist/react/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { UseMutationOptions, useQueryClient, UseMutationResult, UseQueryResult }
|
|
|
9
9
|
import * as node_modules_viem__types_actions_siwe_verifySiweMessage from 'node_modules/viem/_types/actions/siwe/verifySiweMessage';
|
|
10
10
|
import * as abitype from 'abitype';
|
|
11
11
|
import * as node_modules_viem__types_utils_ccip from 'node_modules/viem/_types/utils/ccip';
|
|
12
|
+
import * as _pear_protocol_symm_shared from '@pear-protocol/symm-shared';
|
|
12
13
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
13
14
|
import * as node_modules__pear_protocol_symm_core_dist_types from 'node_modules/@pear-protocol/symm-core/dist/types';
|
|
14
15
|
import * as zustand from 'zustand';
|
|
@@ -8390,7 +8391,7 @@ declare function useSymmCancelClose(options?: {
|
|
|
8390
8391
|
accountAddress?: Address;
|
|
8391
8392
|
overrideChainId?: number;
|
|
8392
8393
|
}>;
|
|
8393
|
-
}): _tanstack_react_query.UseMutationResult<
|
|
8394
|
+
}): _tanstack_react_query.UseMutationResult<_pear_protocol_symm_shared.ApiResponse<unknown>, Error, {
|
|
8394
8395
|
quoteId: string;
|
|
8395
8396
|
authToken?: string;
|
|
8396
8397
|
accountAddress?: Address;
|
|
@@ -9309,7 +9310,7 @@ declare function useSymmCloseAllPositionsMutation(options?: {
|
|
|
9309
9310
|
*/
|
|
9310
9311
|
declare function useSymmCancelOpenMutation(options?: {
|
|
9311
9312
|
mutation?: SymmMutationConfig<unknown, Error, CancelOpenRequest>;
|
|
9312
|
-
}): _tanstack_react_query.UseMutationResult<
|
|
9313
|
+
}): _tanstack_react_query.UseMutationResult<_pear_protocol_symm_shared.ApiResponse<unknown>, Error, CancelOpenRequest, unknown>;
|
|
9313
9314
|
/**
|
|
9314
9315
|
* Use case: Update position settings with automatic auth-token resolution.
|
|
9315
9316
|
*/
|
|
@@ -9365,7 +9366,7 @@ declare function useSymmSetTpslMutation(options?: {
|
|
|
9365
9366
|
*/
|
|
9366
9367
|
declare function useSymmCancelTpslMutation(options?: {
|
|
9367
9368
|
mutation?: SymmMutationConfig<unknown, Error, CancelTpslRequest>;
|
|
9368
|
-
}): _tanstack_react_query.UseMutationResult<
|
|
9369
|
+
}): _tanstack_react_query.UseMutationResult<_pear_protocol_symm_shared.ApiResponse<unknown>, Error, CancelTpslRequest, unknown>;
|
|
9369
9370
|
|
|
9370
9371
|
type UseSymmTpslOrdersParams = {
|
|
9371
9372
|
accountAddress?: Address;
|
|
@@ -9497,7 +9498,7 @@ declare function useSymmLockedParams(params: {
|
|
|
9497
9498
|
leverage?: number;
|
|
9498
9499
|
chainId?: number;
|
|
9499
9500
|
query?: SymmQueryConfig;
|
|
9500
|
-
}): _tanstack_react_query.UseQueryResult<
|
|
9501
|
+
}): _tanstack_react_query.UseQueryResult<_pear_protocol_symm_shared.LockedParams, Error>;
|
|
9501
9502
|
|
|
9502
9503
|
type UseSymmHedgerMarketsParams = GetSymmHedgerMarketsRequest & {
|
|
9503
9504
|
/** @deprecated Use `query.enabled` instead. */
|
package/dist/react/index.js
CHANGED
|
@@ -27623,18 +27623,14 @@ function useSymmHedgerMarketBySymbol(params) {
|
|
|
27623
27623
|
});
|
|
27624
27624
|
}
|
|
27625
27625
|
function useSymmLockedParams(params) {
|
|
27626
|
-
const {
|
|
27626
|
+
const { chainId: ctxChainId } = useSymmContext();
|
|
27627
27627
|
const { marketName, leverage } = params;
|
|
27628
27628
|
const chainId = params.chainId ?? ctxChainId;
|
|
27629
|
-
const internalEnabled = !!
|
|
27629
|
+
const internalEnabled = !!marketName && leverage != null && typeof chainId === "number";
|
|
27630
27630
|
return reactQuery.useQuery({
|
|
27631
27631
|
...params.query,
|
|
27632
27632
|
queryKey: symmKeys.lockedParams(marketName, leverage, chainId),
|
|
27633
|
-
queryFn: () =>
|
|
27634
|
-
marketName,
|
|
27635
|
-
leverage,
|
|
27636
|
-
chainId
|
|
27637
|
-
}),
|
|
27633
|
+
queryFn: () => symmCore.HedgerClient.getLockedParams(chainId, marketName, leverage),
|
|
27638
27634
|
enabled: internalEnabled && (params.query?.enabled ?? true)
|
|
27639
27635
|
});
|
|
27640
27636
|
}
|