Open webmaster128 opened 2 years ago
maybe we do docs incrementally as well, so something like:
for query client maybe we can keep initial docs the same, but add an additional link to how you can leverage the rpcClients
option in telescope if you're not doing it manually https://github.com/osmosis-labs/telescope#rpc-clients
This allows for syntax like this for RPC:
import { osmosis } from './codegen';
const main = async () => {
const client = await osmosis.ClientFactory.createRPCQueryClient({ rpcEndpoint });
// now you can query the modules
const pool = await client.osmosis.gamm.v1beta1.pool({ poolId: "1" });
const balance = await client.cosmos.bank.v1beta1.allBalances({ address: 'osmo1addresshere' });
};
and for instantiating signing clients we have this section we could point to, if folks use our amino converters https://github.com/osmosis-labs/telescope#manually-registering-types
we also have generated signing clients https://github.com/osmosis-labs/telescope#stargate-clients
Update of this page: https://github.com/cosmos/cosmjs/blob/main/packages/stargate/CUSTOM_PROTOBUF_CODECS.md