Skip to content

Commit 10a3270

Browse files
committed
BIP44 doc break at 120 columns
1 parent 7c9ca5f commit 10a3270

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

Sources/Web3Core/KeystoreManager/BIP44.swift

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,16 @@ import Foundation
77

88
public protocol BIP44 {
99
/**
10-
Derive an ``HDNode`` based on the provided path. The function will throw ``BIP44Error.warning`` if it was invoked with throwOnWarning equal to`true` and the root key doesn't have a previous child with at least one transaction. If it is invoked with throwOnError equal to `false` the child node will be derived directly using the derive function of ``HDNode``. This function needs to query the blockchain history when throwOnWarning is `true`, so it can throw network errors.
10+
Derive an ``HDNode`` based on the provided path. The function will throw ``BIP44Error.warning`` if it was invoked with throwOnWarning equal to
11+
`true` and the root key doesn't have a previous child with at least one transaction. If it is invoked with throwOnError equal to `false` the child node will be
12+
derived directly using the derive function of ``HDNode``. This function needs to query the blockchain history when throwOnWarning is `true`, so it can throw
13+
network errors.
1114
- Parameter path: valid BIP44 path.
12-
- Parameter throwOnWarning: `true` to use [Account Discovery](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#account-discovery) standard, otherwise it will dervive the key using the derive function of ``HDNode``.
13-
- Throws: ``BIP44Error.warning`` if the child key shouldn't be used according to [Account Discovery](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#account-discovery) standard.
15+
- Parameter throwOnWarning: `true` to use
16+
[Account Discovery](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#account-discovery) standard,
17+
otherwise it will dervive the key using the derive function of ``HDNode``.
18+
- Throws: ``BIP44Error.warning`` if the child key shouldn't be used according to
19+
[Account Discovery](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#account-discovery) standard.
1420
- Returns: an ``HDNode`` child key for the provided `path` if it can be created, otherwise `nil`
1521
*/
1622
func derive(path: String, throwOnWarning: Bool, transactionChecker: TransactionChecker) async throws -> HDNode?
@@ -19,7 +25,7 @@ public protocol BIP44 {
1925
public enum BIP44Error: LocalizedError, Equatable {
2026
/// The selected path doesn't fulfill BIP44 standard, you can derive the root key anyway
2127
case warning
22-
28+
2329
public var errorDescription: String? {
2430
switch self {
2531
case .warning:

0 commit comments

Comments
 (0)