Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c8e1f14

Browse files
committedMay 23, 2025·
Reorganized install related readme, docs and learn
1 parent 12e7f90 commit c8e1f14

File tree

9 files changed

+1020
-723
lines changed

9 files changed

+1020
-723
lines changed
 

‎README.md

Lines changed: 143 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -111,22 +111,11 @@ The following blockchain libraries (generated by Telescope) are available via np
111111

112112
Follow the instructions below to generate a new Typescript package that you can publish to npm. You can also follow the video: https://youtu.be/iQf6p65fbdY
113113

114-
First, install `telescope`
115-
```sh
116-
npm install -g @cosmology/telescope
117-
```
118-
119-
then install either
120-
121114
`create-interchain-app`
122115
```sh
123116
npm install -g create-interchain-app
124117
```
125-
Or
126-
`create-cosmos-app`
127-
```sh
128-
npm install -g create-cosmos-app
129-
```
118+
130119

131120
### Generate
132121

@@ -135,13 +124,6 @@ Use the [`create-interchain-app`](https://github.com/hyperweb-io/create-intercha
135124
```sh
136125
cia --boilerplate telescope
137126

138-
or
139-
140-
Use the [`create-cosmos-app`](https://github.com/hyperweb-io/create-cosmos-app/) command to create a new package from the `telescope` boilerplate.
141-
142-
```sh
143-
cca --boilerplate telescope
144-
```
145127

146128
Then, you'll navigate into `./your-project/packages/telescope` package for the next steps.
147129
@@ -181,11 +163,117 @@ yarn build
181163
182164
### Publishing
183165
184-
Now you should have code inside of your `./src` folder, ready for publshing. If you used the `create-cosmos-app` boilerplate, use `lerna` to publish (and/or read the README in the boilerplate for instructions), or run `npm publish` from your repository.
166+
Now you should have code inside of your `./src` folder, ready for publshing. If you used the `create-interchain-app` boilerplate, use `lerna` to publish (and/or read the README in the boilerplate for instructions), or run `npm publish` from your repository.
185167
186168
# Usage
187169
188-
## Programatic Usage
170+
## Advanced Install
171+
The methods below are all the options you can use to install and use Telescope
172+
173+
### Telescope CLI
174+
Install telescope
175+
```sh
176+
npm install -g @cosmology/telescope
177+
```
178+
The steps by order are: generate, download and transpile.
179+
180+
1.Generate a package with the telescope CLI:
181+
182+
Use and follow the default prompt:
183+
```sh
184+
telescope generate
185+
```
186+
187+
Or advanced cli option by your choice:
188+
```sh
189+
telescope generate --access public --userfullname "Your Name" --useremail "your@email.com" --module-desc "Your module description" --username "your-username" --license MIT --module-name "your-module" --chain-name cosmos --use-npm-scoped
190+
```
191+
192+
Available options:
193+
- `--userfullname`: Your full name
194+
- `--useremail`: Your email
195+
- `--module-desc`: Module description
196+
- `--username`: GitHub username
197+
- `--module-name`: Module name
198+
- `--chain-name`: Chain name
199+
- `--access`: Package access (`public` or `private`)
200+
- `--use-npm-scoped`: Use npm scoped package (only works with `--access public`)
201+
- `--license`: License type
202+
203+
2.Download protocol buffer files:
204+
```sh
205+
telescope download
206+
```
207+
208+
This will clone repositories into `./git-modules` and generate proto files in `./protos`.
209+
210+
Download with a config file:
211+
```sh
212+
telescope download --config ./protod.config.json --out ./git-modules
213+
```
214+
215+
Download from a specific repo:
216+
```sh
217+
telescope download --git-repo owner/repository --targets cosmos/auth/v1beta1/auth.proto
218+
```
219+
220+
3. Transpile (Generate TypeScript code from proto files):
221+
Use default telescope option:
222+
```sh
223+
telescope transpile
224+
```
225+
226+
Use customized telescope option:
227+
```sh
228+
telescope transpile --config your-config.json
229+
```
230+
231+
### CIA
232+
Please follow the video: https://youtu.be/iQf6p65fbdY
233+
Or [Go to Quickstart](#quickstart)
234+
235+
### CCA
236+
First, install `create-cosmos-app`
237+
238+
```sh
239+
npm install -g create-cosmos-app
240+
```
241+
242+
Use the [`create-cosmos-app`](https://github.com/hyperweb-io/create-cosmos-app/) command to create a new package from the `telescope` boilerplate.
243+
244+
```sh
245+
cca --boilerplate telescope
246+
```
247+
248+
Then, you'll navigate into `./your-project/packages/telescope` package for the next steps.
249+
250+
Install dependency and use cli to download the protos you want.
251+
```sh
252+
yarn install
253+
telescope download --config ./your.config.json
254+
```
255+
256+
To create the Typescript files for your chain, run the `yarn codegen` command inside of the package.
257+
258+
```sh
259+
yarn codegen
260+
```
261+
262+
### Manual install
263+
If you want to use telescope in your own project.
264+
265+
Run the command in ./your-project
266+
```sh
267+
yarn add --dev @cosmology/telescope
268+
```
269+
Install helpers and cosmjs [dependencies listed here](#dependencies)
270+
271+
We recommand to use [Go to Programatic Usage](#programatic-usage)
272+
273+
You can also use [Go to Telescope Cli](#telescope-cli)
274+
To be noted for cli command, add 'npx' or 'yarn' prefix when you use it within your project. For instance: 'yarn telescope generate', 'npx telescope download', etc.
275+
276+
### Programatic Usage
189277

190278
First add telescope to your `devDependencies`:
191279

@@ -195,6 +283,39 @@ yarn add --dev @cosmology/telescope
195283

196284
Install helpers and cosmjs [dependencies listed here](#dependencies)
197285

286+
Download command example:
287+
```js
288+
import downloadProtos from '@cosmology/telescope/main/commands/download'
289+
290+
const config = {
291+
repos: [
292+
{ owner: "cosmos", repo: "cosmos-sdk", branch: "release/v0.50.x" },
293+
{ owner: "cosmos", repo: "ibc-go" },
294+
],
295+
protoDirMapping: {
296+
"gogo/protobuf/master": ".",
297+
"googleapis/googleapis/master": ".",
298+
"protocolbuffers/protobuf/main": "src"
299+
},
300+
outDir: "protos",
301+
ssh: false,
302+
tempRepoDir: "git-modules",
303+
targets: [
304+
"cosmos/**/*.proto",
305+
"ibc/**/*.proto",
306+
]
307+
};
308+
309+
downloadProtos(config)
310+
.then(() => console.log('✅ Proto download completed'))
311+
// @ts-ignore
312+
.catch((error) => {
313+
console.error('❌ Proto download failed:', error);
314+
process.exit(1);
315+
});
316+
```
317+
318+
Transpile command example:
198319
```js
199320
import { join } from 'path';
200321
import telescope from '@cosmology/telescope';
@@ -1269,7 +1390,7 @@ A unified toolkit for building applications and smart contracts in the Interchai
12691390
| **Wallet Connectors**| [**Interchain Kit**](https://github.com/hyperweb-io/interchain-kit)<sup>beta</sup>, [**Cosmos Kit**](https://github.com/hyperweb-io/cosmos-kit) | Experience the convenience of connecting with a variety of web3 wallets through a single, streamlined interface. |
12701391
| **Signing Clients** | [**InterchainJS**](https://github.com/hyperweb-io/interchainjs)<sup>beta</sup>, [**CosmJS**](https://github.com/cosmos/cosmjs) | A single, universal signing interface for any network |
12711392
| **SDK Clients** | [**Telescope**](https://github.com/hyperweb-io/telescope) | Your Frontend Companion for Building with TypeScript with Cosmos SDK Modules. |
1272-
| **Starter Kits** | [**Create Interchain App**](https://github.com/hyperweb-io/create-interchain-app)<sup>beta</sup>, [**Create Cosmos App**](https://github.com/hyperweb-io/create-cosmos-app) | Set up a modern Interchain app by running one command. |
1393+
| **Starter Kits** | [**Create Interchain App**](https://github.com/hyperweb-io/create-interchain-app)<sup>beta</sup> | Set up a modern Interchain app by running one command. |
12731394
| **UI Kits** | [**Interchain UI**](https://github.com/hyperweb-io/interchain-ui) | The Interchain Design System, empowering developers with a flexible, easy-to-use UI kit. |
12741395
| **Testing Frameworks** | [**Starship**](https://github.com/hyperweb-io/starship) | Unified Testing and Development for the Interchain. |
12751396
| **TypeScript Smart Contracts** | [**Create Hyperweb App**](https://github.com/hyperweb-io/create-hyperweb-app) | Build and deploy full-stack blockchain applications with TypeScript |

0 commit comments

Comments
 (0)
Please sign in to comment.