A battery energy storage operator has secured a “milestone” agreement to accelerate the development of two Scottish projects.