{
  "id": "nostr",
  "channels": [
    "nostr"
  ],
  "channelEnvVars": {
    "nostr": [
      "NOSTR_PRIVATE_KEY"
    ]
  },
  "configSchema": {
    "type": "object",
    "additionalProperties": false,
    "properties": {}
  },
  "channelConfigs": {
    "nostr": {
      "schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "defaultAccount": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "markdown": {
            "type": "object",
            "properties": {
              "tables": {
                "type": "string",
                "enum": [
                  "off",
                  "bullets",
                  "code",
                  "block"
                ]
              }
            },
            "additionalProperties": false
          },
          "privateKey": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "source": {
                        "type": "string",
                        "const": "env"
                      },
                      "provider": {
                        "type": "string",
                        "pattern": "^[a-z][a-z0-9_-]{0,63}$"
                      },
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Z][A-Z0-9_]{0,127}$"
                      }
                    },
                    "required": [
                      "source",
                      "provider",
                      "id"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "source": {
                        "type": "string",
                        "const": "file"
                      },
                      "provider": {
                        "type": "string",
                        "pattern": "^[a-z][a-z0-9_-]{0,63}$"
                      },
                      "id": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "source",
                      "provider",
                      "id"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "source": {
                        "type": "string",
                        "const": "exec"
                      },
                      "provider": {
                        "type": "string",
                        "pattern": "^[a-z][a-z0-9_-]{0,63}$"
                      },
                      "id": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "source",
                      "provider",
                      "id"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            ]
          },
          "relays": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "dmPolicy": {
            "type": "string",
            "enum": [
              "pairing",
              "allowlist",
              "open",
              "disabled"
            ]
          },
          "allowFrom": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                }
              ]
            }
          },
          "profile": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 256
              },
              "displayName": {
                "type": "string",
                "maxLength": 256
              },
              "about": {
                "type": "string",
                "maxLength": 2000
              },
              "picture": {
                "type": "string",
                "format": "uri"
              },
              "banner": {
                "type": "string",
                "format": "uri"
              },
              "website": {
                "type": "string",
                "format": "uri"
              },
              "nip05": {
                "type": "string"
              },
              "lud16": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "label": "Nostr",
      "description": "Decentralized protocol; encrypted DMs via NIP-04."
    }
  }
}
