BIP38 is a standard process to encrypt Bitcoin and crypto currency private keys that is less susceptible to brute force attacks thus protecting the user.
encrypt is calling encryptRaw with the wrong arity, as a result address was silently passed to progressCallback and progressCallback to scryptParams, because javascript is an unspeakable evil.
encrypt is calling encryptRaw with the wrong arity, as a result address was silently passed to progressCallback and progressCallback to scryptParams, because javascript is an unspeakable evil.