-
Notifications
You must be signed in to change notification settings - Fork 156
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
5 changed files
with
52 additions
and
6 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,20 @@ | ||
# initia-registry | ||
|
||
The npm package for the [initia registry](https://github.com/initia-labs/initia-registry) | ||
|
||
``` | ||
npm install @initia/initia-registry | ||
``` | ||
|
||
## usage | ||
|
||
Fetch data from initia-registry: | ||
|
||
```typescript | ||
import { assets, chains, ibc } from "@intiia/initia-registry"; | ||
import { Chain } from "@initia/initia-registry-types"; | ||
|
||
const assetList: Chain = assets.find( | ||
({ chain_name }) => chain_name === "initia" | ||
); | ||
``` |
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,26 @@ | ||
# Initia Registry Types | ||
|
||
This repository contains types and schema validation definitions for Initia Registry, which can be found at [Initia Registry GitHub Repository](https://github.com/initia-labs/initia-registry). | ||
|
||
## Usage | ||
|
||
### Installation | ||
|
||
You can install the Initia Registry Types package via npm: | ||
|
||
```bash | ||
npm install @initia/initia-registry-types | ||
``` | ||
|
||
### Imports | ||
|
||
After installing the package, you can import the types and schemas in your TypeScript files as follows: | ||
|
||
```typescript | ||
import { Chain, AssetList, IBCInfo } from "@initia/initia-registry-types"; | ||
import { | ||
ChainSchema, | ||
AssetListSchema, | ||
IBCInfoSchema, | ||
} from "@initia/initia-registry-types/zod"; | ||
``` |
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