Documentation ¶
Index ¶
- type Controller
- func (c *Controller) AggregateAccounts(ctx *gin.Context)
- func (c *Controller) AggregateAccountsHistory(ctx *gin.Context)
- func (c *Controller) AggregateMessages(ctx *gin.Context)
- func (c *Controller) AggregateMessagesHistory(ctx *gin.Context)
- func (c *Controller) AggregateTransactionsHistory(ctx *gin.Context)
- func (c *Controller) GetAccounts(ctx *gin.Context)
- func (c *Controller) GetBlocks(ctx *gin.Context)
- func (c *Controller) GetInterfaces(ctx *gin.Context)
- func (c *Controller) GetMessages(ctx *gin.Context)
- func (c *Controller) GetOperations(ctx *gin.Context)
- func (c *Controller) GetStatistics(ctx *gin.Context)
- func (c *Controller) GetTransactions(ctx *gin.Context)
- type GetInterfacesRes
- type GetOperationsRes
- type QueryController
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(svc app.QueryService) *Controller
func (*Controller) AggregateAccounts ¶
func (c *Controller) AggregateAccounts(ctx *gin.Context)
AggregateAccounts godoc
@Summary aggregated account data @Description Aggregates FT or NFT data filtered by minter address @Tags account @Accept json @Produce json @Param minter_address query string true "NFT collection or FT master address" @Param limit query int false "limit" default(25) maximum(1000000) @Success 200 {object} aggregate.AccountsRes @Router /accounts/aggregated [get]
func (*Controller) AggregateAccountsHistory ¶
func (c *Controller) AggregateAccountsHistory(ctx *gin.Context)
AggregateAccountsHistory godoc
@Summary aggregated accounts grouped by timestamp @Description Counts accounts @Tags account @Accept json @Produce json @Param metric query string true "metric to show" Enums(active_addresses) @Param interface query []string false "filter by interfaces" @Param minter_address query string false "NFT collection or FT master address" @Param from query string false "from timestamp" @Param to query string false "to timestamp" @Param interval query string true "group interval" Enums(24h, 8h, 4h, 1h, 15m) @Success 200 {object} history.AccountsRes @Router /accounts/aggregated/history [get]
func (*Controller) AggregateMessages ¶
func (c *Controller) AggregateMessages(ctx *gin.Context)
AggregateMessages godoc
@Summary aggregated messages @Description Aggregates receivers and senders @Tags transaction @Accept json @Produce json @Param address query string true "address to aggregate by" @Param order_by query string true "order aggregated by amount or message count" Enums(amount, count) default(amount) @Param limit query int false "limit" default(25) maximum(1000000) @Success 200 {object} aggregate.MessagesRes @Router /messages/aggregated [get]
func (*Controller) AggregateMessagesHistory ¶
func (c *Controller) AggregateMessagesHistory(ctx *gin.Context)
AggregateMessagesHistory godoc
@Summary aggregated messages grouped by timestamp @Description Counts messages or sums amount @Tags transaction @Accept json @Produce json @Param metric query string true "metric to show" Enums(message_count, message_amount_sum) @Param src_address query []string false "source address" @Param dst_address query []string false "destination address" @Param src_contract query []string false "source contract interface" @Param dst_contract query []string false "destination contract interface" @Param operation_name query []string false "filter by contract operation names" @Param minter_address query string false "filter FT or NFT operations by minter address" @Param from query string false "from timestamp" @Param to query string false "to timestamp" @Param interval query string true "group interval" Enums(24h, 8h, 4h, 1h, 15m) @Success 200 {object} history.MessagesRes @Router /messages/aggregated/history [get]
func (*Controller) AggregateTransactionsHistory ¶
func (c *Controller) AggregateTransactionsHistory(ctx *gin.Context)
AggregateTransactionsHistory godoc
@Summary aggregated transactions grouped by timestamp @Description Counts transactions @Tags transaction @Accept json @Produce json @Param metric query string true "metric to show" Enums(transaction_count) @Param address query []string false "tx address" @Param workchain query int32 false "filter by workchain" @Param from query string false "from timestamp" @Param to query string false "to timestamp" @Param interval query string true "group interval" Enums(24h, 8h, 4h, 1h, 15m) @Success 200 {object} history.TransactionsRes @Router /transactions/aggregated/history [get]
func (*Controller) GetAccounts ¶
func (c *Controller) GetAccounts(ctx *gin.Context)
GetAccounts godoc
@Summary account data @Description Returns account states and its parsed data @Tags account @Accept json @Produce json @Param address query []string false "only given addresses" @Param latest query bool false "only latest account states" @Param interface query []string false "filter by interfaces" @Param owner_address query string false "filter FT wallets or NFT items by owner address" @Param minter_address query string false "filter FT wallets or NFT items by minter address" @Param order query string false "order by last_tx_lt" Enums(ASC, DESC) default(DESC) @Param after query int false "start from this last_tx_lt" @Param limit query int false "limit" default(3) maximum(10000) @Success 200 {object} filter.AccountsRes @Router /accounts [get]
func (*Controller) GetBlocks ¶
func (c *Controller) GetBlocks(ctx *gin.Context)
GetBlocks godoc
@Summary block info @Description Returns filtered blocks @Tags block @Accept json @Produce json @Param workchain query int false "workchain" default(-1) @Param shard query int64 false "shard" @Param seq_no query int false "seq_no" @Param with_transactions query bool false "include transactions" default(false) @Param order query string false "order by seq_no" Enums(ASC, DESC) default(DESC) @Param after query int false "start from this seq_no" @Param limit query int false "limit" default(3) maximum(100) @Success 200 {object} filter.BlocksRes @Router /blocks [get]
func (*Controller) GetInterfaces ¶
func (c *Controller) GetInterfaces(ctx *gin.Context)
GetInterfaces godoc
@Summary contract interfaces @Description Returns known contract interfaces @Tags contract @Accept json @Produce json @Success 200 {object} GetInterfacesRes @Router /contract/interfaces [get]
func (*Controller) GetMessages ¶
func (c *Controller) GetMessages(ctx *gin.Context)
GetMessages godoc
@Summary transaction messages @Description Returns filtered messages @Tags transaction @Accept json @Produce json @Param hash query string false "msg hash" @Param src_address query []string false "source address" @Param dst_address query []string false "destination address" @Param operation_id query string false "operation id in hex format or as int32" @Param src_contract query []string false "source contract interface" @Param dst_contract query []string false "destination contract interface" @Param operation_name query []string false "filter by contract operation names" @Param minter_address query string false "filter FT or NFT operations by minter address" @Param order query string false "order by created_lt" Enums(ASC, DESC) default(DESC) @Param after query int false "start from this created_lt" @Param limit query int false "limit" default(3) maximum(10000) @Success 200 {object} filter.MessagesRes @Router /messages [get]
func (*Controller) GetOperations ¶
func (c *Controller) GetOperations(ctx *gin.Context)
GetOperations godoc
@Summary contract operations @Description Returns known contract message payloads schema @Tags contract @Accept json @Produce json @Success 200 {object} GetOperationsRes @Router /contract/operations [get]
func (*Controller) GetStatistics ¶
func (c *Controller) GetStatistics(ctx *gin.Context)
GetStatistics godoc
@Summary statistics on all tables @Description Returns statistics on blocks, transactions, messages and accounts @Tags statistics @Accept json @Produce json @Success 200 {object} aggregate.Statistics @Router /statistics [get]
func (*Controller) GetTransactions ¶
func (c *Controller) GetTransactions(ctx *gin.Context)
GetTransactions godoc
@Summary transactions data @Description Returns transactions, states and messages @Tags transaction @Accept json @Produce json @Param address query []string false "only given addresses" @Param hash query string false "search by tx hash" @Param in_msg_hash query string false "search by incoming message hash" @Param workchain query int32 false "filter by workchain" @Param order query string false "order by created_lt" Enums(ASC, DESC) default(DESC) @Param after query int false "start from this created_lt" @Param limit query int false "limit" default(3) maximum(10000) @Success 200 {object} filter.TransactionsRes @Router /transactions [get]
type GetInterfacesRes ¶
type GetInterfacesRes struct { Total int `json:"total"` Results []*core.ContractInterface `json:"results"` }
type GetOperationsRes ¶
type GetOperationsRes struct { Total int `json:"total"` Results []*core.ContractOperation `json:"results"` }
type QueryController ¶
type QueryController interface { GetStatistics(*gin.Context) GetBlocks(*gin.Context) GetAccounts(*gin.Context) AggregateAccounts(ctx *gin.Context) AggregateAccountsHistory(ctx *gin.Context) GetTransactions(*gin.Context) AggregateTransactionsHistory(*gin.Context) GetMessages(*gin.Context) AggregateMessages(*gin.Context) AggregateMessagesHistory(*gin.Context) GetInterfaces(*gin.Context) GetOperations(*gin.Context) }
Click to show internal directories.
Click to hide internal directories.