Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Antora docs #149

Open
wants to merge 14 commits into
base: develop
Choose a base branch
from
5 changes: 5 additions & 0 deletions docs/antora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: client-sdk-react-native
title: Ost Client (Mobile Wallet) SDK React Native
version: '1.0'
nav:
- modules/ROOT/nav.adoc
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/modules/ROOT/assets/images/setup_device_workflow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions docs/modules/ROOT/examples/initialize.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* Initialize wallet sdk
* @param {String} endpoint - Ost Platform endpoint
* @param {function} Callback function with error and success status.
* @public
*/
OstWalletSdk.initialize( endpoint,
(error, success) => {})
68 changes: 68 additions & 0 deletions docs/modules/ROOT/examples/ost-sdk-theme-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
export default {

"nav_bar_logo_image": {
"asset_name": "header_icon"
},

"c1": {
"size": 14,
"color": "#484848",
"system_font_weight": "bold",
"alignment": "left"
},
"b1":{
"color":"#ffffff",
"size":15
},

"c2": {
"size": 12,
"color": "#6F6F6F",
"system_font_weight": "regular",
"alignment": "left"
},

"navigation_bar": {
"tint_color": "#61B2C9"
},

"navigation_bar_header": {
"tint_color": '#ffffff'
},

"icons": {
"close": {
"tint_color": "#ffffff"
},
"back":{
"tint_color": "#ffffff",
"source" : null
}
},

"cell_separator": {
"color": "#DBDBDB"
},

"link": {
"size": 14,
"color": "#007aff",
"system_font_weight": "medium",
"alignment": "left",
},

"status": {
"size": 14,
"color": "#0F9D58",
"system_font_weight": "regular",
"alignment": "left",
},

"form_field": {
"size":15,
"system_font_weight":"regular",
"color":"#484848",
"border_color": "#484848",
"alignment": "left"
}
}
13 changes: 13 additions & 0 deletions docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
* xref:index.adoc[Overview]
* xref:android-setup.adoc[Android Setup]
* xref:ios-setup.adoc[iOS Setup]
* xref:OstCoreWorkflows.adoc[Ost Core Workflows]
* xref:OstWalletUI.adoc[Ost Wallet UI]
* xref:OstWalletSettings.adoc[Ost Wallet Settings]
* xref:OstWalletSettingsConfig.adoc[Ost Wallet Settings Config]
* xref:OstRedemptionFlow.adoc[Ost Redemption Flow]
* xref:OstRedemptionConfig.adoc[Ost Redemption Config]
* xref:OstTransactionHelper.adoc[Ost Transaction Helper]
* xref:OstTransactionConfig.adoc[Ost Transaction Config]
* xref:OstWalletSdkGetMethods.adoc[Ost Wallet SDK Get Methods]
* xref:OstJsonAPI.adoc[Ost JSON API]
79 changes: 79 additions & 0 deletions docs/modules/ROOT/pages/AndroidSetup.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
= Android set-up required for Ost React Native SDK
:doctype: book

== 1. Linking the Ost React Native SDK

=== Automatic Linking

[source,bash]
----
react-native link @ostdotcom/ost-wallet-sdk-react-native
----

=== Manual Linking

