Uint8List serializeBigInt(BigInt bi) { return Uint8List.fromList( hex.decode(bi.toRadixString(16).padLeft(64, '0'))); }