Skip to content

Commit

Permalink
Merge pull request #103 from ostdotcom/develop
Browse files Browse the repository at this point in the history
Preparing for release 2.3.10
  • Loading branch information
Rachin Kapoor committed Nov 26, 2019
2 parents 5f166d6 + 29f2de1 commit f688b4e
Show file tree
Hide file tree
Showing 11 changed files with 66 additions and 40 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.MD
@@ -1,5 +1,10 @@
# OST Wallet SDK Changelog

## Version 2.3.10
* OstWalletSdk supports custom loader for OstWalletUI. To use custom loader, please update downstream sdk.<br/>
iOS:`v2.3.5`<br/>
Android:`v2.3.6`

## Version 2.3.9
* Downstream iOS Sdk updated to `v2.3.4`

Expand Down
4 changes: 3 additions & 1 deletion README.md
Expand Up @@ -127,7 +127,9 @@ Starting version `2.3.1` application can also pass SDK config in the initialize
"REQUEST_TIMEOUT_DURATION": 60,
"SESSION_BUFFER_TIME": 3600,
"PRICE_POINT_CURRENCY_SYMBOL": "USD",
"USE_SEED_PASSWORD": false
"USE_SEED_PASSWORD": false,
"NO_OF_SESSIONS_ON_ACTIVATE_USER": 1,
"ENABLE_IOS_DEVICE_RESTORE": false
};

