responses

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Id       uint64           `` /* 140-byte string literal not displayed */
	Height   pkgTypes.Level   `` /* 140-byte string literal not displayed */
	Time     time.Time        `` /* 139-byte string literal not displayed */
	Position int64            `` /* 140-byte string literal not displayed */
	Type     types.ActionType `` /* 139-byte string literal not displayed */
	TxHash   string           `` /* 139-byte string literal not displayed */

	Fee  *Fee           `json:"fee,omitempty"`
	Data map[string]any `json:"data"`
}

func NewAction

func NewAction(action storage.Action) Action

func NewActionWithTx

func NewActionWithTx(action storage.ActionWithTx) Action

func NewAddressAction

func NewAddressAction(action storage.AddressAction) Action

type Address

type Address struct {
	Id            uint64         `example:"321"                                           json:"id"              swaggertype:"integer"`
	Height        pkgTypes.Level `example:"100"                                           json:"first_height"    swaggertype:"integer"`
	ActionsCount  int64          `example:"10"                                            json:"actions_count"   swaggertype:"integer"`
	SignedTxCount int64          `example:"10"                                            json:"signed_tx_count" swaggertype:"integer"`
	Nonce         uint32         `example:"10"                                            json:"nonce"           swaggertype:"integer"`
	Hash          string         `example:"astria1phym4uktjn6gjle226009ge7u82w0dgtszs8x2" json:"hash"            swaggertype:"string"`
	IsBridge      bool           `example:"false"                                         json:"is_bridge"       swaggertype:"boolean"`

	Balance []Balance `json:"balances,omitempty"`
	Bridge  *Bridge   `json:"bridge,omitempty"`
}

Address model info

@Description	address information

func NewAddress

func NewAddress(addr storage.Address, bridge *storage.Bridge) Address

type Balance

type Balance struct {
	Currency string `example:"nria"        json:"currency" swaggertype:"string"`
	Value    string `example:"10000000000" json:"value"    swaggertype:"string"`
}

Balance info

@Description	Balance of address information

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"`
	ActionTypes        []string        `example:"sequence,transfer"                                                json:"action_types"         swaggertype:"string"`
	Proposer           *ShortValidator `json:"proposer,omitempty"`

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

func NewBlock

func NewBlock(block storage.Block) Block

type BlockStats

type BlockStats struct {
	TxCount      int64  `example:"12"          json:"tx_count"       swaggertype:"integer"`
	Fee          string `example:"28347628346" json:"fee"            swaggertype:"string"`
	SupplyChange string `example:"8635234"     json:"supply_change"  swaggertype:"string"`
	BlockTime    uint64 `example:"12354"       json:"block_time"     swaggertype:"integer"`
	GasWanted    int64  `example:"1234"        json:"gas_wanted"     swaggertype:"integer"`
	GasUsed      int64  `example:"1234"        json:"gas_used"       swaggertype:"integer"`
	BytesInBlock int64  `example:"1234"        json:"bytes_in_block" swaggertype:"integer"`
}

func NewBlockStats

func NewBlockStats(stats *storage.BlockStats) *BlockStats

type Bridge

type Bridge struct {
	Address    string `example:"astria1phym4uktjn6gjle226009ge7u82w0dgtszs8x2" json:"address"    swaggertype:"string"`
	Rollup     []byte `example:"O0Ia+lPYYMf3iFfxBaWXCSdlhphc6d4ZoBXINov6Tjc="  json:"rollup"     swaggertype:"string"`
	Sudo       string `example:"astria1phym4uktjn6gjle226009ge7u82w0dgtszs8x2" json:"sudo"       swaggertype:"string"`
	Withdrawer string `example:"astria1phym4uktjn6gjle226009ge7u82w0dgtszs8x2" json:"withdrawer" swaggertype:"string"`
	Asset      string `example:"nria"                                          json:"asset"      swaggertype:"string"`
	FeeAsset   string `example:"nria"                                          json:"fee_asset"  swaggertype:"string"`
}

Bridge model info

@Description	bridge account information

func NewBridge

func NewBridge(b storage.Bridge) Bridge

type Constants

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

func NewConstants

func NewConstants(consts []storage.Constant) Constants

type Enums

type Enums struct {
	Status     []string `json:"status"`
	ActionType []string `json:"action_type"`
}

func NewEnums

func NewEnums() Enums

type Fee

type Fee struct {
	Amount string `example:"1000" format:"string" json:"amount" swaggertype:"string"`
	Asset  string `example:"nria" format:"string" json:"asset"  swaggertype:"string"`
}

func NewFee

func NewFee(fee *storage.Fee) *Fee

type NetworkSummary

type NetworkSummary struct {
	DataSize     int64   `example:"1000000" format:"integer" json:"data_size"`
	TxCount      int64   `example:"100"     format:"integer" json:"tx_count"`
	BytesInBlock int64   `example:"1024"    format:"integer" json:"bytes_in_block"`
	TPS          float64 `example:"0.17632" format:"number"  json:"tps"`
	BPS          float64 `example:"0.17632" format:"number"  json:"bps"`
	RBPS         float64 `example:"0.17632" format:"number"  json:"rbps"`
	BlockTime    float64 `example:"2345"    format:"number"  json:"block_time"`
	Fee          string  `example:"1012012" format:"string"  json:"fee"`
	Supply       string  `example:"1029129" format:"string"  json:"supply"`
}

func NewNetworkSummary

func NewNetworkSummary(summary storage.NetworkSummary) NetworkSummary

type NetworkSummaryWithChange

