Removes deprecated ECKey.export function
This commit is contained in:
parent
d7eb87433c
commit
8f7f50d555
4 changed files with 7 additions and 20 deletions
src
13
src/eckey.js
13
src/eckey.js
|
@ -59,14 +59,6 @@ ECKey.prototype.getPub = function(compressed) {
|
|||
return ECPubKey(ecparams.getG().multiply(this.priv),compressed)
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Reserved keyword, factory pattern. Use toHex, toBytes, etc.
|
||||
*/
|
||||
ECKey.prototype['export'] = function(format) {
|
||||
var format = format || 'hex'
|
||||
return this['to' + format.substr(0, 1).toUpperCase() + format.substr(1)]()
|
||||
}
|
||||
|
||||
ECKey.prototype.toBin = function() {
|
||||
return convert.bytesToString(this.toBytes())
|
||||
}
|
||||
|
@ -154,11 +146,6 @@ ECPubKey.prototype.multiply = function(key) {
|
|||
return ECPubKey(this.pub.multiply(ECKey(key).priv),this.compressed)
|
||||
}
|
||||
|
||||
ECPubKey.prototype['export'] = function(format) {
|
||||
var format = format || 'hex';
|
||||
return this['to' + format.substr(0, 1).toUpperCase() + format.substr(1)]()
|
||||
}
|
||||
|
||||
ECPubKey.prototype.toBytes = function(compressed) {
|
||||
if (compressed === undefined) compressed = this.compressed
|
||||
return this.pub.getEncoded(compressed)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue