mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 21:09:11 +00:00
* feat: add support for DID number as primary key for Controllers * refactor: rename pkg/proxy to app/proxy * feat: add vault module keeper tests * feat(vault): add DID keeper to vault module * refactor: move vault client code to its own package * refactor(vault): extract schema definition * refactor: use vaulttypes for MsgAllocateVault * refactor: update vault assembly logic to use new methods * feat: add dwn-proxy command * refactor: remove unused context.go file * refactor: remove unused web-related code * feat: add DWN proxy server * feat: add BuildTx RPC to vault module * fix: Implement BuildTx endpoint * feat: add devbox integration to project
43 lines
988 B
Go
43 lines
988 B
Go
package keeper
|
|
|
|
import (
|
|
"context"
|
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
|
|
"github.com/onsonr/sonr/x/vault/types"
|
|
)
|
|
|
|
var _ types.QueryServer = Querier{}
|
|
|
|
type Querier struct {
|
|
Keeper
|
|
}
|
|
|
|
func NewQuerier(keeper Keeper) Querier {
|
|
return Querier{Keeper: keeper}
|
|
}
|
|
|
|
func (k Querier) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) {
|
|
ctx := sdk.UnwrapSDKContext(c)
|
|
|
|
p, err := k.Keeper.Params.Get(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return &types.QueryParamsResponse{Params: &p}, nil
|
|
}
|
|
|
|
// Sync implements types.QueryServer.
|
|
func (k Querier) Sync(goCtx context.Context, req *types.SyncRequest) (*types.SyncResponse, error) {
|
|
// ctx := sdk.UnwrapSDKContext(goCtx)
|
|
return &types.SyncResponse{}, nil
|
|
}
|
|
|
|
// BuildTx implements types.QueryServer.
|
|
func (k Querier) BuildTx(goCtx context.Context, req *types.BuildTxRequest) (*types.BuildTxResponse, error) {
|
|
// ctx := sdk.UnwrapSDKContext(goCtx)
|
|
return &types.BuildTxResponse{}, nil
|
|
}
|