|
@ -162,7 +162,7 @@ PublicKey._transformX = function(odd, x){ |
|
|
* @returns {PublicKey} A new valid instance of PublicKey |
|
|
* @returns {PublicKey} A new valid instance of PublicKey |
|
|
*/ |
|
|
*/ |
|
|
PublicKey.fromJSON = function(json) { |
|
|
PublicKey.fromJSON = function(json) { |
|
|
if (JSUtil.isValidJson(json)) { |
|
|
if (JSUtil.isValidJSON(json)) { |
|
|
json = JSON.parse(json); |
|
|
json = JSON.parse(json); |
|
|
} |
|
|
} |
|
|
var x = BN(json.x, 'hex'); |
|
|
var x = BN(json.x, 'hex'); |
|
|