neovmUtils
Overview
neovmUtils
is a native iOS framework for interacting with the Ontology and NEO blockchains. It includes a compiled version of the neo-utils project by O3 Labs written in Go.
neovmUtils
also implements BIP39 mnemonic phrases to generate wallets using an iOS wrapper of the Trezor Crypto library.
It allows users to interact with numerous classes of digital assets on Ontology, such as native ONT/ONG and OEP4/5/8/10 assets.
Installation
neovmUtils
is available through CocoaPods. To install
it, simply add the following line to your Podfile:
pod 'neovmUtils'
And import it into your project with:
import neovmUtils
Note: neovmUtils
requires iOS 12.0 or higher.
An example Podfile
would look like this:
use_frameworks!
platform :ios, '12.0'
target :'My_App' do
pod 'neovmUtils'
end
Sub-dependencies
neovmUtils
requires:
- RyuCrypto - the Ryu fork of the Trezor Crypto library
- NetworkUtils - axios style HTTP request package for Swift
SwiftPromises
- the Ryu promises package for Swift
Usage
neovmUtils
offers:
- General NEOVM development tools
- Ontology Blockchain Support
- NEO Blockchain Support
- Blockchain Interface Protocol
- Asset Interfaces
- Helpful UI Elements
- Utils
- Compiled neo-utils golang
golang
The full neo-utils
golang SDK is available for use with this pod. Simply import it with import Neoutils
.
Documentation for the Go implementation is available here.
Improvements
The compiled neo-utils
sdk is a little complicated to use, so a lot of it has been improved in native Swift.
For example, wallet creation can be done like the following:
import Neoutils
(Compiled Swift):
let wif = "<SOME VALID WIF>"
let err = NSErrorPointer(nilLiteral: ())
let account = NeoutilsGenerateFromWIF(wif, err) // account is of type NeoutilsWallet?
if err != nil {
print("There was an error: \(err!)")
}
Or it can be done like this:
import neovmUtils
(Swift Abstraction):
let wif = "<SOME VALID WIF>"
let account = walletFromWIF(wif: wif) // account is of type Wallet?
Contributing
We welcome contributors to neovmUtils
. Before beginning, please take a look at our contributing guidelines.
It follows the ontio-community sdk specifications doc for its Ontology integration.
The compiled headers created by gomobile should be wrapped in NS_ASSUME_NONNULL macros until this is resolved by gomobile (https://stackoverflow.com/a/36164132/3830876).
Primary Authors
neovmUtils
- Wyatt Mufson from Ryu Games and TowerBuilders
neo-utils
- Apisit Toompakdee from O3 Labs
License
neovmUtils
is available under the MIT license.