v039

package
v1.0.1-0...-86249ee Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName = "auth"
)

Variables

This section is empty.

Functions

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

Types

type BaseAccount

type BaseAccount struct {
	Address       sdk.AccAddress     `json:"address" yaml:"address"`
	Coins         sdk.Coins          `json:"coins,omitempty" yaml:"coins,omitempty"`
	PubKey        cryptotypes.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 cryptotypes.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) SetCoins

func (acc *BaseAccount) SetCoins(coins sdk.Coins) error

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) GetEndTime

func (bva BaseVestingAccount) GetEndTime() int64

func (BaseVestingAccount) MarshalJSON

func (bva BaseVestingAccount) MarshalJSON() ([]byte, error)

func (*BaseVestingAccount) UnmarshalJSON

func (bva *BaseVestingAccount) UnmarshalJSON(bz []byte) error

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)

func (*ContinuousVestingAccount) UnmarshalJSON

func (cva *ContinuousVestingAccount) UnmarshalJSON(bz []byte) error

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)

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 GenesisState

type GenesisState struct {
	Params   v034auth.Params          `json:"params" yaml:"params"`
	Accounts v038auth.GenesisAccounts `json:"accounts" yaml:"accounts"`
}

func NewGenesisState

func NewGenesisState(params v034auth.Params, accounts v038auth.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

type Period

type Period struct {
	Length int64     `json:"length" yaml:"length"` // length of the period, in seconds
	Amount sdk.Coins `json:"amount" yaml:"amount"` // amount of coins vesting during this period
}

type PeriodicVestingAccount

type PeriodicVestingAccount struct {
	*BaseVestingAccount
	StartTime      int64   `json:"start_time" yaml:"start_time"`           // when the coins start to vest
	VestingPeriods Periods `json:"vesting_periods" yaml:"vesting_periods"` // the vesting schedule
}

func (PeriodicVestingAccount) GetStartTime

func (pva PeriodicVestingAccount) GetStartTime() int64

func (PeriodicVestingAccount) MarshalJSON

func (pva PeriodicVestingAccount) MarshalJSON() ([]byte, error)

func (*PeriodicVestingAccount) UnmarshalJSON

func (pva *PeriodicVestingAccount) UnmarshalJSON(bz []byte) error

UnmarshalJSON unmarshals raw JSON bytes into a PeriodicVestingAccount.

func (PeriodicVestingAccount) Validate

func (pva PeriodicVestingAccount) Validate() error

type Periods

type Periods []Period

Jump to

Keyboard shortcuts

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