Latest 0.1.6
Homepage https://github.com/tesseract-one/OpenWallet.swift
License Apache 2.0
Platforms ios 10.0
Authors

OpenWallet.swift

GitHub license
Build Status
GitHub release
CocoaPods version
Platform iOS

Open Wallet Protocol implementation for Swift based client platforms

Goals

This library implements Open Wallet Protocol for platforms with native Swift support.

It allows applications to interact with Blockchain wallets with implemented Open Wallet protocol.

Features

  • Can check is Wallet installed and supports needed API.
  • Can interact with installed Wallet.
  • Can be used by Wallets for OpenWallet implementation.

Implemented APIs

  • Ethereum
    • Keychain API

Getting started

Web3

This is not a Web3 implementation.

We have a Web3 implementation too: EthereumWeb3.swift

Installation

Ethereum

Add the following to your Podfile:

pod 'Tesseract.OpenWallet/Ethereum'

# Uncomment this line if you want to enable PromiseKit extensions
# pod 'Tesseract.OpenWallet/EthereumPromiseKit'

Then run pod install.

Examples

Ethereum

Get user accounts (public addresses)
import OpenWallet

let openWallet = OpenWallet(networks: [.Ethereum])

// Mainnnet Network ID = 1
openWallet.eth_accounts(networkId: 1) { response in
    switch response {
    case .success(let accounts): print("Accounts:", accounts)
    case .failure(let error): print("Error:", error)
    }
}
Sign data
import OpenWallet

let data = "some string".data(using: .utf8)!
let address = try! Address(hex: "0x0000000000000000000000000000000000000000")

let openWallet = OpenWallet(networks: [.Ethereum])

// Mainnnet Network ID = 1
openWallet.eth_signData(account: address, data: data, networkId: 1) { response in
    switch response {
    case .success(let signature): print("Signature:", signature)
    case .failure(let error): print("Error:", error)
    }
}

Wallet

Installation

Ethereum

Add the following to your Podfile:

pod 'Tesseract.OpenWallet/WalletEthereum'

Then run pod install.

Usage

Inherit your Extension main View Controller from ExtensionViewController class from this library.

Author

License

OpenWallet.swift is available under the Apache 2.0 license. See the LICENSE file for more information.

Latest podspec

{
    "name": "Tesseract.OpenWallet",
    "version": "0.1.6",
    "summary": "Tesseract Open Wallet Protocol implementation for Swift",
    "description": "Tesseract Plaftorm Open Wallet Protocol implementation for Swift",
    "homepage": "https://github.com/tesseract-one/OpenWallet.swift",
    "license": {
        "type": "Apache 2.0",
        "file": "LICENSE"
    },
    "authors": {
        "Tesseract Systems, Inc.": "[email protected]"
    },
    "source": {
        "git": "https://github.com/tesseract-one/OpenWallet.swift.git",
        "tag": "0.1.6"
    },
    "social_media_url": "https://twitter.com/tesseract_one",
    "platforms": {
        "ios": "10.0"
    },
    "swift_versions": [
        "5.0",
        "5.0"
    ],
    "module_name": "OpenWallet",
    "default_subspecs": [
        "Core",
        "Client"
    ],
    "swift_version": "5.0",
    "subspecs": [
        {
            "name": "Core",
            "source_files": "Sources/Core/**/*.swift"
        },
        {
            "name": "Client",
            "source_files": "Sources/Client/**/*.swift",
            "dependencies": {
                "Tesseract.OpenWallet/Core": []
            }
        },
        {
            "name": "Wallet",
            "source_files": "Sources/Wallet/**/*.swift",
            "dependencies": {
                "Tesseract.OpenWallet/Core": []
            }
        },
        {
            "name": "Ethereum.Core",
            "source_files": "Sources/Ethereum/Core/**/*.swift",
            "dependencies": {
                "Tesseract.OpenWallet/Core": [],
                "Tesseract.EthereumTypes": [
                    "~> 0.1"
                ],
                "Serializable.swift": [
                    "~> 0.1"
                ]
            }
        },
        {
            "name": "Ethereum",
            "source_files": "Sources/Ethereum/Client/**/*.swift",
            "dependencies": {
                "Tesseract.OpenWallet/Client": [],
                "Tesseract.OpenWallet/Ethereum.Core": []
            }
        },
        {
            "name": "Wallet.Ethereum",
            "source_files": "Sources/Ethereum/Wallet/**/*.swift",
            "dependencies": {
                "Tesseract.OpenWallet/Wallet": [],
                "Tesseract.OpenWallet/Ethereum.Core": []
            }
        }
    ]
}

Pin It on Pinterest

Share This