/**
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Expand Up @@ -45,5 +45,5 @@ repositories {

dependencies {
implementation 'com.facebook.react:react-native:+'
implementation 'com.ost:ost-wallet-sdk-android:2.3.5'
implementation 'com.ost:ost-wallet-sdk-android:2.3.6'
}
Expand Up @@ -15,6 +15,8 @@
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.ReadableMap;
import com.ost.walletsdk.annotations.NonNull;
import com.ost.walletsdk.annotations.Nullable;
import com.ost.walletsdk.network.OstJsonApi;
import com.ost.walletsdk.network.OstJsonApiCallback;
import com.ost.walletsdk.workflows.errors.OstError;
Expand All @@ -25,9 +27,6 @@
import java.util.HashMap;
import java.util.Map;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

public class OstRNSdkJsonApiModule extends ReactContextBaseJavaModule {

private final ReactApplicationContext reactContext;
Expand Down Expand Up @@ -174,7 +173,7 @@ public void onOstJsonApiSuccess(@Nullable JSONObject data) {
}

@Override
public void onOstJsonApiError(@Nonnull OstError err, @Nullable JSONObject data) {
public void onOstJsonApiError(@NonNull OstError err, @Nullable JSONObject data) {
try {
if (null == data) data = new JSONObject();

Expand Down
Expand Up @@ -11,8 +11,6 @@
package com.ostwalletrnsdk;

import android.graphics.Bitmap;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.Base64;

import android.util.Log;
Expand All @@ -22,6 +20,8 @@
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.ReadableMap;
import com.ost.walletsdk.OstSdk;
import com.ost.walletsdk.annotations.NonNull;
import com.ost.walletsdk.annotations.Nullable;
import com.ost.walletsdk.ecKeyInteracts.UserPassphrase;
import com.ost.walletsdk.models.entities.OstDevice;
import com.ost.walletsdk.models.entities.OstSession;
Expand Down
Expand Up @@ -17,6 +17,7 @@
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.modules.core.DeviceEventManagerModule;
import com.ost.walletsdk.OstSdk;
import com.ost.walletsdk.annotations.Nullable;
import com.ost.walletsdk.models.entities.OstBaseEntity;
import com.ost.walletsdk.workflows.OstContextEntity;
import com.ost.walletsdk.workflows.OstWorkflowContext;
Expand All @@ -34,8 +35,6 @@

import java.util.HashMap;

import javax.annotation.Nullable;

public class OstWorkFlowCallbackImpl implements OstWorkFlowCallback {

private static final String LOG_TAG = "OstWorkFlowCallbackImpl";
Expand Down
Expand Up @@ -8,6 +8,7 @@
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.modules.core.DeviceEventManagerModule;
import com.ost.walletsdk.OstSdk;
import com.ost.walletsdk.annotations.Nullable;
import com.ost.walletsdk.models.entities.OstBaseEntity;
import com.ost.walletsdk.ui.OstPassphraseAcceptor;
import com.ost.walletsdk.ui.OstUserPassphraseCallback;
Expand All @@ -24,8 +25,6 @@

import java.util.HashMap;

import javax.annotation.Nullable;

public class OstUICallbackImpl implements OstUserPassphraseCallback,
RequestAcknowledgedListener,
FlowInterruptListener,
Expand Down
13 changes: 11 additions & 2 deletions documentation/OstWalletUI.md
Expand Up @@ -18,7 +18,7 @@ import {OstWalletSdkUI} from '@ostdotcom/ost-wallet-sdk-react-native';
```

### Set Theme Config
Theme for OstWalletSdkUI can be initialized by calling `setThemeConfig` API which setup OstWalletSdkUI theme config. To define custom theme config, please refer to [Theme Config](https://github.com/ostdotcom/ost-wallet-sdk-android/blob/release-2.3/documentation/ThemeConfig.md) documentation.
Theme for OstWalletSdkUI can be initialized by calling `setThemeConfig` API which setup OstWalletSdkUI theme config. To define custom theme config, please refer to [Theme Config Android](https://github.com/ostdotcom/ost-wallet-sdk-android/blob/release-2.3/documentation/ThemeConfig.md)/[Theme Config iOS](https://github.com/ostdotcom/ost-wallet-sdk-ios/blob/release-2.3/documentation/ThemeConfig.md) documentation.

```js
// Define the content config
Expand All @@ -39,7 +39,7 @@ Theme for OstWalletSdkUI can be initialized by calling `setThemeConfig` API whic

### Set Content Config
Content for OstWalletSdkUI can be initialized by calling `setContentConfig` API which set-up OstWalletSdkUI content config.
To define custom content config, please refer to [Content Config](https://github.com/ostdotcom/ost-wallet-sdk-android/blob/release-2.3/documentation/ContentConfig.md) documentation.
To define custom content config, please refer to [Content Config Android](https://github.com/ostdotcom/ost-wallet-sdk-android/blob/release-2.3/documentation/ContentConfig.md)/[Content Config iOS](https://github.com/ostdotcom/ost-wallet-sdk-ios/blob/release-2.3/documentation/ContentConfig.md) documentation.

```js
// Please update terms_and_condition.url as per your needs.
Expand Down Expand Up @@ -68,6 +68,15 @@ To define custom content config, please refer to [Content Config](https://github
*/
OstWalletSdkUI.setContentConfig(content_config);
```
### Set Loader Manager

Application loader for OstWalletUI can be initialized by calling `setLoaderManager` API. This API is available in native SDK. <br/><br/>
Custom loader is supported from OstWalletSdk-native version Android v`2.3.6` Or iOS v`2.3.5`<br/>
Please, verify OstWalletSdk version in `Cartfile`.
<br/><br/>
Custom loader needs to be written in native code (java, swift/Objective-C).<br/>
Sample code for custom loader is available in respective platform directory. For [iOS](https://github.com/ostdotcom/ost-wallet-sdk-ios/blob/release-2.3/Samples/CustomLoader/OstMockCustomLoader.md) and [Android](https://github.com/ostdotcom/ost-wallet-sdk-android/blob/tem/customLoader/Samples/CustomLoader/OstMockCustomLoader.md)


### Setup your Passphrase Prefix Delegate
`Passphrase Prefix` is a salt provided by your application that assists in generation of User's recovery key using user's PIN.
Expand Down
9 changes: 9 additions & 0 deletions documentation/android_setup.md
Expand Up @@ -49,6 +49,15 @@ Create file `./android/app/src/main/assets/ost-mobilesdk.json` with application
"USE_SEED_PASSWORD": false
}
```

