The client to use for the transaction. AvalancheWalletCoreClient
The parameters for the transaction. PrepareIncreaseL1ValidatorBalanceTxnParameters
The unsigned transaction. PrepareIncreaseL1ValidatorBalanceTxnReturnType
import { prepareIncreaseL1ValidatorBalanceTxn } from "@avalanche-sdk/client/methods/wallet/pChain/prepareIncreaseL1ValidatorBalanceTxn";
import { createAvalancheWalletClient } from "@avalanche-sdk/client/clients/createAvalancheWalletClient";
import { privateKeyToAvalancheAccount } from "@avalanche-sdk/client/accounts";
import { avalanche } from "@avalanche-sdk/client/chains";
const account = privateKeyToAvalancheAccount("0x1234567890123456789012345678901234567890");
const walletClient = createAvalancheWalletClient({
account,
chain: avalanche,
});
const pChainIncreaseL1ValidatorBalanceTxnRequest = await prepareIncreaseL1ValidatorBalanceTxn(walletClient, {
balanceInAvax: 1,
validationId: "11111111111111111111111111111111LpoYY",
});
console.log(pChainIncreaseL1ValidatorBalanceTxnRequest);
Prepares an increase L1 validator balance transaction for the P-chain.