Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func NewQueryServer(k Keeper) types.QueryServer
- type Keeper
- func (k Keeper) ActivateMember(ctx sdk.Context, address sdk.AccAddress, groupID tss.GroupID) error
- func (k Keeper) AddMember(ctx sdk.Context, address sdk.AccAddress, groupID tss.GroupID) error
- func (k Keeper) AddMembers(ctx sdk.Context, groupID tss.GroupID) error
- func (k Keeper) AddSigning(ctx sdk.Context, feePerSigner sdk.Coins, sender sdk.AccAddress, ...) types.SigningID
- func (k Keeper) AllocateTokens(ctx sdk.Context) error
- func (k Keeper) CreateDirectSigningRequest(ctx sdk.Context, content tsstypes.Content, memo string, sender sdk.AccAddress, ...) (types.SigningID, error)
- func (k Keeper) CreateTransitionSigning(ctx sdk.Context, groupPubKey tss.Point, transitionTime time.Time) (tss.SigningID, error)
- func (k Keeper) CreateTunnelSigningRequest(ctx sdk.Context, tunnelID uint64, destinationChainID string, ...) (types.SigningID, error)
- func (k Keeper) DeactivateMember(ctx sdk.Context, address sdk.AccAddress, groupID tss.GroupID) error
- func (k Keeper) DeleteGroupTransition(ctx sdk.Context)
- func (k Keeper) DeleteMember(ctx sdk.Context, address sdk.AccAddress, groupID tss.GroupID)
- func (k Keeper) DeleteMembers(ctx sdk.Context, groupID tss.GroupID)
- func (k Keeper) DeleteSigningIDMapping(ctx sdk.Context, signingID tss.SigningID)
- func (k Keeper) EndGroupTransitionProcess(ctx sdk.Context, transition types.GroupTransition, isSuccess bool)
- func (k Keeper) ExecuteGroupTransition(ctx sdk.Context, transition types.GroupTransition)
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) ExtractEventAttributesFromTransition(transition types.GroupTransition) []sdk.Attribute
- func (k Keeper) GetAuthority() string
- func (k Keeper) GetBandtssAccount(ctx sdk.Context) sdk.ModuleAccountI
- func (k Keeper) GetCurrentGroup(ctx sdk.Context) types.CurrentGroup
- func (k Keeper) GetGroupTransition(ctx sdk.Context) (groupTransition types.GroupTransition, found bool)
- func (k Keeper) GetIncomingGroupID(ctx sdk.Context) tss.GroupID
- func (k Keeper) GetMember(ctx sdk.Context, address sdk.AccAddress, groupID tss.GroupID) (types.Member, error)
- func (k Keeper) GetMembers(ctx sdk.Context) []types.Member
- func (k Keeper) GetMembersIterator(ctx sdk.Context) dbm.Iterator
- func (k Keeper) GetModuleBalance(ctx sdk.Context) sdk.Coins
- func (k Keeper) GetParams(ctx sdk.Context) (p types.Params)
- func (k Keeper) GetSigning(ctx sdk.Context, id types.SigningID) (types.Signing, error)
- func (k Keeper) GetSigningCount(ctx sdk.Context) uint64
- func (k Keeper) GetSigningFee(ctx sdk.Context) (sdk.Coins, error)
- func (k Keeper) GetSigningIDMapping(ctx sdk.Context, signingID tss.SigningID) types.SigningID
- func (k Keeper) HasMember(ctx sdk.Context, address sdk.AccAddress, groupID tss.GroupID) bool
- func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MustGetSigning(ctx sdk.Context, id types.SigningID) types.Signing
- func (k Keeper) SetCurrentGroup(ctx sdk.Context, currentGroup types.CurrentGroup)
- func (k Keeper) SetGroupTransition(ctx sdk.Context, groupTransition types.GroupTransition)
- func (k Keeper) SetMember(ctx sdk.Context, member types.Member)
- func (k Keeper) SetModuleAccount(ctx sdk.Context, acc sdk.ModuleAccountI)
- func (k Keeper) SetNewGroupTransition(ctx sdk.Context, incomingGroupID tss.GroupID, execTime time.Time, ...) (types.GroupTransition, error)
- func (k Keeper) SetParams(ctx sdk.Context, p types.Params) error
- func (k Keeper) SetSigning(ctx sdk.Context, signing types.Signing)
- func (k Keeper) SetSigningCount(ctx sdk.Context, count uint64)
- func (k Keeper) SetSigningIDMapping(ctx sdk.Context, signingID tss.SigningID, signingInfoID types.SigningID)
- func (k Keeper) ShouldExecuteGroupTransition(ctx sdk.Context) (transition types.GroupTransition, ok bool)
- func (k Keeper) ValidateTransitionExecTime(ctx sdk.Context, execTime time.Time) error
- func (k Keeper) ValidateTransitionInProgress(ctx sdk.Context) error
- type TSSCallback
- func (cb TSSCallback) OnGroupCreationCompleted(ctx sdk.Context, groupID tss.GroupID)
- func (cb TSSCallback) OnGroupCreationExpired(ctx sdk.Context, groupID tss.GroupID)
- func (cb TSSCallback) OnGroupCreationFailed(ctx sdk.Context, groupID tss.GroupID)
- func (cb TSSCallback) OnSigningCompleted(ctx sdk.Context, signingID tss.SigningID, assignedMembers []sdk.AccAddress)
- func (cb TSSCallback) OnSigningFailed(ctx sdk.Context, signingID tss.SigningID)
- func (cb TSSCallback) OnSigningTimeout(ctx sdk.Context, signingID tss.SigningID, idleMembers []sdk.AccAddress)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
func NewQueryServer ¶
func NewQueryServer(k Keeper) types.QueryServer
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey storetypes.StoreKey, authKeeper types.AccountKeeper, bankKeeper types.BankKeeper, distrKeeper types.DistrKeeper, tssKeeper types.TSSKeeper, authority string, feeCollectorName string, ) Keeper
func (Keeper) ActivateMember ¶
ActivateMember activates the member. This function returns an error if the given member is too soon to activate or the member is not in the given group.
func (Keeper) AddMember ¶
AddMember adds a new member to the group and return error if already exists
func (Keeper) AddMembers ¶
AddMembers adds all members of the group.
func (Keeper) AddSigning ¶
func (k Keeper) AddSigning( ctx sdk.Context, feePerSigner sdk.Coins, sender sdk.AccAddress, currentGroupSigningID tss.SigningID, incomingGroupSigningID tss.SigningID, ) types.SigningID
AddSigning adds the signing data to the store and returns the new Signing ID.
func (Keeper) AllocateTokens ¶
AllocateTokens allocates a portion of fee collected in the previous blocks to members in the current group. Note that this reward is also subjected to comm tax and this reward is calculate after allocation in oracle module.
func (Keeper) CreateDirectSigningRequest ¶
func (k Keeper) CreateDirectSigningRequest( ctx sdk.Context, content tsstypes.Content, memo string, sender sdk.AccAddress, feeLimit sdk.Coins, ) (types.SigningID, error)
CreateDirectSigningRequest creates a new signing process and returns the result.
func (Keeper) CreateTransitionSigning ¶
func (k Keeper) CreateTransitionSigning( ctx sdk.Context, groupPubKey tss.Point, transitionTime time.Time, ) (tss.SigningID, error)
CreateTransitionSigning creates a signing request for the group transition.
func (Keeper) CreateTunnelSigningRequest ¶
func (Keeper) DeactivateMember ¶
func (k Keeper) DeactivateMember(ctx sdk.Context, address sdk.AccAddress, groupID tss.GroupID) error
DeactivateMember flags is_active to false. This function will return error if the given address isn't the member of the given group.
func (Keeper) DeleteGroupTransition ¶
DeleteGroupTransition removes the group transition information from the store.
func (Keeper) DeleteMember ¶
DeleteMember removes the status of the address of the group
func (Keeper) DeleteMembers ¶
DeleteMembers removes all members of the group.
func (Keeper) DeleteSigningIDMapping ¶
DeleteSigningIDMapping removes the mapping between tss signingID and bandtss signing id of the given key
func (Keeper) EndGroupTransitionProcess ¶
func (k Keeper) EndGroupTransitionProcess(ctx sdk.Context, transition types.GroupTransition, isSuccess bool)
EndGroupTransitionProcess ends the group transition process by removing the transition and emit an event.
func (Keeper) ExecuteGroupTransition ¶
func (k Keeper) ExecuteGroupTransition(ctx sdk.Context, transition types.GroupTransition)
ExecuteGroupTransition executes the group transition by updating the current group ID and removing the members in the previous group if the status is waiting execution, or ends the process otherwise.
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns a GenesisState for a given context and keeper.
func (Keeper) ExtractEventAttributesFromTransition ¶
func (k Keeper) ExtractEventAttributesFromTransition(transition types.GroupTransition) []sdk.Attribute
ExtractEventAttributesFromTransition returns the attributes for the group transition event.
func (Keeper) GetAuthority ¶
GetAuthority returns the x/bandtss module's authority.
func (Keeper) GetBandtssAccount ¶
func (k Keeper) GetBandtssAccount(ctx sdk.Context) sdk.ModuleAccountI
GetBandtssAccount returns the bandtss ModuleAccount
func (Keeper) GetCurrentGroup ¶
func (k Keeper) GetCurrentGroup(ctx sdk.Context) types.CurrentGroup
GetCurrentGroup retrieves a current group information of the bandtss module.
func (Keeper) GetGroupTransition ¶
func (k Keeper) GetGroupTransition(ctx sdk.Context) (groupTransition types.GroupTransition, found bool)
GetGroupTransition retrieves a group transition information in the store.
func (Keeper) GetIncomingGroupID ¶
GetIncomingGroupID returns the incoming group ID from transition state. If the status is not WaitingExecution, it returns 0.
func (Keeper) GetMember ¶
func (k Keeper) GetMember(ctx sdk.Context, address sdk.AccAddress, groupID tss.GroupID) (types.Member, error)
GetMember retrieves a member by address.
func (Keeper) GetMembers ¶
GetMembers retrieves all statuses of the store.
func (Keeper) GetMembersIterator ¶
GetMembersIterator gets an iterator all statuses of address.
func (Keeper) GetModuleBalance ¶
GetModuleBalance returns the balance of the bandtss ModuleAccount
func (Keeper) GetSigning ¶
GetSigning retrieves a bandtss signing info.
func (Keeper) GetSigningCount ¶
GetSigningCount returns the current number of all bandtss signing ever existed.
func (Keeper) GetSigningFee ¶
GetSigningFee returns the fee required for signing a message.
func (Keeper) GetSigningIDMapping ¶
GetSigningIDMapping gets a signing id from the given tss signingID
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState)
InitGenesis performs genesis initialization for this module.
func (Keeper) MustGetSigning ¶
MustGetSigning retrieves a bandtss signing. Panics error if not exists.
func (Keeper) SetCurrentGroup ¶
func (k Keeper) SetCurrentGroup(ctx sdk.Context, currentGroup types.CurrentGroup)
SetCurrentGroup sets a current group information of the bandtss module.
func (Keeper) SetGroupTransition ¶
func (k Keeper) SetGroupTransition(ctx sdk.Context, groupTransition types.GroupTransition)
SetGroupTransition sets a group transition information in the store.
func (Keeper) SetModuleAccount ¶
func (k Keeper) SetModuleAccount(ctx sdk.Context, acc sdk.ModuleAccountI)
SetModuleAccount sets a module account in the account keeper.
func (Keeper) SetNewGroupTransition ¶
func (k Keeper) SetNewGroupTransition( ctx sdk.Context, incomingGroupID tss.GroupID, execTime time.Time, isForceTransition bool, ) (types.GroupTransition, error)
SetNewGroupTransition sets a new group transition with the current group ID and public key.
func (Keeper) SetSigning ¶
SetSigning sets a signing of the bandtss module.
func (Keeper) SetSigningCount ¶
SetSigningCount sets the number of bandtss signing count to the given value.
func (Keeper) SetSigningIDMapping ¶
func (k Keeper) SetSigningIDMapping(ctx sdk.Context, signingID tss.SigningID, signingInfoID types.SigningID)
SetSigningIDMapping sets a mapping between tss.signingID and bandtss signing id.
func (Keeper) ShouldExecuteGroupTransition ¶
func (k Keeper) ShouldExecuteGroupTransition(ctx sdk.Context) (transition types.GroupTransition, ok bool)
ShouldExecuteGroupTransition checks if the group transition should be executed by comparing the block time with the transition execution time.
func (Keeper) ValidateTransitionExecTime ¶
ValidateTransitionExecTime validate the transition execution time if it is after the block time but not over the max duration.
type TSSCallback ¶
type TSSCallback struct {
// contains filtered or unexported fields
}
Wrapper struct
func NewTSSCallback ¶
func NewTSSCallback(k Keeper) TSSCallback
func (TSSCallback) OnGroupCreationCompleted ¶
func (cb TSSCallback) OnGroupCreationCompleted(ctx sdk.Context, groupID tss.GroupID)
func (TSSCallback) OnGroupCreationExpired ¶
func (cb TSSCallback) OnGroupCreationExpired(ctx sdk.Context, groupID tss.GroupID)
func (TSSCallback) OnGroupCreationFailed ¶
func (cb TSSCallback) OnGroupCreationFailed(ctx sdk.Context, groupID tss.GroupID)
func (TSSCallback) OnSigningCompleted ¶
func (cb TSSCallback) OnSigningCompleted( ctx sdk.Context, signingID tss.SigningID, assignedMembers []sdk.AccAddress, )
func (TSSCallback) OnSigningFailed ¶
func (cb TSSCallback) OnSigningFailed(ctx sdk.Context, signingID tss.SigningID)
func (TSSCallback) OnSigningTimeout ¶
func (cb TSSCallback) OnSigningTimeout( ctx sdk.Context, signingID tss.SigningID, idleMembers []sdk.AccAddress, )
OnSignTimeout is called when the signing request is expired. It penalizes the members that do not sign a message.