Hi I am trying to get txn fee for a test.txraw file.
When I am running the command on terminal I am getting response.
Command used on terminal: "cardano-cli transaction calculate-min-fee --tx-body-file test.txraw --tx-in-count 1 --tx-out-count 2 --witness-count 2 --testnet-magic 1097911063 --protocol-params-file protocol.json | egrep -o '[0-9]+'"
Response: 202065
On Node JS side I am running this using “node-cmd”
let fee = cmd.runSync([
"cardano-cli transaction calculate-min-fee",
`--tx-body-file test.txraw`,
`--tx-in-count 1`,
`--tx-out-count 2`,
`--witness-count 2`,
`--testnet-magic 1097911063`,
`--protocol-params-file protocol.json`,
`| egrep -o '[0-9]+'`
])
Response: Cannot read property 'toString'
of undefined.
Please help on this.