Latest 0.2.9
License Apache License 2.0
Platforms ios 9.0
Dependencies Alamofire, Alamofire-Synchronous, BigInt, CryptoSwift, libsodium, secp256k1_ios



  • Swift implementation of web3.js functionality :zap:
  • Interaction with remote node via JSON RPC :thought_balloon:
  • Smart-contract ABI parsing :book:
  • Interactions (read/write to Smart contracts) :arrows_counterclockwise:
  • Local keystore management (geth compatible)
  • BIP32 HD Wallet (WIP)

Check this out

Private key and transaction were created directly on the iOS device and sent directly to Infura node.

Here it is

Nonce: 35
Gas price: 5000000000
Gas limit: 21000
To: 0x6394b37Cf80A7358b38068f0CA4760ad49983a1B
Value: 1000000000000000
Data: 0x
v: 43
r: 73059897783840535708732471549376620878882680550447969052675399628060606060727
s: 12280625377431973240236065453692843538037349746280474092545114784968542260859
Intrinsic chainID: Optional(4)
Infered chainID: Optional(4)
sender: Optional(web3swift.EthereumAddress(_address: "0x855adf524273c14b7260a188af0ae30e82e91959"))

["id": 1514485925, "result": 0xc6eca60ecac004a1501a4323a10edb7fa4cd1a0896675f6b51704c84dedad056, "jsonrpc": 2.0]
On Rinkeby TXid = 0xc6eca60ecac004a1501a4323a10edb7fa4cd1a0896675f6b51704c84dedad056


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

  • Clone the repo
  • cd Example/web3swiftExample
  • run pod install from the Example/web3swiftExample directory.
  • open ./web3swiftExample.xcworkspace


Web3swift requires Swift 4.0 and iOS 9.0 (although we strongly recommend to always use the latest iOS version for your security).


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

pod 'web3swift'

Current functionality

  • Send transactions, call functions of smart-contracts, estimate gas costs
  • Serialize and deserialize transactions and results to native Swift types
  • Convenience functions for chain state: block number, gas price
  • Check transaction results and get receipt
  • Parse event logs for transaction

Global plans

  • Full reference web3js functionality
  • Light Ethereum subprotocol (LES) integration

Special thanks to

  • Gnosis team and their library Bivrost-swift for inspiration for the ABI decoding approach
  • Trust iOS Wallet for collaboration and discussion for initial idea


For the latest version, please check develop branch.
Changes from this branch will be merged into the master branch at some point.


When using this pod references to this repo, Bankex and Bankex Foundation are appreciated.


Alex Vlasov, @shamatar, [email protected]

Petr Korolev, @skywinder, [email protected]


web3swift is available under the Apache License 2.0 license. See the LICENSE file for more info.

Latest podspec

    "name": "web3swift",
    "version": "0.2.9",
    "summary": "Web3 implementation in vanilla Swift",
    "description": "Web3 implementation in vanilla Swift, intended for mobile developers of wallets, Dapps and Web3.0",
    "homepage": "",
    "license": "Apache License 2.0",
    "authors": {
        "Alex Vlasov": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.2.9"
    "social_media_url": "",
    "pod_target_xcconfig": {
        "SWIFT_VERSION": "4.0",
        "ARCHS": "${ARCHS_STANDARD_64_BIT}",
    "module_name": "web3swift",
    "platforms": {
        "ios": "9.0"
    "public_header_files": "web3swift/**/*.{h}",
    "source_files": [
    "dependencies": {
        "Alamofire": [
            "~> 4.5"
        "Alamofire-Synchronous": [
            "~> 4.0"
        "BigInt": [
            "~> 3.0.1"
        "CryptoSwift": [],
        "libsodium": [],
        "secp256k1_ios": [
            "~> 0.1.1"
    "pushed_with_swift_version": "4.0"

Pin It on Pinterest

Share This