handlers

package
v0.0.0-...-b1b3a06 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: MIT Imports: 50 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CodeFromMichelson

func CodeFromMichelson() gin.HandlerFunc

CodeFromMichelson -

func ContextsMiddleware

func ContextsMiddleware(ctxs config.Contexts) gin.HandlerFunc

ContextsMiddleware -

func ContractsCount

func ContractsCount() gin.HandlerFunc

ContractsCount godoc @Summary Get contracts count @Description Get contracts count @Tags statistics @ID get-contracts-count @Param network path string true "Network" @Accept json @Produce json @Success 200 {integer} integer @Failure 400 {object} Error @Failure 500 {object} Error @Router /v1/stats/{network}/contracts_count [get]

func ContractsHelpers

func ContractsHelpers() gin.HandlerFunc

ContractsHelpers -

func ExecuteView

func ExecuteView() gin.HandlerFunc

ExecuteView godoc @Summary Execute view of contracts metadata @Description Execute view of contracts metadata @Tags contract @ID contract-execute-view @Param network path string true "Network" @Param address path string true "KT address" minlength(36) maxlength(36) @Param body body executeViewRequest true "Request body" @Accept json @Produce json @Success 200 {array} ast.MiguelNode @Failure 400 {object} Error @Failure 404 {object} Error @Failure 500 {object} Error @Router /v1/contract/{network}/{address}/views/execute [post]

func ForkContract

func ForkContract(ctxs config.Contexts) gin.HandlerFunc

ForkContract -

func GetBigMap

func GetBigMap() gin.HandlerFunc

GetBigMap godoc @Summary Get big map info by pointer @Description Get big map info by pointer @Tags bigmap @ID get-bigmap @Param network path string true "Network" @Param ptr path integer true "Big map pointer" @Accept json @Produce json @Success 200 {object} GetBigMapResponse @Failure 400 {object} Error @Failure 500 {object} Error @Router /v1/bigmap/{network}/{ptr} [get]

func GetBigMapByKeyHash

func GetBigMapByKeyHash() gin.HandlerFunc

GetBigMapByKeyHash godoc @Summary Get big map diffs by pointer and key hash @Description Get big map diffs by pointer and key hash @Tags bigmap @ID get-bigmap-keyhash @Param network path string true "Network" @Param ptr path integer true "Big map pointer" @Param key_hash path string true "Key hash in big map" minlength(54) maxlength(54) @Param offset query integer false "Offset" @Param size query integer false "Requested count" mininum(1) maximum(10) @Accept json @Produce json @Success 200 {object} BigMapDiffByKeyResponse @Success 204 {object} gin.H @Failure 400 {object} Error @Failure 500 {object} Error @Router /v1/bigmap/{network}/{ptr}/keys/{key_hash} [get]

func GetBigMapDiffCount

func GetBigMapDiffCount() gin.HandlerFunc

GetBigMapDiffCount godoc @Summary Get big map diffs count info by pointer @Description Get big map diffs count info by pointer @Tags bigmap @ID get-bigmapdiff-count @Param network path string true "Network" @Param ptr path integer true "Big map pointer" @Accept json @Produce json @Success 200 {object} CountResponse @Failure 400 {object} Error @Failure 500 {object} Error @Router /v1/bigmap/{network}/{ptr}/count [get]

func GetBigMapHistory

func GetBigMapHistory() gin.HandlerFunc

GetBigMapHistory godoc @Summary Get big map actions (alloc/copy/remove) @Description Get big map actions (alloc/copy/remove) @Tags bigmap @ID get-bigmap-history @Param network path string true "Network" @Param ptr path integer true "Big map pointer" @Accept json @Produce json @Success 200 {object} BigMapHistoryResponse @Success 204 {object} gin.H @Failure 400 {object} Error @Failure 500 {object} Error @Router /v1/bigmap/{network}/{ptr}/history [get]

func GetBigMapKeys

func GetBigMapKeys() gin.HandlerFunc

GetBigMapKeys godoc @Summary Get big map keys by pointer @Description Get big map keys by pointer @Tags bigmap @ID get-bigmap-keys @Param network path string true "Network" @Param ptr path integer true "Big map pointer" @Param offset query integer false "Offset" @Param size query integer false "Requested count" mininum(1) maximum(10) @Param max_level query integer false "Max level filter" minimum(0) @Param min_level query integer false "Min level filter" minimum(0) @Accept json @Produce json @Success 200 {array} BigMapResponseItem @Failure 400 {object} Error @Failure 500 {object} Error @Router /v1/bigmap/{network}/{ptr}/keys [get]

func GetByHashAndCounter

func GetByHashAndCounter() gin.HandlerFunc

GetByHashAndCounter - @Summary Get operations by hash and counter @Description Get operations by hash and counter @Tags operations @ID get-operations-by-hash-and-counter @Param network path string true "You can set network field for better performance" @Param hash path string true "Operation group hash" minlength(51) maxlength(51) @Param counter path integer true "Counter of main operation" @Accept json @Produce json @Success 200 {array} Operation @Failure 400 {object} Error @Failure 404 {object} Error @Failure 500 {object} Error @Router /v1/opg/{network}/{hash}/{counter} [get]

func GetConfig

func GetConfig() gin.HandlerFunc

GetConfig -

func GetContract

func GetContract() gin.HandlerFunc

GetContract godoc @Summary Get contract info @Description Get full contract info @Tags contract @ID get-contract @Param network path string true "Network" @Param address path string true "KT address" minlength(36) maxlength(36) @Accept json @Produce json @Success 200 {object} ContractWithStats @Success 204 {object} gin.H @Failure 400 {object} Error @Failure 404 {object} Error @Failure 500 {object} Error @Router /v1/contract/{network}/{address} [get]

func GetContractCode

func GetContractCode() gin.HandlerFunc

GetContractCode godoc @Summary Get contract code @Description Get contract code @Tags contract @ID get-contract-code @Param network path string true "Network" @Param address path string true "KT address" minlength(36) maxlength(36) @Param protocol query string false "Protocol" @Param level query integer false "Level" @Accept json @Produce json @Success 200 {string} string @Failure 400 {object} Error @Failure 500 {object} Error @Router /v1/contract/{network}/{address}/code [get]

