Estimate the weight of a Monero batch before selecting inputs
Two Monero transfers for the same amount can have different weights because they consume different numbers of outputs. Estimate by transaction shape when planning a test batch.
Compare two candidate shapes
This fixture models three inputs and two outputs with RingCT. Use the ring size applicable to your target protocol. Repeat with one input and retain both size and weight results. POST this example to /json_rpc on monero-wallet-rpc.
{
"jsonrpc": "2.0",
"id": "guide",
"method": "estimate_tx_size_and_weight",
"params": {
"n_inputs": 3,
"n_outputs": 2,
"ring_size": 16,
"rct": true
}
}
Use weight for comparisons
Holding other parameters constant makes the additional cost of fragmented inputs visible. size and weight are separate outputs. Neither field is a fee quote. Apply the applicable fee rate and wallet policy when budgeting, then compare with the actual constructed transfer before committing funds.