@pear-protocol/symmio-client 0.2.5 → 0.2.7
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 +75 -20
- package/dist/react/index.d.ts +75 -20
- package/dist/react/index.js +229 -97
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +228 -99
- package/dist/react/index.mjs.map +1 -1
- package/dist/react/provider.js +24 -27
- package/dist/react/provider.js.map +1 -1
- package/dist/react/provider.mjs +25 -28
- package/dist/react/provider.mjs.map +1 -1
- package/package.json +3 -2
package/dist/react/index.d.mts
CHANGED
|
@@ -7,6 +7,7 @@ import * as _tanstack_react_query from '@tanstack/react-query';
|
|
|
7
7
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
8
8
|
import * as node_modules__pear_protocol_symm_core_dist_types from 'node_modules/@pear-protocol/symm-core/dist/types';
|
|
9
9
|
import * as _pear_protocol_symm_shared from '@pear-protocol/symm-shared';
|
|
10
|
+
import * as zustand from 'zustand';
|
|
10
11
|
import 'react/jsx-runtime';
|
|
11
12
|
|
|
12
13
|
type SymmContextValue = {
|
|
@@ -365,8 +366,6 @@ declare function useSymmTrade(): {
|
|
|
365
366
|
|
|
366
367
|
declare function useSymmPositions(params: {
|
|
367
368
|
accountAddress?: Address;
|
|
368
|
-
/** @deprecated Use `address` instead. */
|
|
369
|
-
mainAddress?: Address;
|
|
370
369
|
address?: Address;
|
|
371
370
|
chainId?: number;
|
|
372
371
|
query?: SymmQueryConfig;
|
|
@@ -378,7 +377,7 @@ declare function useSymmPositions(params: {
|
|
|
378
377
|
|
|
379
378
|
declare function useSymmOpenOrders(params: {
|
|
380
379
|
accountAddress?: Address;
|
|
381
|
-
|
|
380
|
+
address?: Address;
|
|
382
381
|
chainId?: number;
|
|
383
382
|
query?: SymmQueryConfig;
|
|
384
383
|
}): {
|
|
@@ -389,7 +388,7 @@ declare function useSymmOpenOrders(params: {
|
|
|
389
388
|
|
|
390
389
|
declare function useSymmTradeHistory(params: {
|
|
391
390
|
accountAddress?: Address;
|
|
392
|
-
|
|
391
|
+
address?: Address;
|
|
393
392
|
chainId?: number;
|
|
394
393
|
query?: SymmQueryConfig;
|
|
395
394
|
}): {
|
|
@@ -405,7 +404,7 @@ declare function useSymmTpsl(): {
|
|
|
405
404
|
|
|
406
405
|
type UseSymmTpslOrdersParams = {
|
|
407
406
|
accountAddress?: Address;
|
|
408
|
-
|
|
407
|
+
address?: Address;
|
|
409
408
|
positionId?: string;
|
|
410
409
|
type?: GetTpslOrdersRequest['type'];
|
|
411
410
|
status?: GetTpslOrdersRequest['status'];
|
|
@@ -421,7 +420,7 @@ declare function useSymmTpslOrders(params: UseSymmTpslOrdersParams): {
|
|
|
421
420
|
|
|
422
421
|
declare function useSymmTwap(params: {
|
|
423
422
|
accountAddress?: Address;
|
|
424
|
-
|
|
423
|
+
address?: Address;
|
|
425
424
|
chainId?: number;
|
|
426
425
|
query?: SymmQueryConfig;
|
|
427
426
|
}): {
|
|
@@ -443,7 +442,7 @@ declare function useSymmTriggerConfig(params: {
|
|
|
443
442
|
|
|
444
443
|
declare function useSymmTriggerOrders(params: {
|
|
445
444
|
accountAddress?: Address;
|
|
446
|
-
|
|
445
|
+
address?: Address;
|
|
447
446
|
chainId?: number;
|
|
448
447
|
status?: string;
|
|
449
448
|
limit?: number;
|
|
@@ -595,7 +594,7 @@ declare function useSymmFundingPayments(params: {
|
|
|
595
594
|
|
|
596
595
|
declare function useSymmPortfolio(params: {
|
|
597
596
|
accountAddress?: Address;
|
|
598
|
-
|
|
597
|
+
address?: Address;
|
|
599
598
|
chainId?: number;
|
|
600
599
|
query?: SymmQueryConfig;
|
|
601
600
|
}): {
|
|
@@ -655,8 +654,9 @@ declare function useSymmTwapOrder(params: {
|
|
|
655
654
|
};
|
|
656
655
|
|
|
657
656
|
declare function useSymmWs(params: {
|
|
657
|
+
symmCoreClient: SymmSDK | null;
|
|
658
658
|
accountAddress?: Address;
|
|
659
|
-
chainId
|
|
659
|
+
chainId: number;
|
|
660
660
|
}): {
|
|
661
661
|
isConnected: boolean;
|
|
662
662
|
};
|
|
@@ -790,24 +790,48 @@ declare const symmKeys: {
|
|
|
790
790
|
accountsLength: (address?: Address, chainId?: number) => readonly ["symm", "accountsLength", `0x${string}` | undefined, number | undefined];
|
|
791
791
|
accountsWithPositions: (address?: Address, chainId?: number) => readonly ["symm", "accountsWithPositions", `0x${string}` | undefined, number | undefined];
|
|
792
792
|
accountSummary: (address?: Address, chainId?: number) => readonly ["symm", "accountSummary", `0x${string}` | undefined, number | undefined];
|
|
793
|
-
accountData: (address?: Address, chainId?: number) => readonly ["symm", "accountData", `0x${string}` | undefined, number | undefined];
|
|
793
|
+
accountData: (address?: Address, chainId?: number, upnl?: string) => readonly ["symm", "accountData", `0x${string}` | undefined, number | undefined, string | undefined];
|
|
794
794
|
signature: (address?: Address, chainId?: number) => readonly ["symm", "signature", `0x${string}` | undefined, number | undefined];
|
|
795
|
-
approval: (owner?: Address, spender?: Address, chainId?: number) => readonly ["symm", "approval", `0x${string}` | undefined, `0x${string}` | undefined, number | undefined];
|
|
795
|
+
approval: (owner?: Address, spender?: Address, chainId?: number, token?: Address) => readonly ["symm", "approval", `0x${string}` | undefined, `0x${string}` | undefined, number | undefined, `0x${string}` | undefined];
|
|
796
796
|
balances: (address?: Address, chainId?: number) => readonly ["symm", "balances", `0x${string}` | undefined, number | undefined];
|
|
797
|
-
positions: (
|
|
798
|
-
|
|
799
|
-
|
|
797
|
+
positions: (params?: {
|
|
798
|
+
accountAddress?: Address;
|
|
799
|
+
address?: Address;
|
|
800
|
+
chainId?: number;
|
|
801
|
+
}) => readonly ["symm", "positions", {
|
|
802
|
+
accountAddress?: Address;
|
|
803
|
+
address?: Address;
|
|
804
|
+
chainId?: number;
|
|
805
|
+
} | undefined];
|
|
806
|
+
openOrders: (params?: {
|
|
807
|
+
accountAddress?: Address;
|
|
808
|
+
address?: Address;
|
|
809
|
+
chainId?: number;
|
|
810
|
+
}) => readonly ["symm", "openOrders", {
|
|
811
|
+
accountAddress?: Address;
|
|
812
|
+
address?: Address;
|
|
813
|
+
chainId?: number;
|
|
814
|
+
} | undefined];
|
|
815
|
+
tradeHistory: (params?: {
|
|
816
|
+
accountAddress?: Address;
|
|
817
|
+
address?: Address;
|
|
818
|
+
chainId?: number;
|
|
819
|
+
}) => readonly ["symm", "tradeHistory", {
|
|
820
|
+
accountAddress?: Address;
|
|
821
|
+
address?: Address;
|
|
822
|
+
chainId?: number;
|
|
823
|
+
} | undefined];
|
|
800
824
|
tpslOrders: (address?: Address, chainId?: number) => readonly ["symm", "tpslOrders", `0x${string}` | undefined, number | undefined];
|
|
801
825
|
tpslOrdersList: (params?: {
|
|
802
826
|
accountAddress?: Address;
|
|
803
|
-
|
|
827
|
+
address?: Address;
|
|
804
828
|
positionId?: string;
|
|
805
829
|
type?: string;
|
|
806
830
|
status?: string;
|
|
807
831
|
chainId?: number;
|
|
808
832
|
}) => readonly ["symm", "tpslOrders", {
|
|
809
833
|
accountAddress?: Address;
|
|
810
|
-
|
|
834
|
+
address?: Address;
|
|
811
835
|
positionId?: string;
|
|
812
836
|
type?: string;
|
|
813
837
|
status?: string;
|
|
@@ -816,14 +840,14 @@ declare const symmKeys: {
|
|
|
816
840
|
twapOrders: (address?: Address, chainId?: number) => readonly ["symm", "twapOrders", `0x${string}` | undefined, number | undefined];
|
|
817
841
|
triggerOrders: (params?: {
|
|
818
842
|
accountAddress?: Address;
|
|
819
|
-
|
|
843
|
+
address?: Address;
|
|
820
844
|
status?: string;
|
|
821
845
|
limit?: number;
|
|
822
846
|
offset?: number;
|
|
823
847
|
chainId?: number;
|
|
824
848
|
}) => readonly ["symm", "triggerOrders", {
|
|
825
849
|
accountAddress?: Address;
|
|
826
|
-
|
|
850
|
+
address?: Address;
|
|
827
851
|
status?: string;
|
|
828
852
|
limit?: number;
|
|
829
853
|
offset?: number;
|
|
@@ -866,7 +890,15 @@ declare const symmKeys: {
|
|
|
866
890
|
weightMode?: string;
|
|
867
891
|
includeContributions?: boolean;
|
|
868
892
|
} | undefined];
|
|
869
|
-
portfolio: (
|
|
893
|
+
portfolio: (params?: {
|
|
894
|
+
accountAddress?: Address;
|
|
895
|
+
address?: Address;
|
|
896
|
+
chainId?: number;
|
|
897
|
+
}) => readonly ["symm", "portfolio", {
|
|
898
|
+
accountAddress?: Address;
|
|
899
|
+
address?: Address;
|
|
900
|
+
chainId?: number;
|
|
901
|
+
} | undefined];
|
|
870
902
|
notifications: (address?: Address, chainId?: number) => readonly ["symm", "notifications", `0x${string}` | undefined, number | undefined];
|
|
871
903
|
unreadCount: (address?: Address, chainId?: number) => readonly ["symm", "unreadCount", `0x${string}` | undefined, number | undefined];
|
|
872
904
|
availableMargin: (address?: Address, chainId?: number) => readonly ["symm", "availableMargin", `0x${string}` | undefined, number | undefined];
|
|
@@ -879,4 +911,27 @@ declare const symmKeys: {
|
|
|
879
911
|
|
|
880
912
|
declare function getSymmErrorMessage(error: unknown): string;
|
|
881
913
|
|
|
882
|
-
|
|
914
|
+
type SymmWsState = {
|
|
915
|
+
isConnected: boolean;
|
|
916
|
+
setConnected: (isConnected: boolean) => void;
|
|
917
|
+
};
|
|
918
|
+
declare const useSymmWsStore: zustand.UseBoundStore<zustand.StoreApi<SymmWsState>>;
|
|
919
|
+
|
|
920
|
+
type MarkPrices = Record<string, number>;
|
|
921
|
+
type BinanceMarkPriceState = {
|
|
922
|
+
markPrices: MarkPrices;
|
|
923
|
+
subscribeSymbol: (symmSymbol: string, binanceSymbol: string) => void;
|
|
924
|
+
unsubscribeSymbol: (symmSymbol: string, binanceSymbol: string) => void;
|
|
925
|
+
};
|
|
926
|
+
declare const useBinanceMarkPriceStore: zustand.UseBoundStore<zustand.StoreApi<BinanceMarkPriceState>>;
|
|
927
|
+
|
|
928
|
+
type SymmAuthState = {
|
|
929
|
+
tokensByKey: Record<string, string>;
|
|
930
|
+
setToken: (address: Address, chainId: number, token: string) => void;
|
|
931
|
+
getToken: (address: Address, chainId: number) => string | null;
|
|
932
|
+
clearToken: (address: Address, chainId: number) => void;
|
|
933
|
+
clearAll: () => void;
|
|
934
|
+
};
|
|
935
|
+
declare const useSymmAuthStore: zustand.UseBoundStore<zustand.StoreApi<SymmAuthState>>;
|
|
936
|
+
|
|
937
|
+
export { type SymmChartSelection, type SymmChartSelectionInput, type SymmChartTokenSelection, type SymmContextValue, type SymmDelegationState, type SymmInstantTradeActionArgs, type SymmInstantTradeRequest, type SymmPerformanceOverlay, type SymmQueryConfig, type SymmTokenMetadata, type UseSymmAuthParams, type UseSymmChartCandlesReturn, type UseSymmDelegationParams, type UseSymmHedgerMarketsParams, type UseSymmTokenSelectionMetadataReturn, type UseSymmTpslOrdersParams, getSymmErrorMessage, symmKeys, useBinanceMarkPriceStore, useSymmAccountData, useSymmAccountSummary, useSymmAccounts, useSymmAccountsApi, useSymmAccountsLength, useSymmAccountsWithPositions, useSymmApproval, useSymmAuth, useSymmAuthStore, useSymmAvailableMargin, useSymmBalances, useSymmCancelClose, useSymmChartCandles, useSymmChartSelection, useSymmCloseOrder, useSymmCollateral, useSymmContext, useSymmCoreClient, useSymmDelegation, useSymmDeposit, useSymmFunding, useSymmFundingHistory, useSymmFundingPayments, useSymmHedgerMarketById, useSymmHedgerMarketBySymbol, useSymmHedgerMarkets, useSymmInstantTrade, useSymmLockedParams, useSymmMarkets, useSymmNotifications, useSymmOpenOrders, useSymmPendingIds, useSymmPendingInstantOpens, useSymmPerformanceOverlays, useSymmPortfolio, useSymmPositions, useSymmSignature, useSymmTokenSelectionMetadata, useSymmTpsl, useSymmTpslOrders, useSymmTrade, useSymmTradeHistory, useSymmTriggerConfig, useSymmTriggerOrders, useSymmTwap, useSymmTwapOrder, useSymmWithdraw, useSymmWs, useSymmWsStore };
|
package/dist/react/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import * as _tanstack_react_query from '@tanstack/react-query';
|
|
|
7
7
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
8
8
|
import * as node_modules__pear_protocol_symm_core_dist_types from 'node_modules/@pear-protocol/symm-core/dist/types';
|
|
9
9
|
import * as _pear_protocol_symm_shared from '@pear-protocol/symm-shared';
|
|
10
|
+
import * as zustand from 'zustand';
|
|
10
11
|
import 'react/jsx-runtime';
|
|
11
12
|
|
|
12
13
|
type SymmContextValue = {
|
|
@@ -365,8 +366,6 @@ declare function useSymmTrade(): {
|
|
|
365
366
|
|
|
366
367
|
declare function useSymmPositions(params: {
|
|
367
368
|
accountAddress?: Address;
|
|
368
|
-
/** @deprecated Use `address` instead. */
|
|
369
|
-
mainAddress?: Address;
|
|
370
369
|
address?: Address;
|
|
371
370
|
chainId?: number;
|
|
372
371
|
query?: SymmQueryConfig;
|
|
@@ -378,7 +377,7 @@ declare function useSymmPositions(params: {
|
|
|
378
377
|
|
|
379
378
|
declare function useSymmOpenOrders(params: {
|
|
380
379
|
accountAddress?: Address;
|
|
381
|
-
|
|
380
|
+
address?: Address;
|
|
382
381
|
chainId?: number;
|
|
383
382
|
query?: SymmQueryConfig;
|
|
384
383
|
}): {
|
|
@@ -389,7 +388,7 @@ declare function useSymmOpenOrders(params: {
|
|
|
389
388
|
|
|
390
389
|
declare function useSymmTradeHistory(params: {
|
|
391
390
|
accountAddress?: Address;
|
|
392
|
-
|
|
391
|
+
address?: Address;
|
|
393
392
|
chainId?: number;
|
|
394
393
|
query?: SymmQueryConfig;
|
|
395
394
|
}): {
|
|
@@ -405,7 +404,7 @@ declare function useSymmTpsl(): {
|
|
|
405
404
|
|
|
406
405
|
type UseSymmTpslOrdersParams = {
|
|
407
406
|
accountAddress?: Address;
|
|
408
|
-
|
|
407
|
+
address?: Address;
|
|
409
408
|
positionId?: string;
|
|
410
409
|
type?: GetTpslOrdersRequest['type'];
|
|
411
410
|
status?: GetTpslOrdersRequest['status'];
|
|
@@ -421,7 +420,7 @@ declare function useSymmTpslOrders(params: UseSymmTpslOrdersParams): {
|
|
|
421
420
|
|
|
422
421
|
declare function useSymmTwap(params: {
|
|
423
422
|
accountAddress?: Address;
|
|
424
|
-
|
|
423
|
+
address?: Address;
|
|
425
424
|
chainId?: number;
|
|
426
425
|
query?: SymmQueryConfig;
|
|
427
426
|
}): {
|
|
@@ -443,7 +442,7 @@ declare function useSymmTriggerConfig(params: {
|
|
|
443
442
|
|
|
444
443
|
declare function useSymmTriggerOrders(params: {
|
|
445
444
|
accountAddress?: Address;
|
|
446
|
-
|
|
445
|
+
address?: Address;
|
|
447
446
|
chainId?: number;
|
|
448
447
|
status?: string;
|
|
449
448
|
limit?: number;
|
|
@@ -595,7 +594,7 @@ declare function useSymmFundingPayments(params: {
|
|
|
595
594
|
|
|
596
595
|
declare function useSymmPortfolio(params: {
|
|
597
596
|
accountAddress?: Address;
|
|
598
|
-
|
|
597
|
+
address?: Address;
|
|
599
598
|
chainId?: number;
|
|
600
599
|
query?: SymmQueryConfig;
|
|
601
600
|
}): {
|
|
@@ -655,8 +654,9 @@ declare function useSymmTwapOrder(params: {
|
|
|
655
654
|
};
|
|
656
655
|
|
|
657
656
|
declare function useSymmWs(params: {
|
|
657
|
+
symmCoreClient: SymmSDK | null;
|
|
658
658
|
accountAddress?: Address;
|
|
659
|
-
chainId
|
|
659
|
+
chainId: number;
|
|
660
660
|
}): {
|
|
661
661
|
isConnected: boolean;
|
|
662
662
|
};
|
|
@@ -790,24 +790,48 @@ declare const symmKeys: {
|
|
|
790
790
|
accountsLength: (address?: Address, chainId?: number) => readonly ["symm", "accountsLength", `0x${string}` | undefined, number | undefined];
|
|
791
791
|
accountsWithPositions: (address?: Address, chainId?: number) => readonly ["symm", "accountsWithPositions", `0x${string}` | undefined, number | undefined];
|
|
792
792
|
accountSummary: (address?: Address, chainId?: number) => readonly ["symm", "accountSummary", `0x${string}` | undefined, number | undefined];
|
|
793
|
-
accountData: (address?: Address, chainId?: number) => readonly ["symm", "accountData", `0x${string}` | undefined, number | undefined];
|
|
793
|
+
accountData: (address?: Address, chainId?: number, upnl?: string) => readonly ["symm", "accountData", `0x${string}` | undefined, number | undefined, string | undefined];
|
|
794
794
|
signature: (address?: Address, chainId?: number) => readonly ["symm", "signature", `0x${string}` | undefined, number | undefined];
|
|
795
|
-
approval: (owner?: Address, spender?: Address, chainId?: number) => readonly ["symm", "approval", `0x${string}` | undefined, `0x${string}` | undefined, number | undefined];
|
|
795
|
+
approval: (owner?: Address, spender?: Address, chainId?: number, token?: Address) => readonly ["symm", "approval", `0x${string}` | undefined, `0x${string}` | undefined, number | undefined, `0x${string}` | undefined];
|
|
796
796
|
balances: (address?: Address, chainId?: number) => readonly ["symm", "balances", `0x${string}` | undefined, number | undefined];
|
|
797
|
-
positions: (
|
|
798
|
-
|
|
799
|
-
|
|
797
|
+
positions: (params?: {
|
|
798
|
+
accountAddress?: Address;
|
|
799
|
+
address?: Address;
|
|
800
|
+
chainId?: number;
|
|
801
|
+
}) => readonly ["symm", "positions", {
|
|
802
|
+
accountAddress?: Address;
|
|
803
|
+
address?: Address;
|
|
804
|
+
chainId?: number;
|
|
805
|
+
} | undefined];
|
|
806
|
+
openOrders: (params?: {
|
|
807
|
+
accountAddress?: Address;
|
|
808
|
+
address?: Address;
|
|
809
|
+
chainId?: number;
|
|
810
|
+
}) => readonly ["symm", "openOrders", {
|
|
811
|
+
accountAddress?: Address;
|
|
812
|
+
address?: Address;
|
|
813
|
+
chainId?: number;
|
|
814
|
+
} | undefined];
|
|
815
|
+
tradeHistory: (params?: {
|
|
816
|
+
accountAddress?: Address;
|
|
817
|
+
address?: Address;
|
|
818
|
+
chainId?: number;
|
|
819
|
+
}) => readonly ["symm", "tradeHistory", {
|
|
820
|
+
accountAddress?: Address;
|
|
821
|
+
address?: Address;
|
|
822
|
+
chainId?: number;
|
|
823
|
+
} | undefined];
|
|
800
824
|
tpslOrders: (address?: Address, chainId?: number) => readonly ["symm", "tpslOrders", `0x${string}` | undefined, number | undefined];
|
|
801
825
|
tpslOrdersList: (params?: {
|
|
802
826
|
accountAddress?: Address;
|
|
803
|
-
|
|
827
|
+
address?: Address;
|
|
804
828
|
positionId?: string;
|
|
805
829
|
type?: string;
|
|
806
830
|
status?: string;
|
|
807
831
|
chainId?: number;
|
|
808
832
|
}) => readonly ["symm", "tpslOrders", {
|
|
809
833
|
accountAddress?: Address;
|
|
810
|
-
|
|
834
|
+
address?: Address;
|
|
811
835
|
positionId?: string;
|
|
812
836
|
type?: string;
|
|
813
837
|
status?: string;
|
|
@@ -816,14 +840,14 @@ declare const symmKeys: {
|
|
|
816
840
|
twapOrders: (address?: Address, chainId?: number) => readonly ["symm", "twapOrders", `0x${string}` | undefined, number | undefined];
|
|
817
841
|
triggerOrders: (params?: {
|
|
818
842
|
accountAddress?: Address;
|
|
819
|
-
|
|
843
|
+
address?: Address;
|
|
820
844
|
status?: string;
|
|
821
845
|
limit?: number;
|
|
822
846
|
offset?: number;
|
|
823
847
|
chainId?: number;
|
|
824
848
|
}) => readonly ["symm", "triggerOrders", {
|
|
825
849
|
accountAddress?: Address;
|
|
826
|
-
|
|
850
|
+
address?: Address;
|
|
827
851
|
status?: string;
|
|
828
852
|
limit?: number;
|
|
829
853
|
offset?: number;
|
|
@@ -866,7 +890,15 @@ declare const symmKeys: {
|
|
|
866
890
|
weightMode?: string;
|
|
867
891
|
includeContributions?: boolean;
|
|
868
892
|
} | undefined];
|
|
869
|
-
portfolio: (
|
|
893
|
+
portfolio: (params?: {
|
|
894
|
+
accountAddress?: Address;
|
|
895
|
+
address?: Address;
|
|
896
|
+
chainId?: number;
|
|
897
|
+
}) => readonly ["symm", "portfolio", {
|
|
898
|
+
accountAddress?: Address;
|
|
899
|
+
address?: Address;
|
|
900
|
+
chainId?: number;
|
|
901
|
+
} | undefined];
|
|
870
902
|
notifications: (address?: Address, chainId?: number) => readonly ["symm", "notifications", `0x${string}` | undefined, number | undefined];
|
|
871
903
|
unreadCount: (address?: Address, chainId?: number) => readonly ["symm", "unreadCount", `0x${string}` | undefined, number | undefined];
|
|
872
904
|
availableMargin: (address?: Address, chainId?: number) => readonly ["symm", "availableMargin", `0x${string}` | undefined, number | undefined];
|
|
@@ -879,4 +911,27 @@ declare const symmKeys: {
|
|
|
879
911
|
|
|
880
912
|
declare function getSymmErrorMessage(error: unknown): string;
|
|
881
913
|
|
|
882
|
-
|
|
914
|
+
type SymmWsState = {
|
|
915
|
+
isConnected: boolean;
|
|
916
|
+
setConnected: (isConnected: boolean) => void;
|
|
917
|
+
};
|
|
918
|
+
declare const useSymmWsStore: zustand.UseBoundStore<zustand.StoreApi<SymmWsState>>;
|
|
919
|
+
|
|
920
|
+
type MarkPrices = Record<string, number>;
|
|
921
|
+
type BinanceMarkPriceState = {
|
|
922
|
+
markPrices: MarkPrices;
|
|
923
|
+
subscribeSymbol: (symmSymbol: string, binanceSymbol: string) => void;
|
|
924
|
+
unsubscribeSymbol: (symmSymbol: string, binanceSymbol: string) => void;
|
|
925
|
+
};
|
|
926
|
+
declare const useBinanceMarkPriceStore: zustand.UseBoundStore<zustand.StoreApi<BinanceMarkPriceState>>;
|
|
927
|
+
|
|
928
|
+
type SymmAuthState = {
|
|
929
|
+
tokensByKey: Record<string, string>;
|
|
930
|
+
setToken: (address: Address, chainId: number, token: string) => void;
|
|
931
|
+
getToken: (address: Address, chainId: number) => string | null;
|
|
932
|
+
clearToken: (address: Address, chainId: number) => void;
|
|
933
|
+
clearAll: () => void;
|
|
934
|
+
};
|
|
935
|
+
declare const useSymmAuthStore: zustand.UseBoundStore<zustand.StoreApi<SymmAuthState>>;
|
|
936
|
+
|
|
937
|
+
export { type SymmChartSelection, type SymmChartSelectionInput, type SymmChartTokenSelection, type SymmContextValue, type SymmDelegationState, type SymmInstantTradeActionArgs, type SymmInstantTradeRequest, type SymmPerformanceOverlay, type SymmQueryConfig, type SymmTokenMetadata, type UseSymmAuthParams, type UseSymmChartCandlesReturn, type UseSymmDelegationParams, type UseSymmHedgerMarketsParams, type UseSymmTokenSelectionMetadataReturn, type UseSymmTpslOrdersParams, getSymmErrorMessage, symmKeys, useBinanceMarkPriceStore, useSymmAccountData, useSymmAccountSummary, useSymmAccounts, useSymmAccountsApi, useSymmAccountsLength, useSymmAccountsWithPositions, useSymmApproval, useSymmAuth, useSymmAuthStore, useSymmAvailableMargin, useSymmBalances, useSymmCancelClose, useSymmChartCandles, useSymmChartSelection, useSymmCloseOrder, useSymmCollateral, useSymmContext, useSymmCoreClient, useSymmDelegation, useSymmDeposit, useSymmFunding, useSymmFundingHistory, useSymmFundingPayments, useSymmHedgerMarketById, useSymmHedgerMarketBySymbol, useSymmHedgerMarkets, useSymmInstantTrade, useSymmLockedParams, useSymmMarkets, useSymmNotifications, useSymmOpenOrders, useSymmPendingIds, useSymmPendingInstantOpens, useSymmPerformanceOverlays, useSymmPortfolio, useSymmPositions, useSymmSignature, useSymmTokenSelectionMetadata, useSymmTpsl, useSymmTpslOrders, useSymmTrade, useSymmTradeHistory, useSymmTriggerConfig, useSymmTriggerOrders, useSymmTwap, useSymmTwapOrder, useSymmWithdraw, useSymmWs, useSymmWsStore };
|