func GetContractGlobalConstants

func GetContractGlobalConstants() gin.HandlerFunc

GetContractGlobalConstants godoc @Summary Get global constants used by contract @Description Get global constants used by contract @Tags contract @ID get-contract-global-constants @Param network path string true "network" @Param address path string true "KT address" minlength(36) maxlength(36) @Param size query integer false "Constants count" mininum(1) maximum(10) @Param offset query integer false "Offset" mininum(1) @Accept json @Produce json @Success 200 {array} GlobalConstant @Failure 400 {object} Error @Failure 404 {object} Error @Failure 500 {object} Error @Router /v1/contract/{network}/{address}/global_constants [get]

func GetContractMigrations

func GetContractMigrations() gin.HandlerFunc

GetContractMigrations godoc @Summary Get contract migrations @Description Get contract migrations @Tags contract @ID get-contract-migrations @Param network path string true "Network" @Param address path string true "KT address" minlength(36) maxlength(36) @Accept json @Produce json @Success 200 {array} Migration @Failure 400 {object} Error @Failure 404 {object} Error @Failure 500 {object} Error @Router /v1/contract/{network}/{address}/migrations [get]

func GetContractStorage

func GetContractStorage() gin.HandlerFunc

GetContractStorage godoc @Summary Get contract storage @Description Get contract storage @Tags contract @ID get-contract-storage @Param network path string true "Network" @Param address path string true "KT address" minlength(36) maxlength(36) @Param level query integer false "Level" @Accept json @Produce json @Success 200 {array} ast.MiguelNode @Failure 400 {object} Error @Failure 404 {object} Error @Failure 500 {object} Error @Router /v1/contract/{network}/{address}/storage [get]

func GetContractStorageRaw

func GetContractStorageRaw() gin.HandlerFunc

GetContractStorageRaw godoc @Summary Get contract raw storage @Description Get contract raw storage @Tags contract @ID get-contract-storage-raw @Param network path string true "Network" @Param address path string true "KT address" minlength(36) maxlength(36) @Param level query integer false "Level" @Accept json @Produce json @Success 200 {string} string @Success 204 {string} string @Failure 400 {object} Error @Failure 404 {object} Error @Failure 500 {object} Error @Router /v1/contract/{network}/{address}/storage/raw [get]

func GetContractStorageRich

func GetContractStorageRich() gin.HandlerFunc

GetContractStorageRich godoc @Summary Get contract rich storage @Description Get contract rich storage @Tags contract @ID get-contract-storage-rich @Param network path string true "Network" @Param address path string true "KT address" minlength(36) maxlength(36) @Param level query integer false "Level" @Accept json @Produce json @Success 200 {object} gin.H @Success 204 {object} gin.H @Failure 400 {object} Error @Failure 404 {object} Error @Failure 500 {object} Error @Router /v1/contract/{network}/{address}/storage/rich [get]

func GetContractStorageSchema

func GetContractStorageSchema() gin.HandlerFunc

GetContractStorageSchema godoc @Summary Get contract storage schema @Description Get contract storage schema @Tags contract @ID get-contract-storage-schema @Param network path string true "Network" @Param address path string true "KT address" minlength(36) maxlength(36) @Param fill_type query string false "Fill storage type" Enums(empty, current, initial) @Accept json @Produce json @Success 200 {object} EntrypointSchema @Failure 400 {object} Error @Failure 404 {object} Error @Failure 500 {object} Error @Router /v1/contract/{network}/{address}/storage/schema [get]

func GetContractTicketUpdates

func GetContractTicketUpdates() gin.HandlerFunc

GetContractTicketUpdates godoc @Summary Get ticket updates for contract @Description Get ticket updates for contract @Tags contract @ID get-contract-ticket-updates @Param network path string true "network" @Param address path string true "KT address" minlength(36) maxlength(36) @Param account query string false "Address" minlength(36) maxlength(36) @Param ticket_id query integer false "Ticket id" mininum(0) @Param size query integer false "Updates count" mininum(1) maximum(10) @Param offset query integer false "Offset" mininum(1) @Accept json @Produce json @Success 200 {array} TicketUpdate @Failure 400 {object} Error @Failure 404 {object} Error @Failure 500 {object} Error @Router /v1/contract/{network}/{address}/ticket_updates [get]

func GetContractTickets

func GetContractTickets() gin.HandlerFunc

GetContractTickets godoc @Summary Get tickets for contract @Description Get tickets for contract @Tags contract @ID get-contract-tickets @Param network path string true "network" @Param address path string true "KT address" minlength(36) maxlength(36) @Param size query integer false "Updates count" mininum(1) maximum(10) @Param offset query integer false "Offset" mininum(1) @Accept json @Produce json @Success 200 {array} Ticket @Failure 400 {object} Error @Failure 404 {object} Error @Failure 500 {object} Error @Router /v1/contract/{network}/{address}/tickets [get]

func GetCurrentBigMapKeyHash

func GetCurrentBigMapKeyHash() gin.HandlerFunc

GetCurrentBigMapKeyHash godoc @Summary Get current big map value by pointer and key hash @Description Get current big map value by pointer and key hash @Tags bigmap @ID get-bigmap-keyhash-current @Param network path string true "Network" @Param ptr path integer true "Big map pointer" @Param key_hash path string true "Key hash in big map" minlength(54) maxlength(54) @Accept json @Produce json @Success 200 {object} BigMapDiffByKeyResponse @Success 404 {object} Error @Failure 400 {object} Error @Failure 500 {object} Error @Router /v1/bigmap/{network}/{ptr}/keys/{key_hash}/current [get]

func GetEntrypointData

func GetEntrypointData() gin.HandlerFunc

GetEntrypointData godoc @Summary Get entrypoint data from schema object @Description Get entrypoint data from schema object @Tags contract @ID get-contract-entrypoints-data @Param network path string true "Network" @Param address path string true "KT address" minlength(36) maxlength(36) @Param body body getEntrypointDataRequest true "Request body" @Accept json @Produce json @Success 200 {object} gin.H @Failure 400 {object} Error @Failure 404 {object} Error @Failure 500 {object} Error @Router /v1/contract/{network}/{address}/entrypoints/data [post]

