Misc functions to supplement ripple-lib