-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
63 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# useClients | ||
# useCosmWasmSigningClient | ||
|
||
Hook to retrieve a SigningCosmWasmClient. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<QueryObserverResult<SigningCosmWasmClient | null, unknown>>; | ||
remove: () => void; | ||
status: 'loading' | 'error' | 'success'; | ||
fetchStatus: 'fetching' | 'paused' | 'idle'; | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# useClients | ||
# useStargateClient | ||
|
||
Hook to retrieve a StargateClient. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# useClients | ||
# useStargateSigningClient | ||
|
||
Hook to retrieve a SigningStargateClient. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# useClients | ||
# useStargateTmSigningClient | ||
|
||
Hook to retrieve a SigningStargateClient with tendermint client. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# useClients | ||
# useTendermintClient | ||
|
||
Hook to retrieve a TendermintClient. | ||
|
||
|