-
Notifications
You must be signed in to change notification settings - Fork 48
docs(registry): add registry docs and monorepo doc updates #307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,59 @@ | ||||||
| --- | ||||||
| title: "Introduction" | ||||||
| description: "@sei-js/registry provides typed constants for Sei chain info, tokens, networks, IBC channels, and gas configuration" | ||||||
| icon: "database" | ||||||
| --- | ||||||
|
|
||||||
| ## Overview | ||||||
|
|
||||||
| The `@sei-js/registry` package provides fully typed TypeScript constants sourced from the official [Sei chain registry](https://github.com/sei-protocol/chain-registry) and the community [asset list](https://github.com/Sei-Public-Goods/sei-assetlist). Use it to access chain metadata, network endpoints, token lists, IBC channel info, and gas configuration without hardcoding values. | ||||||
|
|
||||||
| ## Key Exports | ||||||
|
|
||||||
| | Export | Description | | ||||||
| |---|---| | ||||||
| | `CHAIN_IDS` | Mainnet, testnet, and devnet chain ID strings | | ||||||
| | `CHAIN_INFO` | Core chain metadata (bech32 prefix, slip44, fee token, supported wallets) | | ||||||
| | `NETWORKS` | Network configs with RPC, REST, gRPC, EVM, and WebSocket endpoints | | ||||||
| | `TOKEN_LIST` | Community-maintained token list per network | | ||||||
| | `IBC_INFO` | IBC channel configurations per network | | ||||||
| | `GAS_INFO` | Gas denomination and pricing per network | | ||||||
|
Comment on lines
+13
to
+20
|
||||||
|
|
||||||
| ## Installation | ||||||
|
|
||||||
| <CodeGroup> | ||||||
|
|
||||||
| ```bash npm | ||||||
| npm install @sei-js/registry | ||||||
| ``` | ||||||
|
|
||||||
| ```bash yarn | ||||||
| yarn add @sei-js/registry | ||||||
| ``` | ||||||
|
|
||||||
| ```bash pnpm | ||||||
| pnpm add @sei-js/registry | ||||||
| ``` | ||||||
|
|
||||||
| ```bash bun | ||||||
| bun add @sei-js/registry | ||||||
| ``` | ||||||
|
|
||||||
| </CodeGroup> | ||||||
|
|
||||||
| ## Quick Example | ||||||
|
|
||||||
| ```typescript | ||||||
| import { CHAIN_IDS, NETWORKS, TOKEN_LIST } from "@sei-js/registry"; | ||||||
|
|
||||||
| // Get the mainnet chain ID | ||||||
| console.log(CHAIN_IDS.mainnet); // "pacific-1" | ||||||
|
|
||||||
| // Access mainnet RPC endpoints | ||||||
| const mainnet = NETWORKS["pacific-1"]; | ||||||
| console.log(mainnet.rpc[0].url); | ||||||
|
|
||||||
| // Find the SEI token on mainnet | ||||||
| const sei = TOKEN_LIST["pacific-1"].find((t) => t.symbol === "sei"); | ||||||
|
||||||
| const sei = TOKEN_LIST["pacific-1"].find((t) => t.symbol === "sei"); | |
| const sei = TOKEN_LIST["pacific-1"].find((t) => t.symbol === "SEI"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new Testing section uses
pnpmcommands, but the Prerequisites section above still instructsyarn installand claims Yarn is the package manager. Since the repopackageManagerispnpm@9.0.0, these instructions are now contradictory. Align the prerequisites/install/build/test commands on a single package manager (or document both explicitly).