Function populateTransactionMultisigECDSA

Populates missing properties meant for signing using multiple ECDSA private keys. It uses populateTransactionECDSA, where the address of the first ECDSA key is set as the secret argument.

The secret must be an array of at least two elements.

import { populateTransactionMultisigECDSA, types, Web3ZKsyncL2 } from "web3-plugin-zksync";

const PRIVATE_KEY1 = "<PRIVATE_KEY1>";
const PRIVATE_KEY2 = "<PRIVATE_KEY2>";

const provider = Web3ZKsyncL2.initWithDefaultProvider(types.Network.Sepolia);

const populatedTx = await populateTransactionMultisigECDSA(
{
chainId: 270,
to: "<RECEIVER>",
value: 7_000_000_000,
},
[PRIVATE_KEY1, PRIVATE_KEY2],
provider
);