mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 13:07:09 +00:00
docs: update README with dependencies and state info
This commit is contained in:
parent
bbfd3e5171
commit
f70fa75e86
@ -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.
|
- **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.
|
- **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
|
## State
|
||||||
|
|
||||||
The module uses the following state structures:
|
The module uses the following state structures:
|
||||||
@ -15,6 +21,7 @@ The module uses the following state structures:
|
|||||||
### Metadata
|
### Metadata
|
||||||
|
|
||||||
Stores information about services:
|
Stores information about services:
|
||||||
|
|
||||||
- Primary key: `id` (auto-increment)
|
- Primary key: `id` (auto-increment)
|
||||||
- Unique index: `origin`
|
- Unique index: `origin`
|
||||||
- Fields: id, origin, name, description, category, icon (URI), tags
|
- Fields: id, origin, name, description, category, icon (URI), tags
|
||||||
@ -22,6 +29,7 @@ Stores information about services:
|
|||||||
### Profile
|
### Profile
|
||||||
|
|
||||||
Stores DID alias information:
|
Stores DID alias information:
|
||||||
|
|
||||||
- Primary key: `id`
|
- Primary key: `id`
|
||||||
- Unique index: `subject,origin`
|
- Unique index: `subject,origin`
|
||||||
- Fields: id, subject, origin, controller
|
- 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
|
## Params
|
||||||
|
|
||||||
The module has the following parameters:
|
The module has the following parameters:
|
||||||
|
|
||||||
- `categories`: List of allowed service categories
|
- `categories`: List of allowed service categories
|
||||||
- `types`: List of allowed service types
|
- `types`: List of allowed service types
|
||||||
|
|
||||||
@ -55,6 +64,7 @@ Retrieves all parameters of the module.
|
|||||||
### gRPC
|
### gRPC
|
||||||
|
|
||||||
The module provides a gRPC Query service with the following RPC:
|
The module provides a gRPC Query service with the following RPC:
|
||||||
|
|
||||||
- `Params`: Get all parameters of the module
|
- `Params`: Get all parameters of the module
|
||||||
|
|
||||||
### CLI
|
### CLI
|
||||||
|
@ -6,4 +6,5 @@ var (
|
|||||||
ErrInvalidGenesisState = sdkerrors.Register(ModuleName, 100, "invalid genesis state")
|
ErrInvalidGenesisState = sdkerrors.Register(ModuleName, 100, "invalid genesis state")
|
||||||
ErrInvalidServiceOrigin = sdkerrors.Register(ModuleName, 200, "invalid service origin")
|
ErrInvalidServiceOrigin = sdkerrors.Register(ModuleName, 200, "invalid service origin")
|
||||||
ErrUnrecognizedService = sdkerrors.Register(ModuleName, 201, "unrecognized service")
|
ErrUnrecognizedService = sdkerrors.Register(ModuleName, 201, "unrecognized service")
|
||||||
|
ErrInvalidServiceGroup = sdkerrors.Register(ModuleName, 202, "invalid group")
|
||||||
)
|
)
|
||||||
|
@ -17,6 +17,5 @@ func DefaultGenesis() *GenesisState {
|
|||||||
// failure.
|
// failure.
|
||||||
func (gs GenesisState) Validate() error {
|
func (gs GenesisState) Validate() error {
|
||||||
// this line is used by starport scaffolding # genesis/types/validate
|
// this line is used by starport scaffolding # genesis/types/validate
|
||||||
|
|
||||||
return gs.Params.Validate()
|
return gs.Params.Validate()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user