Skip to content

Commit 5c31042

Browse files
committed
update binary name mm2 -> kdf
1 parent 756da8b commit 5c31042

File tree

15 files changed

+60
-60
lines changed

15 files changed

+60
-60
lines changed

src/data/sidebar.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,11 @@
138138
"href": "/komodo-defi-framework/tutorials/api-docker-telegram/"
139139
},
140140
{
141-
"title": "Compile MM2 from Source",
141+
"title": "Compile KDF from Source",
142142
"href": "/komodo-defi-framework/tutorials/how-to-compile-mm2-from-source/"
143143
},
144144
{
145-
"title": "How to Query the MM2 SQLite Database",
145+
"title": "How to Query the KDF SQLite Database",
146146
"href": "/komodo-defi-framework/tutorials/query-the-mm2-database/"
147147
},
148148
{
@@ -331,7 +331,7 @@
331331
"href": "/komodo-wallet/desktop/access-log-files/"
332332
},
333333
{
334-
"title": "Send Commands to an MM2 Instance Being Run by Komodo Wallet using Postman",
334+
"title": "Send Commands to an KDF Instance Being Run by Komodo Wallet using Postman",
335335
"href": "/komodo-wallet/desktop/send-commands-to-mm2-instance/"
336336
}
337337
]

src/pages/komodo-defi-framework/api/v20/add_node_to_version_stat/index.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
export const title = "Komodo DeFi Framework Method: Add Node to Version Stat";
2-
export const description = "The add_node_to_version_stat method adds a Node's name, IP address and PeerID to a local database to track which version of MM2 it is running.";
2+
export const description = "The add_node_to_version_stat method adds a Node's name, IP address and PeerID to a local database to track which version of KDF it is running.";
33

44
# add\_node\_to\_version\_stat
55

6-
The `add_node_to_version_stat` method adds a Node's name, IP address and PeerID to a local database to track which version of MM2 it is running. The name parameter is an arbitrary identifying string, such as "seed\_alpha" or "dragonhound\_DEV". The address parameter is the node's IP address or domain names. The Peer ID can be found in the MM2 log file after a connection has been initiated, and looks like the below:
6+
The `add_node_to_version_stat` method adds a Node's name, IP address and PeerID to a local database to track which version of KDF it is running. The name parameter is an arbitrary identifying string, such as "seed\_alpha" or "dragonhound\_DEV". The address parameter is the node's IP address or domain names. The Peer ID can be found in the KDF log file after a connection has been initiated, and looks like the below:
77

88
`07 09:33:58, atomicdex_behaviour:610] INFO Local peer id: PeerId("12D3KooWReXsTVCKGAna1tzrD1jaUttTSs17ULFuvvzoGD9bqmmA")
99
`

src/pages/komodo-defi-framework/api/v20/remove_node_from_version_stat/index.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
export const title = "Komodo DeFi Framework Method: Remove Node from Version Stat";
2-
export const description = "The remove_node_from_version_stat method removes a Node from the local database that tracks which version of MM2 it is running.";
2+
export const description = "The remove_node_from_version_stat method removes a Node from the local database that tracks which version of KDF it is running.";
33

44
# remove\_node\_from\_version\_stat
55

6-
The `remove_node_from_version_stat` method removes a Node (by name) from the local database which tracks which version of MM2 it is running. The name parameter is an arbitrary identifying string, such as "seed\_alpha" or "dragonhound\_DEV".
6+
The `remove_node_from_version_stat` method removes a Node (by name) from the local database which tracks which version of KDF it is running. The name parameter is an arbitrary identifying string, such as "seed\_alpha" or "dragonhound\_DEV".
77

88
## Arguments
99

src/pages/komodo-defi-framework/setup/configure-mm2-json/index.mdx

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ export const description =
44

55
# Komodo DeFi API configuration
66

