mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 21:09:11 +00:00
- **docs: remove discord badge from README** - **fix: ensure go version is up-to-date** - **<no value>** - **refactor: update import paths for blocks to components** - **feat: add Hero component template** - **fix: update footer logo to svg** - **feat: add Query/Sign and Query/Verify RPC methods** - **refactor: rename Keyshares to KsVal in did/v1/state.proto**
48 lines
1.3 KiB
Go
48 lines
1.3 KiB
Go
package keeper
|
|
|
|
import (
|
|
"context"
|
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
"github.com/onsonr/sonr/x/did/types"
|
|
)
|
|
|
|
var _ types.QueryServer = Querier{}
|
|
|
|
type Querier struct {
|
|
Keeper
|
|
}
|
|
|
|
func NewQuerier(keeper Keeper) Querier {
|
|
return Querier{Keeper: keeper}
|
|
}
|
|
|
|
// Params returns the total set of did parameters.
|
|
func (k Querier) Params(goCtx context.Context, req *types.QueryRequest) (*types.QueryParamsResponse, error) {
|
|
ctx := sdk.UnwrapSDKContext(goCtx)
|
|
p, err := k.Keeper.CurrentParams(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &types.QueryParamsResponse{Params: p}, nil
|
|
}
|
|
|
|
// Resolve implements types.QueryServer.
|
|
func (k Querier) Resolve(goCtx context.Context, req *types.QueryRequest) (*types.QueryResolveResponse, error) {
|
|
return &types.QueryResolveResponse{}, nil
|
|
}
|
|
|
|
// Sign implements types.QueryServer.
|
|
func (k Querier) Sign(goCtx context.Context, req *types.QuerySignRequest) (*types.QuerySignResponse, error) {
|
|
// ctx := sdk.UnwrapSDKContext(goCtx)
|
|
panic("Sign is unimplemented")
|
|
return &types.QuerySignResponse{}, nil
|
|
}
|
|
|
|
// Verify implements types.QueryServer.
|
|
func (k Querier) Verify(goCtx context.Context, req *types.QueryVerifyRequest) (*types.QueryVerifyResponse, error) {
|
|
// ctx := sdk.UnwrapSDKContext(goCtx)
|
|
panic("Verify is unimplemented")
|
|
return &types.QueryVerifyResponse{}, nil
|
|
}
|