Add api-test.js and check for valid curve names