Skip to content

Commit ef740e4

Browse files
Update API docs to add links to Eth API namespaces.
1 parent 9d65c07 commit ef740e4

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

Sources/Core/EthereumNetwork/Request/APIRequest.swift

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,20 @@ public typealias TransactionHash = Hash // 64 chars length without 0x
6767
/// This protocol is just utility one, which declares some convenient initializer which have both `Int` and `BigInt` types, but don’t have any common protocol which declares such requirement.
6868
///
6969
/// ### Utility types
70-
/// - `struct RequestBody: Encodable` — just a request body that passes into request body.
71-
/// - `public enum REST: String` — enum of REST methods. Only `POST` and `GET` presented yet.
72-
/// - `enum RequestParameter` — this enum is a request composing helper. It make happened to encode request attribute as heterogeneous array.
73-
/// - `protocol APIRequestParameterType: Encodable` — this type is part of the ``RequestParameter`` enum mechanism which purpose is to restrict types that can be passed as associated types within `RequestParameter` cases.
74-
/// - `protocol APIRequestParameterElementType: Encodable` — this type purpose is the same as ``APIRequestParameterType` one except this one is made for `Element`s of an `Array` s when the latter is an associated type of a given `RequestParameter` case.
70+
/// - `struct RequestBody: Encodable` — just a request body that passes into request body.
71+
/// - `public enum REST: String` — enum of REST methods. Only `POST` and `GET` presented yet.
72+
/// - `enum RequestParameter` — this enum is a request composing helper. It make happened to encode request attribute as heterogeneous array.
73+
/// - `protocol APIRequestParameterType: Encodable` — this type is part of the ``RequestParameter`` enum mechanism which purpose is to restrict types that can be passed as associated types within `RequestParameter` cases.
74+
/// - `protocol APIRequestParameterElementType: Encodable` — this type purpose is the same as ``APIRequestParameterType` one except this one is made for `Element`s of an `Array` s when the latter is an associated type of a given `RequestParameter` case.
75+
///
76+
/// ## Supported Namespaces
77+
/// - eth Namespace - https://ethereum.org/en/developers/docs/apis/json-rpc/#json-rpc-methods
78+
/// - personal Namespace - https://geth.ethereum.org/docs/rpc/ns-personal
79+
/// - tx Namespace - https://geth.ethereum.org/docs/rpc/ns-txpool
7580
public enum APIRequest {
7681
// MARK: - Official Ethereum API
77-
82+
// eth Namespace - https://ethereum.org/en/developers/docs/apis/json-rpc/#json-rpc-methods
83+
7884
/// Gas price request
7985
case gasPrice
8086

@@ -188,7 +194,8 @@ public enum APIRequest {
188194
/// by effective tip per gas and the coresponding effective tip for the percentile will be determined, accounting for gas consumed."
189195
case feeHistory(BigUInt, BlockNumber, [Double])
190196

191-
// MARK: - Additional Ethereum API
197+
// MARK: - Personal Ethereum API
198+
// personal Namespace - https://geth.ethereum.org/docs/rpc/ns-personal
192199

193200
/// Creates new account.
194201
///
@@ -212,6 +219,9 @@ public enum APIRequest {
212219
/// - String: Passphrase to unlock the account.
213220
/// - UInt?: Duration in seconds how long the account should remain unlocked for.
214221
case unlockAccount(Address, String, UInt?)
222+
223+
// MARK: - Tx Ethereum API
224+
// tx Namespace - https://geth.ethereum.org/docs/rpc/ns-txpool
215225
case getTxPoolStatus // No in Eth API
216226
case getTxPoolContent // No in Eth API
217227
case getTxPoolInspect // No in Eth API

0 commit comments

Comments
 (0)