responses

package
v1.9.5 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	Id         uint64         `example:"321"                                             json:"id"           swaggertype:"integer"`
	Height     pkgTypes.Level `example:"100"                                             json:"first_height" swaggertype:"integer"`
	LastHeight pkgTypes.Level `example:"100"                                             json:"last_height"  swaggertype:"integer"`
	Hash       string         `example:"celestia1jc92qdnty48pafummfr8ava2tjtuhfdw774w60" json:"hash"         swaggertype:"string"`
	Balance    Balance        `json:"balance"`
}

Address model info

@Description	Celestia address information

func NewAddress

func NewAddress(addr storage.Address) Address

type Balance

type Balance struct {
	Currency  string `example:"utia"        json:"currency"  swaggertype:"string"`
	Spendable string `example:"10000000000" json:"spendable" swaggertype:"string"`
	Delegated string `example:"10000000000" json:"delegated" swaggertype:"string"`
	Unbonding string `example:"10000000000" json:"unbonding" swaggertype:"string"`
}

Balance info

@Description	Balance of address information

type Blob

type Blob struct {
	Namespace    string `example:"AAAAAAAAAAAAAAAAAAAAAAAAAAAAs2bWWU6FOB0="     format:"base64"  json:"namespace"     swaggertype:"string"`
	Data         string `example:"b2sgZGVtbyBkYQ=="                             format:"base64"  json:"data"          swaggertype:"string"`
	ShareVersion int    `example:"0"                                            format:"integer" json:"share_version" swaggertype:"integer"`
	Commitment   string `example:"vbGakK59+Non81TE3ULg5Ve5ufT9SFm/bCyY+WLR3gg=" format:"base64"  json:"commitment"    swaggertype:"string"`
	ContentType  string `example:"image/png"                                    format:"string"  json:"content_type"  swaggertype:"string"`
}

func NewBlob added in v1.1.0

func NewBlob(blob types.Blob) (Blob, error)

type BlobLog added in v1.2.0

type BlobLog struct {
	Commitment  string         `example:"vbGakK59+Non81TE3ULg5Ve5ufT9SFm/bCyY+WLR3gg="    format:"base64"    json:"commitment"       swaggertype:"string"`
	Size        int64          `example:"10"                                              format:"integer"   json:"size"             swaggertype:"integer"`
	Height      pkgTypes.Level `example:"100"                                             format:"integer"   json:"height"           swaggertype:"integer"`
	Time        time.Time      `example:"2023-07-04T03:10:57+00:00"                       format:"date-time" json:"time"             swaggertype:"string"`
	Signer      string         `example:"celestia1jc92qdnty48pafummfr8ava2tjtuhfdw774w60" format:"string"    json:"signer,omitempty" swaggertype:"string"`
	ContentType string         `example:"image/png"                                       format:"string"    json:"content_type"     swaggertype:"string"`
	Namespace   *Namespace     `json:"namespace,omitempty"`
	Tx          *Tx            `json:"tx,omitempty"`
	Rollup      *ShortRollup   `json:"rollup,omitempty"`
}

func NewBlobLog added in v1.2.0

func NewBlobLog(blob storage.BlobLog) BlobLog

type Block

