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/TrustClient/TrustClient.swift

41 lines
816 B

// Copyright SIX DAY LLC. All rights reserved.
import Foundation
import Moya
enum TrustService {
case transactions(address: String)
}
extension TrustService: TargetType {
var baseURL: URL { return Config().remoteURL }
var path: String {
switch self {
case .transactions:
return "/transactions"
}
}
var method: Moya.Method {
switch self {
case .transactions: return .get
}
}
var task: Task {
switch self {
case .transactions(let address):
return .requestParameters(parameters: ["address": address], encoding: URLEncoding())
}
}
var sampleData: Data {
return Data()
}
var headers: [String: String]? {
return ["Content-type": "application/json"]
}
}