{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/flow-json-configurations/latest.json",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/onflow/flow-cli/master/flowkit/schema.json",
    "sourceSha256": "bc048bf304d1cfca16a61168b6bb47d4fd9cae0defde2b4f224a87fe2574c0e5"
  },
  "$ref": "#/$defs/jsonConfig",
  "$defs": {
    "account": {
      "oneOf": [
        {
          "$ref": "#/$defs/simpleAccount"
        },
        {
          "$ref": "#/$defs/advancedAccount"
        },
        {
          "$ref": "#/$defs/simpleAccountPre022"
        },
        {
          "$ref": "#/$defs/advanceAccountPre022"
        }
      ]
    },
    "advanceAccountPre022": {
      "properties": {
        "address": {
          "type": "string"
        },
        "keys": {
          "items": {
            "$ref": "#/$defs/advanceKey"
          },
          "type": "array"
        }
      },
      "required": [
        "address",
        "keys"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "advanceKey": {
      "properties": {
        "type": {
          "type": "string"
        },
        "index": {
          "type": "integer"
        },
        "signatureAlgorithm": {
          "type": "string"
        },
        "hashAlgorithm": {
          "type": "string"
        },
        "privateKey": {
          "type": "string"
        },
        "mnemonic": {
          "type": "string"
        },
        "derivationPath": {
          "type": "string"
        },
        "resourceID": {
          "type": "string"
        },
        "location": {
          "type": "string"
        },
        "context": {
          "type": "object",
          "patternProperties": {
            ".*": {
              "type": "string"
            }
          }
        }
      },
      "required": [
        "type"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "advancedAccount": {
      "properties": {
        "address": {
          "type": "string"
        },
        "key": {
          "$ref": "#/$defs/advanceKey"
        }
      },
      "required": [
        "address",
        "key"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "advancedNetwork": {
      "properties": {
        "host": {
          "type": "string"
        },
        "key": {
          "type": "string"
        },
        "fork": {
          "type": "string"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "contractDeployment": {
      "properties": {
        "name": {
          "type": "string"
        },
        "args": {
          "items": true,
          "type": "array"
        }
      },
      "required": [
        "name",
        "args"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "deployment": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "#/$defs/contractDeployment"
        }
      ]
    },
    "jsonAccounts": {
      "type": "object",
      "patternProperties": {
        ".*": {
          "$ref": "#/$defs/account"
        }
      }
    },
    "jsonConfig": {
      "properties": {
        "emulators": {
          "$ref": "#/$defs/jsonEmulators"
        },
        "contracts": {
          "$ref": "#/$defs/jsonContracts"
        },
        "dependencies": {
          "$ref": "#/$defs/jsonDependencies"
        },
        "networks": {
          "$ref": "#/$defs/jsonNetworks"
        },
        "accounts": {
          "$ref": "#/$defs/jsonAccounts"
        },
        "deployments": {
          "$ref": "#/$defs/jsonDeployments"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "jsonContract": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "#/$defs/jsonContractAdvanced"
        }
      ]
    },
    "jsonContractAdvanced": {
      "properties": {
        "source": {
          "type": "string"
        },
        "aliases": {
          "type": "object",
          "patternProperties": {
            ".*": {
              "type": "string"
            }
          }
        },
        "canonical": {
          "type": "string"
        }
      },
      "required": [
        "source",
        "aliases"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "jsonContracts": {
      "type": "object",
      "patternProperties": {
        ".*": {
          "$ref": "#/$defs/jsonContract"
        }
      }
    },
    "jsonDependencies": {
      "type": "object",
      "patternProperties": {
        ".*": {
          "$ref": "#/$defs/jsonDependency"
        }
      }
    },
    "jsonDependency": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "#/$defs/jsonDependencyExtended"
        }
      ]
    },
    "jsonDependencyExtended": {
      "properties": {
        "source": {
          "type": "string"
        },
        "hash": {
          "type": "string"
        },
        "block_height": {
          "type": "integer"
        },
        "aliases": {
          "type": "object",
          "patternProperties": {
            ".*": {
              "type": "string"
            }
          }
        },
        "canonical": {
          "type": "string"
        }
      },
      "required": [
        "source",
        "hash",
        "aliases"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "jsonDeployment": {
      "type": "object",
      "patternProperties": {
        ".*": {
          "items": {
            "$ref": "#/$defs/deployment"
          },
          "type": "array"
        }
      }
    },
    "jsonDeployments": {
      "type": "object",
      "patternProperties": {
        ".*": {
          "$ref": "#/$defs/jsonDeployment"
        }
      }
    },
    "jsonEmulator": {
      "properties": {
        "port": {
          "type": "integer"
        },
        "serviceAccount": {
          "type": "string"
        }
      },
      "required": [
        "port",
        "serviceAccount"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "jsonEmulators": {
      "type": "object",
      "patternProperties": {
        ".*": {
          "$ref": "#/$defs/jsonEmulator"
        }
      }
    },
    "jsonNetwork": {
      "oneOf": [
        {
          "$ref": "#/$defs/simpleNetwork"
        },
        {
          "$ref": "#/$defs/advancedNetwork"
        }
      ]
    },
    "jsonNetworks": {
      "type": "object",
      "patternProperties": {
        ".*": {
          "$ref": "#/$defs/jsonNetwork"
        }
      }
    },
    "simpleAccount": {
      "properties": {
        "address": {
          "type": "string"
        },
        "key": {
          "type": "string"
        }
      },
      "required": [
        "address",
        "key"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "simpleAccountPre022": {
      "properties": {
        "address": {
          "type": "string"
        },
        "keys": {
          "type": "string"
        }
      },
      "required": [
        "address",
        "keys"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "simpleNetwork": {
      "type": "string"
    }
  }
}
