diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 60c9d3f8..4928ff5c 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -1,4 +1,4 @@
/docs @codingki
-/example @codingki @grikomsn @joshuanatanielnm
-/packages/graz @codingki @grikomsn
+/example @codingki @joshuanatanielnm
+/packages/graz @codingki
/packages/grazkit-chakra @grikomsn @joshuanatanielnm
diff --git a/README.md b/README.md
index 2038f76a..dcba6a3f 100644
--- a/README.md
+++ b/README.md
@@ -52,11 +52,14 @@ pnpm add @cosmjs/cosmwasm-stargate @cosmjs/launchpad @cosmjs/proto-signing @cosm
## Quick start
-Wrap your React app with `` and use available `graz` hooks anywhere:
+Wrap your React app with `` and ``, and use available `graz` hooks anywhere:
```jsx
+import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { GrazProvider } from "graz";
+const queryClient = new QueryClient();
+
const cosmoshub: ChainInfo = {
chainId: "cosmoshub-4",
chainName: "Cosmos Hub",
@@ -65,11 +68,13 @@ const cosmoshub: ChainInfo = {
function App() {
return (
-
-
-
+
+
+
+
+
);
}
```
diff --git a/docs/docs/index.md b/docs/docs/index.md
index f08591ad..5df34cb3 100644
--- a/docs/docs/index.md
+++ b/docs/docs/index.md
@@ -52,11 +52,14 @@ pnpm add @cosmjs/cosmwasm-stargate @cosmjs/launchpad @cosmjs/proto-signing @cosm
## Quick start
-Wrap your React app with `` and use available `graz` hooks anywhere:
+Wrap your React app with `` and ``, and use available `graz` hooks anywhere:
```tsx
+import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { GrazProvider } from "graz";
+const queryClient = new QueryClient();
+
const cosmoshub: ChainInfo = {
chainId: "cosmoshub-4",
chainName: "Cosmos Hub",
@@ -65,13 +68,15 @@ const cosmoshub: ChainInfo = {
function App() {
return (
-
-
-
+
+
+
+
+
);
}
```
diff --git a/docs/docs/migration-guide.md b/docs/docs/migration-guide.md
index 2849af1c..81ce0677 100644
--- a/docs/docs/migration-guide.md
+++ b/docs/docs/migration-guide.md
@@ -4,6 +4,25 @@ sidebar_position: 3
# Migration Guide
+## 0.2.0 Breaking Changes
+
+We updates the react-query version to 5.62.0 and removes QueryClientProvider initialisation from Graz Provider. As a results, dApps must now wrap Graz provider with QueryClientProvider on their end. Also note that react-query has been added as peer dependency now.
+
+```diff
++ import { QueryClient, QueryClientProvider } from 'react-query';
+ import { GrazProvider } from 'graz';
+
++ const queryClient = new QueryClient();
+
++
+
+ // children
+
++
+```
+
## 0.1.26 Breaking Changes
### WalletConnect
diff --git a/docs/docs/provider/grazProvider.md b/docs/docs/provider/grazProvider.md
index 44e5351e..03f1b9f2 100644
--- a/docs/docs/provider/grazProvider.md
+++ b/docs/docs/provider/grazProvider.md
@@ -1,54 +1,62 @@
# GrazProvider
-Provider component which wraps @tanstack/react-query's `QueryClientProvider` and various graz side effects
+Provider component which configures various graz side effects.
+Graz uses `@tanstack/react-query`'s features under the hood, hence you need to wrap `GrazProvider` with `QueryClientProvider`.
#### Usage
```tsx
+import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { GrazProvider, WalletType } from "graz";
+const queryClient = new QueryClient();
+
const cosmoshub = {
chainId: "cosmoshub-4",
chainName: "Cosmos Hub",
// ... rest of cosmoshub ChainInfo
-}
+};
const sommelier = {
chainId: "sommelier-1",
chainName: "Sommelier",
// ... rest of sommelier ChainInfo
-}
+};
// example next.js application in _app.tsx
export default function CustomApp({ Component, pageProps }: AppProps) {
+ const onNotFound = () => {
+ console.log("not found");
+ };
+
return (
-
+ {
- console.log("not found")
- },
- multiChainFetchConcurrency: 6
- // ...
- }}
- >
-
-
+ defaultWallet: WalletType.LEAP,
+ onNotFound,
+ multiChainFetchConcurrency: 6,
+ // ...
+ }}
+ >
+
+
+
);
}
```
diff --git a/example/next/package.json b/example/next/package.json
index 3a856d24..a09fe5d8 100644
--- a/example/next/package.json
+++ b/example/next/package.json
@@ -13,6 +13,7 @@
"@emotion/react": "11.11.1",
"@emotion/styled": "11.11.0",
"@leapwallet/cosmos-social-login-capsule-provider-ui": "^0.0.58",
+ "@tanstack/react-query": "5.62.0",
"framer-motion": "^10.16.4",
"graz": "workspace:*",
"next": "^13.4.19",
diff --git a/example/next/pages/_app.tsx b/example/next/pages/_app.tsx
index 8c32f322..7d406847 100644
--- a/example/next/pages/_app.tsx
+++ b/example/next/pages/_app.tsx
@@ -1,37 +1,42 @@
import { ChakraProvider, extendTheme } from "@chakra-ui/react";
+import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { GrazProvider } from "graz";
import type { NextPage } from "next";
import type { AppProps } from "next/app";
import { chains } from "utils/graz";
+const queryClient = new QueryClient();
+
const theme = extendTheme();
const CustomApp: NextPage = ({ Component, pageProps }) => {
return (
- {
- console.log("reconnect failed");
- },
- autoReconnect: false,
- walletConnect: {
- options: {
- projectId: process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID,
+
+ {
+ console.log("reconnect failed");
+ },
+ autoReconnect: false,
+ walletConnect: {
+ options: {
+ projectId: process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID,
+ },
+ },
+ capsuleConfig: {
+ apiKey: process.env.NEXT_PUBLIC_CAPSULE_API_KEY,
+ env: process.env.NEXT_PUBLIC_CAPSULE_ENV,
+ },
+ iframeOptions: {
+ allowedIframeParentOrigins: ["https://daodao.zone", "https://dao.daodao.zone", "http://localhost:3000"],
},
- },
- capsuleConfig: {
- apiKey: process.env.NEXT_PUBLIC_CAPSULE_API_KEY,
- env: process.env.NEXT_PUBLIC_CAPSULE_ENV,
- },
- iframeOptions: {
- allowedIframeParentOrigins: ["https://daodao.zone", "https://dao.daodao.zone", "http://localhost:3000"],
- },
- }}
- >
-
-
+ }}
+ >
+
+
+
);
};
diff --git a/example/starter/package.json b/example/starter/package.json
index 527fe620..62fee961 100644
--- a/example/starter/package.json
+++ b/example/starter/package.json
@@ -16,6 +16,7 @@
"@emotion/styled": "11.11.0",
"@graz-sh/types": "^0.0.4",
"@leapwallet/cosmos-social-login-capsule-provider-ui": "^0.0.58",
+ "@tanstack/react-query": "5.62.0",
"bignumber.js": "^9.1.2",
"framer-motion": "^10.16.4",
"graz": "workspace:*",
diff --git a/example/starter/src/pages/_app.tsx b/example/starter/src/pages/_app.tsx
index 30c04588..a7634254 100644
--- a/example/starter/src/pages/_app.tsx
+++ b/example/starter/src/pages/_app.tsx
@@ -1,9 +1,12 @@
import { ChakraProvider, extendTheme } from "@chakra-ui/react";
+import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { GrazProvider } from "graz";
import type { AppProps } from "next/app";
import { Layout } from "src/ui/layout";
import { mainnetChains } from "src/utils/graz";
+const queryClient = new QueryClient();
+
const theme = extendTheme({
semanticTokens: {
colors: {
@@ -21,34 +24,36 @@ const theme = extendTheme({
const MyApp = ({ Component, pageProps }: AppProps) => {
return (
-
+
-
-
-
-
-
-
+ }}
+ >
+
+
+
+
+
+
+
);
};
diff --git a/example/vite/package.json b/example/vite/package.json
index 19541b5d..f2e58cc3 100644
--- a/example/vite/package.json
+++ b/example/vite/package.json
@@ -9,6 +9,7 @@
"preview": "vite preview"
},
"dependencies": {
+ "@tanstack/react-query": "5.62.0",
"graz": "workspace:*",
"react": "^18.2.0",
"react-dom": "^18.2.0"
diff --git a/example/vite/src/main.tsx b/example/vite/src/main.tsx
index 0203087c..15e2758a 100644
--- a/example/vite/src/main.tsx
+++ b/example/vite/src/main.tsx
@@ -1,5 +1,6 @@
import "./index.css";
+import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { GrazProvider } from "graz";
import { cosmoshub } from "graz/chains";
import * as React from "react";
@@ -7,14 +8,23 @@ import * as ReactDOM from "react-dom/client";
import App from "./App";
+const queryClient = new QueryClient();
+
ReactDOM.createRoot(document.getElementById("root")!).render(
-
-
-
+
+
+
+
+
,
);
diff --git a/packages/graz/package.json b/packages/graz/package.json
index a1f786e5..529152b6 100644
--- a/packages/graz/package.json
+++ b/packages/graz/package.json
@@ -1,7 +1,7 @@
{
"name": "graz",
"description": "React hooks for Cosmos",
- "version": "0.1.29",
+ "version": "0.2.0-alpha.1",
"author": "Griko Nibras ",
"repository": "https://github.com/graz-sh/graz.git",
"homepage": "https://github.com/graz-sh/graz",
@@ -49,9 +49,16 @@
"@cosmjs/stargate": "0.32.4",
"@cosmjs/tendermint-rpc": "0.32.4",
"@leapwallet/cosmos-social-login-capsule-provider": "^0.0.41",
+ "@tanstack/react-query": ">=5.62.0",
"react": ">=17"
},
"dependencies": {
+ "@cosmjs/amino": "0.31.3",
+ "@cosmjs/cosmwasm-stargate": "0.31.3",
+ "@cosmjs/launchpad": "0.27.1",
+ "@cosmjs/proto-signing": "0.31.3",
+ "@cosmjs/stargate": "0.31.3",
+ "@cosmjs/tendermint-rpc": "0.31.3",
"@keplr-wallet/types": "0.12.156",
"@cosmsnap/snapper": "0.1.29",
"@dao-dao/cosmiframe": "0.1.0",
diff --git a/packages/graz/src/actions/wallet/wallet-connect/clot.ts b/packages/graz/src/actions/wallet/wallet-connect/clot.ts
index 33db8f63..9b2503de 100644
--- a/packages/graz/src/actions/wallet/wallet-connect/clot.ts
+++ b/packages/graz/src/actions/wallet/wallet-connect/clot.ts
@@ -23,12 +23,16 @@ export const getWCClot = (): Wallet => {
walletType: WalletType.WC_CLOT_MOBILE,
formatNativeUrl: (appUrl, wcUri, os) => {
const plainAppUrl = appUrl.replaceAll("/", "").replaceAll(":", "");
- const encoded = encodeURIComponent(wcUri);
+ const encoded = wcUri && encodeURIComponent(wcUri);
switch (os) {
- case "ios":
+ case "ios": {
+ if (!encoded) return `${plainAppUrl}://wcV2`;
return `${plainAppUrl}://wcV2?${encoded}`;
- default:
+ }
+ default: {
+ if (!encoded) return `${plainAppUrl}://wc`;
return `${plainAppUrl}://wc?uri=${encoded}`;
+ }
}
},
};
diff --git a/packages/graz/src/actions/wallet/wallet-connect/cosmostation.ts b/packages/graz/src/actions/wallet/wallet-connect/cosmostation.ts
index 862b1739..3b545683 100644
--- a/packages/graz/src/actions/wallet/wallet-connect/cosmostation.ts
+++ b/packages/graz/src/actions/wallet/wallet-connect/cosmostation.ts
@@ -23,6 +23,7 @@ export const getWCCosmostation = (): Wallet => {
walletType: WalletType.WC_COSMOSTATION_MOBILE,
formatNativeUrl: (appUrl, wcUri, _os) => {
const plainAppUrl = appUrl.replaceAll("/", "").replaceAll(":", "");
+ if (!wcUri) return `${plainAppUrl}://wc`;
return `${plainAppUrl}://wc?${wcUri}`;
},
};
diff --git a/packages/graz/src/actions/wallet/wallet-connect/index.ts b/packages/graz/src/actions/wallet/wallet-connect/index.ts
index 00d0f802..d2ca90fc 100644
--- a/packages/graz/src/actions/wallet/wallet-connect/index.ts
+++ b/packages/graz/src/actions/wallet/wallet-connect/index.ts
@@ -27,20 +27,12 @@ export const getWalletConnect = (params?: GetWalletConnectParams): Wallet => {
const { appUrl, formatNativeUrl } = params;
if (!isMobile()) return;
if (isAndroid()) {
- if (!wcUri) {
- window.open(appUrl.mobile.android, "_self", "noreferrer noopener");
- } else {
- const href = formatNativeUrl(appUrl.mobile.android, wcUri, "android");
- window.open(href, "_self", "noreferrer noopener");
- }
+ const href = formatNativeUrl(appUrl.mobile.android, wcUri, "android");
+ window.open(href, "_self", "noreferrer noopener");
}
if (isIos()) {
- if (!wcUri) {
- window.open(appUrl.mobile.ios, "_self", "noreferrer noopener");
- } else {
- const href = formatNativeUrl(appUrl.mobile.ios, wcUri, "ios");
- window.open(href, "_self", "noreferrer noopener");
- }
+ const href = formatNativeUrl(appUrl.mobile.ios, wcUri, "ios");
+ window.open(href, "_self", "noreferrer noopener");
}
};
diff --git a/packages/graz/src/actions/wallet/wallet-connect/keplr.ts b/packages/graz/src/actions/wallet/wallet-connect/keplr.ts
index ddb5b975..1eaed4f7 100644
--- a/packages/graz/src/actions/wallet/wallet-connect/keplr.ts
+++ b/packages/graz/src/actions/wallet/wallet-connect/keplr.ts
@@ -23,14 +23,20 @@ export const getWCKeplr = (): Wallet => {
walletType: WalletType.WC_KEPLR_MOBILE,
formatNativeUrl: (appUrl, wcUri, os) => {
const plainAppUrl = appUrl.replaceAll("/", "").replaceAll(":", "");
- const encoded = encodeURIComponent(wcUri);
+ const encoded = wcUri && encodeURIComponent(wcUri);
switch (os) {
- case "ios":
+ case "ios": {
+ if (!encoded) return `${plainAppUrl}://wcV2`;
return `${plainAppUrl}://wcV2?${encoded}`;
- case "android":
+ }
+ case "android": {
+ if (!encoded) return `${plainAppUrl}://wcV2#Intent;package=com.chainapsis.keplr;scheme=keplrwallet;end;`;
return `${plainAppUrl}://wcV2?${encoded}#Intent;package=com.chainapsis.keplr;scheme=keplrwallet;end;`;
- default:
+ }
+ default: {
+ if (!encoded) return `${plainAppUrl}://wc`;
return `${plainAppUrl}://wc?uri=${encoded}`;
+ }
}
},
};
diff --git a/packages/graz/src/actions/wallet/wallet-connect/leap.ts b/packages/graz/src/actions/wallet/wallet-connect/leap.ts
index 1b3d8115..55771480 100644
--- a/packages/graz/src/actions/wallet/wallet-connect/leap.ts
+++ b/packages/graz/src/actions/wallet/wallet-connect/leap.ts
@@ -23,14 +23,20 @@ export const getWCLeap = (): Wallet => {
walletType: WalletType.WC_LEAP_MOBILE,
formatNativeUrl: (appUrl, wcUri, os) => {
const plainAppUrl = appUrl.replaceAll("/", "").replaceAll(":", "");
- const encoded = encodeURIComponent(wcUri);
+ const encoded = wcUri && encodeURIComponent(wcUri);
switch (os) {
- case "ios":
+ case "ios": {
+ if (!encoded) return `${plainAppUrl}://wcV2`;
return `${plainAppUrl}://wcV2?${encoded}`;
- case "android":
+ }
+ case "android": {
+ if (!encoded) return `${plainAppUrl}://wcV2#Intent;package=io.leapwallet.cosmos;scheme=leapwallet;end;`;
return `${plainAppUrl}://wcV2?${encoded}#Intent;package=io.leapwallet.cosmos;scheme=leapwallet;end;`;
- default:
+ }
+ default: {
+ if (!encoded) return `${plainAppUrl}://wc`;
return `${plainAppUrl}://wc?uri=${encoded}`;
+ }
}
},
};
diff --git a/packages/graz/src/actions/wallet/wallet-connect/types.ts b/packages/graz/src/actions/wallet/wallet-connect/types.ts
index 52114687..ae982073 100644
--- a/packages/graz/src/actions/wallet/wallet-connect/types.ts
+++ b/packages/graz/src/actions/wallet/wallet-connect/types.ts
@@ -27,5 +27,5 @@ export interface GetWalletConnectParams {
android: string;
};
};
- formatNativeUrl: (appUrl: string, wcUri: string, os?: "android" | "ios") => string;
+ formatNativeUrl: (appUrl: string, wcUri?: string, os?: "android" | "ios") => string;
}
diff --git a/packages/graz/src/cli.mjs b/packages/graz/src/cli.mjs
index 90ffb228..1ffff49c 100755
--- a/packages/graz/src/cli.mjs
+++ b/packages/graz/src/cli.mjs
@@ -238,7 +238,7 @@ const makeRecord = async (client, { filter = "" } = {}) => {
coinMinimalDenom:
chain.assets?.find((asset) => asset.denom === token.denom)?.denom_units[0]?.denom || token.denom,
coinDecimals: Number(chain.assets?.find((asset) => asset.denom === token.denom)?.decimals),
- coinGeckoId: chain.assets?.find((asset) => asset.denom === token.denom)?.coingecko_id || "",
+ coinGeckoId: chain.assets?.find((asset) => asset.denom === token.denom)?.coingecko_id || undefined,
gasPriceStep: {
low: Number(token.low_gas_price),
average: Number(token.average_gas_price),
@@ -252,7 +252,7 @@ const makeRecord = async (client, { filter = "" } = {}) => {
coinMinimalDenom:
chain.assets?.find((asset) => asset.denom === token.denom)?.denom_units[0]?.denom || token.denom,
coinDecimals: Number(chain.assets?.find((asset) => asset.denom === token.denom)?.decimals),
- coinGeckoId: chain.assets?.find((asset) => asset.denom === token.denom)?.coingecko_id || "",
+ coinGeckoId: chain.assets?.find((asset) => asset.denom === token.denom)?.coingecko_id || undefined,
};
});
diff --git a/packages/graz/src/hooks/account.ts b/packages/graz/src/hooks/account.ts
index f5ab7e25..0caaffb1 100644
--- a/packages/graz/src/hooks/account.ts
+++ b/packages/graz/src/hooks/account.ts
@@ -147,9 +147,9 @@ export const useBalances = (
[address, args?.chainId, chains, clients],
);
- return useQuery(
+ return useQuery({
queryKey,
- async ({ queryKey: [, _clients, _chains, _address] }) => {
+ queryFn: async ({ queryKey: [, _clients, _chains, _address] }) => {
if (!_address) {
throw new Error("address is not defined");
}
@@ -168,18 +168,16 @@ export const useBalances = (
});
return res;
},
- {
- enabled:
- Boolean(address) &&
- Boolean(chains) &&
- chains.length > 0 &&
- !isEmpty(clients) &&
- (args?.enabled === undefined ? true : args.enabled),
- refetchOnMount: false,
- refetchOnReconnect: true,
- refetchOnWindowFocus: false,
- },
- );
+ enabled:
+ Boolean(address) &&
+ Boolean(chains) &&
+ chains.length > 0 &&
+ !isEmpty(clients) &&
+ (args?.enabled === undefined ? true : args.enabled),
+ refetchOnMount: false,
+ refetchOnReconnect: true,
+ refetchOnWindowFocus: false,
+ });
};
/**
@@ -218,19 +216,17 @@ export const useBalance = (
const queryKey = ["USE_BALANCE", args.denom, balances, chains, address, args.chainId] as const;
- const query = useQuery(
+ const query = useQuery({
queryKey,
- ({ queryKey: [, _denom, _balances] }) => {
+ queryFn: ({ queryKey: [, _denom, _balances] }) => {
return _balances?.find((x) => x.denom === _denom);
},
- {
- enabled:
- Boolean(args.denom) &&
- Boolean(balances) &&
- Boolean(balances?.length) &&
- (args.enabled === undefined ? true : args.enabled),
- },
- );
+ enabled:
+ Boolean(args.denom) &&
+ Boolean(balances) &&
+ Boolean(balances?.length) &&
+ (args.enabled === undefined ? true : args.enabled),
+ });
return {
...query,
@@ -278,8 +274,10 @@ export type UseConnectChainArgs = MutationEventArgs;
* @see {@link connect}
*/
export const useConnect = ({ onError, onLoading, onSuccess }: UseConnectChainArgs = {}) => {
- const queryKey = ["USE_CONNECT", onError, onLoading, onSuccess];
- const mutation = useMutation(queryKey, connect, {
+ const mutationKey = ["USE_CONNECT", onError, onLoading, onSuccess];
+ const mutation = useMutation({
+ mutationKey,
+ mutationFn: connect,
onError: (err, args) => onError?.(err, args),
onMutate: onLoading,
onSuccess: (connectResult) => Promise.resolve(onSuccess?.(connectResult)),
@@ -289,7 +287,7 @@ export const useConnect = ({ onError, onLoading, onSuccess }: UseConnectChainArg
connect: (args?: ConnectArgs) => mutation.mutate(args),
connectAsync: (args?: ConnectArgs) => mutation.mutateAsync(args),
error: mutation.error,
- isLoading: mutation.isLoading,
+ isLoading: mutation.isPending,
isSuccess: mutation.isSuccess,
isSupported: Boolean(isSupported),
status: mutation.status,
@@ -321,8 +319,10 @@ export const useConnect = ({ onError, onLoading, onSuccess }: UseConnectChainArg
* @see {@link disconnect}
*/
export const useDisconnect = ({ onError, onLoading, onSuccess }: MutationEventArgs = {}) => {
- const queryKey = ["USE_DISCONNECT", onError, onLoading, onSuccess];
- const mutation = useMutation(queryKey, disconnect, {
+ const mutationKey = ["USE_DISCONNECT", onError, onLoading, onSuccess];
+ const mutation = useMutation({
+ mutationKey,
+ mutationFn: disconnect,
onError: (err) => Promise.resolve(onError?.(err, undefined)),
onMutate: onLoading,
onSuccess: () => Promise.resolve(onSuccess?.(undefined)),
@@ -332,7 +332,7 @@ export const useDisconnect = ({ onError, onLoading, onSuccess }: MutationEventAr
disconnect: (args?: { chainId?: ChainId }) => mutation.mutate(args),
disconnectAsync: (args?: { chainId?: ChainId }) => mutation.mutateAsync(args),
error: mutation.error,
- isLoading: mutation.isLoading,
+ isLoading: mutation.isPending,
isSuccess: mutation.isSuccess,
status: mutation.status,
};
@@ -418,9 +418,9 @@ export const useBalanceStaked = (
const queryKey = useMemo(() => ["USE_BALANCE_STAKED", client, chains, address] as const, [chains, address, client]);
- return useQuery(
+ return useQuery({
queryKey,
- async ({ queryKey: [, _client, _chains, _address] }) => {
+ queryFn: async ({ queryKey: [, _client, _chains, _address] }) => {
if (!_address) {
throw new Error("address is not defined");
}
@@ -434,11 +434,9 @@ export const useBalanceStaked = (
});
return res;
},
- {
- enabled: Boolean(address) && Boolean(chains) && chains.length > 0 && Boolean(client),
- refetchOnMount: false,
- refetchOnReconnect: true,
- refetchOnWindowFocus: false,
- },
- );
+ enabled: Boolean(address) && Boolean(chains) && chains.length > 0 && Boolean(client),
+ refetchOnMount: false,
+ refetchOnReconnect: true,
+ refetchOnWindowFocus: false,
+ });
};
diff --git a/packages/graz/src/hooks/chains.ts b/packages/graz/src/hooks/chains.ts
index 95af852d..dc3d770c 100644
--- a/packages/graz/src/hooks/chains.ts
+++ b/packages/graz/src/hooks/chains.ts
@@ -89,11 +89,11 @@ export const useChainInfos = ({ chainId }: { chainId?: string[] }) => {
export const useActiveChainCurrency = ({ denom }: { denom: string }): UseQueryResult => {
const chains = useActiveChains();
const queryKey = ["USE_ACTIVE_CHAIN_CURRENCY", denom] as const;
- const query = useQuery(
+ const query = useQuery({
queryKey,
- ({ queryKey: [, _denom] }) =>
+ queryFn: ({ queryKey: [, _denom] }) =>
chains?.find((c) => c.currencies.find((x) => x.coinMinimalDenom === _denom))?.currencies.find((x) => x),
- );
+ });
return query;
};
@@ -118,17 +118,15 @@ export const useQueryClientValidators = => {
const status = args.status ?? "BOND_STATUS_BONDED";
const queryKey = ["USE_ACTIVE_CHAIN_VALIDATORS", args.queryClient, status] as const;
- const query = useQuery(
+ const query = useQuery({
queryKey,
- async ({ queryKey: [, _queryClient, _status] }) => {
+ queryFn: async ({ queryKey: [, _queryClient, _status] }) => {
if (!_queryClient) throw new Error("Query client is not defined");
const res = await _queryClient.staking.validators(_status);
return res;
},
- {
- enabled: typeof args.queryClient !== "undefined",
- },
- );
+ enabled: typeof args.queryClient !== "undefined",
+ });
return query;
};
@@ -196,8 +194,10 @@ export type UseSuggestChainArgs = MutationEventArgs;
* ```
*/
export const useSuggestChain = ({ onError, onLoading, onSuccess }: UseSuggestChainArgs = {}) => {
- const queryKey = ["USE_SUGGEST_CHAIN", onError, onLoading, onSuccess];
- const mutation = useMutation(queryKey, suggestChain, {
+ const mutationKey = ["USE_SUGGEST_CHAIN", onError, onLoading, onSuccess];
+ const mutation = useMutation({
+ mutationKey,
+ mutationFn: suggestChain,
onError: (err, args) => Promise.resolve(onError?.(err, args.chainInfo)),
onMutate: (data) => onLoading?.(data.chainInfo),
onSuccess: (chainInfo) => Promise.resolve(onSuccess?.(chainInfo)),
@@ -205,7 +205,7 @@ export const useSuggestChain = ({ onError, onLoading, onSuccess }: UseSuggestCha
return {
error: mutation.error,
- isLoading: mutation.isLoading,
+ isLoading: mutation.isPending,
isSuccess: mutation.isSuccess,
suggest: mutation.mutate,
suggestAsync: mutation.mutateAsync,
@@ -246,8 +246,10 @@ export type UseSuggestChainAndConnectArgs = MutationEventArgs {
- const queryKey = ["USE_SUGGEST_CHAIN_AND_CONNECT", onError, onLoading, onSuccess];
- const mutation = useMutation(queryKey, suggestChainAndConnect, {
+ const mutationKey = ["USE_SUGGEST_CHAIN_AND_CONNECT", onError, onLoading, onSuccess];
+ const mutation = useMutation({
+ mutationKey,
+ mutationFn: suggestChainAndConnect,
onError: (err, args) => Promise.resolve(onError?.(err, args)),
onMutate: (args) => onLoading?.(args),
onSuccess: (res) => Promise.resolve(onSuccess?.(res)),
@@ -255,7 +257,7 @@ export const useSuggestChainAndConnect = ({ onError, onLoading, onSuccess }: Use
const { data: isSupported } = useCheckWallet();
return {
error: mutation.error,
- isLoading: mutation.isLoading,
+ isLoading: mutation.isPending,
isSuccess: mutation.isSuccess,
isSupported: Boolean(isSupported),
status: mutation.status,
diff --git a/packages/graz/src/hooks/methods.ts b/packages/graz/src/hooks/methods.ts
index 526e2179..732f35c4 100644
--- a/packages/graz/src/hooks/methods.ts
+++ b/packages/graz/src/hooks/methods.ts
@@ -52,19 +52,17 @@ export const useSendTokens = ({
const { data: account } = useAccount();
const accountAddress = account?.bech32Address;
- const mutation = useMutation(
- ["USE_SEND_TOKENS", onError, onLoading, onSuccess, accountAddress],
- (args: SendTokensArgs) => sendTokens({ senderAddress: accountAddress, ...args }),
- {
- onError: (err, data) => Promise.resolve(onError?.(err, data)),
- onMutate: onLoading,
- onSuccess: (txResponse) => Promise.resolve(onSuccess?.(txResponse)),
- },
- );
+ const mutation = useMutation({
+ mutationKey: ["USE_SEND_TOKENS", onError, onLoading, onSuccess, accountAddress],
+ mutationFn: (args: SendTokensArgs) => sendTokens({ senderAddress: accountAddress, ...args }),
+ onError: (err, data) => Promise.resolve(onError?.(err, data)),
+ onMutate: onLoading,
+ onSuccess: (txResponse) => Promise.resolve(onSuccess?.(txResponse)),
+ });
return {
error: mutation.error,
- isLoading: mutation.isLoading,
+ isLoading: mutation.isPending,
isSuccess: mutation.isSuccess,
sendTokens: mutation.mutate,
sendTokensAsync: mutation.mutateAsync,
@@ -99,19 +97,17 @@ export const useSendIbcTokens = ({
const { data: account } = useAccount();
const accountAddress = account?.bech32Address;
- const mutation = useMutation(
- ["USE_SEND_IBC_TOKENS", onError, onLoading, onSuccess, accountAddress],
- (args: SendIbcTokensArgs) => sendIbcTokens({ senderAddress: accountAddress, ...args }),
- {
- onError: (err, data) => Promise.resolve(onError?.(err, data)),
- onMutate: onLoading,
- onSuccess: (txResponse) => Promise.resolve(onSuccess?.(txResponse)),
- },
- );
+ const mutation = useMutation({
+ mutationKey: ["USE_SEND_IBC_TOKENS", onError, onLoading, onSuccess, accountAddress],
+ mutationFn: (args: SendIbcTokensArgs) => sendIbcTokens({ senderAddress: accountAddress, ...args }),
+ onError: (err, data) => Promise.resolve(onError?.(err, data)),
+ onMutate: onLoading,
+ onSuccess: (txResponse) => Promise.resolve(onSuccess?.(txResponse)),
+ });
return {
error: mutation.error,
- isLoading: mutation.isLoading,
+ isLoading: mutation.isPending,
isSuccess: mutation.isSuccess,
sendIbcTokens: mutation.mutate,
sendIbcTokensAsync: mutation.mutateAsync,
@@ -165,19 +161,17 @@ export const useInstantiateContract = >(
return instantiateContract(contractArgs);
};
- const mutation = useMutation(
- ["USE_INSTANTIATE_CONTRACT", onError, onLoading, onSuccess, codeId, accountAddress],
+ const mutation = useMutation({
+ mutationKey: ["USE_INSTANTIATE_CONTRACT", onError, onLoading, onSuccess, codeId, accountAddress],
mutationFn,
- {
- onError: (err, data) => Promise.resolve(onError?.(err, data)),
- onMutate: onLoading,
- onSuccess: (instantiateResult) => Promise.resolve(onSuccess?.(instantiateResult)),
- },
- );
+ onError: (err, data) => Promise.resolve(onError?.(err, data)),
+ onMutate: onLoading,
+ onSuccess: (instantiateResult) => Promise.resolve(onSuccess?.(instantiateResult)),
+ });
return {
error: mutation.error,
- isLoading: mutation.isLoading,
+ isLoading: mutation.isPending,
isSuccess: mutation.isSuccess,
instantiateContract: mutation.mutate,
instantiateContractAsync: mutation.mutateAsync,
@@ -242,19 +236,17 @@ export const useExecuteContract = >({
return executeContract(executeArgs);
};
- const mutation = useMutation(
- ["USE_EXECUTE_CONTRACT", onError, onLoading, onSuccess, contractAddress, accountAddress],
+ const mutation = useMutation({
+ mutationKey: ["USE_EXECUTE_CONTRACT", onError, onLoading, onSuccess, contractAddress, accountAddress],
mutationFn,
- {
- onError: (err, data) => Promise.resolve(onError?.(err, data)),
- onMutate: onLoading,
- onSuccess: (executeResult) => Promise.resolve(onSuccess?.(executeResult)),
- },
- );
+ onError: (err, data) => Promise.resolve(onError?.(err, data)),
+ onMutate: onLoading,
+ onSuccess: (executeResult) => Promise.resolve(onSuccess?.(executeResult)),
+ });
return {
error: mutation.error,
- isLoading: mutation.isLoading,
+ isLoading: mutation.isPending,
isSuccess: mutation.isSuccess,
executeContract: mutation.mutate,
executeContractAsync: mutation.mutateAsync,
@@ -275,16 +267,14 @@ export const useQuerySmart = (args?: {
queryMsg?: Record;
}): UseQueryResult => {
const { data: client } = useCosmWasmClient();
- const query: UseQueryResult = useQuery(
- ["USE_QUERY_SMART", args?.address, args?.queryMsg, client],
- ({ queryKey: [, _address] }) => {
+ const query: UseQueryResult = useQuery({
+ queryKey: ["USE_QUERY_SMART", args?.address, args?.queryMsg, client],
+ queryFn: ({ queryKey: [, _address] }) => {
if (!args?.address || !args.queryMsg) throw new Error("address or queryMsg undefined");
return getQuerySmart(args.address, args.queryMsg, client);
},
- {
- enabled: Boolean(args?.address) && Boolean(args?.queryMsg) && Boolean(client),
- },
- );
+ enabled: Boolean(args?.address) && Boolean(args?.queryMsg) && Boolean(client),
+ });
return query;
};
@@ -302,16 +292,14 @@ export const useQueryRaw = (args?: {
}): UseQueryResult => {
const { data: client } = useCosmWasmClient();
const queryKey = ["USE_QUERY_RAW", args?.key, args?.address, client] as const;
- const query: UseQueryResult = useQuery(
+ const query: UseQueryResult = useQuery({
queryKey,
- ({ queryKey: [, _address] }) => {
+ queryFn: ({ queryKey: [, _address] }) => {
if (!args?.address || !args.key) throw new Error("address or key undefined");
return getQueryRaw(args.address, args.key, client);
},
- {
- enabled: Boolean(args?.address) && Boolean(args?.key) && Boolean(client),
- },
- );
+ enabled: Boolean(args?.address) && Boolean(args?.key) && Boolean(client),
+ });
return query;
};
diff --git a/packages/graz/src/hooks/wallet.ts b/packages/graz/src/hooks/wallet.ts
index 1ee43ae4..be82143b 100644
--- a/packages/graz/src/hooks/wallet.ts
+++ b/packages/graz/src/hooks/wallet.ts
@@ -51,7 +51,10 @@ export const useCheckWallet = (type?: WalletType): UseQueryResult => {
const walletType = useGrazInternalStore((x) => type || x.walletType);
const queryKey = ["USE_CHECK_WALLET", walletType] as const;
- const query = useQuery(queryKey, ({ queryKey: [, _type] }) => checkWallet(_type));
+ const query = useQuery({
+ queryKey,
+ queryFn: ({ queryKey: [, _type] }) => checkWallet(_type),
+ });
return query;
};
diff --git a/packages/graz/src/provider/index.tsx b/packages/graz/src/provider/index.tsx
index 6e9eb003..3067216d 100644
--- a/packages/graz/src/provider/index.tsx
+++ b/packages/graz/src/provider/index.tsx
@@ -1,49 +1,43 @@
-import type { QueryClientProviderProps } from "@tanstack/react-query";
-import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
-import { type FC, useEffect } from "react";
+import { type FC, type ReactNode, useEffect } from "react";
import type { ConfigureGrazArgs } from "../actions/configure";
import { configureGraz } from "../actions/configure";
import { ClientOnly } from "./client-only";
import { GrazEvents } from "./events";
-const queryClient = new QueryClient({
- //
-});
-
-export type GrazProviderProps = Partial & {
+export interface GrazProviderProps {
grazOptions: ConfigureGrazArgs;
-};
+ children: ReactNode;
+}
/**
- * Provider component which extends `@tanstack/react-query`'s {@link QueryClientProvider} with built-in query client
- * and various `graz` side effects
- *
+ * Provider component configures various `graz` side effects.
+ * Graz uses `@tanstack/react-query`'s features under the hood, hence you need to wrap `GrazProvider` with `QueryClientProvider`.
* @example
* ```tsx
* // example next.js application in _app.tsx
* export default function CustomApp({ Component, pageProps }: AppProps) {
* return (
- *
- *
- *
+ *
+ *
+ *
+ *
+ *
* );
* }
* ```
*
* @see https://tanstack.com/query
*/
-export const GrazProvider: FC = ({ children, grazOptions, ...props }) => {
+export const GrazProvider: FC = ({ children, grazOptions }) => {
useEffect(() => {
configureGraz(grazOptions);
}, [grazOptions]);
return (
-
-
- {children}
-
-
-
+
+ {children}
+
+
);
};
diff --git a/packages/graz/src/types/wallet.ts b/packages/graz/src/types/wallet.ts
index 440d9444..290a3f8f 100644
--- a/packages/graz/src/types/wallet.ts
+++ b/packages/graz/src/types/wallet.ts
@@ -78,6 +78,8 @@ export type Wallet = Pick Promise;
+ signEthereum?: Keplr["signEthereum"];
+ experimentalSignEIP712CosmosTx_v0?: Keplr["experimentalSignEIP712CosmosTx_v0"];
};
export type SignDirectParams = Parameters;
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 60725115..393d9f8f 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -78,6 +78,9 @@ importers:
'@leapwallet/cosmos-social-login-capsule-provider-ui':
specifier: ^0.0.58
version: 0.0.58(@cosmjs/proto-signing@0.31.3)(@types/react-dom@18.2.7)(@types/react@18.2.21)(csstype@3.1.3)(protobufjs@7.2.6)(react-dom@18.2.0)(tailwindcss@3.4.14)(zod@3.20.6)
+ '@tanstack/react-query':
+ specifier: 5.62.0
+ version: 5.62.0(react@18.2.0)
framer-motion:
specifier: ^10.16.4
version: 10.16.4(react-dom@18.2.0)(react@18.2.0)
@@ -130,6 +133,9 @@ importers:
'@leapwallet/cosmos-social-login-capsule-provider-ui':
specifier: ^0.0.58
version: 0.0.58(@cosmjs/proto-signing@0.31.3)(@types/react-dom@18.2.7)(@types/react@18.2.21)(csstype@3.1.3)(protobufjs@7.2.6)(react-dom@18.2.0)(tailwindcss@3.4.14)(zod@3.20.6)
+ '@tanstack/react-query':
+ specifier: 5.62.0
+ version: 5.62.0(react@18.2.0)
bignumber.js:
specifier: ^9.1.2
version: 9.1.2
@@ -173,6 +179,9 @@ importers:
example/vite:
dependencies:
+ '@tanstack/react-query':
+ specifier: 5.62.0
+ version: 5.62.0(react@18.2.0)
graz:
specifier: workspace:*
version: link:../../packages/graz
@@ -214,29 +223,29 @@ importers:
packages/graz:
dependencies:
'@cosmjs/amino':
- specifier: 0.32.4
- version: 0.32.4
+ specifier: 0.31.3
+ version: 0.31.3
'@cosmjs/cosmwasm-stargate':
- specifier: 0.32.4
- version: 0.32.4
+ specifier: 0.31.3
+ version: 0.31.3
'@cosmjs/launchpad':
- specifier: '*'
- version: 0.24.1
+ specifier: 0.27.1
+ version: 0.27.1
'@cosmjs/proto-signing':
- specifier: 0.32.4
- version: 0.32.4
+ specifier: 0.31.3
+ version: 0.31.3
'@cosmjs/stargate':
- specifier: 0.32.4
- version: 0.32.4
+ specifier: 0.31.3
+ version: 0.31.3
'@cosmjs/tendermint-rpc':
- specifier: 0.32.4
- version: 0.32.4
+ specifier: 0.31.3
+ version: 0.31.3
'@cosmsnap/snapper':
specifier: 0.1.29
version: 0.1.29
'@dao-dao/cosmiframe':
specifier: 0.1.0
- version: 0.1.0(@cosmjs/amino@0.32.4)(@cosmjs/proto-signing@0.32.4)
+ version: 0.1.0(@cosmjs/amino@0.31.3)(@cosmjs/proto-signing@0.31.3)
'@keplr-wallet/cosmos':
specifier: 0.12.156
version: 0.12.156(starknet@6.11.0)
@@ -245,7 +254,7 @@ importers:
version: 0.12.156(starknet@6.11.0)
'@leapwallet/cosmos-social-login-capsule-provider':
specifier: ^0.0.41
- version: 0.0.41(@cosmjs/encoding@0.32.4)(@cosmjs/proto-signing@0.32.4)(fp-ts@2.16.9)
+ version: 0.0.41(@cosmjs/encoding@0.32.4)(@cosmjs/proto-signing@0.31.3)(fp-ts@2.16.9)
'@metamask/providers':
specifier: 12.0.0
version: 12.0.0
@@ -254,7 +263,7 @@ importers:
version: 4.35.0(react@18.2.0)
'@terra-money/station-connector':
specifier: 1.1.4
- version: 1.1.4(@cosmjs/amino@0.32.4)(axios@0.27.2)
+ version: 1.1.4(@cosmjs/amino@0.31.3)(axios@0.27.2)
'@vectis/extension-client':
specifier: ^0.7.2
version: 0.7.2
@@ -3163,6 +3172,15 @@ packages:
protobufjs: 6.11.4
dev: false
+ /@cosmjs/amino@0.27.1:
+ resolution: {integrity: sha512-w56ar/nK9+qlvWDpBPRmD0Blk2wfkkLqRi1COs1x7Ll1LF0AtkIBUjbRKplENLbNovK0T3h+w8bHiFm+GBGQOA==}
+ dependencies:
+ '@cosmjs/crypto': 0.27.1
+ '@cosmjs/encoding': 0.27.1
+ '@cosmjs/math': 0.27.1
+ '@cosmjs/utils': 0.27.1
+ dev: false
+
/@cosmjs/amino@0.31.3:
resolution: {integrity: sha512-36emtUq895sPRX8PTSOnG+lhJDCVyIcE0Tr5ct59sUbgQiI14y43vj/4WAlJ/utSOxy+Zhj9wxcs4AZfu0BHsw==}
dependencies:
@@ -3172,27 +3190,19 @@ packages:
'@cosmjs/utils': 0.31.3
dev: false
- /@cosmjs/amino@0.32.4:
- resolution: {integrity: sha512-zKYOt6hPy8obIFtLie/xtygCkH9ZROiQ12UHfKsOkWaZfPQUvVbtgmu6R4Kn1tFLI/SRkw7eqhaogmW/3NYu/Q==}
- dependencies:
- '@cosmjs/crypto': 0.32.4
- '@cosmjs/encoding': 0.32.4
- '@cosmjs/math': 0.32.4
- '@cosmjs/utils': 0.32.4
- dev: false
-
- /@cosmjs/cosmwasm-stargate@0.32.4:
- resolution: {integrity: sha512-Fuo9BGEiB+POJ5WeRyBGuhyKR1ordvxZGLPuPosFJOH9U0gKMgcjwKMCgAlWFkMlHaTB+tNdA8AifWiHrI7VgA==}
+ /@cosmjs/cosmwasm-stargate@0.31.3:
+ resolution: {integrity: sha512-Uv9TmCn3650gdFeZm7SEfUZF3uX3lfJfFhXOk6I2ZLr/FrKximnlb+vwAfZaZnWYvlA7qrKtHIjeRNHvT23zcw==}
dependencies:
- '@cosmjs/amino': 0.32.4
- '@cosmjs/crypto': 0.32.4
- '@cosmjs/encoding': 0.32.4
- '@cosmjs/math': 0.32.4
- '@cosmjs/proto-signing': 0.32.4
- '@cosmjs/stargate': 0.32.4
- '@cosmjs/tendermint-rpc': 0.32.4
- '@cosmjs/utils': 0.32.4
- cosmjs-types: 0.9.0
+ '@cosmjs/amino': 0.31.3
+ '@cosmjs/crypto': 0.31.3
+ '@cosmjs/encoding': 0.31.3
+ '@cosmjs/math': 0.31.3
+ '@cosmjs/proto-signing': 0.31.3
+ '@cosmjs/stargate': 0.31.3
+ '@cosmjs/tendermint-rpc': 0.31.3
+ '@cosmjs/utils': 0.31.3
+ cosmjs-types: 0.8.0
+ long: 4.0.0
pako: 2.1.0
transitivePeerDependencies:
- bufferutil
@@ -3200,21 +3210,19 @@ packages:
- utf-8-validate
dev: false
- /@cosmjs/crypto@0.24.1:
- resolution: {integrity: sha512-GPhaWmQO06mXldKj/b+oKF5o3jMNfRKpAw+Q8XQhrD7ItinVPDMu8Xgl6frUXWTUdgpYwqpvqOcpm85QUsYV0Q==}
+ /@cosmjs/crypto@0.27.1:
+ resolution: {integrity: sha512-vbcxwSt99tIYJg8Spp00wc3zx72qx+pY3ozGuBN8gAvySnagK9dQ/jHwtWQWdammmdD6oW+75WfIHZ+gNa+Ybg==}
dependencies:
- '@cosmjs/encoding': 0.24.1
- '@cosmjs/math': 0.24.1
- '@cosmjs/utils': 0.24.1
+ '@cosmjs/encoding': 0.27.1
+ '@cosmjs/math': 0.27.1
+ '@cosmjs/utils': 0.27.1
bip39: 3.1.0
- bn.js: 4.12.0
+ bn.js: 5.2.1
elliptic: 6.6.0
js-sha3: 0.8.0
libsodium-wrappers: 0.7.15
- pbkdf2: 3.1.2
ripemd160: 2.0.2
sha.js: 2.4.11
- unorm: 1.6.0
dev: false
/@cosmjs/crypto@0.31.3:
@@ -3229,20 +3237,8 @@ packages:
libsodium-wrappers-sumo: 0.7.15
dev: false
- /@cosmjs/crypto@0.32.4:
- resolution: {integrity: sha512-zicjGU051LF1V9v7bp8p7ovq+VyC91xlaHdsFOTo2oVry3KQikp8L/81RkXmUIT8FxMwdx1T7DmFwVQikcSDIw==}
- dependencies:
- '@cosmjs/encoding': 0.32.4
- '@cosmjs/math': 0.32.4
- '@cosmjs/utils': 0.32.4
- '@noble/hashes': 1.5.0
- bn.js: 5.2.1
- elliptic: 6.6.0
- libsodium-wrappers-sumo: 0.7.15
- dev: false
-
- /@cosmjs/encoding@0.24.1:
- resolution: {integrity: sha512-PMr+gaXAuM0XgjeXwB1zdX1QI0t+PgVhbmjgI/RSgswDzdExNH97qUopecL0/HG3p64vhIT/6ZjXYYTljZL7WA==}
+ /@cosmjs/encoding@0.27.1:
+ resolution: {integrity: sha512-rayLsA0ojHeniaRfWWcqSsrE/T1rl1gl0OXVNtXlPwLJifKBeLEefGbOUiAQaT0wgJ8VNGBazVtAZBpJidfDhw==}
dependencies:
base64-js: 1.5.1
bech32: 1.1.4
@@ -3265,30 +3261,31 @@ packages:
readonly-date: 1.0.0
dev: false
- /@cosmjs/json-rpc@0.32.4:
- resolution: {integrity: sha512-/jt4mBl7nYzfJ2J/VJ+r19c92mUKF0Lt0JxM3MXEJl7wlwW5haHAWtzRujHkyYMXOwIR+gBqT2S0vntXVBRyhQ==}
+ /@cosmjs/json-rpc@0.31.3:
+ resolution: {integrity: sha512-7LVYerXjnm69qqYR3uA6LGCrBW2EO5/F7lfJxAmY+iII2C7xO3a0vAjMSt5zBBh29PXrJVS6c2qRP22W1Le2Wg==}
dependencies:
- '@cosmjs/stream': 0.32.4
+ '@cosmjs/stream': 0.31.3
xstream: 11.14.0
dev: false
- /@cosmjs/launchpad@0.24.1:
- resolution: {integrity: sha512-syqVGKRH6z1vw4DdAJOSu4OgUXJdkXQozqvDde0cXYwnvhb7EXGSg5CTtp+2GqTBJuNVfMZ2DSvrC2Ig8cWBQQ==}
+ /@cosmjs/launchpad@0.27.1:
+ resolution: {integrity: sha512-DcFwGD/z5PK8CzO2sojDxa+Be9EIEtRZb2YawgVnw2Ht/p5FlNv+OVo8qlishpBdalXEN7FvQ1dVeDFEe9TuJw==}
dependencies:
- '@cosmjs/crypto': 0.24.1
- '@cosmjs/encoding': 0.24.1
- '@cosmjs/math': 0.24.1
- '@cosmjs/utils': 0.24.1
+ '@cosmjs/amino': 0.27.1
+ '@cosmjs/crypto': 0.27.1
+ '@cosmjs/encoding': 0.27.1
+ '@cosmjs/math': 0.27.1
+ '@cosmjs/utils': 0.27.1
axios: 0.21.4
fast-deep-equal: 3.1.3
transitivePeerDependencies:
- debug
dev: false
- /@cosmjs/math@0.24.1:
- resolution: {integrity: sha512-eBQk8twgzmpHFCVkoNjTZhsZwWRbR+JXt0FhjXJoD85SBm4K8b2OnOyTg68uPHVKOJjLRwzyRVYgMrg5TBVgwQ==}
+ /@cosmjs/math@0.27.1:
+ resolution: {integrity: sha512-cHWVjmfIjtRc7f80n7x+J5k8pe+vTVTQ0lA82tIxUgqUvgS6rogPP/TmGtTiZ4+NxWxd11DUISY6gVpr18/VNQ==}
dependencies:
- bn.js: 4.12.0
+ bn.js: 5.2.1
dev: false
/@cosmjs/math@0.31.3:
@@ -3297,12 +3294,6 @@ packages:
bn.js: 5.2.1
dev: false
- /@cosmjs/math@0.32.4:
- resolution: {integrity: sha512-++dqq2TJkoB8zsPVYCvrt88oJWsy1vMOuSOKcdlnXuOA/ASheTJuYy4+oZlTQ3Fr8eALDLGGPhJI02W2HyAQaw==}
- dependencies:
- bn.js: 5.2.1
- dev: false
-
/@cosmjs/proto-signing@0.31.3:
resolution: {integrity: sha512-24+10/cGl6lLS4VCrGTCJeDRPQTn1K5JfknzXzDIHOx8THR31JxA7/HV5eWGHqWgAbudA7ccdSvEK08lEHHtLA==}
dependencies:
@@ -3315,21 +3306,10 @@ packages:
long: 4.0.0
dev: false
- /@cosmjs/proto-signing@0.32.4:
- resolution: {integrity: sha512-QdyQDbezvdRI4xxSlyM1rSVBO2st5sqtbEIl3IX03uJ7YiZIQHyv6vaHVf1V4mapusCqguiHJzm4N4gsFdLBbQ==}
+ /@cosmjs/socket@0.31.3:
+ resolution: {integrity: sha512-aqrDGGi7os/hsz5p++avI4L0ZushJ+ItnzbqA7C6hamFSCJwgOkXaOUs+K9hXZdX4rhY7rXO4PH9IH8q09JkTw==}
dependencies:
- '@cosmjs/amino': 0.32.4
- '@cosmjs/crypto': 0.32.4
- '@cosmjs/encoding': 0.32.4
- '@cosmjs/math': 0.32.4
- '@cosmjs/utils': 0.32.4
- cosmjs-types: 0.9.0
- dev: false
-
- /@cosmjs/socket@0.32.4:
- resolution: {integrity: sha512-davcyYziBhkzfXQTu1l5NrpDYv0K9GekZCC9apBRvL1dvMc9F/ygM7iemHjUA+z8tJkxKxrt/YPjJ6XNHzLrkw==}
- dependencies:
- '@cosmjs/stream': 0.32.4
+ '@cosmjs/stream': 0.31.3
isomorphic-ws: 4.0.1(ws@7.5.10)
ws: 7.5.10
xstream: 11.14.0
@@ -3338,18 +3318,20 @@ packages:
- utf-8-validate
dev: false
- /@cosmjs/stargate@0.32.4:
- resolution: {integrity: sha512-usj08LxBSsPRq9sbpCeVdyLx2guEcOHfJS9mHGCLCXpdAPEIEQEtWLDpEUc0LEhWOx6+k/ChXTc5NpFkdrtGUQ==}
+ /@cosmjs/stargate@0.31.3:
+ resolution: {integrity: sha512-53NxnzmB9FfXpG4KjOUAYAvWLYKdEmZKsutcat/u2BrDXNZ7BN8jim/ENcpwXfs9/Og0K24lEIdvA4gsq3JDQw==}
dependencies:
'@confio/ics23': 0.6.8
- '@cosmjs/amino': 0.32.4
- '@cosmjs/encoding': 0.32.4
- '@cosmjs/math': 0.32.4
- '@cosmjs/proto-signing': 0.32.4
- '@cosmjs/stream': 0.32.4
- '@cosmjs/tendermint-rpc': 0.32.4
- '@cosmjs/utils': 0.32.4
- cosmjs-types: 0.9.0
+ '@cosmjs/amino': 0.31.3
+ '@cosmjs/encoding': 0.31.3
+ '@cosmjs/math': 0.31.3
+ '@cosmjs/proto-signing': 0.31.3
+ '@cosmjs/stream': 0.31.3
+ '@cosmjs/tendermint-rpc': 0.31.3
+ '@cosmjs/utils': 0.31.3
+ cosmjs-types: 0.8.0
+ long: 4.0.0
+ protobufjs: 6.11.4
xstream: 11.14.0
transitivePeerDependencies:
- bufferutil
@@ -3357,23 +3339,23 @@ packages:
- utf-8-validate
dev: false
- /@cosmjs/stream@0.32.4:
- resolution: {integrity: sha512-Gih++NYHEiP+oyD4jNEUxU9antoC0pFSg+33Hpp0JlHwH0wXhtD3OOKnzSfDB7OIoEbrzLJUpEjOgpCp5Z+W3A==}
+ /@cosmjs/stream@0.31.3:
+ resolution: {integrity: sha512-8keYyI7X0RjsLyVcZuBeNjSv5FA4IHwbFKx7H60NHFXszN8/MvXL6aZbNIvxtcIHHsW7K9QSQos26eoEWlAd+w==}
dependencies:
xstream: 11.14.0
dev: false
- /@cosmjs/tendermint-rpc@0.32.4:
- resolution: {integrity: sha512-MWvUUno+4bCb/LmlMIErLypXxy7ckUuzEmpufYYYd9wgbdCXaTaO08SZzyFM5PI8UJ/0S2AmUrgWhldlbxO8mw==}
+ /@cosmjs/tendermint-rpc@0.31.3:
+ resolution: {integrity: sha512-s3TiWkPCW4QceTQjpYqn4xttUJH36mTPqplMl+qyocdqk5+X5mergzExU/pHZRWQ4pbby8bnR7kMvG4OC1aZ8g==}
dependencies:
- '@cosmjs/crypto': 0.32.4
- '@cosmjs/encoding': 0.32.4
- '@cosmjs/json-rpc': 0.32.4
- '@cosmjs/math': 0.32.4
- '@cosmjs/socket': 0.32.4
- '@cosmjs/stream': 0.32.4
- '@cosmjs/utils': 0.32.4
- axios: 1.7.7
+ '@cosmjs/crypto': 0.31.3
+ '@cosmjs/encoding': 0.31.3
+ '@cosmjs/json-rpc': 0.31.3
+ '@cosmjs/math': 0.31.3
+ '@cosmjs/socket': 0.31.3
+ '@cosmjs/stream': 0.31.3
+ '@cosmjs/utils': 0.31.3
+ axios: 0.21.4
readonly-date: 1.0.0
xstream: 11.14.0
transitivePeerDependencies:
@@ -3382,18 +3364,14 @@ packages:
- utf-8-validate
dev: false
- /@cosmjs/utils@0.24.1:
- resolution: {integrity: sha512-VA3WFx1lMFb7esp9BqHWkDgMvHoA3D9w+uDRvWhVRpUpDc7RYHxMbWExASjz+gNblTCg556WJGzF64tXnf9tdQ==}
+ /@cosmjs/utils@0.27.1:
+ resolution: {integrity: sha512-VG7QPDiMUzVPxRdJahDV8PXxVdnuAHiIuG56hldV4yPnOz/si/DLNd7VAUUA5923b6jS1Hhev0Hr6AhEkcxBMg==}
dev: false
/@cosmjs/utils@0.31.3:
resolution: {integrity: sha512-VBhAgzrrYdIe0O5IbKRqwszbQa7ZyQLx9nEQuHQ3HUplQW7P44COG/ye2n6AzCudtqxmwdX7nyX8ta1J07GoqA==}
dev: false
- /@cosmjs/utils@0.32.4:
- resolution: {integrity: sha512-D1Yc+Zy8oL/hkUkFUL/bwxvuDBzRGpc4cF7/SkdhxX4iHpSLgdOuTt1mhCh9+kl6NQREy9t7SYZ6xeW5gFe60w==}
- dev: false
-
/@cosmsnap/snapper@0.1.29:
resolution: {integrity: sha512-pnCdpIJzezKSeRMZzIA9A/LZxpwvXjN8XZK3J8rlX5xrVPrYvETL0hC7KeAxnRle9LcwKqv+AwebrHrHQwpvEQ==}
engines: {node: '>=16.0.0'}
@@ -3403,14 +3381,14 @@ packages:
ses: 0.18.4
dev: false
- /@dao-dao/cosmiframe@0.1.0(@cosmjs/amino@0.32.4)(@cosmjs/proto-signing@0.32.4):
+ /@dao-dao/cosmiframe@0.1.0(@cosmjs/amino@0.31.3)(@cosmjs/proto-signing@0.31.3):
resolution: {integrity: sha512-NW4pGt1ctqDfhn/A6RU2vwnFEu3O4aBNnBMrGnw31n+L35drYNEsA9ZB7KZsHmRRlkNx+jSuJSv2Fv0BFBDDJQ==}
peerDependencies:
'@cosmjs/amino': '>= ^0.32'
'@cosmjs/proto-signing': '>= ^0.32'
dependencies:
- '@cosmjs/amino': 0.32.4
- '@cosmjs/proto-signing': 0.32.4
+ '@cosmjs/amino': 0.31.3
+ '@cosmjs/proto-signing': 0.31.3
uuid: 9.0.1
dev: false
@@ -5169,12 +5147,12 @@ packages:
- zod
dev: false
- /@leapwallet/cosmos-social-login-capsule-provider@0.0.41(@cosmjs/encoding@0.32.4)(@cosmjs/proto-signing@0.32.4)(fp-ts@2.16.9):
+ /@leapwallet/cosmos-social-login-capsule-provider@0.0.41(@cosmjs/encoding@0.32.4)(@cosmjs/proto-signing@0.31.3)(fp-ts@2.16.9):
resolution: {integrity: sha512-bspkrnc/1FPI2EV0ssCxbySgGPj8+huj5Qesm4wuGJvbr4WDjb4QZZn7j3f7ZQXbGz3jYuc75TVCXcOCFHkDAQ==}
dependencies:
'@cosmjs/amino': 0.31.3
'@leapwallet/cosmos-social-login-core': 0.0.1
- '@usecapsule/cosmjs-v0-integration': 1.24.1(@cosmjs/amino@0.31.3)(@cosmjs/encoding@0.32.4)(@cosmjs/proto-signing@0.32.4)
+ '@usecapsule/cosmjs-v0-integration': 1.24.1(@cosmjs/amino@0.31.3)(@cosmjs/encoding@0.32.4)(@cosmjs/proto-signing@0.31.3)
'@usecapsule/web-sdk': 1.23.0(fp-ts@2.16.9)
long: 5.2.3
transitivePeerDependencies:
@@ -7350,6 +7328,10 @@ packages:
resolution: {integrity: sha512-4GMcKQuLZQi6RFBiBZNsLhl+hQGYScRZ5ZoVq8QAzfqz9M7vcGin/2YdSESwl7WaV+Qzsb5CZOAbMBes4lNTnA==}
dev: false
+ /@tanstack/query-core@5.62.0:
+ resolution: {integrity: sha512-sx38bGrqF9bop92AXOvzDr0L9fWDas5zXdPglxa9cuqeVSWS7lY6OnVyl/oodfXjgOGRk79IfCpgVmxrbHuFHg==}
+ dev: false
+
/@tanstack/react-query@4.35.0(react@18.2.0):
resolution: {integrity: sha512-LLYDNnM9ewYHgjm2rzhk4KG/puN2rdoqCUD+N9+V7SwlsYwJk5ypX58rpkoZAhFyZ+KmFUJ7Iv2lIEOoUqydIg==}
peerDependencies:
@@ -7367,14 +7349,23 @@ packages:
use-sync-external-store: 1.2.2(react@18.2.0)
dev: false
- /@terra-money/station-connector@1.1.4(@cosmjs/amino@0.32.4)(axios@0.27.2):
+ /@tanstack/react-query@5.62.0(react@18.2.0):
+ resolution: {integrity: sha512-tj2ltjAn2a3fs+Dqonlvs6GyLQ/LKVJE2DVSYW+8pJ3P6/VCVGrfqv5UEchmlP7tLOvvtZcOuSyI2ooVlR5Yqw==}
+ peerDependencies:
+ react: ^18 || ^19
+ dependencies:
+ '@tanstack/query-core': 5.62.0
+ react: 18.2.0
+ dev: false
+
+ /@terra-money/station-connector@1.1.4(@cosmjs/amino@0.31.3)(axios@0.27.2):
resolution: {integrity: sha512-0xQ1haSJnY6ltjhptFoVa1yhNUIBsbCAEQCUukSY93GSo6tt+DN4RAku9i1ulfY/UizXnxH/mn+6aJyTCZGGcg==}
engines: {node: '>=16'}
peerDependencies:
'@cosmjs/amino': ^0.31.0
axios: ^0.27.2
dependencies:
- '@cosmjs/amino': 0.32.4
+ '@cosmjs/amino': 0.31.3
axios: 0.27.2
bech32: 2.0.0
dev: false
@@ -8079,7 +8070,7 @@ packages:
- debug
dev: false
- /@usecapsule/cosmjs-v0-integration@1.24.1(@cosmjs/amino@0.31.3)(@cosmjs/encoding@0.32.4)(@cosmjs/proto-signing@0.32.4):
+ /@usecapsule/cosmjs-v0-integration@1.24.1(@cosmjs/amino@0.31.3)(@cosmjs/encoding@0.32.4)(@cosmjs/proto-signing@0.31.3):
resolution: {integrity: sha512-XlRsz+iroZK4YPRjnBFuBXUiM+yIpypeGBZuO89BZhLHdMal2c4y+R6qv1+p/7HTw6sCKVfztXTI859u32NR4w==}
peerDependencies:
'@cosmjs/amino': '>= 0.31.3 < 1'
@@ -8088,7 +8079,7 @@ packages:
dependencies:
'@cosmjs/amino': 0.31.3
'@cosmjs/encoding': 0.32.4
- '@cosmjs/proto-signing': 0.32.4
+ '@cosmjs/proto-signing': 0.31.3
'@usecapsule/core-sdk': 1.24.1
transitivePeerDependencies:
- debug
@@ -17761,11 +17752,6 @@ packages:
engines: {node: '>= 10.0.0'}
dev: false
- /unorm@1.6.0:
- resolution: {integrity: sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA==}
- engines: {node: '>= 0.4.0'}
- dev: false
-
/unpipe@1.0.0:
resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==}
engines: {node: '>= 0.8'}