Documentation
¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Hooks
- type Keeper
- func (k *Keeper) ExportGenesis(ctx context.Context) *types.GenesisState
- func (k Keeper) FinalizeTssKeyProcess(ctx context.Context, processID uint64, status types.TssKeyProcessStatus) error
- func (k Keeper) GetCurrentTssKey(ctx context.Context) (types.TssKey, bool, error)
- func (k Keeper) GetCurrentTssParticipants(ctx context.Context) ([]string, error)
- func (k Keeper) GetTssKeyByID(ctx context.Context, keyID string) (types.TssKey, bool, error)
- func (k Keeper) GetTssKeyProcessByID(ctx context.Context, processID uint64) (types.TssKeyProcess, bool, error)
- func (k Keeper) GetTssParticipants(ctx context.Context, processType types.TssProcessType) ([]string, error)
- func (k Keeper) GetUValidatorKeeper() types.UValidatorKeeper
- func (k Keeper) HasOngoingTss(ctx context.Context) (bool, error)
- func (k Keeper) Hooks() Hooks
- func (k *Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) error
- func (k Keeper) InitiateTssKeyProcess(ctx context.Context, processType types.TssProcessType) error
- func (k Keeper) Logger() log.Logger
- func (k Keeper) SchemaBuilder() *collections.SchemaBuilder
- func (k Keeper) SetCurrentTssKey(ctx context.Context, key types.TssKey) error
- func (k Keeper) UpdateParams(ctx context.Context, params types.Params) error
- func (k Keeper) VoteOnTssBallot(ctx context.Context, universalValidator sdk.ValAddress, processId uint64, ...) (isFinalized bool, isNew bool, err error)
- func (k Keeper) VoteTssKeyProcess(ctx context.Context, universalValidator sdk.ValAddress, ...) error
- type Querier
- func (k Querier) AllKeys(goCtx context.Context, req *types.QueryAllKeysRequest) (*types.QueryAllKeysResponse, error)
- func (k Querier) AllPendingTssEvents(goCtx context.Context, req *types.QueryAllPendingTssEventsRequest) (*types.QueryAllPendingTssEventsResponse, error)
- func (k Querier) AllProcesses(goCtx context.Context, req *types.QueryAllProcessesRequest) (*types.QueryAllProcessesResponse, error)
- func (k Querier) AllTssEvents(goCtx context.Context, req *types.QueryAllTssEventsRequest) (*types.QueryAllTssEventsResponse, error)
- func (k Querier) CurrentKey(goCtx context.Context, req *types.QueryCurrentKeyRequest) (*types.QueryCurrentKeyResponse, error)
- func (k Querier) CurrentProcess(goCtx context.Context, req *types.QueryCurrentProcessRequest) (*types.QueryCurrentProcessResponse, error)
- func (k Querier) GetPendingTssEvent(goCtx context.Context, req *types.QueryGetPendingTssEventRequest) (*types.QueryGetPendingTssEventResponse, error)
- func (k Querier) GetTssEvent(goCtx context.Context, req *types.QueryGetTssEventRequest) (*types.QueryGetTssEventResponse, error)
- func (k Querier) KeyById(goCtx context.Context, req *types.QueryKeyByIdRequest) (*types.QueryKeyByIdResponse, error)
- func (k Querier) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Querier) ProcessById(goCtx context.Context, req *types.QueryProcessByIdRequest) (*types.QueryProcessByIdResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the module MsgServer interface.
Types ¶
type Hooks ¶
type Hooks struct {
// contains filtered or unexported fields
}
func (Hooks) AfterValidatorAdded ¶
func (h Hooks) AfterValidatorAdded(ctx sdk.Context, valAddr sdk.ValAddress)
AfterValidatorAdded -> a universal validator has been added to the set
func (Hooks) AfterValidatorRemoved ¶
func (h Hooks) AfterValidatorRemoved(ctx sdk.Context, valAddr sdk.ValAddress)
AfterValidatorRemoved -> a universal validator has been removed from the set
func (Hooks) AfterValidatorStatusChanged ¶
func (h Hooks) AfterValidatorStatusChanged(ctx sdk.Context, valAddr sdk.ValAddress, oldStatus, newStatus uvalidatortypes.UVStatus)
type Keeper ¶
type Keeper struct {
// Module State
Params collections.Item[types.Params] // module params
NextProcessId collections.Sequence // counter for next process id
CurrentTssProcess collections.Item[types.TssKeyProcess] // current/active process
ProcessHistory collections.Map[uint64, types.TssKeyProcess] // history of past processes
// TSS Key Storage
CurrentTssKey collections.Item[types.TssKey] // currently active finalized key
TssKeyHistory collections.Map[string, types.TssKey] // map of key_id -> TssKey
// TSS Events Storage
TssEvents collections.Map[uint64, types.TssEvent] // Key: event ID -> Value: TssEvent
NextTssEventId collections.Sequence // auto-increment counter for event IDs
PendingTssEvents collections.Map[uint64, uint64] // Key: process_id -> Value: event_id (ACTIVE only)
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeService storetypes.KVStoreService, logger log.Logger, authority string, uvalidatorKeeper types.UValidatorKeeper, ) Keeper
NewKeeper creates a new Keeper instance
func (*Keeper) ExportGenesis ¶
func (k *Keeper) ExportGenesis(ctx context.Context) *types.GenesisState
ExportGenesis exports the module's state to a genesis state.
func (Keeper) FinalizeTssKeyProcess ¶
func (k Keeper) FinalizeTssKeyProcess(ctx context.Context, processID uint64, status types.TssKeyProcessStatus) error
FinalizeTssKeyProcess updates a process status and removes it from current if completed.
func (Keeper) GetCurrentTssKey ¶
GetCurrentTssKey fetches the currently active finalized key.
func (Keeper) GetCurrentTssParticipants ¶
GetCurrentTssParticipants returns the participants of current tss (ongoing)
func (Keeper) GetTssKeyByID ¶
GetTssKeyByID retrieves a specific key from history using key_id.
func (Keeper) GetTssKeyProcessByID ¶
func (k Keeper) GetTssKeyProcessByID(ctx context.Context, processID uint64) (types.TssKeyProcess, bool, error)
GetTssKeyProcessByID retrieves a specific tss key process from history using process_id.
func (Keeper) GetTssParticipants ¶
func (Keeper) GetUValidatorKeeper ¶
func (k Keeper) GetUValidatorKeeper() types.UValidatorKeeper
func (Keeper) HasOngoingTss ¶
HasOngoingTss returns true if a TSS process exists and is not expired
func (*Keeper) InitGenesis ¶
InitGenesis initializes the module's state from a genesis state.
func (Keeper) InitiateTssKeyProcess ¶
func (k Keeper) InitiateTssKeyProcess( ctx context.Context, processType types.TssProcessType, ) error
InitiateTssKeyProcess creates a new keygen or reshare process.
func (Keeper) SchemaBuilder ¶
func (k Keeper) SchemaBuilder() *collections.SchemaBuilder
func (Keeper) SetCurrentTssKey ¶
SetCurrentTssKey stores the finalized active TSS key.
func (Keeper) UpdateParams ¶
updateParams is for updating params collections of the module
func (Keeper) VoteOnTssBallot ¶
func (Keeper) VoteTssKeyProcess ¶
type Querier ¶
type Querier struct {
Keeper
}
func NewQuerier ¶
func (Querier) AllKeys ¶
func (k Querier) AllKeys(goCtx context.Context, req *types.QueryAllKeysRequest) (*types.QueryAllKeysResponse, error)
---------------- All Keys (Paginated) -------------------
func (Querier) AllPendingTssEvents ¶ added in v0.0.23
func (k Querier) AllPendingTssEvents(goCtx context.Context, req *types.QueryAllPendingTssEventsRequest) (*types.QueryAllPendingTssEventsResponse, error)
AllPendingTssEvents returns all pending TSS events (paginated). Uses pagination.reverse for descending order (default: ascending by process_id).
func (Querier) AllProcesses ¶
func (k Querier) AllProcesses(goCtx context.Context, req *types.QueryAllProcessesRequest) (*types.QueryAllProcessesResponse, error)
---------------- All Processes (Paginated) -------------
func (Querier) AllTssEvents ¶ added in v0.0.23
func (k Querier) AllTssEvents(goCtx context.Context, req *types.QueryAllTssEventsRequest) (*types.QueryAllTssEventsResponse, error)
---------------- All TSS Events (Paginated) -------------
func (Querier) CurrentKey ¶
func (k Querier) CurrentKey(goCtx context.Context, req *types.QueryCurrentKeyRequest) (*types.QueryCurrentKeyResponse, error)
---------------- Current TSS Key -----------------------
func (Querier) CurrentProcess ¶
func (k Querier) CurrentProcess(goCtx context.Context, req *types.QueryCurrentProcessRequest) (*types.QueryCurrentProcessResponse, error)
---------------- Current TSS Process ------------------
func (Querier) GetPendingTssEvent ¶ added in v0.0.23
func (k Querier) GetPendingTssEvent(goCtx context.Context, req *types.QueryGetPendingTssEventRequest) (*types.QueryGetPendingTssEventResponse, error)
GetPendingTssEvent returns a single pending TSS event by process ID.
func (Querier) GetTssEvent ¶ added in v0.0.23
func (k Querier) GetTssEvent(goCtx context.Context, req *types.QueryGetTssEventRequest) (*types.QueryGetTssEventResponse, error)
---------------- Get TSS Event by ID --------------------
func (Querier) KeyById ¶
func (k Querier) KeyById(goCtx context.Context, req *types.QueryKeyByIdRequest) (*types.QueryKeyByIdResponse, error)
---------------- Key By ID -----------------------------
func (Querier) Params ¶
func (k Querier) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
---------------- Params ------------------
func (Querier) ProcessById ¶
func (k Querier) ProcessById(goCtx context.Context, req *types.QueryProcessByIdRequest) (*types.QueryProcessByIdResponse, error)
---------------- Process By ID ------------------------