handler

package
v1.10.8 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressHandler

type AddressHandler struct {
	// contains filtered or unexported fields
}

func NewAddressHandler

func NewAddressHandler(
	address storage.IAddress,
	txs storage.ITx,
	blobLogs storage.IBlobLog,
	messages storage.IMessage,
	delegations storage.IDelegation,
	undelegations storage.IUndelegation,
	redelegations storage.IRedelegation,
	vestings storage.IVestingAccount,
	grants storage.IGrant,
	state storage.IState,
	indexerName string,
) *AddressHandler

func (*AddressHandler) Blobs added in v1.2.0

func (handler *AddressHandler) Blobs(c echo.Context) error

Blobs godoc

@Summary		Get blobs pushed by address
@Description	Get blobs pushed by address
@Tags			address
@ID				address-blobs
@Param			hash	path	string	true	"Hash"											minlength(47)	maxlength(47)
@Param			limit	query	integer	false	"Count of requested entities"					minimum(1)		maximum(100)
@Param			offset	query	integer	false	"Offset"										minimum(1)
@Param			sort	query	string	false	"Sort order. Default: desc"						Enums(asc, desc)
@Param			sort_by	query	string	false	"Sort field. If it's empty internal id is used"	Enums(time, size)
@Param			joins	query	boolean	false	"Flag indicating whether entities of transaction and namespace should be attached or not. Default: true"
@Produce		json
@Success		200	{array}		responses.BlobLog
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/address/{hash}/blobs [get]

func (*AddressHandler) Count

func (handler *AddressHandler) Count(c echo.Context) error

Count godoc

@Summary		Get count of addresses in network
@Description	Get count of addresses in network
@Tags			address
@ID				get-address-count
@Produce		json
@Success		200	{integer}	uint64
@Failure		500	{object}	Error
@Router			/address/count [get]

func (*AddressHandler) Delegations added in v1.6.0

func (handler *AddressHandler) Delegations(c echo.Context) error

Delegations godoc

@Summary		Get delegations made by address
@Description	Get delegations made by address
@Tags			address
@ID				address-delegations
@Param			hash		path	string	true	"Hash"							minlength(47)	maxlength(47)
@Param			limit		query	integer	false	"Count of requested entities"	minimum(1)		maximum(100)
@Param			offset		query	integer	false	"Offset"						minimum(1)
@Param			show_zero	query	boolean	false	"Show zero delegations"
@Produce		json
@Success		200	{array}		responses.Delegation
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/address/{hash}/delegations [get]

func (*AddressHandler) Get

func (handler *AddressHandler) Get(c echo.Context) error

Get godoc

@Summary		Get address info
@Description	Get address info
@Tags			address
@ID				get-address
@Param			hash	path	string	true	"Hash"	minlength(47)	maxlength(47)
@Produce		json
@Success		200	{object}	responses.Address
@Success		204
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/address/{hash} [get]

func (*AddressHandler) Grantee added in v1.7.0

func (handler *AddressHandler) Grantee(c echo.Context) error

Grantee godoc

@Summary		Get grants where address is grantee
@Description	Get grants where address is grantee
@Tags			address
@ID				address-grantee
@Param			hash	path	string	true	"Hash"							minlength(47)	maxlength(47)
@Param			limit	query	integer	false	"Count of requested entities"	minimum(1)		maximum(100)
@Param			offset	query	integer	false	"Offset"						minimum(1)
@Produce		json
@Success		200	{array}		responses.Grant
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/address/{hash}/granters [get]

func (*AddressHandler) Grants added in v1.7.0

func (handler *AddressHandler) Grants(c echo.Context) error

Grants godoc

@Summary		Get grants made by address
@Description	Get grants made by address
@Tags			address
@ID				address-grants
@Param			hash	path	string	true	"Hash"							minlength(47)	maxlength(47)
@Param			limit	query	integer	false	"Count of requested entities"	minimum(1)		maximum(100)
@Param			offset	query	integer	false	"Offset"						minimum(1)
@Produce		json
@Success		200	{array}		responses.Grant
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/address/{hash}/grants [get]

func (*AddressHandler) List

func (handler *AddressHandler) List(c echo.Context) error

List godoc

@Summary		List address info
@Description	List address info
@Tags			address
@ID				list-address
@Param			limit	query	integer	false	"Count of requested entities"	mininum(1)	maximum(100)
@Param			offset	query	integer	false	"Offset"						mininum(1)
@Param			sort	query	string	false	"Sort order"					Enums(asc, desc)
@Param			sort_by	query	string	false	"Sort field"					Enums(id, delegated, spendable, unbonding, first_height, last_height)
@Produce		json
@Success		200	{array}		responses.Address
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/address [get]

func (*AddressHandler) Messages

func (handler *AddressHandler) Messages(c echo.Context) error

Messages godoc

@Summary		Get address messages
@Description	Get address messages
@Tags			address
@ID				address-messages
@Param			hash		path	string					true	"Hash"							minlength(47)	maxlength(47)
@Param			limit		query	integer					false	"Count of requested entities"	minimum(1)		maximum(100)
@Param			offset		query	integer					false	"Offset"						minimum(1)
@Param			sort		query	string					false	"Sort order"					Enums(asc, desc)
@Param			msg_type	query	storageTypes.MsgType	false	"Comma-separated message types list"
@Produce		json
@Success		200	{array}		responses.MessageForAddress
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/address/{hash}/messages [get]

func (*AddressHandler) Redelegations added in v1.6.0

func (handler *AddressHandler) Redelegations(c echo.Context) error

Redelegations godoc

@Summary		Get redelegations made by address
@Description	Get redelegations made by address
@Tags			address
@ID				address-redelegations
@Param			hash	path	string	true	"Hash"							minlength(47)	maxlength(47)
@Param			limit	query	integer	false	"Count of requested entities"	minimum(1)		maximum(100)
@Param			offset	query	integer	false	"Offset"						minimum(1)
@Produce		json
@Success		200	{array}		responses.Redelegation
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/address/{hash}/redelegations [get]

func (*AddressHandler) Stats added in v1.7.4

func (handler *AddressHandler) Stats(c echo.Context) error

Stats godoc

@Summary		Get address stats
@Description	Get address stats
@Tags			address
@ID				address-stats
@Param			hash		path	string	true	"Hash"							minlength(47)	maxlength(47)
@Param			name		path	string	true	"Series name"					Enums(gas_used, gas_wanted, fee, tx_count)
@Param			timeframe	path	string	true	"Timeframe"						Enums(hour, day, month)
@Param			from		query	integer	false	"Time from in unix timestamp"	mininum(1)
@Param			to			query	integer	false	"Time to in unix timestamp"		mininum(1)
@Produce		json
@Success		200	{array}		responses.HistogramItem
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/address/{hash}/stats/{name}/{timeframe} [get]

func (*AddressHandler) Transactions

func (handler *AddressHandler) Transactions(c echo.Context) error

Transactions godoc

