Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


; Allowed Collaborators on the next subsequent version of a document.
collaborators = [ * catalyst_id_kid ]
collaborators = [ + catalyst_id_kid ]

; UTF8 Catalyst ID URI encoded as a bytes string.
catalyst_id_kid = bytes
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ section_ref = json_pointer
json_pointer = text

; Allowed Collaborators on the next subsequent version of a document.
collaborators = [ * catalyst_id_kid ]
collaborators = [ + catalyst_id_kid ]

; UTF8 Catalyst ID URI encoded as a bytes string.
catalyst_id_kid = bytes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ New versions of this document may be published by:
| --- | --- |
| License | This document is licensed under [CC-BY-4.0] |
| Created | 2024-12-27 |
| Modified | 2025-09-09 |
| Modified | 2025-10-17 |
| Authors | Alex Pozhylenkov <alex.pozhylenkov@iohk.io> |
| | Nathan Bogale <nathan.bogale@iohk.io> |
| | Neil McAuliffe <neil.mcauliffe@iohk.io> |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ New versions of this document may be published by:
| --- | --- |
| License | This document is licensed under [CC-BY-4.0] |
| Created | 2024-12-27 |
| Modified | 2025-09-09 |
| Modified | 2025-10-17 |
| Authors | Alex Pozhylenkov <alex.pozhylenkov@iohk.io> |
| | Nathan Bogale <nathan.bogale@iohk.io> |
| | Neil McAuliffe <neil.mcauliffe@iohk.io> |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ New versions of this document may be published by:
| --- | --- |
| License | This document is licensed under [CC-BY-4.0] |
| Created | 2024-12-27 |
| Modified | 2025-09-09 |
| Modified | 2025-10-17 |
| Authors | Alex Pozhylenkov <alex.pozhylenkov@iohk.io> |
| | Nathan Bogale <nathan.bogale@iohk.io> |
| | Neil McAuliffe <neil.mcauliffe@iohk.io> |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ New versions of this document may be published by:
| --- | --- |
| License | This document is licensed under [CC-BY-4.0] |
| Created | 2024-12-27 |
| Modified | 2025-09-09 |
| Modified | 2025-10-17 |
| Authors | Alex Pozhylenkov <alex.pozhylenkov@iohk.io> |
| | Nathan Bogale <nathan.bogale@iohk.io> |
| | Neil McAuliffe <neil.mcauliffe@iohk.io> |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ New versions of this document may be published by:
| --- | --- |
| License | This document is licensed under [CC-BY-4.0] |
| Created | 2024-12-27 |
| Modified | 2025-09-09 |
| Modified | 2025-10-17 |
| Authors | Alex Pozhylenkov <alex.pozhylenkov@iohk.io> |
| | Nathan Bogale <nathan.bogale@iohk.io> |
| | Neil McAuliffe <neil.mcauliffe@iohk.io> |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ New versions of this document may be published by:
| --- | --- |
| License | This document is licensed under [CC-BY-4.0] |
| Created | 2024-12-27 |
| Modified | 2025-09-09 |
| Modified | 2025-10-17 |
| Authors | Alex Pozhylenkov <alex.pozhylenkov@iohk.io> |
| | Nathan Bogale <nathan.bogale@iohk.io> |
| | Neil McAuliffe <neil.mcauliffe@iohk.io> |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ New versions of this document may be published by:
| --- | --- |
| License | This document is licensed under [CC-BY-4.0] |
| Created | 2024-12-27 |
| Modified | 2025-09-09 |
| Modified | 2025-10-17 |
| Authors | Alex Pozhylenkov <alex.pozhylenkov@iohk.io> |
| | Nathan Bogale <nathan.bogale@iohk.io> |
| | Neil McAuliffe <neil.mcauliffe@iohk.io> |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ New versions of this document may be published by:
| --- | --- |
| License | This document is licensed under [CC-BY-4.0] |
| Created | 2024-12-27 |
| Modified | 2025-09-09 |
| Modified | 2025-10-17 |
| Authors | Alex Pozhylenkov <alex.pozhylenkov@iohk.io> |
| | Nathan Bogale <nathan.bogale@iohk.io> |
| | Neil McAuliffe <neil.mcauliffe@iohk.io> |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ New versions of this document may be published by:
| --- | --- |
| License | This document is licensed under [CC-BY-4.0] |
| Created | 2024-12-27 |
| Modified | 2025-09-09 |
| Modified | 2025-10-17 |
| Authors | Alex Pozhylenkov <alex.pozhylenkov@iohk.io> |
| | Nathan Bogale <nathan.bogale@iohk.io> |
| | Neil McAuliffe <neil.mcauliffe@iohk.io> |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ New versions of this document may be published by:
| --- | --- |
| License | This document is licensed under [CC-BY-4.0] |
| Created | 2024-12-27 |
| Modified | 2025-09-09 |
| Modified | 2025-10-17 |
| Authors | Alex Pozhylenkov <alex.pozhylenkov@iohk.io> |
| | Nathan Bogale <nathan.bogale@iohk.io> |
| | Neil McAuliffe <neil.mcauliffe@iohk.io> |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ New versions of this document may be published by:
| --- | --- |
| License | This document is licensed under [CC-BY-4.0] |
| Created | 2024-12-27 |
| Modified | 2025-09-09 |
| Modified | 2025-10-17 |
| Authors | Alex Pozhylenkov <alex.pozhylenkov@iohk.io> |
| | Nathan Bogale <nathan.bogale@iohk.io> |
| | Neil McAuliffe <neil.mcauliffe@iohk.io> |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ New versions of this document may be published by:
| --- | --- |
| License | This document is licensed under [CC-BY-4.0] |
| Created | 2024-12-27 |
| Modified | 2025-09-09 |
| Modified | 2025-10-17 |
| Authors | Alex Pozhylenkov <alex.pozhylenkov@iohk.io> |
| | Nathan Bogale <nathan.bogale@iohk.io> |
| | Neil McAuliffe <neil.mcauliffe@iohk.io> |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ New versions of this document may be published by:
| --- | --- |
| License | This document is licensed under [CC-BY-4.0] |
| Created | 2024-12-27 |
| Modified | 2025-09-09 |
| Modified | 2025-10-17 |
| Authors | Alex Pozhylenkov <alex.pozhylenkov@iohk.io> |
| | Nathan Bogale <nathan.bogale@iohk.io> |
| | Neil McAuliffe <neil.mcauliffe@iohk.io> |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ New versions of this document may be published by:
| --- | --- |
| License | This document is licensed under [CC-BY-4.0] |
| Created | 2024-12-27 |
| Modified | 2025-09-09 |
| Modified | 2025-10-17 |
| Authors | Alex Pozhylenkov <alex.pozhylenkov@iohk.io> |
| | Nathan Bogale <nathan.bogale@iohk.io> |
| | Neil McAuliffe <neil.mcauliffe@iohk.io> |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ New versions of this document may be published by:
| --- | --- |
| License | This document is licensed under [CC-BY-4.0] |
| Created | 2024-12-27 |
| Modified | 2025-09-09 |
| Modified | 2025-10-17 |
| Authors | Alex Pozhylenkov <alex.pozhylenkov@iohk.io> |
| | Nathan Bogale <nathan.bogale@iohk.io> |
| | Neil McAuliffe <neil.mcauliffe@iohk.io> |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ New versions of this document may be published by:
| --- | --- |
| License | This document is licensed under [CC-BY-4.0] |
| Created | 2024-12-27 |
| Modified | 2025-09-09 |
| Modified | 2025-10-17 |
| Authors | Alex Pozhylenkov <alex.pozhylenkov@iohk.io> |
| | Nathan Bogale <nathan.bogale@iohk.io> |
| | Neil McAuliffe <neil.mcauliffe@iohk.io> |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ New versions of this document may be published by:
| --- | --- |
| License | This document is licensed under [CC-BY-4.0] |
| Created | 2024-12-27 |
| Modified | 2025-09-09 |
| Modified | 2025-10-17 |
| Authors | Alex Pozhylenkov <alex.pozhylenkov@iohk.io> |
| | Nathan Bogale <nathan.bogale@iohk.io> |
| | Neil McAuliffe <neil.mcauliffe@iohk.io> |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ New versions of this document may be published by:
| --- | --- |
| License | This document is licensed under [CC-BY-4.0] |
| Created | 2024-12-27 |
| Modified | 2025-09-09 |
| Modified | 2025-10-17 |
| Authors | Alex Pozhylenkov <alex.pozhylenkov@iohk.io> |
| | Nathan Bogale <nathan.bogale@iohk.io> |
| | Neil McAuliffe <neil.mcauliffe@iohk.io> |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ New versions of this document may be published by:
| --- | --- |
| License | This document is licensed under [CC-BY-4.0] |
| Created | 2024-12-27 |
| Modified | 2025-09-09 |
| Modified | 2025-10-17 |
| Authors | Alex Pozhylenkov <alex.pozhylenkov@iohk.io> |
| | Nathan Bogale <nathan.bogale@iohk.io> |
| | Neil McAuliffe <neil.mcauliffe@iohk.io> |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ New versions of this document may be published by:
| --- | --- |
| License | This document is licensed under [CC-BY-4.0] |
| Created | 2024-12-27 |
| Modified | 2025-09-09 |
| Modified | 2025-10-17 |
| Authors | Alex Pozhylenkov <alex.pozhylenkov@iohk.io> |
| | Nathan Bogale <nathan.bogale@iohk.io> |
| | Neil McAuliffe <neil.mcauliffe@iohk.io> |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ New versions of this document may be published by:
| --- | --- |
| License | This document is licensed under [CC-BY-4.0] |
| Created | 2024-12-27 |
| Modified | 2025-09-09 |
| Modified | 2025-10-17 |
| Authors | Alex Pozhylenkov <alex.pozhylenkov@iohk.io> |
| | Nathan Bogale <nathan.bogale@iohk.io> |
| | Neil McAuliffe <neil.mcauliffe@iohk.io> |
Expand Down
2 changes: 1 addition & 1 deletion docs/src/architecture/08_concepts/signed_doc/metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ classDiagram
| --- | --- |
| License | This document is licensed under [CC-BY-4.0] |
| Created | 2024-12-27 |
| Modified | 2025-09-09 |
| Modified | 2025-10-17 |
| Authors | Alex Pozhylenkov <alex.pozhylenkov@iohk.io> |
| | Nathan Bogale <nathan.bogale@iohk.io> |
| | Neil McAuliffe <neil.mcauliffe@iohk.io> |
Expand Down
6 changes: 5 additions & 1 deletion docs/src/architecture/08_concepts/signed_doc/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ Catalyst ID <a href="https://datatracker.ietf.org/doc/html/rfc3986">URI</a> iden
| --- | --- |
| License | This document is licensed under [CC-BY-4.0] |
| Created | 2024-12-27 |
| Modified | 2025-09-09 |
| Modified | 2025-10-17 |
| Authors | Alex Pozhylenkov <alex.pozhylenkov@iohk.io> |
| | Nathan Bogale <nathan.bogale@iohk.io> |
| | Neil McAuliffe <neil.mcauliffe@iohk.io> |
Expand Down Expand Up @@ -608,6 +608,10 @@ Catalyst ID <a href="https://datatracker.ietf.org/doc/html/rfc3986">URI</a> iden

