types

package
v2.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName = types.ModuleName
	RouterKey  = ModuleName

	TypeMsgUnlock = "unlock"
)
View Source
const (
	EventTypeUnlock = "unlock"
)

Variables

View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthVesting        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowVesting          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupVesting = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (

	// ModuleCdc references the global x/auth module codec. Note, the codec should
	// ONLY be used in certain instances of tests and for JSON encoding as Amino is
	// still used for that purpose.
	//
	// The actual codec used for serialization should be provided to x/auth and
	// defined at the application level.
	ModuleCdc = codec.NewAminoCodec(amino)
)

Functions

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

RegisterInterfaces registers the x/auth interfaces types with the interface registry

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers the necessary x/auth interfaces and concrete types on the provided LegacyAmino codec. These types are used for Amino JSON serialization.

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

Types

type AccountKeeper

type AccountKeeper interface {
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI
	SetAccount(ctx sdk.Context, acc types.AccountI)

	IterateAccounts(ctx sdk.Context, cb func(account types.AccountI) (stop bool))
}

type BankKeeper

type BankKeeper interface {
	SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
}

type CertKeeper

type CertKeeper interface {
	IsCertifier(ctx sdk.Context, addr sdk.AccAddress) bool
}

type ManualVestingAccount

type ManualVestingAccount struct {
	*types.BaseVestingAccount ``                                       /* 147-byte string literal not displayed */
	VestedCoins               github_com_cosmos_cosmos_sdk_types.Coins `` /* 158-byte string literal not displayed */
	Unlocker                  string                                   `protobuf:"bytes,3,opt,name=unlocker,proto3" json:"unlocker,omitempty" yaml:"unlocker"`
}

ManualVestingAccount implements the VestingAccount interface.

func NewManualVestingAccount

func NewManualVestingAccount(baseAcc *authtypes.BaseAccount, origVesting, vestedCoins sdk.Coins, unlocker sdk.AccAddress) *ManualVestingAccount

func NewManualVestingAccountRaw

func NewManualVestingAccountRaw(bva *vesttypes.BaseVestingAccount, vestedCoins sdk.Coins, unlocker sdk.AccAddress) *ManualVestingAccount

NewManualVestingAccountRaw creates a new ManualVestingAccount object from BaseVestingAccount.

func (*ManualVestingAccount) Descriptor

func (*ManualVestingAccount) Descriptor() ([]byte, []int)

func (ManualVestingAccount) GetStartTime

func (mva ManualVestingAccount) GetStartTime() int64

GetStartTime returns zero since a manual vesting account has no start time.

func (ManualVestingAccount) GetVestedCoins

func (mva ManualVestingAccount) GetVestedCoins(blockTime time.Time) sdk.Coins

Returns the total number of vested coins. If no coins are vested, nil is returned.

func (ManualVestingAccount) GetVestingCoins

func (mva ManualVestingAccount) GetVestingCoins(blockTime time.Time) sdk.Coins

Returns the total number of vesting coins. If no coins are vesting, nil is returned.

func (ManualVestingAccount) LockedCoins

func (mva ManualVestingAccount) LockedCoins(blockTime time.Time) sdk.Coins

LockedCoins returns the set of coins that are not spendable.

func (*ManualVestingAccount) Marshal

func (m *ManualVestingAccount) Marshal() (dAtA []byte, err error)

func (*ManualVestingAccount) MarshalTo

func (m *ManualVestingAccount) MarshalTo(dAtA []byte) (int, error)

func (*ManualVestingAccount) MarshalToSizedBuffer

func (m *ManualVestingAccount) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (ManualVestingAccount) MarshalYAML

func (mva ManualVestingAccount) MarshalYAML() (interface{}, error)

func (*ManualVestingAccount) ProtoMessage

func (*ManualVestingAccount) ProtoMessage()

func (*ManualVestingAccount) Reset

func (m *ManualVestingAccount) Reset()

func (*ManualVestingAccount) Size

func (m *ManualVestingAccount) Size() (n int)

func (ManualVestingAccount) String

func (mva ManualVestingAccount) String() string

func (*ManualVestingAccount) TrackDelegation

func (mva *ManualVestingAccount) TrackDelegation(blockTime time.Time, balance, amount sdk.Coins)

TrackDelegation tracks a desired delegation amount by setting the appropriate values for the amount of delegated vesting, delegated free, and reducing the overall amount of base coins.

func (*ManualVestingAccount) Unmarshal

func (m *ManualVestingAccount) Unmarshal(dAtA []byte) error

func (ManualVestingAccount) Validate

func (mva ManualVestingAccount) Validate() error

Validate checks for errors on the account fields.

func (*ManualVestingAccount) XXX_DiscardUnknown

func (m *ManualVestingAccount) XXX_DiscardUnknown()

func (*ManualVestingAccount) XXX_Marshal

func (m *ManualVestingAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ManualVestingAccount) XXX_Merge

func (m *ManualVestingAccount) XXX_Merge(src proto.Message)

func (*ManualVestingAccount) XXX_Size

func (m *ManualVestingAccount) XXX_Size() int

