Skip to content

Commit 0a40422

Browse files
chore: some more docs updates
1 parent 85f7261 commit 0a40422

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

Sources/Web3Core/EthereumNetwork/RequestParameter/RequestParameter+Encodable.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,16 @@ extension RequestParameter: Encodable {
1515

1616
```swift
1717
let someArray: [RequestParameter] = [
18-
.init(rawValue: 12)!,
19-
.init(rawValue: "this")!,
20-
.init(rawValue: 12.2)!,
21-
.init(rawValue: [12.2, 12.4])!
18+
.init(rawValue: 12)!,
19+
.init(rawValue: "this")!,
20+
.init(rawValue: 12.2)!,
21+
.init(rawValue: [12.2, 12.4])!
2222
]
2323
let encoded = try JSONEncoder().encode(someArray)
2424
print(String(data: encoded, encoding: .utf8)!)
2525
//> [12,\"this\",12.2,[12.2,12.4]]`
2626
```
27+
- Parameter encoder: encoder
2728
*/
2829
func encode(to encoder: Encoder) throws {
2930
var enumContainer = encoder.singleValueContainer()

Sources/Web3Core/EthereumNetwork/RequestParameter/RequestParameter+RawRepresentable.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ extension RequestParameter: RawRepresentable {
1515
which encodes an array of self-assosiated values.
1616

1717
You're totally free to use explicit and more convenience member init as `RequestParameter.int(12)` in your code.
18+
- Parameter rawValue: one of the supported types like `Int`, `UInt` etc.
1819
*/
1920
init?(rawValue: APIRequestParameterType) {
2021
/// force casting in this switch is safe because

Sources/Web3Core/KeystoreManager/BIP44.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ public enum BIP44Error: LocalizedError, Equatable {
3636

3737
public protocol TransactionChecker {
3838
/**
39-
It verifies if the provided address has at least one transaction
40-
- Parameter address: to be queried
41-
- Throws: any error related to query the blockchain provider
42-
- Returns: `true` if the address has at least one transaction, `false` otherwise
43-
*/
39+
It verifies if the provided address has at least one transaction
40+
- Parameter ethereumAddress: to be queried
41+
- Throws: any error related to query the blockchain provider
42+
- Returns: `true` if the address has at least one transaction, `false` otherwise
43+
*/
4444
func hasTransactions(ethereumAddress: EthereumAddress) async throws -> Bool
4545
}
4646

@@ -105,11 +105,11 @@ extension String {
105105
}
106106

107107
/**
108-
Transforms a bip44 path into a new one changing account & index. The resulting one will have the change value equal to `0` to represent the external chain. The format will be `m/44'/coin_type'/account'/change/address_index`
109-
- Parameter account: the new account to use
110-
- Parameter addressIndex: the new addressIndex to use
111-
- Returns: a valid bip44 path with the provided account, addressIndex and external change or `nil` otherwise
112-
*/
108+
Transforms a bip44 path into a new one changing account & index. The resulting one will have the change value equal to `0` to represent the external chain. The format will be `m/44'/coin_type'/account'/change/address_index`
109+
- Parameter account: the new account to use
110+
- Parameter addressIndex: the new addressIndex to use
111+
- Returns: a valid bip44 path with the provided account, addressIndex and external change or `nil` otherwise
112+
*/
113113
func newPath(account: Int, addressIndex: Int) -> String? {
114114
guard isBip44Path else {
115115
return nil

0 commit comments

Comments
 (0)