Cosmos object exposes a rest(network) method that allows you to call RPC methods exposed
through HTTPS. RPC endpoints are mapped directly to the REST API object structure:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Apophis provides a REST API abstraction for Cosmos RPCs.
Cosmos object exposes a rest(network) method that allows you to call RPC methods exposed
through HTTPS. RPC endpoints are mapped directly to the REST API object structure:
import { Cosmos } from '@apophis-sdk/cosmos';
const network = await Cosmos.getNetworkFromRegistry('neutrontestnet');
const { balances, pagination } = await Cosmos.rest(network).bank.v1beta1.balances['neutron1...']('GET');
console.log(balances);
import { Cosmos } from '@apophis-sdk/cosmos';
const network = await Cosmos.getNetworkFromRegistry('neutrontestnet');
const api = await Cosmos.rest(network) as any;
// I genuinely have no idea if this endpoint exists, but it demonstrates the point
const { items, pagination } = await api.authz.v1beta1['neutron1...'].grants('GET');
console.log(items);