type Block struct {
	Id                 uint64       `example:"321"                                                              json:"id"                   swaggertype:"integer"`
	Height             uint64       `example:"100"                                                              json:"height"               swaggertype:"integer"`
	Time               time.Time    `example:"2023-07-04T03:10:57+00:00"                                        json:"time"                 swaggertype:"string"`
	VersionBlock       string       `example:"11"                                                               json:"version_block"        swaggertype:"string"`
	VersionApp         string       `example:"1"                                                                json:"version_app"          swaggertype:"string"`
	Hash               pkgTypes.Hex `example:"652452A670018D629CC116E510BA88C1CABE061336661B1F3D206D248BD558AF" json:"hash"                 swaggertype:"string"`
	ParentHash         pkgTypes.Hex `example:"652452A670018D629CC116E510BA88C1CABE061336661B1F3D206D248BD558AF" json:"parent_hash"          swaggertype:"string"`
	LastCommitHash     pkgTypes.Hex `example:"652452A670018D629CC116E510BA88C1CABE061336661B1F3D206D248BD558AF" json:"last_commit_hash"     swaggertype:"string"`
	DataHash           pkgTypes.Hex `example:"652452A670018D629CC116E510BA88C1CABE061336661B1F3D206D248BD558AF" json:"data_hash"            swaggertype:"string"`
	ValidatorsHash     pkgTypes.Hex `example:"652452A670018D629CC116E510BA88C1CABE061336661B1F3D206D248BD558AF" json:"validators_hash"      swaggertype:"string"`
	NextValidatorsHash pkgTypes.Hex `example:"652452A670018D629CC116E510BA88C1CABE061336661B1F3D206D248BD558AF" json:"next_validators_hash" swaggertype:"string"`
	ConsensusHash      pkgTypes.Hex `example:"652452A670018D629CC116E510BA88C1CABE061336661B1F3D206D248BD558AF" json:"consensus_hash"       swaggertype:"string"`
	AppHash            pkgTypes.Hex `example:"652452A670018D629CC116E510BA88C1CABE061336661B1F3D206D248BD558AF" json:"app_hash"             swaggertype:"string"`
	LastResultsHash    pkgTypes.Hex `example:"652452A670018D629CC116E510BA88C1CABE061336661B1F3D206D248BD558AF" json:"last_results_hash"    swaggertype:"string"`
	EvidenceHash       pkgTypes.Hex `example:"652452A670018D629CC116E510BA88C1CABE061336661B1F3D206D248BD558AF" json:"evidence_hash"        swaggertype:"string"`

	Proposer *ShortValidator `json:"proposer,omitempty"`

	MessageTypes []types.MsgType `example:"MsgSend,MsgUnjail" json:"message_types" swaggertype:"array,string"`

	Stats *BlockStats `json:"stats,omitempty"`
}

func NewBlock

func NewBlock(block storage.Block, withStats bool) Block

type BlockStats

type BlockStats struct {
	TxCount       int64  `example:"12"          json:"tx_count"       swaggertype:"integer"`
	EventsCount   int64  `example:"18"          json:"events_count"   swaggertype:"integer"`
	BlobsSize     int64  `example:"12354"       json:"blobs_size"     swaggertype:"integer"`
	BlobsCount    int    `example:"100"         json:"blobs_count"    swaggertype:"integer"`
	Fee           string `example:"28347628346" json:"fee"            swaggertype:"string"`
	SupplyChange  string `example:"8635234"     json:"supply_change"  swaggertype:"string"`
	InflationRate string `example:"0.0800000"   json:"inflation_rate" swaggertype:"string"`
	FillRate      string `example:"0.0800"      json:"fill_rate"      swaggertype:"string"`
	Rewards       string `example:"102102812"   json:"rewards"        swaggertype:"string"`
	Commissions   string `example:"123133"      json:"commissions"    swaggertype:"string"`
	BlockTime     uint64 `example:"12354"       json:"block_time"     swaggertype:"integer"`
	GasLimit      int64  `example:"1234"        json:"gas_limit"      swaggertype:"integer"`
	GasUsed       int64  `example:"1234"        json:"gas_used"       swaggertype:"integer"`
	BytesInBlock  int64  `example:"1234"        json:"bytes_in_block" swaggertype:"integer"`
	SquareSize    uint64 `example:"16"          json:"square_size"    swaggertype:"integer"`
}

func NewBlockStats

func NewBlockStats(stats storage.BlockStats) *BlockStats

type Constants

type Constants struct {
	Module        map[string]Params `json:"module"`
	DenomMetadata []DenomMetadata   `json:"denom_metadata"`
}

func NewConstants

func NewConstants(consts []storage.Constant, denomMetadata []storage.DenomMetadata) Constants

type Delegation added in v1.6.0

type Delegation struct {
	Delegator string `example:"celestia1jc92qdnty48pafummfr8ava2tjtuhfdw774w60" json:"delegator,omitempty" swaggertype:"string"`
	Amount    string `example:"0.1"                                             json:"amount"              swaggertype:"string"`

	Validator *ShortValidator `json:"validator,omitempty"`
}

func NewDelegation added in v1.6.0

func NewDelegation(d storage.Delegation) Delegation

type DenomMetadata

type DenomMetadata struct {
	Description string `example:"Some description"    json:"description" swaggertype:"string"`
	Base        string `example:"utia"                json:"base"        swaggertype:"string"`
	Display     string `example:"TIA"                 json:"display"     swaggertype:"string"`
	Name        string `example:"TIA"                 json:"name"        swaggertype:"string"`
	Symbol      string `example:"TIA"                 json:"symbol"      swaggertype:"string"`
	Uri         string `example:"https://example.com" json:"uri"         swaggertype:"string"`

	Units json.RawMessage `json:"units"`
}

