Delegates
public struct Delegates: APIService
Delegates - https://docs.lisk.io/docs/lisk-api-080-delegates
-
Get a delegate by username
Declaration
Swift
public func delegate(username: String, completionHandler: @escaping (Response<DelegateResponse>) -> Void)
-
Get a delegate by public key
Declaration
Swift
public func delegate(publicKey: String, completionHandler: @escaping (Response<DelegateResponse>) -> Void)
-
List delegate objects
Declaration
Swift
public func delegates(limit: UInt? = nil, offset: UInt? = nil, orderBy: OrderBy? = nil, completionHandler: @escaping (Response<DelegatesResponse>) -> Void)
Parameters
limit
limit number of returned transactions
offset
used for paging, offset by certain number of transactions
orderBy
sort results by a column and direction
-
Search for a delegate
Declaration
Swift
public func search(query: String, orderBy: OrderBy? = nil, completionHandler: @escaping (Response<DelegatesResponse>) -> Void)
Parameters
query
Query string to search for
orderBy
sort results by a column and direction
-
List which delegates and account is currently voting for
Declaration
Swift
public func votes(address: String, completionHandler: @escaping (Response<DelegatesResponse>) -> Void)
-
List accounts who voted for the given delegate (public key)
Declaration
Swift
public func voters(publicKey: String, completionHandler: @escaping (Response<VotersResponse>) -> Void)
-
Returns number of active delegates
Declaration
Swift
public func count(completionHandler: @escaping (Response<CountResponse>) -> Void)
-
Undocumented
See moreDeclaration
Swift
public struct CountResponse: APIResponse
-
Undocumented
See moreDeclaration
Swift
public struct VotersResponse: APIResponse
-
Undocumented
See moreDeclaration
Swift
public struct DelegateResponse: APIResponse
-
Undocumented
See moreDeclaration
Swift
public struct DelegatesResponse: APIResponse