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) InitiateFundMigration(ctx context.Context, oldKeyId, chain string) (uint64, error)
- func (k Keeper) InitiateTssKeyProcess(ctx context.Context, processType types.TssProcessType) error
- func (k Keeper) Logger() log.Logger
- func (k Keeper) MigrateFundMigrationsL1GasFee(ctx context.Context) error
- 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) VoteFundMigration(ctx context.Context, universalValidator sdk.ValAddress, migrationId uint64, ...) error
- func (k Keeper) VoteOnFundMigrationBallot(ctx context.Context, universalValidator sdk.ValAddress, migrationId uint64, ...) (isFinalized bool, isNew bool, err 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) AllFundMigrations(goCtx context.Context, req *types.QueryAllFundMigrationsRequest) (*types.QueryAllFundMigrationsResponse, error)
- 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) GetFundMigration(goCtx context.Context, req *types.QueryGetFundMigrationRequest) (*types.QueryGetFundMigrationResponse, 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) PendingFundMigrations(goCtx context.Context, req *types.QueryPendingFundMigrationsRequest) (*types.QueryPendingFundMigrationsResponse, 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)
// Fund Migration Storage
FundMigrations collections.Map[uint64, types.FundMigration] // migration_id -> FundMigration
NextMigrationId collections.Sequence // auto-increment counter for migration IDs
PendingMigrations collections.Map[uint64, uint64] // migration_id -> migration_id (pending index)
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeService storetypes.KVStoreService, logger log.Logger, authority string, uvalidatorKeeper types.UValidatorKeeper, uregistryKeeper types.URegistryKeeper, uexecutorKeeper types.UExecutorKeeper, ) 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) InitiateFundMigration ¶ added in v0.0.28
InitiateFundMigration validates and creates a fund migration from an old TSS key vault to the current TSS key vault for a specific chain.
func (Keeper) InitiateTssKeyProcess ¶
func (k Keeper) InitiateTssKeyProcess( ctx context.Context, processType types.TssProcessType, ) error
InitiateTssKeyProcess creates a new keygen or reshare process.
func (Keeper) MigrateFundMigrationsL1GasFee ¶ added in v0.0.33
MigrateFundMigrationsL1GasFee walks every FundMigration record and sets L1GasFee to "0" when unset. Records stored before the l1_gas_fee proto field existed decode with an empty string; downstream relayer/universalClient code parses this value as a decimal wei amount, so we normalize it here.
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) VoteFundMigration ¶ added in v0.0.28
func (k Keeper) VoteFundMigration( ctx context.Context, universalValidator sdk.ValAddress, migrationId uint64, txHash string, success bool, ) error
VoteFundMigration handles a validator's vote on an observed fund migration tx.
func (Keeper) VoteOnFundMigrationBallot ¶ added in v0.0.28
func (Keeper) VoteOnTssBallot ¶
func (Keeper) VoteTssKeyProcess ¶
type Querier ¶
type Querier struct {
Keeper
}
func NewQuerier ¶
func (Querier) AllFundMigrations ¶ added in v0.0.28
func (k Querier) AllFundMigrations(goCtx context.Context, req *types.QueryAllFundMigrationsRequest) (*types.QueryAllFundMigrationsResponse, error)
AllFundMigrations implements types.QueryServer.
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) GetFundMigration ¶ added in v0.0.28
func (k Querier) GetFundMigration(goCtx context.Context, req *types.QueryGetFundMigrationRequest) (*types.QueryGetFundMigrationResponse, error)
GetFundMigration implements types.QueryServer.
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) PendingFundMigrations ¶ added in v0.0.28
func (k Querier) PendingFundMigrations(goCtx context.Context, req *types.QueryPendingFundMigrationsRequest) (*types.QueryPendingFundMigrationsResponse, error)
PendingFundMigrations implements types.QueryServer.
func (Querier) ProcessById ¶
func (k Querier) ProcessById(goCtx context.Context, req *types.QueryProcessByIdRequest) (*types.QueryProcessByIdResponse, error)
---------------- Process By ID ------------------------