toJson method
Convert the TransactionRaw object to a JSON representation.
Implementation
@override
Map<String, dynamic> toJson() {
return {
"ref_block_bytes": BytesUtils.tryToHexString(refBlockBytes),
"ref_block_num": refBlockNum?.toString(),
"ref_block_hash": BytesUtils.tryToHexString(refBlockHash),
"expiration": expiration.toString(),
"auths": auths?.map((auth) => auth.toJson()).toList(),
"data": StringUtils.tryDecode(data),
"contract": contract.map((c) => c.toJson()).toList(),
"scripts": BytesUtils.tryToHexString(scripts),
"timestamp": timestamp.toString(),
"fee_limit": feeLimit?.toString(),
}..removeWhere((key, value) => value == null);
}