decodeSelectorDagJson function

Future<Selector> decodeSelectorDagJson(
  1. Uint8List bytes
)

Decode a selector from DAG-JSON bytes. A bare selector or a {"selector": ...} envelope are both accepted.

Implementation

Future<Selector> decodeSelectorDagJson(Uint8List bytes) async {
  return _parseMaybeEnveloped(await DagJsonCodec().decode(bytes));
}