Create new docs for using telescope generated message types
Update of this page: https://github.com/cosmos/cosmjs/blob/main/packages/stargate/CUSTOM_PROTOBUF_CODECS.md
maybe we do docs incrementally as well, so something like:
- Step 1: Acquire the definition files (keep same)
- Step 2: Generate codec files (Replace with telescope)
- Step 3a: Instantiate a signing client using your custom message types (keep same, potentially add a link)
- Step 3b: Instantiate a query client using your custom query service (keep same, potentially add a link)
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