Javascript implementation of Magma library from OBiBa