Documentation ¶
Index ¶
- Constants
- func NewModuleAddress(name string) sdk.AccAddress
- func RegisterCodec(cdc *codec.Codec)
- func ValidateGenAccounts(genAccounts GenesisAccounts) error
- func ValidatePermissions(permissions ...string) error
- type Account
- type BaseAccount
- func (acc *BaseAccount) GetAccountNumber() uint64
- func (acc BaseAccount) GetAddress() sdk.AccAddress
- func (acc *BaseAccount) GetCoins() sdk.Coins
- func (acc BaseAccount) MarshalJSON() ([]byte, error)
- func (acc *BaseAccount) SetCoins(coins sdk.Coins) error
- func (acc *BaseAccount) UnmarshalJSON(bz []byte) error
- func (acc BaseAccount) Validate() error
- type BaseVestingAccount
- type ContinuousVestingAccount
- type DelayedVestingAccount
- type GenesisAccount
- type GenesisAccounts
- type GenesisState
- type ModuleAccount
Constants ¶
const (
ModuleName = "auth"
)
Variables ¶
This section is empty.
Functions ¶
func NewModuleAddress ¶
func NewModuleAddress(name string) sdk.AccAddress
func RegisterCodec ¶
func ValidateGenAccounts ¶
func ValidateGenAccounts(genAccounts GenesisAccounts) error
func ValidatePermissions ¶
Types ¶
type Account ¶
type Account interface { GetAddress() sdk.AccAddress GetAccountNumber() uint64 GetCoins() sdk.Coins SetCoins(sdk.Coins) error }
partial interface needed only for amino encoding and sanitization
type BaseAccount ¶
type BaseAccount struct { Address sdk.AccAddress `json:"address" yaml:"address"` Coins sdk.Coins `json:"coins,omitempty" yaml:"coins,omitempty"` PubKey crypto.PubKey `json:"public_key" yaml:"public_key"` AccountNumber uint64 `json:"account_number" yaml:"account_number"` Sequence uint64 `json:"sequence" yaml:"sequence"` }
func NewBaseAccount ¶
func NewBaseAccount( address sdk.AccAddress, coins sdk.Coins, pk crypto.PubKey, accountNumber, sequence uint64, ) *BaseAccount
func NewBaseAccountWithAddress ¶
func NewBaseAccountWithAddress(addr sdk.AccAddress) BaseAccount
func (*BaseAccount) GetAccountNumber ¶
func (acc *BaseAccount) GetAccountNumber() uint64
func (BaseAccount) GetAddress ¶
func (acc BaseAccount) GetAddress() sdk.AccAddress
func (*BaseAccount) GetCoins ¶
func (acc *BaseAccount) GetCoins() sdk.Coins
func (BaseAccount) MarshalJSON ¶
func (acc BaseAccount) MarshalJSON() ([]byte, error)
func (*BaseAccount) UnmarshalJSON ¶
func (acc *BaseAccount) UnmarshalJSON(bz []byte) error
UnmarshalJSON unmarshals raw JSON bytes into a BaseAccount.
func (BaseAccount) Validate ¶
func (acc BaseAccount) Validate() error
type BaseVestingAccount ¶
type BaseVestingAccount struct { *BaseAccount OriginalVesting sdk.Coins `json:"original_vesting"` DelegatedFree sdk.Coins `json:"delegated_free"` DelegatedVesting sdk.Coins `json:"delegated_vesting"` EndTime int64 `json:"end_time"` }
func NewBaseVestingAccount ¶
func NewBaseVestingAccount( baseAccount *BaseAccount, originalVesting, delegatedFree, delegatedVesting sdk.Coins, endTime int64, ) *BaseVestingAccount
func (BaseVestingAccount) MarshalJSON ¶
func (bva BaseVestingAccount) MarshalJSON() ([]byte, error)
MarshalJSON returns the JSON representation of a BaseVestingAccount.
func (*BaseVestingAccount) UnmarshalJSON ¶
func (bva *BaseVestingAccount) UnmarshalJSON(bz []byte) error
UnmarshalJSON unmarshals raw JSON bytes into a BaseVestingAccount.
func (BaseVestingAccount) Validate ¶
func (bva BaseVestingAccount) Validate() error
type ContinuousVestingAccount ¶
type ContinuousVestingAccount struct { *BaseVestingAccount StartTime int64 `json:"start_time"` }
func NewContinuousVestingAccountRaw ¶
func NewContinuousVestingAccountRaw(bva *BaseVestingAccount, startTime int64) *ContinuousVestingAccount
func (ContinuousVestingAccount) MarshalJSON ¶
func (cva ContinuousVestingAccount) MarshalJSON() ([]byte, error)
MarshalJSON returns the JSON representation of a ContinuousVestingAccount.
func (*ContinuousVestingAccount) UnmarshalJSON ¶
func (cva *ContinuousVestingAccount) UnmarshalJSON(bz []byte) error
UnmarshalJSON unmarshals raw JSON bytes into a ContinuousVestingAccount.
func (ContinuousVestingAccount) Validate ¶
func (cva ContinuousVestingAccount) Validate() error
type DelayedVestingAccount ¶
type DelayedVestingAccount struct {
*BaseVestingAccount
}
func NewDelayedVestingAccountRaw ¶
func NewDelayedVestingAccountRaw(bva *BaseVestingAccount) *DelayedVestingAccount
func (DelayedVestingAccount) MarshalJSON ¶
func (dva DelayedVestingAccount) MarshalJSON() ([]byte, error)
MarshalJSON returns the JSON representation of a DelayedVestingAccount.
func (*DelayedVestingAccount) UnmarshalJSON ¶
func (dva *DelayedVestingAccount) UnmarshalJSON(bz []byte) error
UnmarshalJSON unmarshals raw JSON bytes into a DelayedVestingAccount.
func (DelayedVestingAccount) Validate ¶
func (dva DelayedVestingAccount) Validate() error
type GenesisAccount ¶
type GenesisAccounts ¶
type GenesisAccounts []GenesisAccount
func SanitizeGenesisAccounts ¶
func SanitizeGenesisAccounts(genAccounts GenesisAccounts) GenesisAccounts
type GenesisState ¶
type GenesisState struct { Params v034auth.Params `json:"params" yaml:"params"` Accounts GenesisAccounts `json:"accounts" yaml:"accounts"` }
func Migrate ¶
func Migrate(authGenState v036auth.GenesisState, genAccountsGenState v036genaccounts.GenesisState) GenesisState
Migrate accepts exported genesis state from v0.34 and migrates it to v0.38 genesis state.
func NewGenesisState ¶
func NewGenesisState(params v034auth.Params, accounts GenesisAccounts) GenesisState
type ModuleAccount ¶
type ModuleAccount struct { *BaseAccount Name string `json:"name" yaml:"name"` Permissions []string `json:"permissions" yaml:"permissions"` }
func NewModuleAccount ¶
func NewModuleAccount(baseAccount *BaseAccount, name string, permissions ...string) *ModuleAccount
func (ModuleAccount) MarshalJSON ¶
func (ma ModuleAccount) MarshalJSON() ([]byte, error)
MarshalJSON returns the JSON representation of a ModuleAccount.
func (*ModuleAccount) UnmarshalJSON ¶
func (ma *ModuleAccount) UnmarshalJSON(bz []byte) error
UnmarshalJSON unmarshals raw JSON bytes into a ModuleAccount.
func (ModuleAccount) Validate ¶
func (ma ModuleAccount) Validate() error