Web3 Gateway Transactions
Using gRPC
Fetch response for preparing a transaction
import { Msgs, IndexerGrpcTransactionApi } from '@injectivelabs/sdk-ts'
import { getNetworkEndpoints, Network } from '@injectivelabs/networks'
import { EvmChainId } from '@injectivelabs/ts-types'
const endpoints = getNetworkEndpoints(Network.Testnet)
const indexerGrpcTransactionApi = new IndexerGrpcTransactionApi(endpoints.indexer)
const address = '0x...' // ethereum address
const chainId = EvmChainId.Sepolia
const message = { ... } as Msgs
const memo = '...'
const prepareTxResponse = await indexerGrpcTransactionApi.prepareTxRequest({
address,
chainId,
message,
memo
})
console.log(prepareTxResponse)Fetch response for preparing a cosmos transaction
Fetch response for broadcasting transactions using the Web3Gateway
Fetch response for broadcasting a cosmos transactions.
Fetch Web3Gateway Fee Payer
Last updated
