Latest 0.1.0
Homepage https://github.com/BitskiCo/BitskiSDK
License MIT
Platforms ios 11.0
Dependencies Web3, Web3/PromiseKit, AppAuth, BigInt.swift, secp256k1.swift, PromiseKit/CorePromise
Authors

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

  • Currently supports iOS 11 only

Installation

Bitski is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'Bitski'

Usage

First, request a client ID by signing up here: https://developer.bitski.com.

Then, you’ll initialize an instance of Bitski:

// Replace redirect URL with an url scheme that will hit your native app
let bitski = Bitski(clientID: "<YOUR CLIENT ID>", redirectURL: URL(string: "exampleapp://application/callback")!)

Once you have an instance of Bitski, you’ll need to sign in to get access to any Web3 methods:

bitski.signIn(viewController: self) { accessToken, error in
    // Currently we only support kovan and rinkeby. mainnet coming soon.
    self.web3 = bitski.getWeb3(network: "kovan")
}

Once you have an instance of Web3 intialized, you can use it to make Ethereum calls and transactions.

firstly {
    web3.eth.accounts()
}.firstValue { accounts in
    accounts
}.then { account in
    let transaction = BitskiTransaction(to: EthereumAddress(hex: "SOME ADDRESS", eip55: false), from: account, value: 0, gasLimit: 20000)
    return web3.eth.sendTransaction(transaction: transaction)
}.done { transactionHash in
    print("Received transaction hash!", transactionHash.hex())
}

For more about what you can do in Web3, see Web3.swift.

License

Bitski is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "Bitski",
    "version": "0.1.0",
    "summary": "Bitski SDK for iOS. Interact with Ethereum wallets using simple OpenID auth.",
    "description": "Provides tools for connecting to Ethereum wallets,ncreating transactions, and interacting with the Ethereumnnetwork through Web3.swift and OpenID Connect.",
    "homepage": "https://github.com/BitskiCo/BitskiSDK",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Josh Pyles": "[email protected]"
    },
    "source": {
        "git": "https://github.com/BitskiCo/BitskiSDK.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "11.0"
    },
    "swift_version": "4.0",
    "source_files": "Bitski/Classes/**/*",
    "dependencies": {
        "Web3": [
            "~> 0.1"
        ],
        "Web3/PromiseKit": [
            "~> 0.1"
        ],
        "AppAuth": [
            "~> 0.92"
        ],
        "BigInt.swift": [
            "~> 1.0"
        ],
        "secp256k1.swift": [
            "~> 0.1"
        ],
        "PromiseKit/CorePromise": [
            "~> 6.0"
        ]
    }
}

Pin It on Pinterest

Share This