Documentation
¶
Index ¶
- Variables
- func CreateCoinReturnEvents(username types.AccountKey, times int64, interval int64, coin types.Coin, ...) ([]types.Event, sdk.Error)
- func ErrAccountAlreadyExists(accKey types.AccountKey) sdk.Error
- func ErrAccountNotFound(username types.AccountKey) sdk.Error
- func ErrAccountSavingCoinNotEnough() sdk.Error
- func ErrAccountTPSCapacityNotEnough(accKey types.AccountKey) sdk.Error
- func ErrAddSavingCoin() sdk.Error
- func ErrAddSavingCoinWithFullStake() sdk.Error
- func ErrAppGrantKeyMismatch(owner types.AccountKey) sdk.Error
- func ErrCheckAuthenticatePubKeyOwner(accKey types.AccountKey) sdk.Error
- func ErrCheckGrantAppKey() sdk.Error
- func ErrCheckResetKey() sdk.Error
- func ErrCheckTransactionKey() sdk.Error
- func ErrCheckUserTPSCapacity(accKey types.AccountKey) sdk.Error
- func ErrFolloweeNotFound(username types.AccountKey) sdk.Error
- func ErrFollowerNotFound(username types.AccountKey) sdk.Error
- func ErrGetAppKey(accKey types.AccountKey) sdk.Error
- func ErrGetFrozenMoneyList(err error) sdk.Error
- func ErrGetLastReportOrUpvoteAt(err error) sdk.Error
- func ErrGetResetKey(accKey types.AccountKey) sdk.Error
- func ErrGetSavingFromBank(err error) sdk.Error
- func ErrGetSequence(err error) sdk.Error
- func ErrGetTransactionKey(accKey types.AccountKey) sdk.Error
- func ErrGrantKeyExpired(owner types.AccountKey) sdk.Error
- func ErrGrantKeyMismatch(owner types.AccountKey) sdk.Error
- func ErrGrantKeyNoLeftTimes(owner types.AccountKey) sdk.Error
- func ErrIncreaseSequenceByOne(err error) sdk.Error
- func ErrInvalidJSONMeta() sdk.Error
- func ErrInvalidMemo() sdk.Error
- func ErrInvalidUsername(msg string) sdk.Error
- func ErrPreAuthAmountInsufficient(owner types.AccountKey, balance, consume types.Coin) sdk.Error
- func ErrPreAuthGrantKeyMismatch(owner types.AccountKey) sdk.Error
- func ErrReceiverNotFound(username types.AccountKey) sdk.Error
- func ErrReferrerNotFound(username types.AccountKey) sdk.Error
- func ErrRegisterFeeInsufficient() sdk.Error
- func ErrRevokePermissionLevelMismatch(got, expect types.Permission) sdk.Error
- func ErrSenderNotFound(username types.AccountKey) sdk.Error
- func ErrUnsupportGrantLevel() sdk.Error
- func ErrUpdateLastReportOrUpvoteAt(err error) sdk.Error
- func InitGlobalManager(ctx sdk.Context, gm global.GlobalManager) error
- func NewHandler(am AccountManager, gm global.GlobalManager) sdk.Handler
- func RegisterWire(cdc *wire.Codec)
- type AccountManager
- func (accManager AccountManager) AddBalanceHistory(ctx sdk.Context, username types.AccountKey, numOfTx int64, ...) sdk.Error
- func (accManager AccountManager) AddDirectDeposit(ctx sdk.Context, username types.AccountKey, directDeposit types.Coin) sdk.Error
- func (accManager AccountManager) AddFrozenMoney(ctx sdk.Context, username types.AccountKey, amount types.Coin, ...) sdk.Error
- func (accManager AccountManager) AddIncomeAndReward(ctx sdk.Context, username types.AccountKey, ...) sdk.Error
- func (accManager AccountManager) AddRewardHistory(ctx sdk.Context, username types.AccountKey, numOfReward int64, ...) sdk.Error
- func (accManager AccountManager) AddSavingCoin(ctx sdk.Context, username types.AccountKey, coin types.Coin, ...) (err sdk.Error)
- func (accManager AccountManager) AddSavingCoinWithFullStake(ctx sdk.Context, username types.AccountKey, coin types.Coin, ...) (err sdk.Error)
- func (accManager AccountManager) AuthorizePermission(ctx sdk.Context, me types.AccountKey, authorizedUser types.AccountKey, ...) sdk.Error
- func (accManager AccountManager) CheckSigningPubKeyOwner(ctx sdk.Context, me types.AccountKey, signKey crypto.PubKey, ...) (types.AccountKey, sdk.Error)
- func (accManager AccountManager) CheckUserTPSCapacity(ctx sdk.Context, me types.AccountKey, tpsCapacityRatio sdk.Rat) sdk.Error
- func (accManager AccountManager) ClaimReward(ctx sdk.Context, username types.AccountKey) sdk.Error
- func (accManager AccountManager) ClearRewardHistory(ctx sdk.Context, username types.AccountKey) sdk.Error
- func (accManager AccountManager) CreateAccount(ctx sdk.Context, referrer types.AccountKey, username types.AccountKey, ...) sdk.Error
- func (accManager AccountManager) DoesAccountExist(ctx sdk.Context, username types.AccountKey) bool
- func (accManager AccountManager) GetAppKey(ctx sdk.Context, username types.AccountKey) (crypto.PubKey, sdk.Error)
- func (accManager AccountManager) GetDonationRelationship(ctx sdk.Context, me, other types.AccountKey) (int64, sdk.Error)
- func (accManager AccountManager) GetFrozenMoneyList(ctx sdk.Context, username types.AccountKey) ([]model.FrozenMoney, sdk.Error)
- func (accManager AccountManager) GetLastReportOrUpvoteAt(ctx sdk.Context, username types.AccountKey) (int64, sdk.Error)
- func (accManager AccountManager) GetRegisterFee(ctx sdk.Context) (types.Coin, sdk.Error)
- func (accManager AccountManager) GetResetKey(ctx sdk.Context, username types.AccountKey) (crypto.PubKey, sdk.Error)
- func (accManager AccountManager) GetSavingFromBank(ctx sdk.Context, username types.AccountKey) (types.Coin, sdk.Error)
- func (accManager AccountManager) GetSequence(ctx sdk.Context, username types.AccountKey) (int64, sdk.Error)
- func (accManager AccountManager) GetStake(ctx sdk.Context, username types.AccountKey) (types.Coin, sdk.Error)
- func (accManager AccountManager) GetTransactionKey(ctx sdk.Context, username types.AccountKey) (crypto.PubKey, sdk.Error)
- func (accManager AccountManager) IncreaseSequenceByOne(ctx sdk.Context, username types.AccountKey) sdk.Error
- func (accManager AccountManager) IsMyFollower(ctx sdk.Context, me types.AccountKey, follower types.AccountKey) bool
- func (accManager AccountManager) IsMyFollowing(ctx sdk.Context, me types.AccountKey, following types.AccountKey) bool
- func (accManager AccountManager) IterateAccounts(ctx sdk.Context, ...)
- func (accManager AccountManager) MinusSavingCoin(ctx sdk.Context, username types.AccountKey, coin types.Coin, ...) (err sdk.Error)
- func (accManager AccountManager) RecoverAccount(ctx sdk.Context, username types.AccountKey, ...) sdk.Error
- func (accManager AccountManager) RemoveFollower(ctx sdk.Context, me types.AccountKey, follower types.AccountKey) sdk.Error
- func (accManager AccountManager) RemoveFollowing(ctx sdk.Context, me types.AccountKey, following types.AccountKey) sdk.Error
- func (accManager AccountManager) RevokePermission(ctx sdk.Context, me types.AccountKey, pubKey crypto.PubKey) sdk.Error
- func (accManager AccountManager) SetFollower(ctx sdk.Context, me types.AccountKey, follower types.AccountKey) sdk.Error
- func (accManager AccountManager) SetFollowing(ctx sdk.Context, me types.AccountKey, following types.AccountKey) sdk.Error
- func (accManager AccountManager) UpdateDonationRelationship(ctx sdk.Context, me, other types.AccountKey) sdk.Error
- func (accManager AccountManager) UpdateJSONMeta(ctx sdk.Context, username types.AccountKey, JSONMeta string) sdk.Error
- func (accManager AccountManager) UpdateLastReportOrUpvoteAt(ctx sdk.Context, username types.AccountKey) sdk.Error
- type ClaimMsg
- func (msg ClaimMsg) GetConsumeAmount() types.Coin
- func (msg ClaimMsg) GetPermission() types.Permission
- func (msg ClaimMsg) GetSignBytes() []byte
- func (msg ClaimMsg) GetSigners() []sdk.AccAddress
- func (msg ClaimMsg) String() string
- func (msg ClaimMsg) Type() string
- func (msg ClaimMsg) ValidateBasic() sdk.Error
- type FollowMsg
- func (msg FollowMsg) GetConsumeAmount() types.Coin
- func (msg FollowMsg) GetPermission() types.Permission
- func (msg FollowMsg) GetSignBytes() []byte
- func (msg FollowMsg) GetSigners() []sdk.AccAddress
- func (msg FollowMsg) String() string
- func (msg FollowMsg) Type() string
- func (msg FollowMsg) ValidateBasic() sdk.Error
- type RecoverMsg
- func (msg RecoverMsg) GetConsumeAmount() types.Coin
- func (msg RecoverMsg) GetPermission() types.Permission
- func (msg RecoverMsg) GetSignBytes() []byte
- func (msg RecoverMsg) GetSigners() []sdk.AccAddress
- func (msg RecoverMsg) String() string
- func (msg RecoverMsg) Type() string
- func (msg RecoverMsg) ValidateBasic() sdk.Error
- type RegisterMsg
- func (msg RegisterMsg) GetConsumeAmount() types.Coin
- func (msg RegisterMsg) GetPermission() types.Permission
- func (msg RegisterMsg) GetSignBytes() []byte
- func (msg RegisterMsg) GetSigners() []sdk.AccAddress
- func (msg RegisterMsg) String() string
- func (msg RegisterMsg) Type() string
- func (msg RegisterMsg) ValidateBasic() sdk.Error
- type ReturnCoinEvent
- type TransferMsg
- func (msg TransferMsg) GetConsumeAmount() types.Coin
- func (msg TransferMsg) GetPermission() types.Permission
- func (msg TransferMsg) GetSignBytes() []byte
- func (msg TransferMsg) GetSigners() []sdk.AccAddress
- func (msg TransferMsg) String() string
- func (msg TransferMsg) Type() string
- func (msg TransferMsg) ValidateBasic() sdk.Error
- type UnfollowMsg
- func (msg UnfollowMsg) GetConsumeAmount() types.Coin
- func (msg UnfollowMsg) GetPermission() types.Permission
- func (msg UnfollowMsg) GetSignBytes() []byte
- func (msg UnfollowMsg) GetSigners() []sdk.AccAddress
- func (msg UnfollowMsg) String() string
- func (msg UnfollowMsg) Type() string
- func (msg UnfollowMsg) ValidateBasic() sdk.Error
- type UpdateAccountMsg
- func (msg UpdateAccountMsg) GetConsumeAmount() types.Coin
- func (msg UpdateAccountMsg) GetPermission() types.Permission
- func (msg UpdateAccountMsg) GetSignBytes() []byte
- func (msg UpdateAccountMsg) GetSigners() []sdk.AccAddress
- func (msg UpdateAccountMsg) String() string
- func (msg UpdateAccountMsg) Type() string
- func (msg UpdateAccountMsg) ValidateBasic() sdk.Error
Constants ¶
This section is empty.
Variables ¶
var ( TestAccountKVStoreKey = sdk.NewKVStoreKey("account") TestGlobalKVStoreKey = sdk.NewKVStoreKey("global") TestParamKVStoreKey = sdk.NewKVStoreKey("param") )
Functions ¶
func CreateCoinReturnEvents ¶
func CreateCoinReturnEvents( username types.AccountKey, times int64, interval int64, coin types.Coin, returnType types.TransferDetailType) ([]types.Event, sdk.Error)
create coin return events
func ErrAccountAlreadyExists ¶
func ErrAccountAlreadyExists(accKey types.AccountKey) sdk.Error
func ErrAccountNotFound ¶
func ErrAccountNotFound(username types.AccountKey) sdk.Error
func ErrAccountTPSCapacityNotEnough ¶
func ErrAccountTPSCapacityNotEnough(accKey types.AccountKey) sdk.Error
func ErrAddSavingCoin ¶
func ErrAppGrantKeyMismatch ¶
func ErrAppGrantKeyMismatch(owner types.AccountKey) sdk.Error
func ErrCheckAuthenticatePubKeyOwner ¶
func ErrCheckAuthenticatePubKeyOwner(accKey types.AccountKey) sdk.Error
func ErrCheckGrantAppKey ¶
func ErrCheckResetKey ¶
func ErrCheckTransactionKey ¶
func ErrCheckUserTPSCapacity ¶
func ErrCheckUserTPSCapacity(accKey types.AccountKey) sdk.Error
func ErrFolloweeNotFound ¶
func ErrFolloweeNotFound(username types.AccountKey) sdk.Error
func ErrFollowerNotFound ¶
func ErrFollowerNotFound(username types.AccountKey) sdk.Error
func ErrGetAppKey ¶
func ErrGetAppKey(accKey types.AccountKey) sdk.Error
func ErrGetFrozenMoneyList ¶
func ErrGetResetKey ¶
func ErrGetResetKey(accKey types.AccountKey) sdk.Error
func ErrGetSavingFromBank ¶
func ErrGetSequence ¶
func ErrGetTransactionKey ¶
func ErrGetTransactionKey(accKey types.AccountKey) sdk.Error
func ErrGrantKeyExpired ¶
func ErrGrantKeyExpired(owner types.AccountKey) sdk.Error
func ErrGrantKeyMismatch ¶
func ErrGrantKeyMismatch(owner types.AccountKey) sdk.Error
func ErrGrantKeyNoLeftTimes ¶
func ErrGrantKeyNoLeftTimes(owner types.AccountKey) sdk.Error
func ErrInvalidJSONMeta ¶
func ErrInvalidMemo ¶
func ErrInvalidUsername ¶
func ErrPreAuthGrantKeyMismatch ¶
func ErrPreAuthGrantKeyMismatch(owner types.AccountKey) sdk.Error
func ErrReceiverNotFound ¶
func ErrReceiverNotFound(username types.AccountKey) sdk.Error
func ErrReferrerNotFound ¶
func ErrReferrerNotFound(username types.AccountKey) sdk.Error
func ErrRevokePermissionLevelMismatch ¶
func ErrRevokePermissionLevelMismatch(got, expect types.Permission) sdk.Error
func ErrSenderNotFound ¶
func ErrSenderNotFound(username types.AccountKey) sdk.Error
func ErrUnsupportGrantLevel ¶
func InitGlobalManager ¶
func InitGlobalManager(ctx sdk.Context, gm global.GlobalManager) error
func NewHandler ¶
func NewHandler(am AccountManager, gm global.GlobalManager) sdk.Handler
Types ¶
type AccountManager ¶
type AccountManager struct {
// contains filtered or unexported fields
}
linoaccount encapsulates all basic struct
func NewAccountManager ¶
func NewAccountManager(key sdk.StoreKey, holder param.ParamHolder) AccountManager
NewLinoAccount return the account pointer
func (AccountManager) AddBalanceHistory ¶
func (accManager AccountManager) AddBalanceHistory( ctx sdk.Context, username types.AccountKey, numOfTx int64, transactionDetail model.Detail) sdk.Error
func (AccountManager) AddDirectDeposit ¶
func (accManager AccountManager) AddDirectDeposit( ctx sdk.Context, username types.AccountKey, directDeposit types.Coin) sdk.Error
When user received the donation, the donation except friction will be added to total income and original income
func (AccountManager) AddFrozenMoney ¶
func (accManager AccountManager) AddFrozenMoney( ctx sdk.Context, username types.AccountKey, amount types.Coin, start, interval, times int64) sdk.Error
func (AccountManager) AddIncomeAndReward ¶
func (accManager AccountManager) AddIncomeAndReward( ctx sdk.Context, username types.AccountKey, originalDonation, friction, actualReward types.Coin, consumer, postAuthor types.AccountKey, postID string) sdk.Error
After the evaluate of content value, the original friction will be added to original income and friciton income. The actual inflation will be added to inflation income, total income and unclaim reward
func (AccountManager) AddRewardHistory ¶
func (accManager AccountManager) AddRewardHistory( ctx sdk.Context, username types.AccountKey, numOfReward int64, rewardDetail model.RewardDetail) sdk.Error
func (AccountManager) AddSavingCoin ¶
func (accManager AccountManager) AddSavingCoin( ctx sdk.Context, username types.AccountKey, coin types.Coin, from types.AccountKey, memo string, detailType types.TransferDetailType) (err sdk.Error)
func (AccountManager) AddSavingCoinWithFullStake ¶
func (accManager AccountManager) AddSavingCoinWithFullStake( ctx sdk.Context, username types.AccountKey, coin types.Coin, from types.AccountKey, memo string, detailType types.TransferDetailType) (err sdk.Error)
func (AccountManager) AuthorizePermission ¶
func (accManager AccountManager) AuthorizePermission( ctx sdk.Context, me types.AccountKey, authorizedUser types.AccountKey, validityPeriod int64, grantLevel types.Permission, amount types.Coin) sdk.Error
func (AccountManager) CheckSigningPubKeyOwner ¶
func (accManager AccountManager) CheckSigningPubKeyOwner( ctx sdk.Context, me types.AccountKey, signKey crypto.PubKey, permission types.Permission, amount types.Coin) (types.AccountKey, sdk.Error)
func (AccountManager) CheckUserTPSCapacity ¶
func (accManager AccountManager) CheckUserTPSCapacity( ctx sdk.Context, me types.AccountKey, tpsCapacityRatio sdk.Rat) sdk.Error
func (AccountManager) ClaimReward ¶
func (accManager AccountManager) ClaimReward( ctx sdk.Context, username types.AccountKey) sdk.Error
func (AccountManager) ClearRewardHistory ¶
func (accManager AccountManager) ClearRewardHistory( ctx sdk.Context, username types.AccountKey) sdk.Error
func (AccountManager) CreateAccount ¶
func (accManager AccountManager) CreateAccount( ctx sdk.Context, referrer types.AccountKey, username types.AccountKey, resetKey, transactionKey, appKey crypto.PubKey, registerDeposit types.Coin) sdk.Error
create account, caller should make sure the register fee is valid
func (AccountManager) DoesAccountExist ¶
func (accManager AccountManager) DoesAccountExist(ctx sdk.Context, username types.AccountKey) bool
check if account exist
func (AccountManager) GetAppKey ¶
func (accManager AccountManager) GetAppKey( ctx sdk.Context, username types.AccountKey) (crypto.PubKey, sdk.Error)
func (AccountManager) GetDonationRelationship ¶
func (accManager AccountManager) GetDonationRelationship( ctx sdk.Context, me, other types.AccountKey) (int64, sdk.Error)
func (AccountManager) GetFrozenMoneyList ¶
func (accManager AccountManager) GetFrozenMoneyList( ctx sdk.Context, username types.AccountKey) ([]model.FrozenMoney, sdk.Error)
func (AccountManager) GetLastReportOrUpvoteAt ¶
func (accManager AccountManager) GetLastReportOrUpvoteAt( ctx sdk.Context, username types.AccountKey) (int64, sdk.Error)
check if account exist
func (AccountManager) GetRegisterFee ¶
get register fee
func (AccountManager) GetResetKey ¶
func (accManager AccountManager) GetResetKey( ctx sdk.Context, username types.AccountKey) (crypto.PubKey, sdk.Error)
func (AccountManager) GetSavingFromBank ¶
func (accManager AccountManager) GetSavingFromBank( ctx sdk.Context, username types.AccountKey) (types.Coin, sdk.Error)
func (AccountManager) GetSequence ¶
func (accManager AccountManager) GetSequence( ctx sdk.Context, username types.AccountKey) (int64, sdk.Error)
func (AccountManager) GetStake ¶
func (accManager AccountManager) GetStake( ctx sdk.Context, username types.AccountKey) (types.Coin, sdk.Error)
use coin to present stake to prevent overflow
func (AccountManager) GetTransactionKey ¶
func (accManager AccountManager) GetTransactionKey( ctx sdk.Context, username types.AccountKey) (crypto.PubKey, sdk.Error)
func (AccountManager) IncreaseSequenceByOne ¶
func (accManager AccountManager) IncreaseSequenceByOne( ctx sdk.Context, username types.AccountKey) sdk.Error
func (AccountManager) IsMyFollower ¶
func (accManager AccountManager) IsMyFollower( ctx sdk.Context, me types.AccountKey, follower types.AccountKey) bool
func (AccountManager) IsMyFollowing ¶
func (accManager AccountManager) IsMyFollowing( ctx sdk.Context, me types.AccountKey, following types.AccountKey) bool
func (AccountManager) IterateAccounts ¶
func (accManager AccountManager) IterateAccounts(ctx sdk.Context, process func(model.AccountInfo, model.AccountBank) (stop bool))
func (AccountManager) MinusSavingCoin ¶
func (accManager AccountManager) MinusSavingCoin( ctx sdk.Context, username types.AccountKey, coin types.Coin, to types.AccountKey, memo string, detailType types.TransferDetailType) (err sdk.Error)
func (AccountManager) RecoverAccount ¶
func (accManager AccountManager) RecoverAccount( ctx sdk.Context, username types.AccountKey, newResetPubKey, newTransactionPubKey, newAppPubKey crypto.PubKey) sdk.Error
func (AccountManager) RemoveFollower ¶
func (accManager AccountManager) RemoveFollower( ctx sdk.Context, me types.AccountKey, follower types.AccountKey) sdk.Error
func (AccountManager) RemoveFollowing ¶
func (accManager AccountManager) RemoveFollowing( ctx sdk.Context, me types.AccountKey, following types.AccountKey) sdk.Error
func (AccountManager) RevokePermission ¶
func (accManager AccountManager) RevokePermission( ctx sdk.Context, me types.AccountKey, pubKey crypto.PubKey) sdk.Error
func (AccountManager) SetFollower ¶
func (accManager AccountManager) SetFollower( ctx sdk.Context, me types.AccountKey, follower types.AccountKey) sdk.Error
func (AccountManager) SetFollowing ¶
func (accManager AccountManager) SetFollowing( ctx sdk.Context, me types.AccountKey, following types.AccountKey) sdk.Error
func (AccountManager) UpdateDonationRelationship ¶
func (accManager AccountManager) UpdateDonationRelationship( ctx sdk.Context, me, other types.AccountKey) sdk.Error
func (AccountManager) UpdateJSONMeta ¶
func (accManager AccountManager) UpdateJSONMeta( ctx sdk.Context, username types.AccountKey, JSONMeta string) sdk.Error
func (AccountManager) UpdateLastReportOrUpvoteAt ¶
func (accManager AccountManager) UpdateLastReportOrUpvoteAt( ctx sdk.Context, username types.AccountKey) sdk.Error
check if account exist
type ClaimMsg ¶
type ClaimMsg struct {
Username types.AccountKey `json:"username"`
}
func (ClaimMsg) GetConsumeAmount ¶
Implements Msg.
func (ClaimMsg) GetPermission ¶
func (msg ClaimMsg) GetPermission() types.Permission
func (ClaimMsg) GetSignBytes ¶
func (ClaimMsg) GetSigners ¶
func (msg ClaimMsg) GetSigners() []sdk.AccAddress
func (ClaimMsg) ValidateBasic ¶
type FollowMsg ¶
type FollowMsg struct { Follower types.AccountKey `json:"follower"` Followee types.AccountKey `json:"followee"` }
func NewFollowMsg ¶
Follow Msg Implementations
func (FollowMsg) GetConsumeAmount ¶
Implements Msg.
func (FollowMsg) GetPermission ¶
func (msg FollowMsg) GetPermission() types.Permission
Implements Msg.
func (FollowMsg) GetSignBytes ¶
func (FollowMsg) GetSigners ¶
func (msg FollowMsg) GetSigners() []sdk.AccAddress
func (FollowMsg) ValidateBasic ¶
type RecoverMsg ¶
type RecoverMsg struct { Username types.AccountKey `json:"username"` NewResetPubKey crypto.PubKey `json:"new_reset_public_key"` NewTransactionPubKey crypto.PubKey `json:"new_transaction_public_key"` NewAppPubKey crypto.PubKey `json:"new_app_public_key"` }
func NewRecoverMsg ¶
func NewRecoverMsg( username string, resetPubkey, transactionPubkey, appPubkey crypto.PubKey) RecoverMsg
Recover Msg Implementations
func (RecoverMsg) GetConsumeAmount ¶
func (msg RecoverMsg) GetConsumeAmount() types.Coin
Implements Msg.
func (RecoverMsg) GetPermission ¶
func (msg RecoverMsg) GetPermission() types.Permission
func (RecoverMsg) GetSignBytes ¶
func (msg RecoverMsg) GetSignBytes() []byte
func (RecoverMsg) GetSigners ¶
func (msg RecoverMsg) GetSigners() []sdk.AccAddress
func (RecoverMsg) String ¶
func (msg RecoverMsg) String() string
func (RecoverMsg) Type ¶
func (msg RecoverMsg) Type() string
func (RecoverMsg) ValidateBasic ¶
func (msg RecoverMsg) ValidateBasic() sdk.Error
type RegisterMsg ¶
type RegisterMsg struct { Referrer types.AccountKey `json:"referrer"` RegisterFee types.LNO `json:"register_fee"` NewUser types.AccountKey `json:"new_username"` NewResetPubKey crypto.PubKey `json:"new_reset_public_key"` NewTransactionPubKey crypto.PubKey `json:"new_transaction_public_key"` NewAppPubKey crypto.PubKey `json:"new_app_public_key"` }
RegisterMsg - bind username with public key, need to be referred by others (pay for it).
func NewRegisterMsg ¶
func NewRegisterMsg( referrer string, newUser string, registerFee types.LNO, resetPubkey, transactionPubkey, appPubkey crypto.PubKey) RegisterMsg
NewRegisterMsg - construct register msg.
func (RegisterMsg) GetConsumeAmount ¶
func (msg RegisterMsg) GetConsumeAmount() types.Coin
Implements Msg.
func (RegisterMsg) GetPermission ¶
func (msg RegisterMsg) GetPermission() types.Permission
func (RegisterMsg) GetSigners ¶
func (msg RegisterMsg) GetSigners() []sdk.AccAddress
Implements Msg.
func (RegisterMsg) String ¶
func (msg RegisterMsg) String() string
type ReturnCoinEvent ¶
type ReturnCoinEvent struct { Username types.AccountKey `json:"username"` Amount types.Coin `json:"amount"` ReturnType types.TransferDetailType `json:"return_type"` }
ReturnCoin Event return a certain amount of coin to an account
func (ReturnCoinEvent) Execute ¶
func (event ReturnCoinEvent) Execute(ctx sdk.Context, am AccountManager) sdk.Error
execute return coin event
type TransferMsg ¶
type TransferMsg struct { Sender types.AccountKey `json:"sender"` Receiver types.AccountKey `json:"receiver"` Amount types.LNO `json:"amount"` Memo string `json:"memo"` }
we can support to transfer to an user or an address
func NewTransferMsg ¶
func NewTransferMsg(sender, receiver string, amount types.LNO, memo string) TransferMsg
Transfer Msg Implementations
func (TransferMsg) GetConsumeAmount ¶
func (msg TransferMsg) GetConsumeAmount() types.Coin
Implements Msg.
func (TransferMsg) GetPermission ¶
func (msg TransferMsg) GetPermission() types.Permission
func (TransferMsg) GetSignBytes ¶
func (msg TransferMsg) GetSignBytes() []byte
func (TransferMsg) GetSigners ¶
func (msg TransferMsg) GetSigners() []sdk.AccAddress
func (TransferMsg) String ¶
func (msg TransferMsg) String() string
func (TransferMsg) Type ¶
func (msg TransferMsg) Type() string
func (TransferMsg) ValidateBasic ¶
func (msg TransferMsg) ValidateBasic() sdk.Error
type UnfollowMsg ¶
type UnfollowMsg struct { Follower types.AccountKey `json:"follower"` Followee types.AccountKey `json:"followee"` }
func NewUnfollowMsg ¶
func NewUnfollowMsg(follower string, followee string) UnfollowMsg
Unfollow Msg Implementations
func (UnfollowMsg) GetConsumeAmount ¶
func (msg UnfollowMsg) GetConsumeAmount() types.Coin
Implements Msg.
func (UnfollowMsg) GetPermission ¶
func (msg UnfollowMsg) GetPermission() types.Permission
Implements Msg.
func (UnfollowMsg) GetSignBytes ¶
func (msg UnfollowMsg) GetSignBytes() []byte
func (UnfollowMsg) GetSigners ¶
func (msg UnfollowMsg) GetSigners() []sdk.AccAddress
func (UnfollowMsg) String ¶
func (msg UnfollowMsg) String() string
func (UnfollowMsg) Type ¶
func (msg UnfollowMsg) Type() string
func (UnfollowMsg) ValidateBasic ¶
func (msg UnfollowMsg) ValidateBasic() sdk.Error
type UpdateAccountMsg ¶
type UpdateAccountMsg struct { Username types.AccountKey `json:"username"` JSONMeta string `json:"json_meta"` }
UpdateAccountMsg - update account JSON meta info.
func NewUpdateAccountMsg ¶
func NewUpdateAccountMsg(username string, JSONMeta string) UpdateAccountMsg
NewUpdateAccountMsg - construct user update msg to update user JSON meta info.
func (UpdateAccountMsg) GetConsumeAmount ¶
func (msg UpdateAccountMsg) GetConsumeAmount() types.Coin
Implements Msg.
func (UpdateAccountMsg) GetPermission ¶
func (msg UpdateAccountMsg) GetPermission() types.Permission
Implements Msg.
func (UpdateAccountMsg) GetSignBytes ¶
func (msg UpdateAccountMsg) GetSignBytes() []byte
Implements Msg.
func (UpdateAccountMsg) GetSigners ¶
func (msg UpdateAccountMsg) GetSigners() []sdk.AccAddress
Implements Msg.
func (UpdateAccountMsg) String ¶
func (msg UpdateAccountMsg) String() string
func (UpdateAccountMsg) ValidateBasic ¶
func (msg UpdateAccountMsg) ValidateBasic() sdk.Error
Implements Msg.