Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixtures #604

Merged
merged 2 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 23 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ A "babel for the Cosmos", Telescope is a TypeScript Transpiler for Cosmos Protob
The following blockchain libraries (generated by Telescope) are available via npm

* [osmojs](https://www.npmjs.com/package/osmojs)
* [@dydxprotocol/v4-client-js](https://www.npmjs.com/package/@dydxprotocol/v4-client-js)
* [dydx](https://www.npmjs.com/package/@dydxprotocol/v4-client-js)
* [stargazejs](https://www.npmjs.com/package/stargazejs)
* [juno-network](https://www.npmjs.com/package/juno-network)
* [stridejs](https://www.npmjs.com/package/stridejs)
* [injectivejs](https://www.npmjs.com/package/injectivejs)
* [quicksilverjs](https://www.npmjs.com/package/quicksilverjs)

🎥 [Checkout our video playlist](https://www.youtube.com/watch?v=n82MsLe82mk&list=PL-lMkVv7GZwyQaK6bp6kMdOS5mzosxytC) to learn how to use `telescope`!
🎥 [Checkout our video course](https://cosmology.zone/learn/telescope) to learn how to use `telescope`!

## Table of contents

Expand Down Expand Up @@ -94,22 +94,22 @@ The following blockchain libraries (generated by Telescope) are available via np

Follow the instructions below to generate a new Typescript package that you can publish to npm.

First, install `telescope`:
First, install `telescope` and `create-cosmos-app`

```sh
npm install -g @cosmology/telescope
npm install -g @cosmology/telescope create-cosmos-app
```

### Generate

Use the `generate` command to create a new package.
Use the [`create-cosmos-app`](https://github.com/cosmology-tech/create-cosmos-app/) command to create a new package from the `telescope` boilerplate.

```sh
telescope generate
cd ./your-new-project
yarn
cca --boilerplate telescope
```

Then, you'll navigate into `./your-project/packages/telescope` package for the next steps.

### Add Protobufs

If you have `.proto` files, simply add them to a `./proto` folder.
Expand All @@ -128,7 +128,15 @@ telescope install @protobufs/osmosis

### Transpile

To create the Typescript files, run the `transpile` command.
To create the Typescript files for your chain, run the `yarn codegen` command inside of the package.

```
yarn codegen
```

### Transpile with CLI

Less recommended, but you can also use our CLI for transpilation. To create the Typescript files with the `cli`, run the `transpile` command.

```sh
telescope transpile
Expand Down Expand Up @@ -178,14 +186,15 @@ telescope transpile --config .telescope.json --config .telescope-ext.json

### Build

Finally, run `install` and `buidl` to generate the JS and types for publishing your module to npm.
Finally, run `install` and `build` to generate the JS and types for publishing your module to npm.

```sh
yarn install
yarn buidl
yarn build
```

Now you should have code inside of your `./src` folder, ready for publshing via `npm publish`. Or, if you used the defaults, you can start developing and your code can be imported from `./src/codegen`;
### Publishing

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.

# Usage

Expand All @@ -205,7 +214,7 @@ import telescope from '@cosmology/telescope';
import { sync as rimraf } from 'rimraf';

const protoDirs = [join(__dirname, '/../proto')];
const outPath = join(__dirname, '../src/codegen');
const outPath = join(__dirname, '../src');
rimraf(outPath);

telescope({
Expand Down
2 changes: 1 addition & 1 deletion __fixtures__/misc/output-impl-interfaces-gen/binary.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/


Expand Down
2 changes: 1 addition & 1 deletion __fixtures__/misc/output-impl-interfaces-gen/extern.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/

import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from '@cosmjs/stargate'
Expand Down
2 changes: 1 addition & 1 deletion __fixtures__/misc/output-impl-interfaces-gen/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/


Expand Down
2 changes: 1 addition & 1 deletion __fixtures__/misc/output-impl-interfaces-gen/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/

export * from "./akash/bundle";
Expand Down
2 changes: 1 addition & 1 deletion __fixtures__/misc/output-impl-interfaces-gen/mobx.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/

import { getRpcClient } from './extern'
Expand Down
2 changes: 1 addition & 1 deletion __fixtures__/misc/output-impl-interfaces-gen/registry.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/

import { BinaryReader } from "./binary";
Expand Down
2 changes: 1 addition & 1 deletion __fixtures__/misc/output-impl-interfaces-gen/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/

import { IBinaryReader, IBinaryWriter } from "./binary";
Expand Down
2 changes: 1 addition & 1 deletion __fixtures__/misc/output-impl-interfaces-gen/utf8.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/


Expand Down
2 changes: 1 addition & 1 deletion __fixtures__/misc/output-impl-interfaces-gen/varint.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/

import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from '@cosmjs/stargate'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/

export * from "./gogoproto/bundle";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/

import { getRpcClient } from './extern'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/

import { BinaryReader } from "./binary";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/

import { IBinaryReader, IBinaryWriter } from "./binary";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/

import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from '@cosmjs/stargate'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/

export * from "./gogoproto/bundle";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/

import { getRpcClient } from './extern'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/

import { BinaryReader } from "./binary";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/

import { IBinaryReader, IBinaryWriter } from "./binary";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file and any referenced files were automatically generated by @cosmology/telescope@latest
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
* and run the transpile command or yarn proto command to regenerate this bundle.
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
*/


Expand Down
Loading
Loading