You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: STYLE_GUIDE.md
+22-19
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ Be mindful of any feedback you receive from users, and let it guide you to impro
26
26
- Where a request includes optional parameters which will result in different response structures, the file should contain a code block for each possible request variation, followed by a code block for the response of each example.
27
27
- Below the request/response examples, include code blocks for each potential error response, along with details on what causes the error and how it might be resolved.
28
28
- In some cases, it may be appropriate to group related methods together in a single `index.mdx` file. For example, the `index.mdx` file within the `task_init_trezor` folder contains documentation for all methods for initialisation and authentication with a Trezor hardware wallet.
29
-
- Where common structures exist in the request or response of mulitple methods, these should be documented in the `index.mdx` file in the base folder for a section (e.g. [src/pages/atomicdex/api/v20/index.mdx](src/pages/atomicdex/api/v20/index.mdx)), and linked to from request/response parameter tables where required.
29
+
- Where common structures exist in the request or response of mulitple methods, these should be documented in the `index.mdx` file in the base folder for a section (e.g. [src/pages/komodo-defi-framework/api/v20/index.mdx](src/pages/komodo-defi-framework/api/v20/index.mdx)), and linked to from request/response parameter tables where required.
30
30
- Where a method or parameter is deprecated, this should be communicated in the method heading or request parameters table.
31
31
- Separate sections of content with subheadings to make scanning and finding the information they need easier. Two line breaks should be used before and one line break after each subheading.
32
32
@@ -44,7 +44,7 @@ Be mindful of any feedback you receive from users, and let it guide you to impro
44
44
- Use simple language: Where possible, avoid jargon or technical terms that may be unfamiliar to the reader. When unavoidable, provide a link to a definition or explanation of the term.
45
45
- Proofread and test your content: Make sure to proofread your MDX file for errors and test any code snippets or examples to ensure they work as expected.
46
46
- Be generous with hyperlinks: Link to relevant documentation or resources, whether to somewhere else within our internal docs or to a respected external source. This will provide additional context and help users better understand the content.
47
-
- Use absolute links for internal docs: The `pages` folder is the root directory for internal docs. Use absolute links to reference other pages within the `pages` folder, for example: `[AtomicDEX API methods](/atomicdex/api/#sub-section-header)`. The url must end with a slash.
47
+
- Use absolute links for internal docs: The `pages` folder is the root directory for internal docs. Use absolute links to reference other pages within the `pages` folder, for example: `[Komodo DeFi Framework API methods](/komodo-defi-framework/api/#sub-section-header)`. The url must end with a slash.
48
48
- Use bullet points and numbered lists to break up long paragraphs to make the content more readable.
49
49
50
50
## Syntax
@@ -68,23 +68,23 @@ Be mindful of any feedback you receive from users, and let it guide you to impro
| coin | string | The name of the coin the user desires to activate. |
74
+
| fee | object | Optional. A standard [FeeInfo](/komodo-defi-framework/api/common_structures/#FeeInfo) object. |
75
+
| amount | float | Required, unless `max` is `true`. The amount of balance to send. |
76
+
| max | boolean | Optional, defaults to `false`. Send whole balance. |
77
+
| memo | string | Optional, used for ZHTLC and Tendermint coins only. Attaches a memo to the transaction. |
78
78
79
79
## Variables
80
80
81
-
- For AtomicDEX-API methods, the userpass variable should always be `testpsw`
81
+
- For Komodo DeFi Framework API methods, the userpass variable should always be `testpsw`
82
82
83
83
## Templates
84
84
85
85
Use the linked templates below as a starting point for new documentation pages.
86
86
87
-
-[AtomicDEX API methods](templates/atomicdex_method.mdx)
87
+
-[Komodo DeFi Framework API methods](templates/komodefi_method.mdx)
88
88
89
89
## How to contribute
90
90
@@ -166,12 +166,13 @@ MDX supports standard markdown by default [CommonMark](https://commonmark.org/).
166
166
167
167
The `CodeGroup` acts as a wrapper around code blocks. It allows us to have tabbed content (or not, if it's a single block) with properties such as **title, tags, labels and more**. An example would look something like this:
It is important to **note that**, "**AtomicDEX methods**" should be wrapped with `CodeGroup` tags, using the **method name** as the **label value**, and the **tag value** set to **POST**, an additional **mm2MethodDecorate property** with the value **"true"**. This will generate code blocks for:
208
+
It is important to **note that**, "**Komodo DeFi Framework methods**" should be wrapped with `CodeGroup` tags, using the **method name** as the **label value**, and the **tag value** set to **POST**, an additional **mm2MethodDecorate property** with the value **"true"**. This will generate code blocks for:
208
209
209
210
- **JSON**: The pure request body.
210
211
- **Python3**: Using the requests library.
@@ -218,7 +219,7 @@ You only need to include the `json` data, and the additional **mm2MethodDecorate
@@ -300,13 +302,13 @@ You'll mostly use this for API, Commands, etc. Responses, which should be wrappe
300
302
```
301
303
302
304
</CollapsibleSection>
303
-
```
305
+
````
304
306
305
307
The `CollapsibleSection` tags should also wrap all error responses (as a group), with the `expandedText` and `collapsedText` values set to '**Show Error Responses**' and '**Hide Error Responses' respectively**.
@@ -318,6 +320,7 @@ A working code would look like this:
318
320
"date": "2078-05-16"
319
321
}
320
322
```
323
+
````
321
324
322
325
</CollapsibleSection>
323
326
```
@@ -330,13 +333,13 @@ Rendered as:
330
333
331
334
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:
332
335
333
-
`import atomicManiq from "@/public/images/atomic-dex-maniq.webp";`
336
+
`import atomicManiq from "@/public/images/komodefi-maniq.webp";`
334
337
335
338
Now you can render the image using the `OptimizedImage` component, for example:
0 commit comments