type DistributionItem added in v1.6.1

type DistributionItem struct {
	Name  string `example:"12"      format:"string" json:"name"  swaggertype:"string"`
	Value string `example:"0.17632" format:"string" json:"value" swaggertype:"string"`
}

func NewDistributionItem added in v1.6.1

func NewDistributionItem(item storage.DistributionItem, tf string) (result DistributionItem)

type Enums added in v1.1.3

type Enums struct {
	Status      []string `json:"status"`
	MessageType []string `json:"message_type"`
	EventType   []string `json:"event_type"`
}

func NewEnums added in v1.1.3

func NewEnums() Enums

type Event

type Event struct {
	Id       uint64         `example:"321"                       format:"int64"     json:"id"              swaggertype:"integer"`
	Height   pkgTypes.Level `example:"100"                       format:"int64"     json:"height"          swaggertype:"integer"`
	Time     time.Time      `example:"2023-07-04T03:10:57+00:00" format:"date-time" json:"time"            swaggertype:"string"`
	Position int64          `example:"1"                         format:"int64"     json:"position"        swaggertype:"integer"`
	TxId     uint64         `example:"11"                        format:"int64"     json:"tx_id,omitempty" swaggertype:"integer"`

	Type types.EventType `example:"commission" json:"type"`

	Data map[string]any `json:"data"`
}

func NewEvent

func NewEvent(event storage.Event) Event

type GasPrice added in v1.1.0

type GasPrice struct {
	Slow   string `example:"0.1234" format:"string" json:"slow"   swaggertype:"string"`
	Median string `example:"0.1234" format:"string" json:"median" swaggertype:"string"`
	Fast   string `example:"0.1234" format:"string" json:"fast"   swaggertype:"string"`
}

type Grant added in v1.7.0

type Grant struct {
	Granter       string     `example:"celestia1jc92qdnty48pafummfr8ava2tjtuhfdw774w60" json:"granter,omitempty"       swaggertype:"string"`
	Grantee       string     `example:"celestia1jc92qdnty48pafummfr8ava2tjtuhfdw774w60" json:"grantee,omitempty"       swaggertype:"string"`
	Authorization string     `example:"/cosmos.staking.v1beta1.MsgDelegate"             json:"authorization"           swaggertype:"string"`
	Expiration    *time.Time `example:"2023-07-04T03:10:57+00:00"                       json:"expiration,omitempty"    swaggertype:"string"`
	Revoked       bool       `example:"true"                                            json:"revoked"                 swaggertype:"boolean"`
	RevokeHeight  uint64     `example:"123123"                                          json:"revoke_height,omitempty" swaggertype:"integer"`
	Height        uint64     `example:"123123"                                          json:"height"                  swaggertype:"integer"`
	Time          time.Time  `example:"2023-07-04T03:10:57+00:00"                       json:"time"                    swaggertype:"string"`

	Params map[string]any `json:"params"`
}

func NewGrant added in v1.7.0

func NewGrant(g storage.Grant) Grant

type HistogramItem

type HistogramItem struct {
	Time  time.Time `example:"2023-07-04T03:10:57+00:00" format:"date-time" json:"time"  swaggertype:"string"`
	Value string    `example:"2223424"                   format:"string"    json:"value" swaggertype:"string"`
}

func NewHistogramItem

func NewHistogramItem(item storage.HistogramItem) HistogramItem

type Jail added in v1.6.0

type Jail struct {
	Height types.Level `example:"100"                       json:"height" swaggertype:"integer"`
	Time   time.Time   `example:"2023-07-04T03:10:57+00:00" json:"time"   swaggertype:"string"`
	Reason string      `example:"double_sign"               json:"reason" swaggertype:"string"`
	Burned string      `example:"10000000000"               json:"burned" swaggertype:"string"`

	Validator *ShortValidator `json:"validator,omitempty"`
}

func NewJail added in v1.6.0

func NewJail(jail storage.Jail) Jail

type Message

