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
Parameter | Type | Description |
---|---|---|
transactionRequest | EVMTransactionRequest | The transaction request object |
Returns
Property | Type | Description |
---|---|---|
transaction | EVMUnsignedTransaction | The prepared transaction with all required fields |
hashesToSign | HashToSign[] | Array of hash(es) to be signed by the MPC network |