keeper

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

Types

type Keeper

type Keeper struct {
	*types.IBCKeeper
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey storetypes.StoreKey,
	ps paramtypes.Subspace,
	channelKeeper types.ChannelKeeper,
	portKeeper types.PortKeeper,
	scopedKeeper types.ScopedKeeper,
	connectionKeeper types.ConnectionKeeper,
	bankKeeper types.BankKeeper,
) *Keeper

func (Keeper) AppendEncryptedTx

func (k Keeper) AppendEncryptedTx(
	ctx sdk.Context,
	encryptedTx types.EncryptedTx,
) uint64

AppendEncryptedTx append a specific encryptedTx in the store

func (Keeper) AppendTxToEntry added in v0.6.0

func (k Keeper) AppendTxToEntry(ctx sdk.Context, reqID string, encTx types.GeneralEncryptedTx) uint64

func (Keeper) DeleteActivePubKey

func (k Keeper) DeleteActivePubKey(ctx sdk.Context)

DeleteActivePubKey deletes the active public key in the store

func (Keeper) DeleteQueuedPubKey

func (k Keeper) DeleteQueuedPubKey(ctx sdk.Context)

DeleteQueuedPubKey deletes the queued public key in the store

func (Keeper) EncryptedTx

EncryptedTx returns a singe encrypted Tx by index

func (Keeper) EncryptedTxAll

EncryptedTxAll returns the paginated list of all encrypted Txs

func (Keeper) EncryptedTxAllFromHeight

EncryptedTxAllFromHeight returns all the encrypted TXs for a particular height

func (Keeper) GetActivePubKey

func (k Keeper) GetActivePubKey(
	ctx sdk.Context,
) (val commontypes.ActivePublicKey, found bool)

GetActivePubKey returns the Active public key

func (Keeper) GetAggregatedKeyShare

func (k Keeper) GetAggregatedKeyShare(
	ctx sdk.Context,
	height uint64,

) (val types.AggregatedKeyShare, found bool)

GetAggregatedKeyShare returns a aggregatedKeyShare from its index

func (Keeper) GetAllAggregatedKeyShare

func (k Keeper) GetAllAggregatedKeyShare(ctx sdk.Context) (list []types.AggregatedKeyShare)

GetAllAggregatedKeyShare returns all aggregatedKeyShare

func (Keeper) GetAllEncryptedArray

func (k Keeper) GetAllEncryptedArray(ctx sdk.Context) (arr []types.EncryptedTxArray)

GetAllEncryptedArray returns the list of all encrypted txs

func (Keeper) GetAllGenEncTxEntry added in v0.6.0

func (k Keeper) GetAllGenEncTxEntry(ctx sdk.Context) (list []types.GenEncTxExecutionQueue)

GetAllGenEncTxEntry returns all GenEncTxQueue entries

func (Keeper) GetAllGenEncTxExecutionQueueEntry added in v0.6.0

func (k Keeper) GetAllGenEncTxExecutionQueueEntry(ctx sdk.Context) (list []types.GenEncTxExecutionQueue)

GetAllGenEncTxQueueEntry returns all GenEncTxQueue entries

func (Keeper) GetAllGenEncTxReqQueueEntry added in v0.6.0

func (k Keeper) GetAllGenEncTxReqQueueEntry(ctx sdk.Context) (list []commontypes.RequestAggrKeyshare)

GetAllGenEncTxQueueEntry returns all GenEncTxQueue entries

func (Keeper) GetAllGenEncTxSignalQueueEntry added in v0.6.0

func (k Keeper) GetAllGenEncTxSignalQueueEntry(ctx sdk.Context) (list []commontypes.GetAggrKeyshare)

GetAllGenEncTxQueueEntry returns all GenEncTxQueue entries

func (Keeper) GetAllPepNonce

func (k Keeper) GetAllPepNonce(ctx sdk.Context) (list []types.PepNonce)

GetAllPepNonce returns all pepNonce

func (Keeper) GetEncryptedTx

func (k Keeper) GetEncryptedTx(
	ctx sdk.Context,
	targetHeight uint64,
	index uint64,

) (val types.EncryptedTx, found bool)

GetEncryptedTx returns a encryptedTx from its index