type Message struct {
	Id       uint64         `example:"321"                       format:"int64"     json:"id"              swaggertype:"integer"`
	Height   pkgTypes.Level `example:"100"                       format:"int64"     json:"height"          swaggertype:"integer"`
	Time     time.Time      `example:"2023-07-04T03:10:57+00:00" format:"date-time" json:"time"            swaggertype:"string"`
	Position int64          `example:"2"                         format:"int64"     json:"position"        swaggertype:"integer"`
	Size     int            `example:"2"                         format:"int"       json:"size"            swaggertype:"integer"`
	TxId     uint64         `example:"11"                        format:"int64"     json:"tx_id,omitempty" swaggertype:"integer"`

	Type types.MsgType `example:"MsgCreatePeriodicVestingAccount" json:"type"`

	Data map[string]any `json:"data"`

	Tx *Tx `json:"tx,omitempty"`
}

func NewMessage

func NewMessage(msg storage.Message) Message

func NewMessageWithTx added in v1.0.4

func NewMessageWithTx(msg storage.MessageWithTx) Message

type MessageForAddress added in v1.2.0

type MessageForAddress struct {
	Id       uint64         `example:"321"                       format:"int64"     json:"id"              swaggertype:"integer"`
	Height   pkgTypes.Level `example:"100"                       format:"int64"     json:"height"          swaggertype:"integer"`
	Time     time.Time      `example:"2023-07-04T03:10:57+00:00" format:"date-time" json:"time"            swaggertype:"string"`
	Position int64          `example:"2"                         format:"int64"     json:"position"        swaggertype:"integer"`
	Size     int            `example:"2"                         format:"int"       json:"size"            swaggertype:"integer"`
	TxId     uint64         `example:"11"                        format:"int64"     json:"tx_id,omitempty" swaggertype:"integer"`

	Type           types.MsgType        `example:"MsgCreatePeriodicVestingAccount" json:"type"`
	InvocationType types.MsgAddressType `example:"fromAddress"                     json:"invocation_type"`

	Data map[string]any `json:"data"`
	Tx   TxForAddress   `json:"tx"`
}

type Namespace

type Namespace struct {
	ID              uint64         `` /* 132-byte string literal not displayed */
	Size            int64          `` /* 132-byte string literal not displayed */
	BlobsCount      int64          `` /* 132-byte string literal not displayed */
	Version         byte           `` /* 132-byte string literal not displayed */
	NamespaceID     string         `` /* 131-byte string literal not displayed */
	Hash            string         `` /* 131-byte string literal not displayed */
	PfbCount        int64          `` /* 132-byte string literal not displayed */
	LastHeight      pkgTypes.Level `` /* 132-byte string literal not displayed */
	LastMessageTime time.Time      `` /* 131-byte string literal not displayed */
	Name            string         `` /* 131-byte string literal not displayed */
	Reserved        bool           `example:"true"                                                     json:"reserved"`
}

func NewNamespace

func NewNamespace(ns storage.Namespace) Namespace

type NamespaceKind added in v1.7.4

type NamespaceKind string
const (
	PayForBlobNamespace      NamespaceKind = "pay_for_blob"
	TailPaddingNamespace     NamespaceKind = "tail_padding"
	TxNamespace              NamespaceKind = "tx"
	ParitySharesNamespace    NamespaceKind = "parity_shares"
	PrimaryReservedNamespace NamespaceKind = "primary_reserved_padding"
	DefaultNamespace         NamespaceKind = "namespace"
)

type NamespaceMessage

type NamespaceMessage struct {
	Id       uint64    `example:"321"                       format:"int64"     json:"id"       swaggertype:"integer"`
	Height   int64     `example:"100"                       format:"int64"     json:"height"   swaggertype:"integer"`
	Time     time.Time `example:"2023-07-04T03:10:57+00:00" format:"date-time" json:"time"     swaggertype:"string"`
	Position int64     `example:"2"                         format:"int64"     json:"position" swaggertype:"integer"`

	Type string `` /* 344-byte string literal not displayed */

	Data      map[string]any `json:"data"`
	Tx        Tx             `json:"tx"`
	Namespace Namespace      `json:"namespace"`
}

func NewNamespaceMessage

func NewNamespaceMessage(msg storage.NamespaceMessage) (NamespaceMessage, error)

type NamespaceUsage added in v1.1.0

type NamespaceUsage struct {
	Name        string `` /* 134-byte string literal not displayed */
	Version     *byte  `` /* 135-byte string literal not displayed */
	NamespaceID string `` /* 134-byte string literal not displayed */
	Size        int64  `` /* 134-byte string literal not displayed */
}

