Client

The Sunrise client libraries let you query the chain, submit blobs and sign / broadcast transactions from your application without having to run custom protobuf tooling or hand‑craft Tendermint JSON‑RPC calls.

Available SDKs

  • JavaScript / TypeScript - Primary SDK available on npm

  • Rust - gRPC + protobuf type generation with Buf/Prost

  • Go and Python bindings - Coming soon (contributions welcome)

JavaScript / TypeScript SDK

Sunrise Client

Installation

npm install @sunriselayer/client @cosmjs/proto-signing @cosmjs/stargate
# or
pnpm add @sunriselayer/client @cosmjs/proto-signing @cosmjs/stargate
# or
yarn add @sunriselayer/client @cosmjs/proto-signing @cosmjs/stargate

Basic Usage

The client is designed to be used with CosmJS, the standard library for interacting with Cosmos SDK chains.

Here's an example of how to create a concentrated liquidity position:

All methods are fully typed when using TypeScript.

Rust SDK (Coming Soon)

The Rust SDK is currently implemented through protobuf generation. Here's how to set it up:

Project Structure

Configuration Files

  1. buf.yaml:

  1. buf.gen.yaml:

Setup and Generation

Example Usage

Additional Resources

Troubleshooting

Problem
Solution

Connection refused

Verify RPC URL and ensure DA node is running

Authentication error

Ensure account has sufficient funds

Rust build failure

Update to Rust 1.74+ and run cargo clean && buf generate

Last updated