From a4d438c061bf9be2efc42aaef4d7215b41159a41 Mon Sep 17 00:00:00 2001 From: Nur Fikri Date: Wed, 16 Aug 2023 22:32:18 +0700 Subject: [PATCH] fix(docs): update docs --- docs/docs/hooks/useCosmWasmClient.md | 4 +- docs/docs/hooks/useCosmWasmSigningClient.md | 2 +- docs/docs/hooks/useCosmWasmTmSigningClient.md | 56 +++++++++++++++++++ docs/docs/hooks/useStargateClient.md | 2 +- docs/docs/hooks/useStargateSigningClient.md | 2 +- docs/docs/hooks/useStargateTmSigningClient.md | 2 +- docs/docs/hooks/useTendermintClient.md | 2 +- 7 files changed, 63 insertions(+), 7 deletions(-) create mode 100644 docs/docs/hooks/useCosmWasmTmSigningClient.md diff --git a/docs/docs/hooks/useCosmWasmClient.md b/docs/docs/hooks/useCosmWasmClient.md index 955529cf..b146b04a 100644 --- a/docs/docs/hooks/useCosmWasmClient.md +++ b/docs/docs/hooks/useCosmWasmClient.md @@ -1,6 +1,6 @@ # useClients -Hook to retrieve a CosmWasmClient. +Hook to retrieve a useCosmWasmClient. #### Usage @@ -8,7 +8,7 @@ Hook to retrieve a CosmWasmClient. import { useCosmWasmClient } from "graz"; function App() { - const { data: client, isFetching, refetch, ... } = useStargateClient(); + const { data: client, isFetching, refetch, ... } = useCosmWasmClient(); async function getAccountFromClient() { return await client.getAccount("address") diff --git a/docs/docs/hooks/useCosmWasmSigningClient.md b/docs/docs/hooks/useCosmWasmSigningClient.md index a6709941..4c9340d0 100644 --- a/docs/docs/hooks/useCosmWasmSigningClient.md +++ b/docs/docs/hooks/useCosmWasmSigningClient.md @@ -1,4 +1,4 @@ -# useClients +# useCosmWasmSigningClient Hook to retrieve a SigningCosmWasmClient. diff --git a/docs/docs/hooks/useCosmWasmTmSigningClient.md b/docs/docs/hooks/useCosmWasmTmSigningClient.md new file mode 100644 index 00000000..e9861415 --- /dev/null +++ b/docs/docs/hooks/useCosmWasmTmSigningClient.md @@ -0,0 +1,56 @@ +# useCosmWasmTmSigningClient + +Hook to retrieve a SigningCosmWasmClient with tendermint client. + +#### Usage + +```tsx +import { useCosmWasmTmSigningClient } from "graz"; + +function App() { + const { data: signingClient, isFetching, refetch, ... } = useCosmWasmTmSigningClient({ type: "tm34" }); + + async function getAccountFromClient() { + return await client.getAccount("address") + } +} +``` + +#### Params + +```tsx +args?: { + type: "tm34" | "tm37"; + opts?: SigningCosmWasmClientOptions; +} +``` + +#### Return Value + +```tsx +{ + data: SigningStargateClient + dataUpdatedAt: number; + error: TError | null; + errorUpdatedAt: number; + failureCount: number; + errorUpdateCount: number; + isError: boolean; + isFetched: boolean; + isFetchedAfterMount: boolean; + isFetching: boolean; + isLoading: boolean; + isLoadingError: boolean; + isPaused: boolean; + isPlaceholderData: boolean; + isPreviousData: boolean; + isRefetchError: boolean; + isRefetching: boolean; + isStale: boolean; + isSuccess: boolean; + refetch:(options?: RefetchOptions & RefetchQueryFilters) => Promise>; + remove: () => void; + status: 'loading' | 'error' | 'success'; + fetchStatus: 'fetching' | 'paused' | 'idle'; +} +``` diff --git a/docs/docs/hooks/useStargateClient.md b/docs/docs/hooks/useStargateClient.md index ddac66dc..7dad1fca 100644 --- a/docs/docs/hooks/useStargateClient.md +++ b/docs/docs/hooks/useStargateClient.md @@ -1,4 +1,4 @@ -# useClients +# useStargateClient Hook to retrieve a StargateClient. diff --git a/docs/docs/hooks/useStargateSigningClient.md b/docs/docs/hooks/useStargateSigningClient.md index e30d86c0..a9a37fc8 100644 --- a/docs/docs/hooks/useStargateSigningClient.md +++ b/docs/docs/hooks/useStargateSigningClient.md @@ -1,4 +1,4 @@ -# useClients +# useStargateSigningClient Hook to retrieve a SigningStargateClient. diff --git a/docs/docs/hooks/useStargateTmSigningClient.md b/docs/docs/hooks/useStargateTmSigningClient.md index 3ed49bd2..65859272 100644 --- a/docs/docs/hooks/useStargateTmSigningClient.md +++ b/docs/docs/hooks/useStargateTmSigningClient.md @@ -1,4 +1,4 @@ -# useClients +# useStargateTmSigningClient Hook to retrieve a SigningStargateClient with tendermint client. diff --git a/docs/docs/hooks/useTendermintClient.md b/docs/docs/hooks/useTendermintClient.md index a4c9ba95..26fc6214 100644 --- a/docs/docs/hooks/useTendermintClient.md +++ b/docs/docs/hooks/useTendermintClient.md @@ -1,4 +1,4 @@ -# useClients +# useTendermintClient Hook to retrieve a TendermintClient.