func NewNamespaceUsage added in v1.1.0

func NewNamespaceUsage(ns storage.Namespace) NamespaceUsage

type ODS added in v1.7.4

type ODS struct {
	Width uint `example:"2" json:"width" swaggertype:"integer"`

	Items []ODSItem `json:"items"`
}

func NewODS added in v1.7.4

func NewODS(eds *rsmt2d.ExtendedDataSquare) (ODS, error)

type ODSItem added in v1.7.4

type ODSItem struct {
	From      []uint        `json:"from"`
	To        []uint        `json:"to"`
	Namespace string        `json:"namespace"`
	Type      NamespaceKind `json:"type"`
}

type Params

type Params map[string]string

type Price added in v1.2.0

type Price struct {
	Time  time.Time `example:"2023-07-04T03:10:57+00:00" format:"date-time" json:"time"  swaggertype:"string"`
	Open  string    `example:"0.17632"                   format:"string"    json:"open"  swaggertype:"string"`
	High  string    `example:"0.17632"                   format:"string"    json:"high"  swaggertype:"string"`
	Low   string    `example:"0.17632"                   format:"string"    json:"low"   swaggertype:"string"`
	Close string    `example:"0.17632"                   format:"string"    json:"close" swaggertype:"string"`
}

func NewPrice added in v1.2.0

func NewPrice(price storage.Price) Price

type Redelegation added in v1.6.0

type Redelegation struct {
	Height         pkgTypes.Level `example:"100"                                             json:"height"              swaggertype:"integer"`
	Time           time.Time      `example:"2023-07-04T03:10:57+00:00"                       json:"time"                swaggertype:"string"`
	CompletionTime time.Time      `example:"2023-07-04T03:10:57+00:00"                       json:"completion_time"     swaggertype:"string"`
	Delegator      string         `example:"celestia1jc92qdnty48pafummfr8ava2tjtuhfdw774w60" json:"delegator,omitempty" swaggertype:"string"`
	Amount         string         `example:"0.1"                                             json:"amount"              swaggertype:"string"`

	Source      *ShortValidator `json:"source,omitempty"`
	Destination *ShortValidator `json:"destination,omitempty"`
}

func NewRedelegation added in v1.6.0

func NewRedelegation(d storage.Redelegation) Redelegation

type Rollup added in v1.2.0

type Rollup struct {
	Id             uint64 `example:"321"                             format:"integer" json:"id"                    swaggertype:"integer"`
	Name           string `example:"Rollup name"                     format:"string"  json:"name"                  swaggertype:"string"`
	Description    string `example:"Long rollup description"         format:"string"  json:"description,omitempty" swaggertype:"string"`
	Website        string `example:"https://website.com"             format:"string"  json:"website,omitempty"     swaggertype:"string"`
	Twitter        string `example:"https://x.com/account"           format:"string"  json:"twitter,omitempty"     swaggertype:"string"`
	Github         string `example:"https://github.com/account"      format:"string"  json:"github,omitempty"      swaggertype:"string"`
	Slug           string `example:"rollup_slug"                     format:"string"  json:"slug"                  swaggertype:"string"`
	L2Beat         string `example:"https://github.com/account"      format:"string"  json:"l2_beat,omitempty"     swaggertype:"string"`
	Explorer       string `example:"https://explorer.karak.network/" format:"string"  json:"explorer,omitempty"    swaggertype:"string"`
	BridgeContract string `example:"https://github.com/account"      format:"string"  json:"bridge,omitempty"      swaggertype:"string"`
	Stack          string `example:"op_stack"                        format:"string"  json:"stack,omitempty"       swaggertype:"string"`

	Links []string `json:"links,omitempty"`
}

func NewRollup added in v1.2.0

func NewRollup(r *storage.Rollup) Rollup

type RollupWithStats added in v1.2.0

