serialize<T extends BorshObjectMixin> method
Encodes input
using BorshObjectMixin.borshSchema.
Implementation
Iterable<int> serialize<T extends BorshObjectMixin>(
final T input,
) {
assert(
_debugSerialize(input),
'Keys found in `schema` do not match the keys found in `toJson()` for $input.',
);
return encode(input.borshSchema, input.toJson());
}