1. BlockGenerationTime: The time in seconds it takes to mine a block on auxiliary chain.
2. PricePointTokenSymbol: This is the symbol of base currency. So its value will be OST.
3. PricePointCurrencySymbol: It is the symbol of quote currency used in price conversion.
4. RequestTimeoutDuration: Request timeout in seconds for https calls made by ostWalletSdk.
5. PinMaxRetryCount: Maximum retry count to get the wallet Pin from user.
6. SessionBufferTime: Buffer expiration time for session keys in seconds. Default value is 3600 seconds.
7. UseSeedPassword: The seed password is salt to PBKDF2 used to generate seed from the mnemonic. When UseSeedPassword set to `true`, different deterministic salts are used for different keys.

**NOTE: These configurations are MANDATORY for successful operation. Failing to set them will significantly impact usage.**


Expand Down
54 changes: 29 additions & 25 deletions documentation/ios_setup.md
Expand Up @@ -15,7 +15,7 @@ Carthage looks at a file called `Cartfile` to determine which libraries to insta

Add following entry in your `Cartfile`
```bash
github "ostdotcom/ost-wallet-sdk-ios" == 2.3.4
github "ostdotcom/ost-wallet-sdk-ios" == 2.3.5
```

Now to actually install everything run the following in your terminal:
Expand Down Expand Up @@ -95,37 +95,41 @@ Create `OstWalletSdk.plist` file. This file has configuration attributes used by

```
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BlockGenerationTime</key>
<integer>3</integer>
<key>PricePointCurrencySymbol</key>
<string>USD</string>
<key>RequestTimeoutDuration</key>
<integer>30</integer>
<key>PinMaxRetryCount</key>
<integer>3</integer>
<key>SessionBufferTime</key>
<integer>3600</integer>
<key>UseSeedPassword</key>
<false/>
</dict>
</plist>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BlockGenerationTime</key>
<integer>3</integer>
<key>PricePointTokenSymbol</key>
<string>OST</string>
<key>PricePointCurrencySymbol</key>
<string>USD</string>
<key>RequestTimeoutDuration</key>
<integer>30</integer>
<key>PinMaxRetryCount</key>
<integer>3</integer>
<key>SessionBufferTime</key>
<integer>3600</integer>
<key>UseSeedPassword</key>
<false/>
<key>EnableIOSDeviceRestore</key>
<false/>
</dict>
</plist>
```

1. BlockGenerationTime: The time in seconds it takes to mine a block on auxiliary chain.
2. PricePointCurrencySymbol: It is the symbol of quote currency used in price conversion.
3. RequestTimeoutDuration: Request timeout in seconds for https calls made by ostWalletSdk.
4. PinMaxRetryCount: Maximum retry count to get the wallet Pin from user.
5. SessionBufferTime: Buffer expiration time for session keys in seconds.
6. UseSeedPassword: Uses mnemonics and password to generate seed.
2. PricePointTokenSymbol: This is the symbol of base currency. So its value will be OST.
3. PricePointCurrencySymbol: It is the symbol of quote currency used in price conversion.
4. RequestTimeoutDuration: Request timeout in seconds for https calls made by ostWalletSdk.
5. PinMaxRetryCount: Maximum retry count to get the wallet Pin from user.
6. SessionBufferTime: Buffer expiration time for session keys in seconds. Default value is 3600 seconds.
7. UseSeedPassword: The seed password is salt to PBKDF2 used to generate seed from the mnemonic. When UseSeedPassword set to `true`, different deterministic salts are used for different keys.
8. EnableIOSDeviceRestore: When EnableIOSDeviceRestore is set to `true`, After app re-installation, SDK checks for available device key in Keychain for given user id.

**These configurations are MANDATORY for successful operation. Failing to set them will significantly impact usage.**




# Next Steps

1. [SDK Usage](../README.md#sdk-usage)
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "@ostdotcom/ost-wallet-sdk-react-native",
"version": "2.3.9",
"version": "2.3.10",
"description": "OST Wallet SDK for React Native applications.",
"main": "./js/index.js",
"repository": {
Expand Down

0 comments on commit f688b4e

Please sign in to comment.