type RollupWithStats struct {
	Id             uint64 `example:"321"                                       format:"integer" json:"id"                    swaggertype:"integer"`
	Name           string `example:"Rollup name"                               format:"string"  json:"name"                  swaggertype:"string"`
	Description    string `example:"Long rollup description"                   format:"string"  json:"description,omitempty" swaggertype:"string"`
	Website        string `example:"https://website.com"                       format:"string"  json:"website,omitempty"     swaggertype:"string"`
	Twitter        string `example:"https://x.com/account"                     format:"string"  json:"twitter,omitempty"     swaggertype:"string"`
	Github         string `example:"https://github.com/account"                format:"string"  json:"github,omitempty"      swaggertype:"string"`
	Slug           string `example:"rollup_slug"                               format:"string"  json:"slug"                  swaggertype:"string"`
	L2Beat         string `example:"https://l2beat.com/scaling/projects/karak" format:"string"  json:"l2_beat,omitempty"     swaggertype:"string"`
	Explorer       string `example:"https://explorer.karak.network/"           format:"string"  json:"explorer,omitempty"    swaggertype:"string"`
	BridgeContract string `example:"https://github.com/account"                format:"string"  json:"bridge,omitempty"      swaggertype:"string"`
	Stack          string `example:"op_stack"                                  format:"string"  json:"stack,omitempty"       swaggertype:"string"`

	BlobsCount  int64     `example:"2"                         format:"integer"   json:"blobs_count"        swaggertype:"integer"`
	Size        int64     `example:"1000"                      format:"integer"   json:"size"               swaggertype:"integer"`
	LastAction  time.Time `example:"2023-07-04T03:10:57+00:00" format:"date-time" json:"last_message_time"  swaggertype:"string"`
	FirstAction time.Time `example:"2023-07-04T03:10:57+00:00" format:"date-time" json:"first_message_time" swaggertype:"string"`
	Fee         string    `example:"123.456789"                format:"string"    json:"fee"                swaggertype:"string"`

	Links []string `json:"links,omitempty"`
}

func NewRollupWithStats added in v1.2.0

func NewRollupWithStats(r storage.RollupWithStats) RollupWithStats

type SearchItem added in v1.4.0

type SearchItem struct {
	// Result type which is in the result. Can be 'block', 'address', 'namespace', 'tx', 'validator', 'rollup'
	Type string `json:"type"`

	// Search result. Can be one of folowwing types: Block, Address, Namespace, Tx, Validator, Rollup
	Result any `json:"result" swaggertype:"object"`
}

type SeriesItem added in v1.1.0

type SeriesItem struct {
	Time  time.Time `example:"2023-07-04T03:10:57+00:00" format:"date-time" json:"time"          swaggertype:"string"`
	Value string    `example:"0.17632"                   format:"string"    json:"value"         swaggertype:"string"`
	Max   string    `example:"0.17632"                   format:"string"    json:"max,omitempty" swaggertype:"string"`
	Min   string    `example:"0.17632"                   format:"string"    json:"min,omitempty" swaggertype:"string"`
}

func NewSeriesItem added in v1.1.0

func NewSeriesItem(item storage.SeriesItem) SeriesItem

type ShortRollup added in v1.7.4

type ShortRollup struct {
	Id   uint64 `example:"321"                             format:"integer" json:"id"             swaggertype:"integer"`
	Name string `example:"Rollup name"                     format:"string"  json:"name"           swaggertype:"string"`
	Slug string `example:"rollup_slug"                     format:"string"  json:"slug"           swaggertype:"string"`
}

func NewShortRollup added in v1.7.4

func NewShortRollup(r *storage.Rollup) *ShortRollup

type ShortValidator added in v1.1.0

type ShortValidator struct {
	Id          uint64 `example:"321"                                      json:"id"           swaggertype:"integer"`
	ConsAddress string `example:"E641C7A2C964833E556AEF934FBF166B712874B6" json:"cons_address" swaggertype:"string"`
	Moniker     string `example:"Easy 2 Stake"                             json:"moniker"      swaggertype:"string"`
}

func NewShortValidator added in v1.1.0

func NewShortValidator(val storage.Validator) *ShortValidator

type SignedBlocks added in v1.4.0

type SignedBlocks struct {
	Height types.Level `example:"100"  json:"height" swaggertype:"integer"`
	Signed bool        `example:"true" json:"signed" swaggertype:"boolean"`
}

type State