type NetworkSummaryWithChange struct {
	DataSize        int64   `example:"1000000" format:"integer" json:"data_size"`
	DataSizePct     float64 `example:"17.632"  format:"number"  json:"data_size_pct"`
	TxCount         int64   `example:"100"     format:"integer" json:"tx_count"`
	TxCountPct      float64 `example:"17.632"  format:"number"  json:"tx_count_pct"`
	BytesInBlock    int64   `example:"1024"    format:"integer" json:"bytes_in_block"`
	BytesInBlockPct float64 `example:"17.632"  format:"number"  json:"bytes_in_block_pct"`
	TPS             float64 `example:"0.17632" format:"number"  json:"tps"`
	TPSPct          float64 `example:"17.632"  format:"number"  json:"tps_pct"`
	BPS             float64 `example:"0.17632" format:"number"  json:"bps"`
	BPSPct          float64 `example:"17.632"  format:"number"  json:"bps_pct"`
	RBPS            float64 `example:"0.17632" format:"number"  json:"rbps"`
	RBPSPct         float64 `example:"17.632"  format:"number"  json:"rbps_pct"`
	BlockTime       float64 `example:"2345"    format:"number"  json:"block_time"`
	BlockTimePct    float64 `example:"17.632"  format:"number"  json:"block_time_pct"`
}

type Params

type Params map[string]string

type Rollup

type Rollup struct {
	Id           uint64      `example:"321"                                          json:"id"            swaggertype:"integer"`
	FirstHeight  types.Level `example:"100"                                          json:"first_height"  swaggertype:"integer"`
	AstriaId     []byte      `example:"O0Ia+lPYYMf3iFfxBaWXCSdlhphc6d4ZoBXINov6Tjc=" json:"hash"          swaggertype:"string"`
	ActionsCount int64       `example:"101"                                          json:"actions_count" swaggertype:"integer"`
	BridgeCount  int64       `example:"2"                                            json:"bridge_count"  swaggertype:"integer"`
	Size         int64       `example:"100"                                          json:"size"          swaggertype:"integer"`
}

func NewRollup

func NewRollup(rollup *storage.Rollup) Rollup

type RollupAction

type RollupAction struct {
	Action

	Rollup *Rollup `json:"rollup,omitempty"`
}

func NewRollupAction

func NewRollupAction(action storage.RollupAction) RollupAction

type RollupSeriesItem

type RollupSeriesItem 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"`
}

func NewRollupSeriesItem

func NewRollupSeriesItem(item storage.SeriesItem) RollupSeriesItem

type SearchResult

type SearchResult struct {
	Value string `json:"value"`
	Type  string `json:"type"`
	Body  any    `json:"body,omitempty"`
}

func NewSearchResult

func NewSearchResult(value, typ string, body any) SearchResult

type SeriesItem

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

func NewSeriesItem(item storage.SeriesItem) SeriesItem

type ShortValidator

type ShortValidator struct {
	Id          uint64 `example:"321"                                      json:"id"      swaggertype:"integer"`
	ConsAddress string `example:"E641C7A2C964833E556AEF934FBF166B712874B6" json:"address" swaggertype:"string"`
	Name        string `example:"Node0"                                    json:"name"    swaggertype:"string"`
}

func NewShortValidator

func NewShortValidator(val *storage.Validator) *ShortValidator

type SignedBlocks

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         `` /* 137-byte string literal not displayed */
	Name          string         `` /* 136-byte string literal not displayed */
	ChainID       string         `` /* 136-byte string literal not displayed */
	LastHeight    pkgTypes.Level `` /* 137-byte string literal not displayed */
	LastHash      string         `` /* 136-byte string literal not displayed */
	LastTime      time.Time      `` /* 136-byte string literal not displayed */
	TotalTx       int64          `` /* 137-byte string literal not displayed */
	TotalAccounts int64          `` /* 137-byte string literal not displayed */
	TotalRollups  int64          `` /* 137-byte string literal not displayed */
	TotalFee      string         `` /* 136-byte string literal not displayed */
	TotalSupply   string         `` /* 136-byte string literal not displayed */
	Synced        bool           `` /* 137-byte string literal not displayed */
}

func NewState

func NewState(state storage.State) State

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 */
	ActionsCount int64          `` /* 142-byte string literal not displayed */
	Nonce        uint32         `` /* 142-byte string literal not displayed */
	Hash         string         `` /* 141-byte string literal not displayed */
	Error        string         `` /* 141-byte string literal not displayed */
	Codespace    string         `` /* 141-byte string literal not displayed */
	Signature    string         `` /* 141-byte string literal not displayed */
	Signer       string         `` /* 141-byte string literal not displayed */
	Time         time.Time      `` /* 141-byte string literal not displayed */
	Status       types.Status   `` /* 141-byte string literal not displayed */
	ActionTypes  []string       `` /* 141-byte string literal not displayed */

	Actions []Action `json:"actions,omitempty"`
}

func NewTx

func NewTx(tx storage.Tx) Tx

type Validator

type Validator struct {
	Id          uint64 `example:"321"                                                              json:"id"          swaggertype:"integer"`
	ConsAddress string `example:"E641C7A2C964833E556AEF934FBF166B712874B6"                         json:"address"     swaggertype:"string"`
	Name        string `example:"Node0"                                                            json:"name"        swaggertype:"string"`
	PubkeyType  string `example:"tendermint/PubKeyEd25519"                                         json:"pubkey_type" swaggertype:"string"`
	Pubkey      string `example:"a497aa4a22ca8232876082920b110678988c86194b0c2e12a04dcf6f53688bb2" json:"pubkey"      swaggertype:"string"`
	Power       string `example:"100"                                                              json:"power"       swaggertype:"string"`
}

func NewValidator

func NewValidator(val *storage.Validator) *Validator

type ValidatorUptime

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

func NewValidatorUptime

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

Jump to

Keyboard shortcuts

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