File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Sources/BitcoinKit/Core/Keys Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 2626import Foundation
2727
2828public final class HDKeychain {
29- let privateKey : HDPrivateKey
29+ private let rootKey : HDPrivateKey
3030
31- public init ( privateKey : HDPrivateKey ) {
32- self . privateKey = privateKey
31+ public init ( rootKey : HDPrivateKey ) {
32+ self . rootKey = rootKey
3333 }
3434
3535 public convenience init ( seed: Data , network: Network ) {
36- self . init ( privateKey : HDPrivateKey ( seed: seed, network: network) )
36+ self . init ( rootKey : HDPrivateKey ( seed: seed, network: network) )
3737 }
3838 /// Parses the BIP32 path and derives the chain of keychains accordingly.
3939 /// Path syntax: (m?/)?([0-9]+'?(/[0-9]+'?)*)?
@@ -55,7 +55,7 @@ public final class HDKeychain {
5555 /// "m/b/c" (alphabetical characters instead of numerical indexes)
5656 /// "m/1.2^3" (contains illegal characters)
5757 public func derivedKey( path: String ) throws -> HDPrivateKey {
58- var key = privateKey
58+ var key = rootKey
5959
6060 var path = path
6161 if path == " m " || path == " / " || path == " " {
You can’t perform that action at this time.
0 commit comments