Documentation ¶
Index ¶
- func AllInvariants(keeper Keeper) sdk.Invariant
- func ModuleAccountInvariant(k Keeper) sdk.Invariant
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func RegisterInvariants(ir sdk.InvariantRegistry, keeper Keeper)
- type Keeper
- func (k Keeper) AddDeposit(ctx sdk.Context, receiverAddr, senderAddr sdk.AccAddress, ...) (bool, error)
- func (q Keeper) AllStreamsForReceiver(c context.Context, req *types.QueryAllStreamsForReceiverRequest) (*types.QueryAllStreamsForReceiverResponse, error)
- func (q Keeper) AllStreamsForSender(c context.Context, req *types.QueryAllStreamsForSenderRequest) (*types.QueryAllStreamsForSenderResponse, error)
- func (k Keeper) CalculateFlowRate(ctx context.Context, request *types.QueryCalculateFlowRateRequest) (*types.QueryCalculateFlowRateResponse, error)
- func (k Keeper) CancelStreamBySenderReceiver(ctx sdk.Context, receiverAddr, senderAddr sdk.AccAddress) error
- func (k Keeper) Cdc() codec.BinaryCodec
- func (k Keeper) ClaimFromStream(ctx sdk.Context, receiverAddr, senderAddr sdk.AccAddress) (sdk.Coin, sdk.Coin, sdk.Coin, sdk.Coin, error)
- func (k Keeper) CreateNewStream(ctx sdk.Context, receiverAddr, senderAddr sdk.AccAddress, deposit sdk.Coin, ...) (types.Stream, error)
- func (k Keeper) DeleteStream(ctx sdk.Context, receiverAddr, senderAddr sdk.AccAddress)
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) GetAuthority() string
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetStream(ctx sdk.Context, receiverAddr, senderAddr sdk.AccAddress) (types.Stream, bool)
- func (k Keeper) GetStreamModuleAccount(ctx sdk.Context) authtypes.ModuleAccountI
- func (k Keeper) GetStreamModuleAccountBalances(ctx sdk.Context) sdk.Coins
- func (k Keeper) GetTotalDeposits(ctx sdk.Context) sdk.Coins
- func (k Keeper) InitGenesis(ctx sdk.Context, genState *types.GenesisState)
- func (k Keeper) IsStream(ctx sdk.Context, receiverAddr, senderAddr sdk.AccAddress) bool
- func (k Keeper) IterateAllStreams(ctx sdk.Context, cb func(sdk.AccAddress, sdk.AccAddress, types.Stream) bool)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) SetNewFlowRate(ctx sdk.Context, receiverAddr, senderAddr sdk.AccAddress, newFlowRate int64) error
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error
- func (k Keeper) SetStream(ctx sdk.Context, receiverAddr, senderAddr sdk.AccAddress, stream types.Stream) error
- func (q Keeper) StreamByReceiverSender(c context.Context, req *types.QueryStreamByReceiverSenderRequest) (*types.QueryStreamByReceiverSenderResponse, error)
- func (q Keeper) StreamReceiverSenderCurrentFlow(c context.Context, req *types.QueryStreamReceiverSenderCurrentFlowRequest) (*types.QueryStreamReceiverSenderCurrentFlowResponse, error)
- func (q Keeper) Streams(c context.Context, req *types.QueryStreamsRequest) (*types.QueryStreamsResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllInvariants ¶
AllInvariants runs all invariants of the stream module
func ModuleAccountInvariant ¶
ModuleAccountInvariant checks that the module account coins reflects the sum of total stream deposits held in the store
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
func RegisterInvariants ¶
func RegisterInvariants(ir sdk.InvariantRegistry, keeper Keeper)
RegisterInvariants registers all stream invariants
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( storeKey storetypes.StoreKey, bankKeeper types.BankKeeper, accKeeper types.AccountKeeper, cdc codec.BinaryCodec, feeCollectorName string, authority string, ) Keeper
func (Keeper) AddDeposit ¶
func (Keeper) AllStreamsForReceiver ¶
func (q Keeper) AllStreamsForReceiver(c context.Context, req *types.QueryAllStreamsForReceiverRequest) (*types.QueryAllStreamsForReceiverResponse, error)
func (Keeper) AllStreamsForSender ¶
func (q Keeper) AllStreamsForSender(c context.Context, req *types.QueryAllStreamsForSenderRequest) (*types.QueryAllStreamsForSenderResponse, error)
func (Keeper) CalculateFlowRate ¶
func (k Keeper) CalculateFlowRate(ctx context.Context, request *types.QueryCalculateFlowRateRequest) (*types.QueryCalculateFlowRateResponse, error)
func (Keeper) CancelStreamBySenderReceiver ¶
func (Keeper) Cdc ¶
func (k Keeper) Cdc() codec.BinaryCodec
func (Keeper) ClaimFromStream ¶
func (Keeper) CreateNewStream ¶
func (k Keeper) CreateNewStream(ctx sdk.Context, receiverAddr, senderAddr sdk.AccAddress, deposit sdk.Coin, flowRate int64) (types.Stream, error)
CreateNewStream creates a new "empty" stream for a sender/receiver pair. Deposit and Deposit Zero Time are handled by the AddDeposit function. The value passed in the deposit var is only used to determine the denomination of the deposit.
func (Keeper) DeleteStream ¶
func (k Keeper) DeleteStream(ctx sdk.Context, receiverAddr, senderAddr sdk.AccAddress)
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns the module's exported genesis
func (Keeper) GetAuthority ¶
GetAuthority returns the x/stream module's authority.
func (Keeper) GetStream ¶
func (k Keeper) GetStream(ctx sdk.Context, receiverAddr, senderAddr sdk.AccAddress) (types.Stream, bool)
GetStream Gets the stream data
func (Keeper) GetStreamModuleAccount ¶
func (k Keeper) GetStreamModuleAccount(ctx sdk.Context) authtypes.ModuleAccountI
GetStreamModuleAccount returns the stream ModuleAccount
func (Keeper) GetStreamModuleAccountBalances ¶
GetStreamModuleAccountBalances returns the stream ModuleAccount's balances from the bank keeper
func (Keeper) GetTotalDeposits ¶
GetTotalDeposits gets the total deposits - just a wrapper for getting the module account's balances from the bank
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, genState *types.GenesisState)
InitGenesis initializes the module's state from a provided genesis state.
func (Keeper) IterateAllStreams ¶
func (k Keeper) IterateAllStreams(ctx sdk.Context, cb func(sdk.AccAddress, sdk.AccAddress, types.Stream) bool)
IterateAllStreams iterates over all the Streams of all accounts that are provided to a callback. If true is returned from the callback, iteration is halted. Potentially expensive, and only intended for use during genesis export etc.
func (Keeper) Params ¶
func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) SetNewFlowRate ¶
func (Keeper) SetStream ¶
func (k Keeper) SetStream(ctx sdk.Context, receiverAddr, senderAddr sdk.AccAddress, stream types.Stream) error
SetStream Sets the stream
func (Keeper) StreamByReceiverSender ¶
func (q Keeper) StreamByReceiverSender(c context.Context, req *types.QueryStreamByReceiverSenderRequest) (*types.QueryStreamByReceiverSenderResponse, error)
func (Keeper) StreamReceiverSenderCurrentFlow ¶
func (q Keeper) StreamReceiverSenderCurrentFlow(c context.Context, req *types.QueryStreamReceiverSenderCurrentFlowRequest) (*types.QueryStreamReceiverSenderCurrentFlowResponse, error)
func (Keeper) Streams ¶
func (q Keeper) Streams(c context.Context, req *types.QueryStreamsRequest) (*types.QueryStreamsResponse, error)