. Open up `+./android/app/src/main/java/[...]/MainApplication.java+`.
** Add `import com.ostwalletrnsdk.OstWalletRnSdkPackage;` to the imports at the top of the file.
** Add `new OstWalletRnSdkPackage()` to the list returned by the `getPackages()` method
. Append the following lines to `./android/settings.gradle`: ` include ':ost-wallet-sdk-react-native' project(':ost-wallet-sdk-react-native').projectDir = new File(rootProject.projectDir, '../node_modules/ost-wallet-sdk-react-native/android') `
. Insert the following lines inside the dependencies block in `./android/app/build.gradle`: ``` compile project(':ost-wallet-sdk-react-native')

== 2. Changing `minSdkVersion` in './android/build.gradle' file

Change the `minSdkVersion` to 22 in `android/build.gradle`

----
android {
defaultConfig {
minSdkVersion 22
...
...
...
}
}
----

== 3. Create SDK configuration file

Create file `./android/app/src/main/assets/ost-mobilesdk.json` with application specific configurations using the json below as an example

[source,json]
----
{
"BLOCK_GENERATION_TIME": 3,
"PIN_MAX_RETRY_COUNT": 3,
"REQUEST_TIMEOUT_DURATION": 60,
"SESSION_BUFFER_TIME": 3600,
"PRICE_POINT_CURRENCY_SYMBOL": "USD",
"USE_SEED_PASSWORD": false
}
----

. BlockGenerationTime: The time in seconds it takes to mine a block on auxiliary chain.
. PricePointTokenSymbol: This is the symbol of base currency.
So its value will be OST.
. PricePointCurrencySymbol: It is the symbol of quote currency used in price conversion.
. RequestTimeoutDuration: Request timeout in seconds for https calls made by ostWalletSdk.
. PinMaxRetryCount: Maximum retry count to get the wallet Pin from user.
. SessionBufferTime: Buffer expiration time for session keys in seconds.
Default value is 3600 seconds.
. 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.*

= Debug builds with Android 9 (API level 28)

Starting with Android 9 (API level 28), https://developer.android.com/training/articles/security-config#CleartextTrafficPermitted[cleartext support] is disabled by default.
On the other hand, Ost Wallet Android Sdk leverages on *Public Key Pinning* to ensure the authenticity of a Ost Platform server's public key used in TLS sessions using https://github.com/datatheorem/TrustKit-Android[TrustKit].
As TrustKit can only be inititialized with application's https://developer.android.com/training/articles/security-config[network security configuration], sdk initialization fails.
To work-around this issues, application needs to have TrustKit as a dependency and initialize it.

Please refer to https://github.com/ostdotcom/ost-wallet-sdk-android/blob/develop/documentation/TrustKitPublickeyPinning.md[Public Key Pinning Using TrustKit] documentation.

= Next Steps

. link:../README.md#sdk-usage[SDK Usage]
. link:../README.md#sdk-methods[SDK Methods]
. link:../README.md#sdk-workflow-callbacks[SDK Callbacks]
146 changes: 146 additions & 0 deletions docs/modules/ROOT/pages/CHANGELOG.md.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
= OST Wallet SDK Changelog

== Version 2.4.1

* User can authorize external session by scanning QR-Code.
To use `Authorize session by scanning QR code`, please update downstream sdk.
+ iOS: v2.4.1 + Android: v2.4.1
* User can pass QR-Code payload to perform QR-Code actions without opening Scanner in OstWalletUI.
This functionality is available for `scanQRCodeToAuthorizeSession`, `scanQRCodeToExecuteTransaction`, `scanQRCodeToAuthorizeDevice`,

== Version 2.4.0

* OstRedemption UI component is now available in SDK.
To use `OstRedemption`, please update downstream sdk.
+ iOS:``v2.4.0`` + Android:``v2.4.0``
* `getRedeemableSkus` and `getRedeemableSkuDetails` apis added in `OstJsonApi`.

== Version 2.3.14

* ReadMe updates +
* Removed unused imports +
* Peer dependency fixes +

== Version 2.3.12

* OstWalletSettings UI component is now available in SDK.
To use `OstWalletSettings`, please update downstream sdk.
+ iOS:``v2.3.6`` + Android:``v2.3.8``

== Version 2.3.12-beta.1

* OstWalletSettings UI component is now available in SDK.
To use `OstWalletSettings`, please update downstream sdk.
+ iOS:``v2.3.6-beta-1`` + Android:``v2.3.8-beta.1``

== Version 2.3.11

=== Bug Fix:

* In Android inaccurate error is thrown when application runs out of memory during recover device workflow.
+ Downstream Android Sdk updated to `v2.3.7`

== Version 2.3.10

* OstWalletSdk supports custom loader for OstWalletUI.
To use custom loader, please update downstream sdk.
+ iOS:``v2.3.5`` + Android:``v2.3.6``

== Version 2.3.9

* Downstream iOS Sdk updated to `v2.3.4`

== Version 2.3.8

* Removed jitpack.io dependency.

== Version 2.3.7

* Downstream iOS Sdk updated to `v2.3.3`

== Version 2.3.6

* Downstream Android Sdk updated to `v2.3.5`

== Version 2.3.5

* Downstream Android Sdk updated to `v2.3.4`

== Version 2.3.4

* Downstream Android Sdk updated to `v2.3.2`

== Version 2.3.3

=== Bug Fix:

* OstWalletUIWorkflowCallback signature updated.

== Version 2.3.2

=== Bug Fix:

* Fixed a bug, where `ostApiError.getApiError` always returned an empty object.

== Version 2.3.1

=== Feature:

* OstWalletUI now supports
** get add device QR-Code
** scan QR-Code to authorize device
** scan QR-Code to execute transaction
** authorize current device with mnemonics
* Api provided to fetch current device from OstPlatform.
* Now supports getting active sessions from Sdk.

== Version 2.3.0

=== Feature:

* OstWalletSdk now contains UI.
* UI components can be modified.
* Languages for UI workflow components can be modified.
* OstWalletUI now supports
** activate user
** create session
** get device mnemonics
** revoke device
** reset pin
** initiate device recovery
** abort device recovery
** update biometric preference

== Version v2.2.4

=== Bug Fix:

* iOS: Inconsistent signature generation fix.

== Version v2.2.3

* Android: Added support for AndroidX

== Version v2.2.2

=== Bug Fix:

* iOS: Scanning unrecognized QR codes no longer causes the SDK to crash

== Version v2.2.1

=== Bug Fix:

* Fix `fetchDevice` cache issue for `initiateDeviceRecovery`
* Add `No Network Access` error to OstApiError
+
=== Security Enhancements
* Implemented public-key pinning for api.ost.com

== Version v2.2.0

=== Changes:

* Added Multi Currency Feature which allows developers to specify fiat-currency at runtime while executing a transaction.
* Added OstJsonApi that allows developers to fetch data from Ost Platform.
Please see README.MD for supported Api(s).
Loading