Skip to content

prepareTransactionForSigning

The prepareTransactionForSigning method prepares an EVM transaction for MPC signing by adding necessary fields like gas estimation, nonce, and chain ID.

Usage

const { transaction, hashesToSign } =
  await evmChain.prepareTransactionForSigning({
    to: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
    from: '0x8626f6940E2eb28930eFb4CeF49B2d1F2C9C1199',
    value: 1n, // 1 wei
    data: '0x', // Empty data for a simple ETH transfer
  })

Parameters

ParameterTypeDescription
transactionRequestEVMTransactionRequestThe transaction request object

Returns

PropertyTypeDescription
transactionEVMUnsignedTransactionThe prepared transaction with all required fields
hashesToSignHashToSign[]Array of hash(es) to be signed by the MPC network