File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,10 @@ HDNode.prototype.getFingerprint = function () {
136136 return this . getIdentifier ( ) . slice ( 0 , 4 )
137137}
138138
139+ HDNode . prototype . getPublicKeyBuffer = function ( ) {
140+ return this . keyPair . getPublicKeyBuffer ( )
141+ }
142+
139143HDNode . prototype . neutered = function ( ) {
140144 var neuteredKeyPair = new ECPair ( null , this . keyPair . Q , {
141145 network : this . keyPair . network
Original file line number Diff line number Diff line change @@ -121,6 +121,15 @@ describe('HDNode', function () {
121121 } ) )
122122 } )
123123
124+ describe ( 'getPublicKeyBuffer' , function ( ) {
125+ it ( 'wraps keyPair.getPublicKeyBuffer' , sinon . test ( function ( ) {
126+ this . mock ( keyPair ) . expects ( 'getPublicKeyBuffer' )
127+ . once ( ) . withArgs ( ) . returns ( 'pubKeyBuffer' )
128+
129+ assert . strictEqual ( hd . getPublicKeyBuffer ( ) , 'pubKeyBuffer' )
130+ } ) )
131+ } )
132+
124133 describe ( 'sign' , function ( ) {
125134 it ( 'wraps keyPair.sign' , sinon . test ( function ( ) {
126135 this . mock ( keyPair ) . expects ( 'sign' )
You can’t perform that action at this time.
0 commit comments