func GetEntrypointSchema

func GetEntrypointSchema() gin.HandlerFunc

GetEntrypointSchema godoc @Summary Get contract`s entrypoint schema @Description Get contract`s entrypoint schema @Tags contract @ID get-contract-entrypoints-schema @Param network path string true "Network" @Param address path string true "KT address" minlength(36) maxlength(36) @Param entrypoint query string true "Entrypoint name" @Param fill_type query string false "Fill storage type" Enums(empty, latest) @Accept json @Produce json @Success 200 {object} EntrypointSchema @Failure 400 {object} Error @Failure 404 {object} Error @Failure 500 {object} Error @Router /v1/contract/{network}/{address}/entrypoints/schema [get]

func GetEntrypoints

func GetEntrypoints() gin.HandlerFunc

GetEntrypoints godoc @Summary Get contract entrypoints @Description Get contract entrypoints @Tags contract @ID get-contract-entrypoints @Param network path string true "Network" @Param address path string true "KT address" minlength(36) maxlength(36) @Accept json @Produce json @Success 200 {array} EntrypointSchema @Failure 400 {object} Error @Failure 404 {object} Error @Failure 500 {object} Error @Router /v1/contract/{network}/{address}/entrypoints [get]

func GetGlobalConstant

func GetGlobalConstant() gin.HandlerFunc

GetGlobalConstant godoc @Summary Get global constant @Description Get global constant @Tags global-constants @ID get-global-constant @Param network path string true "network" @Param address path string true "expr address of constant" minlength(54) maxlength(54) @Accept json @Produce json @Success 200 {object} GlobalConstant @Failure 400 {object} Error @Failure 404 {object} Error @Failure 500 {object} Error @Router /v1/global_constants/{network}/{address} [get]

func GetGlobalConstantContracts

func GetGlobalConstantContracts() gin.HandlerFunc

GetGlobalConstantContracts godoc @Summary Get contracts that use the global constant @Description Get contracts that use the global constant @Tags global-constants @ID get-global-constant-contracts @Param network path string true "network" @Param address path string true "expr address of constant" minlength(54) maxlength(54) @Param size query integer false "Constants count" mininum(1) maximum(10) @Param offset query integer false "Offset" mininum(1) @Accept json @Produce json @Success 200 {array} Contract @Failure 400 {object} Error @Failure 404 {object} Error @Failure 500 {object} Error @Router /v1/global_constants/{network}/{address}/contracts [get]

func GetHead

func GetHead() gin.HandlerFunc

GetHead godoc @Summary Show indexer head @Description Get indexer head for each network @Tags head @ID get-indexer-head @Accept json @Produce json @Success 200 {array} Head @Failure 500 {object} Error @Router /v1/head [get]

func GetHeadByNetwork

func GetHeadByNetwork() gin.HandlerFunc

GetHeadByNetwork godoc @Summary Show indexer head for the network @Description Get indexer head for the network @Tags head @ID get-indexer-head-by-network @Param network path string true "Network" @Accept json @Produce json @Success 200 {object} Head @Failure 500 {object} Error @Router /v1/head/{network} [get]

func GetImplicitOperation

func GetImplicitOperation() gin.HandlerFunc

GetImplicitOperation godoc @Summary Get implicit operation @DescriptionGet implicit operation @Tags operations @ID get-implicit-operation @Param network path string true "Network" @Param counter path integer true "Counter" @Accept json @Produce json @Success 200 {array} Operation @Success 204 {object} gin.H @Failure 400 {object} Error @Failure 500 {object} Error @Router /v1/implicit/{network}/{counter} [get]

func GetInfo

func GetInfo() gin.HandlerFunc

GetInfo godoc @Summary Get account info @Description Get account info @Tags account @ID get-account-info @Param network path string true "Network" @Param address path string true "Address" minlength(36) maxlength(36) @Accept json @Produce json @Success 200 {object} AccountInfo @Failure 400 {object} Error @Failure 404 {object} Error @Failure 500 {object} Error @Router /v1/account/{network}/{address} [get]

func GetMempool

func GetMempool() gin.HandlerFunc

GetMempool godoc @Summary Get contract mempool operations @Description Get contract mempool operations @Tags contract @ID get-contract-mempool @Param network path string true "Network" @Param address path string true "KT address" minlength(36) maxlength(36) @Accept json @Produce json @Success 200 {array} Operation @Failure 400 {object} Error @Failure 404 {object} Error @Failure 500 {object} Error @Router /v1/contract/{network}/{address}/mempool [get]

func GetOperation

func GetOperation() gin.HandlerFunc

GetOperation godoc @Summary Get operation group @Description Get operation group by hash @Tags operations @ID get-opg @Param network path string true "Network" @Param hash path string true "Operation group hash" minlength(51) maxlength(51) @Param with_mempool query bool false "Search operation in mempool or not" @Param with_storage_diff query bool false "Include storage diff to operations or not" @Accept json @Produce json @Success 200 {array} Operation @Success 204 {object} gin.H @Failure 400 {object} Error @Failure 500 {object} Error @Router /v1/opg/{network}/{hash} [get]

func GetOperationDiff

func GetOperationDiff() gin.HandlerFunc

GetOperationDiff godoc @Summary Get operation storage diff @DescriptionGet Get operation storage diff @Tags operations @ID get-operation-diff @Param network path string true "Network" @Param id path integer true "Internal BCD operation ID" @Accept json @Produce json @Success 200 {object} ast.MiguelNode @Failure 400 {object} Error @Failure 500 {object} Error @Router /v1/operation/{network}/{id}/diff [get]

func GetOperationErrorLocation

func GetOperationErrorLocation() gin.HandlerFunc

GetOperationErrorLocation godoc @Summary Get code line where operation failed @Description Get code line where operation failed @Tags operations @ID get-operation-error-location @Param network path string true "Network" @Param id path integer true "Internal BCD operation ID" @Accept json @Produce json @Success 200 {object} GetErrorLocationResponse @Failure 400 {object} Error @Failure 500 {object} Error @Router /v1/operation/{network}/{id}/error_location [get]

func GetOperationGroups

func GetOperationGroups() gin.HandlerFunc

