types

package
v0.0.0-...-4ce5391 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bech32ifyAddressBytes

func Bech32ifyAddressBytes(prefix string, address sdk.AccAddress) (string, error)

Bech32ifyAddressBytes returns a bech32 representation of address bytes. Returns an empty sting if the byte slice is 0-length. Returns an error if the bech32 conversion fails or the prefix is empty.

func GetAccAddressFromValAdderss

func GetAccAddressFromValAdderss(address, accountPrefix string) (string, error)

func GetTimeFromUNIXTimeStamp

func GetTimeFromUNIXTimeStamp(unix int) time.Time

func ValAddressFromBech32

func ValAddressFromBech32(address, prefix string) (valAddr sdk.ValAddress, err error)

ValAddressFromBech32 creates a ValAddress from a Bech32 string.

Types

type Account

type Account struct {
	Type               string             `json:"@type"`
	BaseVestingAccount BaseVestingAccount `json:"base_vesting_account"`
	StartTime          string             `json:"start_time"`
	VestingPeriods     []VestingPeriods   `json:"vesting_periods"`
}

func (Account) GetAddress

func (a Account) GetAddress() string

func (Account) GetEndTime

func (a Account) GetEndTime() (time.Time, error)

func (Account) GetEndTimeUNIX

func (a Account) GetEndTimeUNIX() (int, error)

func (Account) GetOriginalVesting

func (a Account) GetOriginalVesting() sdktypes.Coins

func (Account) GetStartTime

func (a Account) GetStartTime() (time.Time, error)

func (Account) GetStartTimeUNIX

func (a Account) GetStartTimeUNIX() (int, error)

func (Account) GetType

func (a Account) GetType() string

type AddressSharesInIncentiveContract

type AddressSharesInIncentiveContract struct {
	Shares            []string `json:"shares"`
	LastUpdatedHeight []int64  `json:"last_updated_height"`
}

type AppState

type AppState struct {
	Auth GenesisState `json:"auth"`
}

type BaseAccount

type BaseAccount struct {
	Address       string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	PubKey        string `protobuf:"bytes,2,opt,name=pub_key,json=pubKey,proto3" json:"public_key,omitempty" yaml:"public_key"`
	AccountNumber string `protobuf:"varint,3,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty" yaml:"account_number"`
	Sequence      string `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"`
}

type BaseVestingAccount

type BaseVestingAccount struct {
	BaseAccount      BaseAccount    `protobuf:"bytes,1,opt,name=base_account,json=baseAccount,proto3,embedded=base_account" json:"base_account,omitempty"`
	OriginalVesting  sdktypes.Coins `` /* 174-byte string literal not displayed */
	DelegatedFree    sdktypes.Coins `` /* 166-byte string literal not displayed */
	DelegatedVesting sdktypes.Coins `` /* 178-byte string literal not displayed */
	EndTime          string         `protobuf:"varint,5,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty" yaml:"end_time"`
}

type BeginUnlocking

type BeginUnlocking struct {
	Height          int64  `json:"height"`
	Step            string `json:"step"`
	ContractAddress string `json:"contract_address"`
	PendingMsg      string `json:"pending-msg"`
}

type CallBackInfo

type CallBackInfo struct {
	ContractAddress    string `json:"contract_address"`
	Action             string `json:"action"`
	CallBackInfoString string `json:"call_back_info"`
	ReplyMsgID         string `json:"reply_msg_id"`
	ReplyResult        string `json:"reply_result"`
}

type CallBackInfoWithHeight

type CallBackInfoWithHeight struct {
	Height        int64          `json:"height"`
	CallBackInfos []CallBackInfo `json:"callBackInfos"`
}

type ContinuousVestingAccount

type ContinuousVestingAccount struct {
	Address              string
	StartTime            time.Time
	EndTime              time.Time
	Tokens               sdktypes.Coins
	TokensFreeEveryBlock sdktypes.Int
	TokensFreeEveryDay   sdktypes.Int
}

type ContractDetails

