decode static method

List<int> decode(
  1. dynamic data, {
  2. SolanaRequestEncoding? type,
})

Implementation

static List<int> decode(dynamic data, {SolanaRequestEncoding? type}) {
  final correctType = _findTypes(data);
  if (type != null && correctType.item1 != type) {
    throw SolanaPluginException('Incorrect type.',
        details: {'expected': correctType.item1, 'type': type});
  }
  return _decode(correctType.item2, correctType.item1);
}