func (Keeper) GetEncryptedTxAllFromHeight

func (k Keeper) GetEncryptedTxAllFromHeight(
	ctx sdk.Context,
	targetHeight uint64,

) types.EncryptedTxArray

GetEncryptedTxAllFromHeight returns all encryptedTx from the height provided

func (Keeper) GetEntry added in v0.6.0

func (k Keeper) GetEntry(
	ctx sdk.Context,
	reqID string,
) (val types.GenEncTxExecutionQueue, found bool)

GetEntry returns a queue entry by its identity

func (Keeper) GetExecutionQueueEntry added in v0.6.0

func (k Keeper) GetExecutionQueueEntry(
	ctx sdk.Context,
	reqID string,
) (val types.GenEncTxExecutionQueue, found bool)

GetQueueEntry returns a queue entry by its identity

func (Keeper) GetLastExecutedHeight

func (k Keeper) GetLastExecutedHeight(
	ctx sdk.Context,
) string

GetLastExecutedHeight gets the last execution height

func (Keeper) GetLatestHeight

func (k Keeper) GetLatestHeight(
	ctx sdk.Context,
) string

GetLatestHeight gets the last registered fairyring Height

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) types.Params

GetParams get all parameters as types.Params

func (Keeper) GetPepNonce

func (k Keeper) GetPepNonce(
	ctx sdk.Context,
	address string,

) (val types.PepNonce, found bool)

GetPepNonce returns a pepNonce from its index

func (Keeper) GetQueuedPubKey

func (k Keeper) GetQueuedPubKey(
	ctx sdk.Context,
) (val commontypes.QueuedPublicKey, found bool)

GetQueuedPubKey returns the Queued public key

func (Keeper) GetRequestCount added in v0.6.0

func (k Keeper) GetRequestCount(ctx sdk.Context) string

GetRequestCount returns the request count

func (Keeper) GetRequestQueueEntry added in v0.6.0

func (k Keeper) GetRequestQueueEntry(
	ctx sdk.Context,
	reqID string,
) (val commontypes.RequestAggrKeyshare, found bool)

GetRequestQueueEntry returns a queue entry by its identity

func (Keeper) GetSignalQueueEntry added in v0.6.0

func (k Keeper) GetSignalQueueEntry(
	ctx sdk.Context,
	reqID string,
) (val commontypes.GetAggrKeyshare, found bool)

GetQueueEntry returns a queue entry by its identity

func (Keeper) IncreasePepNonce

func (k Keeper) IncreasePepNonce(
	ctx sdk.Context,
	address string,
) uint64

IncreasePepNonce increase specific pepNonce by 1 and returns the new nonce

func (Keeper) IsSourceChain added in v0.6.0

func (k Keeper) IsSourceChain(ctx sdk.Context) (res bool)

func (Keeper) KeyshareChannelID added in v0.4.0

func (k Keeper) KeyshareChannelID(ctx sdk.Context) (res string)

KeyshareChannelID returns the KeyshareChannelID param

func (Keeper) KeyshareReq added in v0.6.0

func (Keeper) KeyshareReqAll added in v0.6.0

func (Keeper) LatestHeight

LatestHeight returns the last registered height

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) MinGasPrice

func (k Keeper) MinGasPrice(ctx sdk.Context) (res sdk.Coin)

func (Keeper) OnAcknowledgementCurrentKeysPacket

func (k Keeper) OnAcknowledgementCurrentKeysPacket(ctx sdk.Context, packet channeltypes.Packet, data kstypes.CurrentKeysPacketData, ack channeltypes.Acknowledgement) error

OnAcknowledgementCurrentKeysPacket responds to the success or failure of a packet acknowledgement written on the receiving chain.

func (Keeper) OnAcknowledgementGetAggrKeysharePacket added in v0.6.0

func (k Keeper) OnAcknowledgementGetAggrKeysharePacket(ctx sdk.Context, packet channeltypes.Packet, data kstypes.GetAggrKeysharePacketData, ack channeltypes.Acknowledgement) error

OnAcknowledgementGetAggrKeysharePacket responds to the the success or failure of a packet acknowledgement written on the receiving chain.

