Create a policy that can produce signed JSON-LD response from the given input

The policy will accept arbitrary JSON, and will return JSON-LD signed response.

The signing will be performed by using the capabilities of Hashicorp Vault.

Input:

{
  "hello":"world"
}

Output:

{
  "@context": [
    "https://www.w3.org/2018/credentials/v1",
    "https://www.w3.org/2018/credentials/examples/v1"
  ],
  "type": ["VerifiableCredential", "PolicyResult"],
  "issuer": "DID of the OCM",
  "issuanceDate": "2010-01-01T19:23:24Z",
  "credentialSubject": {
    "hello":"world"
  },
  "proof": [
    {
      "type": "Ed25519Signature2018",
      "created": "2020-04-10T21:35:35Z",
      "verificationMethod": "https://address.com/key1",
      "proofPurpose": "assertionMethod",
      "jws": "eyJ..l9d0Y"
    }
  ]
}
Edited by Lyuben Penkovski