First, all those constants need to be in an other file. Not in the main JS file.
I'd suggest the low-level API should be a simple binding to libetpan.
Therefore, it should not change how the constants work.