func (Keeper) OnAcknowledgementRequestAggrKeysharePacket added in v0.6.0

func (k Keeper) OnAcknowledgementRequestAggrKeysharePacket(ctx sdk.Context, packet channeltypes.Packet, data kstypes.RequestAggrKeysharePacketData, ack channeltypes.Acknowledgement) error

OnAcknowledgementRequestAggrKeysharePacket responds to the the success or failure of a packet acknowledgement written on the receiving chain.

func (Keeper) OnRecvAggrKeyshareDataPacket added in v0.6.0

func (k Keeper) OnRecvAggrKeyshareDataPacket(ctx sdk.Context, packet channeltypes.Packet, data kstypes.AggrKeyshareDataPacketData) (packetAck kstypes.AggrKeyshareDataPacketAck, err error)

OnRecvAggrKeyshareDataPacket processes packet reception

func (Keeper) OnTimeoutCurrentKeysPacket

func (k Keeper) OnTimeoutCurrentKeysPacket(ctx sdk.Context, packet channeltypes.Packet, data kstypes.CurrentKeysPacketData) error

OnTimeoutCurrentKeysPacket responds to the case where a packet has not been transmitted because of a timeout

func (Keeper) Params

func (Keeper) PepNonce

PepNonce returns a single Nonce by address

func (Keeper) PepNonceAll

PepNonceAll returns the list of all Nonce

func (Keeper) PubKey

PubKey returns the lates public keys

func (Keeper) QueryFairyringCurrentKeys

func (k Keeper) QueryFairyringCurrentKeys(ctx sdk.Context) error

func (Keeper) RemoveAggregatedKeyShare

func (k Keeper) RemoveAggregatedKeyShare(
	ctx sdk.Context,
	height uint64,

)

RemoveAggregatedKeyShare removes a aggregatedKeyShare from the store

func (Keeper) RemoveAllEncryptedTxFromHeight

func (k Keeper) RemoveAllEncryptedTxFromHeight(
	ctx sdk.Context,
	targetHeight uint64,

)

RemoveAllEncryptedTxFromHeight removes all encryptedTx from the store for a particular height

func (Keeper) RemoveEncryptedTx

func (k Keeper) RemoveEncryptedTx(
	ctx sdk.Context,
	targetHeight uint64,
	index uint64,
)

RemoveEncryptedTx removes a encryptedTx from the store

func (Keeper) RemoveEntry added in v0.6.0

func (k Keeper) RemoveEntry(
	ctx sdk.Context,
	reqID string,
)

RemoveEntry removes an entry from the store

func (Keeper) RemoveExecutionQueueEntry added in v0.6.0

func (k Keeper) RemoveExecutionQueueEntry(
	ctx sdk.Context,
	reqID string,
)

RemoveQueueEntry removes an entry from the store

func (Keeper) RemovePepNonce

func (k Keeper) RemovePepNonce(
	ctx sdk.Context,
	address string,

)

RemovePepNonce removes a pepNonce from the store

func (Keeper) RemoveReqQueueEntry added in v0.6.0

func (k Keeper) RemoveReqQueueEntry(
	ctx sdk.Context,
	reqID string,
)

RemoveQueueEntry removes an entry from the store

func (Keeper) RemoveSignalQueueEntry added in v0.6.0

func (k Keeper) RemoveSignalQueueEntry(
	ctx sdk.Context,
	reqID string,
)

RemoveQueueEntry removes an entry from the store

func (Keeper) SetActivePubKey

func (k Keeper) SetActivePubKey(ctx sdk.Context, activePubKey commontypes.ActivePublicKey)

SetActivePubKey set a specific public key to active in the store

func (Keeper) SetAggregatedKeyShare

func (k Keeper) SetAggregatedKeyShare(ctx sdk.Context, aggregatedKeyShare types.AggregatedKeyShare)

SetAggregatedKeyShare set a specific aggregatedKeyShare in the store from its index

func (Keeper) SetAllEncryptedTxExpired added in v0.4.0

func (k Keeper) SetAllEncryptedTxExpired(
	ctx sdk.Context,
	height uint64,
)

func (Keeper) SetEncryptedTx