@Summary		Get address transactions
@Description	Get address transactions
@Tags			address
@ID				address-transactions
@Param			hash		path	string					true	"Hash"							minlength(47)	maxlength(47)
@Param			limit		query	integer					false	"Count of requested entities"	minimum(1)		maximum(100)
@Param			offset		query	integer					false	"Offset"						minimum(1)
@Param			sort		query	string					false	"Sort order"					Enums(asc, desc)
@Param			status		query	storageTypes.Status		false	"Comma-separated status list"
@Param			msg_type	query	storageTypes.MsgType	false	"Comma-separated message types list"
@Param			from		query	integer					false	"Time from in unix timestamp"	minimum(1)
@Param			to			query	integer					false	"Time to in unix timestamp"		minimum(1)
@Param			height		query	integer					false	"Block number"					minimum(1)
@Produce		json
@Success		200	{array}		responses.Tx
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/address/{hash}/txs [get]

func (*AddressHandler) Undelegations added in v1.6.0

func (handler *AddressHandler) Undelegations(c echo.Context) error

Undelegations godoc

@Summary		Get undelegations made by address
@Description	Get undelegations made by address
@Tags			address
@ID				address-undelegations
@Param			hash	path	string	true	"Hash"							minlength(47)	maxlength(47)
@Param			limit	query	integer	false	"Count of requested entities"	minimum(1)		maximum(100)
@Param			offset	query	integer	false	"Offset"						minimum(1)
@Produce		json
@Success		200	{array}		responses.Undelegation
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/address/{hash}/undelegations [get]

func (*AddressHandler) Vestings added in v1.7.0

func (handler *AddressHandler) Vestings(c echo.Context) error

Vestings godoc

@Summary		Get vesting for address
@Description	Get vesting for address
@Tags			address
@ID				address-vesting
@Param			hash		path	string	true	"Hash"							minlength(47)	maxlength(47)
@Param			limit		query	integer	false	"Count of requested entities"	minimum(1)		maximum(100)
@Param			offset		query	integer	false	"Offset"						minimum(1)
@Param			show_ended	query	boolean	false	"Show finished vestings delegations"
@Produce		json
@Success		200	{array}		responses.Vesting
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/address/{hash}/vestings [get]

type BlockHandler

type BlockHandler struct {
	// contains filtered or unexported fields
}

func NewBlockHandler

func NewBlockHandler(
	block storage.IBlock,
	blockStats storage.IBlockStats,
	events storage.IEvent,
	namespace storage.INamespace,
	message storage.IMessage,
	blobLogs storage.IBlobLog,
	state storage.IState,
	node node.Api,
	indexerName string,
) *BlockHandler

func (*BlockHandler) Blobs added in v1.3.2

func (handler *BlockHandler) Blobs(c echo.Context) error

Blobs godoc

@Summary		List blobs which was pushed in the block
@Description	List blobs which was pushed in the block
@Tags			block
@ID				get-block-blobs
@Param			height	path	integer	true	"Block height"									minimum(1)
@Param			limit	query	integer	false	"Count of requested entities"					mininum(1)	maximum(100)
@Param			offset	query	integer	false	"Offset"										mininum(1)
@Param			sort	query	string	false	"Sort order. Default: desc"						Enums(asc, desc)
@Param			sort_by	query	string	false	"Sort field. If it's empty internal id is used"	Enums(time, size)
@Produce		json
@Success		200	{array}		responses.BlobLog
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/block/{height}/blobs [get]

func (*BlockHandler) BlobsCount added in v1.3.2

func (handler *BlockHandler) BlobsCount(c echo.Context) error

BlobsCount godoc

@Summary		Count of blobs which was pushed by transaction
@Description	Count of blobs which was pushed by transaction
@Tags			block
@ID				block-blobs-count
@Param			height	path	integer	true	"Block height"	minimum(1)
@Produce		json
@Success		200	{integer}	uint64
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/block/{height}/blobs/count [get]

func (*BlockHandler) BlockODS added in v1.7.4

func (handler *BlockHandler) BlockODS(c echo.Context) error

BlockODS godoc

@Summary		ODS for block
@Description	ODS for block
@Tags			block
@ID				block-ods
@Param			height	path	integer	true	"Block height"	minimum(1)
@Produce		json
@x-internal		true
@Success		200	{object}	responses.ODS
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/block/{height}/ods [get]

func (*BlockHandler) Count

func (handler *BlockHandler) Count(c echo.Context) error

Count godoc

@Summary		Get count of blocks in network
@Description	Get count of blocks in network
@Tags			block
@ID				get-block-count
@Produce		json
@Success		200	{integer}	uint64
@Failure		500	{object}	Error
@Router			/block/count [get]

func (*BlockHandler) Get

func (handler *BlockHandler) Get(c echo.Context) error

Get godoc

@Summary		Get block info
@Description	Get block info
@Tags			block
@ID				get-block
@Param			height	path	integer	true	"Block height"	minimum(1)
@Param			stats	query	boolean	false	"Need join stats for block"
@Produce		json
@Success		200	{object}	responses.Block
@Success		204
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/block/{height} [get]

func (*BlockHandler) GetEvents

func (handler *BlockHandler) GetEvents(c echo.Context) error

GetEvents godoc

@Summary		Get events from begin and end of block
@Description	Get events from begin and end of block
@Tags			block
@ID				get-block-events
@Param			height	path	integer	true	"Block height"					minimum(1)
@Param			limit	query	integer	false	"Count of requested entities"	mininum(1)	maximum(100)
@Param			offset	query	integer	false	"Offset"						mininum(1)
@Produce		json
@Success		200	{array}		responses.Event
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/block/{height}/events [get]

func (*BlockHandler) GetMessages added in v1.0.4

func (handler *BlockHandler) GetMessages(c echo.Context) error

GetMessages godoc

@Summary		Get messages contained in the block
@Description	Get messages contained in the block
@Tags			block
@ID				get-block-messages
@Param			height				path	integer			true	"Block height"					minimum(1)
@Param			limit				query	integer			false	"Count of requested entities"	mininum(1)	maximum(100)
@Param			offset				query	integer			false	"Offset"						mininum(1)
@Param			msg_type			query	types.MsgType	false	"Comma-separated message types list"
@Param			excluded_msg_type	query	types.MsgType	false	"Comma-separated message types which should be excluded from list"
@Produce		json
@Success		200	{array}		responses.Message
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/block/{height}/messages [get]

func (*BlockHandler) GetStats

func (handler *BlockHandler) GetStats(c echo.Context) error

GetStats godoc

@Summary		Get block stats by height
@Description	Get block stats by height
@Tags			block
@ID				get-block-stats
@Param			height	path	integer	true	"Block height"	minimum(1)
@Produce		json
@Success		200	{object}	responses.BlockStats
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/block/{height}/stats [get]

func (*BlockHandler) List

func (handler *BlockHandler) List(c echo.Context) error

List godoc

