diff --git a/Cargo.lock b/Cargo.lock index 3a517b65..80b6dee7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -738,6 +738,27 @@ dependencies = [ "thiserror", ] +[[package]] +name = "okp4-dataverse" +version = "0.0.1" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cosmwasm-storage", + "cw-multi-test", + "cw-storage-plus 1.1.0", + "cw-utils 1.0.1", + "cw2 1.1.0", + "itertools 0.11.0", + "okp4-logic-bindings", + "okp4-objectarium", + "okp4-objectarium-client", + "schemars", + "serde", + "thiserror", + "url", +] + [[package]] name = "okp4-law-stone" version = "3.0.0" diff --git a/contracts/okp4-dataverse/Cargo.toml b/contracts/okp4-dataverse/Cargo.toml new file mode 100644 index 00000000..97a84be9 --- /dev/null +++ b/contracts/okp4-dataverse/Cargo.toml @@ -0,0 +1,60 @@ +[package] +authors = ["OKP4"] +edition = "2021" +name = "okp4-dataverse" +rust-version = "1.69" +version = "0.0.1" + +exclude = [ + # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. + "contract.wasm", + "hash.txt", +] + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[lib] +crate-type = ["cdylib", "rlib"] + +[profile.release] +codegen-units = 1 +debug = false +debug-assertions = false +incremental = false +lto = true +opt-level = 3 +overflow-checks = true +panic = 'abort' +rpath = false + +[dependencies] +cosmwasm-schema.workspace = true +cosmwasm-std.workspace = true +cosmwasm-storage.workspace = true +cw-storage-plus.workspace = true +cw-utils.workspace = true +cw2.workspace = true +itertools = "0.11.0" +okp4-logic-bindings.workspace = true +okp4-objectarium-client.workspace = true +okp4-objectarium.workspace = true +schemars.workspace = true +serde.workspace = true +thiserror.workspace = true + +[dev-dependencies] +cw-multi-test.workspace = true +url = "2.4.0" + +[features] +# for more explicit tests, cargo test --features=backtraces +backtraces = ["cosmwasm-std/backtraces"] +# use library feature to disable all instantiate/execute/query exports +library = [] + +[package.metadata.scripts] +optimize = """docker run --rm -v "$(pwd)":/code \ + --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \ + --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ + cosmwasm/rust-optimizer:0.12.10 +""" diff --git a/contracts/okp4-dataverse/Makefile.toml b/contracts/okp4-dataverse/Makefile.toml new file mode 100644 index 00000000..944012e8 --- /dev/null +++ b/contracts/okp4-dataverse/Makefile.toml @@ -0,0 +1,12 @@ +[tasks.generate_schema] +args = ["run", "--bin", "schema"] +command = "cargo" + +[tasks.schema] +dependencies = ["generate_schema"] +script = ''' +SCHEMA=$(find schema -type f -maxdepth 1 -name '*.json' -print0) +TITLE=$(jq -r .contract_name $SCHEMA) +jq --arg description "$(cat README.md)" '. + {description: $description}' $SCHEMA > $SCHEMA.tmp && mv $SCHEMA.tmp $SCHEMA +jq --arg title $TITLE '. + {title: $title}' $SCHEMA > $SCHEMA.tmp && mv $SCHEMA.tmp $SCHEMA +''' diff --git a/contracts/okp4-dataverse/README.md b/contracts/okp4-dataverse/README.md new file mode 100644 index 00000000..a0cec3cb --- /dev/null +++ b/contracts/okp4-dataverse/README.md @@ -0,0 +1,15 @@ +# Dataverse + +## Overview + +The `dataverse` smart contract is responsible for overseeing and managing the dataverse. The Dataverse is an ever-expanding universe that encompasses a wide range of digital resources. These include datasets, data processing algorithms, ML algorithm, storage resources, computational resources, identity management solutions, orchestration engines, oracles, and many other resources recorded on the blockchain. + +Within the Dataverse, there are defined Zones where specific rules apply. Digital resources recognized within these Zones are the ones compatible with these rules, considering the associated consents. Hence the smart contract also provides mechanisms to manage these Zones, ensuring the implementation of precise governance rules. + +## Instances + +When the smart contract is instantiated, it creates a Dataverse instance. This instance is separated and isolated from any pre-existing ones, and as many dataverse instances as required can be created. + +## Dependencies + +Given its role and status, this smart contract serves as the primary access point for the OKP4 protocol to manage all on-chain stored resources. To fulfill its tasks, the smart contract relies on other smart contracts within the OKP4 ecosystem. Notably, it uses the `Cognitarium` smart contract for persisting the Dataverse representation in an ontological form and the `Law Stone` smart contract to establish governance rules. diff --git a/contracts/okp4-dataverse/src/bin/schema.rs b/contracts/okp4-dataverse/src/bin/schema.rs new file mode 100644 index 00000000..49846a5c --- /dev/null +++ b/contracts/okp4-dataverse/src/bin/schema.rs @@ -0,0 +1,11 @@ +use cosmwasm_schema::write_api; + +use okp4_dataverse::msg::{ExecuteMsg, InstantiateMsg, QueryMsg}; + +fn main() { + write_api! { + instantiate: InstantiateMsg, + execute: ExecuteMsg, + query: QueryMsg, + } +} diff --git a/contracts/okp4-dataverse/src/contract.rs b/contracts/okp4-dataverse/src/contract.rs new file mode 100644 index 00000000..f4dc328a --- /dev/null +++ b/contracts/okp4-dataverse/src/contract.rs @@ -0,0 +1,45 @@ +#[cfg(not(feature = "library"))] +use cosmwasm_std::entry_point; +use cosmwasm_std::{Binary, Deps, DepsMut, Env, MessageInfo, Response, StdError, StdResult}; +use cw2::set_contract_version; + +use crate::error::ContractError; +use crate::msg::{ExecuteMsg, InstantiateMsg, QueryMsg}; + +// version info for migration info +const CONTRACT_NAME: &str = concat!("crates.io:", env!("CARGO_PKG_NAME")); +const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION"); + +#[cfg_attr(not(feature = "library"), entry_point)] +pub fn instantiate( + deps: DepsMut<'_>, + _env: Env, + _info: MessageInfo, + _msg: InstantiateMsg, +) -> Result { + set_contract_version(deps.storage, CONTRACT_NAME, CONTRACT_VERSION)?; + + Err(StdError::generic_err("Not implemented").into()) +} + +#[cfg_attr(not(feature = "library"), entry_point)] +pub fn execute( + _deps: DepsMut<'_>, + _env: Env, + _info: MessageInfo, + _msg: ExecuteMsg, +) -> Result { + Err(StdError::generic_err("Not implemented").into()) +} + +pub mod execute {} + +#[cfg_attr(not(feature = "library"), entry_point)] +pub fn query(_deps: Deps<'_>, _env: Env, _msg: QueryMsg) -> StdResult { + Err(StdError::generic_err("Not implemented")) +} + +pub mod query {} + +#[cfg(test)] +mod tests {} diff --git a/contracts/okp4-dataverse/src/error.rs b/contracts/okp4-dataverse/src/error.rs new file mode 100644 index 00000000..7155f592 --- /dev/null +++ b/contracts/okp4-dataverse/src/error.rs @@ -0,0 +1,8 @@ +use cosmwasm_std::StdError; +use thiserror::Error; + +#[derive(Error, Debug, PartialEq)] +pub enum ContractError { + #[error("{0}")] + Std(#[from] StdError), +} diff --git a/contracts/okp4-dataverse/src/lib.rs b/contracts/okp4-dataverse/src/lib.rs new file mode 100644 index 00000000..14159c9a --- /dev/null +++ b/contracts/okp4-dataverse/src/lib.rs @@ -0,0 +1,18 @@ +#![forbid(unsafe_code)] +#![deny( + warnings, + rust_2018_idioms, + trivial_casts, + trivial_numeric_casts, + unused_lifetimes, + unused_import_braces, + unused_qualifications, + unused_qualifications +)] + +pub mod contract; +mod error; +pub mod msg; +pub mod state; + +pub use crate::error::ContractError; diff --git a/contracts/okp4-dataverse/src/msg.rs b/contracts/okp4-dataverse/src/msg.rs new file mode 100644 index 00000000..5878ff12 --- /dev/null +++ b/contracts/okp4-dataverse/src/msg.rs @@ -0,0 +1,212 @@ +use cosmwasm_schema::{cw_serde, QueryResponses}; +use cosmwasm_std::Binary; + +/// `InstantiateMsg` is used to initialize a new instance of the dataverse. +#[cw_serde] +pub struct InstantiateMsg { + /// A name to give to the dataverse instantiated. + pub name: String, +} + +/// `ExecuteMsg` defines the set of possible actions that can be performed on the dataverse. +/// +/// This enum provides variants for registering services, datasets, and other operations related to the dataverse. +#[cw_serde] +pub enum ExecuteMsg { + /// # RegisterService + /// Registers a new service within the dataverse. + /// Service is a generic concept for any kind of service that can be provided through a network (e.g. a REST API, a gRPC service, etc.). + /// + /// Each service is identified and located by its unique URI which defines the entry point + /// of the service. + /// + /// #### Examples: + /// + /// ```rust + /// ExecuteMsg::RegisterService { + /// subject: "https://ontology.okp4.space/dataverse/service/metadata/52549532-887d-409b-a9c0-fb68f9e521d2", + /// identity: "did:key:z6MkrpCPVDHcsqi3aaqnemLC1aBTUwkfPwTyzc8sFWYwm1PA", + /// identifier: "urn:uuid:803cd033-2eed-4db7-847b-f46715a42a70" + /// } + /// ``` + RegisterService { + /// The unique RDF identifier for the resource representation of the service within the dataverse. + subject: Iri, + /// The decentralized identity of the service. + identity: Did, + /// The unique URI that identifies and locates the service. + /// + /// The URI serves a dual purpose: + /// 1. **Identification**: It provides a unique identifier for the service, ensuring that each service can be distinctly recognized within the dataverse. + /// 2. **Endpoint**: The URI acts as the access point or endpoint for the service. It specifies where the service can be accessed and how interactions with the service should be initiated. + identifier: Uri, + /// The URI of the entity responsible for registering and managing the service in the dataverse (i.e. on the blockchain). + /// It's an optional field, if not provided the service is registered by the entity that invokes the transaction. + registrar: Option, + }, + + /// # RegisterDataset + /// Registers a new dataset within the dataverse. + /// + /// A `Dataset` represents a collection of related data that is organized and presented in a specific format by the provider. + /// This data can be in various forms, such as CSV files, images, videos, and more. It can also refer to data sources like databases and APIs. + /// + /// Each dataset is uniquely identified by its URI, which serves as both the identifier and the access point for the dataset. + /// When accessing a dataset, it's crucial to understand the protocol and methods supported by the dataset's endpoint. For instance, a dataset + /// with an HTTP-based URI might be accessible via GET requests and may require specific headers or parameters for successful retrieval. + /// + /// #### Examples: + /// + /// ```rust + /// ExecuteMsg::RegisterDataset { + /// subject: "https://ontology.okp4.space/dataverse/dataset/96a562a9-5feb-4a41-bcf2-cc8610af9f78", + /// identifier: "ipfs://bafybeicn7i3soqdgr7dwnrwytgq4zxy7a5jpkizrvhm5mv6bgjd32wm3q4", + /// provided_by: "urn:uuid:803cd033-2eed-4db7-847b-f46715a42a70" + /// } + /// ``` + RegisterDataset { + /// The unique RDF identifier for the resource representation of the dataset within the dataverse. + subject: Iri, + /// The unique URI that identifies the dataset. + identifier: Uri, + /// The URI of the service, already registered in the dataverse, that provides the dataset. + provided_by: Uri, + /// The URI of the entity responsible for registering and managing the dataset in the dataverse (i.e. on the blockchain). + /// It's an optional field, if not provided the dataset is registered by the entity that invokes the transaction. + registrar: Option, + }, + + /// # FoundZone + /// Founds a new zone within the dataverse. + /// + /// `Zone` is a conceptual framework that is established based on a set of rules, within which recognized digital Resources must conform, considering + /// associated consents. + /// + /// #### Example + /// + /// ``` + /// ExecuteMsg::FoundZone { + /// subject: "https://ontology.okp4.space/dataverse/zone/ef347285-e52a-430d-9679-dcb76b962ce7", + /// identifier: "urn:uuid:6d1aaad8-9411-4758-a9f9-ed43358af1fd" + /// } + /// ``` + FoundZone { + /// The unique RDF identifier for the resource representation of the zone within the dataverse. + subject: Iri, + /// The unique URI that identifies the zone. + identifier: Uri, + /// The URI of the entity responsible for registering and managing the zone in the dataverse (i.e. on the blockchain). + /// It's an optional field, if not provided the zone is registered by the entity that invokes the transaction. + registrar: Option, + }, + + /// # AttachMetadata + /// Attaches metadata to a specified resource registered in the dataverse. + /// + /// Metadata provides additional information or details about a resource. + AttachMetadata { + /// The unique RDF identifier of the resource for which the metadata should be attached. + subject: Iri, + /// RDF format in which the metadata is represented. + /// If not provided, the default format is [Turtle](https://www.w3.org/TR/turtle/) format. + format: Option, + /// The serialized metadata intended for attachment. + /// This metadata should adhere to the format specified in the `format` field. + metadata: Binary, + }, + + /// # DetachMetadata + /// Remove a previously associated metadata (from a specific resource within the dataverse). + /// Once removed the metadata is no longer accessible. + DetachMetadata { + /// The RDF identifier of the metadata to be removed. + subject: Iri, + }, + + /// # ReviseMetadata + /// Revises a previously associated metadata in order to update it or amend it. + ReviseMetadata { + /// The RDF identifier of the metadata to be revised. + subject: Iri, + /// RDF format in which the metadata is represented. + /// If not provided, the default format is [Turtle](https://www.w3.org/TR/turtle/) format. + format: Option, + /// The serialized metadata intended for revision. + /// This metadata should adhere to the format specified in the `format` field. + metadata: Binary, + }, +} + +/// # RdfFormat +/// `RdfFormat` represents the various serialization formats for RDF (Resource Description Framework) data. +#[cw_serde] +#[derive(Default)] +pub enum RdfFormat { + /// # RdfXml + /// RDF/XML Format + /// + /// RDF/XML is a syntax to express RDF information in XML. + /// See the [official RDF/XML specification](https://www.w3.org/TR/rdf-syntax-grammar/). + #[serde(rename = "rdf_xml")] + RdfXml, + + /// # Turtle + /// Turtle (Terse RDF Triple Language) Format + /// + /// Turtle is a textual format for representing RDF triples in a more compact and human-readable way compared to RDF/XML. + /// See the [official Turtle specification](https://www.w3.org/TR/turtle/). + #[serde(rename = "turtle")] + #[default] + Turtle, + + /// # NTriples + /// N-Triples Format + /// + /// N-Triples is a line-based, plain text format for encoding an RDF graph. Each line corresponds to a single RDF triple. + /// See the [official N-Triples specification](https://www.w3.org/TR/n-triples/). + #[serde(rename = "n_triples")] + NTriples, + + /// # NQuads + /// N-Quads Format + /// + /// N-Quads is an extension of N-Triples to support RDF datasets by adding an optional fourth element to represent the graph name. + /// See the [official N-Quads specification](https://www.w3.org/TR/n-quads/). + #[serde(rename = "n_quads")] + NQuads, +} + +/// # Uri +/// `Uri` represents a Uniform Resource Identifier (URI), a string of characters that provides a simple way +/// to identify a resource. +/// see https://en.wikipedia.org/wiki/Uniform_Resource_Identifier. +type Uri = String; + +/// # Iri +/// `Iri` (Internationalized Resource Identifier) represents a unique identifier used to identify resources. +type Iri = String; + +/// # Did +/// `Did` represents a Decentralized Identifier (DID), a globally unique identifier. +/// see https://www.w3.org/TR/did-core/. +type Did = Uri; + +/// `QueryMsg` defines the set of possible queries that can be made to retrieve information about the dataverse. +/// +/// This enum provides variants for querying the dataverse's details and other related information. +#[cw_serde] +#[derive(QueryResponses)] +pub enum QueryMsg { + /// # Dataverse + /// Retrieves information about the current dataverse instance. + #[returns(DataverseResponse)] + Dataverse {}, +} + +/// # DataverseResponse +/// DataverseResponse is the response of the Dataverse query. +#[cw_serde] +pub struct DataverseResponse { + /// The name of the dataverse. + pub name: String, +} diff --git a/contracts/okp4-dataverse/src/state.rs b/contracts/okp4-dataverse/src/state.rs new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/contracts/okp4-dataverse/src/state.rs @@ -0,0 +1 @@ + diff --git a/docs/okp4-dataverse.md b/docs/okp4-dataverse.md new file mode 100644 index 00000000..a462ddaa --- /dev/null +++ b/docs/okp4-dataverse.md @@ -0,0 +1,206 @@ +# Dataverse + +## Overview + +The `dataverse` smart contract is responsible for overseeing and managing the dataverse. The Dataverse is an ever-expanding universe that encompasses a wide range of digital resources. These include datasets, data processing algorithms, ML algorithm, storage resources, computational resources, identity management solutions, orchestration engines, oracles, and many other resources recorded on the blockchain. + +Within the Dataverse, there are defined Zones where specific rules apply. Digital resources recognized within these Zones are the ones compatible with these rules, considering the associated consents. Hence the smart contract also provides mechanisms to manage these Zones, ensuring the implementation of precise governance rules. + +## Instances + +When the smart contract is instantiated, it creates a Dataverse instance. This instance is separated and isolated from any pre-existing ones, and as many dataverse instances as required can be created. + +## Dependencies + +Given its role and status, this smart contract serves as the primary access point for the OKP4 protocol to manage all on-chain stored resources. To fulfill its tasks, the smart contract relies on other smart contracts within the OKP4 ecosystem. Notably, it uses the `Cognitarium` smart contract for persisting the Dataverse representation in an ontological form and the `Law Stone` smart contract to establish governance rules. + +## InstantiateMsg + +`InstantiateMsg` is used to initialize a new instance of the dataverse. + +|parameter|description| +|----------|-----------| +|`name`|*(Required.) * **string**. A name to give to the dataverse instantiated.| + +## ExecuteMsg + +`ExecuteMsg` defines the set of possible actions that can be performed on the dataverse. + +This enum provides variants for registering services, datasets, and other operations related to the dataverse. + +### ExecuteMsg::RegisterService + +Registers a new service within the dataverse. Service is a generic concept for any kind of service that can be provided through a network (e.g. a REST API, a gRPC service, etc.). + +Each service is identified and located by its unique URI which defines the entry point of the service. + +#### Examples: + +```rust ExecuteMsg::RegisterService { subject: "https://ontology.okp4.space/dataverse/service/metadata/52549532-887d-409b-a9c0-fb68f9e521d2", identity: "did:key:z6MkrpCPVDHcsqi3aaqnemLC1aBTUwkfPwTyzc8sFWYwm1PA", identifier: "urn:uuid:803cd033-2eed-4db7-847b-f46715a42a70" } ``` + +|parameter|description| +|----------|-----------| +|`register_service`|*(Required.) * **object**. | +|`register_service.identifier`|*(Required.) * **string**. The unique URI that identifies and locates the service.

The URI serves a dual purpose: 1. **Identification**: It provides a unique identifier for the service, ensuring that each service can be distinctly recognized within the dataverse. 2. **Endpoint**: The URI acts as the access point or endpoint for the service. It specifies where the service can be accessed and how interactions with the service should be initiated.| +|`register_service.identity`|*(Required.) * **string**. The decentralized identity of the service.| +|`register_service.registrar`|**string\|null**. The URI of the entity responsible for registering and managing the service in the dataverse (i.e. on the blockchain). It's an optional field, if not provided the service is registered by the entity that invokes the transaction.| +|`register_service.subject`|*(Required.) * **string**. The unique RDF identifier for the resource representation of the service within the dataverse.| + +### ExecuteMsg::RegisterDataset + +Registers a new dataset within the dataverse. + +A `Dataset` represents a collection of related data that is organized and presented in a specific format by the provider. This data can be in various forms, such as CSV files, images, videos, and more. It can also refer to data sources like databases and APIs. + +Each dataset is uniquely identified by its URI, which serves as both the identifier and the access point for the dataset. When accessing a dataset, it's crucial to understand the protocol and methods supported by the dataset's endpoint. For instance, a dataset with an HTTP-based URI might be accessible via GET requests and may require specific headers or parameters for successful retrieval. + +#### Examples: + +```rust ExecuteMsg::RegisterDataset { subject: "https://ontology.okp4.space/dataverse/dataset/96a562a9-5feb-4a41-bcf2-cc8610af9f78", identifier: "ipfs://bafybeicn7i3soqdgr7dwnrwytgq4zxy7a5jpkizrvhm5mv6bgjd32wm3q4", provided_by: "urn:uuid:803cd033-2eed-4db7-847b-f46715a42a70" } ``` + +|parameter|description| +|----------|-----------| +|`register_dataset`|*(Required.) * **object**. | +|`register_dataset.identifier`|*(Required.) * **string**. The unique URI that identifies the dataset.| +|`register_dataset.provided_by`|*(Required.) * **string**. The URI of the service, already registered in the dataverse, that provides the dataset.| +|`register_dataset.registrar`|**string\|null**. The URI of the entity responsible for registering and managing the dataset in the dataverse (i.e. on the blockchain). It's an optional field, if not provided the dataset is registered by the entity that invokes the transaction.| +|`register_dataset.subject`|*(Required.) * **string**. The unique RDF identifier for the resource representation of the dataset within the dataverse.| + +### ExecuteMsg::FoundZone + +Founds a new zone within the dataverse. + +`Zone` is a conceptual framework that is established based on a set of rules, within which recognized digital Resources must conform, considering associated consents. + +#### Example + +``` ExecuteMsg::FoundZone { subject: "https://ontology.okp4.space/dataverse/zone/ef347285-e52a-430d-9679-dcb76b962ce7", identifier: "urn:uuid:6d1aaad8-9411-4758-a9f9-ed43358af1fd" } ``` + +|parameter|description| +|----------|-----------| +|`found_zone`|*(Required.) * **object**. | +|`found_zone.identifier`|*(Required.) * **string**. The unique URI that identifies the zone.| +|`found_zone.registrar`|**string\|null**. The URI of the entity responsible for registering and managing the zone in the dataverse (i.e. on the blockchain). It's an optional field, if not provided the zone is registered by the entity that invokes the transaction.| +|`found_zone.subject`|*(Required.) * **string**. The unique RDF identifier for the resource representation of the zone within the dataverse.| + +### ExecuteMsg::AttachMetadata + +Attaches metadata to a specified resource registered in the dataverse. + +Metadata provides additional information or details about a resource. + +|parameter|description| +|----------|-----------| +|`attach_metadata`|*(Required.) * **object**. | +|`attach_metadata.format`|**[RdfFormat](#rdfformat)\|null**. RDF format in which the metadata is represented. If not provided, the default format is [Turtle](https://www.w3.org/TR/turtle/) format.| +|`attach_metadata.metadata`|*(Required.) * **[Binary](#binary)**. The serialized metadata intended for attachment. This metadata should adhere to the format specified in the `format` field.| +|`attach_metadata.subject`|*(Required.) * **string**. The unique RDF identifier of the resource for which the metadata should be attached.| + +### ExecuteMsg::DetachMetadata + +Remove a previously associated metadata (from a specific resource within the dataverse). Once removed the metadata is no longer accessible. + +|parameter|description| +|----------|-----------| +|`detach_metadata`|*(Required.) * **object**. | +|`detach_metadata.subject`|*(Required.) * **string**. The RDF identifier of the metadata to be removed.| + +### ExecuteMsg::ReviseMetadata + +Revises a previously associated metadata in order to update it or amend it. + +|parameter|description| +|----------|-----------| +|`revise_metadata`|*(Required.) * **object**. | +|`revise_metadata.format`|**[RdfFormat](#rdfformat)\|null**. RDF format in which the metadata is represented. If not provided, the default format is [Turtle](https://www.w3.org/TR/turtle/) format.| +|`revise_metadata.metadata`|*(Required.) * **[Binary](#binary)**. The serialized metadata intended for revision. This metadata should adhere to the format specified in the `format` field.| +|`revise_metadata.subject`|*(Required.) * **string**. The RDF identifier of the metadata to be revised.| + +## QueryMsg + +`QueryMsg` defines the set of possible queries that can be made to retrieve information about the dataverse. + +This enum provides variants for querying the dataverse's details and other related information. + +### QueryMsg::Dataverse + +Retrieves information about the current dataverse instance. + +|parameter|description| +|----------|-----------| +|`dataverse`|*(Required.) * **object**. | + +## Responses + +### dataverse + +DataverseResponse is the response of the Dataverse query. + +|property|description| +|----------|-----------| +|`name`|*(Required.) * **string**. The name of the dataverse.| + +## Definitions + +### Binary + +A string containing Base64-encoded data. + +|type| +|----| +|**string**.| + +### NQuads + +N-Quads Format + +N-Quads is an extension of N-Triples to support RDF datasets by adding an optional fourth element to represent the graph name. See the [official N-Quads specification](https://www.w3.org/TR/n-quads/). + +|literal| +|-------| +|`"n_quads"`| + +### NTriples + +N-Triples Format + +N-Triples is a line-based, plain text format for encoding an RDF graph. Each line corresponds to a single RDF triple. See the [official N-Triples specification](https://www.w3.org/TR/n-triples/). + +|literal| +|-------| +|`"n_triples"`| + +### RdfFormat + +`RdfFormat` represents the various serialization formats for RDF (Resource Description Framework) data. + +|variant|description| +|-------|-----------| +|[RdfXml](#rdfxml)|**string**: `rdf_xml`. RDF/XML Format

RDF/XML is a syntax to express RDF information in XML. See the [official RDF/XML specification](https://www.w3.org/TR/rdf-syntax-grammar/).| +|[Turtle](#turtle)|**string**: `turtle`. Turtle (Terse RDF Triple Language) Format

Turtle is a textual format for representing RDF triples in a more compact and human-readable way compared to RDF/XML. See the [official Turtle specification](https://www.w3.org/TR/turtle/).| +|[NTriples](#ntriples)|**string**: `n_triples`. N-Triples Format

N-Triples is a line-based, plain text format for encoding an RDF graph. Each line corresponds to a single RDF triple. See the [official N-Triples specification](https://www.w3.org/TR/n-triples/).| +|[NQuads](#nquads)|**string**: `n_quads`. N-Quads Format

N-Quads is an extension of N-Triples to support RDF datasets by adding an optional fourth element to represent the graph name. See the [official N-Quads specification](https://www.w3.org/TR/n-quads/).| + +### RdfXml + +RDF/XML Format + +RDF/XML is a syntax to express RDF information in XML. See the [official RDF/XML specification](https://www.w3.org/TR/rdf-syntax-grammar/). + +|literal| +|-------| +|`"rdf_xml"`| + +### Turtle + +Turtle (Terse RDF Triple Language) Format + +Turtle is a textual format for representing RDF triples in a more compact and human-readable way compared to RDF/XML. See the [official Turtle specification](https://www.w3.org/TR/turtle/). + +|literal| +|-------| +|`"turtle"`| + +--- + +*Rendered by [Fadroma](https://fadroma.tech) ([@fadroma/schema 1.1.0](https://www.npmjs.com/package/@fadroma/schema)) from `okp4-dataverse.json` (`97457018a767e898`)* \ No newline at end of file