Skip to content

Mikailo/iroha-ios

 
 

Repository files navigation

Hyperledger Iroha iOS library

Please pay attention! Current version of the library was tested and compatible with Iroha 1.1.1.

The library was created to provide convienent interface for iOS applications to communicate with Iroha blockchain including sending transactions/query, streaming transaction statuses and block commits.

Example

For new iroha users we recommend to checkout iOS example project. It tries to establish connection with Iroha peer which should be also run locally on your computer to create new account and send some asset quantity to it. To run the project, please, go through steps below:

  1. Follow instructions from Iroha documentation to setup and run iroha peer in Docker container.

  2. Clone current repository.

  3. cd Example directory and run pod install.

  4. Open IrohaCommunication.xcworkspace in XCode

  5. Build and Run IrohaExample target.

  6. Consider logs to see if the scenario completed successfully.

Feel free to experiment with example project and don't hesistate to ask any questions.

Integration Tests

Integration tests is a good place to check existing scenarious or to introduce new ones. To run integration tests, please, go through steps below:

  1. Follow instructions from Iroha documentation to setup and run iroha peer in Docker container. However make sure you run iroha using following command (consider additional --overwrite_ledger flag):
docker run --name iroha -d -p 50051:50051 -v $(pwd)/iroha/example:/opt/iroha_data -v blockstore:/tmp/block_store --network=iroha-network -e KEY='node0 --overwrite_ledger' hyperledger/iroha:latest
  1. Launch proxy for docker daemon to make it available through http. For example, one can use socat utility:
brew install socat
socat TCP-LISTEN:49721,fork UNIX-CONNECT:/var/run/docker.sock
  1. Clone current repository.

  2. cd Example directory and run pod install.

  3. Open IrohaCommunication.xcworkspace in XCode

  4. Run tests under IntegrationTests target.

Need Help?

Cocoapods Installation

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

pod 'IrohaCommunication'

Author

Ruslan Rezin, [email protected]
Andrei Marin, [email protected]

License

Copyright 2018 Soramitsu Co., Ltd.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

iOS Swift library for Iroha, a simple distributed ledger

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 96.4%
  • Swift 3.2%
  • Ruby 0.4%