Connect and communicate with the Akash Network using keplr wallet for signed transactions, and direct RPC for unsigned. Pure JS library for modern browser compatibility. NodeJS support, and a slick min CLI to reduce complexity.
Compatible with modern browsers, nodejs 14+ and Webpack 5
install from npm or yarn
npm i @akashnetwork/akashjs
yarn add @akashnetwork/akashjsor use the umd bundle the object returned is Window.akjs
<script
type="text/javascript"
src="https://unpkg.com/@akashnetwork/akashjs@0.0.6/umd/akashjs.js"
></script>install globally to use akjs cli
➜ npm i -g @akashnetwork/akashjs
➜ akjs
version: 0.0.7While akashjs manages much under the hood, more control is availble through all of the exported types, clients and protos.
Import the registry for signing and broadcasting signed transactions, this is needed if you plan to use Stargate
import { stargate as akashStargate } from "@akashnetwork/akashjs";
import { Registry } from "@cosmjs/proto-signing";
const myRegistry = new Registry([
...defaultRegistryTypes,
...akashStargate.registry,
]);
const client = await SigningStargateClient.connectWithSigner(
`http://rpcUrl/`,
offlineSigner,
{
registry: myRegistry,
}
);This repository uses node 16, and yarn 1.2+, webpack 5 for umd bundling and is written in typescript. PRs are welcome.