Documentation ¶
Index ¶
- func BuildMsgCancelUndelegate(acc models.Account, valAddr string, options ...TxStakingOpt) *stakingtypes.MsgCancelUnbondingDelegation
- func BuildMsgCreateValidator(acc models.Account, options ...TxStakingOpt) *stakingtypes.MsgCreateValidator
- func BuildMsgDelegate(acc models.Account, valAddr string, options ...TxStakingOpt) *stakingtypes.MsgDelegate
- func BuildMsgEditValidator(acc models.Account, options ...TxStakingOpt) *stakingtypes.MsgEditValidator
- func BuildMsgSend(from, to string, amount int) *banktypes.MsgSend
- func BuildMsgUndelegate(acc models.Account, valAddr string, options ...TxStakingOpt) *stakingtypes.MsgUndelegate
- type StakingTransactionConfig
- type TxStakingOpt
- func WithCreationHeight(height int64) TxStakingOpt
- func WithDelegateAmount(amount int) TxStakingOpt
- func WithDescriptionIdentity(identity string) TxStakingOpt
- func WithDescriptionMoniker(moniker string) TxStakingOpt
- func WithDescriptionWebsite(website string) TxStakingOpt
- func WithSecurityContact(securityContact string) TxStakingOpt
- func WithStakeAmount(amount int) TxStakingOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildMsgCancelUndelegate ¶ added in v0.6.20
func BuildMsgCancelUndelegate(acc models.Account, valAddr string, options ...TxStakingOpt) *stakingtypes.MsgCancelUnbondingDelegation
The function builds a message to cancel an unbonding delegation for a given account and validator address with optional configuration parameters.
func BuildMsgCreateValidator ¶ added in v0.6.20
func BuildMsgCreateValidator(acc models.Account, options ...TxStakingOpt) *stakingtypes.MsgCreateValidator
This function builds and returns a staking message to create a validator with optional parameters.
func BuildMsgDelegate ¶ added in v0.6.20
func BuildMsgDelegate(acc models.Account, valAddr string, options ...TxStakingOpt) *stakingtypes.MsgDelegate
The function builds a message to delegate a certain amount to a validator for a given account.
func BuildMsgEditValidator ¶ added in v0.6.20
func BuildMsgEditValidator(acc models.Account, options ...TxStakingOpt) *stakingtypes.MsgEditValidator
This function builds and returns a staking message to edit a validator with optional parameters.
func BuildMsgSend ¶ added in v0.6.20
BuildMsgSend builds a message to send coins from one account to another.
func BuildMsgUndelegate ¶ added in v0.6.20
func BuildMsgUndelegate(acc models.Account, valAddr string, options ...TxStakingOpt) *stakingtypes.MsgUndelegate
The function builds a message to undelegate a certain amount from a validator for a given account.
Types ¶
type StakingTransactionConfig ¶ added in v0.6.20
type StakingTransactionConfig struct { Identity string Website string Moniker string SecurityContact string StakeAmount types.Coin DelegateAmount types.Coin CreationHeight int64 ValidatorAddr string }
StakingTransactionConfig is a struct that holds the configuration for a staking transaction.
func (*StakingTransactionConfig) GetCommission ¶ added in v0.6.20
func (stc *StakingTransactionConfig) GetCommission() stakingtypes.CommissionRates
GetCommission returns the commission from a staking transaction configuration.
func (*StakingTransactionConfig) GetMinSelfDelegation ¶ added in v0.6.20
func (stc *StakingTransactionConfig) GetMinSelfDelegation() types.Int
GetMinSelfDelegation returns the minimum self delegation from a staking transaction configuration.
func (*StakingTransactionConfig) GetStakingDescription ¶ added in v0.6.20
func (stc *StakingTransactionConfig) GetStakingDescription() stakingtypes.Description
GetStakingDescription returns a staking description from a staking transaction configuration.
type TxStakingOpt ¶ added in v0.6.20
type TxStakingOpt func(*StakingTransactionConfig)
! ||-------------------------------------------------------------------------------|| ! || Stake Config || ! ||-------------------------------------------------------------------------------|| TxStakingOpt is a function that sets optional parameters for a staking message.
func WithCreationHeight ¶ added in v0.6.20
func WithCreationHeight(height int64) TxStakingOpt
The function sets the creation height for a validator in a staking message.
func WithDelegateAmount ¶ added in v0.6.20
func WithDelegateAmount(amount int) TxStakingOpt
The function sets the delegate amount for a validator in a staking message.
func WithDescriptionIdentity ¶ added in v0.6.20
func WithDescriptionIdentity(identity string) TxStakingOpt
The function returns a CreateValidatorOpt that sets the identity of a staking message's description.
func WithDescriptionMoniker ¶ added in v0.6.20
func WithDescriptionMoniker(moniker string) TxStakingOpt
The function returns a CreateValidatorOpt that sets the moniker of a staking message's description.
func WithDescriptionWebsite ¶ added in v0.6.20
func WithDescriptionWebsite(website string) TxStakingOpt
The function sets the website field of a staking message's description.
func WithSecurityContact ¶ added in v0.6.20
func WithSecurityContact(securityContact string) TxStakingOpt
The function WithSecurityContact sets the security contact for a staking validator.
func WithStakeAmount ¶ added in v0.6.20
func WithStakeAmount(amount int) TxStakingOpt
The function sets the stake amount for a validator in a staking message.