Direct contributions

This method returns the direct contribution of each process in the system to the total cost result.

$$ q^T * diagm(s) $$

Rest APIGET result/{result-id}/cost-contributions
JSON-RPCresult/cost-contributions
Snake caseresult.get_cost_contributions
Camel caseresult.getCostContributions
Return typeList[TechFlowValue]

Examples

TypeScript IPC

  const contributions = await result.getCostContributions();
  for (const c of contributions) {
    console.log(`${c.techFlow?.provider?.name}: ${c.amount} ${code}`);
  }
  // Q: 15 USD
  // P: 45 USD