@Summary		List blocks info
@Description	List blocks info
@Tags			block
@ID				list-block
@Param			limit	query	integer	false	"Count of requested entities"	mininum(1)	maximum(100)
@Param			offset	query	integer	false	"Offset"						mininum(1)
@Param			sort	query	string	false	"Sort order"					Enums(asc, desc)
@Param			stats	query	boolean	false	"Need join stats for block"
@Produce		json
@Success		200	{array}		responses.Block
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/block [get]

type CelestiaApiValidator

type CelestiaApiValidator struct {
	// contains filtered or unexported fields
}

func NewCelestiaApiValidator

func NewCelestiaApiValidator() *CelestiaApiValidator

func (*CelestiaApiValidator) Validate

func (v *CelestiaApiValidator) Validate(i interface{}) error

type ConstantHandler

type ConstantHandler struct {
	// contains filtered or unexported fields
}

func NewConstantHandler

func NewConstantHandler(
	constants storage.IConstant,
	denomMetadata storage.IDenomMetadata,
	address storage.IAddress,
) *ConstantHandler

func (*ConstantHandler) Enums added in v1.1.3

func (handler *ConstantHandler) Enums(c echo.Context) error

Enums godoc

@Summary		Get celenium enumerators
@Description	Get celenium enumerators
@Tags			general
@ID				get-enums
@Produce		json
@Success		200	{object}	responses.Enums
@Router			/enums [get]

func (*ConstantHandler) Get

func (handler *ConstantHandler) Get(c echo.Context) error

Get godoc

@Summary		Get network constants
@Description	Get network constants
@Tags			general
@ID				get-constants
@Produce		json
@Success		200	{object}	responses.Constants
@Success		204
@Failure		500	{object}	Error
@Router			/constants [get]

type Error

type Error struct {
	Message string `json:"message"`
}

type GasHandler added in v1.1.0

type GasHandler struct {
	// contains filtered or unexported fields
}

GasHandler -

func NewGasHandler added in v1.1.0

func NewGasHandler(
	state storage.IState,
	tx storage.ITx,
	constant storage.IConstant,
	blockStats storage.IBlockStats,
	tracker *gas.Tracker,
) GasHandler

func (GasHandler) EstimateForPfb added in v1.1.0

func (handler GasHandler) EstimateForPfb(c echo.Context) error

EstimateForPfb godoc

@Summary		Get estimated gas for pay for blob
@Description	Get estimated gas for pay for blob message with certain values of blob sizes
@Tags			gas
@ID				gas-estimate-for-pfb
@Param			sizes	query	string	true	"Comma-separated array of blob sizes"
@Produce		json
@Success		200	{object}	uint64
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/gas/estimate_for_pfb [get]

func (GasHandler) EstimatePrice added in v1.1.0

func (handler GasHandler) EstimatePrice(c echo.Context) error

EstimatePrice godoc

@Summary		Get estimated gas price
@Description	Get estimated gas price based on historical data
@Tags			gas
@ID				gas-price
@Produce		json
@Success		200	{object}	responses.GasPrice
@Router			/gas/price [get]

type MsgTypeArray

type MsgTypeArray StringArray

type NamespaceHandler

type NamespaceHandler struct {
	// contains filtered or unexported fields
}

func NewNamespaceHandler

func NewNamespaceHandler(
	namespace storage.INamespace,
	blobLogs storage.IBlobLog,
	rollups storage.IRollup,
	address storage.IAddress,
	state storage.IState,
	indexerName string,
	blob node.DalApi,
) *NamespaceHandler

func (*NamespaceHandler) Blob added in v1.1.2

func (handler *NamespaceHandler) Blob(c echo.Context) error

Blob godoc

@Summary					Get namespace blob by commitment on height
@Description				Returns blob.
@Tags						namespace
@ID							get-blob
@Param						request	body postBlobRequest	true "Request body containing height, commitment and namespace hash"
@Accept						json
@Produce					json
@Success					200	{object}	responses.Blob
@Failure					400	{object}	Error
@Router						/blob [post]

@securityDefinitions.apikey	ApiKeyAuth
@in							header
@name						apikey
@description				To authorize your requests you have to select the required tariff on our site. Then you receive api key to authorize. Api key should be passed via request header `apikey`.

func (*NamespaceHandler) BlobMetadata added in v1.8.1

func (handler *NamespaceHandler) BlobMetadata(c echo.Context) error

BlobMetadata godoc

@Summary		Get blob metadata by commitment on height
@Description	Returns blob metadata
@Tags			namespace
@ID				get-blob-metadata
@Param			request	body postBlobRequest	true "Request body containing height, commitment and namespace hash"
@Accept			json
@Produce		json
@Success		200	{object}	responses.BlobLog
@Failure		400	{object}	Error
@Router			/blob/metadata [post]

@securityDefinitions.apikey	ApiKeyAuth
@in							header
@name						apikey
@description				To authorize your requests you have to select the required tariff on our site. Then you receive api key to authorize. Api key should be passed via request header `apikey`.

func (*NamespaceHandler) Blobs added in v1.10.0

func (handler *NamespaceHandler) Blobs(c echo.Context) error

Blobs godoc

@Summary		List all blobs with filters
@Description	Returns blobs
@Tags			namespace
@ID				get-blobs
@Param			limit		query	integer	false	"Count of requested entities"					mininum(1)	maximum(100)
@Param			offset		query	integer	false	"Offset"										mininum(1)
@Param			sort		query	string	false	"Sort order. Default: desc"						Enums(asc, desc)
@Param			sort_by		query	string	false	"Sort field. If it's empty internal id is used"	Enums(time, size)
@Param			commitment	query	string	false	"Commitment value in URLbase64 format"
@Param			from		query	integer	false	"Time from in unix timestamp"	mininum(1)
@Param			to			query	integer	false	"Time to in unix timestamp"		mininum(1)
@Param			signers		query	string	false	"Comma-separated celestia addresses"
@Param			namespaces	query	string	false	"Comma-separated celestia namespaces"
@Param			cursor		query	integer	false	"Last entity id which is used for cursor pagination"	mininum(1)
@Accept			json
@Produce		json
@Success		200	{array}		responses.LightBlobLog
@Failure		400	{object}	Error
@Router			/blob [get]

func (*NamespaceHandler) Count

func (handler *NamespaceHandler) Count(c echo.Context) error

Count godoc

@Summary		Get count of namespaces in network
@Description	Get count of namespaces in network
@Tags			namespace
@ID				get-namespace-count
@Produce		json
@Success		200	{integer}	uint64
@Failure		500	{object}	Error
@Router			/namespace/count [get]

func (*NamespaceHandler) Get

func (handler *NamespaceHandler) Get(c echo.Context) error

Get godoc

@Summary		Get namespace info
@Description	Returns array of namespace versions
@Tags			namespace
@ID				get-namespace
@Param			id	path	string	true	"Namespace id in hexadecimal"	minlength(56)	maxlength(56)
@Produce		json
@Success		200	{array}		responses.Namespace
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/namespace/{id} [get]

func (*NamespaceHandler) GetActive

