Documentation ¶
Index ¶
- func Collisions(slice1, slice2 []string) []string
- func Distinct[T comparable](slice ...T) []T
- func FromAnyPubKeyToConsensusAddress(protoAny *codectypes.Any, codec codec.Codec) (consAddr sdk.ConsAddress, success bool)
- func GetAddrHrpFromValoperHrp(valoper string) (addrHrp string, success bool)
- func GetValconsHrpFromValoperHrp(valoper string) (valconsHrp string, success bool)
- func IsValoperAddressFormat(address string) bool
- func NormalizeRpcEndpoint(endpoint string) string
- func RatioOfInt64(num, den int64) float64
- func ReplaceAnySchemeWithHttp(endpoint string) string
- func Retry[T any](f func() (T, error), retryOption ...RetryOption) (res T, err error)
- type RetryOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Collisions ¶ added in v1.1.1
func Distinct ¶ added in v1.1.0
func Distinct[T comparable](slice ...T) []T
func FromAnyPubKeyToConsensusAddress ¶
func FromAnyPubKeyToConsensusAddress(protoAny *codectypes.Any, codec codec.Codec) (consAddr sdk.ConsAddress, success bool)
func GetAddrHrpFromValoperHrp ¶ added in v1.5.0
GetAddrHrpFromValoperHrp predicts normal account address hrp from valoper hrp
func GetValconsHrpFromValoperHrp ¶
GetValconsHrpFromValoperHrp predicts valcons hrp from valoper hrp
func IsValoperAddressFormat ¶
func NormalizeRpcEndpoint ¶ added in v1.1.0
func RatioOfInt64 ¶
Types ¶
type RetryOption ¶
func DefaultRetryOption ¶
func DefaultRetryOption() RetryOption
func (RetryOption) MaxDuration ¶
func (m RetryOption) MaxDuration(maximumRetryDuration time.Duration) RetryOption
func (RetryOption) MinCount ¶
func (m RetryOption) MinCount(minRetryCount int) RetryOption
Source Files ¶
Click to show internal directories.
Click to hide internal directories.