func (*ManualVestingAccount) XXX_Unmarshal

func (m *ManualVestingAccount) XXX_Unmarshal(b []byte) error

type MsgClient

type MsgClient interface {
	// Unlock defines a method for unlocking coins from a manual vesting
	// account.
	Unlock(ctx context.Context, in *MsgUnlock, opts ...grpc.CallOption) (*MsgUnlockResponse, error)
}

MsgClient is the client API for Msg service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgServer

type MsgServer interface {
	// Unlock defines a method for unlocking coins from a manual vesting
	// account.
	Unlock(context.Context, *MsgUnlock) (*MsgUnlockResponse, error)
}

MsgServer is the server API for Msg service.

type MsgUnlock

type MsgUnlock struct {
	Issuer       string                                   `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty" yaml:"issuer"`
	Account      string                                   `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty" yaml:"account_address"`
	UnlockAmount github_com_cosmos_cosmos_sdk_types.Coins `` /* 141-byte string literal not displayed */
}

MsgUnlock defines a message for unlocking coins from a manual vesting account.

func NewMsgUnlock

func NewMsgUnlock(issuer, account sdk.AccAddress, unlockAmount sdk.Coins) *MsgUnlock

NewMsgUnlock returns a MsgUnlock object.

func (*MsgUnlock) Descriptor

func (*MsgUnlock) Descriptor() ([]byte, []int)

func (MsgUnlock) GetSignBytes

func (m MsgUnlock) GetSignBytes() []byte

GetSignBytes encodes the message for signing.

func (MsgUnlock) GetSigners

func (m MsgUnlock) GetSigners() []sdk.AccAddress

GetSigners defines whose signature is required.

func (*MsgUnlock) Marshal

func (m *MsgUnlock) Marshal() (dAtA []byte, err error)

func (*MsgUnlock) MarshalTo

func (m *MsgUnlock) MarshalTo(dAtA []byte) (int, error)

func (*MsgUnlock) MarshalToSizedBuffer

func (m *MsgUnlock) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUnlock) ProtoMessage

func (*MsgUnlock) ProtoMessage()

func (*MsgUnlock) Reset

func (m *MsgUnlock) Reset()

func (MsgUnlock) Route

func (m MsgUnlock) Route() string

Route returns the name of the module.

func (*MsgUnlock) Size

func (m *MsgUnlock) Size() (n int)

func (*MsgUnlock) String

func (m *MsgUnlock) String() string

func (MsgUnlock) Type

func (m MsgUnlock) Type() string

Type returns a human-readable string for the message.

func (*MsgUnlock) Unmarshal

func (m *MsgUnlock) Unmarshal(dAtA []byte) error

func (MsgUnlock) ValidateBasic

func (m MsgUnlock) ValidateBasic() error

ValidateBasic runs stateless checks on the message.

func (*MsgUnlock) XXX_DiscardUnknown

func (m *MsgUnlock) XXX_DiscardUnknown()

func (*MsgUnlock) XXX_Marshal

func (m *MsgUnlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUnlock) XXX_Merge

func (m *MsgUnlock) XXX_Merge(src proto.Message)

func (*MsgUnlock) XXX_Size

func (m *MsgUnlock) XXX_Size() int

func (*MsgUnlock) XXX_Unmarshal

func (m *MsgUnlock) XXX_Unmarshal(b []byte) error

type MsgUnlockResponse

type MsgUnlockResponse struct {
}

MsgUnlockResponse defines the Msg/Unlock response type.

func (*MsgUnlockResponse) Descriptor

func (*MsgUnlockResponse) Descriptor() ([]byte, []int)

func (*MsgUnlockResponse) Marshal

func (m *MsgUnlockResponse) Marshal() (dAtA []byte, err error)

func (*MsgUnlockResponse) MarshalTo

func (m *MsgUnlockResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgUnlockResponse) MarshalToSizedBuffer

func (m *MsgUnlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUnlockResponse) ProtoMessage

func (*MsgUnlockResponse) ProtoMessage()

func (*MsgUnlockResponse) Reset

func (m *MsgUnlockResponse) Reset()

func (*MsgUnlockResponse) Size

func (m *MsgUnlockResponse) Size() (n int)

func (*MsgUnlockResponse) String

func (m *MsgUnlockResponse) String() string

func (*MsgUnlockResponse) Unmarshal

func (m *MsgUnlockResponse) Unmarshal(dAtA []byte) error

func (*MsgUnlockResponse) XXX_DiscardUnknown

func (m *MsgUnlockResponse) XXX_DiscardUnknown()

func (*MsgUnlockResponse) XXX_Marshal

func (m *MsgUnlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUnlockResponse) XXX_Merge

func (m *MsgUnlockResponse) XXX_Merge(src proto.Message)

func (*MsgUnlockResponse) XXX_Size

func (m *MsgUnlockResponse) XXX_Size() int

func (*MsgUnlockResponse) XXX_Unmarshal

func (m *MsgUnlockResponse) XXX_Unmarshal(b []byte) error

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) Unlock

Jump to

Keyboard shortcuts

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