Skip to content

Commit 664cf09

Browse files
committed
Added new docs and learn based on Readme
1 parent 7812595 commit 664cf09

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+16485
-0
lines changed

docs/_meta.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"label": "Documentation",
3+
"order": [
4+
"telescope",
5+
"usage"
6+
],
7+
"titles": {
8+
"telescope": "Telescope 🔭",
9+
"usage": "Usage 📚"
10+
}
11+
}

docs/telescope/_meta.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"label": "Telescope",
3+
"order": [
4+
"quickstart",
5+
"generate",
6+
"add-protobufs",
7+
"transpile",
8+
"transpile-with-cli",
9+
"build",
10+
"publishing"
11+
],
12+
"titles": {
13+
"quickstart": "Quickstart",
14+
"generate": "Generate",
15+
"add-protobufs": "Add Protobufs",
16+
"transpile": "Transpile",
17+
"transpile-with-cli": "Transpile with CLI",
18+
"build": "Build",
19+
"publishing": "Publishing"
20+
},
21+
"*": {
22+
"type": "page"
23+
}
24+
}

docs/telescope/quickstart.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Quickstart
2+
3+
This guide provides a quick reference for setting up and using Telescope to generate TypeScript packages for Cosmos SDK modules.
4+
5+
## Installation
6+
7+
Install Telescope and create-cosmos-app:
8+
9+
```sh
10+
npm install -g @cosmology/telescope create-cosmos-app
11+
```
12+
13+
## Package Generation
14+
15+
### Using create-cosmos-app
16+
17+
Create a new package using the telescope boilerplate:
18+
19+
```sh
20+
cca --boilerplate telescope
21+
```
22+
23+
Navigate to the generated project:
24+
25+
```sh
26+
cd ./your-project/packages/telescope
27+
```
28+
29+
### Using telescope generate command
30+
31+
Generate a package with the telescope CLI:
32+
33+
```sh
34+
telescope generate --access public --userfullname "Your Name" --useremail "[email protected]" --module-desc "Your module description" --username "your-username" --license MIT --module-name "your-module" --chain-name cosmos --use-npm-scoped
35+
```
36+
37+
Available options:
38+
- `--userfullname`: Your full name
39+
- `--useremail`: Your email
40+
- `--module-desc`: Module description
41+
- `--username`: GitHub username
42+
- `--module-name`: Module name
43+
- `--chain-name`: Chain name
44+
- `--access`: Package access (`public` or `private`)
45+
- `--use-npm-scoped`: Use npm scoped package (only works with `--access public`)
46+
- `--license`: License type
47+
48+
## Working with Protos
49+
50+
Download protocol buffer files:
51+
52+
```sh
53+
telescope download
54+
```
55+
56+
This will clone repositories into `./git-modules` and generate proto files in `./protos`.
57+
58+
### Examples
59+
60+
Download with a config file:
61+
```sh
62+
telescope download --config ./protod.config.json --out ./git-modules
63+
```
64+
65+
Download from a specific repo:
66+
```sh
67+
telescope download --git-repo owner/repository --targets cosmos/auth/v1beta1/auth.proto
68+
```
69+
70+
## Code Generation
71+
72+
Generate TypeScript code from proto files:
73+
74+
```sh
75+
yarn codegen
76+
```
77+
78+
Or using the CLI:
79+
80+
```sh
81+
telescope transpile
82+
```
83+
84+
## Building
85+
86+
Build the package for distribution:
87+
88+
```sh
89+
yarn build
90+
```
91+
92+
## Publishing
93+
94+
Publish your package to npm:
95+
96+
```sh
97+
npm publish
98+
```
99+
100+
If using the create-cosmos-app boilerplate, use lerna for package management:
101+
102+
```sh
103+
lerna publish
104+
```

docs/usage/_meta.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"label": "Usage",
3+
"order": [
4+
"programatic-usage",
5+
"options",
6+
"types",
7+
"composing-messages",
8+
"calculating-fees",
9+
"stargate-clients",
10+
"creating-signers",
11+
"broadcasting-messages",
12+
"lcd-clients",
13+
"lcd-clients-classes",
14+
"rpc-clients",
15+
"rpc-client-classes",
16+
"instant-rpc-methods",
17+
"manually-registering-types",
18+
"json-patch-protos",
19+
"cosmwasm",
20+
"helper-functions-configuration",
21+
"dependencies",
22+
"troubleshooting"
23+
],
24+
"titles": {
25+
"programatic-usage": "Programatic Usage",
26+
"options": "Options",
27+
"types": "Types",
28+
"composing-messages": "Composing Messages",
29+
"calculating-fees": "Calculating Fees",
30+
"stargate-clients": "Stargate Clients",
31+
"creating-signers": "Creating Signers",
32+
"broadcasting-messages": "Broadcasting Messages",
33+
"lcd-clients": "LCD Clients",
34+
"lcd-clients-classes": "LCD Clients Classes",
35+
"rpc-clients": "RPC Clients",
36+
"rpc-client-classes": "RPC Client Classes",
37+
"instant-rpc-methods": "Instant RPC Methods",
38+
"manually-registering-types": "Manually Registering Types",
39+
"json-patch-protos": "JSON Patch Protos",
40+
"cosmwasm": "CosmWasm",
41+
"helper-functions-configuration": "Helper Functions Configuration",
42+
"dependencies": "Dependencies",
43+
"troubleshooting": "Troubleshooting"
44+
}
45+
}

0 commit comments

Comments
 (0)