fluree / core

Fluree releases and public bug reports
0 stars 0 forks source link

Allow txns to not require `@context: "https://ns.flur.ee"` #54

Closed aaj3f closed 7 months ago

aaj3f commented 7 months ago

Description

After discussion about transaction payload conformance to verifiable credential (expansion & validation) requirements, we decided that transactions (like our queries) should not HAVE to entirely be qualified as a JSON-LD document (i.e. not every key such as insert should require term definition in a @context), UNLESS the transaction is pre-signed as a verifiable credential.

This ticket should update transaction validation & processing so that a transaction like the following would be valid (despite not having in its context any definition for where, delete, and insert):

{
  "@context": { "schema": "http://schema.org/" },
  "where": {
    "@id": "?s",
    "schema:name": "Andrew",
  },
  "delete": {
    "@id": "?s",
    "schema:name": "Andrew"
  },
  "insert": {
    "@id": "?s",
    "schema:name": "Andrew Johnson"
  }
}

Note: another ticket will be made to remove defaultContext management from core, so it may be unnecessary to say this, but the above transaction would (at least currently) respect a defaultContext set for the ledger. This will soon be irrelevant