'use strict';

const crypto = require('crypto');
const Network = require('./network');
const Witness = require('./witness');
const MAX_MEMORY = Math.pow(2, 21) + (64 * 1000);

class Secret extends EncryptedPromise {
  constructor (settings = {}) {
    super(settings);

    // assign internal secret
    this._secret = (typeof settings === 'string') ? settings : JSON.stringify(settings);

    // TODO: check and document upstream pattern
    this.load();
  }
}

module.exports = EncryptedPromise;
@@ -18,159 +18,46 @@
 nst 
+En
 crypt
-o = require('crypto');%0Aconst Network = require('./network');%0Aconst Witness = require('./witness');%0Aconst MAX_MEMORY = Math.pow(2, 21) + (64 * 1000
+edPromise = require('./promise'
 );%0A%0A

Add upstream EncryptedPromise class to Secret