types

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRequest = errors.New("request error")
)

errors

Functions

This section is empty.

Types

type Account

type Account struct {
	Address Bech32m `json:"address"`
	Balance UInt128 `json:"balance"`
}

type AppState

type AppState struct {
	Accounts                    []Account `json:"accounts"`
	AddressesPrefixes           Prefixes  `json:"address_prefixes"`
	AuthoritySudoAddress        Bech32m   `json:"authority_sudo_address"`
	IbcSudoAddress              Bech32m   `json:"ibc_sudo_address"`
	IbcRelayerAddresses         []Bech32m `json:"ibc_relayer_addresses"`
	NativeAssetBaseDenomination string    `json:"native_asset_base_denomination"`
	Fees                        Fees      `json:"fees"`
	AllowedFeeAssets            []string  `json:"allowed_fee_assets"`
}

type Bech32m

type Bech32m struct {
	Value string `json:"bech32m"`
}

type DenomMetadata

type DenomMetadata struct {
	Code      int         `json:"code"`
	Log       string      `json:"log"`
	Info      string      `json:"info"`
	Index     json.Number `json:"index"`
	Key       []byte      `json:"key"`
	Value     []byte      `json:"value"`
	Height    json.Number `json:"height"`
	Codespace string      `json:"codespace"`
}

type DenomMetadataResponse

type DenomMetadataResponse struct {
	Response DenomMetadata `json:"response"`
}

type Error

type Error struct {
	Code    int64           `json:"code"`
	Message string          `json:"message"`
	Data    json.RawMessage `json:"data"`
}

Error -

func (Error) Error

func (e Error) Error() string

Error -

type Fee added in v1.1.0

type Fee struct {
	Base       UInt128 `json:"base"`
	Multiplier UInt128 `json:"multiplier"`
}

type Fees

type Fees struct {
	Transfer             Fee `json:"transfer"`
	RollupDataSubmission Fee `json:"rollup_data_submission"`
	Ics20Withdrawal      Fee `json:"ics20_withdrawal"`
	InitBridgeAccount    Fee `json:"init_bridge_account"`
	BridgeLock           Fee `json:"bridge_lock"`
	BridgeUnlock         Fee `json:"bridge_unlock"`
	BridgeSudoChange     Fee `json:"bridge_sudo_change"`

	IbcRelay          Fee `json:"ibc_relay"`
	ValidatorUpdate   Fee `json:"validator_update"`
	FeeAssetChange    Fee `json:"fee_asset_change"`
	FeeChange         Fee `json:"fee_change"`
	IbcRelayerChange  Fee `json:"ibc_relayer_change"`
	SudoAddressChange Fee `json:"sudo_address_change"`
	IbcSudoChange     Fee `json:"ibc_sudo_change"`
}

type Genesis

type Genesis struct {
	GenesisTime     time.Time             `json:"genesis_time"`
	ChainID         string                `json:"chain_id"`
	InitialHeight   int64                 `json:"initial_height,string"`
	ConsensusParams types.ConsensusParams `json:"consensus_params"`
	AppHash         types.Hex             `json:"app_hash"`
	AppState        AppState              `json:"app_state"`
	Validators      []Validator           `json:"validators"`
}

type NodeInfo

type NodeInfo struct {
	ProtocolVersion ProtocolVersion `json:"protocol_version"`
	ID              string          `json:"id"`
	ListenAddr      string          `json:"listen_addr"`
	Network         string          `json:"network"`
	Version         string          `json:"version"`
	Channels        string          `json:"channels"`
	Moniker         string          `json:"moniker"`
	Other           Other           `json:"other"`
}

type Other

type Other struct {
	TxIndex    string `json:"tx_index"`
	RPCAddress string `json:"rpc_address"`
}

type Prefixes

type Prefixes struct {
	Base string `json:"base"`
}

type ProtocolVersion

type ProtocolVersion struct {
	P2P   string `json:"p2p"`
	Block uint64 `json:"block,string"`
	App   uint64 `json:"app,string"`
}

type PubKey

type PubKey struct {
	Type  string `json:"type"`
	Value []byte `json:"value"`
}

type Request

type Request struct {
	Method  string `json:"method"`
	Params  []any  `json:"params"`
	Id      int64  `json:"id"`
	JsonRpc string `json:"jsonrpc"`
}

type Response

type Response[T any] struct {
	Id      int64  `json:"id"`
	JsonRpc string `json:"jsonrpc"`
	Error   *Error `json:"error,omitempty"`
	Result  T      `json:"result"`
}

type Status

type Status struct {
	NodeInfo      NodeInfo      `json:"node_info"`
	SyncInfo      SyncInfo      `json:"sync_info"`
	ValidatorInfo ValidatorInfo `json:"validator_info"`
}

type SyncInfo

type SyncInfo struct {
	LatestBlockHash     []byte         `json:"latest_block_hash"`
	LatestAppHash       []byte         `json:"latest_app_hash"`
	LatestBlockHeight   pkgTypes.Level `json:"latest_block_height,string"`
	LatestBlockTime     time.Time      `json:"latest_block_time"`
	EarliestBlockHash   []byte         `json:"earliest_block_hash"`
	EarliestAppHash     []byte         `json:"earliest_app_hash"`
	EarliestBlockHeight pkgTypes.Level `json:"earliest_block_height,string"`
	EarliestBlockTime   time.Time      `json:"earliest_block_time"`
	CatchingUp          bool           `json:"catching_up"`
}

type UInt128 added in v1.1.0

type UInt128 struct {
	Low  uint64 `json:"lo"`
	High uint64 `json:"hi"`
}

func (UInt128) String added in v1.1.0

func (bi UInt128) String() string

type Validator

type Validator struct {
	Address string `json:"address"`
	PubKey  PubKey `json:"pub_key"`
	Power   string `json:"power"`
	Name    string `json:"name"`
}

type ValidatorInfo

type ValidatorInfo struct {
	Address     []byte `json:"address"`
	PubKey      PubKey `json:"pub_key"`
	VotingPower string `json:"voting_power"`
}

Jump to

Keyboard shortcuts

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