Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TrustClaim format for use with Holochain generated signatures #28

Open
harlantwood opened this issue Apr 26, 2022 · 1 comment
Open

Comments

@harlantwood
Copy link
Member

harlantwood commented Apr 26, 2022

See https://github.com/trustgraph/trustgraph#create-claims

Write example JSON-LD:

  • uses standard JSON-LD signatures
  • compatible with HC key/signing format

See https://w3c-ccg.github.io/security-vocab/#Ed25519Signature2020 --

{
  "@context": ["https://w3id.org/security/v1", "http://json-ld.org/contexts/person.jsonld", "https://raw.githubusercontent.com/trustgraph/trustgraph-schema/gh-pages/TrustClaim.jsonld"],   // or maybe just our schema here, which references their schemas?
  "type": "TrustClaim",
  "issuer": "did:key:z6Mko2C7FvL9nNN6Ut1yPcUuEjbJoziDjDmjAJixemPkQBss",
  "issued": "2017-03-04T02:05:07-08:00",
  "claim": {
    "@context": "https://schema.org/",
    "type": "Review",
    "itemReviewed": "did:key:z6MkfXP5Jig4jvF1TiPCWgtacXADXt1bWtUaYKRWasU9B2v2",
    "author": "did:key:z6Mko2C7FvL9nNN6Ut1yPcUuEjbJoziDjDmjAJixemPkQBss",
    "keywords": "programming, Elixir",
    "reviewRating": {
      "@context": "https://schema.org/",
      "type": "Rating",
      "bestRating": 1,
      "worstRating": 0,
      "ratingValue": "0.99",
      "description": "Elixir programming"
    }
  },
  "proof": {
    "type": "Ed25519Signature2018",
    "verificationMethod": "https://w3id.org/people/dave/keys/2",  // hm, what goes here?
    "created": "2021-11-05T03:12:54Z",
    "proofPurpose": "assertionMethod",
    "jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..dXNHwJ-9iPMRQ4AUcv9j-7LuImTiWAG0sDYbRRDDiyAjOV9CUmjLMKiePpytoAmGNGNTHDlEOsTa4CS3dZ7yBg" // TODO actual signature
  }
}

PR to REPLACE our existing JSON LD example on home page with new one in this format.

See also zippy's work on signed claims happ. This probably has what we need.

See also:

@harlantwood
Copy link
Member Author

probably ignore all of this, buuuuuut in case its useful some verbiage from holofractal:

  1. We format the core (immutable) data as a JSON-LD verifiable claim
  2. We canonicalize the JSON via https://datatracker.ietf.org/doc/html/rfc8785
  3. We sign the canonical JSON with the private key of the creator
  4. We canonicalize the resulting JSON (including the signature)
  5. We hash the JSON to a multihash
  6. We redundantly store the NFT to IPFS and its home chain (eg Holochain)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant