{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "MerkleProof2017 schema",
    "description": "An extension that allows an issuer to issue an Open Badge on the blockchain and provide proof of inclusion in a blockchain transaction. This uses the Chainpoint v2.0 specification: https://chainpoint.org/",
    "type": "object",
    "definitions": {
        "JsonLdType": {
            "description": "A type or an array of types defined in a JSON-LD context file.",
            "oneOf": [
                {
                    "type": "string"
                },
                {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            ]
        }
    },
    "properties": {
        "type": {
            "$ref": "#/definitions/JsonLdType"
        },
        "merkleRoot": {
            "type": "string"
        },
        "targetHash": {
            "type": "string"
        },
        "proof": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "right": {
                        "type": "string"
                    },
                    "left": {
                        "type": "string"
                    }
                }
            }
        },
        "anchors": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "sourceId": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string"
                    }
                }
            }
        }
    },
    "required": [
        "type",
        "merkleRoot",
        "targetHash",
        "proof",
        "anchors"
    ]
}