Bitski
public class Bitski : NSObject, BitskiAuthDelegate
An instance of the Bitski SDK
-
Notification triggered when the user logs in
Declaration
Swift
public static let LoggedInNotification: NSNotification.Name -
Notification triggered when the user logs out
Declaration
Swift
public static let LoggedOutNotification: NSNotification.Name
-
Shared instance of
BitskiDeclaration
Swift
public static var shared: Bitski? -
Whether or not the current user is logged in
Declaration
Swift
public var isLoggedIn: Bool { get }
-
Initialize an instance of
BitskiDeclaration
Swift
public init(clientID: String, redirectURL: URL)Parameters
clientIDYour client ID. From https://developer.bitski.com
redirectURLURI for redirects back to the app. This must be a URI your app can handle (ie. myapp://application/callback).
-
Sign in to the Bitski instance
Declaration
Swift
public func signIn(completion: @escaping ((Error?) -> Void))Parameters
viewControllerviewController to present web interface from
completionA closure called after sign in that includes an optional error
-
Clear out the current authorization state
Declaration
Swift
public func signOut()
-
Get a
BitskiHTTPProviderfor the requested networkDeclaration
Swift
public func getProvider(network: Network = .mainnet) -> Web3ProviderParameters
networkEthereum network to use. Currently .development, .kovan, and .rinkeby are the only accepted values.
Return Value
Web3Provider instance configured for Bitski.
-
Returns a
Web3instance configured for BitskiDeclaration
Swift
public func getWeb3(network: Network = .mainnet) -> Web3Parameters
networkEthereum network to use. Currently only
kovan
andrinkeby
are accepted values.Return Value
Web3object ready to use.
View on GitHub
Bitski Class Reference