Documentation ¶
Index ¶
- func GetMigrationHandler() func(ctx sdk.Context) error
- func NewMsgServer(keeper Keeper, snapshotter Snapshotter, staker types.Staker, nexus types.Nexus) types.MsgServiceServer
- type Keeper
- func (k Keeper) AssignKey(ctx sdk.Context, chainName nexus.ChainName, keyID exported.KeyID) error
- func (k Keeper) DeleteKeygenSession(ctx sdk.Context, id exported.KeyID)
- func (k Keeper) DeleteSigningSession(ctx sdk.Context, id uint64)
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) GetActiveKeyIDs(ctx sdk.Context, chainName nexus.ChainName) []exported.KeyID
- func (k Keeper) GetCurrentKey(ctx sdk.Context, chainName nexus.ChainName) (exported.Key, bool)
- func (k Keeper) GetCurrentKeyID(ctx sdk.Context, chainName nexus.ChainName) (exported.KeyID, bool)
- func (k Keeper) GetKey(ctx sdk.Context, keyID exported.KeyID) (exported.Key, bool)
- func (k Keeper) GetKeygenSession(ctx sdk.Context, id exported.KeyID) (types.KeygenSession, bool)
- func (k Keeper) GetKeygenSessionsByExpiry(ctx sdk.Context, expiry int64) []types.KeygenSession
- func (k Keeper) GetNextKeyID(ctx sdk.Context, chainName nexus.ChainName) (exported.KeyID, bool)
- func (k Keeper) GetSigRouter() types.SigRouter
- func (k Keeper) GetSigningSessionsByExpiry(ctx sdk.Context, expiry int64) []types.SigningSession
- func (k Keeper) HasOptedOut(ctx sdk.Context, participant sdk.AccAddress) bool
- func (k Keeper) InitGenesis(ctx sdk.Context, state *types.GenesisState)
- func (k Keeper) KeygenOptIn(ctx sdk.Context, participant sdk.AccAddress)
- func (k Keeper) KeygenOptOut(ctx sdk.Context, participant sdk.AccAddress)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) RotateKey(ctx sdk.Context, chainName nexus.ChainName) error
- func (k Keeper) SetKey(ctx sdk.Context, key types.Key)
- func (k *Keeper) SetSigRouter(router types.SigRouter)
- func (k Keeper) Sign(ctx sdk.Context, keyID exported.KeyID, payloadHash exported.Hash, ...) error
- type Querier
- func (q Querier) Key(c context.Context, req *types.KeyRequest) (*types.KeyResponse, error)
- func (q Querier) KeyID(c context.Context, req *types.KeyIDRequest) (*types.KeyIDResponse, error)
- func (q Querier) KeygenSession(c context.Context, req *types.KeygenSessionRequest) (*types.KeygenSessionResponse, error)
- func (q Querier) NextKeyID(c context.Context, req *types.NextKeyIDRequest) (*types.NextKeyIDResponse, error)
- type SnapshotCreator
- type Snapshotter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMigrationHandler ¶ added in v0.22.0
GetMigrationHandler returns the handler that performs in-place store migrations
func NewMsgServer ¶
func NewMsgServer(keeper Keeper, snapshotter Snapshotter, staker types.Staker, nexus types.Nexus) types.MsgServiceServer
NewMsgServer returns an implementation of the MsgServiceServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper provides access to all state changes regarding this module
func NewKeeper ¶
func NewKeeper(cdc codec.BinaryCodec, storeKey sdk.StoreKey, paramSpace paramtypes.Subspace) Keeper
NewKeeper is the constructor for the keeper
func (Keeper) DeleteKeygenSession ¶
DeleteKeygenSession deletes the keygen session with the given key ID
func (Keeper) DeleteSigningSession ¶
DeleteSigningSession deletes the signing session with the given ID
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis generates a genesis file from the state
func (Keeper) GetActiveKeyIDs ¶
GetActiveKeyIDs returns all active keys in reverse temporal order. The first key is the key of the current epoch
func (Keeper) GetCurrentKey ¶
GetCurrentKey returns the current key of the given chain
func (Keeper) GetCurrentKeyID ¶
GetCurrentKeyID returns the current key ID of the given chain
func (Keeper) GetKeygenSession ¶ added in v0.21.1
GetKeygenSession returns a keygen session by key ID if it exists
func (Keeper) GetKeygenSessionsByExpiry ¶
GetKeygenSessionsByExpiry returns all keygen sessions that either expires at or goes out of the grace period at the given block height
func (Keeper) GetNextKeyID ¶
GetNextKeyID returns the next key ID of the given chain
func (Keeper) GetSigRouter ¶
GetSigRouter returns the sig router. If no router was set, it returns a (sealed) router with no handlers
func (Keeper) GetSigningSessionsByExpiry ¶
GetSigningSessionsByExpiry returns all signing sessions that either expires at or goes out of the grace period at the given block height
func (Keeper) HasOptedOut ¶ added in v0.27.0
HasOptedOut returns true if the given participant is opted out of future keygens
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, state *types.GenesisState)
InitGenesis initializes the state from a genesis file
func (Keeper) KeygenOptIn ¶ added in v0.27.0
func (k Keeper) KeygenOptIn(ctx sdk.Context, participant sdk.AccAddress)
KeygenOptIn opts in the given participant to future keygens
func (Keeper) KeygenOptOut ¶ added in v0.27.0
func (k Keeper) KeygenOptOut(ctx sdk.Context, participant sdk.AccAddress)
KeygenOptOut opts out the given participant of future keygens
func (*Keeper) SetSigRouter ¶
SetSigRouter sets the sig router. It will panic if called more than once
type Querier ¶
type Querier struct {
// contains filtered or unexported fields
}
Querier implements the grpc queries for the multisig module
func NewGRPCQuerier ¶
NewGRPCQuerier creates a new multisig Querier
func (Querier) Key ¶
func (q Querier) Key(c context.Context, req *types.KeyRequest) (*types.KeyResponse, error)
Key returns the key corresponding to a given key ID
func (Querier) KeyID ¶
func (q Querier) KeyID(c context.Context, req *types.KeyIDRequest) (*types.KeyIDResponse, error)
KeyID returns the key ID assigned to a given chain
func (Querier) KeygenSession ¶ added in v0.21.1
func (q Querier) KeygenSession(c context.Context, req *types.KeygenSessionRequest) (*types.KeygenSessionResponse, error)
KeygenSession returns the keygen session info for the given key ID
func (Querier) NextKeyID ¶
func (q Querier) NextKeyID(c context.Context, req *types.NextKeyIDRequest) (*types.NextKeyIDResponse, error)
NextKeyID returns the key ID assigned for the next rotation on a given chain and empty if none is assigned
type SnapshotCreator ¶
type SnapshotCreator struct {
// contains filtered or unexported fields
}
SnapshotCreator is an implementation of Snapshotter
func NewSnapshotCreator ¶
func NewSnapshotCreator(keygen types.KeygenParticipator, snapshotter types.Snapshotter, staker types.Staker, slasher types.Slasher) SnapshotCreator
NewSnapshotCreator is the constructor for snapshot creator
func (SnapshotCreator) CreateSnapshot ¶
func (sc SnapshotCreator) CreateSnapshot(ctx sdk.Context, threshold utils.Threshold) (snapshot.Snapshot, error)
CreateSnapshot creates a snapshot for multisig keygen
func (SnapshotCreator) GetOperator ¶
func (sc SnapshotCreator) GetOperator(ctx sdk.Context, proxy sdk.AccAddress) sdk.ValAddress
GetOperator returns the operator of the given proxy
type Snapshotter ¶
type Snapshotter interface { CreateSnapshot(ctx sdk.Context, threshold utils.Threshold) (snapshot.Snapshot, error) GetOperator(ctx sdk.Context, proxy sdk.AccAddress) sdk.ValAddress }
Snapshotter is an interface to create snapshots for multisig keygen