Documentation
¶
Index ¶
- func IsValidPermission(perm types.Permission, country string, checkTime time.Time) error
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) CreatePermission(ctx sdk.Context, perm types.Permission) (uint64, error)
- func (k Keeper) FindBeneficiaries(goCtx context.Context, req *types.QueryFindBeneficiariesRequest) (*types.QueryFindBeneficiariesResponse, error)
- func (k Keeper) FindPermissionsWithDID(goCtx context.Context, req *types.QueryFindPermissionsWithDIDRequest) (*types.QueryFindPermissionsWithDIDResponse, error)
- func (k Keeper) GetAuthority() string
- func (k Keeper) GetParams(ctx context.Context) (params types.Params)
- func (k Keeper) GetPermission(goCtx context.Context, req *types.QueryGetPermissionRequest) (*types.QueryGetPermissionResponse, error)
- func (k Keeper) GetPermissionByID(ctx sdk.Context, id uint64) (types.Permission, error)
- func (k Keeper) GetPermissionSession(ctx context.Context, req *types.QueryGetPermissionSessionRequest) (*types.QueryGetPermissionSessionResponse, error)
- func (k Keeper) ListPermissionSessions(ctx context.Context, req *types.QueryListPermissionSessionsRequest) (*types.QueryListPermissionSessionsResponse, error)
- func (k Keeper) ListPermissions(goCtx context.Context, req *types.QueryListPermissionsRequest) (*types.QueryListPermissionsResponse, error)
- func (k Keeper) Logger() log.Logger
- func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) SetParams(ctx context.Context, params types.Params) error
- func (k Keeper) UpdatePermission(ctx sdk.Context, perm types.Permission) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValidPermission ¶
IsValidPermission checks if a perm is valid for a given country code and time A valid perm (ACTIVE state): - Has a matching country (perm country is null or matches the provided country) - Is currently effective (effective_from must be set and effective_from ≤ now < effective_until) - Is not revoked - Is not slashed - Is not repaid According to the spec, if validator permission is INACTIVE (not valid), it must abort. INACTIVE means: effective_from is null OR effective_from equals now() exactly (not before).
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// state
Permission collections.Map[uint64, types.Permission]
PermissionCounter collections.Item[uint64]
PermissionSession collections.Map[string, types.PermissionSession]
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeService store.KVStoreService, logger log.Logger, authority string, credentialSchemaKeeper types.CredentialSchemaKeeper, trustRegistryKeeper types.TrustRegistryKeeper, trustDeposit types.TrustDepositKeeper, bankKeeper types.BankKeeper, ) Keeper
func (Keeper) CreatePermission ¶
CreatePermission creates a new perm and returns its ID
func (Keeper) FindBeneficiaries ¶
func (k Keeper) FindBeneficiaries(goCtx context.Context, req *types.QueryFindBeneficiariesRequest) (*types.QueryFindBeneficiariesResponse, error)
func (Keeper) FindPermissionsWithDID ¶
func (k Keeper) FindPermissionsWithDID(goCtx context.Context, req *types.QueryFindPermissionsWithDIDRequest) (*types.QueryFindPermissionsWithDIDResponse, error)
func (Keeper) GetAuthority ¶
GetAuthority returns the module's authority.
func (Keeper) GetPermission ¶
func (k Keeper) GetPermission(goCtx context.Context, req *types.QueryGetPermissionRequest) (*types.QueryGetPermissionResponse, error)
func (Keeper) GetPermissionByID ¶
func (Keeper) GetPermissionSession ¶
func (k Keeper) GetPermissionSession(ctx context.Context, req *types.QueryGetPermissionSessionRequest) (*types.QueryGetPermissionSessionResponse, error)
func (Keeper) ListPermissionSessions ¶
func (k Keeper) ListPermissionSessions(ctx context.Context, req *types.QueryListPermissionSessionsRequest) (*types.QueryListPermissionSessionsResponse, error)
func (Keeper) ListPermissions ¶
func (k Keeper) ListPermissions(goCtx context.Context, req *types.QueryListPermissionsRequest) (*types.QueryListPermissionsResponse, error)
func (Keeper) Params ¶
func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)