You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -109,179 +109,171 @@ The following blockchain libraries (generated by Telescope) are available via np
109
109
110
110
## Quickstart
111
111
112
-
Follow the instructions below to generate a new Typescript package that you can publish to npm.
113
-
114
-
First, install `telescope` and `create-cosmos-app`
112
+
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
Use the [`create-cosmos-app`](https://github.com/hyperweb-io/create-cosmos-app/) command to create a new package from the `telescope` boilerplate.
122
+
Use the [`create-interchain-app`](https://github.com/hyperweb-io/create-interchain-app/) command to create a new package from the `telescope` boilerplate.
123
123
124
124
```sh
125
-
cca --boilerplate telescope
126
-
```
125
+
cia --boilerplate telescope
127
126
128
-
Then, you'll navigate into `./your-project/packages/telescope` package for the next steps.
129
127
130
-
You can also use `telescope generate` command to generate package according to the prompt or terminal command params such as:
131
-
`telescope generate --access public --userfullname testname --useremail [email protected] --module-desc test --username salkfl --license MIT --module-name test --chain-name cosmos --use-npm-scoped`
Then, you'll navigate into `./your-project/packages/telescope` package for the next steps.
135
129
136
130
If some required options are missing, it will prompt to ask for the info.
137
131
138
-
To be noted, `--use-npm-scoped` only works when `--access` is `public`
132
+
For detailed cli `generate` commands, please check our docs and learn directories.
139
133
140
-
### Download protos with CLI
134
+
### Download protos
141
135
142
136
The old ` telescope install ` command has been deprecated
143
137
144
-
You can use our CLI to download protos by using `download`command.
138
+
You can use our script to download protos by using `download-protos`command in the boilerplate.
145
139
146
140
```sh
147
-
telescope download
141
+
yarn download-protos
148
142
```
149
143
150
144
You should now see some repos cloned in `./git-modules` and proto files generated in `./protos`. These are the proto files downloaded according to your config.
151
145
152
-
Examples:
146
+
For detailed cli `download` commands, please check our docs and learn directories.
153
147
154
-
```sh
155
-
# Telescope will do the download according to .json file of --config
156
-
# Telescope will put proto into location specified by --out
// in format of (i.e. { "owner": <owner>, "repo": <repo> } or { "owner": <owner>, "repo": <repo>, "branch": <branch> })
180
-
// <branch> can be empty, it will use main as default
181
-
//
182
-
// `protoDirMapping` is the directory of repo specified if the proto is not under repo's root directory ./protos
183
-
// in format of (i.e. <owner>/<repository> or <owner>/<repository>/<branch>)
184
-
// <branch> can be empty, it will use main as default
185
-
//
186
-
// `outDir` is where the output proto will be put
187
-
//
188
-
// `targets` are the target proto to download
189
-
// `targets` can be patterns like:
190
-
// "cosmos/bank/v1beta1/tx.proto",
191
-
// "cosmos/gov/**/*.proto",
192
-
// "cosmos/authz/**/*.proto",
193
-
{
194
-
"repos": [
195
-
{ "owner":"cosmos", "repo":"cosmos-sdk" },
196
-
...
197
-
],
198
-
"protoDirMapping": {
199
-
"gogo/protobuf/master":".",
200
-
...
201
-
},
202
-
"outDir":"protos",
203
-
"ssh":true,
204
-
"tempRepoDir":"git-modules",
205
-
"targets": [
206
-
"cosmos/auth/v1beta1/auth.proto",
207
-
...
208
-
]
209
-
}
210
-
```
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.
211
167
212
-
### Transpile
168
+
# Usage
213
169
214
-
To create the Typescript files for your chain, run the `yarn codegen` command inside of the package.
170
+
## Advanced Install
171
+
The methods below are all the options you can use to install and use Telescope
215
172
173
+
### Telescope CLI
174
+
Install telescope
175
+
```sh
176
+
npm install -g @cosmology/telescope
216
177
```
217
-
yarn codegen
218
-
```
178
+
The steps by order are: generate, download and transpile.
219
179
220
-
### Transpile with CLI
180
+
1.Generate a package with the telescope CLI:
221
181
222
-
Less recommended, but you can also use our CLI for transpilation. To create the Typescript files with the `cli`, run the `transpile` command.
# Telescope takes more than one config. The config afterward will override those in front. In this case values in .telescope-ext.json will override those in .telescope.json.
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
268
240
```
269
241
270
-
### Build
242
+
Use the [`create-cosmos-app`](https://github.com/hyperweb-io/create-cosmos-app/) command to create a new package from the `telescope` boilerplate.
271
243
272
-
Finally, run `install` and `build` to generate the JS and types for publishing your module to npm.
244
+
```sh
245
+
cca --boilerplate telescope
246
+
```
273
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.
274
251
```sh
275
-
yarn build
252
+
yarn install
253
+
telescope download --config ./your.config.json
276
254
```
277
255
278
-
### Publishing
256
+
To create the Typescript files for your chain, run the `yarn codegen`command inside of the package.
279
257
280
-
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.
258
+
```sh
259
+
yarn codegen
260
+
```
281
261
282
-
# Usage
262
+
### Manual install
263
+
If you want to use telescope in your own project.
283
264
284
-
## Programatic Usage
265
+
Run the commandin ./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.
.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:
294
319
```js
295
320
import { join } from 'path';
296
321
import telescope from '@cosmology/telescope';
@@ -1365,7 +1390,7 @@ A unified toolkit for building applications and smart contracts in the Interchai
1365
1390
| **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. |
1366
1391
| **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 |
1367
1392
| **SDK Clients** | [**Telescope**](https://github.com/hyperweb-io/telescope) | Your Frontend Companion for Building with TypeScript with Cosmos SDK Modules. |
1368
-
| **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. |
1369
1394
| **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. |
1370
1395
| **Testing Frameworks** | [**Starship**](https://github.com/hyperweb-io/starship) | Unified Testing and Development for the Interchain. |
1371
1396
| **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