GetOperationGroups - @Summary Get operation groups by account @Description Get operation groups by account @Tags contract @ID get-operation-groups-by-account @Param network path string true "Network" @Param address path string true "KT address" minlength(36) maxlength(36) @Param last_id query string false "Last operation ID" @Param size query integer false "Expected OPG count" mininum(1) @Accept json @Produce json @Success 200 {array} OPGResponse @Failure 400 {object} Error @Failure 404 {object} Error @Failure 500 {object} Error @Router /v1/contract/{network}/{address}/opg [get]

func GetSameContracts

func GetSameContracts() gin.HandlerFunc

GetSameContracts godoc @Summary Get same contracts @Description Get same contracts @Tags contract @ID get-contract-same @Param network path string true "Network" @Param address path string true "KT address" minlength(36) maxlength(36) @Param offset query integer false "Offset" @Param size query integer false "Requested count" mininum(1) maximum(10) @Accept json @Produce json @Success 200 {object} SameContractsResponse @Failure 400 {object} Error @Failure 404 {object} Error @Failure 500 {object} Error @Router /v1/contract/{network}/{address}/same [get]

func GetSmartRollup

func GetSmartRollup() gin.HandlerFunc

GetSmartRollup godoc @Summary Get smart rollup @Description Get smart rollup @Tags smart-rollups @ID get-smart-rollups @Param network path string true "network" @Param address path string true "expr address of smart rollup" minlength(36) maxlength(36) @Accept json @Produce json @Success 200 {object} SmartRollup @Failure 400 {object} Error @Failure 404 {object} Error @Failure 500 {object} Error @Router /v1/smart_rollups/{network}/{address} [get]

func GetStats

func GetStats() gin.HandlerFunc

GetStats godoc @Summary Show indexer stats @Description get indexer states for all networks @Tags statistics @ID get-stats @Accept json @Produce json @Success 200 {array} Block @Failure 500 {object} Error @Router /v1/stats [get]

func GetTicketBalancesForAccount

func GetTicketBalancesForAccount() gin.HandlerFunc

GetTicketBalancesForAccount - @Router /v1/account/{network}/{address}/ticket_balances [get]

func GetTicketUpdatesForOperation

func GetTicketUpdatesForOperation() gin.HandlerFunc

GetTicketUpdatesForOperation - @Router /v1/operation/{network}/{id}/ticket_updates [get]

func GetViewsSchema

func GetViewsSchema() gin.HandlerFunc

GetViewsSchema godoc @Summary Get view schemas of contract metadata @Description Get view schemas of contract metadata @Tags contract @ID get-contract-tzip-views-schema @Param network path string true "Network" @Param address path string true "KT address" minlength(36) maxlength(36) @Param kind query string false "Views kind" Enums(on-chain, off-chain) @Accept json @Produce json @Success 200 {array} ViewSchema @Failure 400 {object} Error @Failure 404 {object} Error @Failure 500 {object} Error @Router /v1/contract/{network}/{address}/views/schema [get]

func ListEvents

func ListEvents() gin.HandlerFunc

ListEvents - @Summary List contract events @Description List contract events @Tags operations @ID list-events @Param network path string true "Network" @Param address path string true "KT address" minlength(36) maxlength(36) @Param offset query string false "Offset" @Param size query integer false "Expected events count" mininum(1) maximum(10) @Accept json @Produce json @Success 200 {array} Event @Failure 400 {object} Error @Failure 404 {object} Error @Failure 500 {object} Error @Router /v1/contract/{network}/{address}/events [get]

func ListGlobalConstants

func ListGlobalConstants() gin.HandlerFunc

ListGlobalConstants godoc @Summary List global constants @Description List global constants @Tags global-constants @ID list-global-constants @Param network path string true "network" @Param size query integer false "Constants count" mininum(1) maximum(10) @Param offset query integer false "Offset" mininum(1) @Param order_by query string false "Order by" Enums(level, timestamp, links_count, address) @Param sort query string false "Sort order" Enums(asc, desc) @Accept json @Produce json @Success 200 {array} GlobalConstantItem @Failure 400 {object} Error @Failure 404 {object} Error @Failure 500 {object} Error @Router /v1/global_constants/{network} [get]

func ListSmartRollups

func ListSmartRollups() gin.HandlerFunc

ListSmartRollups godoc @Summary List smart rollups @Description List smart rollups @Tags smart-rollups @ID list-smart-rollups @Param network path string true "network" @Param size query integer false "Constants count" mininum(1) maximum(10) @Param offset query integer false "Offset" mininum(1) @Param sort query string false "Sort order" Enums(asc, desc) @Accept json @Produce json @Success 200 {array} SmartRollup @Failure 400 {object} Error @Failure 404 {object} Error @Failure 500 {object} Error @Router /v1/smart_rollups/{network} [get]

func MainnetMiddleware

func MainnetMiddleware(ctxs config.Contexts) gin.HandlerFunc

MainnetMiddleware -

func NetworkMiddleware

func NetworkMiddleware(ctxs config.Contexts) gin.HandlerFunc

NetworkMiddleware -

func OffChainView

func OffChainView() gin.HandlerFunc

OffChainView godoc @Summary Get JSON schema for off-chain view @Description Get JSON schema for off-chain view @Tags contract @ID get-off-chain-view @Param body body json.RawMessage true "Micheline. Limit: 1MB" @Accept json @Produce json @Success 200 {object} ViewSchema @Failure 400 {object} Error @Failure 500 {object} Error @Router /v1/off_chain_view [post]

func RecentlyCalledContracts

func RecentlyCalledContracts() gin.HandlerFunc

RecentlyCalledContracts godoc @Summary Show recently called contracts @Description Show recently called contracts @Tags statistics @ID get-recenly-called-contracts @Param network path string true "Network" @Param size query integer false "Contracts count" mininum(1) maximum(10) @Param offset query integer false "Offset" mininum(1) @Accept json @Produce json @Success 200 {array} RecentlyCalledContract @Failure 400 {object} Error @Failure 500 {object} Error @Router /v1/stats/{network}/recently_called_contracts [get]

func RunCode

func RunCode() gin.HandlerFunc

