From f70fa75e86990ebd87dfd7f93cd4c3e71cad307a Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Wed, 30 Oct 2024 09:58:47 -0400 Subject: [PATCH] docs: update README with dependencies and state info --- x/service/README.md | 10 ++++++++++ x/service/types/errors.go | 1 + x/service/types/genesis.go | 1 - 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/x/service/README.md b/x/service/README.md index afdf0644f..85c7cbb04 100644 --- a/x/service/README.md +++ b/x/service/README.md @@ -8,6 +8,12 @@ The Service module is responsible for managing the registration and authorizatio - **Profile**: Represents a DID alias with properties like ID, subject, origin, and controller. - **Metadata**: Contains information about a service, including name, description, category, icon, and tags. +### Dependencies + +- [x/did](https://github.com/onsonr/sonr/tree/master/x/did) +- [x/group](https://github.com/onsonr/sonr/tree/master/x/group) +- [x/nft](https://github.com/onsonr/sonr/tree/master/x/nft) + ## State The module uses the following state structures: @@ -15,6 +21,7 @@ The module uses the following state structures: ### Metadata Stores information about services: + - Primary key: `id` (auto-increment) - Unique index: `origin` - Fields: id, origin, name, description, category, icon (URI), tags @@ -22,6 +29,7 @@ Stores information about services: ### Profile Stores DID alias information: + - Primary key: `id` - Unique index: `subject,origin` - Fields: id, subject, origin, controller @@ -39,6 +47,7 @@ Registers a new service on the blockchain. Requires a valid TXT record in DNS fo ## Params The module has the following parameters: + - `categories`: List of allowed service categories - `types`: List of allowed service types @@ -55,6 +64,7 @@ Retrieves all parameters of the module. ### gRPC The module provides a gRPC Query service with the following RPC: + - `Params`: Get all parameters of the module ### CLI diff --git a/x/service/types/errors.go b/x/service/types/errors.go index c23107a97..b169c4acc 100644 --- a/x/service/types/errors.go +++ b/x/service/types/errors.go @@ -6,4 +6,5 @@ var ( ErrInvalidGenesisState = sdkerrors.Register(ModuleName, 100, "invalid genesis state") ErrInvalidServiceOrigin = sdkerrors.Register(ModuleName, 200, "invalid service origin") ErrUnrecognizedService = sdkerrors.Register(ModuleName, 201, "unrecognized service") + ErrInvalidServiceGroup = sdkerrors.Register(ModuleName, 202, "invalid group") ) diff --git a/x/service/types/genesis.go b/x/service/types/genesis.go index 2c15cd92a..4f9eac491 100644 --- a/x/service/types/genesis.go +++ b/x/service/types/genesis.go @@ -17,6 +17,5 @@ func DefaultGenesis() *GenesisState { // failure. func (gs GenesisState) Validate() error { // this line is used by starport scaffolding # genesis/types/validate - return gs.Params.Validate() }