Skip to content

Commit

Permalink
Update ProfileResource
Browse files Browse the repository at this point in the history
  • Loading branch information
Wes Biggs committed Aug 2, 2024
1 parent 1329f7a commit 09b606b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 20 deletions.
1 change: 1 addition & 0 deletions .spellcheckerdict.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Changelog
changeType
(cid|CID)s?
[Cc]odec('s)?
contentAddress
contentHash
cryptographic
cryptographically
Expand Down
31 changes: 11 additions & 20 deletions pages/DSNP/Types/ProfileResource.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,9 @@ ProfileResource object serialization MUST conform to the following [Avro](https:
"doc": "Type of resource"
},
{
"name": "contentHash",
"type": "bytes",
"doc": "Multihash digest of resource content"
},
{
"name": "length",
"type": "int",
"doc": "Length of resource in bytes"
"name": "contentAddress",
"type": "string",
"doc": "Content address for the resource"
}
]
}
Expand All @@ -40,19 +35,15 @@ ProfileResource object serialization MUST conform to the following [Avro](https:

#### Supported Profile-Linked Resource Types

| Value | Description | Specification | Content Type | DSNP Version Added |
| --- | --- | --- | --- |
| 1 | Activity Content Profile with DSNP extensions | [DSNP Profile](../../ActivityContent/Types/Profile.md) | `application/json` | 1.3 |

All other document type values are reserved for future expansion.

### contentHash
| Value | Description | Specification | Content Type | Maximum File Size | Content Address Type | DSNP Version Added |
| --- | --- | --- | --- | --- | --- | --- |
| 1 | Activity Content Profile with DSNP extensions | [DSNP Profile](../../ActivityContent/Types/Profile.md) | `application/json` | 256 Kb | Supported [IPFS CID](https://docs.ipfs.tech/concepts/content-addressing/)<sup>1</sup> | 1.3 |

- MUST be a valid [DSNP Content Hash](../Identifiers.md#dsnp-content-hash)
All other resource type values are reserved for future expansion.

A compliant DSNP system MUST specify how to use the `contentHash` field to retrieve the target document.
<sup>1</sup>Supported IPFS CIDs must be CID version 1, using either `sha2-256` or `blake3` hashes with the `raw` codec and the `base32` serialization.

### length
### contentAddress

- MUST be a positive integer
- MUST match the length in bytes of the resource
- MUST be a valid content address for the specified `type` (see table above)
- MUST contain sufficient information for an application to perform content integrity validation, for example by comparing the `contentAddress` field to the address derived by recalculating the content address from the bytes of the retrieved resource

0 comments on commit 09b606b

Please sign in to comment.