Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) ApplyStreamRecordChanges(ctx sdk.Context, streamRecordChanges []types.StreamRecordChange) error
- func (k Keeper) ApplyUserFlowsList(ctx sdk.Context, userFlowsList []types.UserFlows) (err error)
- func (k Keeper) AutoResume(ctx sdk.Context)
- func (k Keeper) AutoSettle(ctx sdk.Context)
- func (k Keeper) AutoSettleRecords(c context.Context, req *types.QueryAutoSettleRecordsRequest) (*types.QueryAutoSettleRecordsResponse, error)
- func (k Keeper) CheckStreamRecord(streamRecord *types.StreamRecord)
- func (k Keeper) DelayedWithdrawal(goCtx context.Context, req *types.QueryDelayedWithdrawalRequest) (*types.QueryDelayedWithdrawalResponse, error)
- func (k Keeper) DeleteOutFlow(ctx sdk.Context, key []byte)
- func (k Keeper) DerivePaymentAccountAddress(owner sdk.AccAddress, index uint64) sdk.AccAddress
- func (k Keeper) DynamicBalance(goCtx context.Context, req *types.QueryDynamicBalanceRequest) (*types.QueryDynamicBalanceResponse, error)
- func (k Keeper) ExistsAutoResumeRecord(ctx sdk.Context, timestamp int64, addr sdk.AccAddress) bool
- func (k Keeper) ForceSettle(ctx sdk.Context, streamRecord *types.StreamRecord) error
- func (k Keeper) GetAllAutoSettleRecord(ctx sdk.Context) (list []types.AutoSettleRecord)
- func (k Keeper) GetAllPaymentAccount(ctx sdk.Context) (list []types.PaymentAccount)
- func (k Keeper) GetAllPaymentAccountCount(ctx sdk.Context) (list []types.PaymentAccountCount)
- func (k Keeper) GetAllStreamRecord(ctx sdk.Context) (list []types.StreamRecord)
- func (k Keeper) GetAuthority() string
- func (k Keeper) GetAutoResumeRecord(ctx sdk.Context, timestamp int64, addr sdk.AccAddress) (*types.AutoResumeRecord, bool)
- func (k Keeper) GetDelayedWithdrawalRecord(ctx sdk.Context, addr sdk.AccAddress) (*types.DelayedWithdrawalRecord, bool)
- func (k Keeper) GetOutFlow(ctx sdk.Context, addr sdk.AccAddress, status types.OutFlowStatus, ...) *types.OutFlow
- func (k Keeper) GetOutFlows(ctx sdk.Context, addr sdk.AccAddress) []types.OutFlow
- func (k Keeper) GetParams(ctx sdk.Context) (p types.Params)
- func (k Keeper) GetPaymentAccount(ctx sdk.Context, addr sdk.AccAddress) (val *types.PaymentAccount, found bool)
- func (k Keeper) GetPaymentAccountCount(ctx sdk.Context, owner sdk.AccAddress) (val *types.PaymentAccountCount, found bool)
- func (k Keeper) GetStreamRecord(ctx sdk.Context, account sdk.AccAddress) (val *types.StreamRecord, found bool)
- func (k Keeper) GetVersionedParamsWithTs(ctx sdk.Context, ts int64) (verParams types.VersionedParams, err error)
- func (k Keeper) IsEmptyNetFlow(ctx sdk.Context, account sdk.AccAddress) bool
- func (k Keeper) IsPaymentAccount(ctx sdk.Context, addr sdk.AccAddress) bool
- func (k Keeper) IsPaymentAccountOwner(ctx sdk.Context, addr, owner sdk.AccAddress) bool
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MergeActiveOutFlows(ctx sdk.Context, addr sdk.AccAddress, outFlows []types.OutFlow) int
- func (k Keeper) MergeFrozenOutFlows(ctx sdk.Context, addr sdk.AccAddress, outFlows []types.OutFlow) int
- func (k Keeper) MergeOutFlows(flows []types.OutFlow) []types.OutFlow
- func (k Keeper) MergeStreamRecordChanges(changes []types.StreamRecordChange) []types.StreamRecordChange
- func (k Keeper) MergeUserFlows(userFlowsList []types.UserFlows) []types.UserFlows
- func (k Keeper) OutFlows(c context.Context, req *types.QueryOutFlowsRequest) (*types.QueryOutFlowsResponse, error)
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) ParamsByTimestamp(c context.Context, req *types.QueryParamsByTimestampRequest) (*types.QueryParamsByTimestampResponse, error)
- func (k Keeper) PaymentAccount(c context.Context, req *types.QueryPaymentAccountRequest) (*types.QueryPaymentAccountResponse, error)
- func (k Keeper) PaymentAccountCount(c context.Context, req *types.QueryPaymentAccountCountRequest) (*types.QueryPaymentAccountCountResponse, error)
- func (k Keeper) PaymentAccountCounts(c context.Context, req *types.QueryPaymentAccountCountsRequest) (*types.QueryPaymentAccountCountsResponse, error)
- func (k Keeper) PaymentAccounts(c context.Context, req *types.QueryPaymentAccountsRequest) (*types.QueryPaymentAccountsResponse, error)
- func (k Keeper) PaymentAccountsByOwner(goCtx context.Context, req *types.QueryPaymentAccountsByOwnerRequest) (*types.QueryPaymentAccountsByOwnerResponse, error)
- func (k Keeper) QueryDynamicBalance(ctx sdk.Context, addr sdk.AccAddress) (amount sdkmath.Int, err error)
- func (k Keeper) RemoveAutoResumeRecord(ctx sdk.Context, timestamp int64, addr sdk.AccAddress)
- func (k Keeper) RemoveAutoSettleRecord(ctx sdk.Context, timestamp int64, addr sdk.AccAddress)
- func (k Keeper) RemoveDelayedWithdrawalRecord(ctx sdk.Context, addr sdk.AccAddress)
- func (k Keeper) SetAutoResumeRecord(ctx sdk.Context, autoResumeRecord *types.AutoResumeRecord)
- func (k Keeper) SetAutoSettleRecord(ctx sdk.Context, autoSettleRecord *types.AutoSettleRecord)
- func (k Keeper) SetDelayedWithdrawalRecord(ctx sdk.Context, delayedWithdrawalRecord *types.DelayedWithdrawalRecord)
- func (k Keeper) SetOutFlow(ctx sdk.Context, addr sdk.AccAddress, outFlow *types.OutFlow)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error
- func (k Keeper) SetPaymentAccount(ctx sdk.Context, paymentAccount *types.PaymentAccount)
- func (k Keeper) SetPaymentAccountCount(ctx sdk.Context, paymentAccountCount *types.PaymentAccountCount)
- func (k Keeper) SetStreamRecord(ctx sdk.Context, streamRecord *types.StreamRecord)
- func (k Keeper) SetVersionedParamsWithTs(ctx sdk.Context, verParams types.VersionedParams) error
- func (k Keeper) StreamRecord(c context.Context, req *types.QueryGetStreamRecordRequest) (*types.QueryGetStreamRecordResponse, error)
- func (k Keeper) StreamRecords(c context.Context, req *types.QueryStreamRecordsRequest) (*types.QueryStreamRecordsResponse, error)
- func (k Keeper) TryResumeStreamRecord(ctx sdk.Context, streamRecord *types.StreamRecord, depositBalance sdkmath.Int) error
- func (k Keeper) UpdateAutoSettleRecord(ctx sdk.Context, addr sdk.AccAddress, oldTime, newTime int64)
- func (k Keeper) UpdateFrozenStreamRecord(ctx sdk.Context, streamRecord *types.StreamRecord, ...) error
- func (k Keeper) UpdateStreamRecord(ctx sdk.Context, streamRecord *types.StreamRecord, ...) error
- func (k Keeper) UpdateStreamRecordByAddr(ctx sdk.Context, change *types.StreamRecordChange) (ret *types.StreamRecord, err error)
- func (k Keeper) Withdraw(ctx sdk.Context, fromAddr, toAddr sdk.AccAddress, amount sdkmath.Int) error
- type Migrator
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.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey storetypes.StoreKey, bankKeeper types.BankKeeper, accountKeeper types.AccountKeeper, authority string, ) *Keeper
func (Keeper) ApplyStreamRecordChanges ¶
func (k Keeper) ApplyStreamRecordChanges(ctx sdk.Context, streamRecordChanges []types.StreamRecordChange) error
ApplyStreamRecordChanges assume StreamRecordChange is unique by Addr
func (Keeper) ApplyUserFlowsList ¶ added in v0.0.7
ApplyUserFlowsList
func (Keeper) AutoResume ¶ added in v0.2.3
func (Keeper) AutoSettle ¶
func (Keeper) AutoSettleRecords ¶ added in v0.2.4
func (k Keeper) AutoSettleRecords(c context.Context, req *types.QueryAutoSettleRecordsRequest) (*types.QueryAutoSettleRecordsResponse, error)
func (Keeper) CheckStreamRecord ¶ added in v0.0.7
func (k Keeper) CheckStreamRecord(streamRecord *types.StreamRecord)
func (Keeper) DelayedWithdrawal ¶ added in v0.2.5
func (k Keeper) DelayedWithdrawal(goCtx context.Context, req *types.QueryDelayedWithdrawalRequest) (*types.QueryDelayedWithdrawalResponse, error)
func (Keeper) DeleteOutFlow ¶ added in v0.2.3
DeleteOutFlow set a specific OutFlow from the store
func (Keeper) DerivePaymentAccountAddress ¶ added in v0.0.10
func (k Keeper) DerivePaymentAccountAddress(owner sdk.AccAddress, index uint64) sdk.AccAddress
func (Keeper) DynamicBalance ¶
func (k Keeper) DynamicBalance(goCtx context.Context, req *types.QueryDynamicBalanceRequest) (*types.QueryDynamicBalanceResponse, error)
func (Keeper) ExistsAutoResumeRecord ¶ added in v0.2.3
func (k Keeper) ExistsAutoResumeRecord( ctx sdk.Context, timestamp int64, addr sdk.AccAddress, ) bool
ExistsAutoResumeRecord checks whether there exists a autoResumeRecord
func (Keeper) ForceSettle ¶
func (Keeper) GetAllAutoSettleRecord ¶
func (k Keeper) GetAllAutoSettleRecord(ctx sdk.Context) (list []types.AutoSettleRecord)
GetAllAutoSettleRecord returns all autoSettleRecord
func (Keeper) GetAllPaymentAccount ¶
func (k Keeper) GetAllPaymentAccount(ctx sdk.Context) (list []types.PaymentAccount)
GetAllPaymentAccount returns all paymentAccount
func (Keeper) GetAllPaymentAccountCount ¶
func (k Keeper) GetAllPaymentAccountCount(ctx sdk.Context) (list []types.PaymentAccountCount)
GetAllPaymentAccountCount returns all paymentAccountCount
func (Keeper) GetAllStreamRecord ¶
func (k Keeper) GetAllStreamRecord(ctx sdk.Context) (list []types.StreamRecord)
GetAllStreamRecord returns all streamRecord
func (Keeper) GetAuthority ¶ added in v0.2.0
func (Keeper) GetAutoResumeRecord ¶ added in v0.2.3
func (k Keeper) GetAutoResumeRecord( ctx sdk.Context, timestamp int64, addr sdk.AccAddress, ) (*types.AutoResumeRecord, bool)
GetAutoResumeRecord returns a autoResumeRecord from its index
func (Keeper) GetDelayedWithdrawalRecord ¶ added in v0.2.5
func (k Keeper) GetDelayedWithdrawalRecord( ctx sdk.Context, addr sdk.AccAddress, ) (*types.DelayedWithdrawalRecord, bool)
GetDelayedWithdrawalRecord returns a delayedWithdrawal from its index
func (Keeper) GetOutFlow ¶ added in v0.2.3
func (k Keeper) GetOutFlow(ctx sdk.Context, addr sdk.AccAddress, status types.OutFlowStatus, toAddr sdk.AccAddress) *types.OutFlow
GetOutFlow get a specific OutFlow in the store from its index
func (Keeper) GetOutFlows ¶ added in v0.2.3
GetOutFlows get OutFlows for a specific from address
func (Keeper) GetPaymentAccount ¶
func (k Keeper) GetPaymentAccount( ctx sdk.Context, addr sdk.AccAddress, ) (val *types.PaymentAccount, found bool)
GetPaymentAccount returns a paymentAccount from its index
func (Keeper) GetPaymentAccountCount ¶
func (k Keeper) GetPaymentAccountCount( ctx sdk.Context, owner sdk.AccAddress, ) (val *types.PaymentAccountCount, found bool)
GetPaymentAccountCount returns a paymentAccountCount from its index
func (Keeper) GetStreamRecord ¶
func (k Keeper) GetStreamRecord( ctx sdk.Context, account sdk.AccAddress, ) (val *types.StreamRecord, found bool)
GetStreamRecord returns a streamRecord from its index
func (Keeper) GetVersionedParamsWithTs ¶ added in v0.2.3
func (k Keeper) GetVersionedParamsWithTs(ctx sdk.Context, ts int64) (verParams types.VersionedParams, err error)
GetVersionedParamsWithTs find the latest params before and equal than the specific timestamp
func (Keeper) IsEmptyNetFlow ¶ added in v0.2.3
func (Keeper) IsPaymentAccount ¶ added in v0.2.5
IsPaymentAccount returns is the account address a payment account
func (Keeper) IsPaymentAccountOwner ¶
func (Keeper) MergeActiveOutFlows ¶ added in v0.2.3
func (k Keeper) MergeActiveOutFlows(ctx sdk.Context, addr sdk.AccAddress, outFlows []types.OutFlow) int
MergeActiveOutFlows merge active OutFlows and save them in the store
func (Keeper) MergeFrozenOutFlows ¶ added in v0.2.3
func (k Keeper) MergeFrozenOutFlows(ctx sdk.Context, addr sdk.AccAddress, outFlows []types.OutFlow) int
MergeFrozenOutFlows merge frozen OutFlows and save them in the store
func (Keeper) MergeOutFlows ¶ added in v0.0.7
MergeOutFlows merge flows with same address
func (Keeper) MergeStreamRecordChanges ¶
func (k Keeper) MergeStreamRecordChanges(changes []types.StreamRecordChange) []types.StreamRecordChange
MergeStreamRecordChanges merge changes with same address
func (Keeper) MergeUserFlows ¶ added in v0.0.7
MergeUserFlows merge flows with same From address
func (Keeper) OutFlows ¶ added in v0.2.3
func (k Keeper) OutFlows(c context.Context, req *types.QueryOutFlowsRequest) (*types.QueryOutFlowsResponse, error)
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) ParamsByTimestamp ¶ added in v0.2.3
func (k Keeper) ParamsByTimestamp(c context.Context, req *types.QueryParamsByTimestampRequest) (*types.QueryParamsByTimestampResponse, error)
func (Keeper) PaymentAccount ¶
func (k Keeper) PaymentAccount(c context.Context, req *types.QueryPaymentAccountRequest) (*types.QueryPaymentAccountResponse, error)
func (Keeper) PaymentAccountCount ¶
func (k Keeper) PaymentAccountCount(c context.Context, req *types.QueryPaymentAccountCountRequest) (*types.QueryPaymentAccountCountResponse, error)
func (Keeper) PaymentAccountCounts ¶ added in v0.2.4
func (k Keeper) PaymentAccountCounts(c context.Context, req *types.QueryPaymentAccountCountsRequest) (*types.QueryPaymentAccountCountsResponse, error)
func (Keeper) PaymentAccounts ¶ added in v0.2.4
func (k Keeper) PaymentAccounts(c context.Context, req *types.QueryPaymentAccountsRequest) (*types.QueryPaymentAccountsResponse, error)
func (Keeper) PaymentAccountsByOwner ¶ added in v0.2.4
func (k Keeper) PaymentAccountsByOwner(goCtx context.Context, req *types.QueryPaymentAccountsByOwnerRequest) (*types.QueryPaymentAccountsByOwnerResponse, error)
func (Keeper) QueryDynamicBalance ¶ added in v0.0.10
func (Keeper) RemoveAutoResumeRecord ¶ added in v0.2.3
RemoveAutoResumeRecord removes a autoResumeRecord from the store
func (Keeper) RemoveAutoSettleRecord ¶
RemoveAutoSettleRecord removes a autoSettleRecord from the store
func (Keeper) RemoveDelayedWithdrawalRecord ¶ added in v0.2.5
func (k Keeper) RemoveDelayedWithdrawalRecord( ctx sdk.Context, addr sdk.AccAddress, )
RemoveDelayedWithdrawalRecord removes a delayedWithdrawal from the store
func (Keeper) SetAutoResumeRecord ¶ added in v0.2.3
func (k Keeper) SetAutoResumeRecord(ctx sdk.Context, autoResumeRecord *types.AutoResumeRecord)
SetAutoResumeRecord set a specific autoResumeRecord in the store from its index
func (Keeper) SetAutoSettleRecord ¶
func (k Keeper) SetAutoSettleRecord(ctx sdk.Context, autoSettleRecord *types.AutoSettleRecord)
SetAutoSettleRecord set a specific autoSettleRecord in the store from its index
func (Keeper) SetDelayedWithdrawalRecord ¶ added in v0.2.5
func (k Keeper) SetDelayedWithdrawalRecord(ctx sdk.Context, delayedWithdrawalRecord *types.DelayedWithdrawalRecord)
SetDelayedWithdrawalRecord set a specific delayedWithdrawal in the store from its index
func (Keeper) SetOutFlow ¶ added in v0.2.3
SetOutFlow set a specific OutFlow in the store from its index
func (Keeper) SetPaymentAccount ¶
func (k Keeper) SetPaymentAccount(ctx sdk.Context, paymentAccount *types.PaymentAccount)
SetPaymentAccount set a specific paymentAccount in the store from its index
func (Keeper) SetPaymentAccountCount ¶
func (k Keeper) SetPaymentAccountCount(ctx sdk.Context, paymentAccountCount *types.PaymentAccountCount)
SetPaymentAccountCount set a specific paymentAccountCount in the store from its index
func (Keeper) SetStreamRecord ¶
func (k Keeper) SetStreamRecord(ctx sdk.Context, streamRecord *types.StreamRecord)
SetStreamRecord set a specific streamRecord in the store from its index
func (Keeper) SetVersionedParamsWithTs ¶ added in v0.2.3
func (Keeper) StreamRecord ¶
func (k Keeper) StreamRecord(c context.Context, req *types.QueryGetStreamRecordRequest) (*types.QueryGetStreamRecordResponse, error)
func (Keeper) StreamRecords ¶ added in v0.2.4
func (k Keeper) StreamRecords(c context.Context, req *types.QueryStreamRecordsRequest) (*types.QueryStreamRecordsResponse, error)
func (Keeper) TryResumeStreamRecord ¶ added in v0.0.7
func (Keeper) UpdateAutoSettleRecord ¶
func (Keeper) UpdateFrozenStreamRecord ¶ added in v0.2.2
func (k Keeper) UpdateFrozenStreamRecord(ctx sdk.Context, streamRecord *types.StreamRecord, change *types.StreamRecordChange) error
UpdateFrozenStreamRecord updates frozen streamRecord in `force delete` scenarios it only handles the lock balance change and ignore the other changes(since the streams are already changed and the accumulated OutFlows are changed outside this function)
func (Keeper) UpdateStreamRecord ¶
func (k Keeper) UpdateStreamRecord(ctx sdk.Context, streamRecord *types.StreamRecord, change *types.StreamRecordChange) error
func (Keeper) UpdateStreamRecordByAddr ¶
func (k Keeper) UpdateStreamRecordByAddr(ctx sdk.Context, change *types.StreamRecordChange) (ret *types.StreamRecord, err error)
Source Files ¶
- auto_resume_record.go
- auto_settle_record.go
- delayed_withdrawal_record.go
- grpc_query.go
- grpc_query_auto_settle_record.go
- grpc_query_delayed_withdrawal.go
- grpc_query_dynamic_balance.go
- grpc_query_out_flow.go
- grpc_query_params.go
- grpc_query_params_by_timestamp.go
- grpc_query_payment_account.go
- grpc_query_payment_account_count.go
- grpc_query_payment_accounts_by_owner.go
- grpc_query_stream_record.go
- keeper.go
- migrations.go
- msg_server.go
- msg_server_create_payment_account.go
- msg_server_deposit.go
- msg_server_disable_refund.go
- msg_server_withdraw.go
- out_flow.go
- params.go
- payment_account.go
- payment_account_count.go
- storage_fee_charge.go
- stream_record.go