func (handler *NamespaceHandler) GetActive(c echo.Context) error

GetActive godoc

@Summary		Get last used namespace
@Description	Get last used namespace
@Tags			namespace
@ID				get-namespace-active
@Param			sort	query	string	false	"Sort field. Default: time"	Enums(time,pfb_count,size)
@Produce		json
@Success		200	{array}		responses.Namespace
@Failure		500	{object}	Error
@Router			/namespace/active [get]

func (*NamespaceHandler) GetBlobLogs added in v1.2.0

func (handler *NamespaceHandler) GetBlobLogs(c echo.Context) error

GetBlobLogs godoc

@Summary		Get blob changes for namespace
@Description	Returns blob changes for namespace
@Tags			namespace
@ID				get-blob-logs
@Param			id			path	string	true	"Namespace id in hexadecimal"	minlength(56)	maxlength(56)
@Param			version		path	integer	true	"Version of namespace"
@Param			limit		query	integer	false	"Count of requested entities"					mininum(1)	maximum(100)
@Param			offset		query	integer	false	"Offset"										mininum(1)
@Param			sort		query	string	false	"Sort order. Default: desc"						Enums(asc, desc)
@Param			sort_by		query	string	false	"Sort field. If it's empty internal id is used"	Enums(time, size)
@Param			commitment	query	string	false	"Commitment value in URLbase64 format"
@Param			from		query	integer	false	"Time from in unix timestamp"	mininum(1)
@Param			to			query	integer	false	"Time to in unix timestamp"		mininum(1)
@Param			joins		query	boolean	false	"Flag indicating whether entities of rollup, transaction and signer should be attached or not. Default: true"
@Param			signers		query	string	false	"Comma-separated celestia addresses"
@Param			cursor		query	integer	false	"Last entity id which is used for cursor pagination"	mininum(1)
@Produce		json
@Success		200	{array}		responses.BlobLog
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/namespace/{id}/{version}/blobs [get]

func (*NamespaceHandler) GetBlobs

func (handler *NamespaceHandler) GetBlobs(c echo.Context) error

GetBlobs godoc

@Summary		Get namespace blobs on height
@Description	Returns blobs
@Tags			namespace
@ID				get-namespace-blobs
@Param			hash	path	string	true	"Base64-encoded namespace id and version"
@Param			height	path	integer	true	"Block heigth"	minimum(1)
@Produce		json
@Success		200	{array}		responses.Blob
@Failure		400	{object}	Error
@Router			/namespace_by_hash/{hash}/{height} [get]

func (*NamespaceHandler) GetByHash

func (handler *NamespaceHandler) GetByHash(c echo.Context) error

GetByHash godoc

@Summary		Get namespace info by base64
@Description	Returns namespace by base64 encoded identity
@Tags			namespace
@ID				get-namespace-base64
@Param			hash	path	string	true	"Base64-encoded namespace id and version"
@Produce		json
@Success		200	{object}	responses.Namespace
@Success		204
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/namespace_by_hash/{hash} [get]

func (*NamespaceHandler) GetMessages

func (handler *NamespaceHandler) GetMessages(c echo.Context) error

GetMessages godoc

@Summary		Get namespace messages by id and version
@Description	Returns namespace messages by version byte and namespace id
@Tags			namespace
@ID				get-namespace-messages
@Param			id		path	string	true	"Namespace id in hexadecimal"	minlength(56)	maxlength(56)
@Param			version	path	integer	true	"Version of namespace"
@Param			limit	query	integer	false	"Count of requested entities"	mininum(1)	maximum(100)
@Param			offset	query	integer	false	"Offset"						mininum(1)
@Produce		json
@Success		200	{array}	responses.NamespaceMessage
@Success		204
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/namespace/{id}/{version}/messages [get]

func (*NamespaceHandler) GetWithVersion

func (handler *NamespaceHandler) GetWithVersion(c echo.Context) error

GetWithVersion godoc

@Summary		Get namespace info by id and version
@Description	Returns namespace by version byte and namespace id
@Tags			namespace
@ID				get-namespace-by-version-and-id
@Param			id		path	string	true	"Namespace id in hexadecimal"	minlength(56)	maxlength(56)
@Param			version	path	integer	true	"Version of namespace"
@Produce		json
@Success		200	{object}	responses.Namespace
@Success		204
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/namespace/{id}/{version} [get]

func (*NamespaceHandler) List

func (handler *NamespaceHandler) List(c echo.Context) error

List godoc

@Summary		List namespace info
@Description	List namespace info
@Tags			namespace
@ID				list-namespace
@Param			limit	query	integer	false	"Count of requested entities"					mininum(1)	maximum(100)
@Param			offset	query	integer	false	"Offset"										mininum(1)
@Param			sort	query	string	false	"Sort order. Default: desc"						Enums(asc, desc)
@Param			sort_by	query	string	false	"Sort field. If it's empty internal id is used"	Enums(time, pfb_count, size)
@Produce		json
@Success		200	{array}		responses.Namespace
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/namespace [get]

func (*NamespaceHandler) Rollups added in v1.5.0

func (handler *NamespaceHandler) Rollups(c echo.Context) error

Rollups godoc

@Summary		List rollups using the namespace
@Description	List rollups using the namespace
@Tags			namespace
@ID				get-namespace-rollups
@Param			id		path	string	true	"Namespace id in hexadecimal"	minlength(56)	maxlength(56)
@Param			version	path	integer	true	"Version of namespace"
@Param			limit	query	integer	false	"Count of requested entities"	mininum(1)	maximum(100)
@Param			offset	query	integer	false	"Offset"						mininum(1)
@Produce		json
@Success		200	{array}		responses.Rollup
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/namespace/{id}/{version}/rollups [get]

type NoRows

type NoRows interface {
	IsNoRows(err error) bool
}

type RollupAuthHandler added in v1.2.0

type RollupAuthHandler struct {
	// contains filtered or unexported fields
}

func NewRollupAuthHandler added in v1.2.0

func NewRollupAuthHandler(
	rollups storage.IRollup,
	address storage.IAddress,
	namespace storage.INamespace,
	tx sdk.Transactable,
) RollupAuthHandler

func (RollupAuthHandler) Create added in v1.2.0

func (handler RollupAuthHandler) Create(c echo.Context) error

func (RollupAuthHandler) Delete added in v1.2.0

func (handler RollupAuthHandler) Delete(c echo.Context) error

func (RollupAuthHandler) Update added in v1.2.0

func (handler RollupAuthHandler) Update(c echo.Context) error

type RollupHandler added in v1.2.0

type RollupHandler struct {
	// contains filtered or unexported fields
}

func NewRollupHandler added in v1.2.0

func NewRollupHandler(
	rollups storage.IRollup,
	namespace storage.INamespace,
	blobs storage.IBlobLog,
) RollupHandler

func (RollupHandler) AllSeries added in v1.9.10

func (handler RollupHandler) AllSeries(c echo.Context) error

AllSeries godoc

