If the share of a minor is sold, the proceeds of the sale may be paid by the referee making the sale to his guardian, or the guardian ad litem appointed for him in the action, upon giving the security required by law, or directed by order of the court.
SDCL 21-45-35