func (k Keeper) SetEncryptedTx(
	ctx sdk.Context,
	height uint64,
	encryptedTxArr types.EncryptedTxArray,
)

SetEncryptedTx add a specific encryptedTx in the store from its index

func (Keeper) SetEncryptedTxProcessedHeight added in v0.4.0

func (k Keeper) SetEncryptedTxProcessedHeight(
	ctx sdk.Context,
	height uint64,
	index uint64,
	processedHeight uint64,
)

func (Keeper) SetEntry added in v0.6.0

func (k Keeper) SetEntry(
	ctx sdk.Context,
	val types.GenEncTxExecutionQueue,
)

SetEntry sets a queue entry by its identity

func (Keeper) SetExecutionQueueEntry added in v0.6.0

func (k Keeper) SetExecutionQueueEntry(
	ctx sdk.Context,
	val types.GenEncTxExecutionQueue,
)

SetQueueEntry sets a queue entry by its identity

func (Keeper) SetLastExecutedHeight

func (k Keeper) SetLastExecutedHeight(
	ctx sdk.Context,
	height string,
)

SetLastExecutedHeight sets the last execution height

func (Keeper) SetLatestHeight

func (k Keeper) SetLatestHeight(
	ctx sdk.Context,
	height string,
)

SetLatestHeight sets the last registered fairyring Height

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

SetParams set the params

func (Keeper) SetPepNonce

func (k Keeper) SetPepNonce(ctx sdk.Context, pepNonce types.PepNonce)

SetPepNonce set a specific pepNonce in the store from its index

func (Keeper) SetQueuedPubKey

func (k Keeper) SetQueuedPubKey(ctx sdk.Context, queuedPubKey commontypes.QueuedPublicKey)

SetQueuedPubKey set a specific public key in the store

func (Keeper) SetReqQueueEntry added in v0.6.0

func (k Keeper) SetReqQueueEntry(
	ctx sdk.Context,
	val commontypes.RequestAggrKeyshare,
)

SetQueueEntry sets a queue entry by its identity

func (Keeper) SetRequestCount added in v0.6.0

func (k Keeper) SetRequestCount(ctx sdk.Context, requestNumber uint64)

SetRequestCount sets RequestCount

func (Keeper) SetSignalQueueEntry added in v0.6.0

func (k Keeper) SetSignalQueueEntry(
	ctx sdk.Context,
	val commontypes.GetAggrKeyshare,
)

SetQueueEntry sets a queue entry by its identity

func (Keeper) TransmitCurrentKeysPacket

func (k Keeper) TransmitCurrentKeysPacket(
	ctx sdk.Context,
	packetData kstypes.CurrentKeysPacketData,
	sourcePort,
	sourceChannel string,
	timeoutHeight clienttypes.Height,
	timeoutTimestamp uint64,
) error

TransmitCurrentKeysPacket transmits the packet over IBC with the specified source port and source channel

func (Keeper) TransmitGetAggrKeysharePacket added in v0.6.0

func (k Keeper) TransmitGetAggrKeysharePacket(
	ctx sdk.Context,
	packetData kstypes.GetAggrKeysharePacketData,
	sourcePort,
	sourceChannel string,
	timeoutHeight clienttypes.Height,
	timeoutTimestamp uint64,
) (uint64, error)

TransmitGetAggrKeysharePacket transmits the packet over IBC with the specified source port and source channel

func (Keeper) TransmitRequestAggrKeysharePacket added in v0.4.0

func (k Keeper) TransmitRequestAggrKeysharePacket(
	ctx sdk.Context,
	packetData kstypes.RequestAggrKeysharePacketData,
	sourcePort,
	sourceChannel string,
	timeoutHeight clienttypes.Height,
	timeoutTimestamp uint64,
) (uint64, error)

TransmitRequestAggrKeysharePacket transmits the packet over IBC with the specified source port and source channel

func (Keeper) TrustedAddresses

func (k Keeper) TrustedAddresses(ctx sdk.Context) (res []string)

TrustedAddresses returns the TrustedAddresses param

func (Keeper) TrustedCounterParties

func (k Keeper) TrustedCounterParties(ctx sdk.Context) (res []*types.TrustedCounterParty)

TrustedCounterParties returns the TrustedCounterParties param

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL