derPrefix property
Adding this prefix to a raw public key is sufficient to DER-encode it. See https://github.com/dfinity/agent-js/issues/42#issuecomment-716356288
Implementation
static final Uint8List derPrefix = Uint8List.fromList([
...[48, 42], // SEQUENCE
...[48, 5], // SEQUENCE
...[6, 3], // OBJECT
...[43, 101, 112], // Ed25519 OID
...[3], // OBJECT
...[Ed25519PublicKey.rawKeyLength + 1], // BIT STRING
...[0], // 'no padding'
]);