Skip to content

Commit 28d5ab6

Browse files
committed
add info for 1inch API auth config/env params
1 parent f1c67a8 commit 28d5ab6

File tree

1 file changed

+28
-8
lines changed
  • src/pages/komodo-defi-framework/setup/configure-mm2-json

1 file changed

+28
-8
lines changed

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

+28-8
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ When running the Komodo DeFi API via commandline with the `mm2` binary, some bas
3737
| passphrase | string | Optional. Your passphrase (mnemonic phrase) in plain text. This is the source of each of your coins private keys. [**KEEP IT SAFE!**](https://www.youtube.com/watch?v=WFpxVbTqhB8). For more secure, encrypted storage in a local database, use the `wallet_name` and `wallet_password` parameters below. |
3838
| wallet\_name | string | Optional. An arbitrary name for the wallet. If no `passphrase` is provided, and the wallet has been used already, the `wallet_password` will be used to decrypt the local stored mnemonic phrase. If it has not been used before, a mnemonic will be generated and encrypted for local storage. The mnemonic phrase can be seen in plain text using the (/komodo-defi-framework/api/v20/get\_mnemonic)\[] method. |
3939
| wallet\_password | string | Optional, required if using `wallet_name`. The password use to encrypt your wallet's mnemonic phrase for local storage, and decrypt the wallet when logging in. |
40+
| 1inch\_api | string | Optional, required if using [1inch integration methods](/komodo-defi-framework/api/v20-dev/one_inch_v6_0_classic_swap_create/). URL for 1inch API, e.g. "https://api.1inch.dev" |
41+
42+
4043

4144
#### Example (allowing weak password):
4245

@@ -107,6 +110,21 @@ When running the Komodo DeFi API via commandline with the `mm2` binary, some bas
107110
}
108111
```
109112

113+
#### Example with `1inch_api`
114+
115+
```json
116+
{
117+
"gui": "DEVDOCS_CLI",
118+
"netid": 8762,
119+
"rpc_password": "Ent3r_Un1Qu3_Pa$$w0rd"
120+
"1inch_api": "https://api.1inch.dev"
121+
}
122+
```
123+
<Note>
124+
To use methods which interface with the 1inch API, you'll also need to set your 1inch API key as an environment variable called `ONE_INCH_API_TEST_AUTH`, e.g. `ONE_INCH_API_TEST_AUTH="Bearer YourAPIkey"`.
125+
</Note>
126+
127+
110128
#### Example for HD Wallets:
111129

112130
If you are using HD wallets, you will need to set `enable_hd` to `true` in to your [MM2.json file](/komodo-defi-framework/setup/configure-mm2-json/).
@@ -140,14 +158,16 @@ The structure for adding additional coins can vary, please refer to the [listing
140158

141159
### Optional environment variables:
142160

143-
| Variable | Type | Description |
144-
| ------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
145-
| 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. |
146-
| 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) |
147-
| MM\_LOG | string | A file path to store the Komodo DeFi-API logs. |
148-
| MM\_CERT\_PATH | string | Full path to TLS/SSL certificate file. |
149-
| MM\_CERT\_KEY\_PATH | string | Full path to TLS/SSL certificate key file. |
150-
| RUST\_LOG | string | Global default log level is `info`. To modify the log level for specific module (e.g. for debugging `atomicdex_gossipsub::behaviour`) and keep the default at `info`, use the format `"info,atomicdex_gossipsub::behaviour=debug"` |
161+
| Variable | Type | Description |
162+
| -------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
163+
| 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. |
164+
| 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) |
165+
| MM\_LOG | string | A file path to store the Komodo DeFi-API logs. |
166+
| MM\_CERT\_PATH | string | Full path to TLS/SSL certificate file. |
167+
| MM\_CERT\_KEY\_PATH | string | Full path to TLS/SSL certificate key file. |
168+
| RUST\_LOG | string | Global default log level is `info`. To modify the log level for specific module (e.g. for debugging `atomicdex_gossipsub::behaviour`) and keep the default at `info`, use the format `"info,atomicdex_gossipsub::behaviour=debug"` |
169+
| ONE\_INCH\_API\_TEST\_AUTH | string | 1inch API key to authenticate for using [1inch integration methods](/komodo-defi-framework/api/v20-dev/one_inch_v6_0_classic_swap_create/). |
170+
151171

152172
### What now?
153173

0 commit comments

Comments
 (0)