@Summary		Get series for all rollups
@Description	Get series for all rollups
@Tags			rollup
@ID				get-rollup-all-series
@Produce		json
@Success		200	{array}		responses.RollupAllSeriesItem
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/rollup/stats/series [get]

func (RollupHandler) BySlug added in v1.4.0

func (handler RollupHandler) BySlug(c echo.Context) error

BySlug godoc

@Summary		Get rollup by slug
@Description	Get rollup by slug
@Tags			rollup
@ID				get-rollup-by-slug
@Param			slug	path	string	true	"Slug"
@Produce		json
@Success		200	{object}	responses.Rollup
@Success		204
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/rollup/slug/{slug} [get]

func (RollupHandler) Count added in v1.3.2

func (handler RollupHandler) Count(c echo.Context) error

Count godoc

@Summary		Get count of rollups in network
@Description	Get count of rollups in network
@Tags			rollup
@ID				get-rollups-count
@Produce		json
@Success		200	{integer}	uint64
@Failure		500	{object}	Error
@Router			/rollup/count [get]

func (RollupHandler) Distribution added in v1.6.1

func (handler RollupHandler) Distribution(c echo.Context) error

Distribution godoc

@Summary		Get rollup distribution
@Description	Get rollup distribution
@Tags			rollup
@ID				get-rollup-distribution
@Param			id			path	integer	true	"Internal identity"	mininum(1)
@Param			name		path	string	true	"Series name"		Enums(blobs_count, size, size_per_blob, fee_per_blob)
@Param			timeframe	path	string	true	"Timeframe"			Enums(hour, day)
@Produce		json
@Success		200	{array}		responses.DistributionItem
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/rollup/{id}/distribution/{name}/{timeframe} [get]

func (RollupHandler) ExportBlobs added in v1.7.0

func (handler RollupHandler) ExportBlobs(c echo.Context) error

ExportBlobs godoc

@Summary		Export rollup blobs
@Description	Export rollup blobs
@Tags			rollup
@ID				rollup-export
@Param			id		path	integer	true	"Internal identity"				mininum(1)
@Param			from	query	integer	false	"Time from in unix timestamp"	mininum(1)
@Param			to		query	integer	false	"Time to in unix timestamp"		mininum(1)
@Success		200
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/rollup/{id}/export [get]

func (RollupHandler) Get added in v1.2.0

func (handler RollupHandler) Get(c echo.Context) error

Get godoc

@Summary		Get rollup info
@Description	Get rollup info
@Tags			rollup
@ID				get-rollup
@Param			id	path	integer	true	"Internal identity"	mininum(1)
@Produce		json
@Success		200	{object}	responses.Rollup
@Success		204
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/rollup/{id} [get]

func (RollupHandler) GetBlobs added in v1.2.0

func (handler RollupHandler) GetBlobs(c echo.Context) error

GetBlobs godoc

@Summary		Get rollup blobs
@Description	Get rollup blobs
@Tags			rollup
@ID				get-rollup-blobs
@Param			id		path	integer	true	"Internal identity"								mininum(1)
@Param			limit	query	integer	false	"Count of requested entities"					mininum(1)	maximum(100)
@Param			offset	query	integer	false	"Offset"										mininum(1)
@Param			sort	query	string	false	"Sort order. Default: desc"						Enums(asc, desc)
@Param			sort_by	query	string	false	"Sort field. If it's empty internal id is used"	Enums(time, size)
@Param			joins	query	boolean	false	"Flag indicating whether entities of transaction and signer should be attached or not. Default: true"
@Produce		json
@Success		200	{array}		responses.BlobLog
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/rollup/{id}/blobs [get]

func (RollupHandler) GetNamespaces added in v1.2.0

func (handler RollupHandler) GetNamespaces(c echo.Context) error

GetNamespaces godoc

@Summary		Get rollup namespaces info
@Description	Get rollup namespaces info
@Tags			rollup
@ID				get-rollup-namespaces
@Param			id		path	integer	true	"Internal identity"				mininum(1)
@Param			limit	query	integer	false	"Count of requested entities"	mininum(1)	maximum(100)
@Param			offset	query	integer	false	"Offset"						mininum(1)
@Produce		json
@Success		200	{array}		responses.Namespace
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/rollup/{id}/namespaces [get]

func (RollupHandler) Leaderboard added in v1.2.0

func (handler RollupHandler) Leaderboard(c echo.Context) error

Leaderboard godoc

	@Summary		List rollups info
	@Description	List rollups info
	@Tags			rollup
	@ID				list-rollup
	@Param			limit	 query	integer	false	"Count of requested entities"	mininum(1)	maximum(100)
	@Param			offset	 query	integer	false	"Offset"						mininum(1)
	@Param			sort	 query	string	false	"Sort order. Default: desc"		Enums(asc, desc)
	@Param			sort_by	 query	string	false	"Sort field. Default: size"		Enums(time, blobs_count, size, fee)
    @Param          category query  string  false   "Comma-separated rollup category list"
	@Produce		json
	@Success		200	{array}		responses.RollupWithStats
	@Failure		400	{object}	Error
	@Failure		500	{object}	Error
	@Router			/rollup [get]

func (RollupHandler) LeaderboardDay added in v1.9.10

func (handler RollupHandler) LeaderboardDay(c echo.Context) error

LeaderboardDay godoc

@Summary		List rollups info with stats by previous 24 hours
@Description	List rollups info with stats by previous 24 hours
@Tags			rollup
@ID				list-rollup-24h
@Param			limit	query	integer	false	"Count of requested entities"	mininum(1)	maximum(100)
@Param			offset	query	integer	false	"Offset"						mininum(1)
@Param			sort	query	string	false	"Sort order. Default: desc"		Enums(asc, desc)
@Param			sort_by	query	string	false	"Sort field. Default: mb_price"	Enums(avg_size, blobs_count, total_size, total_fee, throughput, namespace_count, pfb_count, mb_price)
@Param          category query  string  false   "Comma-separated rollup category list"
@Produce		json
@Success		200	{array}		responses.RollupWithDayStats
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/rollup/day [get]

func (RollupHandler) RollupGroupedStats added in v1.10.8

func (handler RollupHandler) RollupGroupedStats(c echo.Context) error

RollupGroupedStats godoc

@Summary		Rollup Grouped Statistics
@Description	Rollup Grouped Statistics
@Tags			rollup
@ID				rollup-grouped-statistics
@Param			func	query	string	false	"Aggregate function"	Enums(sum, avg)
@Param			column	query	string	false	"Group column"	Enums(stack, type, category, vm, provider)
@Produce		json
@Success		200	{array}		responses.RollupGroupedStats
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/rollup/group [get]

func (RollupHandler) Stats added in v1.2.0

func (handler RollupHandler) Stats(c echo.Context) error

Stats godoc