type ContractDetails struct {
	Address                 string `json:"address"`
	LockID                  int64  `json:"lock_id"`
	LockedTokensProtoString string `json:"locked_tokens_proto_string"`
	Action                  string `json:"action"`
	CallbackInfo            string `json:"callback_info"`
	ReplyMessageID          string `json:"reply_message_id"`
	ReplyResult             string `json:"reply_result"`
}

type DelayedVestingAccount

type DelayedVestingAccount struct {
	Address string
	EndTime time.Time
	Tokens  sdktypes.Coins
}

type Delegator

type Delegator struct {
	DelegatorAddress string
	ValidatorAddress string
	Share            sdk.Dec
}

type Delegators

type Delegators []Delegator

func (Delegators) SortStable

func (d Delegators) SortStable()

type DepositorDetailsBond

type DepositorDetailsBond struct {
	Address      string `json:"address"`
	BlockHeight  int64  `json:"block_height"`
	Amount       string `json:"amount"`
	VaultAddress string `json:"primitive_address"`
	BondID       int64  `json:"bond_id"`
}

type DepositorDetailsUnbond

type DepositorDetailsUnbond struct {
	Address      string `json:"address"`
	BlockHeight  int64  `json:"block_height"`
	VaultAddress string `json:"primitive_address"`
	BurntShares  string `json:"burnt_shares"`
	UnbondID     int64  `json:"unbond_id"`
}

type DirRange

type DirRange []int64

func (DirRange) Len

func (a DirRange) Len() int

func (DirRange) Less

func (a DirRange) Less(i, j int) bool

func (DirRange) Swap

func (a DirRange) Swap(i, j int)

type Genesis

type Genesis struct {
	AppState AppState `json:"app_state"`
}

type GenesisState

type GenesisState struct {
	Params   Params    `json:"params"`
	Accounts []Account `json:"accounts,omitempty"`
}

type LockDetailsByHeight

type LockDetailsByHeight struct {
	Height          int64             `json:"height"`
	ContractDetails []ContractDetails `json:"contract_details"`
}

type Params

type Params struct {
	MaxMemoCharacters      string `json:"max_memo_characters"`
	TxSigLimit             string `json:"tx_sig_limit"`
	TxSizeCostPerByte      string `json:"tx_size_cost_per_byte"`
	SigVerifyCostED25519   string `json:"sig_verify_cost_ed25519"`
	SigVerifyCostSecp256k1 string `json:"sig_verify_cost_secp256k1"`
}

type PeriodicVestingAccount

type PeriodicVestingAccount struct {
	Address   string
	StartTime time.Time
	EndTime   time.Time
	Tokens    sdktypes.Coins
}

type PermanentLockedAccount

type PermanentLockedAccount struct {
	Address string
	Tokens  sdktypes.Coins
}

type Test

type Test struct {
	Address           string   `json:"address"`
	Shares            []string `json:"shares"`
	LastUpdatedHeight []int64  `json:"last_updated_height"`
}

type ToBeMintedBondsAtHeight

type ToBeMintedBondsAtHeight struct {
	Height               int64                  `json:"height"`
	DepositorDetailsBond []DepositorDetailsBond `json:"depositor_details_bond"`
}

type Validators

type Validators []stakingtypes.Validator

func ConvertToInternalValidators

func ConvertToInternalValidators(validatorList stakingtypes.Validators) Validators

func (Validators) GetAccountAddressesList

func (v Validators) GetAccountAddressesList() ([]string, error)

func (Validators) GetListOfDecPercentage

func (v Validators) GetListOfDecPercentage(totalShares sdk.Dec) []sdk.Dec

func (Validators) GetListOfMoniker

func (v Validators) GetListOfMoniker() []string

func (Validators) GetTotalDelegations

func (v Validators) GetTotalDelegations() []sdk.Int

func (Validators) GetTotalShares

func (v Validators) GetTotalShares() sdk.Dec

func (Validators) SortStable

func (v Validators) SortStable()

type VestingPeriods

type VestingPeriods struct {
	Length string         `json:"length"`
	Amount sdktypes.Coins `json:"amount"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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