type State struct {
	Id               uint64         `` /* 141-byte string literal not displayed */
	Name             string         `` /* 140-byte string literal not displayed */
	ChainId          string         `` /* 140-byte string literal not displayed */
	LastHeight       pkgTypes.Level `` /* 141-byte string literal not displayed */
	LastHash         string         `` /* 140-byte string literal not displayed */
	LastTime         time.Time      `` /* 140-byte string literal not displayed */
	TotalTx          int64          `` /* 141-byte string literal not displayed */
	TotalAccounts    int64          `` /* 141-byte string literal not displayed */
	TotalFee         string         `` /* 140-byte string literal not displayed */
	TotalBlobsSize   int64          `` /* 141-byte string literal not displayed */
	TotalValidators  int            `` /* 141-byte string literal not displayed */
	TotalSupply      string         `` /* 140-byte string literal not displayed */
	TotalStake       string         `` /* 140-byte string literal not displayed */
	TotalVotingPower string         `` /* 140-byte string literal not displayed */
	Synced           bool           `` /* 141-byte string literal not displayed */
}

func NewState

func NewState(state storage.State) State

type TPS added in v1.1.0

type TPS struct {
	High              float64 `example:"1.023" format:"float" json:"high"                 swaggertype:"number"`
	Low               float64 `example:"0.123" format:"float" json:"low"                  swaggertype:"number"`
	Current           float64 `example:"0.567" format:"float" json:"current"              swaggertype:"number"`
	ChangeLastHourPct float64 `example:"0.275" format:"float" json:"change_last_hour_pct" swaggertype:"number"`
}

func NewTPS added in v1.1.0

func NewTPS(tps storage.TPS) TPS

type Tx

type Tx struct {
	Id            uint64         `` /* 142-byte string literal not displayed */
	Height        pkgTypes.Level `` /* 142-byte string literal not displayed */
	Position      int64          `` /* 142-byte string literal not displayed */
	GasWanted     int64          `` /* 142-byte string literal not displayed */
	GasUsed       int64          `` /* 142-byte string literal not displayed */
	TimeoutHeight uint64         `` /* 142-byte string literal not displayed */
	EventsCount   int64          `` /* 142-byte string literal not displayed */
	MessagesCount int64          `` /* 142-byte string literal not displayed */
	Hash          string         `` /* 141-byte string literal not displayed */
	Fee           string         `` /* 141-byte string literal not displayed */
	Error         string         `` /* 141-byte string literal not displayed */
	Codespace     string         `` /* 141-byte string literal not displayed */
	Memo          string         `` /* 141-byte string literal not displayed */
	Time          time.Time      `` /* 141-byte string literal not displayed */

	Messages []Message `json:"messages,omitempty"`
	Signers  []string  `json:"signers,omitempty"`

	MessageTypes []types.MsgType `example:"MsgSend,MsgUnjail" json:"message_types"`
	Status       types.Status    `example:"success"           json:"status"`

	MsgTypeMask types.MsgTypeBits `json:"-"`
}

func NewTx

func NewTx(tx storage.Tx) Tx

type TxCountHistogramItem added in v1.1.0

type TxCountHistogramItem struct {
	Time  time.Time `example:"2023-07-04T03:10:57+00:00" format:"date-time" json:"time"  swaggertype:"string"`
	Count int64     `example:"2223424"                   format:"integer"   json:"count" swaggertype:"integer"`
	TPS   float64   `example:"0.13521"                   format:"float"     json:"tps"   swaggertype:"number"`
}

func NewTxCountHistogramItem added in v1.1.0

func NewTxCountHistogramItem(item storage.TxCountForLast24hItem) TxCountHistogramItem

type TxForAddress added in v1.2.0

type TxForAddress struct {
	MessagesCount int64  `` /* 134-byte string literal not displayed */
	Hash          string `` /* 133-byte string literal not displayed */
	Fee           string `` /* 133-byte string literal not displayed */

	MessageTypes []types.MsgType `example:"MsgSend,MsgUnjail" json:"message_types"`
	Status       types.Status    `example:"success"           json:"status"`
}

func NewTxForAddress added in v1.2.0

func NewTxForAddress(tx *storage.Tx) TxForAddress

type Undelegation added in v1.6.0

type Undelegation struct {
	Height         pkgTypes.Level `example:"100"                                             json:"height"              swaggertype:"integer"`
	Time           time.Time      `example:"2023-07-04T03:10:57+00:00"                       json:"time"                swaggertype:"string"`
	CompletionTime time.Time      `example:"2023-07-04T03:10:57+00:00"                       json:"completion_time"     swaggertype:"string"`
	Delegator      string         `example:"celestia1jc92qdnty48pafummfr8ava2tjtuhfdw774w60" json:"delegator,omitempty" swaggertype:"string"`
	Amount         string         `example:"0.1"                                             json:"amount"              swaggertype:"string"`

	Validator *ShortValidator `json:"validator,omitempty"`
}

