{
  "ISelectiveDisclosure": {
    "components": {
      "schemas": {
        "ICreateProfileCredentialsArgs": {
          "type": "object",
          "properties": {
            "holder": {
              "type": "string",
              "description": "Holder DID"
            },
            "verifier": {
              "type": "string",
              "description": "Optional. Verifier DID"
            },
            "name": {
              "type": "string",
              "description": "Optional. Name"
            },
            "picture": {
              "type": "string",
              "description": "Optional. Picture URL"
            },
            "url": {
              "type": "string",
              "description": "Optional. URL"
            },
            "save": {
              "type": "boolean",
              "description": "Save presentation"
            },
            "send": {
              "type": "boolean",
              "description": "Send presentation"
            }
          },
          "required": [
            "holder",
            "save",
            "send"
          ],
          "description": "Profile data"
        },
        "VerifiablePresentation": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "holder": {
              "type": "string"
            },
            "issuanceDate": {
              "type": "string"
            },
            "expirationDate": {
              "type": "string"
            },
            "@context": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "type": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "verifier": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "verifiableCredential": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/VerifiableCredential"
              }
            },
            "proof": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                }
              }
            }
          },
          "required": [
            "holder",
            "@context",
            "type",
            "verifier",
            "verifiableCredential",
            "proof"
          ],
          "description": "Verifiable Presentation {@link https://github.com/decentralized-identifier/did-jwt-vc}"
        },
        "VerifiableCredential": {
          "type": "object",
          "properties": {
            "@context": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "id": {
              "type": "string"
            },
            "type": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "issuer": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                }
              },
              "required": [
                "id"
              ]
            },
            "issuanceDate": {
              "type": "string"
            },
            "expirationDate": {
              "type": "string"
            },
            "credentialSubject": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                }
              }
            },
            "credentialStatus": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "type"
              ]
            },
            "proof": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                }
              }
            }
          },
          "required": [
            "@context",
            "type",
            "issuer",
            "issuanceDate",
            "credentialSubject",
            "proof"
          ],
          "description": "Verifiable Credential {@link https://github.com/decentralized-identifier/did-jwt-vc}"
        },
        "ICreateSelectiveDisclosureRequestArgs": {
          "type": "object",
          "properties": {
            "data": {
              "$ref": "#/components/schemas/ISelectiveDisclosureRequest"
            }
          },
          "required": [
            "data"
          ],
          "description": "Contains the parameters of a Selective Disclosure Request."
        },
        "ISelectiveDisclosureRequest": {
          "type": "object",
          "properties": {
            "issuer": {
              "type": "string",
              "description": "The issuer of the request"
            },
            "subject": {
              "type": "string",
              "description": "The target of the request"
            },
            "replyUrl": {
              "type": "string",
              "description": "The URL where the response should be sent back"
            },
            "tag": {
              "type": "string"
            },
            "claims": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/ICredentialRequestInput"
              },
              "description": "A list of claims that are being requested"
            },
            "credentials": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "A list of issuer credentials that the target will use to establish trust"
            }
          },
          "required": [
            "issuer",
            "claims"
          ],
          "description": "Represents the Selective Disclosure request parameters."
        },
        "ICredentialRequestInput": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "description": "Motive for requiring this credential."
            },
            "essential": {
              "type": "boolean",
              "description": "If it is essential. A response that does not include this credential is not sufficient."
            },
            "credentialType": {
              "type": "string",
              "description": "The credential type. See {@link https://www.w3.org/TR/vc-data-model/#types | W3C Credential Types}"
            },
            "credentialContext": {
              "type": "string",
              "description": "The credential context. See {@link https://www.w3.org/TR/vc-data-model/#contexts | W3C Credential Context}"
            },
            "claimType": {
              "type": "string",
              "description": "The name of the claim property that the credential should express."
            },
            "claimValue": {
              "type": "string",
              "description": "The value of the claim that the credential should express."
            },
            "issuers": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/Issuer"
              },
              "description": "A list of accepted Issuers for this credential."
            }
          },
          "required": [
            "claimType"
          ],
          "description": "Describes a particular credential that is being requested"
        },
        "Issuer": {
          "type": "object",
          "properties": {
            "did": {
              "type": "string",
              "description": "The DID of the issuer of a requested credential."
            },
            "url": {
              "type": "string",
              "description": "A URL where a credential of that type can be obtained."
            }
          },
          "required": [
            "did",
            "url"
          ],
          "description": "Used for requesting Credentials using Selective Disclosure. Represents an accepted issuer of a credential."
        },
        "IGetVerifiableCredentialsForSdrArgs": {
          "type": "object",
          "properties": {
            "sdr": {
              "type": "object",
              "properties": {
                "subject": {
                  "type": "string",
                  "description": "The target of the request"
                },
                "replyUrl": {
                  "type": "string",
                  "description": "The URL where the response should be sent back"
                },
                "tag": {
                  "type": "string"
                },
                "claims": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ICredentialRequestInput"
                  },
                  "description": "A list of claims that are being requested"
                },
                "credentials": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "A list of issuer credentials that the target will use to establish trust"
                }
              },
              "required": [
                "claims"
              ],
              "description": "The Selective Disclosure Request (issuer is omitted)"
            },
            "did": {
              "type": "string",
              "description": "The DID of the subject"
            }
          },
          "required": [
            "sdr"
          ],
          "description": "Encapsulates the params needed to gather credentials to fulfill a Selective disclosure request."
        },
        "ICredentialsForSdr": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "description": "Motive for requiring this credential."
            },
            "essential": {
              "type": "boolean",
              "description": "If it is essential. A response that does not include this credential is not sufficient."
            },
            "credentialType": {
              "type": "string",
              "description": "The credential type. See {@link https://www.w3.org/TR/vc-data-model/#types | W3C Credential Types}"
            },
            "credentialContext": {
              "type": "string",
              "description": "The credential context. See {@link https://www.w3.org/TR/vc-data-model/#contexts | W3C Credential Context}"
            },
            "claimType": {
              "type": "string",
              "description": "The name of the claim property that the credential should express."
            },
            "claimValue": {
              "type": "string",
              "description": "The value of the claim that the credential should express."
            },
            "issuers": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/Issuer"
              },
              "description": "A list of accepted Issuers for this credential."
            },
            "credentials": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/VerifiableCredential"
              }
            }
          },
          "required": [
            "claimType",
            "credentials"
          ],
          "description": "The credentials that make up a response of a Selective Disclosure"
        },
        "IValidatePresentationAgainstSdrArgs": {
          "type": "object",
          "properties": {
            "presentation": {
              "$ref": "#/components/schemas/VerifiablePresentation"
            },
            "sdr": {
              "$ref": "#/components/schemas/ISelectiveDisclosureRequest"
            }
          },
          "required": [
            "presentation",
            "sdr"
          ],
          "description": "A tuple used to verify a Selective Disclosure Response. Encapsulates the response(`presentation`) and the corresponding request (`sdr`) that made it."
        },
        "IPresentationValidationResult": {
          "type": "object",
          "properties": {
            "valid": {
              "type": "boolean"
            },
            "claims": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/ICredentialsForSdr"
              }
            }
          },
          "required": [
            "valid",
            "claims"
          ],
          "description": "The result of a selective disclosure response validation."
        }
      },
      "methods": {
        "createProfilePresentation": {
          "description": "",
          "arguments": {
            "$ref": "#/components/schemas/ICreateProfileCredentialsArgs"
          },
          "returnType": {
            "$ref": "#/components/schemas/VerifiablePresentation"
          }
        },
        "createSelectiveDisclosureRequest": {
          "description": "",
          "arguments": {
            "$ref": "#/components/schemas/ICreateSelectiveDisclosureRequestArgs"
          },
          "returnType": {
            "type": "string"
          }
        },
        "getVerifiableCredentialsForSdr": {
          "description": "",
          "arguments": {
            "$ref": "#/components/schemas/IGetVerifiableCredentialsForSdrArgs"
          },
          "returnType": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ICredentialsForSdr"
            }
          }
        },
        "validatePresentationAgainstSdr": {
          "description": "",
          "arguments": {
            "$ref": "#/components/schemas/IValidatePresentationAgainstSdrArgs"
          },
          "returnType": {
            "$ref": "#/components/schemas/IPresentationValidationResult"
          }
        }
      }
    }
  }
}