Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
distribution
import { Network } from "@injectivelabs/networks"; import { MsgBroadcasterWithPk } from "@injectivelabs/sdk-ts/core/tx"; import { MsgWithdrawDelegatorReward } from "@injectivelabs/sdk-ts/core/modules"; const injectiveAddress = "inj1..."; const validatorAddress = "inj1..."; /* create message in proto format */ const msg = MsgWithdrawDelegatorReward.fromJSON({ validatorAddress, delegatorAddress: injectiveAddress, }); const privateKey = "0x..."; /* broadcast transaction */ const txHash = await new MsgBroadcasterWithPk({ privateKey, network: Network.Mainnet }).broadcast({ msgs: msg }); console.log(txHash);
import { Network } from "@injectivelabs/networks"; import { MsgBroadcasterWithPk } from "@injectivelabs/sdk-ts/core/tx"; import { MsgWithdrawValidatorCommission } from "@injectivelabs/sdk-ts/core/modules"; const injectiveAddress = "inj1..."; const validatorAddress = "inj1..."; /* create message in proto format */ const msg = MsgWithdrawValidatorCommission.fromJSON({ validatorAddress, }); const privateKey = "0x..."; /* broadcast transaction */ const txHash = await new MsgBroadcasterWithPk({ privateKey, network: Network.Testnet }).broadcast({ msgs: msg }); console.log(txHash);