func NewUndelegation added in v1.6.0

func NewUndelegation(d storage.Undelegation) Undelegation

type Validator added in v1.1.0

type Validator struct {
	Id          uint64 `example:"321"                                                    json:"id"           swaggertype:"integer"`
	Delegator   string `example:"celestia1un77nfm6axkhkupe8fk4xl6fd4adz3y5qk7ph6"        json:"delegator"    swaggertype:"string"`
	Address     string `example:"celestiavaloper1un77nfm6axkhkupe8fk4xl6fd4adz3y59fucpu" json:"address"      swaggertype:"string"`
	ConsAddress string `example:"E641C7A2C964833E556AEF934FBF166B712874B6"               json:"cons_address" swaggertype:"string"`

	Moniker  string `example:"Easy 2 Stake"                   json:"moniker"  swaggertype:"string"`
	Website  string `example:"https://www.easy2stake.com/"    json:"website"  swaggertype:"string"`
	Identity string `example:"2C877AC873132C91"               json:"identity" swaggertype:"string"`
	Contacts string `example:"security@0xfury.com"            json:"contacts" swaggertype:"string"`
	Details  string `example:"Some long text about validator" json:"details"  swaggertype:"string"`

	Rate              string `example:"0.03" json:"rate"                swaggertype:"string"`
	MaxRate           string `example:"0.1"  json:"max_rate"            swaggertype:"string"`
	MaxChangeRate     string `example:"0.01" json:"max_change_rate"     swaggertype:"string"`
	MinSelfDelegation string `example:"1"    json:"min_self_delegation" swaggertype:"string"`
	Stake             string `example:"1"    json:"stake"               swaggertype:"string"`
	Rewards           string `example:"1"    json:"rewards"             swaggertype:"string"`
	Commissions       string `example:"1"    json:"commissions"         swaggertype:"string"`
	VotingPower       string `example:"1"    json:"voting_power"        swaggertype:"string"`

	Jailed bool `example:"false" json:"jailed" swaggertype:"boolean"`
}

func NewValidator added in v1.1.0

func NewValidator(val storage.Validator) *Validator

type ValidatorCount added in v1.6.0

type ValidatorCount struct {
	Total    int `example:"100" json:"total"    swaggertype:"integer"`
	Jailed   int `example:"100" json:"jailed"   swaggertype:"integer"`
	Active   int `example:"100" json:"active"   swaggertype:"integer"`
	Inactive int `example:"100" json:"inactive" swaggertype:"integer"`
}

type ValidatorUptime added in v1.4.0

type ValidatorUptime struct {
	Uptime string         `example:"0.97" json:"uptime" swaggertype:"string"`
	Blocks []SignedBlocks `json:"blocks"`
}

func NewValidatorUptime added in v1.4.0

func NewValidatorUptime(levels []types.Level, currentLevel types.Level, count types.Level) (uptime ValidatorUptime)

type Vesting added in v1.7.0

type Vesting struct {
	Id        uint64            `` /* 143-byte string literal not displayed */
	Height    pkgTypes.Level    `` /* 143-byte string literal not displayed */
	Time      time.Time         `` /* 142-byte string literal not displayed */
	StartTime *time.Time        `` /* 142-byte string literal not displayed */
	EndTime   *time.Time        `` /* 142-byte string literal not displayed */
	Hash      string            `` /* 142-byte string literal not displayed */
	Type      types.VestingType `` /* 142-byte string literal not displayed */
	Amount    string            `` /* 142-byte string literal not displayed */
}

func NewVesting added in v1.7.0

func NewVesting(v storage.VestingAccount) Vesting

type VestingPeriod added in v1.7.0

type VestingPeriod struct {
	Time   time.Time `example:"2023-07-04T03:10:57+00:00" format:"date-time" json:"time"   swaggertype:"string"`
	Amount string    `example:"123.13333"                 format:"string"    json:"amount" swaggertype:"string"`
}

func NewVestingPeriod added in v1.7.0

func NewVestingPeriod(v storage.VestingPeriod) VestingPeriod

Jump to

Keyboard shortcuts

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