msg_params

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuthorization

func NewAuthorization(msgTypeURL string, data interface{}) (authz.Authorization, error)

NewAuthorization creates a new authz.Authorization from the given data.

Types

type TxDelegateParams

type TxDelegateParams struct {
	TxParams

	// DelAddress is the address of the delegator.
	//
	// If empty, it will be retrieved from the private key.
	//
	// If DelAddress != Operator => GrantExecMsg.
	DelAddress string

	// ValAddress is the address of the validator to whom the DelAddress delegates tokens.
	ValAddress string

	// Amount is the amount of aASA to delegate.
	Amount *big.Int
}

func (TxDelegateParams) DelegateAmount

func (p TxDelegateParams) DelegateAmount() sdk.Coin

func (TxDelegateParams) DelegatorAddress

func (p TxDelegateParams) DelegatorAddress() sdk.AccAddress

func (TxDelegateParams) IsValid

func (p TxDelegateParams) IsValid() (bool, error)

func (TxDelegateParams) ValidatorAddress

func (p TxDelegateParams) ValidatorAddress() sdk.ValAddress

type TxGrantParams

type TxGrantParams struct {
	TxParams

	// Grantee is the address of the grantee to whom the Granter grants authorizations to.
	Grantee string

	// ExpiredTime is the time at which the grant is expired.
	ExpiredTime time.Time
}

func (TxGrantParams) Expiration

func (p TxGrantParams) Expiration() time.Time

func (TxGrantParams) GranteeAddress

func (p TxGrantParams) GranteeAddress() sdk.AccAddress

func (TxGrantParams) GranterAddress

func (p TxGrantParams) GranterAddress() sdk.AccAddress

func (TxGrantParams) IsValid

func (p TxGrantParams) IsValid() (bool, error)

type TxParams

type TxParams struct {
	PrivateKey    string
	GasLimit      uint64
	GasAdjustment float64
	GasPrice      string
}

func DefaultTxParams

func DefaultTxParams() TxParams

func NewTxParams

func NewTxParams(privateKeyStr string, gasLimit uint64, gasPrice string, gasAdjustment float64) (*TxParams, error)

NewTxParams creates a new TxParams from the given parameters.

func (TxParams) IsValid

func (p TxParams) IsValid() (bool, error)

func (TxParams) MustGetPrivateKey

func (p TxParams) MustGetPrivateKey() account.PrivateKey

func (TxParams) Operator

func (p TxParams) Operator() sdk.AccAddress

type TxSendRequestParams

type TxSendRequestParams struct {
	TxParams

	// FromAddr is the address of the sender (either in hex format or cosmos format).
	// If empty, it will be retrieved from the private key.
	//
	// If FromAddr != Operator => GrantExecMsg.
	FromAddr string

	// ToAddr is the address of the recipient (either in hex format or cosmos format).
	ToAddr string

	// Amount is the amount of aASA to send.
	Amount *big.Int
}

func (TxSendRequestParams) From

func (TxSendRequestParams) IsValid

func (p TxSendRequestParams) IsValid() (bool, error)

func (TxSendRequestParams) SendAmount

func (p TxSendRequestParams) SendAmount() sdk.Coins

func (TxSendRequestParams) To

type TxStakingGrantParams

type TxStakingGrantParams struct {
	TxGrantParams

	// AllowedList is a list of validator addresses that are allowed to interact with.
	AllowedList []string

	// DeniedList is a list of validator addresses that are NOT allowed to interact with.
	DeniedList []string

	// Amount is the amount
	Amount *sdk.Coin
}

func (TxStakingGrantParams) Allowed

func (p TxStakingGrantParams) Allowed() []sdk.ValAddress

func (TxStakingGrantParams) Denied

func (p TxStakingGrantParams) Denied() []sdk.ValAddress

func (TxStakingGrantParams) IsValid

func (p TxStakingGrantParams) IsValid() (bool, error)

type TxWithdrawRewardParams

type TxWithdrawRewardParams struct {
	TxParams

	// DelAddress is the address of the delegator.
	//
	// If empty, it will be retrieved from the private key.
	//
	// If DelAddress != Operator => GrantExecMsg.
	DelAddress string

	// ValAddress is the address of the validator to whom the DelAddress delegates tokens.
	ValAddress string
}

func (TxWithdrawRewardParams) DelegatorAddress

func (p TxWithdrawRewardParams) DelegatorAddress() sdk.AccAddress

func (TxWithdrawRewardParams) IsValid

func (p TxWithdrawRewardParams) IsValid() (bool, error)

func (TxWithdrawRewardParams) ValidatorAddress

func (p TxWithdrawRewardParams) ValidatorAddress() sdk.ValAddress

Jump to

Keyboard shortcuts

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