Skip to content

essentiaone/essentia-bridges-api-ios

Repository files navigation

Build Status Badge w/ Version Badge w/ Platform Badge w/ Licence

Essentia Brides API (Swift)

Swift wrapper on our bridges API and other blockchain services.

Features

Ethereum

  • Get balance
  • Send transaction
  • Get transaction count
  • Call smart contract
  • Get gas price
  • Get gas estimate
  • Get block number
  • Get gas speed
  • Get transaction by hash -Get receipt of transaction
  • Get token balance -Get transaction history -Get ERC20 tokens history

Bitcoin

  • Get balance
  • Send transaction
  • Get transaction history
  • Get Unspent Transaction Output
  • Get transaction by id

Litecoin

  • Get balance
  • Send transaction
  • Get transaction history
  • Get Unspent Transaction Output
  • Get transaction by id

Bitcoin Cash

  • Get balance
  • Get transaction history
  • Get transaction by id
  • Send raw transaction

Dash

  • Get balance
  • Send transaction
  • Get transaction history
  • Get Unspent Transaction Output
  • Get transaction by id

Installation

CocoaPods

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

pod 'essentia-bridges-api-ios'

Communication

  • 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.

How to use

  1. Use instructions from https://github.com/essentiaone/essentia-bridges-api
  2. Init crypto wallet
let etherScanUrl = "http://api.etherscan.io"
let etherApiKey = "<Get your api key on etherscan.io>"
let serverUrl = "<URL from step 1>"
let etherScanInfo = EtherScanInfo(url: ethterScanUrl, apiKey: etherScanApiKey)
let wallet = CryptoWallet(serverUrl, etherScan: etherScanInfo)

or use one wallet directly

let bitcoinWallet = BitcoinWallet(serverUrl)
  1. Use essentia-bridges-api-ios
let btcAddress = "1PGEjYqbk8CzmsFdRXQSwfAtZ7ieRWaAtA"
wallet.bitcoin.getBalance(for: btcAddress, result: { (result) in
print(result)
})

Usage examples

License

essentia-bridges-api-ios is released under the MIT License.