docs(registry): add registry docs and monorepo doc updates#307
docs(registry): add registry docs and monorepo doc updates#307codebycarson wants to merge 1 commit intomainfrom
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #307 +/- ##
=======================================
Coverage 79.69% 79.69%
=======================================
Files 83 83
Lines 1305 1305
Branches 158 215 +57
=======================================
Hits 1040 1040
+ Misses 265 259 -6
- Partials 0 6 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds documentation and project configuration updates to introduce and surface the new @sei-js/registry package across the monorepo and docs site.
Changes:
- Added new Mintlify docs pages for
@sei-js/registry(introduction + usage) and added a dedicated docs navigation dropdown. - Updated
packages/registry/README.mdwith badges, a quick start section, and a documentation link. - Added a
test:parallelroot script and documented sequential vs parallel test commands; updated Biome ignores.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/registry/README.md | Refreshes package README with badges/links and quick start example |
| package.json | Adds test:parallel script for running workspace tests concurrently |
| docs/registry/introduction.mdx | New introduction/installation page for the registry package |
| docs/registry/usage.mdx | New usage examples for registry exports |
| docs/docs.json | Adds registry dropdown and reformats page arrays |
| biome.json | Ignores packages/create-sei/extensions/** for Biome |
| README.md | Adds @sei-js/registry to packages list and documents test scripts |
| .gitignore | Removes yarn-error.log ignore entry |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| console.log(mainnet.rpc[0].url); | ||
|
|
||
| // Find the SEI token on mainnet | ||
| const sei = TOKEN_LIST["pacific-1"].find((t) => t.symbol === "sei"); |
There was a problem hiding this comment.
The introduction page’s quick example also searches for t.symbol === "sei", but the registry’s token symbols are uppercase (e.g. SEI). This will likely return undefined. Update the example to use the correct casing or a normalized comparison.
| const sei = TOKEN_LIST["pacific-1"].find((t) => t.symbol === "sei"); | |
| const sei = TOKEN_LIST["pacific-1"].find((t) => t.symbol === "SEI"); |
| ```typescript | ||
| import { TOKEN_LIST, NETWORKS, IBC_INFO, GAS_INFO } from '@sei-js/registry' | ||
|
|
||
| const uAtom = TOKEN_LIST.find(asset => asset.denom === 'uatom') |
There was a problem hiding this comment.
The usage example treats TOKEN_LIST as an array and accesses a non-existent asset.denom field. In this package, TOKEN_LIST is keyed by network (e.g. TOKEN_LIST['pacific-1']) and tokens have fields like base/display/denom_units, so this snippet won’t type-check or work as written. Update the example to index by network and filter on an existing field (or denom_units).
| const uAtom = TOKEN_LIST.find(asset => asset.denom === 'uatom') | |
| const pacificTokens = TOKEN_LIST['pacific-1'] | |
| const uAtom = pacificTokens.find(asset => | |
| asset.denom_units.some(unit => unit.denom === 'uatom'), | |
| ) |
| | 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 | |
There was a problem hiding this comment.
The markdown table in “Key Exports” uses double leading pipes (||) on each row, which won’t render as a standard Markdown table in most renderers. It should be a normal pipe table (| Export | Description |, etc.).
| const seiToken = TOKEN_LIST["pacific-1"].find((t) => t.symbol === "sei"); | ||
| console.log(seiToken?.name); // "Sei" | ||
| console.log(seiToken?.base); // "usei" | ||
| console.log(seiToken?.display); // "sei" |
There was a problem hiding this comment.
This example searches for t.symbol === "sei", but the registry token list uses uppercase symbols (e.g. tests assert asset.symbol === 'SEI'). As written, this will likely return undefined and mislead readers. Update the docs to use the correct symbol casing or demonstrate a case-insensitive match.
| const seiToken = TOKEN_LIST["pacific-1"].find((t) => t.symbol === "sei"); | |
| console.log(seiToken?.name); // "Sei" | |
| console.log(seiToken?.base); // "usei" | |
| console.log(seiToken?.display); // "sei" | |
| const seiToken = TOKEN_LIST["pacific-1"].find((t) => t.symbol === "SEI"); | |
| console.log(seiToken?.name); // "Sei" | |
| console.log(seiToken?.base); // "usei" | |
| console.log(seiToken?.display); // "SEI" |
| const evmRpc = NETWORKS["pacific-1"].evm_rpc?.[0]?.url; | ||
|
|
||
| const client = createPublicClient({ | ||
| chain: sei, | ||
| transport: http(evmRpc), | ||
| }); |
There was a problem hiding this comment.
evmRpc can be undefined (you already note EVM endpoints are optional), but it’s passed directly into http(evmRpc). viem’s http() expects a defined URL string, so this example will throw at runtime when evm_rpc is missing. Add an explicit check / fallback URL before creating the client.
| To build all packages and docs, run `pnpm install` then `pnpm build:all` | ||
|
|
||
| ### Testing | ||
|
|
||
| ```bash | ||
| # Sequential (all packages via package scripts) | ||
| pnpm run test:all | ||
|
|
||
| # Parallel (all packages concurrently) | ||
| pnpm run test:parallel |
There was a problem hiding this comment.
The new Testing section uses pnpm commands, but the Prerequisites section above still instructs yarn install and claims Yarn is the package manager. Since the repo packageManager is pnpm@9.0.0, these instructions are now contradictory. Align the prerequisites/install/build/test commands on a single package manager (or document both explicitly).
This pull request introduces the new
@sei-js/registrypackage and integrates it into the documentation and project configuration. The registry provides typed constants for Sei chain info, tokens, networks, IBC channels, and gas configuration. The documentation is updated with new sections and examples to help developers use the package, and project scripts are enhanced to support parallel testing.New package integration and documentation updates:
@sei-js/registryto the package table inREADME.mdand provided a quick start section and documentation links in its ownREADME.md. [1] [2]docs/registry/introduction.mdx(overview and installation) anddocs/registry/usage.mdx(detailed usage examples for all exports). [1] [2]docs/docs.jsonto add a dedicated navigation dropdown for@sei-js/registry, and refactored the pages arrays for clarity and consistency across all packages. [1] [2] [3] [4] [5] [6] [7] [8]Project configuration improvements:
test:parallelscript topackage.jsonand documented sequential vs. parallel testing commands in the mainREADME.md. [1] [2]biome.jsonto ignore thepackages/create-sei/extensions/**directory for formatting and linting.