Skip to content

Commit 96996a1

Browse files
committed
Added TOC, refine content
1 parent e1bcdcf commit 96996a1

File tree

1 file changed

+83
-52
lines changed

1 file changed

+83
-52
lines changed

README.md

Lines changed: 83 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -9,78 +9,92 @@ The work for 2.0 release is about to start. Ideas for new more Swift idiomatic A
99
[![Platform](https://img.shields.io/cocoapods/p/web3swift.svg?style=flat)](http://cocoapods.org/pods/web3swift)
1010
[![support](https://brianmacdonald.github.io/Ethonate/svg/eth-support-blue.svg)](https://brianmacdonald.github.io/Ethonate/address#0x6394b37Cf80A7358b38068f0CA4760ad49983a1B)
1111

12-
**web3swift** is your toolbelt for any kind iteractions with Ethereum network.
12+
**web3swift** is your toolbelt for any kind interactions with Ethereum network.
13+
14+
15+
- [web3swift](#web3swift)
16+
+ [Features:](#features-)
17+
* [Design decisions](#design-decisions)
18+
* [Example](#example)
19+
* [Installation](#installation)
20+
+ [Requirements](#requirements)
21+
+ [CocoaPods](#cocoapods)
22+
* [Getting started](#getting-started)
23+
+ [Create Account](#create-account)
24+
+ [Save keystore to the memory](#save-keystore-to-the-memory)
25+
+ [Initializing Ethereum address](#initializing-ethereum-address)
26+
+ [Setting options](#setting-options)
27+
+ [Encoding Transaction](#encoding-transaction)
28+
+ [Signing Transaction](#signing-transaction)
29+
+ [Getting ETH balance](#getting-eth-balance)
30+
+ [Getting gas price](#getting-gas-price)
31+
+ [Sending ETH](#sending-eth)
32+
+ [ERC20 Iteraction:](#erc20-iteraction-)
33+
- [Getting ERC20 token balance](#getting-erc20-token-balance)
34+
- [Sending ERC20](#sending-erc20)
35+
* [Apps using this library](#apps-using-this-library)
36+
* [Future plans](#future-plans)
37+
+ [Extra features:](#extra-features-)
38+
* [Stay in touch](#stay-in-touch)
39+
+ [Contribution](#contribution)
40+
+ [Communication](#communication)
41+
+ [Special thanks to](#special-thanks-to)
42+
* [Authors](#authors)
43+
* [License](#license)
44+
1345

1446
### Features:
1547

1648
- Swift implementation of [web3.js](https://github.com/ethereum/web3.js/) functionality :zap:
1749
- Interaction with remote node via JSON RPC :thought_balloon:
1850
- Smart-contract ABI parsing :book:
19-
- ABI deconding (V2 is supported with return of structures from public functions. Part of 0.4.22 Solidity compiler)
20-
- RLP encoding
51+
- ABI deconding (V2 is supported with return of structures from public functions. Part of 0.4.22 Solidity compiler)
52+
- RLP encoding
2153
- Interactions (read/write to Smart contracts) :arrows_counterclockwise:
2254
- Local keystore management (`geth` compatible)
2355
- Literally following the standards:
24-
- [BIP32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) HD Wallets: Deterministic Wallet
25-
- [BIP39](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki) (Seed phrases)
26-
- [BIP44](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) (Key generation prefixes)
27-
- [EIP-155](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md) (Replay attacks protection) *enforced!*
28-
29-
### What you can do:
56+
- [BIP32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) HD Wallets: Deterministic Wallet
57+
- [BIP39](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki) (Seed phrases)
58+
- [BIP44](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) (Key generation prefixes)
59+
- [EIP-155](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md) (Replay attacks protection) *enforced!*
3060

3161
**Account Managment:**
3262
- [x] Create Account
3363
- [x] Import Account
3464
- [x] Manage user's private keys through encrypted keystore abstractions
3565

36-
**Trasactions operations:**
66+
**Transactions operations:**
3767
- [x] Sign transactions
3868
- [x] Send transactions, call functions of smart-contracts, estimate gas costs
3969
- [x] Serialize and deserialize transactions and results to native Swift types
40-
- [x] Check transaction results and get receipt
41-
- [x] Parse event logs for transaction
70+
- [x] Check transaction results and get the receipt
71+
- [x] Parse event logs for the transaction
4272
- [x] Convenience functions for chain state: block number, gas price
43-
- [x] Batched requests in concurrent mode, checks balances of 580 tokens (from the latest MyEtherWallet repo) over 3 seconds
44-
73+
- [x] Batched requests in concurrent mode, check balances of 580 tokens (from the latest MyEtherWallet repo) over 3 seconds
4574

46-
## Check this out
47-
48-
- Private key and transaction were created directly on an iOS device and sent directly to [Infura](https://infura.io) node
49-
- Native API
50-
- Security (as cool as a hard wallet! Right out-of-the-box! :box: )
51-
- No unnecessary dependencies
52-
- Possibility to work with all existing smart contracts
53-
- Referencing the newest features introduced in Solidity
5475

5576
## Design decisions
5677

57-
- Not every JSON RPC function is exposed yet, priority is given to the ones required for mobile devices
78+
- Not every JSON RPC function is exposed yet, and priority is given to the ones required for mobile devices
5879
- Functionality was focused on serializing and signing transactions locally on the device to send raw transactions to Ethereum network
5980
- Requirements for password input on every transaction are indeed a design decision. Interface designers can save user passwords with the user's consent
60-
- 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
81+
- 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
6182

6283
## Example
6384

6485
You can try it yourself by running the example project:
6586

6687
- Clone the repo: `git clone https://github.com/matterinc/web3swift.git`
67-
- Movw to the repo: `cd web3swift/Example/web3swiftExample`
68-
- Install Dependecies: `pod install`
88+
- Move to the repo: `cd web3swift/Example/web3swiftExample`
89+
- Install Dependencies: `pod install`
6990
- Open: `open ./web3swiftExample.xcworkspace`
7091

71-
## Requirements
72-
73-
Web3swift requires Swift 4.1 and iOS 9.0 or macOS 10.11 although we recommend to use the latest iOS and MacOS versions for your own safety. Don't forget to set the iOS version in a Podfile, otherwise you get an error if the deployment target is less than the latest SDK.
7492

75-
## Communication
93+
## Installation
7694

77-
- if you **need help**, use [Stack Overflow](https://stackoverflow.com/questions/tagged/web3swift) (tag 'web3swift')
78-
- If you'd like to **ask a general question**, use [Stack Overflow](http://stackoverflow.com/questions/tagged/web3swift).
79-
- If you **found a bug**, [open an issue](https://github.com/matterinc/web3swift/issues).
80-
- If you **have a feature request**, [open an issue](https://github.com/matterinc/web3swift/issues).
81-
- If you **want to contribute**, [submit a pull request](https://github.com/matterinc/web3swift/pulls).
95+
### Requirements
8296

83-
## Installation
97+
Web3swift requires `Swift 4.1` and `iOS 9.0` or `macOS 10.11` although we recommend using the latest iOS and MacOS versions for your safety. Don't forget to set the iOS version in a Podfile. Otherwise, you get an error if the deployment target is less than the latest SDK.
8498

8599
### CocoaPods
86100

@@ -110,7 +124,7 @@ $ pod install
110124

111125
## Getting started
112126

113-
Here's a few use cases:
127+
Here are a few use cases:
114128

115129
### Create Account
116130

@@ -136,7 +150,7 @@ else {
136150
fatalError("Couldn't create a KeystoreManager.")
137151
}
138152

139-
//Next you create the a new Keystore:
153+
//Next you create a new Keystore:
140154

141155
let newKeystore = try? EthereumKeystoreV3(password: "YOUR_PASSWORD")
142156

@@ -237,9 +251,12 @@ switch convenienceTransferResult {
237251
}
238252
```
239253

240-
## [Apps using this library](https://github.com/matterinc/web3swift/wiki/Apps-using-web3swift)
254+
## Apps using this library
241255

242-
If you are using `web3swift` in your app or know of an app that uses it, please add it to this list. It would be much appreciated! 👍
256+
If you are using `web3swift` in your app or know of an app that uses it, please add it to this list: [Apps using this library](https://github.com/matterinc/web3swift/wiki/Apps-using-web3swift)
257+
It would be much appreciated! 👍
258+
259+
Here is some examples:
243260

244261
* [MEWconnect-iOS](https://github.com/MyEtherWallet/MEWconnect-iOS)
245262
* [Peepeth iOS client](https://github.com/matterinc/PeepethClient)
@@ -255,35 +272,49 @@ If you've used this project in a live app, please let us know!
255272

256273

257274

258-
## Future plans
275+
## Plans
259276

260277
- Full reference `web3js` functionality
261278
- Light Ethereum subprotocol (LES) integration
262279

263280

264-
## Special thanks to
265-
266-
- Gnosis team and their library [Bivrost-swift](https://github.com/gnosis/bivrost-swift) for inspiration for the ABI decoding approach
267-
- [Trust iOS Wallet](https://github.com/TrustWallet/trust-wallet-ios) for the collaboration and discussion of the initial idea
268-
- Official Ethereum and Solidity docs, everything was written from ground truth standards
269-
270-
## Contribution
281+
### Extra features:
271282

272283
For the latest version, please check [develop](https://github.com/matterinc/web3swift/tree/develop) branch.
273284
Changes made to this branch will be merged into the [master](https://github.com/matterinc/web3swift/tree/master) branch at some point.
274285

275-
- If you want to contribute, submit a [pull request](https://github.com/matterinc/web3swift/pulls) against a development `develop` branch.
276-
- If you found a bug, [open an issue](https://github.com/matterinc/web3swift/issues).
277-
- If you have a feature request, [open an issue](https://github.com/matterinc/web3swift/issues).
286+
---
278287

279288

280-
## Appreciation
289+
## Stay in touch
281290

282291
When using this pod, please make references to this repo and give your start! :)
283292
*Nothing makes developers happier than seeing someone else use our work and go wild with it.*
284293

294+
285295
If you are using web3swift in your app or know of an app that uses it, please add it to [this list](https://github.com/matterinc/web3swift/wiki/Apps-using-web3swift).
286296

297+
298+
### Contribution
299+
300+
301+
- If you **have a feature request**, [open an issue](https://github.com/matterinc/web3swift/issues).
302+
- If you **want to contribute**, [submit a pull request](https://github.com/matterinc/web3swift/pulls).
303+
304+
305+
### Communication
306+
307+
- if you **need help**, use [Stack Overflow](https://stackoverflow.com/questions/tagged/web3swift) (tag 'web3swift')
308+
- If you'd like to **ask a general question**, use [Stack Overflow](http://stackoverflow.com/questions/tagged/web3swift).
309+
- If you **found a bug**, [open an issue](https://github.com/matterinc/web3swift/issues).
310+
311+
312+
### Special thanks to
313+
314+
- Gnosis team and their library [Bivrost-swift](https://github.com/gnosis/bivrost-swift) for inspiration for the ABI decoding approach
315+
- [Trust iOS Wallet](https://github.com/TrustWallet/trust-wallet-ios) for the collaboration and discussion of the initial idea
316+
- Official Ethereum and Solidity docs, everything was written from ground truth standards
317+
-
287318
## Authors
288319

289320
Alex Vlasov, [@shamatar](https://github.com/shamatar), [email protected]

0 commit comments

Comments
 (0)