Skip to content

Commit

Permalink
[#512] remove deriveTransparentAddressFromPublicKey from Derivation…
Browse files Browse the repository at this point in the history
…Tool
  • Loading branch information
pacu committed Aug 30, 2022
1 parent 6c0333a commit bbb1229
Showing 1 changed file with 2 additions and 23 deletions.
25 changes: 2 additions & 23 deletions Sources/ZcashLightClientKit/Tool/DerivationTool.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ public protocol KeyDeriving {
Derives a transparent address from the given transparent account private key
*/
func deriveTransparentAddressFromAccountPrivateKey(_ xprv: TransparentAccountPrivKey, index: Int) throws -> TransparentAddress

func deriveTransparentAddressFromPublicKey(_ pubkey: String) throws -> TransparentAddress

}

public enum KeyDerivationErrors: Error {
Expand Down Expand Up @@ -244,9 +241,8 @@ public class DerivationTool: KeyDeriving {
}
}

/**
derives a Unified Address from a Unified Full Viewing Key
*/

/// derives a Unified Address from a Unified Full Viewing Key
public func deriveUnifiedAddressFromUnifiedFullViewingKey(_ ufvk: UnifiedFullViewingKey) throws -> UnifiedAddress {
do {
return try deriveUnifiedAddress(from: ufvk)
Expand All @@ -255,23 +251,6 @@ public class DerivationTool: KeyDeriving {
}
}

public func deriveTransparentAddressFromPublicKey(_ pubkey: String) throws -> TransparentAddress {
guard !pubkey.isEmpty else {
throw KeyDerivationErrors.invalidInput
}

do {
return TransparentAddress(
validatedEncoding: try rustwelding.derivedTransparentAddressFromPublicKey(
pubkey,
networkType: networkType
)
)
} catch {
throw KeyDerivationErrors.derivationError(underlyingError: error)
}
}

/**
Derives the transparent funds account private key from the given seed
- Throws:
Expand Down

0 comments on commit bbb1229

Please # to comment.