@Summary		Get rollup stats
@Description	Get rollup stats
@Tags			rollup
@ID				get-rollup-stats
@Param			id			path	integer	true	"Internal identity"				mininum(1)
@Param			name		path	string	true	"Series name"					Enums(blobs_count, size, size_per_blob, fee)
@Param			timeframe	path	string	true	"Timeframe"						Enums(hour, day, month)
@Param			from		query	integer	false	"Time from in unix timestamp"	mininum(1)
@Param			to			query	integer	false	"Time to in unix timestamp"		mininum(1)
@Produce		json
@Success		200	{array}		responses.HistogramItem
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/rollup/{id}/stats/{name}/{timeframe} [get]

type SearchHandler

type SearchHandler struct {
	// contains filtered or unexported fields
}

func NewSearchHandler

func NewSearchHandler(
	search storage.ISearch,
	address storage.IAddress,
	block storage.IBlock,
	tx storage.ITx,
	namespace storage.INamespace,
	validator storage.IValidator,
	rollup storage.IRollup,
) SearchHandler

func (SearchHandler) Search

func (handler SearchHandler) Search(c echo.Context) error

Search godoc

@Summary				Search by hash
@Description.markdown	search
@Tags					search
@ID						search
@Param					query	query	string	true	"Search string"
@Produce				json
@Success				200	{array}	responses.SearchItem
@Success				204
@Failure				400	{object}	Error
@Failure				500	{object}	Error
@Router					/search [get]

type StateHandler

type StateHandler struct {
	// contains filtered or unexported fields
}

func NewStateHandler

func NewStateHandler(state storage.IState, validator storage.IValidator, indexerName string) *StateHandler

func (*StateHandler) Head

func (sh *StateHandler) Head(c echo.Context) error

Head godoc

@Summary		Get current indexer head
@Description	Get current indexer head
@Tags			general
@ID				head
@Produce		json
@Success		200	{object}	responses.State
@Success		204
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/head [get]

type StatsHandler

type StatsHandler struct {
	// contains filtered or unexported fields
}

func NewStatsHandler

func NewStatsHandler(repo storage.IStats, nsRepo storage.INamespace, price storage.IPrice, state storage.IState) StatsHandler

func (StatsHandler) Change24hBlockStats added in v1.9.7

func (sh StatsHandler) Change24hBlockStats(c echo.Context) error

Change24hBlockStats godoc

@Summary		Get changes for 24 hours
@Description	Get changes for 24 hours
@Tags			stats
@ID				stats-24h-changes
@Produce		json
@Success		200	{array}		responses.Change24hBlockStats
@Failure		500	{object}	Error
@Router			/stats/changes_24h [get]

func (StatsHandler) MessagesCount24h added in v1.9.7

func (sh StatsHandler) MessagesCount24h(c echo.Context) error

MessagesCount24h godoc

@Summary		Get messages distribution for the last 24 hours
@Description	Get messages distribution for the last 24 hours
@Tags			stats
@ID				stats-messages-count-24h
@Produce		json
@Success		200	{array}		responses.CountItem
@Failure		500	{object}	Error
@Router			/stats/messages_count_24h [get]

func (StatsHandler) NamespaceSeries added in v1.1.0

func (sh StatsHandler) NamespaceSeries(c echo.Context) error

NamespaceSeries godoc

@Summary		Get histogram for namespace with precomputed stats
@Description	Get histogram for namespace with precomputed stats by series name and timeframe
@Tags			stats
@ID				stats-ns-series
@Param			id			path	string	true	"Namespace id in hexadecimal"	minlength(56)	maxlength(56)
@Param			timeframe	path	string	true	"Timeframe"						Enums(hour, day, week, month, year)
@Param			name		path	string	true	"Series name"					Enums(pfb_count, size)
@Param			from		query	integer	false	"Time from in unix timestamp"	mininum(1)
@Param			to			query	integer	false	"Time to in unix timestamp"		mininum(1)
@Produce		json
@Success		200	{array}		responses.SeriesItem
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/stats/namespace/series/{id}/{name}/{timeframe} [get]

func (StatsHandler) NamespaceUsage added in v1.1.0

func (sh StatsHandler) NamespaceUsage(c echo.Context) error

NamespaceUsage godoc

@Summary		Get namespaces with sorting by size.
@Description	Get namespaces with sorting by size. Returns top 100 namespaces. Namespaces which is not included to top 100 grouped into 'others' item
@Tags			stats
@ID				stats-namespace-usage
@Param			top	query	integer	false	"Count of entities"	mininum(1)	maximum(100)
@Produce		json
@Success		200	{array}		responses.NamespaceUsage
@Failure		500	{object}	Error
@Router			/stats/namespace/usage [get]

func (StatsHandler) PriceCurrent added in v1.2.0

func (sh StatsHandler) PriceCurrent(c echo.Context) error

PriceCurrent godoc

@Summary		Get current TIA price
@Description	Get current TIA price
@Tags			stats
@ID				stats-price-current
@Produce		json
@Success		200	{object}	responses.Price
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/stats/price/current [get]

func (StatsHandler) PriceSeries added in v1.2.0

func (sh StatsHandler) PriceSeries(c echo.Context) error

PriceSeries godoc

@Summary		Get histogram with TIA price
@Description	Get histogram with TIA price
@Tags			stats
@ID				stats-price-series
@Param			timeframe	path	string	true	"Timeframe"						Enums(1m, 1h, 1d)
@Param			from		query	integer	false	"Time from in unix timestamp"	mininum(1)
@Param			to			query	integer	false	"Time to in unix timestamp"		mininum(1)
@Produce		json
@Success		200	{array}		responses.Price
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/stats/price/series/{timeframe} [get]

func (StatsHandler) RollupStats24h added in v1.9.7

func (sh StatsHandler) RollupStats24h(c echo.Context) error

RollupStats24h godoc

@Summary		Get rollups stats for last 24 hours
@Description	Get rollups stats for last 24 hours
@Tags			stats
@ID				stats-rollup-24h
@Produce		json
@Success		200	{array}		responses.RollupStats24h
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/stats/rollup_stats_24h [get]

func (StatsHandler) Series added in v1.1.0

func (sh StatsHandler) Series(c echo.Context) error

Series godoc

@Summary		Get histogram with precomputed stats
@Description	Get histogram with precomputed stats by series name and timeframe
@Tags			stats
@ID				stats-series
@Param			timeframe	path	string	true	"Timeframe"						Enums(hour, day, week, month, year)
@Param			name		path	string	true	"Series name"					Enums(blobs_size, blobs_count, tps, bps, fee, supply_change, block_time, tx_count, events_count, gas_price, gas_efficiency, gas_used, gas_limit, bytes_in_block, rewards, commissions)
@Param			from		query	integer	false	"Time from in unix timestamp"	mininum(1)
@Param			to			query	integer	false	"Time to in unix timestamp"		mininum(1)
@Produce		json
@Success		200	{array}		responses.SeriesItem
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/stats/series/{name}/{timeframe} [get]

func (StatsHandler) SeriesCumulative added in v1.9.1

func (sh StatsHandler) SeriesCumulative(c echo.Context) error

SeriesCumulative godoc