RunCode godoc @Summary Execute entrypoint with passed arguments @Description Execute entrypoint with passed arguments @Tags contract @ID run-code @Param network path string true "Network" @Param address path string true "KT address" minlength(36) maxlength(36) @Param body body runCodeRequest true "Request body" @Accept json @Produce json @Success 200 {array} Operation @Failure 400 {object} Error @Failure 404 {object} Error @Failure 500 {object} Error @Router /v1/contract/{network}/{address}/entrypoints/trace [post]

func RunOperation

func RunOperation() gin.HandlerFunc

RunOperation -

Types

type AccountInfo

type AccountInfo struct {
	Address            string    `json:"address"`
	Balance            int64     `json:"balance"`
	OperationsCount    int64     `json:"operations_count"`
	MigrationsCount    int64     `json:"migrations_count"`
	EventsCount        int64     `json:"events_count"`
	TicketUpdatesCount int64     `json:"ticket_updates_count"`
	LastAction         time.Time `json:"last_action"`
	AccountType        string    `json:"account_type"`
}

AccountInfo -

type BigMapDiffByKeyResponse

type BigMapDiffByKeyResponse struct {
	Key     interface{}      `extensions:"x-nullable" json:"key,omitempty"`
	KeyHash string           `json:"key_hash"`
	Values  []BigMapDiffItem `extensions:"x-nullable" json:"values,omitempty"`
	Total   int64            `json:"total"`
}

BigMapDiffByKeyResponse -

type BigMapDiffItem

type BigMapDiffItem struct {
	Value     interface{} `json:"value"`
	Level     int64       `json:"level"`
	Timestamp time.Time   `json:"timestamp"`
}

BigMapDiffItem -

type BigMapHistoryItem

type BigMapHistoryItem struct {
	Action         string    `json:"action"`
	SourcePtr      *int64    `extensions:"x-nullable" json:"source_ptr,omitempty"`
	DestinationPtr *int64    `extensions:"x-nullable" json:"destination_ptr,omitempty"`
	Timestamp      time.Time `json:"timestamp"`
	Level          int64     `json:"level"`
}

BigMapHistoryItem -

type BigMapHistoryResponse

type BigMapHistoryResponse struct {
	Address string              `json:"address"`
	Ptr     int64               `json:"ptr"`
	Items   []BigMapHistoryItem `extensions:"x-nullable" json:"items,omitempty"`
}

BigMapHistoryResponse -

type BigMapItem

type BigMapItem struct {
	Key       interface{} `json:"key"`
	KeyHash   string      `json:"key_hash"`
	KeyString string      `json:"key_string"`
	Level     int64       `json:"level"`
	Timestamp time.Time   `json:"timestamp"`
	IsActive  bool        `json:"is_active"`
}

BigMapItem -

type BigMapKeyStateResponse

type BigMapKeyStateResponse struct {
	Key             interface{} `extensions:"x-nullable"  json:"key,omitempty"`
	KeyHash         string      `json:"key_hash"`
	KeyString       string      `json:"key_string"`
	Value           interface{} `json:"value"`
	LastUpdateLevel int64       `json:"last_update_level"`
	LastUpdateTime  time.Time   `json:"last_update_time"`
	Removed         bool        `json:"removed"`
	UpdatesCount    int64       `json:"updates_count"`
}

BigMapKeyStateResponse -

type BigMapResponseItem

type BigMapResponseItem struct {
	Item  BigMapItem `json:"data"`
	Count int64      `json:"count"`
}

BigMapResponseItem -

type Block

