keeper

package
v2.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 19 Imported by: 3

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 {
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey storetypes.StoreKey,
	accountKeeper types.AccountKeeper,
	bankKeeper types.BankKeeper,
	distributionKeeper types.DistributionKeeper,
	authority string,
) *Keeper

func (Keeper) ClaimStreamedAmount

func (k Keeper) ClaimStreamedAmount(ctx sdk.Context, streamId string, claimer sdk.AccAddress) error

func (Keeper) CreateModuleAccount

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

CreateModuleAccount creates a module account with minting and burning capabilities This account isn't intended to store any coins, it purely mints and burns them on behalf of the admin of respective denoms, and sends to the relevant address.

func (Keeper) CreateStreamPayment

func (k Keeper) CreateStreamPayment(ctx sdk.Context,
	sender,
	recipient sdk.AccAddress,
	amount sdk.Coin,
	streamType types.StreamType,
	duration time.Duration,
	periods []*types.Period,
	cancellable bool,
) (string, error)

func (Keeper) GetAllStreamPayments

func (k Keeper) GetAllStreamPayments(ctx sdk.Context) (streamPayments []types.StreamPayment)

GetAllStreamPayments returns all PaymentStreams

func (Keeper) GetAuthority

func (k Keeper) GetAuthority() string

GetAuthority returns the x/streampay module's authority.

func (Keeper) GetNextStreamPaymentNumber

func (k Keeper) GetNextStreamPaymentNumber(ctx sdk.Context) uint64

GetNextStreamPaymentNumber get next stream payment number

func (Keeper) GetParams

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

GetParams returns the total set of streampay parameters.

func (Keeper) GetPaymentStreamModuleAccount

func (k Keeper) GetPaymentStreamModuleAccount(ctx sdk.Context) authtypes.ModuleAccountI

GetPaymentStreamModuleAccount returns PaymentStream ModuleAccount

func (Keeper) GetStreamPayment

func (k Keeper) GetStreamPayment(ctx sdk.Context, id string) (val types.StreamPayment, found bool)

GetStreamPayment gets a specific StreamPayment in the store from its id

func (Keeper) GetStreamPaymentFeePercentage

func (k Keeper) GetStreamPaymentFeePercentage(ctx sdk.Context) sdk.Dec

GetStreamPaymentFeePercentage returns the current stream payment fee.

func (Keeper) IterateStreamPayments

func (k Keeper) IterateStreamPayments(ctx sdk.Context, fn func(index int64, streamPayment types.StreamPayment) (stop bool))

func (Keeper) Logger

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

func (Keeper) Params

func (Keeper) RemoveStreamPayment

func (k Keeper) RemoveStreamPayment(ctx sdk.Context, id string)

RemoveStreamPayment removes a stream-payment from the store

func (Keeper) SetNextStreamPaymentNumber

func (k Keeper) SetNextStreamPaymentNumber(ctx sdk.Context, count uint64)

SetNextStreamPaymentNumber sets next stream payment number

func (Keeper) SetParams

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

SetParams sets the streampay parameters to the param space.

func (Keeper) SetStreamPayment

func (k Keeper) SetStreamPayment(ctx sdk.Context, streamPayment types.StreamPayment)

SetStreamPayment set a specific StreamPayment in the store with its id

func (Keeper) StopStreamPayment

func (k Keeper) StopStreamPayment(ctx sdk.Context, streamId string, sender sdk.AccAddress) error

func (Keeper) StreamingPayment

StreamingPayment returns details of the stream payment

func (Keeper) TransferAmountFromModuleAccount

func (k Keeper) TransferAmountFromModuleAccount(ctx sdk.Context, to sdk.AccAddress, amount sdk.Coins) error

func (Keeper) TransferAmountToModuleAccount

func (k Keeper) TransferAmountToModuleAccount(ctx sdk.Context, fromAddress sdk.AccAddress, amount sdk.Coins) error

Jump to

Keyboard shortcuts

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