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.
secret
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); Copy
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);
Optional
The list of the ECDSA private keys used for populating the transaction.
The provider is used to fetch data from the network if it is required for signing.
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.Throws
The
secret
must be an array of at least two elements.Example