@Summary		Get cumulative histogram with precomputed stats
@Description	Get cumulative histogram with precomputed stats by series name and timeframe
@Tags			stats
@ID				stats-series-cumulative
@Param			timeframe	path	string	true	"Timeframe"						Enums(hour, day, week, month, year)
@Param			name		path	string	true	"Series name"					Enums(blobs_size, blobs_count, fee, tx_count, gas_used, gas_limit, bytes_in_block, supply_change)
@Param			from		query	integer	false	"Time from in unix timestamp"	mininum(1)
@Param			to			query	integer	false	"Time to in unix timestamp"		mininum(1)
@Produce		json
@Success		200	{array}		responses.SeriesItem
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/stats/series/{name}/{timeframe}/cumulative [get]

func (StatsHandler) SquareSize added in v1.9.6

func (sh StatsHandler) SquareSize(c echo.Context) error

SquareSize godoc

@Summary		Get histogram for square size distribution
@Description	Get histogram for square size distribution
@Tags			stats
@ID				stats-square-size
@Param			from	query	integer	false	"Time from in unix timestamp"	mininum(1)
@Param			to		query	integer	false	"Time to in unix timestamp"		mininum(1)
@Produce		json
@Success		200	{array}		responses.SquareSizeResponse
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/stats/square_size [get]

func (StatsHandler) StakingSeries added in v1.6.0

func (sh StatsHandler) StakingSeries(c echo.Context) error

StakingSeries godoc

@Summary		Get histogram for staking with precomputed stats
@Description	Get histogram for staking with precomputed stats by series name and timeframe
@Tags			stats
@ID				stats-staking-series
@Param			id			path	string	true	"Validator id"					minlength(56)	maxlength(56)
@Param			timeframe	path	string	true	"Timeframe"						Enums(hour, day, month)
@Param			name		path	string	true	"Series name"					Enums(rewards, commissions, flow)
@Param			from		query	integer	false	"Time from in unix timestamp"	mininum(1)
@Param			to			query	integer	false	"Time to in unix timestamp"		mininum(1)
@Produce		json
@Success		200	{array}		responses.SeriesItem
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/stats/staking/series/{id}/{name}/{timeframe} [get]

func (StatsHandler) Summary

func (sh StatsHandler) Summary(c echo.Context) error

Summary godoc

@Summary				Get value by table and function
@Description.markdown	summary
@Tags					stats
@ID						stats-summary
@Param					table		path	string	true	"Table name"	Enums(block, block_stats, tx, event, message, validator)
@Param					function	path	string	true	"Function name"	Enums(min, max, avg, sum, count)
@Param					column		query	string	false	"Column name which will be used for computation. Optional for count."
@Param					from		query	integer	false	"Time from in unix timestamp"	mininum(1)
@Param					to			query	integer	false	"Time to in unix timestamp"		mininum(1)
@Produce				json
@Success				200	{object}	string
@Failure				400	{object}	Error
@Failure				500	{object}	Error
@Router					/stats/summary/{table}/{function} [get]

func (StatsHandler) TPS added in v1.1.0

func (sh StatsHandler) TPS(c echo.Context) error

TPS godoc

@Summary		Get tps
@Description	Returns transaction per seconds statistics
@Tags			stats
@ID				stats-tps
@x-internal		true
@Produce		json
@Success		200	{object}	responses.TPS
@Failure		500	{object}	Error
@Router			/stats/tps [get]

type StatusArray

type StatusArray StringArray

type StringArray

type StringArray []string

func (*StringArray) UnmarshalParam

func (s *StringArray) UnmarshalParam(param string) error

type TxHandler

type TxHandler struct {
	// contains filtered or unexported fields
}

func NewTxHandler

func NewTxHandler(
	tx storage.ITx,
	events storage.IEvent,
	messages storage.IMessage,
	namespaces storage.INamespace,
	blobLogs storage.IBlobLog,
	state storage.IState,
	indexerName string,
) *TxHandler

func (*TxHandler) Blobs added in v1.3.2

func (handler *TxHandler) Blobs(c echo.Context) error

Blobs godoc

@Summary		List blobs which was pushed by transaction
@Description	List blobs which was pushed by transaction
@Tags			transactions
@ID				list-transaction-blobs
@Param			hash	path	string	true	"Transaction hash in hexadecimal"				minlength(64)	maxlength(64)
@Param			limit	query	integer	false	"Count of requested entities"					mininum(1)	maximum(100)
@Param			offset	query	integer	false	"Offset"										mininum(1)
@Param			sort	query	string	false	"Sort order. Default: desc"						Enums(asc, desc)
@Param			sort_by	query	string	false	"Sort field. If it's empty internal id is used"	Enums(time, size)
@Produce		json
@Success		200	{array}		responses.BlobLog
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/tx/{hash}/blobs [get]

func (*TxHandler) BlobsCount added in v1.3.2

func (handler *TxHandler) BlobsCount(c echo.Context) error

BlobsCount godoc

@Summary		Count of blobs which was pushed by transaction
@Description	Count of blobs which was pushed by transaction
@Tags			transactions
@ID				transaction-blobs-count
@Param			hash	path	string	true	"Transaction hash in hexadecimal"				minlength(64)	maxlength(64)
@Produce		json
@Success		200	{integer}	uint64
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/tx/{hash}/blobs/count [get]

func (*TxHandler) Count

func (handler *TxHandler) Count(c echo.Context) error

Count godoc

@Summary		Get count of transactions in network
@Description	Get count of transactions in network
@Tags			transactions
@ID				get-transactions-count
@Produce		json
@Success		200	{integer}	uint64
@Failure		500	{object}	Error
@Router			/tx/count [get]

func (*TxHandler) Genesis

func (handler *TxHandler) Genesis(c echo.Context) error

Genesis godoc

@Summary		List genesis transactions info
@Description	List genesis transactions info
@Tags			transactions
@ID				list-genesis-transactions
@Param			limit	query	integer	false	"Count of requested entities"	mininum(1)	maximum(100)
@Param			offset	query	integer	false	"Offset"						mininum(1)
@Param			sort	query	string	false	"Sort order"					Enums(asc, desc)
@Produce		json
@Success		200	{array}		responses.Tx
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/tx/genesis [get]

func (*TxHandler) Get

func (handler *TxHandler) Get(c echo.Context) error

Get godoc

@Summary		Get transaction by hash
@Description	Get transaction by hash
@Tags			transactions
@ID				get-transaction
@Param			hash	path	string	true	"Transaction hash in hexadecimal"	minlength(64)	maxlength(64)
@Produce		json
@Success		200	{object}	responses.Tx
@Success		204
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/tx/{hash} [get]

func (*TxHandler) GetEvents

func (handler *TxHandler) GetEvents(c echo.Context) error

GetEvents godoc

@Summary		Get transaction events
@Description	Get transaction events
@Tags			transactions
@ID				get-transaction-events
@Param			hash	path	string	true	"Transaction hash in hexadecimal"	minlength(64)	maxlength(64)
@Param			limit	query	integer	false	"Count of requested entities"		mininum(1)	maximum(100)
@Param			offset	query	integer	false	"Offset"							mininum(1)
@Produce		json
@Success		200	{array}		responses.Event
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/tx/{hash}/events [get]

