Simple Javascript API for gadgets that use challenges