Skip to content

Commit

Permalink
Merge pull request #17 from BitskiCo/fix/eth-method-extensions
Browse files Browse the repository at this point in the history
Expose properties and RPCRequest initializer for extensions
  • Loading branch information
Koray Koska authored May 13, 2018
2 parents d91cc56 + 08057d8 commit 19155ae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions Web3/Classes/Core/Json/RPCRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ public struct RPCRequest<Params: Codable>: Codable {

/// The jsonrpc parameters
public let params: Params

public init(id: Int, jsonrpc: String, method: String, params: Params) {
self.id = id
self.jsonrpc = jsonrpc
self.method = method
self.params = params
}
}

public typealias BasicRPCRequest = RPCRequest<EthereumValue>
4 changes: 2 additions & 2 deletions Web3/Classes/Core/Web3/Web3.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public struct Web3 {

public struct Net {

let properties: Properties
public let properties: Properties

/**
* Returns the current network id (chain id).
Expand Down Expand Up @@ -108,7 +108,7 @@ public struct Web3 {

public struct Eth {

let properties: Properties
public let properties: Properties

public func protocolVersion(response: @escaping Web3ResponseCompletion<String>) {
let req = BasicRPCRequest(
Expand Down

0 comments on commit 19155ae

Please sign in to comment.