If there is just reason to fear the commission of an offense, the person complained of may be required to enter into an undertaking in such sum, not exceeding one thousand dollars, as the magistrate may direct, with one or more sufficient sureties to abide the order of the next district court of the county, and in the meantime to keep the peace toward the people of this state, and particularly toward the complainant.
N.D.C.C. § 29-02-11