0.15.4 • Published 8 days ago

@solar-republic/cosmos-grpc v0.15.4

Weekly downloads
-
License
MIT
Repository
-
Last release
8 days ago

Cosmos gRPC

Generates ultralight, tree-shakable TypeScript APIs from the .proto files of any blockchain built using the Cosmos-SDK. Intended for use in a Web environment.

Generated code is strongly-typed, self-contained, and dependency-free.

The generated module includes:

  • gRPC REST clients compatible with Cosmos REST endpoints (via gRPC-gateway)
  • Protobuf message encoders & decoders, including for strongly-typed google.protobuf.Any interfaces
  • Positional destructors for the JSON serialization of messages (e.g., those returned by gRPC-gateway)

Some goals for this project include:

  • adding Amino transcoders

Motivation

Other generated clients use protoc plugins that end up producing extremely bloated code with many unused functions, hefty classes, and poor tree-shakability, leading to large bundles. Part of the reason is due to how those protoc plugins map Messages to classes, support a variety of transports, and import bulky dependencies for encoding/decoding.

This project implements its own ultralight protobuf encoder & decoder, exports every operation as its own ESM function (for optimal tree-shaking), and focusses solely on Cosmos-SDK's gRPC-gateway REST endpoints for transport.

Using in a project

yarn add @solar-republic/cosmos-grpc

Contributing

yarn install
yarn build
0.16.3

8 days ago

0.15.4

14 days ago

0.16.2

14 days ago

0.16.0

18 days ago

0.16.1

18 days ago

0.15.3

2 months ago

0.15.1

2 months ago

0.15.2

2 months ago

0.15.0

3 months ago

0.14.2

3 months ago

0.14.0

3 months ago

0.14.1

3 months ago

0.13.0

3 months ago

0.12.0

3 months ago

0.11.1

4 months ago

0.11.2

4 months ago

0.11.0

4 months ago

0.10.5

4 months ago

0.10.3

4 months ago

0.10.4

4 months ago

0.10.1

5 months ago

0.10.2

5 months ago

0.10.0

5 months ago

0.9.0

5 months ago

0.8.0

5 months ago

0.7.1

7 months ago

0.7.0

7 months ago

0.6.3

1 year ago

0.6.2

1 year ago

0.6.1

1 year ago

0.6.0

1 year ago

0.3.0

2 years ago

0.5.0

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago