@dashevo/dashcore-lib
Advanced tools
Comparing version 0.18.0 to 0.18.1
@@ -67,2 +67,13 @@ /* eslint-disable */ | ||
var hashProperty = { | ||
configurable: false, | ||
enumerable: true, | ||
get: function() { | ||
return this._getID(); | ||
} | ||
}; | ||
Object.defineProperty(PublicKey.prototype, 'hash', hashProperty); | ||
Object.defineProperty(PublicKey.prototype, 'id', hashProperty); | ||
/** | ||
@@ -69,0 +80,0 @@ * Internal function to differentiate between arguments passed to the constructor |
{ | ||
"name": "@dashevo/dashcore-lib", | ||
"version": "0.18.0", | ||
"version": "0.18.1", | ||
"description": "A pure and powerful JavaScript Dash library.", | ||
@@ -5,0 +5,0 @@ "author": "Dash Core Group, Inc. <dev@dash.org>", |
@@ -132,5 +132,20 @@ /* eslint-disable */ | ||
describe('#id', function() { | ||
it('should return Public Key hash', function() { | ||
var pk = new PublicKey('041ff0fe0f7b15ffaa85ff9f4744d539139c252a49710fb053bb9f2b933173ff9a7baad41d04514751e6851f5304fd243751703bed21b914f6be218c0fa354a341'); | ||
describe('#getValidationError', function(){ | ||
pk.hash.should.deep.equal(pk._getID()); | ||
}); | ||
}); | ||
describe('#hash', function() { | ||
it('should return Public Key hash', function() { | ||
var pk = new PublicKey('041ff0fe0f7b15ffaa85ff9f4744d539139c252a49710fb053bb9f2b933173ff9a7baad41d04514751e6851f5304fd243751703bed21b914f6be218c0fa354a341'); | ||
pk.hash.should.deep.equal(pk._getID()); | ||
}); | ||
}); | ||
describe('#getValidationError', function() { | ||
it('should recieve an invalid point error', function() { | ||
@@ -137,0 +152,0 @@ var error = PublicKey.getValidationError(invalidPoint); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3013086
45385