Utilities & Helpers
ZumoKit provides a number of useful blockchain related functionalities.
Utilities
Utility methods are exposed in utils class. Following utility methods are provided:
- Mnemonic phrase generation utility
- Bitcoin & Ethereum address validation
- Ethereum unit conversion
For full details on utils class see reference (Android / iOS / React Native).
Helpers
ZumoKit makes it easy to access latest cryptocurrency to fiat exchange rates and blockchain fee rates. Additionaly, status of connection to ZumoKit Transaction Service can be used to display connection status to the user.
These propety can be accessed from ZumoKit state on ZumoKit
instance.
State state = zumoKit.getState();
ZKState *state = [zumoKit getState];
const state = zumoKit.state;
For full details on state object see reference (Android / iOS / React Native).
Cryptocurrency to Fiat Exchange Rates
Exchange rates property contains latest exchange rates between EUR/USD and BTC/ETH. Exchange rates property contains stringified JSON in the following format:
{
"ETH":{
"USD":{
"timestamp":1554470495,
"value":"166.30"
},
"EUR":{
"timestamp":1554470493,
"value":"148.51"
}
},
"BTC":{
"USD":{
"timestamp":1554470493,
"value":"5029.44"
},
"EUR":{
"timestamp":1554470493,
"value":"4491.68"
}
}
}
In ZumoKit React Native SDK exchange rates are not exposed on state object but in ZKUtility module.
Blockchain Fee Rates
Latest cryptocurrency transaction fee rates contained in a mapping between coin symbol names (BTC, ETH, etc.) and FeeRates
objects containing fee rates by different confirmation times (slow, average or fast). See reference for details (Android / iOS / React Native).
Transaction Service Connection Status
Transaction service connection property contains information on current connection status to Transaction Service and timestamp of the last time connection was online. See reference for details (Android / iOS).
In an unlikely event that Transaction Service is temporarily unavailable this information can be used to show the user that there is no connection and this is the reason user is not getting incoming transactions and other updates
This functionality is currently not available in ZumoKit React Native SDK.