toJson method

  1. @override
Map<String, dynamic> toJson()
override

Converts the object to a JSON representation.

Implementation

@override
Map<String, dynamic> toJson() {
  return {
    "inputs": inputs.map((e) => e.toJson()).toList(),
    "outputs": outputs.map((e) => e.toJson()).toList(),
    "fee": fee.toString(),
    "ttl": ttl?.toString(),
    "certs": certs?.map((e) => e.toJson()).toList(),
    "withdrawals": withdrawals?.toJson(),
    "update": update?.toJson(),
    "auxiliary_data_hash": auxiliaryDataHash?.toJson(),
    "validity_start_interval": validityStartInterval?.toString(),
    "mint": mint?.toJson(),
    "script_data_hash": scriptDataHash?.toJson(),
    "collateral": collateral?.map((e) => e.toJson()).toList(),
    "required_signers": requiredSigners?.map((e) => e.toJson()).toList(),
    "network_id": network?.value,
    "collateral_return": collateralReturn?.toJson(),
    "total_collateral": totalCollateral?.toString(),
    "reference_inputs": referenceInputs?.map((e) => e.toJson()).toList()
  };
}