Skip to content

Commit

Permalink
fix: remove sub-sections in gov VC
Browse files Browse the repository at this point in the history
  • Loading branch information
MdechampG committed Apr 8, 2024
1 parent 9e19963 commit 02a9de9
Show file tree
Hide file tree
Showing 4 changed files with 123 additions and 140 deletions.
145 changes: 67 additions & 78 deletions docs/academy/part-2/resource-governance.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,11 @@ npm install -g jsonld-cli
## Step 1: Define the governance of your resource

First, you need to define the governance rules of your resource.
The governance content is systematically arranged into a hierarchical text structure comprising sections, subsections, articles, and paragraphs.
The governance content is systematically arranged into a hierarchical text structure comprising sections, articles, and paragraphs.

- **chapter**: This term represents a major division in structuring rules, similar to a chapter in a legislative text. It is used to group together articles dealing with related subjects or falling within the same thematic area.
- **article**: The article is the basic unit in the formulation of rules. Each article sets out a specific rule or set of rules and is identified by a unique number or title for ease of reference.
- **section**: A section is a subdivision of a chapter. It allows articles to be organized into thematic subgroups, making the structure of the rules more readable and easier to navigate.
- **subSection**: Subsections provide an additional level of detail within sections. They are used to group together articles or paragraphs that address specific aspects or details of a broader issue covered in the section.
- **article**: The article is the basic unit in the formulation of rules. Each article sets out a specific rule or set of rules and is identified by a unique number or title for ease of reference.
- **paragraph**: The paragraph is the element that contains the text of the rule itself. This translates into a clause defining a specific condition or rule in Prolog.

You can use a template (coming soon) or begin from scratch.
Expand All @@ -66,29 +65,27 @@ Governance rules of the dataset Crime Data from 2020 to Present:
|------------|----------------|------------------------------------------------------|
| Chapter | 1 | Crime data dataset governance |
| Section | 1.1 | Usage of the dataset |
| Subsection | 1.1.1 | Users |
| Article | 1.1.1.1 | Conditions on consumers |
| Paragraph | 1.1.1.1.1 | Everyone can use the dataset |
| Article | 1.1.1.2 | Conditions on services that consume the dataset |
| Paragraph | 1.1.1.2.1 | Only services of type "Storage" or "Data Processing" |
| Subsection | 1.1.2 | Conditions of usages |
| Article | 1.1.2.1 | Price |
| Paragraph | 1.1.2.1.1 | Free |
| Article | 1.1.2.2 | Rate limiting |
| Paragraph | 1.1.2.2.1 | The rate limit is 2 months maximum |
| Article | 1.1.1 | Conditions on consumers |
| Paragraph | 1.1.1.1 | Everyone can use the dataset |
| Article | 1.1.2 | Conditions on services that consume the dataset |
| Paragraph | 1.1.2.1 | Only services of type "Storage" or "Data Processing" |
| Section | 1.2 | Conditions of usages |
| Article | 1.2.1 | Price |
| Paragraph | 1.2.1.1 | Free |
| Article | 1.2.2 | Rate limiting |
| Paragraph | 1.2.2.1 | The rate limit is 2 months maximum |

Governance rules of the service IPFS:

| Division | Ordinal number | Title |
|-------------|----------------|------------------------------|
| Chapter | 1 | IPFS governance |
| Section | 1.1 | Usage of the dataset |
| Subsection | 1.1.1 | Users |
| Article | 1.1.1.1 | Conditions on consumers |
| Paragraph | 1.1.1.1.1 | Everyone can use the dataset |
| Subsection | 1.1.2 | Conditions of usages |
| Article | 1.1.2.1 | Price |
| Paragraph | 1.1.2.1.1 | Free |
| Article | 1.1.1 | Conditions on consumers |
| Paragraph | 1.1.1.1 | Everyone can use the dataset |
| Section | 1.2 | Conditions of usages |
| Article | 1.2.1 | Price |
| Paragraph | 1.2.1.1 | Free |

