Skip to content

Commit

Permalink
Merge branch 'dev' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
gcharang committed Oct 4, 2023
2 parents 91402f1 + 8cbc5ab commit 89cab25
Show file tree
Hide file tree
Showing 95 changed files with 1,350 additions and 1,156 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ Thumbs.db
*.out
*.pid
*.sublime-*

#custom
links-to-manually-check
61 changes: 58 additions & 3 deletions STYLE_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,28 @@ Be mindful of any feedback you receive from users, and let it guide you to impro
- Use `##` for subheadings.
- Use `###` for request/response parameter tables.
- Use `####` for request/response examples.
- Use mdx comments like this: `{/* comment comment */}` . Markdown comments like `<!--- comment comment--->` doesn't work.
- Use mdx comments like this: `{/* comment comment */}` . Markdown comments like `<!--- comment comment--->` doesn't work. Alternatively, you can use the `<DevComment>` component tags.
- No markdown/mdx comments in tables' rows

## Tables

- Include a reference table listing all **request** parameters, their type, a description, and whether it is required or optional.
- Include a reference table listing all **response** parameters, their type, a description, and whether it is part of the standard response or only returned when using a specific request parameter value.
- Optional parameters should be listed at the bottom of the parameter table.
- Optional parameters should be identified at the start of the parameter's description, along with the default value (if applicable).
- Optional parameters should be listed at the bottom of the parameter table
- Where specific parameters only apply for a specific action, this should be identified at the start of the parameter's description.
- Where a group of parameters are nested within a common structure, this should be given its own table, and linked to from the main parameter table.
- Common structure objects should be listed alphabetically in the file which contains them. This can be the same file as the parent method, unless the structure is used by multiple methods in different files - in that case, it should be listed in the root folder for the method group (e.g. legacy, v20, v20-dev).

For example:

