initCborSerializer function

SelfDescribeEncoder initCborSerializer()

Implementation

SelfDescribeEncoder initCborSerializer() {
  cbor.init();
  final output = cbor.OutputStandard();
  final principalEncoder = PrincipalEncoder();
  final bigIntEncoder = BigIntEncoder();
  final bufferEncoder = BufferEncoder();
  final byteBufferEncoder = ByteBufferEncoder();

  return SelfDescribeEncoder(output)
    ..addEncoder(principalEncoder)
    ..addEncoder(bigIntEncoder)
    ..addEncoder(bufferEncoder)
    ..addEncoder(byteBufferEncoder);
}