-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Description
Implement a new method that returns a function that creates a CoinKey instance with specified versions. For example:
CoinKey.createFactory = function(versions) {
return function(privateKey) {
return new CoinKey(privateKey, versions)
}
}example usage:
var secureRandom = require('secure-random')
var CoinKey = require('coinkey')
var dogecoinCreator = CoinKey.createFactory({public: 0x9E: private: 0x1E})
var privateKey = secureRandom.randomBuffer(32)
var ck = dogecoinCreator(privateKey)Any thoughts on a less Java-y name than createFactory()?
Metadata
Metadata
Assignees
Labels
No labels