| Parameter | Type | Description |
| --------- | ------- | --------------------------------------------------------------------------------------- |
| coin | string | The name of the coin the user desires to activate. |
| fee | object | Optional. A standard [FeeInfo](/atomicdex/api/v20/#FeeInfo) object. |
| amount | float | Required, unless `max` is `true`. The amount of balance to send. |
| max | boolean | Optional, defaults to `false`. Send whole balance. |
| memo | string | Optional, used for ZHTLC and Tendermint coins only. Attaches a memo to the transaction. |

## Variables

Expand All @@ -83,6 +96,48 @@ Pages are heavily [**MDX**](https://mdxjs.com/) ("markdown extension") based, wh

Titles and descriptions are mandatory on every documentation page and must be added at the top level. To add a title use this syntax: `export const title = "Documentation page title";`. To add a description use: `export const description = "documentation page description";`

### Subsections and headings

Though it is good to separate each method into its own document, sometimes it is necessary to group methods together.
In such a case, we can define the `title`, `label` and/or `tag` properties alongside a section header and within a `CodeGroup` tag so that anchor links are generated in a consistent manner.

- The `label` property should be the exact same as the RPC method.
- The `title` property should be blank, unless the section heading is not the same as the `label` property. In that case, the `title` property should be the (human readable) section heading.
- for methods with a `task::xxxx::` or `lightning::xxxx::` prefix, the `label` property should be the full RPC method name, and the title should be the truncated RPC method without the prefix (only the last bit, after the last set of `::`), or a human readable title as above (recommended).

For example, with a human readable section heading:

```
## Transaction History
...
### my_tx_history with pagination {{label : 'my_tx_history', tag : 'POST'}}
<CodeGroup title="Transaction History" tag="POST" label="my_tx_history" mm2MethodDecorate="true">
...
</CodeGroup>
```

For example, with a `task::xxxx::` prefix:

```
# Trezor Initialisation
...
## init {{label : 'task::init_trezor::init', tag : 'POST'}}
...
<CodeGroup title="init" tag="POST" label="task::init_trezor::init" mm2MethodDecorate="true">
...
</CodeGroup>
```

For example, when method and title are the same:

```
## get_balance {{label : 'get_balance', tag : 'POST'}}
...
<CodeGroup title="" tag="POST" label="get_balance" mm2MethodDecorate="true">
...
</CodeGroup>
```

### Components

We've got a few **MDX** components we use across the Docs. Below is a walkthrough of how to start writing and using the components that make up the Docs.
Expand Down Expand Up @@ -259,7 +314,7 @@ Rendered as:

Images should be added to the related subfolder within the `src/images` folder, and rendered using the `OptimizedImage` component. To render an image in the `src/image` folder, you'd have to import the image using the following syntax:

`import atomicManiq from "@/images/atomic-dex-maniq.webp";`
`import atomicManiq from "@/public/images/atomic-dex-maniq.webp";`

Now you can render the image using the `OptimizedImage` component, for example:

Expand Down
28 changes: 14 additions & 14 deletions filepathSlugs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1658,32 +1658,32 @@
"coin-activation",
"native-mode-activation",
"lite-mode-activation",
"electrum",
"electrum-method",
"arguments",
"response",
"examples",
"command-for-utxo-based-coins",
"utxo-coin-activation",
"response-success",
"command-for-utxo-based-coins-with-required-confirmations-requires-notarization-and-mm2-arguments",
"utxo-coin-activation-with-required-confirmations-requires-notarization-and-mm2-arguments",
"response-success-2",
"command-for-qtum-qrc-20-tokens",
"qtum-qrc-20-coin-activation",
"response-success-3",
"response-error-mm2-is-not-set",
"enable",
"enable-method",
"arguments-2",
"response-2",
"examples-2",
"command-for-native-utxo-based-blockchains",
"native-utxo-coin-activation",
"response-3",
"command-with-required-confirmations-requires-notarization-and-mm2-arguments",
"response-4",
"command-for-ethereum-and-erc-20-based-blockchains",
"response-5",
"command-for-ethereum-and-erc-20-based-blockchains-with-gas-station-url-and-policy",
"evm-coin-activation-with-gas-station-url-and-policy",
"response-6",
"command-for-polygon-matic-and-plg-20-tokens",
"polygon-matic-and-plg-20-activation",
"response-7",
"command-for-binance-coin-bnb-and-bep-20-tokens",
"binance-coin-bnb-and-bep-20-activation",
"response-8"
],
"src/pages/atomicdex/api/legacy/coins_needed_for_kick_start/index.mdx": [
Expand Down Expand Up @@ -2333,6 +2333,7 @@
"coin-protocol-data",
"confirmation-targets",
"counterparty-channel-config",
"fee-info",
"lightning-activation-params",
"lightning-channel-amount",
"lightning-channel-config",
Expand Down Expand Up @@ -2797,7 +2798,7 @@
],
"src/pages/atomicdex/api/v20-dev/task_enable_z_coin/index.mdx": [
"zhtlc-coin-methods",
"init",
"initialize-z-coin-activation",
"arguments",
"response",
"examples",
Expand All @@ -2806,7 +2807,7 @@
"sync-from-sapling-activation-height-earliest",
"using-websockets-to-sync-from-proof-of-keys-day-2023",
"response-2",
"status",
"activation-status",
"arguments-2",
"response-3",
"examples-2",
Expand All @@ -2820,19 +2821,18 @@
"response-enabling-complete",
"response-no-zcash-params",
"response-error-no-such-task-2",
"cancel",
"cancel-initialization",
"arguments-3",
"response-4",
"examples-3",
"command",
"response-success",
"response-success-already-finished",
"response-error-no-such-task-3",
"z-coin-tx-history",
"z-coin-transaction-history",
"arguments-4",
"response-5",
"examples-4",
"z-coin-transaction-history",
"response-success-2",
"response-error-coin-not-supported",
"response-error-coin-not-active"
Expand Down
10 changes: 5 additions & 5 deletions src/deprecated/gaming-sdk-tutorial-0/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ int main()
## SDK Components

- [doctest](https://github.com/onqtam/doctest)
- The fastest feature-rich C++11/14/17/20 single-header testing framework for unit tests and TDD [http://bit.ly/doctest-docs](http://bit.ly/doctest-docs) (MIT)
- The fastest feature-rich C++11/14/17/20 single-header testing framework for unit tests and TDD [https://github.com/doctest/doctest/blob/master/doc/markdown/readme.md#reference](https://github.com/doctest/doctest/blob/master/doc/markdown/readme.md#reference) (MIT)
- [doom-st](https://github.com/doom/strong_type)
- C++ implementation of strong types (MIT)
- [doom-meta](https://github.com/doom/meta)
Expand Down Expand Up @@ -203,18 +203,18 @@ int main()
- ImGui binding for use with SFML (MIT)
- [SFML](https://github.com/SFML/SFML) (optional)
- Simple and Fast Multimedia Library
- [http://www.sfml-dev.org/](http://www.sfml-dev.org/)
- [https://www.sfml-dev.org/](https://www.sfml-dev.org/)
- [reproc](https://github.com/DaanDeMeyer/reproc) (optional)
- Cross-platform (C99/C++11) process library (MIT)
- [lua](https://github.com/lua/lua) (optional)
- The Lua repo, as seen by the Lua team. (MIT)
- [sol2](https://github.com/ThePhD/sol2) (optional)
- Sol3 (sol2 v3.0)
- a C++ \<\-> Lua API wrapper with advanced features and top notch performance
- [http://sol2.rtfd.io/](http://sol2.rtfd.io/) (MIT)
- [https://sol2.readthedocs.io/en/latest/](https://sol2.readthedocs.io/en/latest/) (MIT)
- [restclient-cpp](https://github.com/mrtazz/restclient-cpp) (optional)
- C++ client for making HTTP/REST requests
- [http://code.mrtazz.com/restclient-cpp/](http://code.mrtazz.com/restclient-cpp/) (MIT)
- [https://code.mrtazz.com/restclient-cpp/](https://code.mrtazz.com/restclient-cpp/) (MIT)
- [box2D](https://github.com/erincatto/Box2D) (optional)
- Box2D is a 2D physics engine for games
- [http://box2d.org](http://box2d.org) (ZLib)
- [https://box2d.org](https://box2d.org) (ZLib)
27 changes: 14 additions & 13 deletions src/deprecated/gaming-sdk-tutorial-3/index.mdx
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
export const title = "Gaming Tutorial: Part-3";
export const description = "Learn how to create a Tic-Tac-Toe game using the Komodo gaming SDK. This tutorial covers setting up the executable, creating a window, and initializing the game.";

import black_window from "@/images/antara/black_window.png";
import tictactoeGrid from "@/images/antara/tictactoe.grid.jpg";
import grid_lines from "@/images/antara/grid_lines.png";
import vertex_order from "@/images/antara/vertex_order.png";
import border_problem from "@/images/antara/border_problem.png";
import tictactoe_real_grid from "@/images/antara/tictactoe_real_grid.png";
import tictactoe_board from "@/images/antara/tictactoe_board.png";
import tictactoePlaying from "@/images/antara/tictactoe-playing.png";
import tictactoeXwin from "@/images/antara/tictactoe-x-win.png";
import tictactoeOwin from "@/images/antara/tictactoe-o-win.png";
import tictactoeTie from "@/images/antara/tictactoe-tie.png";
export const description =
"Learn how to create a Tic-Tac-Toe game using the Komodo gaming SDK. This tutorial covers setting up the executable, creating a window, and initializing the game.";

import black_window from "@/public/images/antara/black_window.png";
import tictactoeGrid from "@/public/images/antara/tictactoe.grid.jpg";
import grid_lines from "@/public/images/antara/grid_lines.png";
import vertex_order from "@/public/images/antara/vertex_order.png";
import border_problem from "@/public/images/antara/border_problem.png";
import tictactoe_real_grid from "@/public/images/antara/tictactoe_real_grid.png";
import tictactoe_board from "@/public/images/antara/tictactoe_board.png";
import tictactoePlaying from "@/public/images/antara/tictactoe-playing.png";
import tictactoeXwin from "@/public/images/antara/tictactoe-x-win.png";
import tictactoeOwin from "@/public/images/antara/tictactoe-o-win.png";
import tictactoeTie from "@/public/images/antara/tictactoe-tie.png";

# Tutorial: How to do a Tic-Tac-Toe in less than 15 minutes with the gaming SDK ?

Expand Down
19 changes: 10 additions & 9 deletions src/deprecated/gaming-sdk-tutorial-4/index.mdx
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
export const title = "Gaming Tutorial: Part-4";
export const description = "Learn how to create a Flappy Bird game using the Komodo gaming SDK. This tutorial covers setting up the executable, creating a window, and creating the game.";

import blackWindow from "@/images/antara/black_window.png";
import komodo_icon from "@/images/antara/komodo_icon.png";
import black_window from "@/images/antara/black_window.png";
import fb_column from "@/images/antara/fb_column.png";
import fb_background from "@/images/antara/fb_background.png";
import fb_player_creation from "@/images/antara/fb_player_creation.png";
import fb_score from "@/images/antara/fb_score.png";
export const description =
"Learn how to create a Flappy Bird game using the Komodo gaming SDK. This tutorial covers setting up the executable, creating a window, and creating the game.";

import blackWindow from "@/public/images/antara/black_window.png";
import komodo_icon from "@/public/images/antara/komodo_icon.png";
import black_window from "@/public/images/antara/black_window.png";
import fb_column from "@/public/images/antara/fb_column.png";
import fb_background from "@/public/images/antara/fb_background.png";
import fb_player_creation from "@/public/images/antara/fb_player_creation.png";
import fb_score from "@/public/images/antara/fb_score.png";

# Tutorial: Flappy Bird

Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading

0 comments on commit 89cab25

Please sign in to comment.