Bitski

public class Bitski : NSObject, BitskiAuthDelegate

An instance of the Bitski SDK

  • Standard Bitski errors

    See more

    Declaration

    Swift

    public enum AuthenticationError : Error
  • Represents distinct Ethereum Networks

    See more

    Declaration

    Swift

    public enum Network : RawRepresentable, Hashable
  • 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 Bitski

    Declaration

    Swift

    public static var shared: Bitski?
  • Whether or not the current user is logged in

    Declaration

    Swift

    public var isLoggedIn: Bool { get }
  • Sign in to the Bitski instance

    Declaration

    Swift

    public func signIn(completion: @escaping ((Error?) -> Void))

    Parameters

    viewController

    viewController to present web interface from

    completion

    A closure called after sign in that includes an optional error

  • Clear out the current authorization state

    Declaration

    Swift

    public func signOut()
  • Get a BitskiHTTPProvider for the requested network

    Declaration

    Swift

    public func getProvider(network: Network = .mainnet) -> Web3Provider

    Parameters

    network

    Ethereum network to use. Currently .development, .kovan, and .rinkeby are the only accepted values.

    Return Value

    Web3Provider instance configured for Bitski.

  • Returns a Web3 instance configured for Bitski

    Declaration

    Swift

    public func getWeb3(network: Network = .mainnet) -> Web3

    Parameters

    network

    Ethereum network to use. Currently only kovan and rinkeby are accepted values.

    Return Value

    Web3 object ready to use.