Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: web3swift-team/web3swift
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.2.99
Choose a base ref
...
head repository: web3swift-team/web3swift
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.3.0
Choose a head ref
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on Feb 27, 2018

  1. 0.3.0

    Alex Vlasov committed Feb 27, 2018
    Copy the full SHA
    8c85cec View commit details
Showing with 18 additions and 16 deletions.
  1. +16 −3 README.md
  2. +1 −1 web3swift.podspec
  3. +1 −12 web3swift/KeystoreManager/Classes/EthereumKeystoreV3.swift
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
![bkx-foundation-github-swift](https://user-images.githubusercontent.com/3356474/34412791-5b58962c-ebf0-11e7-8460-5592b12e6e9d.png)

## Important notices
With the version 0.3.0 API should be less volatile. All public functions should return a Result<>[https://github.com/antitypical/Result] instead of nil or throwing.

Example is not yet updated for 0.3.0, please use tests as an example for your code.

# web3swift

[![Version](https://img.shields.io/cocoapods/v/web3swift.svg?style=flat)](http://cocoapods.org/pods/web3swift)
@@ -22,9 +27,16 @@

## Check this out

- Private key and transaction were created directly on the iOS device and sent directly to [Infura](https://infura.io) node.
- Private key and transaction were created directly on the iOS device and sent directly to [Infura](https://infura.io) node
- Native API
- Security (as cool as hard wallet! Right out-of-the-box! :box:)
- Security (as cool as hard wallet! Right out-of-the-box! :box: )

## Design decisions

- Not every JSON RPC function is exposed yet, priority is gives to ones required for mobile devices
- Functionality was focused on serializing and signing transactions locally on device to send raw transaction to Ethereum network
- Requirements for password input on every transactions are indeed a design decision. Interface designers can save user passwords given user's consent
- Public function for private key export is exposed for user convenience, but marked as UNSAFE_ :) Normal workflow takes care of EIP155 compatibility and proper clearing of private key data from memory

### Here it is
[https://rinkeby.etherscan.io/tx/0xc6eca60ecac004a1501a4323a10edb7fa4cd1a0896675f6b51704c84dedad056](https://rinkeby.etherscan.io/tx/0xc6eca60ecac004a1501a4323a10edb7fa4cd1a0896675f6b51704c84dedad056)
@@ -59,7 +71,7 @@ You can try it by yourself by running the example project:

### Requirements

Web3swift requires Swift 4.0 and iOS 11.2 or macOS 10.13
Web3swift requires Swift 4.0 and iOS 9.0 or macOS 10.13 although we recommend to use the latest iOS and MacOS versions for your own safety.


### Installation
@@ -77,6 +89,7 @@ pod 'web3swift', git: 'https://github.com/Vaultie/web3swift.git'
- Convenience functions for chain state: block number, gas price
- Check transaction results and get receipt
- Parse event logs for transaction
- Manage user's private keys through encrypted keystore abstractions

### Global plans
- Full reference `web3js` functionality
2 changes: 1 addition & 1 deletion web3swift.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "web3swift"
s.version = "0.2.98"
s.version = "0.3.0"
s.summary = "Web3 implementation in vanilla Swift for iOS ans macOS"

s.description = <<-DESC
13 changes: 1 addition & 12 deletions web3swift/KeystoreManager/Classes/EthereumKeystoreV3.swift
Original file line number Diff line number Diff line change
@@ -10,24 +10,13 @@ import Foundation
import CryptoSwift
import Foundation



public class EthereumKeystoreV3: AbstractKeystore {
// Class

public func getAddress() -> EthereumAddress? {
return self.address
}

public func unlockAccount(_ password: String) -> Bool! {
do {
let keyData = try self.getKeyData(password)
return keyData != nil
} catch _ {
return false
}
}


// Protocol

public var addresses: [EthereumAddress]? {