Skip to content

MinterTeam/minter-ios-explorer

Repository files navigation

Version CI Status Version Platform License Last commit

MinterExplorer

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

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

pod 'MinterExplorer'

How-to

import MinterCore
import MinterExplorer

Get Transactions

let http = APIClient.shared
let transactionManager = MinterExplorer.TransactionManager(httpClient: http)

let addresses = ["Mx228e5a68b847d169da439ec15f727f08233a7ca6"]
/// Transactions list for
transactionManager?.transactions(addresses: addresses, completion: { (transactions, error) in
  print(transactions)
  print(error)
})
/// Single transaction
transactionManager?.transaction(hash: "Mtecc04e7ca110a69b46af6fb0afc8c89ea459e6a1", completion: { (transaction, error) in
  print(transaction)
  print(error)
})

Get Addresses

let addresses = ["Mx228e5a68b847d169da439ec15f727f08233a7ca6"]

/// Addresses list
addressesManager = AddressManager(httpClient: http)
addressesManager?.addresses(addresses: addresses, completion: { (addresses, error) in
  print(addresses)
  print(error)
})

Get Network Status

infoManager = InfoManager(httpClient: http)

/// BIP Status Info
infoManager?.status(with: { (status, error) in
  print(status)
  print(error)
})
/// Status Page Info
infoManager?.statusPage(with: { (status, error) in
  print(status)
  print(error)
})

Get Block Info

blockManager = BlockManager(httpClient: http)
/// Get block info by height
blockManager?.block(height: 1, completion: { (block, error) in
  print(block)
  print(error)
})
/// Get blocks with paging
blockManager?.blocks(page: 1, completion: { (blocks, error) in
  print(blocks)
  print(error)
})

Author

sidorov.panda, [email protected]

License

MinterExplorer is available under the MIT license. See the LICENSE file for more info.