Documentation ¶
Index ¶
- Constants
- func ErrAccountAlreadyExists(accKey types.AccountKey) sdk.Error
- func ErrAccountBankNotFound(addr sdk.Address) 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 ErrAddSavingCoinWithFullCoinDay() sdk.Error
- func ErrAddressAlreadyTaken(addr string) sdk.Error
- func ErrAppGrantKeyMismatch(owner types.AccountKey) sdk.Error
- func ErrCheckAuthenticatePubKeyAddress(addr sdk.AccAddress) 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 ErrFrozenMoneyListTooLong() sdk.Error
- func ErrGetAddress(err error) sdk.Error
- func ErrGetAppKey(accKey types.AccountKey) sdk.Error
- func ErrGetFrozenMoneyList(err error) sdk.Error
- func ErrGetLastPostAt(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 ErrGetSigningKey(username types.AccountKey) sdk.Error
- func ErrGetTransactionKey(accKey types.AccountKey) sdk.Error
- func ErrGrantKeyExpired(owner types.AccountKey) sdk.Error
- func ErrGrantKeyMismatch(owner types.AccountKey) sdk.Error
- func ErrGrantPubKeyNotFound() sdk.Error
- func ErrIncreaseSequenceByOne(err error) sdk.Error
- func ErrInvalidJSONMeta() sdk.Error
- func ErrInvalidMemo() sdk.Error
- func ErrInvalidUsername(msg string) sdk.Error
- func ErrNegativeMoveAmount(amount types.Coin) sdk.Error
- func ErrPoolNotEnough(name types.PoolName) sdk.Error
- func ErrPoolNotFound(name types.PoolName) sdk.Error
- func ErrPreAuthAmountInsufficient(owner types.AccountKey, balance, consume types.Coin) sdk.Error
- func ErrPreAuthGrantKeyMismatch(owner types.AccountKey) sdk.Error
- func ErrQueryFailed() sdk.Error
- func ErrQueryTxFailed(msg string) 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 ErrUpdateLastPostAt(err error) sdk.Error
- func ErrUpdateLastReportOrUpvoteAt(err error) sdk.Error
- func RegisterWire(cdc *wire.Codec)
- type RecoverMsg
- func (msg RecoverMsg) GetAccOrAddrSigners() []types.AccOrAddr
- 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) Route() string
- func (msg RecoverMsg) String() string
- func (msg RecoverMsg) Type() string
- func (msg RecoverMsg) ValidateBasic() sdk.Error
- type RegisterV2Msg
- func (msg RegisterV2Msg) GetAccOrAddrSigners() []types.AccOrAddr
- func (msg RegisterV2Msg) GetSignBytes() []byte
- func (msg RegisterV2Msg) GetSigners() []sdk.AccAddress
- func (msg RegisterV2Msg) Route() string
- func (msg RegisterV2Msg) String() string
- func (msg RegisterV2Msg) Type() string
- func (msg RegisterV2Msg) ValidateBasic() sdk.Error
- 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) Route() string
- func (msg TransferMsg) String() string
- func (msg TransferMsg) Type() string
- func (msg TransferMsg) ValidateBasic() sdk.Error
- type TransferV2Msg
- func (msg TransferV2Msg) GetAccOrAddrSigners() []types.AccOrAddr
- func (msg TransferV2Msg) GetSignBytes() []byte
- func (msg TransferV2Msg) GetSigners() []sdk.AccAddress
- func (msg TransferV2Msg) Route() string
- func (msg TransferV2Msg) String() string
- func (msg TransferV2Msg) Type() string
- func (msg TransferV2Msg) 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) Route() string
- func (msg UpdateAccountMsg) String() string
- func (msg UpdateAccountMsg) Type() string
- func (msg UpdateAccountMsg) ValidateBasic() sdk.Error
Constants ¶
const ( // ModuleKey is the name of the module ModuleName = "account" // RouterKey is the message route for account RouterKey = ModuleName // QuerierRoute is the querier route for account QuerierRoute = ModuleName // query pathes QueryAccountInfo = "info" QueryAccountBank = "bank" QueryAccountBankByAddress = "bankByAddress" QueryAccountMeta = "meta" QueryAccountPendingCoinDay = "pendingCoinDay" QueryAccountGrantPubKeys = "grantPubKey" QueryAccountAllGrantPubKeys = "allGrantPubKey" QueryTxAndAccountSequence = "txAndSeq" QueryPool = "pool" QuerySupply = "supply" )
Variables ¶
This section is empty.
Functions ¶
func ErrAccountAlreadyExists ¶
func ErrAccountAlreadyExists(accKey types.AccountKey) sdk.Error
ErrAccountAlreadyExists - error when register user already exists
func ErrAccountBankNotFound ¶ added in v0.6.0
ErrAccountBankNotFound - error if account bank is not found
func ErrAccountNotFound ¶
func ErrAccountNotFound(username types.AccountKey) sdk.Error
ErrAccountNotFound - error when account is not found
func ErrAccountSavingCoinNotEnough ¶
ErrAccountSavingCoinNotEnough - error when user saving balance not enough
func ErrAccountTPSCapacityNotEnough ¶
func ErrAccountTPSCapacityNotEnough(accKey types.AccountKey) sdk.Error
ErrAccountTPSCapacityNotEnough - error when user tps capacity not enough
func ErrAddSavingCoin ¶
ErrAddSavingCoin - error when register add deposit failed
func ErrAddSavingCoinWithFullCoinDay ¶
ErrAddSavingCoinWithFullCoinDay - error when register deposit with full coin day failed
func ErrAddressAlreadyTaken ¶
ErrAddressAlreadyTaken - error when register address is already took by other username
func ErrAppGrantKeyMismatch ¶
func ErrAppGrantKeyMismatch(owner types.AccountKey) sdk.Error
ErrGrantKeyMismatch - error when transaction signed by mismatch app permission grant public key
func ErrCheckAuthenticatePubKeyAddress ¶ added in v0.4.0
func ErrCheckAuthenticatePubKeyAddress(addr sdk.AccAddress) sdk.Error
ErrCheckAuthenticatePubKeyAddress - error when transaction signed by invalid public key
func ErrCheckAuthenticatePubKeyOwner ¶
func ErrCheckAuthenticatePubKeyOwner(accKey types.AccountKey) sdk.Error
ErrCheckAuthenticatePubKeyOwner - error when transaction signed by invalid public key
func ErrCheckGrantAppKey ¶
ErrCheckGrantAppKey - error when transaction needs app key permission signed by other key
func ErrCheckResetKey ¶
ErrCheckResetKey - error when transaction needs reset permission signed by other key
func ErrCheckTransactionKey ¶
ErrCheckTransactionKey - error when transaction needs transaction key permission signed by other key
func ErrCheckUserTPSCapacity ¶
func ErrCheckUserTPSCapacity(accKey types.AccountKey) sdk.Error
ErrCheckUserTPSCapacity - error when check user capacity failed
func ErrFrozenMoneyListTooLong ¶
ErrFrozenMoneyListTooLong - error when the length of frozen money list exceeds the upper limit
func ErrGetAddress ¶
ErrGetAddress - error when get address failed
func ErrGetAppKey ¶
func ErrGetAppKey(accKey types.AccountKey) sdk.Error
ErrGetAppKey - error when get app public key failed
func ErrGetFrozenMoneyList ¶
ErrGetFrozenMoneyList - error when get frozen money list failed
func ErrGetLastPostAt ¶
ErrGetLastPostAt - error when get last post time failed
func ErrGetLastReportOrUpvoteAt ¶
ErrGetLastReportOrUpvoteAt - error when get last report or upvote time failed
func ErrGetResetKey ¶
func ErrGetResetKey(accKey types.AccountKey) sdk.Error
ErrGetResetKey - error when get reset public key failed
func ErrGetSavingFromBank ¶
ErrGetSavingFromBank - error when get saving failed
func ErrGetSequence ¶
ErrGetSequence - error when get sequence number failed
func ErrGetSigningKey ¶
func ErrGetSigningKey(username types.AccountKey) sdk.Error
ErrSigningKey - error when get signing public key failed
func ErrGetTransactionKey ¶
func ErrGetTransactionKey(accKey types.AccountKey) sdk.Error
ErrGetTransactionKey - error when get transaction public key failed
func ErrGrantKeyExpired ¶
func ErrGrantKeyExpired(owner types.AccountKey) sdk.Error
ErrGrantKeyExpired - error when transaction signed by expired grant public key
func ErrGrantKeyMismatch ¶
func ErrGrantKeyMismatch(owner types.AccountKey) sdk.Error
ErrGrantKeyMismatch - error when transaction signed by mismatch permission grant public key
func ErrGrantPubKeyNotFound ¶ added in v0.6.0
ErrGrantPubKeyNotFound - error if grant public key is not found
func ErrIncreaseSequenceByOne ¶
ErrIncreaseSequenceByOne - error when increase sequence number failed
func ErrInvalidJSONMeta ¶
ErrInvalidJSONMeta - error when JSON meta is invalid (length too long)
func ErrInvalidMemo ¶
ErrInvalidMemo - error when memo is invalid (length too long)
func ErrInvalidUsername ¶
ErrInvalidUsername - error when username is invalid
func ErrNegativeMoveAmount ¶ added in v0.6.0
ErrNegativeMoveAmount -
func ErrPoolNotEnough ¶ added in v0.6.0
ErrPoolNotEnough - error if pool balance is not enough.
func ErrPoolNotFound ¶ added in v0.6.0
ErrPoolNotFound - error if pool is not found
func ErrPreAuthAmountInsufficient ¶
ErrPreAuthAmountInsufficient - error when transaction cost coin exceeds preauth amount
func ErrPreAuthGrantKeyMismatch ¶
func ErrPreAuthGrantKeyMismatch(owner types.AccountKey) sdk.Error
ErrPreAuthGrantKeyMismatch - error when transaction signed by mismatch preauth permission grant public key
func ErrQueryFailed ¶
ErrQueryFailed - error when query account store failed
func ErrQueryTxFailed ¶
ErrQueryTxFaild - error when query tx failed
func ErrReceiverNotFound ¶
func ErrReceiverNotFound(username types.AccountKey) sdk.Error
ErrReceiverNotFound - error when receiver user is not found
func ErrReferrerNotFound ¶
func ErrReferrerNotFound(username types.AccountKey) sdk.Error
ErrReferrerNotFound - error when referrer is not found
func ErrRegisterFeeInsufficient ¶
ErrRegisterFeeInsufficient - error when register fee insufficient
func ErrRevokePermissionLevelMismatch ¶
func ErrRevokePermissionLevelMismatch(got, expect types.Permission) sdk.Error
ErrRevokePermissionLevelMismatch - error when revoke permission doesn't match target public key
func ErrSenderNotFound ¶
func ErrSenderNotFound(username types.AccountKey) sdk.Error
ErrSenderNotFound - error when sender user is not found
func ErrUnsupportGrantLevel ¶
ErrUnsupportGrantLevel - error when grant permission not supported
func ErrUpdateLastPostAt ¶
ErrUpdateLastPostAt - error when update last post time failed
func ErrUpdateLastReportOrUpvoteAt ¶
ErrGetLastReportOrUpvoteAt - error when update last report or upvote time failed
func RegisterWire ¶
RegisterWire - register concrete types on wire codec
Types ¶
type RecoverMsg ¶
type RecoverMsg struct { Username types.AccountKey `json:"username"` NewTxPubKey crypto.PubKey `json:"new_tx_public_key"` NewSigningPubKey crypto.PubKey `json:"new_signing_public_key"` }
RecoverMsg - replace two keys
func NewRecoverMsg ¶
func NewRecoverMsg( username string, transactionPubkey, signingPubkey crypto.PubKey) RecoverMsg
NewRecoverMsg - return a recover msg
func (RecoverMsg) GetAccOrAddrSigners ¶ added in v0.4.0
func (msg RecoverMsg) GetAccOrAddrSigners() []types.AccOrAddr
GetAccOrAddrSigners - implements types.AddrMsg
func (RecoverMsg) GetConsumeAmount ¶
func (msg RecoverMsg) GetConsumeAmount() types.Coin
GetConsumeAmount - implements types.Msg
func (RecoverMsg) GetPermission ¶
func (msg RecoverMsg) GetPermission() types.Permission
GetPermission - implements types.Msg
func (RecoverMsg) GetSignBytes ¶
func (msg RecoverMsg) GetSignBytes() []byte
GetSignBytes - implements sdk.Msg
func (RecoverMsg) GetSigners ¶
func (msg RecoverMsg) GetSigners() []sdk.AccAddress
GetSigners - implements sdk.Msg
func (RecoverMsg) String ¶
func (msg RecoverMsg) String() string
func (RecoverMsg) ValidateBasic ¶
func (msg RecoverMsg) ValidateBasic() sdk.Error
ValidateBasic - implements sdk.Msg
type RegisterV2Msg ¶ added in v0.4.0
type RegisterV2Msg struct { Referrer types.AccOrAddr `json:"referrer"` RegisterFee types.LNO `json:"register_fee"` NewUser types.AccountKey `json:"new_username"` NewTransactionPubKey crypto.PubKey `json:"new_transaction_public_key"` NewSigningPubKey crypto.PubKey `json:"new_signing_public_key"` }
RegisterV2Msg - bind username with public key, need to be referred by others (pay for it)
func NewRegisterV2Msg ¶ added in v0.4.0
func NewRegisterV2Msg( referrer types.AccOrAddr, newUser string, registerFee types.LNO, transactionPubkey, signingPubKey crypto.PubKey) RegisterV2Msg
NewRegisterV2Msg - construct register msg.
func (RegisterV2Msg) GetAccOrAddrSigners ¶ added in v0.4.0
func (msg RegisterV2Msg) GetAccOrAddrSigners() []types.AccOrAddr
GetAccOrAddrSigners - implements types.AddrMsg
func (RegisterV2Msg) GetSignBytes ¶ added in v0.4.0
func (msg RegisterV2Msg) GetSignBytes() []byte
GetSignBytes - implements sdk.Msg
func (RegisterV2Msg) GetSigners ¶ added in v0.4.0
func (msg RegisterV2Msg) GetSigners() []sdk.AccAddress
GetSigners - implements sdk.Msg
func (RegisterV2Msg) Route ¶ added in v0.4.0
func (msg RegisterV2Msg) Route() string
Route - implements sdk.Msg
func (RegisterV2Msg) String ¶ added in v0.4.0
func (msg RegisterV2Msg) String() string
func (RegisterV2Msg) Type ¶ added in v0.4.0
func (msg RegisterV2Msg) Type() string
Type - implements sdk.Msg
func (RegisterV2Msg) ValidateBasic ¶ added in v0.4.0
func (msg RegisterV2Msg) ValidateBasic() sdk.Error
ValidateBasic - implements sdk.Msg
type TransferMsg ¶
type TransferMsg struct { Sender types.AccountKey `json:"sender"` Receiver types.AccountKey `json:"receiver"` Amount types.LNO `json:"amount"` Memo string `json:"memo"` }
TransferMsg - sender transfer money to receiver
func NewTransferMsg ¶
func NewTransferMsg(sender, receiver string, amount types.LNO, memo string) TransferMsg
NewTransferMsg - return a TransferMsg
func (TransferMsg) GetConsumeAmount ¶
func (msg TransferMsg) GetConsumeAmount() types.Coin
GetConsumeAmount - implements types.Msg
func (TransferMsg) GetPermission ¶
func (msg TransferMsg) GetPermission() types.Permission
GetPermission - implements types.Msg
func (TransferMsg) GetSignBytes ¶
func (msg TransferMsg) GetSignBytes() []byte
GetSignBytes - implements sdk.Msg
func (TransferMsg) GetSigners ¶
func (msg TransferMsg) GetSigners() []sdk.AccAddress
GetSigners - implements sdk.Msg
func (TransferMsg) String ¶
func (msg TransferMsg) String() string
func (TransferMsg) ValidateBasic ¶
func (msg TransferMsg) ValidateBasic() sdk.Error
ValidateBasic - implements sdk.Msg
type TransferV2Msg ¶ added in v0.4.0
type TransferV2Msg struct { Sender types.AccOrAddr `json:"sender"` Receiver types.AccOrAddr `json:"receiver"` Amount types.LNO `json:"amount"` Memo string `json:"memo"` }
TransferV2Msg - support account/addr to account/addr
func NewTransferV2Msg ¶ added in v0.4.0
func NewTransferV2Msg(sender, receiver types.AccOrAddr, amount types.LNO, memo string) TransferV2Msg
NewTransferV2Msg - return a TransferV2Msg
func (TransferV2Msg) GetAccOrAddrSigners ¶ added in v0.4.0
func (msg TransferV2Msg) GetAccOrAddrSigners() []types.AccOrAddr
GetAccOrAddrSigners - implements types.AddrMsg
func (TransferV2Msg) GetSignBytes ¶ added in v0.4.0
func (msg TransferV2Msg) GetSignBytes() []byte
GetSignBytes - implements sdk.Msg
func (TransferV2Msg) GetSigners ¶ added in v0.4.0
func (msg TransferV2Msg) GetSigners() []sdk.AccAddress
GetSigners - implements sdk.Msg
func (TransferV2Msg) Route ¶ added in v0.4.0
func (msg TransferV2Msg) Route() string
Route - implements sdk.Msg
func (TransferV2Msg) String ¶ added in v0.4.0
func (msg TransferV2Msg) String() string
func (TransferV2Msg) Type ¶ added in v0.4.0
func (msg TransferV2Msg) Type() string
Type - implements sdk.Msg
func (TransferV2Msg) ValidateBasic ¶ added in v0.4.0
func (msg TransferV2Msg) ValidateBasic() sdk.Error
ValidateBasic - implements sdk.Msg
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
GetConsumeAmount - implements types.Msg
func (UpdateAccountMsg) GetPermission ¶
func (msg UpdateAccountMsg) GetPermission() types.Permission
GetPermission - implements types.Msg
func (UpdateAccountMsg) GetSignBytes ¶
func (msg UpdateAccountMsg) GetSignBytes() []byte
GetSignBytes - implements sdk.Msg
func (UpdateAccountMsg) GetSigners ¶
func (msg UpdateAccountMsg) GetSigners() []sdk.AccAddress
GetSigners - implements sdk.Msg
func (UpdateAccountMsg) Route ¶
func (msg UpdateAccountMsg) Route() string
Type - implements sdk.Msg
func (UpdateAccountMsg) String ¶
func (msg UpdateAccountMsg) String() string
func (UpdateAccountMsg) ValidateBasic ¶
func (msg UpdateAccountMsg) ValidateBasic() sdk.Error
ValidateBasic - implements sdk.Msg