diff --git a/contracts/okp4-dataverse/src/msg.rs b/contracts/okp4-dataverse/src/msg.rs index d81da152..5579d9d4 100644 --- a/contracts/okp4-dataverse/src/msg.rs +++ b/contracts/okp4-dataverse/src/msg.rs @@ -9,9 +9,34 @@ pub struct InstantiateMsg { pub name: String, } +/// DID is a type alias for a string that represents a Decentralized Identifier (DID). +type DID = String; + +/// URI is a type alias for a string that represents a URI. +type URI = String; + /// Execute messages #[cw_serde] -pub enum ExecuteMsg {} +pub enum ExecuteMsg { + /// # RegisterService + /// RegisterService registers a service in 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](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier) which defines the entry point + /// of the service. + RegisterService { + /// Identity of the service. + identity: DID, + + /// Identifier of the service. + /// This identifier is unique within the scope of the dataverse and is used to reference the service and describe how to interact with it. + identifier: URI, + + /// References the individual, company, or organization that is responsible for registering and + /// managing the service. + registrar: URI, + }, +} /// Query messages #[cw_serde]