UNPKG

ibctminer

Version:

```js const IntMiner = require('./src'); const Debug = require('./src/log')(); const fs = require('fs'); const COMP = '[SIPC]';

24 lines (20 loc) 605 B
const multiHashing = require('ibctminerscrypt'); const EventEmitter = require('events'); const Debug = require('../log')(); const COMP = '[scryptApi]'; class scryptApi extends EventEmitter { constructor({}) { super(); var _this = this; _this.genhashFunc = multiHashing['scryptsipc']; } getAlgoName() { return 'Scrypt'; } genHash(data, length, varity) { return this.genhashFunc(data, length, varity).toString('hex'); } }; module.exports = function RunscryptApi(options = {}) { return new scryptApi(options); };