func (*TxHandler) GetMessages

func (handler *TxHandler) GetMessages(c echo.Context) error

GetMessages godoc

@Summary		Get transaction messages
@Description	Get transaction messages
@Tags			transactions
@ID				get-transaction-messages
@Param			hash	path	string	true	"Transaction hash in hexadecimal"	minlength(64)	maxlength(64)
@Param			limit	query	integer	false	"Count of requested entities"		mininum(1)	maximum(100)
@Param			offset	query	integer	false	"Offset"							mininum(1)
@Produce		json
@Success		200	{array}		responses.Message
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/tx/{hash}/messages [get]

func (*TxHandler) List

func (handler *TxHandler) List(c echo.Context) error

List godoc

@Summary		List transactions info
@Description	List transactions info
@Tags			transactions
@ID				list-transactions
@Param			limit				query	integer			false	"Count of requested entities"	mininum(1)	maximum(100)
@Param			offset				query	integer			false	"Offset"						mininum(1)
@Param			sort				query	string			false	"Sort order"					Enums(asc, desc)
@Param			status				query	types.Status	false	"Comma-separated status list"
@Param			msg_type			query	types.MsgType	false	"Comma-separated message types list"
@Param			excluded_msg_type	query	types.MsgType	false	"Comma-separated message types list which should be excluded"
@Param			from				query	integer			false	"Time from in unix timestamp"	mininum(1)
@Param			to					query	integer			false	"Time to in unix timestamp"		mininum(1)
@Param			height				query	integer			false	"Block number"					mininum(1)
@Param			messages			query	boolean			false	"If true join messages"			mininum(1)
@Produce		json
@Success		200	{array}		responses.Tx
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/tx [get]

type ValidatorHandler added in v1.1.0

type ValidatorHandler struct {
	// contains filtered or unexported fields
}

func NewValidatorHandler added in v1.1.0

func NewValidatorHandler(
	validators storage.IValidator,
	blocks storage.IBlock,
	blockSignatures storage.IBlockSignature,
	delegations storage.IDelegation,
	constants storage.IConstant,
	jails storage.IJail,
	state storage.IState,
	indexerName string,
) *ValidatorHandler

func (*ValidatorHandler) Blocks added in v1.4.0

func (handler *ValidatorHandler) Blocks(c echo.Context) error

Blocks godoc

@Summary		Get blocks which was proposed by validator
@Description	Get blocks which was proposed by validator
@Tags			validator
@ID				get-validator-blocks
@Param			id		path	integer	true	"Internal validator id"
@Param			limit	query	integer	false	"Count of requested entities"	mininum(1)	maximum(100)
@Param			offset	query	integer	false	"Offset"						mininum(1)
@Produce		json
@Success		200	{object}	responses.Block
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/validators/{id}/blocks [get]

func (*ValidatorHandler) Count added in v1.6.0

func (handler *ValidatorHandler) Count(c echo.Context) error

Count godoc

@Summary		Get validator's count by status
@Description	Get validator's count by status
@Tags			validator
@ID				validator-count
@Produce		json
@Success		200	{object}	responses.ValidatorCount
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/validators/count [get]

func (*ValidatorHandler) Delegators added in v1.6.0

func (handler *ValidatorHandler) Delegators(c echo.Context) error

Delegators godoc

@Summary		Get validator's delegators
@Description	Get validator's delegators
@Tags			validator
@ID				validator-delegators
@Param			id			path	integer	true	"Internal validator id"
@Param			limit		query	integer	false	"Count of requested entities"	minimum(1)	maximum(100)
@Param			offset		query	integer	false	"Offset"						minimum(1)
@Param			show_zero	query	boolean	false	"Show zero delegations"
@Produce		json
@Success		200	{array}		responses.Delegation
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/validators/{id}/delegators [get]

func (*ValidatorHandler) Get added in v1.1.0

func (handler *ValidatorHandler) Get(c echo.Context) error

Get godoc

@Summary		Get validator info
@Description	Get validator info
@Tags			validator
@ID				get-validator
@Param			id	path	integer	true	"Internal validator id"
@Produce		json
@Success		200	{object}	responses.Validator
@Success		204
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/validators/{id} [get]

func (*ValidatorHandler) Jails added in v1.6.0

func (handler *ValidatorHandler) Jails(c echo.Context) error

Jails godoc

@Summary		Get validator's jails
@Description	Get validator's jails
@Tags			validator
@ID				validator-jails
@Param			id		path	integer	true	"Internal validator id"
@Param			limit	query	integer	false	"Count of requested entities"	minimum(1)	maximum(100)
@Param			offset	query	integer	false	"Offset"						minimum(1)
@Produce		json
@Success		200	{array}		responses.Jail
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/validators/{id}/jails [get]

func (*ValidatorHandler) List added in v1.1.0

func (handler *ValidatorHandler) List(c echo.Context) error

List godoc

@Summary		List validators
@Description	List validators
@Tags			validator
@ID				list-validator
@Param			limit	query	integer	false	"Count of requested entities"	mininum(1)	maximum(100)
@Param			offset	query	integer	false	"Offset"						mininum(1)
@Param			jailed	query	boolean	false	"Return only jailed validators"
@Produce		json
@Success		200	{array}		responses.Validator
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/validators [get]

func (*ValidatorHandler) Uptime added in v1.4.0

func (handler *ValidatorHandler) Uptime(c echo.Context) error

Uptime godoc

@Summary		Get validator's uptime and history of signed block
@Description	Get validator's uptime and history of signed block
@Tags			validator
@ID				get-validator-uptime
@Param			id		path	integer	true	"Internal validator id"
@Param			limit	query	integer	false	"Count of requested blocks"	mininum(1)	maximum(100)
@Produce		json
@Success		200	{object}	responses.ValidatorUptime
@Success		204
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/validators/{id}/uptime [get]

type VestingHandler added in v1.7.0

type VestingHandler struct {
	// contains filtered or unexported fields
}

func NewVestingHandler added in v1.7.0

func NewVestingHandler(vestings storage.IVestingPeriod) *VestingHandler

func (*VestingHandler) Periods added in v1.7.0

func (handler *VestingHandler) Periods(c echo.Context) error

Periods godoc

@Summary		Periods vesting periods by id
@Description	Periods vesting periods by id. Returns not empty array only for periodic vestings.
@Tags			vesting
@ID				get-vesting-periods
@Param			id		path	integer	true	"Internal identity"
@Param			limit	query	integer	false	"Count of requested entities"	mininum(1)	maximum(100)
@Param			offset	query	integer	false	"Offset"						mininum(1)
@Produce		json
@Success		200	{object}	responses.VestingPeriod
@Failure		400	{object}	Error
@Failure		500	{object}	Error
@Router			/vesting/{id}/periods [get]

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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