You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+74-77Lines changed: 74 additions & 77 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,90 +17,31 @@
17
17
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
18
18
19
19
20
-
-[Documentation](#documentation)
21
-
-[What we have already done:](#what-we-have-already-done)
22
20
-[Design Decisions](#design-decisions)
23
-
-[Requirements](#requirements)
24
-
-[Migration Guides](#migration-guides)
25
-
-[Communication](#communication)
21
+
-[Projects that using web3swift](#projects-that-using-web3swift)
26
22
-[Installation](#installation)
27
-
-[CocoaPods](#cocoapods)
28
-
-[Carthage](#carthage)
23
+
-[Requirements](#requirements)
24
+
-[Migration Guides](#migration-guides)
25
+
-[Documentation](#documentation)
29
26
-[Example Project](#example-project)
30
-
-[Popular questions](#popular-questions)
31
-
-[Is it possible to get Mnemonic Phrase (Seed Phrase) from Private key using web3swift?](#is-it-possible-to-get-mnemonic-phrase-seed-phrase-from-private-key-using-web3swift)
32
-
-[How to interact with custom smart-contract with web3swift?](#how-to-interact-with-custom-smart-contract-with-web3swift)
33
-
-[How to set test local node?](#how-to-set-test-local-node)
34
-
-[What's next](#whats-next)
27
+
-[FAQ](#faq)
28
+
-[What we have already done](#what-we-have-already-done)
29
+
-[Future steps](#future-steps)
35
30
-[Credits](#credits)
36
-
-[Security Disclosure](#security-disclosure)
37
-
-[Donations](#donations)
31
+
-[Security Disclosure](#security-disclosure)
32
+
-[Contribute](#contribute)
38
33
-[License](#license)
39
34
40
35
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
41
36
42
37
43
-
## What we have already done:
44
-
45
-
-[x] Swift implementation of [web3.js](https://github.com/ethereum/web3.js/) functionality :zap:
46
-
-[x] Interaction with remote node via JSON RPC :thought_balloon:
47
-
-[x] Local keystore management (`geth` compatible)
48
-
-[x] Smart-contract ABI parsing :book:
49
-
-[x] ABI deconding (V2 is supported with return of structures from public functions. Part of 0.4.22 Solidity compiler)
50
-
-[x] Ethereum Name Service (ENS) support - a secure & decentralised way to address resources both on and off the blockchain using simple, human-readable names
51
-
-[x] Interactions (read/write to Smart contracts) :arrows_counterclockwise:
52
-
-[x] Complete Infura Ethereum API support, patial Websockets API support
53
-
-[x] Parsing TxPool content into native values (ethereum addresses and transactions) - easy to get pending transactions
54
-
-[x] Event loops functionality
55
-
-[x] Supports Web3View functionality - WKWebView with injected "web3" provider
56
-
-[x] Possibility to add or remove "middleware" that intercepts, modifies and even cancel transaction workflow on stages "before assembly", "after assembly"and "before submission"
57
-
-[x] Literally following the standards:
58
-
-[x][BIP32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) HD Wallets: Deterministic Wallet
-[x][EIP-681](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-681.md) (A standard way of representing various transactions, especially payment requests in Ethers and ERC-20 tokens as URLs)
65
-
-[x][EIP-721](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md) (A standard interface for non-fungible tokens, also known as deeds - ERC-721)
66
-
-[x][EIP-165](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-165.md) (Standard Interface Detection, also known as ERC-165)
67
-
-[x][EIP-777](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-777.md) (New Advanced Token Standard, also known as ERC-777)
68
-
-[x][EIP-820](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-820.md) (Pseudo-introspection Registry Contract, also known as ERC-820)
69
-
-[x][EIP-888](https://github.com/ethereum/EIPs/issues/888) (MultiDimensional Token Standard, also known as ERC-888)
70
-
-[x][EIP-1400](https://github.com/ethereum/EIPs/issues/1411) (Security Token Standard, also known as ERC-1400)
71
-
-[x][EIP-1410](https://github.com/ethereum/EIPs/issues/1410) (Partially Fungible Token Standard, also known as ERC-1410)
72
-
-[x][EIP-1594](https://github.com/ethereum/EIPs/issues/1594) (Core Security Token Standard, also known as ERC-1594)
73
-
-[x][EIP-1643](https://github.com/ethereum/EIPs/issues/1643) (Document Management Standard, also known as ERC-1643)
74
-
-[x][EIP-1644](https://github.com/ethereum/EIPs/issues/1644) (Controller Token Operation Standard, also known as ERC-1644)
75
-
-[x][EIP-1633](https://github.com/ethereum/EIPs/issues/1634) (Re-Fungible Token, also known as ERC-1633)
76
-
-[x][EIP-721x](https://github.com/loomnetwork/erc721x) (An extension of ERC721 that adds support for multi-fungible tokens and batch transfers, while being fully backward-compatible, also known as ERC-721x)
77
-
-[x][EIP-1155](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1155.md) (Multi Token Standard, also known as ERC-1155)
78
-
-[x][EIP-1376](https://github.com/ethereum/EIPs/issues/1376) (Service-Friendly Token, also known as ERC-1376)
79
-
-[x][ST-20](https://github.com/PolymathNetwork/polymath-core) - ST-20 token is an Ethereum-based token implemented on top of the ERC-20 protocol that adds the ability for tokens to control transfers based on specific rules
80
-
81
-
-[x] RLP encoding
82
-
-[x] Batched requests in concurrent mode
83
-
-[x] Base58 encoding scheme
84
-
-[x] Formatting to and from Ethereum Units
85
-
-[x] Comprehensive Unit and Integration Test Coverage
86
-
87
38
## Design Decisions
88
39
89
40
- Not every JSON RPC function is exposed yet, and priority is given to the ones required for mobile devices
90
41
- Functionality was focused on serializing and signing transactions locally on the device to send raw transactions to Ethereum network
91
42
- Requirements for password input on every transaction are indeed a design decision. Interface designers can save user passwords with the user's consent
92
43
- 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
If you are using this library in your project, please [add a link](https://github.com/matter-labs/web3swift/edit/develop/README.md) to this repo.
@@ -125,7 +66,7 @@ If you are using this library in your project, please [add a link](https://githu
125
66
126
67
## Installation
127
68
128
-
###CocoaPods
69
+
- CocoaPods
129
70
130
71
[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:
131
72
@@ -151,7 +92,7 @@ Then, run the following command:
151
92
$ pod install
152
93
```
153
94
154
-
###Carthage
95
+
- Carthage
155
96
156
97
[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
Run `carthage update` to build the framework. By default, Carthage performs checkouts and builds in a new directory 'Carthage' in the same location as your Cartfile. Open this directory, go to 'Build' directory, choose iOS or macOS directory and use the framework from the chosen directory in your Xcode project.
@@ -245,17 +197,17 @@ You can try lib by running the example project:
245
197
- Install Dependencies: `pod install`
246
198
- Open: `open ./web3swiftExample.xcworkspace`
247
199
248
-
## Popular questions
200
+
## FAQ
249
201
250
-
####Is it possible to get a Mnemonic Phrase (Seed Phrase) from Private key using web3swift?
202
+
>Is it possible to get a Mnemonic Phrase (Seed Phrase) from Private key using web3swift?
251
203
252
204
In web3swift there is no backward conversion from Private key to Mnemonic Phrase. Also it is theoretically impossible to recover a phrase from a Private key. After Seed Phrase is converted to some initial entropy the “master key is derived” and the initial entropy is discarded.
253
205
254
206
The simplest solution is to encrypt the phrase using users pincode and save it in some other secure keystore.
255
207
Mnemonic Phrase is very sensitive data and you must be very careful to let the user get it.
256
208
Our advise if you want to show it to a user - ask to save a Passphrase when creating BIP32Keystore.
257
209
258
-
####How to interact with custom smart-contract with web3swift?
210
+
>How to interact with custom smart-contract with web3swift?
259
211
260
212
For example: you want to interact with smart-contract and all you know is - its address (address example: 0xfa28eC7198028438514b49a3CF353BcA5541ce1d).
261
213
@@ -289,7 +241,7 @@ let transactionOptions: TransactionOptions = <OPTIONS>
289
241
let transaction = contract.write(method, parameters: parameters, extraData: extraData, transactionOptions: transactionOptions)
-[x] Swift implementation of [web3.js](https://github.com/ethereum/web3.js/) functionality :zap:
256
+
-[x] Interaction with remote node via JSON RPC :thought_balloon:
257
+
-[x] Local keystore management (`geth` compatible)
258
+
-[x] Smart-contract ABI parsing :book:
259
+
-[x] ABI deconding (V2 is supported with return of structures from public functions. Part of 0.4.22 Solidity compiler)
260
+
-[x] Ethereum Name Service (ENS) support - a secure & decentralised way to address resources both on and off the blockchain using simple, human-readable names
261
+
-[x] Interactions (read/write to Smart contracts) :arrows_counterclockwise:
262
+
-[x] Complete Infura Ethereum API support, patial Websockets API support
263
+
-[x] Parsing TxPool content into native values (ethereum addresses and transactions) - easy to get pending transactions
264
+
-[x] Event loops functionality
265
+
-[x] Supports Web3View functionality - WKWebView with injected "web3" provider
266
+
-[x] Possibility to add or remove "middleware" that intercepts, modifies and even cancel transaction workflow on stages "before assembly", "after assembly"and "before submission"
267
+
-[x] Literally following the standards:
268
+
-[x][BIP32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) HD Wallets: Deterministic Wallet
-[x][EIP-681](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-681.md) (A standard way of representing various transactions, especially payment requests in Ethers and ERC-20 tokens as URLs)
275
+
-[x][EIP-721](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md) (A standard interface for non-fungible tokens, also known as deeds - ERC-721)
276
+
-[x][EIP-165](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-165.md) (Standard Interface Detection, also known as ERC-165)
277
+
-[x][EIP-777](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-777.md) (New Advanced Token Standard, also known as ERC-777)
278
+
-[x][EIP-820](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-820.md) (Pseudo-introspection Registry Contract, also known as ERC-820)
279
+
-[x][EIP-888](https://github.com/ethereum/EIPs/issues/888) (MultiDimensional Token Standard, also known as ERC-888)
280
+
-[x][EIP-1400](https://github.com/ethereum/EIPs/issues/1411) (Security Token Standard, also known as ERC-1400)
281
+
-[x][EIP-1410](https://github.com/ethereum/EIPs/issues/1410) (Partially Fungible Token Standard, also known as ERC-1410)
282
+
-[x][EIP-1594](https://github.com/ethereum/EIPs/issues/1594) (Core Security Token Standard, also known as ERC-1594)
283
+
-[x][EIP-1643](https://github.com/ethereum/EIPs/issues/1643) (Document Management Standard, also known as ERC-1643)
284
+
-[x][EIP-1644](https://github.com/ethereum/EIPs/issues/1644) (Controller Token Operation Standard, also known as ERC-1644)
285
+
-[x][EIP-1633](https://github.com/ethereum/EIPs/issues/1634) (Re-Fungible Token, also known as ERC-1633)
286
+
-[x][EIP-721x](https://github.com/loomnetwork/erc721x) (An extension of ERC721 that adds support for multi-fungible tokens and batch transfers, while being fully backward-compatible, also known as ERC-721x)
287
+
-[x][EIP-1155](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1155.md) (Multi Token Standard, also known as ERC-1155)
288
+
-[x][EIP-1376](https://github.com/ethereum/EIPs/issues/1376) (Service-Friendly Token, also known as ERC-1376)
289
+
-[x][ST-20](https://github.com/PolymathNetwork/polymath-core) - ST-20 token is an Ethereum-based token implemented on top of the ERC-20 protocol that adds the ability for tokens to control transfers based on specific rules
290
+
291
+
-[x] RLP encoding
292
+
-[x] Batched requests in concurrent mode
293
+
-[x] Base58 encoding scheme
294
+
-[x] Formatting to and from Ethereum Units
295
+
-[x] Comprehensive Unit and Integration Test Coverage
296
+
297
+
298
+
## Future steps
302
299
303
300
-[x] Objective-C - a proxy bridge to build your DApp on Objective-C using web3swift
@@ -317,9 +314,9 @@ Petr Korolev, [@skywinder](https://github.com/skywinder)
317
314
318
315
Anton Grigorev, [@baldyash](https://github.com/BaldyAsh)
319
316
320
-
###Security Disclosure
317
+
## Security Disclosure
321
318
322
-
If you believe you have identified a security vulnerability with web3swift, you should report it as soon as possible via email to [Alex Vlasov](https://github.com/shamatar)[email protected]. Please do not post it to a public issue tracker.
319
+
If you believe you have identified a security vulnerability with web3swift, you should report it as soon as possible via email to [[email protected]](mailto:[email protected]). Please do not post it to a public issue tracker.
323
320
324
321
[Matter Labs](https://github.com/orgs/matter-labs/people) are charged with open-sourсe and do not require money for using their web3swift lib.
325
322
We want to continue to do everything we can to move the needle forward.
0 commit comments