decodeInput function
Decode input data and return DecodedInput or throws error
Implementation
Future<DecodedInput?> decodeInput({
required String messageBody,
required String contractAbi,
MethodName? method,
required bool internal,
}) async {
final res = await createLib().decodeInput(
messageBody: messageBody,
contractAbi: contractAbi,
method: method == null ? null : jsonEncode(method),
internal: internal,
);
final decoded = jsonDecode(res);
if (decoded == null) return null;
return DecodedInput.fromJson(decoded);
}