* Fixed an invalid 'Presentation Template' [JSON schema][JSON Schema-2020-12].

#### 0.1.4 (2025-10-17)

* Modified [`collaborators`](metadata.md#collaborators) [cddl][RFC8610] definition, it must have at least one element in array.

[CBOR-LFD-ENCODING]: https://www.rfc-editor.org/rfc/rfc8949.html#section-4.2.3
[RFC9052-HeaderParameters]: https://www.rfc-editor.org/rfc/rfc8152#section-3.1
[JSON Schema-2020-12]: https://json-schema.org/draft/2020-12
Expand Down
2 changes: 1 addition & 1 deletion docs/src/architecture/08_concepts/signed_doc/types.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ All Defined Document Types
| --- | --- |
| License | This document is licensed under [CC-BY-4.0] |
| Created | 2024-12-27 |
| Modified | 2025-09-09 |
| Modified | 2025-10-17 |
| Authors | Alex Pozhylenkov <alex.pozhylenkov@iohk.io> |
| | Nathan Bogale <nathan.bogale@iohk.io> |
| | Neil McAuliffe <neil.mcauliffe@iohk.io> |
Expand Down
2 changes: 1 addition & 1 deletion rust/catalyst-signed-doc-spec/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "catalyst-signed-doc-spec"
version = "0.1.3"
version = "0.1.4"
edition.workspace = true
authors.workspace = true
homepage.workspace = true
Expand Down
32 changes: 25 additions & 7 deletions rust/signed_doc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,27 @@ impl CatalystSignedDocument {
pub fn into_builder(&self) -> anyhow::Result<SignaturesBuilder> {
self.try_into()
}

/// Returns CBOR bytes.
///
/// # Errors
/// - `minicbor::encode::Error`
pub fn to_bytes(&self) -> anyhow::Result<Vec<u8>> {
let mut e = minicbor::Encoder::new(Vec::new());
self.encode(&mut e, &mut ())?;
Ok(e.into_writer())
}

/// Build `CatalystSignedDoc` instance from CBOR bytes.
///
/// # Errors
/// - `minicbor::decode::Error`
pub fn from_bytes(
bytes: &[u8],
mut policy: CompatibilityPolicy,
) -> anyhow::Result<Self> {
Ok(minicbor::decode_with(bytes, &mut policy)?)
}
}

impl Decode<'_, CompatibilityPolicy> for CatalystSignedDocument {
Expand Down Expand Up @@ -344,17 +365,14 @@ impl TryFrom<&[u8]> for CatalystSignedDocument {
type Error = anyhow::Error;

fn try_from(value: &[u8]) -> Result<Self, Self::Error> {
Ok(minicbor::decode_with(
value,
&mut CompatibilityPolicy::Accept,
)?)
Self::from_bytes(value, CompatibilityPolicy::Accept)
}
}

impl TryFrom<CatalystSignedDocument> for Vec<u8> {
impl TryFrom<&CatalystSignedDocument> for Vec<u8> {
type Error = anyhow::Error;

fn try_from(value: CatalystSignedDocument) -> Result<Self, Self::Error> {
Ok(minicbor::to_vec(value)?)
fn try_from(value: &CatalystSignedDocument) -> Result<Self, Self::Error> {
value.to_bytes()
}
}
Loading
Loading