Auth
Example code snippets to query the auth module on the chain.
Using gRPC
Fetch parameters such as max memo characters or tsx signature limit
import { ChainGrpcAuthApi } from '@injectivelabs/sdk-ts'
import { getNetworkEndpoints, Network } from '@injectivelabs/networks'
const endpoints = getNetworkEndpoints(Network.Testnet)
const chainGrpcAuthApi = new ChainGrpcAuthApi(endpoints.grpc)
const moduleParams = await chainGrpcAuthApi.fetchModuleParams()
console.log(moduleParams)Fetch ccount details associated with an injective address such as the account's address, sequence, or pub_key
import { ChainGrpcAuthApi } from '@injectivelabs/sdk-ts'
import { getNetworkEndpoints, Network } from '@injectivelabs/networks'
const endpoints = getNetworkEndpoints(Network.Testnet)
const chainGrpcAuthApi = new ChainGrpcAuthApi(endpoints.grpc)
const injectiveAddress = 'inj...'
const accountDetailsResponse = await chainGrpcAuthApi.fetchAccount(
injectiveAddress,
)
console.log(accountDetailsResponse)Fetch list of accounts on chain
Using HTTP REST
Fetch account details associated with an injective address such as the account's address, sequence, or pub_key
Fetch cosmos address from an injective address
Last updated
