BitskiHTTPProvider
public class BitskiHTTPProvider : Web3Provider
A custom Web3 HttpProvider that is specifically configured for use with Bitski.
You shouldn’t create one yourself, but instead create one using Bitski.getWeb3(network:) or Bitski.getProvider(network:)
-
Various errors that may occur while processing Web3 requests
See moreDeclaration
Swift
public enum Error : Swift.Error
-
HTTP headers to add to all requests
Declaration
Swift
public var headers: [String : String]
-
Initializes a
BitskiProviderfor use with Web3Declaration
Swift
required public init(rpcURL: URL, apiBaseURL: URL, webBaseURL: URL, network: Bitski.Network, redirectURL: URL, session: URLSession = URLSession(configuration: .default))Parameters
rpcURLThe URL to send JSON-RPC requests to
webBaseURLThe base URL for all web UI requests
redirectURLThe URL to redirect back to after authorization requests
sessionURLSession to use. Defaults to a new default URLSession
-
Sends an RPCRequest and parses the result
Declaration
Swift
public func send<Params, Result>(request: RPCRequest<Params>, response: @escaping Web3ResponseCompletion<Result>)Parameters
requestRPCRequest to send
responseA completion handler for the response. Includes either the result or an error.
View on GitHub
BitskiHTTPProvider Class Reference