Skip to content

Instantly share code, notes, and snippets.

@matiu
Created March 25, 2014 18:28
Show Gist options
  • Select an option

  • Save matiu/9768106 to your computer and use it in GitHub Desktop.

Select an option

Save matiu/9768106 to your computer and use it in GitHub Desktop.

Revisions

  1. matiu created this gist Mar 25, 2014.
    54 changes: 54 additions & 0 deletions gistfile1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,54 @@
    'use strict';
    var imports = require('soop').imports();
    var bitcore = require('bitcore');
    var Storage = imports.Storage || require('./Storage');

    function Wallet(opts) {
    opts = opts || {};

    this.network = opts.network === 'livenet' ?
    bitcore.networks.livenet : bitcore.networks.testnet;

    this.neededCosigners = opts.neededCosigners || 3;
    this.totalCosigners = opts.totalCosigners || 5;

    this.dirty = 1;
    }

    Wallet.read = function (BIP38password) {
    };

    Wallet.prototype.generateOwnMasterKey = function () {
    };


    Wallet.prototype.getMasterPrivKey = function (BIP38password) {
    };


    Wallet.prototype.getMasterPubKey = function () {
    };


    Wallet.prototype.addCosignerMasterPubKey = function (pubkey) {
    };

    Wallet.prototype.haveAllNeededPubKeys = function () {
    };


    Wallet.prototype.generateAddress = function () {
    if (! this.haveAllNeededPubKeys) return;

    };


    Wallet.prototype.store = function () {
    };


    // Input: Bitcore's Transaction, sign with ownPK.
    Wallet.prototype.signTx = function (tx) {
    };

    module.exports = require('soop')(Wallet);