Skip to content

Commit 0fe72f8

Browse files
committed
docs(registry): add registry docs and monorepo doc updates
1 parent 184d715 commit 0fe72f8

8 files changed

Lines changed: 338 additions & 19 deletions

File tree

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ node_modules
3737
/coverage
3838
/libpeerconnection.log
3939
npm-debug.log
40-
yarn-error.log
4140
testem.log
4241
/typings
4342
.next

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ please refer to the table below.
1717
| [@sei-js/create-sei](packages/create-sei) | CLI Tool used to quickly spin up Sei Projects and dApps in either the cosmos or EVM ecosystem |
1818
| [@sei-js/mcp-server](packages/mcp-server) | MCP server for interacting with Sei via LLM's and agents |
1919
| [@sei-js/sei-global-wallet](packages/sei-global-wallet) | A global wallet conforming to EIP-6963 allowing for AA across dApps. |
20+
| [@sei-js/registry](packages/registry) | Typed constants for Sei chain info, tokens, networks, IBC, and gas configuration. |
2021
| [@sei-js/ledger](packages/ledger) | TypeScript library transacting on Sei using a Ledger device. |
2122

2223
## Development
@@ -40,3 +41,13 @@ The correct Yarn version will be automatically used thanks to the `packageManage
4041
### Building
4142

4243
To build all packages and docs, run `pnpm install` then `pnpm build:all`
44+
45+
### Testing
46+
47+
```bash
48+
# Sequential (all packages via package scripts)
49+
pnpm run test:all
50+
51+
# Parallel (all packages concurrently)
52+
pnpm run test:parallel
53+
```

biome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
"files": {
99
"ignoreUnknown": false,
10-
"ignore": ["*/coverage/*", "*/dist/*", "packages/create-sei/templates/**"]
10+
"ignore": ["*/coverage/*", "*/dist/*", "packages/create-sei/templates/**", "packages/create-sei/extensions/**"]
1111
},
1212
"formatter": {
1313
"enabled": true,

docs/docs.json

Lines changed: 68 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414
"dark": "#780000"
1515
},
1616
"contextual": {
17-
"options": ["copy", "chatgpt", "claude"]
17+
"options": [
18+
"copy",
19+
"chatgpt",
20+
"claude"
21+
]
1822
},
1923
"navigation": {
2024
"global": {
@@ -43,11 +47,16 @@
4347
"pages": [
4448
{
4549
"group": "Introduction",
46-
"pages": ["introduction", "overview"]
50+
"pages": [
51+
"introduction",
52+
"overview"
53+
]
4754
},
4855
{
4956
"group": "Local Development",
50-
"pages": ["contributing"]
57+
"pages": [
58+
"contributing"
59+
]
5160
}
5261
]
5362
},
@@ -58,15 +67,26 @@
5867
"pages": [
5968
{
6069
"group": "About",
61-
"pages": ["mcp-server/introduction", "mcp-server/transports"]
70+
"pages": [
71+
"mcp-server/introduction",
72+
"mcp-server/transports"
73+
]
6274
},
6375
{
6476
"group": "Setup",
65-
"pages": ["mcp-server/quickstart", "mcp-server/environment-variables", "mcp-server/troubleshooting"]
77+
"pages": [
78+
"mcp-server/quickstart",
79+
"mcp-server/environment-variables",
80+
"mcp-server/troubleshooting"
81+
]
6682
},
6783
{
6884
"group": "Capabilities",
69-
"pages": ["mcp-server/tools", "mcp-server/prompts", "mcp-server/context"]
85+
"pages": [
86+
"mcp-server/tools",
87+
"mcp-server/prompts",
88+
"mcp-server/context"
89+
]
7090
}
7191
]
7292
},
@@ -77,7 +97,11 @@
7797
"pages": [
7898
{
7999
"group": "Getting Started",
80-
"pages": ["create-sei/welcome", "create-sei/quick-start", "create-sei/templates"]
100+
"pages": [
101+
"create-sei/welcome",
102+
"create-sei/quick-start",
103+
"create-sei/templates"
104+
]
81105
}
82106
]
83107
},
@@ -88,7 +112,10 @@
88112
"pages": [
89113
{
90114
"group": "Getting Started",
91-
"pages": ["sei-global-wallet/introduction", "sei-global-wallet/quickstart"]
115+
"pages": [
116+
"sei-global-wallet/introduction",
117+
"sei-global-wallet/quickstart"
118+
]
92119
},
93120
{
94121
"group": "Integrations",
@@ -109,7 +136,10 @@
109136
"pages": [
110137
{
111138
"group": "Getting Started",
112-
"pages": ["precompiles/introduction", "precompiles/quick-start"]
139+
"pages": [
140+
"precompiles/introduction",
141+
"precompiles/quick-start"
142+
]
113143
},
114144
{
115145
"group": "Precompiles",
@@ -129,11 +159,27 @@
129159
}
130160
]
131161
},
162+
{
163+
"dropdown": "@sei-js/registry",
164+
"description": "Chain constants and token lists",
165+
"icon": "database",
166+
"pages": [
167+
{
168+
"group": "Getting Started",
169+
"pages": [
170+
"registry/introduction",
171+
"registry/usage"
172+
]
173+
}
174+
]
175+
},
132176
{
133177
"dropdown": "@sei-js/ledger",
134178
"description": "Hardware wallet connection",
135179
"icon": "shield",
136-
"pages": ["ledger/introduction"]
180+
"pages": [
181+
"ledger/introduction"
182+
]
137183
},
138184
{
139185
"dropdown": "x402",
@@ -142,15 +188,24 @@
142188
"pages": [
143189
{
144190
"group": "Introduction",
145-
"pages": ["x402/introduction", "x402/overview", "x402/quickstart"]
191+
"pages": [
192+
"x402/introduction",
193+
"x402/overview",
194+
"x402/quickstart"
195+
]
146196
},
147197
{
148198
"group": "Facilitators",
149-
"pages": ["x402/facilitators/introduction", "x402/facilitators/example"]
199+
"pages": [
200+
"x402/facilitators/introduction",
201+
"x402/facilitators/example"
202+
]
150203
},
151204
{
152205
"group": "Client Integration",
153-
"pages": ["x402/clients/fetch"]
206+
"pages": [
207+
"x402/clients/fetch"
208+
]
154209
},
155210
{
156211
"group": "Packages",

docs/registry/introduction.mdx

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
title: "Introduction"
3+
description: "@sei-js/registry provides typed constants for Sei chain info, tokens, networks, IBC channels, and gas configuration"
4+
icon: "database"
5+
---
6+
7+
## Overview
8+
9+
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.
10+
11+
## Key Exports
12+
13+
| Export | Description |
14+
|---|---|
15+
| `CHAIN_IDS` | Mainnet, testnet, and devnet chain ID strings |
16+
| `CHAIN_INFO` | Core chain metadata (bech32 prefix, slip44, fee token, supported wallets) |
17+
| `NETWORKS` | Network configs with RPC, REST, gRPC, EVM, and WebSocket endpoints |
18+
| `TOKEN_LIST` | Community-maintained token list per network |
19+
| `IBC_INFO` | IBC channel configurations per network |
20+
| `GAS_INFO` | Gas denomination and pricing per network |
21+
22+
## Installation
23+
24+
<CodeGroup>
25+
26+
```bash npm
27+
npm install @sei-js/registry
28+
```
29+
30+
```bash yarn
31+
yarn add @sei-js/registry
32+
```
33+
34+
```bash pnpm
35+
pnpm add @sei-js/registry
36+
```
37+
38+
```bash bun
39+
bun add @sei-js/registry
40+
```
41+
42+
</CodeGroup>
43+
44+
## Quick Example
45+
46+
```typescript
47+
import { CHAIN_IDS, NETWORKS, TOKEN_LIST } from "@sei-js/registry";
48+
49+
// Get the mainnet chain ID
50+
console.log(CHAIN_IDS.mainnet); // "pacific-1"
51+
52+
// Access mainnet RPC endpoints
53+
const mainnet = NETWORKS["pacific-1"];
54+
console.log(mainnet.rpc[0].url);
55+
56+
// Find the SEI token on mainnet
57+
const sei = TOKEN_LIST["pacific-1"].find((t) => t.symbol === "sei");
58+
console.log(sei?.name); // "Sei"
59+
```

0 commit comments

Comments
 (0)