Conversation
7752d05 to
ecff360
Compare
spec/spec.md
Outdated
| "required": [ | ||
| "authorization", | ||
| "descriptor", | ||
| "recordId" |
There was a problem hiding this comment.
I think we need to keep all 3 in here.
There was a problem hiding this comment.
@LiranCohen I used the latest https://github.com/TBD54566975/dwn-sdk-js/blob/main/json-schemas/interface-methods/records-write-unidentified.json#L148. Am I missing something?
There was a problem hiding this comment.
@andorsk yeah this is just an implementation specific helper-schema that is used when creating a message that has not yet been signed by the signer. But a complete valid RecordsWrite message has to have all of those properties for it to be valid.
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: LiranCohen <c.liran.c@gmail.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
| - The message object ****MUST**** contain a `recordId` property, and its value ****MUST**** be the `recordId` of the logical record with which the entry corresponds. If the message is the initial entry for a new record, the value ****MUST**** be set to the string resulting from the [_Record ID Generation Process_](#recordid-generation). | ||
| - The object ****MAY**** contain a `contextId` property. If present, its value ****MUST**** be the deterministic ID for a contextually linked set of objects. | ||
| - The object ****MAY**** contain an `attestation` property. If present, its value ****MUST**** be a `string` representing the signing conditions detailed below. If the property is not present, evaluators ****MUST**** treat it as if its value was set to `optional`. | ||
| - If the message object is attached to a Protocol, the value of its `contextId` property ****MUST**** be a [_Computed Context ID_](#computed-context-ids). If the message is not attached to a Protocol, it ****MUST NOT**** contain a `contextId` property. |
There was a problem hiding this comment.
This line should be folded into the rules described on line 841 or into bullet points under a single contextId line.
| - The object ****MAY**** contain an `encryption` property, and if present its value ****Must**** be a string that matches one of the [Supported Encryption Formats](#supported-encryption-format), indicating the encryption format with which the data is encrypted. The absence of this property indicates the data is not encrypted. | ||
| - The object ****MAY**** include a `parentId` property if the currently active entry for the record is a `RecordsDelete` or a `CollectionWrite` that has a declared Commit Strategy. The object ****MUST NOT**** contain a `parentId` under any other circumstance. If present, the value of the `parentId` property ****MUST**** be the stringified [Version 1 CID](https://docs.ipfs.io/concepts/content-addressing/#identifier-formats) of the [DAG CBOR](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md) encoded `descriptor` object of the previous `RecordsWrite` or `RecordsDelete` entry the message is intended to overwrite. | ||
| - The object ****MAY**** contain a `protocol` property. If present, its value ****MUST**** be a URI that denotes the Protocol of which the object is a part. | ||
| - If the object contains a `protocol` property, the object ****MUST**** also contain a `protocolVersion` property. If present, its value ****MUST**** be a [SemVer](https://semver.org/) string that denotes the version of the Protocol of which the object is a part. |
There was a problem hiding this comment.
we currently do not use a protocolVersion property. I think there were talks of this in the past, but at the moment it's not used.
However there is a protocolPath property, and when it is specified the protocol property MUST be specified as well.
starting point to update records write. needs some work before merge, so adding as draft.