@@ -12,7 +12,7 @@ import PromiseKit
1212
1313// MARK: - web3 extension with closure
1414public extension Web3 . Eth {
15-
15+
1616 func getCoinbase( response: @escaping Web3 . Web3ResponseCompletion < EthereumAddress > ) {
1717 let req = BasicRPCRequest (
1818 id: properties. rpcId,
@@ -22,7 +22,7 @@ public extension Web3.Eth {
2222 )
2323 properties. provider. send ( request: req, response: response)
2424 }
25-
25+
2626 func sign( from: EthereumAddress , message: EthereumData , response: @escaping Web3 . Web3ResponseCompletion < EthereumData > ) {
2727 let req = RPCRequest < EthereumValue > (
2828 id: properties. rpcId,
@@ -32,7 +32,7 @@ public extension Web3.Eth {
3232 )
3333 properties. provider. send ( request: req, response: response)
3434 }
35-
35+
3636 func signTypedDataV1(
3737 data: [ EIP712TypedDataLegacyFields ] ,
3838 account: EthereumAddress ,
@@ -48,7 +48,7 @@ public extension Web3.Eth {
4848 )
4949 properties. provider. send ( request: req, response: response)
5050 }
51-
51+
5252 func signTypedDataV3(
5353 account: EthereumAddress ,
5454 data: EIP712TypedData ,
@@ -69,26 +69,26 @@ public extension Web3.Eth {
6969// MARK: - web3 extension Promises
7070///
7171public extension Web3 . Eth {
72-
72+
7373 func getCoinbase( ) -> Promise < EthereumAddress > {
7474 return Promise { resolver in
7575 getCoinbase ( response: promiseResolver ( resolver) )
7676 }
7777 }
78-
78+
7979 func sign( from: EthereumAddress , message: EthereumData ) -> Promise < EthereumData > {
8080 return Promise { resolver in
8181 sign ( from: from, message: message, response: promiseResolver ( resolver) )
8282 }
8383 }
84-
84+
8585 func signTypedDataLegacy(
8686 account: EthereumAddress , data: [ EIP712TypedDataLegacyFields ] ) -> Promise < EthereumData > {
8787 return Promise { resolver in
8888 signTypedDataV1 ( data: data, account: account, response: promiseResolver ( resolver) )
8989 }
9090 }
91-
91+
9292 func signTypedData(
9393 account: EthereumAddress , data: EIP712TypedData ) -> Promise < EthereumData > {
9494 return Promise { resolver in
@@ -98,7 +98,7 @@ public extension Web3.Eth {
9898}
9999
100100public extension RPCRequest {
101-
101+
102102 init ( method: String , params: Params ) {
103103 self = RPCRequest ( id: generateRandomId ( ) , jsonrpc: " 2.0 " , method: method, params: params)
104104 }
@@ -109,7 +109,5 @@ public extension RPCRequest {
109109/// Note: Conforms to Hashable so that we can use these as a Dictionary key
110110public enum EthNetwork : String {
111111 case mainnet
112- case kovan
113- case rinkeby
114- case ropsten
112+ case goerli
115113}
0 commit comments