It is lawful for any party of whom a bond, undertaking, or other obligation is required, to agree with that party's surety or sureties for the deposit of any or all moneys and assets for which that party and that party's surety or sureties are or may be held responsible, with a bank, savings bank, safe deposit or trust company, authorized by law to do business as such, or with other depository approved by the court or a judge thereof, if such deposit is otherwise proper, for the safekeeping thereof, and in such manner as to prevent the withdrawal of such money or assets or any part thereof, without the written consent of such surety or sureties, or an order of court, or a judge thereof made on such notice to such surety or sureties as such court or judge may direct. Such agreement does not in any manner release from or change the liability of the principal or sureties as established by the terms of the said bond.
N.D.C.C. § 22-03-15