-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
10 changed files
with
110 additions
and
13 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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# useActiveChains | ||
|
||
hook to retrieve `ChainInfo` object from `GrazProvider` with given `chainId` | ||
|
||
#### Usage | ||
|
||
```tsx | ||
import { useChainInfo } from "graz"; | ||
|
||
function App() { | ||
const chainInfo = useChainInfo({ chainId: "cosmoshub-4" }); | ||
|
||
return ( | ||
<div> | ||
<span>{chainInfo.chainName}</span> | ||
</div> | ||
); | ||
} | ||
``` | ||
|
||
#### Return Value | ||
|
||
```tsx | ||
ChainInfo | undefined; // @keplr-wallet/types | ||
``` |
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,19 @@ | ||
# useActiveChains | ||
|
||
hook to retrieve `ChainInfo` objects from `GrazProvider` with given `chainId` | ||
|
||
#### Usage | ||
|
||
```tsx | ||
import { useChainInfos } from "graz"; | ||
|
||
function App() { | ||
const chainInfos = useChainInfos({ chainId: ["cosmoshub-4", "osmosis-1"] }); | ||
} | ||
``` | ||
|
||
#### Return Value | ||
|
||
```tsx | ||
ChainInfo[] | undefined; // @keplr-wallet/types | ||
``` |
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,7 +1,7 @@ | ||
{ | ||
"name": "graz", | ||
"description": "React hooks for Cosmos", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"author": "Griko Nibras <[email protected]>", | ||
"repository": "https://github.com/graz-sh/graz.git", | ||
"homepage": "https://github.com/graz-sh/graz", | ||
|
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
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
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