7-
Komodo DeFi-API configuration parameters, along with additional runtime flags, and per-process environment variables are [listed in the source code](https://github.com/KomodoPlatform/komodo-defi-framework/blob/main/mm2src/mm2_main/src/mm2.rs#L151-L205), and can be viewed by running the `./mm2 --help`.
7+
Komodo DeFi-API configuration parameters, along with additional runtime flags, and per-process environment variables are [listed in the source code](https://github.com/KomodoPlatform/komodo-defi-framework/blob/main/mm2src/mm2_main/src/mm2.rs#L151-L205), and can be viewed by running the `./kdf --help`.
88

99
## MM2.json
1010

11-
When running the Komodo DeFi API via commandline with the `mm2` binary, some basic configuration parameters need to be defined in either an `MM2.json` file, or at runtime.
11+
When running the Komodo DeFi API via commandline with the `kdf` binary, some basic configuration parameters need to be defined in either an `MM2.json` file, or at runtime.
1212

1313
### Configuration Parameters
1414

@@ -19,7 +19,7 @@ When running the Komodo DeFi API via commandline with the `mm2` binary, some bas
1919
| passphrase | string | Your passphrase; this is the source of each of your coins private keys. [**KEEP IT SAFE!**](https://www.youtube.com/watch?v=WFpxVbTqhB8) |
2020
| rpc\_password | string | For RPC requests that need authentication, this will need to match the `userpass` value in the request body. |
2121
| allow\_weak\_password | boolean | Optional, defaults to `false`. If `true`, will allow low entropy rpc\_password. If `false` rpc\_password must not have 3 of the same characters in a row, must be between 8-32 characters in length, must contain at least one of each of the following: numeric, uppercase, lowercase, special character (e.g. !#$\*). It also can not contain the word "password", or the chars `<`, `>`, or `&`. |
22-
| dbdir | string | Optional, defaults to a subfolder named `DB` in the path of your `mm2` binary. This path will store the Komodo DeFi-API database data. |
22+
| dbdir | string | Optional, defaults to a subfolder named `DB` in the path of your `kdf` binary. This path will store the Komodo DeFi-API database data. |
2323
| rpcip | string | Optional, defaults to `127.0.0.1`. IP address to bind to for RPC server. |
2424
| rpcport | integer | Optional, defaults to `7783`. Port to use for RPC communication. |
2525
| rpc\_local\_only | boolean | Optional, defaults to `true`. If `false` the Komodo DeFi Framework API will allow rpc methods sent from external IP addresses. **Warning:** Only use this if you know what you are doing, and have put the appropriate security measures in place. |
@@ -111,7 +111,7 @@ The structure for adding additional coins can vary, please refer to the [listing
111111

112112
| Variable | Type | Description |
113113
| ------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
114-
| MM2\_CONF\_PATH | string | A file path to load the `MM2.json` configuration file. Defaults to `MM2.json` in the same folder as the `mm2` binary. |
114+
| MM2\_CONF\_PATH | string | A file path to load the `MM2.json` configuration file. Defaults to `MM2.json` in the same folder as the `kdf` binary. |
115115
| MM\_COINS\_PATH | string | A file path to load the `coins` configuration file. A comprehensive version for public use is maintained in the [Komodo Platform coins github repository](https://github.com/KomodoPlatform/coins/blob/master/coins) |
116116
| MM\_LOG | string | A file path to store the Komodo DeFi-API logs. |
117117
| USERPASS | string | For convenience, this variable can store the value of your `rpc_password` to be referenced in any shell scripts |

src/pages/komodo-defi-framework/setup/index.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,4 +179,4 @@ If everything installed successfully, a response that is similar to the followin
179179
“Finished dev [optimized + debuginfo] target(s) in 3m 33s”
180180
```
181181

182-
The Komodo DeFi Framework API executable is now built and available here: `~/komodo-defi-framework/target/debug/mm2`
182+
The Komodo DeFi Framework API executable is now built and available here: `~/komodo-defi-framework/target/debug/kdf`

src/pages/komodo-defi-framework/tutorials/api-walkthrough/index.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ We also need to create an MM2.json file in the same directory as the `coins` fil
9292
The MM2.json configuration commands can also be supplied at runtime, as below:
9393

9494
```bash
95-
stdbuf -oL ./mm2 "{\"gui\":\"Docs_Walkthru\",\"netid\":8762, \"passphrase\":\"YOUR_PASSPHRASE_HERE\", \"rpc_password\":\"YOUR_PASSWORD_HERE\"}" &
95+
stdbuf -oL ./kdf "{\"gui\":\"Docs_Walkthru\",\"netid\":8762, \"passphrase\":\"YOUR_PASSPHRASE_HERE\", \"rpc_password\":\"YOUR_PASSWORD_HERE\"}" &
9696
```
9797

9898
Replace `YOUR_PASSPHRASE_HERE` and `YOUR_PASSWORD_HERE` with your actual passphrase and password, and then execute the command in the terminal.
@@ -167,7 +167,7 @@ You should now see your userpass printed to the console.
167167
The `userpass` environment variable will remain in memory until the session is
168168
closed. When you open up a new session later, you'll need to create the
169169
`userpass` environment variable again. Additional environment variables for
170-
the Komodo DeFi Framework API can be found in the [configure mm2
170+
the Komodo DeFi Framework API can be found in the [configure KDF
171171
guide](/komodo-defi-framework/setup/configure-mm2-json/).
172172
</Note>
173173

src/pages/komodo-defi-framework/tutorials/coins-file-update/index.mdx

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ export const description = "This guide describes how to update a coins file in a
55

66
## Instructions
77

8-
* Compile the latest `mm2` binary following [these instructions](/komodo-defi-framework/setup/)
9-
* Place the `coins` file in the old format in the same directory as the compiled `mm2` binary
8+
* Compile the latest `kdf` binary following [these instructions](/komodo-defi-framework/setup/)
9+
* Place the `coins` file in the old format in the same directory as the compiled `kdf` binary
1010
* Open a terminal and navigate to the directory with both the files
11-
* Run the following command `./mm2 update_config coins coins_new`
11+
* Run the following command `./kdf update_config coins coins_new`
1212

1313
<Note>
1414
`mm2` can accept any valid paths as the arguments for the source and destination files
@@ -23,7 +23,7 @@ Success
2323

2424
* You will find a new file named `coins_new` in the same directory with the new format expected by Komodo DeFi Framework
2525
* Rename the file named `coins` to `coins_old` and then `coins_new` to `coins`
26-
* `mm2` will use the `coins` file in the new format the next time it is launched
26+
* `kdf` will use the `coins` file in the new format the next time it is launched
2727

2828
## Examples
2929

src/pages/komodo-defi-framework/tutorials/how-to-become-a-liquidity-provider/index.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ For example:
4040
```bash
4141
mkdir -p ~/komodo-defi-framework/target/debug
4242
cd ~/komodo-defi-framework/target/debug
43-
wget https://github.com/KomodoPlatform/komodo-defi-framework/releases/download/beta-2.1.4315/mm2-9fe6e9402-Linux-Release.zip
44-
unzip mm2-9fe6e9402-Linux-Release.zip
43+
wget $(curl --silent https://api.github.com/repos/KomodoPlatform/komodo-defi-framework/releases | jq -r '.[0].assets[] | select(.name | endswith("Linux-Release.zip")).browser_download_url')
44+
unzip *Linux-Release.zip
4545
```
4646

4747
Then you can proceed to [download the coins configuration file](/komodo-defi-framework/tutorials/how-to-become-a-liquidity-provider/#step-2-download-the-coins-configuration-file).
@@ -187,7 +187,7 @@ We now have basic scripts to use the Komodo DeFi Framework API as a liquidity pr
187187
To start the Komodo DeFi Framework API:
188188

189189
```bash
190-
stdbuf -oL nohup ./mm2
190+
stdbuf -oL nohup ./kdf
191191
```
192192
</Note>
193193

src/pages/komodo-defi-framework/tutorials/query-the-mm2-database/index.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export const description = "This guide describes how to query the MM2 SQLite dat
33

44
# How to Query the MM2 SQLite Database
55

6-
The Komodo DeFi Framework API stores historical information such as swaps and orders within an SQLite database, located under the DB user data folder (e.g. {'{folder continaing mm2 binary}'}/DB/{'{wallet identifying hex string}'}/MM2.db').
6+
The Komodo DeFi Framework API stores historical information such as swaps and orders within an SQLite database, located under the DB user data folder (e.g. {'{folder continaing kdf binary}'}/DB/{'{wallet identifying hex string}'}/MM2.db').
77

88
There are a variety of methods to query sqlite databases. Examples below show how to do a sqlite query in Linux terminal, but first you might need to install sqlite with `sudo apt install sqlite3`.
99

@@ -124,7 +124,7 @@ This table stores a record of results returned by registered nodes [tracked for
124124
| -- | --------- | ------------ | -------------------------------------------- |
125125
| 0 | id | INTEGER | Primary Key |
126126
| 1 | name | VARCHAR(255) | Node name |
127-
| 2 | version | VARCHAR(255) | Node Komodo DeFi Framework API (mm2) version |
127+
| 2 | version | VARCHAR(255) | Node Komodo DeFi Framework API (kdf) version |
128128
| 3 | timestamp | INTEGER | Timestamp |
129129
| 4 | error | VARCHAR(255) | Error details |
130130

src/pages/komodo-defi-framework/tutorials/setup-komodefi-api-aws/index.mdx

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ apt-get install -y unzip jq curl
1919
wget $(curl --silent https://api.github.com/repos/KomodoPlatform/komodo-defi-framework/releases | jq -r '.[0].assets[] | select(.name | endswith("Linux-Release.zip")).browser_download_url')
2020
wget https://raw.githubusercontent.com/KomodoPlatform/coins/master/coins
2121
unzip *Linux-Release.zip
22-
./mm2 "{\"netid\":8762,\"gui\":\"aws_cli\",\"passphrase\":\"SEED_WORDS_PLEASE_REPLACE\",\"rpc_password\":\"RPC_PASS_PLEASE_REPLACE\",\"myipaddr\":\"0.0.0.0\"}"
22+
./kdf "{\"netid\":8762,\"gui\":\"aws_cli\",\"passphrase\":\"SEED_WORDS_PLEASE_REPLACE\",\"rpc_password\":\"RPC_PASS_PLEASE_REPLACE\",\"myipaddr\":\"0.0.0.0\"}"
2323
```
2424

2525
## Install AWS CLI , get AWS access credentials
@@ -47,9 +47,9 @@ In the terminal commands below, note that you must first change the texts `REPLA
4747
```bash
4848
export AWS_ACCESS_KEY_ID=REPLACE_ACCESS_KEY_ID
4949
export AWS_SECRET_ACCESS_KEY=REPLACE_SECRET_ACCESS_KEY
50-
aws ec2 create-key-pair --region us-east-1 --key-name mm2Keypair | jq -r .KeyMaterial > ~/.ssh/mm2.pem
51-
chmod 400 ~/.ssh/mm2.pem
52-
sgID=$(aws ec2 create-security-group --region us-east-1 --group-name sgMM2 --description "sg-mm2"| jq -r '.GroupId')
50+
aws ec2 create-key-pair --region us-east-1 --key-name mm2Keypair | jq -r .KeyMaterial > ~/.ssh/kdf.pem
51+
chmod 400 ~/.ssh/kdf.pem
52+
sgID=$(aws ec2 create-security-group --region us-east-1 --group-name sgMM2 --description "sg-kdf"| jq -r '.GroupId')
5353
aws ec2 authorize-security-group-ingress --region us-east-1 --group-name sgMM2 --protocol all --cidr 0.0.0.0/0
5454
aws ec2 run-instances --region us-east-1 --image-id ami-083d24fb90054e5f0 --count 1 --instance-type t3.micro --key-name mm2Keypair --security-group-ids $sgID --user-data file://komodo_defi_framework_setup.txt
5555
```
@@ -69,7 +69,7 @@ From the linked page above, copy the "IPv4 Public IP" of the instance and use it
6969

7070
```bash
7171
nodeIp=REPLACE_PUBLIC_IP
72-
ssh -o IdentitiesOnly=yes -i ~/.ssh/mm2.pem admin@$nodeIp 'curl -s --url "http://127.0.0.1:7783" --data "{\"userpass\":\"RPC_UserP@SSW0RD\",\"method\":\"version\"}"'
72+
ssh -o IdentitiesOnly=yes -i ~/.ssh/kdf.pem admin@$nodeIp 'curl -s --url "http://127.0.0.1:7783" --data "{\"userpass\":\"RPC_UserP@SSW0RD\",\"method\":\"version\"}"'
7373
```
7474

7575
Edit the command above as necessary to exchange one curl command for another from [the Komodo DeFi Framework API.](/komodo-defi-framework/api/)

0 commit comments

Comments
 (0)