An advanced Ethereum/EVM mobile wallet
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
alpha-wallet-ios/Trust/EtherClient/EtherServiceRequest.swift

32 lines
646 B

// Copyright SIX DAY LLC, Inc. All rights reserved.
import Foundation
import APIKit
import JSONRPCKit
struct EtherServiceRequest<Batch: JSONRPCKit.Batch>: APIKit.Request {
let batch: Batch
typealias Response = Batch.Responses
var baseURL: URL {
let config = Config()
return config.rpcURL
}
var method: HTTPMethod {
return .post
}
var path: String {
return "/"
}
var parameters: Any? {
return batch.requestObject
}
func response(from object: Any, urlResponse: HTTPURLResponse) throws -> Response {
return try batch.responses(from: object)
}
}