Skip to content

Commit

Permalink
Merge pull request deriv-com#49 from deriv-com/utils-docs
Browse files Browse the repository at this point in the history
Utils docs
  • Loading branch information
niloofar-deriv authored Apr 29, 2024
2 parents 5b6629d + 94f516e commit c7e5aea
Show file tree
Hide file tree
Showing 27 changed files with 15,898 additions and 1 deletion.
20 changes: 20 additions & 0 deletions utils-docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
41 changes: 41 additions & 0 deletions utils-docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Website

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

### Installation

```
$ yarn
```

### Local Development

```
$ yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
5 changes: 5 additions & 0 deletions utils-docs/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// eslint-disable-next-line no-undef
module.exports = {
// eslint-disable-next-line no-undef
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
};
5 changes: 5 additions & 0 deletions utils-docs/docs/Constants/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"label": "Constants",
"position": 2,
"link": { "type": "generated-index" }
}
32 changes: 32 additions & 0 deletions utils-docs/docs/Constants/app-id.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
sidebar_position: 2
---

# app-id

### environments

```js
real: "green.derivws.com";
demo: "blue.derivws.com";
```

### domainAppId

```js
"deriv.app": "16929";
"app.deriv.com": "16929";
"staging-app.deriv.com": "16303";
"app.deriv.me": "1411";
"staging-app.deriv.me": "1411";
"app.deriv.be": "30767";
"staging-app.deriv.be": "31186";
"binary.com": "1";
"test-app.deriv.com": "51072";
```

### appBrand

```js
appBrand = "deriv";
```
200 changes: 200 additions & 0 deletions utils-docs/docs/Constants/currency.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
---
sidebar_position: 2
---

# currency

### type Currency

```js
keyof typeof precision
```

### precision

```JS
AAD: 2;
AED: 2;
AFN: 2;
ALL: 2;
AMD: 2;
ANG: 2;
AOA: 2;
ARS: 2;
AUD: 2;
AWG: 2;
AZN: 2;
BAM: 2;
BBD: 2;
BCH: 8;
BDT: 2;
BGN: 2;
BHD: 3;
BIF: 0;
BMD: 2;
BND: 2;
BOB: 2;
BOV: 2;
BRL: 2;
BSD: 2;
BTC: 8;
BTN: 2;
BUSD: 2;
BWP: 2;
BYN: 2;
BZD: 2;
CAD: 2;
CDF: 2;
CHE: 2;
CHF: 2;
CHW: 2;
CLF: 4;
CLP: 0;
CNY: 2;
COP: 2;
COU: 2;
CRC: 2;
CUC: 2;
CUP: 2;
CVE: 2;
CZK: 2;
DAI: 2;
DJF: 0;
DKK: 2;
DOP: 2;
DZD: 2;
EGP: 2;
ERN: 2;
ETB: 2;
ETC: 8;
ETH: 8;
EUR: 2;
EURS: 2;
eUSDT: 2;
FJD: 2;
FKP: 2;
GBP: 2;
GEL: 2;
GHS: 2;
GIP: 2;
GMD: 2;
GNF: 0;
GTQ: 2;
GYD: 2;
HKD: 2;
HNL: 2;
HRK: 2;
HTG: 2;
HUF: 2;
IDK: 0;
IDR: 2;
ILS: 2;
INR: 2;
IQD: 3;
IRR: 2;
ISK: 0;
JMD: 2;
JOD: 3;
JPY: 0;
KES: 2;
KGS: 2;
KHR: 2;
KMF: 0;
KPW: 2;
KRW: 0;
KWD: 3;
KYD: 2;
KZT: 2;
LAK: 2;
LBP: 2;
LKR: 2;
LRD: 2;
LSL: 2;
LTC: 8;
LYD: 3;
MAD: 2;
MDL: 2;
MGA: 2;
MKD: 2;
MMK: 2;
MNT: 2;
MOP: 2;
MRU: 2;
MUR: 2;
MVR: 2;
MWK: 2;
MXN: 2;
MXV: 2;
MYR: 2;
MZN: 2;
NAD: 2;
NGN: 2;
NIO: 2;
NOK: 2;
NPR: 2;
NZD: 2;
OMR: 3;
PAB: 2;
PAX: 2;
PEN: 2;
PGK: 2;
PHP: 2;
PKR: 2;
PLN: 2;
PYG: 0;
QAR: 2;
RON: 2;
RSD: 2;
RUB: 2;
RWF: 0;
SAR: 2;
SBD: 2;
SCR: 2;
SDG: 2;
SEK: 2;
SGD: 2;
SHP: 2;
SLL: 2;
SOS: 2;
SRD: 2;
SSP: 2;
STN: 2;
SVC: 2;
SYP: 2;
SZL: 2;
THB: 2;
TJS: 2;
TMT: 2;
TND: 3;
TOP: 2;
TRY: 2;
TTD: 2;
TUSD: 2;
tUSDT: 2;
TWD: 2;
TZS: 2;
UAH: 2;
UGX: 0;
USB: 2;
USD: 2;
USDC: 2;
USDK: 2;
UST: 2;
USN: 2;
UYI: 0;
UYU: 2;
UYW: 4;
UZS: 2;
VES: 2;
VND: 0;
VUV: 0;
WST: 2;
XAF: 0;
XCD: 2;
XOF: 0;
XPF: 0;
YER: 2;
ZAR: 2;
ZMW: 2;
ZWL: 2;
```
41 changes: 41 additions & 0 deletions utils-docs/docs/Constants/localstorage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
sidebar_position: 2
---

# localstorage

```JS
activeLoginid = "client.active_loginid";
```

```JS
accountList = "client.account_list";
```

```JS
configAppId = "config.app_id";
```

```JS
configServerURL = "config.server_url";
```

```JS
i18nLanguage = "i18n_language";
```

```JS
uiTheme = "ui.theme";
```

```JS
uiShowReportsDrawer = "ui.show_report_drawer";
```

```JS
uiExpandAccountSwitcher = "ui.expand_account_switcher";
```

```JS
traderLayout = "trader.layout";
```
47 changes: 47 additions & 0 deletions utils-docs/docs/Constants/url.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
sidebar_position: 2
---

# url

### Base Domains

```JS
deriv = "deriv.com";
derivMe = "deriv.me";
derivBe = "deriv.be";

supportedDomains = [deriv, derivBe, derivMe];
baseDomain = window.location.hostname.split("app.")[1];
domain = supportedDomains.includes(baseDomain) ? baseDomain : deriv;
```

### Deriv URLs

```JS
binaryBotProduction = `https://bot.${domain}`;
binaryBotStaging = `https://staging-bot.${domain}`;
derivAppProduction = `https://app.${domain}`;
derivAppStaging = `https://staging-app.${domain}`;
derivComProduction = `https://${domain}`;
derivComProductionEU = `https://eu.${domain}`;
derivComStaging = `https://staging.${domain}`;
derivHost = domain;
smartTraderProduction = `https://smarttrader.${domain}`;
smartTraderStaging = `https://staging-smarttrader.${domain}`;
```

### Deriv WhatsApp

```JS
whatsApp = "https://wa.me/35699578341";
```

### QueryParameters

```JS
lang: "lang";
action: "action";

type QueryParameters = keyof typeof queryParameters;
```
Loading

0 comments on commit c7e5aea

Please sign in to comment.