fixed export in package.js, fixed public key passing