type Block struct {
	Network                      string    `example:"mainnet"                                             json:"network"`
	Hash                         string    `example:"BLyAEwaXShJuZasvUezHUfLqzZ48V8XrPvXF2wRaH15tmzEpsHT" json:"hash"`
	Level                        int64     `example:"100"                                                 json:"level"`
	Predecessor                  string    `example:"BMWVEwEYw9m5iaHzqxDfkPzZTV4rhkSouRh3DkVMVGkxZ3EVaNs" json:"predecessor"`
	ChainID                      string    `example:"NetXdQprcVkpaWU"                                     json:"chain_id"`
	Timestamp                    time.Time `example:"2018-06-30T18:05:27Z"                                json:"timestamp"`
	Protocol                     string    `example:"PtCJ7pwoxe8JasnHY8YonnLYjcVHmhiARPJvqcC6VfHT5s8k8sY" json:"protocol"`
	CostPerByte                  int64     `example:"250"                                                 json:"cost_per_byte"`
	HardGasLimitPerOperation     int64     `example:"1040000"                                             json:"hard_gas_limit_per_operation"`
	HardStorageLimitPerOperation int64     `example:"60000"                                               json:"hard_storage_limit_per_operation"`
	TimeBetweenBlocks            int64     `example:"30"                                                  json:"time_between_blocks"`

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

Block -

func (*Block) FromModel

func (b *Block) FromModel(block block.Block)

FromModel -

type CodeDiffLeg

type CodeDiffLeg struct {
	Address  string        `binding:"required,address" json:"address"`
	Network  types.Network `binding:"required,network" json:"network"`
	Protocol string        `json:"protocol,omitempty"`
	Level    int64         `json:"level,omitempty"`
}

CodeDiffLeg -

type CodeDiffRequest

type CodeDiffRequest struct {
	Left  CodeDiffLeg `binding:"required" json:"left"`
	Right CodeDiffLeg `binding:"required" json:"right"`
}

CodeDiffRequest -

type CodeDiffResponse

type CodeDiffResponse struct {
	Left  CodeDiffLeg          `json:"left"`
	Right CodeDiffLeg          `json:"right"`
	Diff  formatter.DiffResult `json:"diff"`
}

CodeDiffResponse -

type CodeFromMichelsonResponse

type CodeFromMichelsonResponse struct {
	Script  stdJSON.RawMessage       `json:"script"`
	Storage CodeFromMichelsonStorage `json:"storage"`
}

CodeFromMichelsonResponse -

type CodeFromMichelsonStorage

type CodeFromMichelsonStorage struct {
	Type         []ast.Typedef   `extensions:"x-nullable" json:"type,omitempty"`
	Schema       *ast.JSONSchema `json:"schema"`
	DefaultModel ast.JSONModel   `extensions:"x-nullable" json:"default_model,omitempty"`
}

CodeFromMichelsonStorage -

type ConfigResponse

type ConfigResponse struct {
	Networks       []string          `json:"networks"`
	RPCEndpoints   map[string]string `json:"rpc_endpoints"`
	SentryDSN      string            `json:"sentry_dsn"`
	OauthEnabled   bool              `json:"oauth_enabled"`
	GaEnabled      bool              `json:"ga_enabled"`
	MempoolEnabled bool              `json:"mempool_enabled"`
	SandboxMode    bool              `json:"sandbox_mode"`
}

ConfigResponse -

type Contract

type Contract struct {
	ID        int64     `json:"id"`
	Network   string    `json:"network"`
	Level     int64     `json:"level"`
	Timestamp time.Time `json:"timestamp"`

	Hash        string   `json:"hash,omitempty"`
	Tags        []string `extensions:"x-nullable" json:"tags,omitempty"`
	Hardcoded   []string `extensions:"x-nullable" json:"hardcoded,omitempty"`
	FailStrings []string `extensions:"x-nullable" json:"fail_strings,omitempty"`
	Annotations []string `extensions:"x-nullable" json:"annotations,omitempty"`
	Entrypoints []string `extensions:"x-nullable" json:"entrypoints,omitempty"`

	Address  string `json:"address"`
	Manager  string `extensions:"x-nullable" json:"manager,omitempty"`
	Delegate string `extensions:"x-nullable" json:"delegate,omitempty"`

	FoundBy         string    `extensions:"x-nullable" json:"found_by,omitempty"`
	LastAction      time.Time `extensions:"x-nullable" json:"last_action,omitempty"`
	TxCount         int64     `extensions:"x-nullable" json:"tx_count,omitempty"`
	MigrationsCount int64     `extensions:"x-nullable" json:"migrations_count,omitempty"`
	Slug            string    `extensions:"x-nullable" json:"slug,omitempty"`
}

Contract -

func (*Contract) FromModel

func (c *Contract) FromModel(contract contract.Contract)

FromModel -

type ContractWithStats

type ContractWithStats struct {
	Contract

	SameCount int64 `json:"same_count"`
}

ContractWithStats -

type CountResponse

type CountResponse struct {
	Count int64 `json:"count"`
}

CountResponse -

type EntrypointSchema

type EntrypointSchema struct {
	ast.EntrypointType
	Schema       *ast.JSONSchema `json:"schema"`
	DefaultModel ast.JSONModel   `extensions:"x-nullable" json:"default_model,omitempty"`
}

EntrypointSchema ;

type Error

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

Error -

type Event

type Event struct {
	Hash      string            `json:"hash"`
	Status    string            `json:"status"`
	Timestamp time.Time         `json:"timestamp"`
	Level     int64             `json:"level"`
	Tag       string            `json:"tag"`
	Payload   []*ast.MiguelNode `extensions:"x-nullable" json:"payload,omitempty"`
}

Event -

func NewEvent

func NewEvent(o operation.Operation) (*Event, error)

NewEvent -

type ForkResponse

type ForkResponse struct {
	Script  stdJSON.RawMessage `json:"code"`
	Storage stdJSON.RawMessage `json:"storage"`
}

ForkResponse -

type FormatterRequest

type FormatterRequest struct {
	Inline   bool   `form:"inline"`
	LineSize int    `form:"lineSize"`
	Code     string `form:"code"`
}

FormatterRequest -

type GetBigMapResponse

type GetBigMapResponse struct {
	Address    string        `json:"address"`
	Network    string        `json:"network"`
	Ptr        int64         `json:"ptr"`
	ActiveKeys uint          `json:"active_keys"`
	TotalKeys  uint          `json:"total_keys"`
	Typedef    []ast.Typedef `extensions:"x-nullable" json:"typedef,omitempty"`
}

GetBigMapResponse -

type GetErrorLocationResponse

type GetErrorLocationResponse struct {
	Text        string `json:"text"`
	FailedRow   int    `json:"failed_row"`
	FirstRow    int    `json:"first_row"`
	StartColumn int    `json:"start_col"`
	EndColumn   int    `json:"end_col"`
}

GetErrorLocationResponse -

type GetTokenStatsRequest

type GetTokenStatsRequest struct {
	Period    string `binding:"oneof=all year month week day hour" example:"year" form:"period"`
	Contracts string `form:"contracts"`
}

GetTokenStatsRequest -

func (GetTokenStatsRequest) Addresses

func (req GetTokenStatsRequest) Addresses() []string

Addresses -

type GlobalConstant

type GlobalConstant struct {
	Timestamp time.Time          `json:"timestamp"`
	Level     int64              `json:"level"`
	Address   string             `json:"address"`
	Value     stdJSON.RawMessage `json:"value,omitempty"`
	Code      string             `json:"code,omitempty"`
}

GlobalConstant -

func NewGlobalConstantFromModel

func NewGlobalConstantFromModel(gc contract.GlobalConstant) GlobalConstant

NewGlobalConstantFromModel -

type GlobalConstantItem

type GlobalConstantItem struct {
	Timestamp  time.Time `json:"timestamp"`
	Level      int64     `json:"level"`
	Address    string    `json:"address"`
	LinksCount uint64    `json:"links_count"`
}
type Head struct {
	Network   string    `json:"network"`
	Level     int64     `json:"level"`
	Timestamp time.Time `json:"time"`
	Protocol  string    `json:"protocol"`
	Synced    bool      `json:"synced"`
	// contains filtered or unexported fields
}

Head -

type HeadsByNetwork

type HeadsByNetwork []Head

Heads -

func (HeadsByNetwork) Len

func (a HeadsByNetwork) Len() int

Len -

func (HeadsByNetwork) Less

func (a HeadsByNetwork) Less(i, j int) bool

Less -

func (HeadsByNetwork) Swap

func (a HeadsByNetwork) Swap(i, j int)

Swap -

type ImplicitOperationRequest

type ImplicitOperationRequest struct {
	Counter int64 `binding:"required" example:"123456" uri:"counter"`
	// contains filtered or unexported fields
}

ImplicitOperationRequest -

func (ImplicitOperationRequest) NetworkID

func (req ImplicitOperationRequest) NetworkID() types.Network

NetworkID -

type MetadataResponse

type MetadataResponse struct {
	Hash string `json:"hash"`
}

MetadataResponse -

type Migration

type Migration struct {
	Level        int64     `json:"level"`
	Timestamp    time.Time `json:"timestamp"`
	Hash         string    `extensions:"x-nullable" json:"hash,omitempty"`
	Protocol     string    `json:"protocol"`
	PrevProtocol string    `json:"prev_protocol"`
	Kind         string    `json:"kind"`
}

Migration -

type NetworkStats

type NetworkStats struct {
	ContractsCount  int64      `example:"10"     json:"contracts_count"`
	OperationsCount int64      `example:"100"    json:"operations_count"`
	ContractCalls   uint64     `example:"100"    json:"contract_calls"`
	UniqueContracts uint64     `example:"100"    json:"unique_contracts"`
	FACount         uint64     `example:"100"    json:"fa_count"`
	Protocols       []Protocol `json:"protocols"`
}

NetworkStats -

type OPGRequest

type OPGRequest struct {
	Hash string `binding:"required,opg" example:"ooy4c6G2BZzybYEY3vRQ7WXGL63tFmamTeGTHdjUxhd6ckbSNnb" uri:"hash"`
	// contains filtered or unexported fields
}

OPGRequest -

func (OPGRequest) NetworkID

func (req OPGRequest) NetworkID() types.Network

NetworkID -

type OPGResponse

type OPGResponse struct {
	LastID       int64     `json:"last_id"`
	ContentIndex int64     `json:"content_index"`
	Counter      int64     `json:"counter"`
	Level        int64     `json:"level"`
	TotalCost    int64     `json:"total_cost"`
	Flow         int64     `json:"flow"`
	Internals    int       `json:"internals"`
	Hash         string    `json:"hash"`
	Entrypoint   string    `json:"entrypoint"`
	Timestamp    time.Time `json:"timestamp"`
	Status       string    `json:"status"`
	Kind         string    `json:"kind"`
}

OPGResponse -

func NewOPGResponse

func NewOPGResponse(opg operation.OPG) OPGResponse

NewOPGResponse -

type OauthParams

type OauthParams struct {
	Provider string `uri:"provider"`
}

OauthParams -

type OauthRequest

type OauthRequest struct {
	State string `form:"state"`
	Code  string `form:"code"`
}

OauthRequest -

type Operation

type Operation struct {
	ID                                 int64              `extensions:"x-nullable"     json:"id,omitempty"`
	Level                              int64              `extensions:"x-nullable"     json:"level,omitempty"`
	Fee                                int64              `extensions:"x-nullable"     json:"fee,omitempty"`
	Counter                            int64              `extensions:"x-nullable"     json:"counter,omitempty"`
	GasLimit                           int64              `extensions:"x-nullable"     json:"gas_limit,omitempty"`
	StorageLimit                       int64              `extensions:"x-nullable"     json:"storage_limit,omitempty"`
	Amount                             int64              `extensions:"x-nullable"     json:"amount,omitempty"`
	Balance                            int64              `extensions:"x-nullable"     json:"balance,omitempty"`
	Burned                             int64              `extensions:"x-nullable"     json:"burned,omitempty"`
	AllocatedDestinationContractBurned int64              `extensions:"x-nullable"     json:"allocated_destination_contract_burned,omitempty"`
	IndexedTime                        int64              `json:"-"`
	ContentIndex                       int64              `json:"content_index"`
	ConsumedGas                        int64              `example:"100"               extensions:"x-nullable"                                json:"consumed_gas,omitempty"`
	StorageSize                        int64              `example:"200"               extensions:"x-nullable"                                json:"storage_size,omitempty"`
	PaidStorageSizeDiff                int64              `example:"300"               extensions:"x-nullable"                                json:"paid_storage_size_diff,omitempty"`
	TicketUpdatesCount                 int                `json:"ticket_updates_count"`
	BigMapDiffsCount                   int                `json:"big_map_diffs_count"`
	Errors                             []*tezerrors.Error `extensions:"x-nullable"     json:"errors,omitempty"`
	Parameters                         interface{}        `extensions:"x-nullable"     json:"parameters,omitempty"`
	StorageDiff                        *ast.MiguelNode    `extensions:"x-nullable"     json:"storage_diff,omitempty"`
	Payload                            []*ast.MiguelNode  `extensions:"x-nullable"     json:"payload,omitempty"`
	RawMempool                         interface{}        `extensions:"x-nullable"     json:"rawMempool,omitempty"`
	Timestamp                          time.Time          `json:"timestamp"`
	Protocol                           string             `json:"protocol"`
	Hash                               string             `extensions:"x-nullable"     json:"hash,omitempty"`
	Network                            string             `json:"network"`
	Kind                               string             `json:"kind"`
	Source                             string             `extensions:"x-nullable"     json:"source,omitempty"`
	Destination                        string             `extensions:"x-nullable"     json:"destination,omitempty"`
	PublicKey                          string             `extensions:"x-nullable"     json:"public_key,omitempty"`
	ManagerPubKey                      string             `extensions:"x-nullable"     json:"manager_pubkey,omitempty"`
	Delegate                           string             `extensions:"x-nullable"     json:"delegate,omitempty"`
	Status                             string             `json:"status"`
	Entrypoint                         string             `extensions:"x-nullable"     json:"entrypoint,omitempty"`
	Tag                                string             `extensions:"x-nullable"     json:"tag,omitempty"`
	AllocatedDestinationContract       bool               `` /* 130-byte string literal not displayed */
	Internal                           bool               `json:"internal"`
	Mempool                            bool               `json:"mempool"`
	Storage                            stdJSON.RawMessage `json:"-"`
}

Operation -

func PrepareOperations

func PrepareOperations(c context.Context, ctx *config.Context, ops []operation.Operation, withStorageDiff bool) ([]Operation, error)

PrepareOperations -

func (*Operation) FromModel

func (o *Operation) FromModel(operation operation.Operation)

FromModel -

func (*Operation) ToModel

func (o *Operation) ToModel() operation.Operation

ToModel -

type OperationGroupContentRequest

type OperationGroupContentRequest struct {
	OPGRequest

	Counter int64 `binding:"required" example:"123456" uri:"counter"`
}

OperationGroupContentRequest -

func (OperationGroupContentRequest) NetworkID

func (req OperationGroupContentRequest) NetworkID() types.Network

NetworkID -

type OperationResponse

type OperationResponse struct {
	Operations []Operation `json:"operations"`
	LastID     string      `example:"1588640276994159" extensions:"x-nullable" json:"last_id,omitempty"`
}

OperationResponse -

type Protocol

type Protocol struct {
	Hash       string `example:"PsCARTHAGazKbHtnKfLzQg3kms52kSRpgnDY982a9oYsSXRLQEb" json:"hash"`
	StartLevel int64  `example:"851969"                                              json:"start_level"`
	EndLevel   int64  `example:"0"                                                   extensions:"x-nullable" json:"end_level,omitempty"`
	Alias      string `example:"Carthage"                                            json:"alias"`
}

Protocol -

func (*Protocol) FromModel

func (p *Protocol) FromModel(protocol protocol.Protocol)

FromModel -

type RecentlyCalledContract

type RecentlyCalledContract struct {
	ID              int64     `json:"id"`
	Address         string    `json:"address"`
	LastAction      time.Time `json:"last_action"`
	OperationsCount int64     `json:"operations_count"`
}

RecentlyCalledContract -

func (*RecentlyCalledContract) FromModel

func (c *RecentlyCalledContract) FromModel(account account.Account)

FromModel -

type SameContractsResponse

type SameContractsResponse struct {
	Count     int64               `json:"count"`
	Contracts []ContractWithStats `json:"contracts"`
}

SameContractsResponse -

type Screenshot

type Screenshot struct {
	Type string `json:"type"`
	Link string `json:"link"`
}

Screenshot -

type SearchBigMapDiff

type SearchBigMapDiff struct {
	Ptr       int64              `json:"ptr"`
	Key       string             `json:"key"`
	KeyHash   string             `json:"key_hash"`
	Value     stdJSON.RawMessage `json:"value"`
	Level     int64              `json:"level"`
	Address   string             `json:"address"`
	Network   string             `json:"network"`
	Timestamp time.Time          `json:"timestamp"`
	FoundBy   string             `json:"found_by"`
}

SearchBigMapDiff -

type Series

type Series [][]int64

Series -

type SeriesFloat

type SeriesFloat [][]float64

SeriesFloat -

type SmartRollup

type SmartRollup struct {
	ID                    int64         `json:"id"`
	Level                 int64         `json:"level"`
	Timestamp             time.Time     `json:"timestamp"`
	Size                  uint64        `json:"size"`
	Address               string        `json:"address"`
	GenesisCommitmentHash string        `json:"genesis_commitment_hash"`
	PvmKind               string        `json:"pvm_kind"`
	Kernel                string        `json:"kernel"`
	Type                  []ast.Typedef `json:"type"`
}

SmartRollup -

func NewSmartRollup

func NewSmartRollup(rollup smartrollup.SmartRollup) SmartRollup

NewSmartRollup -

type Stats

type Stats struct {
	ContractsCount              int `json:"contracts_count"`
	SmartRollupsCount           int `json:"smart_rollups_count"`
	GlobalConstantsCount        int `json:"global_constants_count"`
	OperationsCount             int `json:"operations_count"`
	EventsCount                 int `json:"events_count"`
	TransactionsCount           int `json:"tx_count"`
	OriginationsCount           int `json:"originations_count"`
	SrOriginationsCount         int `json:"sr_originations_count"`
	SrExecutesCount             int `json:"sr_executes_count"`
	RegisterGlobalConstantCount int `json:"register_global_constants_count"`
	TransferTicketsCount        int `json:"transfer_tickets_count"`
}

func NewStats

func NewStats(s stats.Stats) *Stats

type Ticket

type Ticket struct {
	Ticketer     string          `json:"ticketer"`
	ContentType  []ast.Typedef   `json:"content_type"`
	Content      *ast.MiguelNode `json:"content,omitempty"`
	UpdatesCount int             `json:"updates_count"`
	Level        int64           `json:"first_level"`
}

func NewTicket

func NewTicket(t ticket.Ticket) (Ticket, error)

type TicketBalance

type TicketBalance struct {
	Ticketer    string          `json:"ticketer"`
	Amount      string          `json:"amount"`
	ContentType []ast.Typedef   `json:"content_type"`
	Content     *ast.MiguelNode `json:"content,omitempty"`
	TicketId    int64           `json:"ticket_id"`
}

func NewTicketBalance

func NewTicketBalance(balance ticket.Balance) TicketBalance

type TicketUpdate

type TicketUpdate struct {
	ID            int64           `json:"id"`
	Level         int64           `json:"level"`
	Timestamp     time.Time       `json:"timestamp"`
	TicketId      int64           `json:"ticket_id"`
	Ticketer      string          `json:"ticketer"`
	Address       string          `json:"address"`
	Amount        string          `json:"amount"`
	OperationHash string          `json:"operation_hash"`
	ContentType   []ast.Typedef   `json:"content_type"`
	Content       *ast.MiguelNode `json:"content,omitempty"`
}

TicketUpdate -

func NewTicketUpdateFromModel

func NewTicketUpdateFromModel(update ticket.TicketUpdate) TicketUpdate

NewTicketUpdateFromModel -

type ViewSchema

type ViewSchema struct {
	Type           []ast.Typedef   `json:"typedef"`
	Name           string          `json:"name"`
	Implementation int             `json:"implementation"`
	Description    string          `json:"description,omitempty"`
	Schema         *ast.JSONSchema `json:"schema"`
	DefaultModel   interface{}     `extensions:"x-nullable"      json:"default_model,omitempty"`
	Error          string          `json:"error,omitempty"`
	Kind           ViewSchemaKind  `json:"kind"`
}

ViewSchema ;

type ViewSchemaKind

type ViewSchemaKind string

ViewSchemaKind -

const (
	OffchainView ViewSchemaKind = "off-chain"
	OnchainView  ViewSchemaKind = "on-chain"
	EmptyView    ViewSchemaKind = ""
)

ViewSchemaKind

Jump to

Keyboard shortcuts

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