{"repo":"argentlabs/web3.swift","free":true,"listed":false,"github":"https://github.com/argentlabs/web3.swift","clone":"git clone https://github.com/argentlabs/web3.swift.git","description":"Ethereum Swift API with support for smart contracts, ENS & ERC20","language":"Swift","stars":716,"topics":["ethereum","swift","blockchain","ethereum-api"],"license":"MIT","category":"blockchain-web3","readme_excerpt":"Installation Swift Package Manager Use Xcode to add to the project ( File - Swift Packages ) or add this to your Package.swift file: CocoaPods No longer supported. The last published pod is 1.6.0 from March 2023, and it stays installable, but it will not be updated — CocoaPods trunk stops accepting new podspecs in December 2026, and several of the pod's dependencies were frozen years earlier at versions well behind what this package uses. Please migrate to Swift Package Manager. Usage Getting Started Create an instance of EthereumAccount with a EthereumKeyStorage provider. This provides a wrapper around your key for web3.swift to use. NOTE We recommend you implement your own KeyStorage provider, instead of relying on the provided EthereumKeyLocalStorage class. This is provided as an example for conformity to the EthereumSingleKeyStorageProtocol . Create an instance of EthereumHttpClient or EthereumWebSocketClient . This will then provide you access to a set of functions for interacting with the Blockchain. EthereumHttpClient OR EthereumWebSocketClient You can then interact with the client methods, such as to get the current gas price: If using async/await you can await on the result Smart contracts: Static types Given a smart contract function ABI like ERC20 transfer : then you can define an ABIFunction with corresponding encodable Swift types like so: This function can be used to generate contract call transactions to send with the client: If using async/await you can await ","default_branch":null,"files":null,"tree":[],"storefront":"/r/argentlabs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/argentlabs/web3.swift/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}