This is a tough, but not uncommon problem. It sounds like your former female friend probably feels bitter, angry, betrayed and perhaps jealous–maybe all of the above. The ending of her relationship with the man who is your boyfriend (and the father of her children) was obviously very painful for her and it sounds like she is not over that loss.
Although the hurt and anger is most obviously “caused” by what happened between your boyfriend and this woman, a lot of times the brunt of the anger gets directed at the boyfriend’s new love interest. Given that she and he share children and are co-parenting the kids, it is probably safer for her to direct most of her anger at you rather than him. In addition, she may have strong feelings of anger and betrayal directly toward you because you are a former friend of hers who is now her ex’s girlfriend. So what can you do?
It is impossible to predict whether or when your former friend will come to a different place emotionally and mentally about you and your relationship with your former boyfriend, so you have to be prepared to deal with this in an ongoing way. There is no value right now in pushing yourself into the situation or putting yourself in the line of fire to bear the brunt of her anger. You are doing the right thing right now to keep your distance. It would be helpful if you could “detach” from the problem emotionally and for now, let it be between the two of them. Focus on your own happiness and cultivating a happy relationship with your boyfriend.
Your boyfriend also has some responsibility here. While you cannot control his behavior, it is important to talk with him about whether there are ways he can handle things that do not promote the ongoing hostility. While the situation may or may not change, it is more likely to improve as time passes. In the meantime, try to maintain your distance and keep your focus on your own life. This will probably help a great deal.