---
# !!! DO NOT MODIFY !!!
# This file is auto-generated by the gendoc tool based on the source code of the app.
description: This section describes the configuration parameters and their types for WASP.
keywords:
- IOTA Node 
- Hornet Node
- WASP Node
- Smart Contracts
- L2
- Configuration
- JSON
- Customize
- Config
- reference
---


# Core Configuration

WASP uses a JSON standard format as a config file. If you are unsure about JSON syntax, you can find more information in the [official JSON specs](https://www.json.org).

You can change the path of the config file by using the `-c` or `--config` argument while executing `wasp` executable.

For example:
```bash
wasp -c config_defaults.json
```

You can always get the most up-to-date description of the config parameters by running:

```bash
wasp -h --full
```

## <a id="app"></a> 1. Application

| Name                      | Description                                            | Type    | Default value |
| ------------------------- | ------------------------------------------------------ | ------- | ------------- |
| checkForUpdates           | Whether to check for updates of the application or not | boolean | true          |
| [shutdown](#app_shutdown) | Configuration for shutdown                             | object  |               |

### <a id="app_shutdown"></a> Shutdown

| Name                     | Description                                                                                            | Type   | Default value |
| ------------------------ | ------------------------------------------------------------------------------------------------------ | ------ | ------------- |
| stopGracePeriod          | The maximum time to wait for background processes to finish during shutdown before terminating the app | string | "5m"          |
| [log](#app_shutdown_log) | Configuration for Shutdown Log                                                                         | object |               |

### <a id="app_shutdown_log"></a> Shutdown Log

| Name     | Description                                         | Type    | Default value  |
| -------- | --------------------------------------------------- | ------- | -------------- |
| enabled  | Whether to store self-shutdown events to a log file | boolean | true           |
| filePath | The file path to the self-shutdown log              | string  | "shutdown.log" |

Example:

```json
  {
    "app": {
      "checkForUpdates": true,
      "shutdown": {
        "stopGracePeriod": "5m",
        "log": {
          "enabled": true,
          "filePath": "shutdown.log"
        }
      }
    }
  }
```

## <a id="logger"></a> 2. Logger

| Name              | Description                                                                 | Type    | Default value |
| ----------------- | --------------------------------------------------------------------------- | ------- | ------------- |
| level             | The minimum enabled logging level                                           | string  | "info"        |
| disableCaller     | Stops annotating logs with the calling function's file name and line number | boolean | true          |
| disableStacktrace | Disables automatic stacktrace capturing                                     | boolean | false         |
| stacktraceLevel   | The level stacktraces are captured and above                                | string  | "panic"       |
| encoding          | The logger's encoding (options: "json", "console")                          | string  | "console"     |
| outputPaths       | A list of URLs, file paths or stdout/stderr to write logging output to      | array   | stdout        |
| disableEvents     | Prevents log messages from being raced as events                            | boolean | true          |

Example:

```json
  {
    "logger": {
      "level": "info",
      "disableCaller": true,
      "disableStacktrace": false,
      "stacktraceLevel": "panic",
      "encoding": "console",
      "outputPaths": [
        "stdout"
      ],
      "disableEvents": true
    }
  }
```

## <a id="inx"></a> 3. INX

| Name                  | Description                                                                                        | Type   | Default value    |
| --------------------- | -------------------------------------------------------------------------------------------------- | ------ | ---------------- |
| address               | The INX address to which to connect to                                                             | string | "localhost:9029" |
| maxConnectionAttempts | The amount of times the connection to INX will be attempted before it fails (1 attempt per second) | uint   | 30               |

Example:

```json
  {
    "inx": {
      "address": "localhost:9029",
      "maxConnectionAttempts": 30
    }
  }
```

## <a id="database"></a> 4. Database

| Name      | Description                                                   | Type    | Default value |
| --------- | ------------------------------------------------------------- | ------- | ------------- |
| inMemory  | Whether the database is only kept in memory and not persisted | boolean | false         |
| directory | Path to the database folder                                   | string  | "waspdb"      |

Example:

```json
  {
    "database": {
      "inMemory": false,
      "directory": "waspdb"
    }
  }
```

## <a id="registry"></a> 5. Registry

| Name     | Description                                              | Type    | Default value         |
| -------- | -------------------------------------------------------- | ------- | --------------------- |
| useText  | Enable text key/value store for registry db.             | boolean | false                 |
| fileName | Registry filename. Ignored if registry.useText is false. | string  | "chain-registry.json" |

Example:

```json
  {
    "registry": {
      "useText": false,
      "fileName": "chain-registry.json"
    }
  }
```

## <a id="peering"></a> 6. Peering

| Name  | Description                                          | Type   | Default value    |
| ----- | ---------------------------------------------------- | ------ | ---------------- |
| netID | Node host address as it is recognized by other peers | string | "127.0.0.1:4000" |
| port  | Port for Wasp committee connection/peering           | int    | 4000             |

Example:

```json
  {
    "peering": {
      "netID": "127.0.0.1:4000",
      "port": 4000
    }
  }
```

## <a id="chains"></a> 7. Chains

| Name                             | Description                                                          | Type    | Default value |
| -------------------------------- | -------------------------------------------------------------------- | ------- | ------------- |
| broadcastUpToNPeers              | Number of peers an offledger request is broadcasted to               | int     | 2             |
| broadcastInterval                | Time between re-broadcast of offledger requests                      | string  | "5s"          |
| apiCacheTTL                      | Time to keep processed offledger requests in api cache               | string  | "5m"          |
| pullMissingRequestsFromCommittee | Whether or not to pull missing requests from other committee members | boolean | true          |

Example:

```json
  {
    "chains": {
      "broadcastUpToNPeers": 2,
      "broadcastInterval": "5s",
      "apiCacheTTL": "5m",
      "pullMissingRequestsFromCommittee": true
    }
  }
```

## <a id="rawblocks"></a> 8. Raw Blocks

| Name      | Description                              | Type    | Default value |
| --------- | ---------------------------------------- | ------- | ------------- |
| enabled   | Whether the raw blocks plugin is enabled | boolean | false         |
| directory | The raw blocks path                      | string  | "blocks"      |

Example:

```json
  {
    "rawBlocks": {
      "enabled": false,
      "directory": "blocks"
    }
  }
```

## <a id="profiling"></a> 9. Profiling

| Name        | Description                                       | Type    | Default value    |
| ----------- | ------------------------------------------------- | ------- | ---------------- |
| enabled     | Whether the profiling plugin is enabled           | boolean | false            |
| bindAddress | The bind address on which the profiler listens on | string  | "localhost:6060" |

Example:

```json
  {
    "profiling": {
      "enabled": false,
      "bindAddress": "localhost:6060"
    }
  }
```

## <a id="wal"></a> 10. Write-Ahead Logging

| Name      | Description                       | Type    | Default value |
| --------- | --------------------------------- | ------- | ------------- |
| enabled   | Whether the WAL plugin is enabled | boolean | true          |
| directory | Path to logs folder               | string  | "wal"         |

Example:

```json
  {
    "wal": {
      "enabled": true,
      "directory": "wal"
    }
  }
```

## <a id="metrics"></a> 11. Metrics

| Name        | Description                             | Type    | Default value    |
| ----------- | --------------------------------------- | ------- | ---------------- |
| enabled     | Whether the metrics plugin is enabled   | boolean | true             |
| bindAddress | The bind address for the node dashboard | string  | "127.0.0.1:2112" |

Example:

```json
  {
    "metrics": {
      "enabled": true,
      "bindAddress": "127.0.0.1:2112"
    }
  }
```

## <a id="webapi"></a> 12. Web API

| Name                 | Description                                     | Type    | Default value    |
| -------------------- | ----------------------------------------------- | ------- | ---------------- |
| enabled              | Whether the web api plugin is enabled           | boolean | true             |
| nodeOwnerAddresses   | Defines a list of node owner addresses (bech32) | array   |                  |
| bindAddress          | The bind address for the node web api           | string  | "127.0.0.1:9090" |
| [auth](#webapi_auth) | Configuration for auth                          | object  |                  |

### <a id="webapi_auth"></a> Auth

| Name                        | Description                            | Type   | Default value |
| --------------------------- | -------------------------------------- | ------ | ------------- |
| scheme                      | Selects which authentication to choose | string | "jwt"         |
| [jwt](#webapi_auth_jwt)     | Configuration for JWT Auth             | object |               |
| [basic](#webapi_auth_basic) | Configuration for Basic Auth           | object |               |
| [ip](#webapi_auth_ip)       | Configuration for IP-based Auth        | object |               |

### <a id="webapi_auth_jwt"></a> JWT Auth

| Name     | Description        | Type   | Default value |
| -------- | ------------------ | ------ | ------------- |
| duration | Jwt token lifetime | string | "24h"         |

### <a id="webapi_auth_basic"></a> Basic Auth

| Name     | Description                                     | Type   | Default value |
| -------- | ----------------------------------------------- | ------ | ------------- |
| username | The username which grants access to the service | string | "wasp"        |

### <a id="webapi_auth_ip"></a> IP-based Auth

| Name      | Description                                          | Type  | Default value |
| --------- | ---------------------------------------------------- | ----- | ------------- |
| whitelist | A list of ips that are allowed to access the service | array | 127.0.0.1     |

Example:

```json
  {
    "webapi": {
      "enabled": true,
      "nodeOwnerAddresses": [],
      "bindAddress": "127.0.0.1:9090",
      "auth": {
        "scheme": "jwt",
        "jwt": {
          "duration": "24h"
        },
        "basic": {
          "username": "wasp"
        },
        "ip": {
          "whitelist": [
            "127.0.0.1"
          ]
        }
      }
    }
  }
```

## <a id="nanomsg"></a> 13. nanomsg

| Name    | Description                              | Type    | Default value |
| ------- | ---------------------------------------- | ------- | ------------- |
| enabled | Whether the publisher plugin is enabled  | boolean | true          |
| port    | The port for the nanomsg event publisher | int     | 5550          |

Example:

```json
  {
    "nanomsg": {
      "enabled": true,
      "port": 5550
    }
  }
```

## <a id="dashboard"></a> 14. Dashboard

| Name                    | Description                                      | Type    | Default value    |
| ----------------------- | ------------------------------------------------ | ------- | ---------------- |
| enabled                 | Whether the dashboard plugin is enabled          | boolean | true             |
| bindAddress             | The bind address for the node dashboard          | string  | "127.0.0.1:7000" |
| exploreAddressURL       | URL to add as href to addresses in the dashboard | string  | ""               |
| [auth](#dashboard_auth) | Configuration for auth                           | object  |                  |

### <a id="dashboard_auth"></a> Auth

| Name                           | Description                            | Type   | Default value |
| ------------------------------ | -------------------------------------- | ------ | ------------- |
| scheme                         | Selects which authentication to choose | string | "basic"       |
| [jwt](#dashboard_auth_jwt)     | Configuration for JWT Auth             | object |               |
| [basic](#dashboard_auth_basic) | Configuration for Basic Auth           | object |               |
| [ip](#dashboard_auth_ip)       | Configuration for IP-based Auth        | object |               |

### <a id="dashboard_auth_jwt"></a> JWT Auth

| Name     | Description        | Type   | Default value |
| -------- | ------------------ | ------ | ------------- |
| duration | Jwt token lifetime | string | "24h"         |

### <a id="dashboard_auth_basic"></a> Basic Auth

| Name     | Description                                     | Type   | Default value |
| -------- | ----------------------------------------------- | ------ | ------------- |
| username | The username which grants access to the service | string | "wasp"        |

### <a id="dashboard_auth_ip"></a> IP-based Auth

| Name      | Description                                          | Type  | Default value |
| --------- | ---------------------------------------------------- | ----- | ------------- |
| whitelist | A list of ips that are allowed to access the service | array | 127.0.0.1     |

Example:

```json
  {
    "dashboard": {
      "enabled": true,
      "bindAddress": "127.0.0.1:7000",
      "exploreAddressURL": "",
      "auth": {
        "scheme": "basic",
        "jwt": {
          "duration": "24h"
        },
        "basic": {
          "username": "wasp"
        },
        "ip": {
          "whitelist": [
            "127.0.0.1"
          ]
        }
      }
    }
  }
```

## <a id="users"></a> 15. Users

| Name  | Description                | Type   | Default value     |
| ----- | -------------------------- | ------ | ----------------- |
| users | The list of accepted users | object | see example below |

Example:

```json
  {
    "users": {
      "users": {
        "wasp": {
          "Password": "wasp",
          "Permissions": [
            "dashboard",
            "api",
            "chain.read",
            "chain.write"
          ]
        }
      }
    }
  }
```

