All Projects → MercuryProtocol → Web3.swift

MercuryProtocol / Web3.swift

Licence: mit
Web3 and Geth wrapper utility in swift

Programming Languages

swift
15916 projects
swift4
162 projects

Projects that are alternatives of or similar to Web3.swift

Web3swift
Elegant Web3js functionality in Swift. Native ABI parsing and smart contract interactions.
Stars: ✭ 237 (+139.39%)
Mutual labels:  web3, geth, crypto
micro-stacks
Tiny libraries for building the next generation of Stacks apps.
Stars: ✭ 56 (-43.43%)
Mutual labels:  crypto, web3
Dapp
Censorship resistant democracies.
Stars: ✭ 1,326 (+1239.39%)
Mutual labels:  web3, crypto
eth-commerce
Javascript library to accept ethereum payments on any website
Stars: ✭ 24 (-75.76%)
Mutual labels:  crypto, web3
geth-connector
This repository served as an experiment playground for the alpha version of AKASHA desktop application. Now it is considered deprecated and seen as a stepping stone in the R&D of the AKASHA world framework. 🚀🌍🚀
Stars: ✭ 52 (-47.47%)
Mutual labels:  geth, web3
Dagger.js
Simple library to connect with dagger server and manage subscriptions for Ethereum Blockchain.
Stars: ✭ 179 (+80.81%)
Mutual labels:  web3, geth
Web3 By Example
Node.js with Web3 javascript examples for getting basic information (transactions, balances, network stats, and tokens) from the Ethereum blockchain.
Stars: ✭ 156 (+57.58%)
Mutual labels:  web3, geth
mirror-next
A Next.js-powered frontend for your Mirror publication
Stars: ✭ 98 (-1.01%)
Mutual labels:  crypto, web3
Wallet3
A secure mobile wallet for web3
Stars: ✭ 13 (-86.87%)
Mutual labels:  crypto, web3
DEGEN
Distributing POAPs to DAOs in discord, twitter, and more.
Stars: ✭ 27 (-72.73%)
Mutual labels:  crypto, web3
widgets
💸 Web3 Payments with any token. DePay simplifies and improves Web3 Payments with the power of DeFi. Accept any token with on-the-fly conversion with state-of-the-art widgets.
Stars: ✭ 32 (-67.68%)
Mutual labels:  crypto, web3
Core Geth
A highly configurable Go implementation of the Ethereum protocol.
Stars: ✭ 66 (-33.33%)
Mutual labels:  geth, crypto
Maskbook
The portal to the new, open internet. ([I:b])
Stars: ✭ 691 (+597.98%)
Mutual labels:  web3, crypto
Myetherapi
An API by MyEtherWallet. ETH / Ropsten / JSON RPC / Web3
Stars: ✭ 95 (-4.04%)
Mutual labels:  web3, geth
Element
DID Method implementation using the Sidetree protocol on top of Ethereum and IPFS
Stars: ✭ 80 (-19.19%)
Mutual labels:  crypto
Siphash Js
A Javascript implementation of SipHash-2-4
Stars: ✭ 90 (-9.09%)
Mutual labels:  crypto
Connect
(Aragon 1) Seamlessly integrate DAO functionality into web and node.js apps.
Stars: ✭ 81 (-18.18%)
Mutual labels:  web3
Trust Wallet Ios
📱 Trust - Ethereum Wallet and Web3 DApp Browser for iOS
Stars: ✭ 1,228 (+1140.4%)
Mutual labels:  web3
Ghostunnel
A simple SSL/TLS proxy with mutual authentication for securing non-TLS services
Stars: ✭ 1,296 (+1209.09%)
Mutual labels:  crypto
Blockchain golang
Blockchain demo based on golang 基于golang编写的区块链公链demo
Stars: ✭ 80 (-19.19%)
Mutual labels:  crypto

CocoaPods Compatible Platform Latest Tag Twitter

web3.js utility library written in Swift.

Table of contents

Features

  • [x] Create Account
  • [x] Import Account
  • [x] Create and Encode Transaction
  • [x] Sign Transaction
  • [ ] More Features - WIP
  • [ ] Complete Documentation

Component Libraries

In order to keep web3swift focused specifically on core ethereum based utility functionality, additional component libraries will be created by the Radical App LLC to bring additional functionality to the mercury protocol ecosystem.

  • iOS Example App - Example showcasing use of web3swift library.
  • [Mercury Wallet - Wallet App to use with mercury protocol. (Coming Soon)

Requirements

  • iOS 9.0+
  • Xcode 9.2+
  • Swift 4.0.0+

Communication

  • If you need help, use Stack Overflow. (Tag 'web3swift')
  • If you'd like to ask a general question, use Stack Overflow.
  • If you found a bug, open an issue.
  • If you have a feature request, open an issue.
  • If you want to contribute, submit a pull request.

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ sudo gem install cocoapods

CocoaPods 1.1+ is required to build web3swift 4.0+.

To integrate web3swift into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'

target '<Your Target Name>' do
    use_frameworks!
    pod 'web3swift', :git => 'https://github.com/MercuryProtocol/web3.swift.git', :branch => 'master'
end

Then, run the following command:

$ pod install

Sidenote:

  • In order to run project, you will have to turn off bitcode support as Geth doesn't support bitcode. Please check: https://github.com/golang/go/issues/22395
  • iOS simulator compilation can be fixed by removing arm7 support from valid architectures in the app. You can find more information here.

USAGE

Create Account

Create keystore and account with password.

let configuration = EthAccountConfiguration(namespace: "wallet", password: "qwerty")
let (keystore, _) = EthAccountCoordinator.default.launch(configuration)

If you don't want to create account, this can be achieved by passing nil

let configuration = EthAccountConfiguration(namespace: "wallet", password: nil)
let (keystore, _) = EthAccountCoordinator.default.launch(configuration)

Encoding Transaction

var addressError: NSError? = nil
let amountToTransfer = 5
let gethToAccountAddress: GethAddress! = GethNewAddressFromHex("0x39db95b4f60bd75846c46df165d9e854b3cf2b56", &addressError)
guard let amount = GethBigInt.bigInt(amountToTransfer) else {
    print("Invalid amount")
    return
}
let transferFunction = EthFunction(name: "transfer", inputParameters: [toAccountAddress, amount])
let encodedTransferFunction = web3swift.encode(transferFunction)

Signing Transaction

let signedTransaction = web3swift.sign(address: contractAddress, encodedFunctionData: encodedTransferFunction, nonce: nonce, gasLimit: Constants.gasLimit, gasPrice: Constants.gasPrice)

FAQ

What's web3swift?

web3swift is utility library written in swift which brings web3j encoding capabilities to Swift. Also, helps managements of account based on Geth.

Credits

web3swift is owned and maintained by the Radical App LLC. You can follow them on Twitter at @MercuryProtocol for project updates and releases.

Contributors

If you do want to participate please follow the guideline.

Security Disclosure

If you believe you have identified a security vulnerability with web3swift, you should report it as soon as possible via email to [email protected]. Please do not post it to a public issue tracker.

License

web3swift is released under the MIT license. See LICENSE for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].