@pear-protocol/symmio-client 0.2.41 → 0.2.43
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 +87 -62
- package/dist/react/index.d.ts +87 -62
- package/dist/react/index.js +380 -213
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +379 -214
- package/dist/react/index.mjs.map +1 -1
- package/dist/react/{provider-BoNiSPy9.d.mts → provider-CMBaM64o.d.mts} +3 -2
- package/dist/react/{provider-BoNiSPy9.d.ts → provider-CMBaM64o.d.ts} +3 -2
- package/dist/react/provider.d.mts +1 -1
- package/dist/react/provider.d.ts +1 -1
- package/dist/react/provider.js +3 -1
- package/dist/react/provider.js.map +1 -1
- package/dist/react/provider.mjs +3 -1
- package/dist/react/provider.mjs.map +1 -1
- package/package.json +1 -1
package/dist/react/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { createContext, useContext, useMemo,
|
|
2
|
+
import { createContext, useContext, useMemo, useCallback, useEffect, useRef } from 'react';
|
|
3
3
|
import { createSymmSDK, isAuthExpiredError, isNetworkError, isInsufficientMarginError, isRateLimitedError, isTimeoutError } from '@pear-protocol/symm-core';
|
|
4
4
|
import { create } from 'zustand';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
import { useQueryClient, useQuery, useMutation } from '@tanstack/react-query';
|
|
6
7
|
import { SiweMessage } from 'siwe';
|
|
7
|
-
import { useQuery, useQueryClient, useMutation } from '@tanstack/react-query';
|
|
8
8
|
import { isAddress, encodeFunctionData } from 'viem';
|
|
9
9
|
|
|
10
10
|
var SymmContext = createContext(null);
|
|
@@ -491,6 +491,7 @@ function useBinanceWs(params) {
|
|
|
491
491
|
function SymmProvider({
|
|
492
492
|
chainId = 42161,
|
|
493
493
|
address,
|
|
494
|
+
walletClient,
|
|
494
495
|
symmCoreConfig = {
|
|
495
496
|
apiUrl: "https://nginx-server-staging.up.railway.app",
|
|
496
497
|
wsUrl: "wss://nginx-server-staging.up.railway.app"
|
|
@@ -510,9 +511,10 @@ function SymmProvider({
|
|
|
510
511
|
symmCoreClient,
|
|
511
512
|
chainId,
|
|
512
513
|
address,
|
|
514
|
+
walletClient,
|
|
513
515
|
symmioConfig
|
|
514
516
|
}),
|
|
515
|
-
[symmCoreClient, chainId, address, symmioConfig]
|
|
517
|
+
[symmCoreClient, chainId, address, walletClient, symmioConfig]
|
|
516
518
|
);
|
|
517
519
|
useBinanceWs({
|
|
518
520
|
symmCoreClient,
|
|
@@ -633,7 +635,7 @@ function cacheKey(address, chainId) {
|
|
|
633
635
|
function storageKey(address, chainId) {
|
|
634
636
|
return `${TOKEN_STORAGE_PREFIX}:${TOKEN_STORAGE_VERSION}:${cacheKey(address, chainId)}`;
|
|
635
637
|
}
|
|
636
|
-
function
|
|
638
|
+
function getCachedTokenEntry(address, chainId) {
|
|
637
639
|
if (typeof window === "undefined") return null;
|
|
638
640
|
try {
|
|
639
641
|
const raw = window.localStorage.getItem(storageKey(address, chainId));
|
|
@@ -663,17 +665,12 @@ function writeStoredToken(address, chainId, cached) {
|
|
|
663
665
|
} catch {
|
|
664
666
|
}
|
|
665
667
|
}
|
|
666
|
-
function getCachedToken(address, chainId) {
|
|
667
|
-
const stored = readStoredToken(address, chainId);
|
|
668
|
-
if (!stored) return null;
|
|
669
|
-
return stored.token;
|
|
670
|
-
}
|
|
671
668
|
function clearCachedToken(address, chainId) {
|
|
672
669
|
if (typeof window !== "undefined") {
|
|
673
670
|
window.localStorage.removeItem(storageKey(address, chainId));
|
|
674
671
|
}
|
|
675
672
|
}
|
|
676
|
-
async function
|
|
673
|
+
async function fetchAccessTokenEntry(walletClient, signerAddress, accountAddress, chainId, domain) {
|
|
677
674
|
const resolvedDomain = domain ?? (typeof window !== "undefined" ? window.location.host : "localhost");
|
|
678
675
|
const hedgerLoginUrl = new URL("login", getHedgerBaseUrl(chainId)).href;
|
|
679
676
|
const nonce = await getNonce(chainId, accountAddress);
|
|
@@ -702,39 +699,114 @@ async function fetchAccessToken(walletClient, signerAddress, accountAddress, cha
|
|
|
702
699
|
expiresAt: expiresAt - 6e4
|
|
703
700
|
};
|
|
704
701
|
writeStoredToken(accountAddress, chainId, cachedToken);
|
|
705
|
-
return
|
|
702
|
+
return cachedToken;
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
// src/react/query-keys.ts
|
|
706
|
+
var symmKeys = {
|
|
707
|
+
all: ["symm"],
|
|
708
|
+
accounts: (address, chainId) => ["symm", "accounts", address, chainId],
|
|
709
|
+
accountsApi: (address, chainId) => ["symm", "accountsApi", address, chainId],
|
|
710
|
+
accountsLength: (address, chainId) => ["symm", "accountsLength", address, chainId],
|
|
711
|
+
accountsWithPositions: (address, chainId) => ["symm", "accountsWithPositions", address, chainId],
|
|
712
|
+
accountSummary: (address, chainId) => ["symm", "accountSummary", address, chainId],
|
|
713
|
+
accountData: (address, chainId, upnl) => ["symm", "accountData", address, chainId, upnl],
|
|
714
|
+
signature: (address, chainId) => ["symm", "signature", address, chainId],
|
|
715
|
+
auth: (accountAddress, chainId) => ["symm", "auth", accountAddress, chainId],
|
|
716
|
+
approval: (owner, spender, chainId, token) => ["symm", "approval", owner, spender, chainId, token],
|
|
717
|
+
balances: (address, chainId) => ["symm", "balances", address, chainId],
|
|
718
|
+
positions: (params) => ["symm", "positions", params],
|
|
719
|
+
openOrders: (params) => ["symm", "openOrders", params],
|
|
720
|
+
tradeHistory: (params) => ["symm", "tradeHistory", params],
|
|
721
|
+
tpslOrders: (address, chainId) => ["symm", "tpslOrders", address, chainId],
|
|
722
|
+
tpslOrdersList: (params) => ["symm", "tpslOrders", params],
|
|
723
|
+
twapOrders: (address, chainId) => ["symm", "twapOrders", address, chainId],
|
|
724
|
+
triggerOrders: (params) => ["symm", "triggerOrders", params],
|
|
725
|
+
triggerConfig: (orderId) => ["symm", "triggerConfig", orderId],
|
|
726
|
+
markets: (chainId, search) => ["symm", "markets", chainId, search],
|
|
727
|
+
hedgerMarketById: (id, chainId) => ["symm", "hedgerMarketById", id, chainId],
|
|
728
|
+
hedgerMarketBySymbol: (symbol, chainId) => ["symm", "hedgerMarketBySymbol", symbol, chainId],
|
|
729
|
+
lockedParams: (marketName, leverage, chainId) => ["symm", "lockedParams", marketName, leverage, chainId],
|
|
730
|
+
hedgerMarkets: (request) => ["symm", "hedgerMarkets", request],
|
|
731
|
+
fundingRates: (chainId) => ["symm", "fundingRates", chainId],
|
|
732
|
+
fundingPayments: (params) => ["symm", "fundingPayments", params],
|
|
733
|
+
fundingHistory: (params) => ["symm", "fundingHistory", params],
|
|
734
|
+
portfolio: (params) => ["symm", "portfolio", params],
|
|
735
|
+
notifications: (address, chainId) => ["symm", "notifications", address, chainId],
|
|
736
|
+
unreadCount: (address, chainId) => ["symm", "unreadCount", address, chainId],
|
|
737
|
+
availableMargin: (address, chainId) => ["symm", "availableMargin", address, chainId],
|
|
738
|
+
pendingIds: (address, chainId) => ["symm", "pendingIds", address, chainId],
|
|
739
|
+
pendingInstantOpens: (accountAddress, chainId) => ["symm", "pendingInstantOpens", accountAddress, chainId],
|
|
740
|
+
twapOrder: (orderId) => ["symm", "twapOrder", orderId],
|
|
741
|
+
delegation: (account, target, selectors, chainId) => ["symm", "delegation", account, target, selectors, chainId],
|
|
742
|
+
chartMetadata: (symbolsKey, positionKey) => ["symm", "chartMetadata", symbolsKey, positionKey]
|
|
743
|
+
};
|
|
744
|
+
|
|
745
|
+
// src/react/auth-cache.ts
|
|
746
|
+
function getAuthQueryData(queryClient, accountAddress, chainId) {
|
|
747
|
+
return queryClient.getQueryData(symmKeys.auth(accountAddress, chainId)) ?? null;
|
|
706
748
|
}
|
|
707
|
-
function
|
|
708
|
-
|
|
749
|
+
function setAuthQueryData(queryClient, accountAddress, chainId, entry) {
|
|
750
|
+
queryClient.setQueryData(symmKeys.auth(accountAddress, chainId), entry);
|
|
709
751
|
}
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
return get().tokensByKey[key] ?? null;
|
|
724
|
-
},
|
|
725
|
-
clearToken: (address, chainId) => {
|
|
726
|
-
const key = symmAuthTokenKey(address, chainId);
|
|
727
|
-
set((state) => {
|
|
728
|
-
if (!(key in state.tokensByKey)) return state;
|
|
729
|
-
const next = { ...state.tokensByKey };
|
|
730
|
-
delete next[key];
|
|
731
|
-
return { tokensByKey: next };
|
|
732
|
-
});
|
|
733
|
-
},
|
|
734
|
-
clearAll: () => {
|
|
735
|
-
set({ tokensByKey: {} });
|
|
752
|
+
function clearAuthQueryData(queryClient, accountAddress, chainId) {
|
|
753
|
+
queryClient.removeQueries({
|
|
754
|
+
queryKey: symmKeys.auth(accountAddress, chainId),
|
|
755
|
+
exact: true
|
|
756
|
+
});
|
|
757
|
+
}
|
|
758
|
+
function clearPersistedAuthState(accountAddress, chainId) {
|
|
759
|
+
clearCachedToken(accountAddress, chainId);
|
|
760
|
+
}
|
|
761
|
+
function getAuthTokenFromRuntimeCache(queryClient, accountAddress, chainId) {
|
|
762
|
+
const inQuery = getAuthQueryData(queryClient, accountAddress, chainId);
|
|
763
|
+
if (inQuery && inQuery.expiresAt > Date.now()) {
|
|
764
|
+
return inQuery.token;
|
|
736
765
|
}
|
|
737
|
-
|
|
766
|
+
const persisted = getCachedTokenEntry(accountAddress, chainId);
|
|
767
|
+
if (!persisted) {
|
|
768
|
+
return null;
|
|
769
|
+
}
|
|
770
|
+
setAuthQueryData(queryClient, accountAddress, chainId, persisted);
|
|
771
|
+
return persisted.token;
|
|
772
|
+
}
|
|
773
|
+
async function resolveAuthTokenEntry({
|
|
774
|
+
queryClient,
|
|
775
|
+
walletClient,
|
|
776
|
+
signerAddress,
|
|
777
|
+
accountAddress,
|
|
778
|
+
chainId,
|
|
779
|
+
siweDomain,
|
|
780
|
+
force = false
|
|
781
|
+
}) {
|
|
782
|
+
if (!walletClient || !signerAddress || !accountAddress) {
|
|
783
|
+
return null;
|
|
784
|
+
}
|
|
785
|
+
if (!force) {
|
|
786
|
+
const inQuery = getAuthQueryData(queryClient, accountAddress, chainId);
|
|
787
|
+
if (inQuery && inQuery.expiresAt > Date.now()) {
|
|
788
|
+
return inQuery;
|
|
789
|
+
}
|
|
790
|
+
const persisted = getCachedTokenEntry(accountAddress, chainId);
|
|
791
|
+
if (persisted) {
|
|
792
|
+
setAuthQueryData(queryClient, accountAddress, chainId, persisted);
|
|
793
|
+
return persisted;
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
const fresh = await fetchAccessTokenEntry(
|
|
797
|
+
walletClient,
|
|
798
|
+
signerAddress,
|
|
799
|
+
accountAddress,
|
|
800
|
+
chainId,
|
|
801
|
+
siweDomain
|
|
802
|
+
);
|
|
803
|
+
setAuthQueryData(queryClient, accountAddress, chainId, fresh);
|
|
804
|
+
return fresh;
|
|
805
|
+
}
|
|
806
|
+
function clearAuthState(queryClient, accountAddress, chainId) {
|
|
807
|
+
clearPersistedAuthState(accountAddress, chainId);
|
|
808
|
+
clearAuthQueryData(queryClient, accountAddress, chainId);
|
|
809
|
+
}
|
|
738
810
|
|
|
739
811
|
// src/react/hooks/use-symm-auth.ts
|
|
740
812
|
function logSymmAuth(event, details) {
|
|
@@ -745,47 +817,24 @@ function logSymmAuth(event, details) {
|
|
|
745
817
|
}
|
|
746
818
|
function useSymmAuth(params) {
|
|
747
819
|
const context = useSymmContext();
|
|
748
|
-
const
|
|
749
|
-
const address = params?.address ??
|
|
750
|
-
const chainId = params?.chainId ??
|
|
751
|
-
const walletClient = params?.walletClient ??
|
|
820
|
+
const queryClient = useQueryClient();
|
|
821
|
+
const address = params?.address ?? context.address;
|
|
822
|
+
const chainId = params?.chainId ?? context.chainId ?? 42161;
|
|
823
|
+
const walletClient = params?.walletClient ?? context.walletClient;
|
|
752
824
|
const siweDomain = params?.siweDomain;
|
|
753
|
-
const activeAccountAddress = params?.activeAccountAddress
|
|
754
|
-
const
|
|
755
|
-
if (activeAccountAddress) {
|
|
756
|
-
return state.tokensByKey[symmAuthTokenKey(activeAccountAddress, chainId)] ?? null;
|
|
757
|
-
}
|
|
758
|
-
return ctx.accessToken ?? ctx.authToken ?? null;
|
|
759
|
-
});
|
|
760
|
-
const setToken = useSymmAuthStore((state) => state.setToken);
|
|
761
|
-
const getToken = useSymmAuthStore((state) => state.getToken);
|
|
762
|
-
const clearToken = useSymmAuthStore((state) => state.clearToken);
|
|
763
|
-
const previousAddressRef = useRef(activeAccountAddress);
|
|
764
|
-
const previousChainIdRef = useRef(chainId);
|
|
765
|
-
const refreshAuthRef = useRef(async () => null);
|
|
825
|
+
const activeAccountAddress = params?.activeAccountAddress;
|
|
826
|
+
const canBootstrap = !!walletClient && !!address && !!activeAccountAddress;
|
|
766
827
|
const refreshAuth = useCallback(
|
|
767
828
|
async (accountAddress, options) => {
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
chainId
|
|
776
|
-
});
|
|
777
|
-
return inStore;
|
|
778
|
-
}
|
|
779
|
-
const cached = getCachedToken(resolvedAccountAddress, chainId);
|
|
780
|
-
if (cached) {
|
|
781
|
-
setToken(resolvedAccountAddress, chainId, cached);
|
|
782
|
-
logSymmAuth("refresh:local-storage-hit", {
|
|
783
|
-
accountAddress: resolvedAccountAddress,
|
|
784
|
-
chainId
|
|
785
|
-
});
|
|
786
|
-
return cached;
|
|
787
|
-
}
|
|
829
|
+
const resolvedAccountAddress = accountAddress ?? activeAccountAddress;
|
|
830
|
+
if (!resolvedAccountAddress) {
|
|
831
|
+
logSymmAuth("refresh:skip-no-active-account", {
|
|
832
|
+
signerAddress: address,
|
|
833
|
+
chainId
|
|
834
|
+
});
|
|
835
|
+
return null;
|
|
788
836
|
}
|
|
837
|
+
if (!walletClient || !address) return null;
|
|
789
838
|
try {
|
|
790
839
|
logSymmAuth("refresh:fetch-start", {
|
|
791
840
|
signerAddress: address,
|
|
@@ -793,14 +842,16 @@ function useSymmAuth(params) {
|
|
|
793
842
|
chainId,
|
|
794
843
|
force: options?.force ?? false
|
|
795
844
|
});
|
|
796
|
-
const
|
|
845
|
+
const tokenEntry = await resolveAuthTokenEntry({
|
|
846
|
+
queryClient,
|
|
797
847
|
walletClient,
|
|
798
|
-
address,
|
|
799
|
-
resolvedAccountAddress,
|
|
848
|
+
signerAddress: address,
|
|
849
|
+
accountAddress: resolvedAccountAddress,
|
|
800
850
|
chainId,
|
|
801
|
-
siweDomain
|
|
802
|
-
|
|
803
|
-
|
|
851
|
+
siweDomain,
|
|
852
|
+
force: options?.force
|
|
853
|
+
});
|
|
854
|
+
const token2 = tokenEntry?.token ?? null;
|
|
804
855
|
logSymmAuth("refresh:fetch-success", {
|
|
805
856
|
signerAddress: address,
|
|
806
857
|
accountAddress: resolvedAccountAddress,
|
|
@@ -808,7 +859,7 @@ function useSymmAuth(params) {
|
|
|
808
859
|
});
|
|
809
860
|
return token2;
|
|
810
861
|
} catch (error) {
|
|
811
|
-
|
|
862
|
+
clearPersistedAuthState(resolvedAccountAddress, chainId);
|
|
812
863
|
logSymmAuth("refresh:fetch-failed", {
|
|
813
864
|
signerAddress: address,
|
|
814
865
|
accountAddress: resolvedAccountAddress,
|
|
@@ -818,74 +869,49 @@ function useSymmAuth(params) {
|
|
|
818
869
|
return null;
|
|
819
870
|
}
|
|
820
871
|
},
|
|
821
|
-
[
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
const clearAuth = useCallback(() => {
|
|
825
|
-
if (activeAccountAddress) {
|
|
826
|
-
clearCachedToken(activeAccountAddress, chainId);
|
|
827
|
-
clearToken(activeAccountAddress, chainId);
|
|
828
|
-
}
|
|
829
|
-
}, [activeAccountAddress, chainId, clearToken]);
|
|
830
|
-
useEffect(() => {
|
|
831
|
-
const previousAddress = previousAddressRef.current;
|
|
832
|
-
const previousChainId = previousChainIdRef.current;
|
|
833
|
-
const addressChanged = previousAddress !== activeAccountAddress;
|
|
834
|
-
const chainChanged = previousChainId !== chainId;
|
|
835
|
-
let cancelled = false;
|
|
836
|
-
previousAddressRef.current = activeAccountAddress;
|
|
837
|
-
previousChainIdRef.current = chainId;
|
|
838
|
-
logSymmAuth("bootstrap:dependencies", {
|
|
839
|
-
signerAddress: address,
|
|
872
|
+
[
|
|
873
|
+
walletClient,
|
|
874
|
+
address,
|
|
840
875
|
activeAccountAddress,
|
|
841
876
|
chainId,
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
chainId,
|
|
853
|
-
hasWalletClient: !!walletClient
|
|
854
|
-
});
|
|
855
|
-
return;
|
|
856
|
-
}
|
|
857
|
-
if (previousAddress && (addressChanged || chainChanged)) {
|
|
858
|
-
clearCachedToken(previousAddress, previousChainId);
|
|
859
|
-
clearToken(previousAddress, previousChainId);
|
|
860
|
-
}
|
|
861
|
-
async function bootstrapAuth() {
|
|
862
|
-
logSymmAuth("bootstrap:run", {
|
|
863
|
-
signerAddress: address,
|
|
864
|
-
activeAccountAddress,
|
|
865
|
-
chainId,
|
|
866
|
-
hasWalletClient: !!walletClient,
|
|
867
|
-
hasRefreshAuth: !!refreshAuthRef.current
|
|
868
|
-
});
|
|
869
|
-
logSymmAuth("bootstrap:start", {
|
|
877
|
+
siweDomain,
|
|
878
|
+
queryClient
|
|
879
|
+
]
|
|
880
|
+
);
|
|
881
|
+
const authQuery = useQuery({
|
|
882
|
+
queryKey: symmKeys.auth(activeAccountAddress, chainId),
|
|
883
|
+
queryFn: async () => {
|
|
884
|
+
const tokenEntry = await resolveAuthTokenEntry({
|
|
885
|
+
queryClient,
|
|
886
|
+
walletClient,
|
|
870
887
|
signerAddress: address,
|
|
888
|
+
accountAddress: activeAccountAddress,
|
|
871
889
|
chainId,
|
|
872
|
-
|
|
873
|
-
walletReady: !!walletClient
|
|
890
|
+
siweDomain
|
|
874
891
|
});
|
|
875
|
-
if (
|
|
876
|
-
return;
|
|
892
|
+
if (!tokenEntry) {
|
|
893
|
+
return null;
|
|
877
894
|
}
|
|
878
|
-
|
|
895
|
+
return tokenEntry;
|
|
896
|
+
},
|
|
897
|
+
enabled: canBootstrap,
|
|
898
|
+
retry: false,
|
|
899
|
+
refetchOnWindowFocus: false,
|
|
900
|
+
refetchOnReconnect: false
|
|
901
|
+
});
|
|
902
|
+
const clearAuth = useCallback(() => {
|
|
903
|
+
if (activeAccountAddress) {
|
|
904
|
+
clearAuthState(queryClient, activeAccountAddress, chainId);
|
|
879
905
|
}
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
cancelled = true;
|
|
883
|
-
};
|
|
884
|
-
}, [address, activeAccountAddress, walletClient, chainId, clearToken]);
|
|
906
|
+
}, [activeAccountAddress, chainId, queryClient]);
|
|
907
|
+
const token = authQuery.data?.token ?? null;
|
|
885
908
|
return {
|
|
886
909
|
accessToken: token,
|
|
887
910
|
authToken: token,
|
|
888
911
|
isAuthenticated: !!token,
|
|
912
|
+
isLoading: authQuery.isLoading,
|
|
913
|
+
isFetching: authQuery.isFetching,
|
|
914
|
+
error: authQuery.error,
|
|
889
915
|
refresh: refreshAuth,
|
|
890
916
|
refreshAuth,
|
|
891
917
|
clear: clearAuth
|
|
@@ -1377,6 +1403,30 @@ function prepareDelegateAccess(multiAccount, account, params) {
|
|
|
1377
1403
|
config: { account, to: multiAccount, data, value: 0n }
|
|
1378
1404
|
};
|
|
1379
1405
|
}
|
|
1406
|
+
function prepareProposeRevoke(multiAccount, account, params) {
|
|
1407
|
+
const data = encodeFunctionData({
|
|
1408
|
+
abi: MultiAccountABI,
|
|
1409
|
+
functionName: "proposeToRevokeAccesses",
|
|
1410
|
+
args: [params.account, params.target, params.selectors]
|
|
1411
|
+
});
|
|
1412
|
+
return {
|
|
1413
|
+
functionName: "proposeToRevokeAccesses",
|
|
1414
|
+
args: [params.account, params.target, params.selectors],
|
|
1415
|
+
config: { account, to: multiAccount, data, value: 0n }
|
|
1416
|
+
};
|
|
1417
|
+
}
|
|
1418
|
+
function prepareRevokeAccess(multiAccount, account, params) {
|
|
1419
|
+
const data = encodeFunctionData({
|
|
1420
|
+
abi: MultiAccountABI,
|
|
1421
|
+
functionName: "revokeAccesses",
|
|
1422
|
+
args: [params.account, params.target, params.selectors]
|
|
1423
|
+
});
|
|
1424
|
+
return {
|
|
1425
|
+
functionName: "revokeAccesses",
|
|
1426
|
+
args: [params.account, params.target, params.selectors],
|
|
1427
|
+
config: { account, to: multiAccount, data, value: 0n }
|
|
1428
|
+
};
|
|
1429
|
+
}
|
|
1380
1430
|
async function delegateAccess(walletClient, publicClient, multiAccount, params) {
|
|
1381
1431
|
const account = walletClient.account?.address;
|
|
1382
1432
|
if (!account) throw new Error("Wallet client has no account");
|
|
@@ -1388,6 +1438,28 @@ async function delegateAccess(walletClient, publicClient, multiAccount, params)
|
|
|
1388
1438
|
chain: walletClient.chain
|
|
1389
1439
|
});
|
|
1390
1440
|
}
|
|
1441
|
+
async function proposeRevoke(walletClient, publicClient, multiAccount, params) {
|
|
1442
|
+
const account = walletClient.account?.address;
|
|
1443
|
+
if (!account) throw new Error("Wallet client has no account");
|
|
1444
|
+
const prepared = prepareProposeRevoke(multiAccount, account, params);
|
|
1445
|
+
const gas = await publicClient.estimateGas(prepared.config);
|
|
1446
|
+
return walletClient.sendTransaction({
|
|
1447
|
+
...prepared.config,
|
|
1448
|
+
gas: calculateGasMargin(gas),
|
|
1449
|
+
chain: walletClient.chain
|
|
1450
|
+
});
|
|
1451
|
+
}
|
|
1452
|
+
async function revokeAccess(walletClient, publicClient, multiAccount, params) {
|
|
1453
|
+
const account = walletClient.account?.address;
|
|
1454
|
+
if (!account) throw new Error("Wallet client has no account");
|
|
1455
|
+
const prepared = prepareRevokeAccess(multiAccount, account, params);
|
|
1456
|
+
const gas = await publicClient.estimateGas(prepared.config);
|
|
1457
|
+
return walletClient.sendTransaction({
|
|
1458
|
+
...prepared.config,
|
|
1459
|
+
gas: calculateGasMargin(gas),
|
|
1460
|
+
chain: walletClient.chain
|
|
1461
|
+
});
|
|
1462
|
+
}
|
|
1391
1463
|
async function hasDelegatedAccess(publicClient, multiAccount, params) {
|
|
1392
1464
|
validateAddress(params.account, "subAccount");
|
|
1393
1465
|
validateAddress(params.target, "target");
|
|
@@ -1400,52 +1472,61 @@ async function hasDelegatedAccess(publicClient, multiAccount, params) {
|
|
|
1400
1472
|
return Boolean(result);
|
|
1401
1473
|
}
|
|
1402
1474
|
|
|
1403
|
-
// src/react/
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
hedgerMarkets: (request) => ["symm", "hedgerMarkets", request],
|
|
1428
|
-
fundingRates: (chainId) => ["symm", "fundingRates", chainId],
|
|
1429
|
-
fundingPayments: (params) => ["symm", "fundingPayments", params],
|
|
1430
|
-
fundingHistory: (params) => ["symm", "fundingHistory", params],
|
|
1431
|
-
portfolio: (params) => ["symm", "portfolio", params],
|
|
1432
|
-
notifications: (address, chainId) => ["symm", "notifications", address, chainId],
|
|
1433
|
-
unreadCount: (address, chainId) => ["symm", "unreadCount", address, chainId],
|
|
1434
|
-
availableMargin: (address, chainId) => ["symm", "availableMargin", address, chainId],
|
|
1435
|
-
pendingIds: (address, chainId) => ["symm", "pendingIds", address, chainId],
|
|
1436
|
-
pendingInstantOpens: (accountAddress, chainId) => ["symm", "pendingInstantOpens", accountAddress, chainId],
|
|
1437
|
-
twapOrder: (orderId) => ["symm", "twapOrder", orderId],
|
|
1438
|
-
delegation: (account, target, selectors, chainId) => ["symm", "delegation", account, target, selectors, chainId],
|
|
1439
|
-
chartMetadata: (symbolsKey, positionKey) => ["symm", "chartMetadata", symbolsKey, positionKey]
|
|
1440
|
-
};
|
|
1475
|
+
// src/react/mutation-config.ts
|
|
1476
|
+
function withSymmMutationConfig(config, internal) {
|
|
1477
|
+
const {
|
|
1478
|
+
onSuccess: configOnSuccess,
|
|
1479
|
+
onError: configOnError,
|
|
1480
|
+
onSettled: configOnSettled,
|
|
1481
|
+
...rest
|
|
1482
|
+
} = config ?? {};
|
|
1483
|
+
return {
|
|
1484
|
+
...rest,
|
|
1485
|
+
onSuccess: async (...args) => {
|
|
1486
|
+
await internal?.onSuccess?.(...args);
|
|
1487
|
+
await configOnSuccess?.(...args);
|
|
1488
|
+
},
|
|
1489
|
+
onError: async (...args) => {
|
|
1490
|
+
await internal?.onError?.(...args);
|
|
1491
|
+
await configOnError?.(...args);
|
|
1492
|
+
},
|
|
1493
|
+
onSettled: async (...args) => {
|
|
1494
|
+
await internal?.onSettled?.(...args);
|
|
1495
|
+
await configOnSettled?.(...args);
|
|
1496
|
+
}
|
|
1497
|
+
};
|
|
1498
|
+
}
|
|
1441
1499
|
|
|
1442
1500
|
// src/react/hooks/use-symm-delegation.ts
|
|
1443
|
-
function
|
|
1501
|
+
function useResolvedDelegationConfig() {
|
|
1444
1502
|
const { chainId, address, symmioConfig } = useSymmContext();
|
|
1445
1503
|
const multiAccount = symmioConfig?.multiAccountAddress ?? getAddress(MULTI_ACCOUNT_ADDRESS, chainId, "MultiAccount");
|
|
1504
|
+
const target = DEFAULT_PARTY_B_ADDRESS[chainId];
|
|
1505
|
+
return {
|
|
1506
|
+
address,
|
|
1507
|
+
chainId,
|
|
1508
|
+
defaultTarget: target,
|
|
1509
|
+
multiAccount
|
|
1510
|
+
};
|
|
1511
|
+
}
|
|
1512
|
+
function resolveDelegationRequest(variables, defaultTarget, defaultSelectors) {
|
|
1513
|
+
const target = variables.target ?? defaultTarget;
|
|
1514
|
+
const selectors = variables.selectors ?? defaultSelectors ?? ALL_TRADING_SELECTORS;
|
|
1515
|
+
if (!target) throw new Error("delegation target is not configured");
|
|
1516
|
+
if (selectors.length === 0) {
|
|
1517
|
+
throw new Error("at least one delegation selector is required");
|
|
1518
|
+
}
|
|
1519
|
+
return {
|
|
1520
|
+
account: variables.account,
|
|
1521
|
+
selectors: [...selectors],
|
|
1522
|
+
target
|
|
1523
|
+
};
|
|
1524
|
+
}
|
|
1525
|
+
function useSymmDelegation(params) {
|
|
1526
|
+
const { chainId, address, multiAccount, defaultTarget } = useResolvedDelegationConfig();
|
|
1446
1527
|
const publicClient = params?.publicClient;
|
|
1447
1528
|
const accountAddress = params?.accountAddress ?? address;
|
|
1448
|
-
const target = params?.target ??
|
|
1529
|
+
const target = params?.target ?? defaultTarget;
|
|
1449
1530
|
const selectors = params?.selectors ?? ALL_TRADING_SELECTORS;
|
|
1450
1531
|
const consumerEnabled = params?.query?.enabled ?? params?.enabled ?? true;
|
|
1451
1532
|
const internalEnabled = !!publicClient && !!accountAddress && !!target && selectors.length > 0;
|
|
@@ -1480,6 +1561,110 @@ function useSymmDelegation(params) {
|
|
|
1480
1561
|
}
|
|
1481
1562
|
});
|
|
1482
1563
|
}
|
|
1564
|
+
function useSymmDelegateAccessMutation(params = {}, options) {
|
|
1565
|
+
const queryClient = useQueryClient();
|
|
1566
|
+
const { chainId, multiAccount, defaultTarget } = useResolvedDelegationConfig();
|
|
1567
|
+
const { publicClient, walletClient } = params;
|
|
1568
|
+
return useMutation({
|
|
1569
|
+
...withSymmMutationConfig(options?.mutation, {
|
|
1570
|
+
onSuccess: async (_data, variables) => {
|
|
1571
|
+
const request = resolveDelegationRequest(
|
|
1572
|
+
variables,
|
|
1573
|
+
params.target ?? defaultTarget,
|
|
1574
|
+
params.selectors
|
|
1575
|
+
);
|
|
1576
|
+
await queryClient.invalidateQueries({
|
|
1577
|
+
queryKey: symmKeys.delegation(
|
|
1578
|
+
request.account,
|
|
1579
|
+
request.target,
|
|
1580
|
+
request.selectors,
|
|
1581
|
+
chainId
|
|
1582
|
+
)
|
|
1583
|
+
});
|
|
1584
|
+
}
|
|
1585
|
+
}),
|
|
1586
|
+
mutationFn: async (variables) => {
|
|
1587
|
+
if (!walletClient || !publicClient) throw new Error("Clients not available");
|
|
1588
|
+
const request = resolveDelegationRequest(
|
|
1589
|
+
variables,
|
|
1590
|
+
params.target ?? defaultTarget,
|
|
1591
|
+
params.selectors
|
|
1592
|
+
);
|
|
1593
|
+
return delegateAccess(walletClient, publicClient, multiAccount, {
|
|
1594
|
+
account: request.account,
|
|
1595
|
+
target: request.target,
|
|
1596
|
+
selectors: request.selectors,
|
|
1597
|
+
activate: true
|
|
1598
|
+
});
|
|
1599
|
+
}
|
|
1600
|
+
});
|
|
1601
|
+
}
|
|
1602
|
+
function useSymmProposeRevokeDelegationMutation(params = {}, options) {
|
|
1603
|
+
const queryClient = useQueryClient();
|
|
1604
|
+
const { chainId, multiAccount, defaultTarget } = useResolvedDelegationConfig();
|
|
1605
|
+
const { publicClient, walletClient } = params;
|
|
1606
|
+
return useMutation({
|
|
1607
|
+
...withSymmMutationConfig(options?.mutation, {
|
|
1608
|
+
onSuccess: async (_data, variables) => {
|
|
1609
|
+
const request = resolveDelegationRequest(
|
|
1610
|
+
variables,
|
|
1611
|
+
params.target ?? defaultTarget,
|
|
1612
|
+
params.selectors
|
|
1613
|
+
);
|
|
1614
|
+
await queryClient.invalidateQueries({
|
|
1615
|
+
queryKey: symmKeys.delegation(
|
|
1616
|
+
request.account,
|
|
1617
|
+
request.target,
|
|
1618
|
+
request.selectors,
|
|
1619
|
+
chainId
|
|
1620
|
+
)
|
|
1621
|
+
});
|
|
1622
|
+
}
|
|
1623
|
+
}),
|
|
1624
|
+
mutationFn: async (variables) => {
|
|
1625
|
+
if (!walletClient || !publicClient) throw new Error("Clients not available");
|
|
1626
|
+
const request = resolveDelegationRequest(
|
|
1627
|
+
variables,
|
|
1628
|
+
params.target ?? defaultTarget,
|
|
1629
|
+
params.selectors
|
|
1630
|
+
);
|
|
1631
|
+
return proposeRevoke(walletClient, publicClient, multiAccount, request);
|
|
1632
|
+
}
|
|
1633
|
+
});
|
|
1634
|
+
}
|
|
1635
|
+
function useSymmRevokeDelegationMutation(params = {}, options) {
|
|
1636
|
+
const queryClient = useQueryClient();
|
|
1637
|
+
const { chainId, multiAccount, defaultTarget } = useResolvedDelegationConfig();
|
|
1638
|
+
const { publicClient, walletClient } = params;
|
|
1639
|
+
return useMutation({
|
|
1640
|
+
...withSymmMutationConfig(options?.mutation, {
|
|
1641
|
+
onSuccess: async (_data, variables) => {
|
|
1642
|
+
const request = resolveDelegationRequest(
|
|
1643
|
+
variables,
|
|
1644
|
+
params.target ?? defaultTarget,
|
|
1645
|
+
params.selectors
|
|
1646
|
+
);
|
|
1647
|
+
await queryClient.invalidateQueries({
|
|
1648
|
+
queryKey: symmKeys.delegation(
|
|
1649
|
+
request.account,
|
|
1650
|
+
request.target,
|
|
1651
|
+
request.selectors,
|
|
1652
|
+
chainId
|
|
1653
|
+
)
|
|
1654
|
+
});
|
|
1655
|
+
}
|
|
1656
|
+
}),
|
|
1657
|
+
mutationFn: async (variables) => {
|
|
1658
|
+
if (!walletClient || !publicClient) throw new Error("Clients not available");
|
|
1659
|
+
const request = resolveDelegationRequest(
|
|
1660
|
+
variables,
|
|
1661
|
+
params.target ?? defaultTarget,
|
|
1662
|
+
params.selectors
|
|
1663
|
+
);
|
|
1664
|
+
return revokeAccess(walletClient, publicClient, multiAccount, request);
|
|
1665
|
+
}
|
|
1666
|
+
});
|
|
1667
|
+
}
|
|
1483
1668
|
|
|
1484
1669
|
// src/react/cache.ts
|
|
1485
1670
|
function invalidateBalances(qc) {
|
|
@@ -1501,31 +1686,6 @@ function invalidateOrders(qc) {
|
|
|
1501
1686
|
qc.invalidateQueries({ queryKey: ["symm", "triggerOrders"] });
|
|
1502
1687
|
}
|
|
1503
1688
|
|
|
1504
|
-
// src/react/mutation-config.ts
|
|
1505
|
-
function withSymmMutationConfig(config, internal) {
|
|
1506
|
-
const {
|
|
1507
|
-
onSuccess: configOnSuccess,
|
|
1508
|
-
onError: configOnError,
|
|
1509
|
-
onSettled: configOnSettled,
|
|
1510
|
-
...rest
|
|
1511
|
-
} = config ?? {};
|
|
1512
|
-
return {
|
|
1513
|
-
...rest,
|
|
1514
|
-
onSuccess: async (...args) => {
|
|
1515
|
-
await internal?.onSuccess?.(...args);
|
|
1516
|
-
await configOnSuccess?.(...args);
|
|
1517
|
-
},
|
|
1518
|
-
onError: async (...args) => {
|
|
1519
|
-
await internal?.onError?.(...args);
|
|
1520
|
-
await configOnError?.(...args);
|
|
1521
|
-
},
|
|
1522
|
-
onSettled: async (...args) => {
|
|
1523
|
-
await internal?.onSettled?.(...args);
|
|
1524
|
-
await configOnSettled?.(...args);
|
|
1525
|
-
}
|
|
1526
|
-
};
|
|
1527
|
-
}
|
|
1528
|
-
|
|
1529
1689
|
// src/react/hooks/use-symm-instant-trade.ts
|
|
1530
1690
|
function useInstantTradeDeps(params) {
|
|
1531
1691
|
const { symmCoreClient, chainId, address, symmioConfig } = useSymmContext();
|
|
@@ -1555,7 +1715,7 @@ async function ensureInstantTradeReady(deps, queryClient, request) {
|
|
|
1555
1715
|
if (selectors.length === 0) {
|
|
1556
1716
|
throw new Error("at least one delegation selector is required");
|
|
1557
1717
|
}
|
|
1558
|
-
const accessToken =
|
|
1718
|
+
const accessToken = getAuthTokenFromRuntimeCache(queryClient, accountAddress, chainId);
|
|
1559
1719
|
if (!accessToken) {
|
|
1560
1720
|
throw new Error("auth token is required for instant trading");
|
|
1561
1721
|
}
|
|
@@ -1968,7 +2128,7 @@ function useSymmCancelClose(options) {
|
|
|
1968
2128
|
}
|
|
1969
2129
|
const resolvedAccountAddress = accountAddress ?? address;
|
|
1970
2130
|
const resolvedChainId = overrideChainId ?? chainId;
|
|
1971
|
-
const resolvedAuthToken = authToken ?? (resolvedAccountAddress ?
|
|
2131
|
+
const resolvedAuthToken = authToken ?? (resolvedAccountAddress ? getAuthTokenFromRuntimeCache(queryClient, resolvedAccountAddress, resolvedChainId) : null);
|
|
1972
2132
|
if (!resolvedAuthToken) {
|
|
1973
2133
|
throw new Error("auth token is required to cancel a pending close");
|
|
1974
2134
|
}
|
|
@@ -1999,7 +2159,7 @@ function useSymmCloseOrder(options) {
|
|
|
1999
2159
|
return symmCoreClient.orders.close(request.id, {
|
|
2000
2160
|
kind: request.kind,
|
|
2001
2161
|
type: request.type,
|
|
2002
|
-
authToken: request.authToken ?? (resolvedAccountAddress ?
|
|
2162
|
+
authToken: request.authToken ?? (resolvedAccountAddress ? getAuthTokenFromRuntimeCache(queryClient, resolvedAccountAddress, chainId) ?? void 0 : void 0)
|
|
2003
2163
|
});
|
|
2004
2164
|
}
|
|
2005
2165
|
});
|
|
@@ -25129,11 +25289,11 @@ function splitTradeHookArgs(paramsOrOptions, options) {
|
|
|
25129
25289
|
}
|
|
25130
25290
|
function useResolveTradeAuthToken(params = {}) {
|
|
25131
25291
|
const context = useSymmContext();
|
|
25292
|
+
const queryClient = useQueryClient();
|
|
25132
25293
|
const address = params.address ?? context.address;
|
|
25133
25294
|
const chainId = params.chainId ?? context.chainId;
|
|
25134
25295
|
const { refreshAuth } = useSymmAuth({
|
|
25135
25296
|
address,
|
|
25136
|
-
activeAccountAddress: address,
|
|
25137
25297
|
chainId,
|
|
25138
25298
|
walletClient: params.walletClient,
|
|
25139
25299
|
siweDomain: params.siweDomain
|
|
@@ -25152,7 +25312,11 @@ function useResolveTradeAuthToken(params = {}) {
|
|
|
25152
25312
|
if (!resolvedAccountAddress) {
|
|
25153
25313
|
return null;
|
|
25154
25314
|
}
|
|
25155
|
-
const inMemoryToken =
|
|
25315
|
+
const inMemoryToken = getAuthTokenFromRuntimeCache(
|
|
25316
|
+
queryClient,
|
|
25317
|
+
resolvedAccountAddress,
|
|
25318
|
+
chainId
|
|
25319
|
+
);
|
|
25156
25320
|
if (inMemoryToken) {
|
|
25157
25321
|
logTradeAuth("resolve-auth:store-hit", {
|
|
25158
25322
|
accountAddress: resolvedAccountAddress,
|
|
@@ -25173,7 +25337,7 @@ function useResolveTradeAuthToken(params = {}) {
|
|
|
25173
25337
|
});
|
|
25174
25338
|
return refreshAuth(resolvedAccountAddress);
|
|
25175
25339
|
},
|
|
25176
|
-
[address, chainId, refreshAuth, refreshAuthFromContext]
|
|
25340
|
+
[address, chainId, queryClient, refreshAuth, refreshAuthFromContext]
|
|
25177
25341
|
);
|
|
25178
25342
|
}
|
|
25179
25343
|
function useSymmOpenBasketMutation(options) {
|
|
@@ -25912,6 +26076,7 @@ function useSymmPendingInstantOpens(params) {
|
|
|
25912
26076
|
symmCoreClient,
|
|
25913
26077
|
chainId: ctxChainId
|
|
25914
26078
|
} = useSymmContext();
|
|
26079
|
+
const queryClient = useQueryClient();
|
|
25915
26080
|
const { accountAddress, authToken: providedAuthToken } = params;
|
|
25916
26081
|
const chainId = params.chainId ?? ctxChainId;
|
|
25917
26082
|
const internalEnabled = !!symmCoreClient && !!accountAddress;
|
|
@@ -25919,7 +26084,7 @@ function useSymmPendingInstantOpens(params) {
|
|
|
25919
26084
|
...params.query,
|
|
25920
26085
|
queryKey: symmKeys.pendingInstantOpens(accountAddress, chainId),
|
|
25921
26086
|
queryFn: async () => {
|
|
25922
|
-
const authToken = providedAuthToken ??
|
|
26087
|
+
const authToken = providedAuthToken ?? getAuthTokenFromRuntimeCache(queryClient, accountAddress, chainId);
|
|
25923
26088
|
if (!authToken) {
|
|
25924
26089
|
throw new Error("failed to acquire auth token for pending instant opens");
|
|
25925
26090
|
}
|
|
@@ -26800,6 +26965,6 @@ function getSymmErrorMessage(error) {
|
|
|
26800
26965
|
return "An unexpected error occurred.";
|
|
26801
26966
|
}
|
|
26802
26967
|
|
|
26803
|
-
export { SymmProvider, getSymmErrorMessage, symmKeys, useBinanceMarkPriceStore, useSymmAccountData, useSymmAccountSummary, useSymmAccountsApi, useSymmAccountsLength, useSymmAccountsQuery, useSymmAccountsWithPositions, useSymmAllocateCollateralMutation, useSymmApprovalQuery, useSymmApproveMutation, useSymmAuth,
|
|
26968
|
+
export { SymmProvider, getSymmErrorMessage, symmKeys, useBinanceMarkPriceStore, useSymmAccountData, useSymmAccountSummary, useSymmAccountsApi, useSymmAccountsLength, useSymmAccountsQuery, useSymmAccountsWithPositions, useSymmAllocateCollateralMutation, useSymmApprovalQuery, useSymmApproveMutation, useSymmAuth, useSymmAvailableMargin, useSymmBalances, useSymmCancelClose, useSymmCancelOpenMutation, useSymmCancelTpslMutation, useSymmCancelTwapOrderMutation, useSymmChartCandles, useSymmChartSelection, useSymmClearTriggerConfigMutation, useSymmCloseAllPositionsMutation, useSymmCloseOrder, useSymmClosePositionMutation, useSymmContext, useSymmCoreClient, useSymmCreateAccountMutation, useSymmDeallocateCollateralMutation, useSymmDelegateAccessMutation, useSymmDelegation, useSymmDepositAndAllocateMutation, useSymmDepositMutation, useSymmEditAccountNameMutation, useSymmFunding, useSymmFundingHistory, useSymmFundingPayments, useSymmHedgerMarketById, useSymmHedgerMarketBySymbol, useSymmHedgerMarkets, useSymmInstantTradeEnsureReadyMutation, useSymmInstantTradeExecuteMutation, useSymmInternalTransferCollateralMutation, useSymmLockedParams, useSymmMarkReadNotificationMutation, useSymmMarkets, useSymmNotificationsQuery, useSymmOpenBasketMutation, useSymmOpenOrders, useSymmPendingIds, useSymmPendingInstantOpens, useSymmPerformanceOverlays, useSymmPortfolio, useSymmPositions, useSymmProposeRevokeDelegationMutation, useSymmRevokeDelegationMutation, useSymmSetTpslMutation, useSymmSetTriggerConfigMutation, useSymmSignTermsMutation, useSymmSignatureQuery, useSymmTokenMarkPrice, useSymmTokenSelectionMarkets, useSymmTokenSelectionMetadata, useSymmTpslOrders, useSymmTradeHistory, useSymmTriggerConfigQuery, useSymmTriggerOrders, useSymmTwapOrder, useSymmTwapOrdersQuery, useSymmUnreadCountQuery, useSymmUpdatePositionMutation, useSymmWithdraw, useSymmWs, useSymmWsStore };
|
|
26804
26969
|
//# sourceMappingURL=index.mjs.map
|
|
26805
26970
|
//# sourceMappingURL=index.mjs.map
|