:::info
The Axone Community will provide more and more templates over time.
Expand Down Expand Up @@ -117,7 +114,6 @@ These elements are translated into the following Prolog predicates:
```prolog
chapter(ChapterId).
section(SectionId).
subSection(SubSectionId).
article(ArticleId).
paragraph(ParagraphId, ...).
```
Expand All @@ -130,16 +126,14 @@ For example:
% Definition of instances
chapter(chap1).
section(sec1).
subSection(subSec1).
article(art1).
paragraph(para1, ...).
paragraph(para2, ...).
% Definition of relationships
partOf(para1, art1).
partOf(para2, art1).
partOf(art1, subSec1).
partOf(subSec1, sec1).
partOf(art1, Sec1).
partOf(sec1, chap1).
```

Expand Down Expand Up @@ -325,7 +319,7 @@ The following code specifies that the Crime Dataset whose DID is `<did:key:zQ3sh
"https://w3id.org/okp4/ontology/v3/schema/credential/governance/text/"
],
"type": ["VerifiableCredential","GovernanceTextCredential"],
"id": "https://w3id.org/okp4/ontology/v3/schema/credential/governance/text/fea0312a-f4bb-449c-a736-7a16e7cc94c1",
"id": "https://w3id.org/okp4/ontology/v3/schema/credential/governance/text/hfk0312a-f4bb-449c-a736-7a16e7cc94c1",
"credentialSubject": {
"id": "did:key:zQ3shRfADCmegmmKotqCjzDc9BHWDpbEzp9yMiN5RkJx88oP5",
"isGovernedBy": {
Expand All @@ -339,54 +333,49 @@ The following code specifies that the Crime Dataset whose DID is `<did:key:zQ3sh
"type": "Section",
"hasTitle": "Usage of the dataset",
"hasOrdinalNumber": "1.1",
"hasSubsection": {
"type": "SubSection",
"hasTitle": "Users",
"hasArticle": {
"type": "Article",
"hasTitle": "Conditions on consumers",
"hasOrdinalNumber": "1.1.1",
"hasArticle": {
"type": "Article",
"hasTitle": "Conditions on consumers",
"hasOrdinalNumber": "1.1.1.1",
"hasParagraph": {
"type": "Paragraph",
"hasTitle": "Everyone can use the dataset",
"hasOrdinalNumber": "1.1.1.1.1"
},
"hasArticle": {
"type": "Article",
"hasTitle": "Conditions on services that consume the dataset",
"hasOrdinalNumber": "1.1.1.2",
"hasParagraph": {
"type": "Paragraph",
"hasTitle": "Only services of type 'Storage' or 'Data Processing'",
"hasOrdinalNumber": "1.1.1.2.1"
},
"hasSubsection": {
"type": "SubSection",
"hasTitle": "Conditions of usages",
"hasOrdinalNumber": "1.1.2",
"hasArticle": {
"type": "Article",
"hasTitle": "Price",
"hasOrdinalNumber": "1.1.2.1",
"hasParagraph": {
"type": "Paragraph",
"hasTitle": "Free",
"hasOrdinalNumber": "1.1.2.1.1"
},
"hasArticle": {
"type": "Article",
"hasTitle": "Rate limiting",
"hasOrdinalNumber": "1.1.2.2",
"hasParagraph": {
"type": "Paragraph",
"hasTitle": "The rate limit is 2 months maximum",
"hasOrdinalNumber": "1.1.2.2.1"
}
}
}
}
}
"hasParagraph": {
"type": "Paragraph",
"hasTitle": "Everyone can use the dataset",
"hasOrdinalNumber": "1.1.1.1"
}
},
"hasArticle": {
"type": "Article",
"hasTitle": "Conditions on services that consume the dataset",
"hasOrdinalNumber": "1.1.2",
"hasParagraph": {
"type": "Paragraph",
"hasTitle": "Only services of type 'Storage' or 'Data Processing'",
"hasOrdinalNumber": "1.1.2.1"
}
}
},
"hasSection": {
"type": "Section",
"hasTitle": "Conditions of usages",
"hasOrdinalNumber": "1.2",
"hasArticle": {
"type": "Article",
"hasTitle": "Price",
"hasOrdinalNumber": "1.2.1",
"hasParagraph": {
"type": "Paragraph",
"hasTitle": "Free",
"hasOrdinalNumber": "1.2.1.1"
}
},
"hasArticle": {
"type": "Article",
"hasTitle": "Rate limiting",
"hasOrdinalNumber": "1.2.2",
"hasParagraph": {
"type": "Paragraph",
"hasTitle": "The rate limit is 2 months maximum",
"hasOrdinalNumber": "1.2.2.1"
}
}
}
Expand Down Expand Up @@ -435,12 +424,12 @@ You can see that there is new fields in the jsonld with the cryptographic proof.

```nquads
<did:key:zQ3shRfADCmegmmKotqCjzDc9BHWDpbEzp9yMiN5RkJx88oP5> <https://w3id.org/okp4/ontology/v3/schema/credential/governance/text/isGovernedBy> _:b2 .
<https://w3id.org/okp4/ontology/v3/schema/credential/governance/text/fea0312a-f4bb-449c-a736-7a16e7cc94c1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://w3id.org/okp4/ontology/v3/schema/credential/governance/text/GovernanceTextCredential> .
<https://w3id.org/okp4/ontology/v3/schema/credential/governance/text/fea0312a-f4bb-449c-a736-7a16e7cc94c1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.w3.org/2018/credentials#VerifiableCredential> .
<https://w3id.org/okp4/ontology/v3/schema/credential/governance/text/fea0312a-f4bb-449c-a736-7a16e7cc94c1> <https://w3id.org/security#proof> _:b0 .
<https://w3id.org/okp4/ontology/v3/schema/credential/governance/text/fea0312a-f4bb-449c-a736-7a16e7cc94c1> <https://www.w3.org/2018/credentials#credentialSubject> <did:key:zQ3shRfADCmegmmKotqCjzDc9BHWDpbEzp9yMiN5RkJx88oP5> .
<https://w3id.org/okp4/ontology/v3/schema/credential/governance/text/fea0312a-f4bb-449c-a736-7a16e7cc94c1> <https://www.w3.org/2018/credentials#issuanceDate> "2024-02-06T13:29:00.475304+01:00"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
<https://w3id.org/okp4/ontology/v3/schema/credential/governance/text/fea0312a-f4bb-449c-a736-7a16e7cc94c1> <https://www.w3.org/2018/credentials#issuer> <did:key:zQ3shs7auhJSmVJpiUbQWco6bxxEhSqWnVEPvaBHBRvBKw6Q3> .
<https://w3id.org/okp4/ontology/v3/schema/credential/governance/text/hfk0312a-f4bb-449c-a736-7a16e7cc94c1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://w3id.org/okp4/ontology/v3/schema/credential/governance/text/GovernanceTextCredential> .
<https://w3id.org/okp4/ontology/v3/schema/credential/governance/text/hfk0312a-f4bb-449c-a736-7a16e7cc94c1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.w3.org/2018/credentials#VerifiableCredential> .
<https://w3id.org/okp4/ontology/v3/schema/credential/governance/text/hfk0312a-f4bb-449c-a736-7a16e7cc94c1> <https://w3id.org/security#proof> _:b0 .
<https://w3id.org/okp4/ontology/v3/schema/credential/governance/text/hfk0312a-f4bb-449c-a736-7a16e7cc94c1> <https://www.w3.org/2018/credentials#credentialSubject> <did:key:zQ3shRfADCmegmmKotqCjzDc9BHWDpbEzp9yMiN5RkJx88oP5> .
<https://w3id.org/okp4/ontology/v3/schema/credential/governance/text/hfk0312a-f4bb-449c-a736-7a16e7cc94c1> <https://www.w3.org/2018/credentials#issuanceDate> "2024-02-06T13:29:00.475304+01:00"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
<https://w3id.org/okp4/ontology/v3/schema/credential/governance/text/hfk0312a-f4bb-449c-a736-7a16e7cc94c1> <https://www.w3.org/2018/credentials#issuer> <did:key:zQ3shs7auhJSmVJpiUbQWco6bxxEhSqWnVEPvaBHBRvBKw6Q3> .
_:b1 <http://purl.org/dc/terms/created> "2024-04-03T10:45:45.644839+02:00"^^<http://www.w3.org/2001/XMLSchema#dateTime> _:b0 .
_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://w3id.org/security#EcdsaSecp256k1Signature2019> _:b0 .
_:b1 <https://w3id.org/security#jws> "eyJhbGciOiJ1bmtub3duIiwiYjY0IjpmYWxzZSwiY3JpdCI6WyJiNjQiXX0..VJ_c0Hn4N-Wlcdvqk5fHdWPFtUM3bxmPW_qM_9hUOsYxs5ucoB3S3y2837VgXO51Urv84Pv0o5wM0SNng7KPZQ" _:b0 .
Expand Down Expand Up @@ -499,7 +488,7 @@ The Protocol will check the signature and if the public key corresponds to the p
The command returns the hash of the transaction. You can find more details of this transaction in the [Explorer](https://explore.okp4.network/). Select the network (Currently Drunemeton-Testnet), click on the Search icon, and paste the transaction hash.

Example:
Hash: D23BF02A1D2FCFB6477F1CF292BE4FE23EC8210032914FF7F59A872C75827EE9
Hash: 4192587E13FF1A1530B0FFE88A80EACE4954374AE9A2789462E0372CC49E1A47

<div style={{ display: "flex", justifyContent: "center" }}>
<img src="/img/content/academy/transaction-explorer-3.webp" alt="Axone explorer" style={{ maxHeight: "340px" }}></img>
Expand Down
Loading

0 comments on commit 02a9de9

Please sign in to comment.