Documentation
¶
Index ¶
- func NewAuthorization(msgTypeURL string, data interface{}) (authz.Authorization, error)
- type TxClawBackVestingParams
- type TxCreateValidatorParams
- func (p TxCreateValidatorParams) CommissionRates() stakingTypes.CommissionRates
- func (p TxCreateValidatorParams) Desc() stakingTypes.Description
- func (p TxCreateValidatorParams) IsGrantExec() bool
- func (p TxCreateValidatorParams) IsValid() (bool, error)
- func (p TxCreateValidatorParams) MinSelfDelegation() sdk.Int
- func (p TxCreateValidatorParams) PubKey() cryptoTypes.PubKey
- func (p TxCreateValidatorParams) SelfDelegation() sdk.Coin
- func (p TxCreateValidatorParams) ValidatorAddress() sdk.ValAddress
- type TxCreateVestingParams
- func (p *TxCreateVestingParams) Funder() sdk.AccAddress
- func (p *TxCreateVestingParams) IsValid() (bool, error)
- func (p *TxCreateVestingParams) LockupPeriods() types.Periods
- func (p *TxCreateVestingParams) StartTime() time.Time
- func (p *TxCreateVestingParams) VestingAddress() sdk.AccAddress
- func (p *TxCreateVestingParams) VestingPeriods() types.Periods
- type TxDelegateParams
- type TxEditValidatorParams
- func (p TxEditValidatorParams) Desc() stakingTypes.Description
- func (p TxEditValidatorParams) IsGrantExec() bool
- func (p TxEditValidatorParams) IsValid() (bool, error)
- func (p TxEditValidatorParams) MinSelfDelegation() *sdk.Int
- func (p TxEditValidatorParams) NewRate() *sdk.Dec
- func (p TxEditValidatorParams) ValidatorAddress() sdk.ValAddress
- type TxGrantParams
- type TxParams
- type TxSendRequestParams
- type TxStakingGrantParams
- type TxWithdrawCommissionParams
- type TxWithdrawRewardParams
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 TxClawBackVestingParams ¶ added in v0.0.4
type TxClawBackVestingParams struct { TxParams `json:"TxParams"` // FunderAddr is the address of the funder. // // If not given, it will be retrieved from the private key. // // If FunderAddr != Operator => GrantExecMsg. FunderAddr string `json:"FunderAddr,omitempty"` // AccountAddr is the address of the vesting account to clawback. AccountAddr string `json:"AccountAddr"` // ToAddr is the address to which the remaining tokens will be transferred to. // If not given, ToAddr = FunderAddr. ToAddr string `json:"ToAddr,omitempty"` }
func (*TxClawBackVestingParams) Funder ¶ added in v0.0.4
func (p *TxClawBackVestingParams) Funder() sdk.AccAddress
func (*TxClawBackVestingParams) IsValid ¶ added in v0.0.4
func (p *TxClawBackVestingParams) IsValid() (bool, error)
func (*TxClawBackVestingParams) To ¶ added in v0.0.4
func (p *TxClawBackVestingParams) To() sdk.AccAddress
func (*TxClawBackVestingParams) VestingAddress ¶ added in v0.0.4
func (p *TxClawBackVestingParams) VestingAddress() sdk.AccAddress
type TxCreateValidatorParams ¶ added in v0.0.6
type TxCreateValidatorParams struct { TxParams stakingTypes.Description // ValAddress is the address of the validator to whom the DelAddress delegates tokens. ValAddress string // SelfDelegation is the amount (measured in aastra) for self delegation. (default: 0). SelfDelegationAmt *big.Int // MinSelfDelegationAmt is the minimum amount (measured in aastra) for self delegation. (default: 0). MinSelfDelegationAmt *big.Int // CommissionRate is the commission rate, minimum of 5% (default: 0.05). CommissionRate float64 // MaxCommissionRate is the maximum commission rate which validator can ever charge (default: 0.2). MaxCommissionRate float64 // MaxChangeCommissionRate is the maximum daily increase of the validator commission (default: 0.01). MaxChangeCommissionRate float64 }
func (TxCreateValidatorParams) CommissionRates ¶ added in v0.0.6
func (p TxCreateValidatorParams) CommissionRates() stakingTypes.CommissionRates
func (TxCreateValidatorParams) Desc ¶ added in v0.0.6
func (p TxCreateValidatorParams) Desc() stakingTypes.Description
func (TxCreateValidatorParams) IsGrantExec ¶ added in v0.0.6
func (p TxCreateValidatorParams) IsGrantExec() bool
func (TxCreateValidatorParams) IsValid ¶ added in v0.0.6
func (p TxCreateValidatorParams) IsValid() (bool, error)
func (TxCreateValidatorParams) MinSelfDelegation ¶ added in v0.0.6
func (p TxCreateValidatorParams) MinSelfDelegation() sdk.Int
func (TxCreateValidatorParams) PubKey ¶ added in v0.0.6
func (p TxCreateValidatorParams) PubKey() cryptoTypes.PubKey
func (TxCreateValidatorParams) SelfDelegation ¶ added in v0.0.6
func (p TxCreateValidatorParams) SelfDelegation() sdk.Coin
func (TxCreateValidatorParams) ValidatorAddress ¶ added in v0.0.6
func (p TxCreateValidatorParams) ValidatorAddress() sdk.ValAddress
type TxCreateVestingParams ¶ added in v0.0.4
type TxCreateVestingParams struct { TxParams `json:"TxParams"` // FunderAddr is the address of the funder. // // If empty, it will be retrieved from the private key. // // If FunderAddr != Operator => GrantExecMsg. FunderAddr string `json:"FunderAddr,omitempty"` // ToAddr is the vesting recipient. ToAddr string `json:"ToAddr"` // Start is the starting timestamp of the vesting. // If not given, startTime will be set to time.Now(). Start time.Time `json:"Start,omitempty"` // VestingDuration is the vesting duration (in terms of seconds). VestingDuration int64 `json:"VestingDuration,omitempty"` // Amount is the amount of aASA to delegate. Amount *big.Int `json:"Amount"` // Vesting is the periods to vest. Vesting types.Periods `json:"Vesting,omitempty"` // VestingLength is the number of periods to vest. // If used, each period will have the same amount to vest. // This is unused if Vesting is provided. VestingLength uint `json:"VestingLength,omitempty"` // Lockup is the periods to lock. Lockup types.Periods `json:"Lockup,omitempty"` }
func (*TxCreateVestingParams) Funder ¶ added in v0.0.4
func (p *TxCreateVestingParams) Funder() sdk.AccAddress
func (*TxCreateVestingParams) IsValid ¶ added in v0.0.4
func (p *TxCreateVestingParams) IsValid() (bool, error)
func (*TxCreateVestingParams) LockupPeriods ¶ added in v0.0.4
func (p *TxCreateVestingParams) LockupPeriods() types.Periods
func (*TxCreateVestingParams) StartTime ¶ added in v0.0.4
func (p *TxCreateVestingParams) StartTime() time.Time
func (*TxCreateVestingParams) VestingAddress ¶ added in v0.0.4
func (p *TxCreateVestingParams) VestingAddress() sdk.AccAddress
func (*TxCreateVestingParams) VestingPeriods ¶ added in v0.0.4
func (p *TxCreateVestingParams) VestingPeriods() types.Periods
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) IsGrantExec ¶ added in v0.0.6
func (p TxDelegateParams) IsGrantExec() bool
func (TxDelegateParams) IsValid ¶
func (p TxDelegateParams) IsValid() (bool, error)
func (TxDelegateParams) ValidatorAddress ¶
func (p TxDelegateParams) ValidatorAddress() sdk.ValAddress
type TxEditValidatorParams ¶ added in v0.0.6
type TxEditValidatorParams struct { TxParams stakingTypes.Description // ValAddress is the address of the validator to whom the DelAddress delegates tokens. ValAddress string // MinSelfDelegationAmt is the minimum amount (measured in aastra) for self delegation. (default: 0). MinSelfDelegationAmt *big.Int // NewCommissionRate is the commission rate. NewCommissionRate float64 }
func (TxEditValidatorParams) Desc ¶ added in v0.0.6
func (p TxEditValidatorParams) Desc() stakingTypes.Description
func (TxEditValidatorParams) IsGrantExec ¶ added in v0.0.6
func (p TxEditValidatorParams) IsGrantExec() bool
func (TxEditValidatorParams) IsValid ¶ added in v0.0.6
func (p TxEditValidatorParams) IsValid() (bool, error)
func (TxEditValidatorParams) MinSelfDelegation ¶ added in v0.0.6
func (p TxEditValidatorParams) MinSelfDelegation() *sdk.Int
func (TxEditValidatorParams) NewRate ¶ added in v0.0.6
func (p TxEditValidatorParams) NewRate() *sdk.Dec
func (TxEditValidatorParams) ValidatorAddress ¶ added in v0.0.6
func (p TxEditValidatorParams) 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 Memo 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) 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 (p TxSendRequestParams) From() sdk.AccAddress
func (TxSendRequestParams) IsValid ¶
func (p TxSendRequestParams) IsValid() (bool, error)
func (TxSendRequestParams) SendAmount ¶
func (p TxSendRequestParams) SendAmount() sdk.Coins
func (TxSendRequestParams) To ¶
func (p TxSendRequestParams) To() sdk.AccAddress
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 TxWithdrawCommissionParams ¶ added in v0.0.5
type TxWithdrawCommissionParams struct { TxParams // ValAddress is the address of the validator to whom the DelAddress delegates tokens. ValAddress string }
func (TxWithdrawCommissionParams) IsGrantExec ¶ added in v0.0.5
func (p TxWithdrawCommissionParams) IsGrantExec() bool
func (TxWithdrawCommissionParams) IsValid ¶ added in v0.0.5
func (p TxWithdrawCommissionParams) IsValid() (bool, error)
func (TxWithdrawCommissionParams) ValidatorAddress ¶ added in v0.0.5
func (p TxWithdrawCommissionParams) ValidatorAddress() sdk.ValAddress
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
Source Files
¶
Click to show internal directories.
Click to hide internal directories.