cosmolava-client
v0.3.3
Published
lava http client for cosmjs
Downloads
9
Maintainers
Readme
cosmolava-client
Lava http client to use lava-sdk with cosmjs
This package is currently in the Alpha stage and is not production-ready for all usecases. Because of lava-sdk in Alpha
Installation
npm
npm i cosmolava-client
yarn
yarn add cosmolava-client
Usage
- Use build in lava-sdk instance
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)
- Provide your own lava-sdk instance(To use this approach you need to check lava-sdk compatibility with this package by yourself)
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 ❤️