# cosmolava-client

> lava http client for cosmjs

Latest version **0.3.3** (published 2023-07-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install cosmolava-client
pnpm add cosmolava-client
yarn add cosmolava-client
bun add cosmolava-client
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.3 |
| Published | 2023-07-31 |
| First published | 2023-07-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 516.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | ruslan.glaznyov@gmail.com |
| Maintainers | mellifera |
| Keywords | cosmos, lavanet, lavanetwork, cosmjs, Web3, APIs |

## Links

- npm: https://www.npmjs.com/package/cosmolava-client
- Repository: https://github.com/MELLIFERA-Labs/cosmolava-client
- Homepage: https://github.com/MELLIFERA-Labs/cosmolava-client#readme
- Issues: https://github.com/MELLIFERA-Labs/cosmolava-clientissues
- npm.io page: https://npm.io/package/cosmolava-client

## Dependencies (4)

- [@cosmjs/json-rpc](https://npm.io/package/@cosmjs/json-rpc.md) ^0.31.0
- [@cosmjs/stargate](https://npm.io/package/@cosmjs/stargate.md) ^0.31.0
- [@lavanet/lava-sdk](https://npm.io/package/@lavanet/lava-sdk.md) ^0.16.1
- [@cosmjs/tendermint-rpc](https://npm.io/package/@cosmjs/tendermint-rpc.md) ^0.31.0

## Recent versions

- 0.3.3 (latest) — 2023-07-31
- 0.3.2 — 2023-07-31
- 0.0.2 — 2023-07-07
- 0.0.1 — 2023-07-06

## README

[![conventional commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)  ![node](https://img.shields.io/badge/node-%3E=18.16.1-green) [![Module type: CJS](https://img.shields.io/badge/module%20type-cjs-brightgreen)](https://github.com/voxpelli/badges-cjs-esm)  [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT) ![NPM Downloads](https://img.shields.io/npm/dw/cosmolava-client) 

[![npm](https://img.shields.io/npm/v/cosmolava-client?style=for-the-badge)](https://www.npmjs.com/package/cosmolava-client)  

[![JavaScript Style Guide](https://cdn.rawgit.com/standard/standard/master/badge.svg)](https://github.com/standard/standard)
# cosmolava-client
Lava http client to use [lava-sdk](https://github.com/lavanet/lava-sdk) with [cosmjs](https://github.com/cosmos/cosmjs) 

This package is currently in the Alpha stage and is not production-ready for all usecases. 
Because of [lava-sdk](https://github.com/lavanet/lava-sdk) in Alpha

<img src="https://github.com/MELLIFERA-Labs/cosmolava-client/blob/main/cosmolava.png" width="30%">

## Installation
npm
```
npm i cosmolava-client
```
yarn 
```
yarn add cosmolava-client
```
## Usage 
1. Use build in lava-sdk instance 
```js
const cosmoLavaHttpClient = await createCosmoLavaHttpClient({
    privateKey: process.env.PRIVATE_KEY,
    chainID: process.env.CHAIN_ID ?? 'LAV1',
    geolocation: process.env.GEO ?? '1'
})
const tendermintLavaClient = await Tendermint34Client.create(cosmoLavaHttpClient)
// fully functional cosmjs client :)
const client = await SigningStargateClient.createWithSigner(tendermintLavaClient, signer)
```
2. Provide your own lava-sdk instance(To use this approach you need to check lava-sdk compatibility with this package by yourself)
```js
const lavaSdk = await new LavaSDK({
    privateKey: process.env.PRIVATE_KEY,
    chainID: process.env.CHAIN_ID ?? 'LAV1',
    geolocation: process.env.GEO ?? '1'
  })

const lavaClient = await CosmoLavaHttpClient.create(lavaSdk)
const tendermintLavaClient = await Tendermint34Client.create(lavaClient)
// fully functional cosmjs client :)
const client = await SigningStargateClient.createWithSigner(tendermintLavaClient, signer)
```
__Check `examples` folder for more examples__

## You want to get involved? 😍

Please submit a pull request or open an issue ❤️

---
_Source: https://npm.io/package/cosmolava-client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
