explorer

package
v0.0.0-...-fd63c1f Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const MetadataCacheSize = 32768

Variables

This section is empty.

Functions

func BoolPtr

func BoolPtr(b bool) *bool

func CreateMetadata

func CreateMetadata(ctx *server.Context) (interface{}, int)

func DescribeMetadata

func DescribeMetadata(ctx *server.Context) (interface{}, int)

Describes an on-chain object with title, description and image.

Supported identifiers

:address address, contract, token :block block hash or height :op operation hash /event/:id implicit operation /cycle/:id cycle number /election/:id election number

func DisableLog

func DisableLog()

DisableLog disables all library log output. Logging output is disabled by default until UseLogger is called.

func Float64Ptr

func Float64Ptr(f float64) *float64

func GetBakerIncome

func GetBakerIncome(ctx *server.Context) (interface{}, int)

func GetBakerRights

func GetBakerRights(ctx *server.Context) (interface{}, int)

func GetBakerSnapshot

func GetBakerSnapshot(ctx *server.Context) (interface{}, int)

func GetBlockchainConfig

func GetBlockchainConfig(ctx *server.Context) (interface{}, int)

func GetBlockchainProtocols

func GetBlockchainProtocols(ctx *server.Context) (interface{}, int)

func GetBlockchainTip

func GetBlockchainTip(ctx *server.Context) (interface{}, int)

func GetRichList

func GetRichList(ctx *server.Context) (interface{}, int)

func GetStatus

func GetStatus(ctx *server.Context) (interface{}, int)

func GetTrafficList

func GetTrafficList(ctx *server.Context) (interface{}, int)

func GetVolumeList

func GetVolumeList(ctx *server.Context) (interface{}, int)

func IntPtr

func IntPtr(i int) *int

func ListAccountOperations

func ListAccountOperations(ctx *server.Context) (interface{}, int)

func ListAccountTicketBalances

func ListAccountTicketBalances(ctx *server.Context) (any, int)

func ListAccountTicketEvents

func ListAccountTicketEvents(ctx *server.Context) (any, int)

func ListAccountTokenBalances

func ListAccountTokenBalances(ctx *server.Context) (interface{}, int)

func ListAccountTokenEvents

func ListAccountTokenEvents(ctx *server.Context) (interface{}, int)

func ListBakerDelegations

func ListBakerDelegations(ctx *server.Context) (interface{}, int)

func ListBakerEndorsements

func ListBakerEndorsements(ctx *server.Context) (interface{}, int)

func ListBakerVotes

func ListBakerVotes(ctx *server.Context) (interface{}, int)

func ListBakers

func ListBakers(ctx *server.Context) (interface{}, int)

func ListBallots

func ListBallots(ctx *server.Context) (interface{}, int)

func ListBigmapKeyUpdates

func ListBigmapKeyUpdates(ctx *server.Context) (interface{}, int)

func ListBigmapKeys

func ListBigmapKeys(ctx *server.Context) (interface{}, int)

func ListBigmapUpdates

func ListBigmapUpdates(ctx *server.Context) (interface{}, int)

func ListBigmapValues

func ListBigmapValues(ctx *server.Context) (interface{}, int)

func ListBlockOps

func ListBlockOps(ctx *server.Context) (interface{}, int)

func ListContractCalls

func ListContractCalls(ctx *server.Context) (interface{}, int)

list incoming transaction with data

func ListContractEvents

func ListContractEvents(ctx *server.Context) (interface{}, int)

func ListMetadata

func ListMetadata(ctx *server.Context) (interface{}, int)

func ListMetadataSchemas

func ListMetadataSchemas(ctx *server.Context) (interface{}, int)

func ListTicketBalances

func ListTicketBalances(ctx *server.Context) (any, int)

func ListTicketEvents

func ListTicketEvents(ctx *server.Context) (any, int)

func ListTickets

func ListTickets(ctx *server.Context) (any, int)

func ListTokenBalances

func ListTokenBalances(ctx *server.Context) (interface{}, int)

func ListTokenEvents

func ListTokenEvents(ctx *server.Context) (interface{}, int)

func ListTokens

func ListTokens(ctx *server.Context) (interface{}, int)

func ListVoters

func ListVoters(ctx *server.Context) (interface{}, int)

func Ping

func Ping(ctx *server.Context) (interface{}, int)

func PurgeCaches

func PurgeCaches()

func PurgeMetadata

func PurgeMetadata(ctx *server.Context) (interface{}, int)

func ReadAccount

func ReadAccount(ctx *server.Context) (interface{}, int)

func ReadAccountOps

func ReadAccountOps(ctx *server.Context) (interface{}, int)

LEGACY

func ReadBaker

func ReadBaker(ctx *server.Context) (interface{}, int)

func ReadBigmap

func ReadBigmap(ctx *server.Context) (interface{}, int)

func ReadBigmapValue

func ReadBigmapValue(ctx *server.Context) (interface{}, int)

func ReadBlock

func ReadBlock(ctx *server.Context) (interface{}, int)

func ReadBlockOps

func ReadBlockOps(ctx *server.Context) (interface{}, int)

LEGACY

func ReadChain

func ReadChain(ctx *server.Context) (interface{}, int)

func ReadConstant

func ReadConstant(ctx *server.Context) (interface{}, int)

func ReadContract

func ReadContract(ctx *server.Context) (interface{}, int)

func ReadContractScript

func ReadContractScript(ctx *server.Context) (interface{}, int)

func ReadContractStorage

func ReadContractStorage(ctx *server.Context) (interface{}, int)

func ReadCycle

func ReadCycle(ctx *server.Context) (interface{}, int)

func ReadDeployedContracts

func ReadDeployedContracts(ctx *server.Context) (interface{}, int)

func ReadElection

func ReadElection(ctx *server.Context) (interface{}, int)

func ReadMetadata

func ReadMetadata(ctx *server.Context) (interface{}, int)

func ReadMetadataSchema

func ReadMetadataSchema(ctx *server.Context) (interface{}, int)

func ReadOp

func ReadOp(ctx *server.Context) (interface{}, int)

func ReadSupply

func ReadSupply(ctx *server.Context) (interface{}, int)

func ReadToken

func ReadToken(ctx *server.Context) (interface{}, int)

func RemoveMetadata

func RemoveMetadata(ctx *server.Context) (interface{}, int)

func SitemapMetadata

func SitemapMetadata(ctx *server.Context) (interface{}, int)

func UpdateMetadata

func UpdateMetadata(ctx *server.Context) (interface{}, int)

func UseLogger

func UseLogger(logger logpkg.Logger)

UseLogger uses a specified Logger to output package logging info.

Types

type Account

type Account struct {
	RowId              model.AccountID      `json:"row_id"`
	Address            string               `json:"address"`
	Type               string               `json:"address_type"`
	Pubkey             string               `json:"pubkey,omitempty"`
	Counter            int64                `json:"counter"`
	Baker              string               `json:"baker,omitempty"`
	Creator            string               `json:"creator,omitempty"`
	FirstIn            int64                `json:"first_in"`
	FirstOut           int64                `json:"first_out"`
	LastIn             int64                `json:"last_in"`
	LastOut            int64                `json:"last_out"`
	FirstSeen          int64                `json:"first_seen"`
	LastSeen           int64                `json:"last_seen"`
	DelegatedSince     int64                `json:"delegated_since,omitempty"`
	FirstInTime        *time.Time           `json:"first_in_time,omitempty"`
	FirstOutTime       *time.Time           `json:"first_out_time,omitempty"`
	LastInTime         *time.Time           `json:"last_in_time,omitempty"`
	LastOutTime        *time.Time           `json:"last_out_time,omitempty"`
	FirstSeenTime      time.Time            `json:"first_seen_time,omitempty"`
	LastSeenTime       time.Time            `json:"last_seen_time,omitempty"`
	DelegatedSinceTime *time.Time           `json:"delegated_since_time,omitempty"`
	TotalReceived      float64              `json:"total_received"`
	TotalSent          float64              `json:"total_sent"`
	TotalBurned        float64              `json:"total_burned"`
	TotalFeesPaid      float64              `json:"total_fees_paid"`
	TotalFeesUsed      float64              `json:"total_fees_used"`
	UnclaimedBalance   float64              `json:"unclaimed_balance,omitempty"`
	SpendableBalance   float64              `json:"spendable_balance"`
	FrozenRollupBond   float64              `json:"frozen_rollup_bond,omitempty"`
	LostRollupBond     float64              `json:"lost_rollup_bond,omitempty"`
	StakedBalance      float64              `json:"staked_balance"`
	UnstakedBalance    float64              `json:"unstaked_balance"`
	FrozenRewards      float64              `json:"frozen_rewards"` // calculated
	LostStake          float64              `json:"lost_stake"`
	IsFunded           bool                 `json:"is_funded"`
	IsActivated        bool                 `json:"is_activated,omitempty"`
	IsDelegated        bool                 `json:"is_delegated"`
	IsStaked           bool                 `json:"is_staked"`
	IsRevealed         bool                 `json:"is_revealed"`
	IsBaker            bool                 `json:"is_baker,omitempty"`
	IsContract         bool                 `json:"is_contract,omitempty"`
	NTxSuccess         int                  `json:"n_tx_success"`
	NTxFailed          int                  `json:"n_tx_failed"`
	NTxOut             int                  `json:"n_tx_out"`
	NTxIn              int                  `json:"n_tx_in"`
	Metadata           map[string]*Metadata `json:"metadata,omitempty"`

	// LEGACY
	Ops OpList `json:"ops,omitempty"`
	// contains filtered or unexported fields
}

func NewAccount

func NewAccount(ctx *server.Context, a *model.Account, args server.Options) *Account

func (Account) Expires

func (a Account) Expires() time.Time

func (Account) LastModified

func (a Account) LastModified() time.Time

func (Account) RESTPath

func (a Account) RESTPath(r *mux.Router) string

func (Account) RESTPrefix

func (a Account) RESTPrefix() string

func (Account) RegisterDirectRoutes

func (b Account) RegisterDirectRoutes(r *mux.Router) error

func (Account) RegisterRoutes

func (b Account) RegisterRoutes(r *mux.Router) error

type AccountRequest

type AccountRequest struct {
	ListRequest      // offset, limit, cursor, order
	Meta        bool `schema:"meta"` // include account metadata
}

func (*AccountRequest) WithHeight

func (r *AccountRequest) WithHeight() int64

func (*AccountRequest) WithMerge

func (r *AccountRequest) WithMerge() bool

func (*AccountRequest) WithMeta

func (r *AccountRequest) WithMeta() bool

func (*AccountRequest) WithPrim

func (r *AccountRequest) WithPrim() bool

func (*AccountRequest) WithRights

func (r *AccountRequest) WithRights() bool

func (*AccountRequest) WithStorage

func (r *AccountRequest) WithStorage() bool

func (*AccountRequest) WithUnpack

func (r *AccountRequest) WithUnpack() bool

type AccountTicketListRequest

type AccountTicketListRequest struct {
	ListRequest
	Ticketer  tezos.Address         `schema:"ticketer"`
	Type      tezos.HexBytes        `schema:"type"`
	Content   tezos.HexBytes        `schema:"content"`
	Hash      util.U64String        `schema:"hash"`
	EventType model.TicketEventType `schema:"event_type"`
	Sender    tezos.Address         `schema:"sender"`
	Receiver  tezos.Address         `schema:"receiver"`
	Height    int64                 `schema:"height"`
}

func (AccountTicketListRequest) Load

type Baker

type Baker struct {
	Id                 model.AccountID `json:"-"`
	Address            tezos.Address   `json:"address"`
	ConsensusKey       tezos.Key       `json:"consensus_key"`
	ConsensusAddress   tezos.Address   `json:"consensus_address"`
	BakerSince         time.Time       `json:"baker_since"`
	BakerUntil         *time.Time      `json:"baker_until,omitempty"`
	GracePeriod        int64           `json:"grace_period"`
	BakerVersion       string          `json:"baker_version"`
	TotalBalance       float64         `json:"total_balance"`
	SpendableBalance   float64         `json:"spendable_balance"`
	UnstakedBalance    float64         `json:"unstaked_balance"`
	DelegatedBalance   float64         `json:"delegated_balance"`
	OwnStake           float64         `json:"own_stake"`
	TotalStake         float64         `json:"total_stake"`
	DelegationCapacity float64         `json:"delegation_capacity"`
	StakingCapacity    float64         `json:"staking_capacity"`
	StakingEdge        int64           `json:"staking_edge"`
	StakingLimit       int64           `json:"staking_limit"`
	BakingPower        float64         `json:"baking_power"`
	NetworkShare       float64         `json:"network_share"`
	ActiveDelegations  int64           `json:"active_delegations"`
	ActiveStakers      int64           `json:"active_stakers"`
	IsOverDelegated    bool            `json:"is_over_delegated"`
	IsOverStaked       bool            `json:"is_over_staked"`
	IsActive           bool            `json:"is_active"`

	Events   *BakerEvents     `json:"events,omitempty"`
	Stats    *BakerStatistics `json:"stats,omitempty"`
	Metadata *ShortMetadata   `json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

func NewBaker

func NewBaker(ctx *server.Context, b *model.Baker, args server.Options) *Baker

type BakerEvents

type BakerEvents struct {
	LastBakeHeight    int64     `json:"last_bake_height"`
	LastBakeBlock     string    `json:"last_bake_block"`
	LastBakeTime      time.Time `json:"last_bake_time"`
	LastEndorseHeight int64     `json:"last_endorse_height"`
	LastEndorseBlock  string    `json:"last_endorse_block"`
	LastEndorseTime   time.Time `json:"last_endorse_time"`
	NextBakeHeight    int64     `json:"next_bake_height"`
	NextBakeTime      time.Time `json:"next_bake_time"`
	NextEndorseHeight int64     `json:"next_endorse_height"`
	NextEndorseTime   time.Time `json:"next_endorse_time"`
}

type BakerList

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

func (BakerList) Expires

func (l BakerList) Expires() time.Time

func (BakerList) LastModified

func (l BakerList) LastModified() time.Time

func (BakerList) MarshalJSON

func (l BakerList) MarshalJSON() ([]byte, error)

func (BakerList) RESTPath

func (l BakerList) RESTPath(r *mux.Router) string

func (BakerList) RESTPrefix

func (_ BakerList) RESTPrefix() string

func (BakerList) RegisterDirectRoutes

func (a BakerList) RegisterDirectRoutes(r *mux.Router) error

func (BakerList) RegisterRoutes

func (b BakerList) RegisterRoutes(r *mux.Router) error

type BakerListRequest

type BakerListRequest struct {
	ListRequest
	Active        bool           `schema:"active"`
	Status        *string        `schema:"status"`
	Country       *iso.Country   `schema:"country"`
	Suggest       *tezos.Address `schema:"suggest"`
	WithSponsored bool           `schema:"ads"`
}

type BakerStatistics

type BakerStatistics struct {
	TotalRewardsEarned  float64 `json:"total_rewards_earned"`
	TotalFeesEarned     float64 `json:"total_fees_earned"`
	TotalLost           float64 `json:"total_lost"`
	BlocksBaked         int64   `json:"blocks_baked"`
	BlocksProposed      int64   `json:"blocks_proposed"`
	BlocksNotBaked      int64   `json:"blocks_not_baked"`
	BlocksEndorsed      int64   `json:"blocks_endorsed"`
	BlocksNotEndorsed   int64   `json:"blocks_not_endorsed"`
	SlotsEndorsed       int64   `json:"slots_endorsed"`
	AvgLuck64           *int64  `json:"avg_luck_64,omitempty"`
	AvgPerformance64    *int64  `json:"avg_performance_64,omitempty"`
	AvgContribution64   *int64  `json:"avg_contribution_64,omitempty"`
	NBakerOps           int64   `json:"n_baker_ops"`
	NProposal           int64   `json:"n_proposals"`
	NBallot             int64   `json:"n_ballots"`
	NEndorsement        int64   `json:"n_endorsements"`
	NPreendorsement     int64   `json:"n_preendorsements"`
	NSeedNonce          int64   `json:"n_nonce_revelations"`
	N2Baking            int64   `json:"n_double_bakings"`
	N2Endorsement       int64   `json:"n_double_endorsements"`
	NAccusations        int64   `json:"n_accusations"`
	NSetDepositsLimit   int64   `json:"n_set_limits"`
	NUpdateConsensusKey int64   `json:"n_update_consensus_key"`
	NDrainDelegate      int64   `json:"n_drain_delegate"`
}

type Ballot

type Ballot struct {
	RowId            uint64                 `json:"row_id"`
	Height           int64                  `json:"height"`
	Timestamp        time.Time              `json:"time"`
	ElectionId       int                    `json:"election_id"`
	VotingPeriod     int64                  `json:"voting_period"`
	VotingPeriodKind tezos.VotingPeriodKind `json:"voting_period_kind"`
	Proposal         tezos.ProtocolHash     `json:"proposal"`
	OpHash           tezos.OpHash           `json:"op"`
	Ballot           tezos.BallotVote       `json:"ballot"`
	Stake            float64                `json:"stake"`
	Sender           string                 `json:"sender"`
}

func NewBallot

func NewBallot(ctx *server.Context, b *model.Ballot, p tezos.ProtocolHash, o tezos.OpHash) *Ballot

type BallotList

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

func (BallotList) Expires

func (l BallotList) Expires() time.Time

func (BallotList) LastModified

func (l BallotList) LastModified() time.Time

func (BallotList) MarshalJSON

func (l BallotList) MarshalJSON() ([]byte, error)

type Bigmap

type Bigmap struct {
	Contract      tezos.Address     `json:"contract"`
	BigmapId      int64             `json:"bigmap_id"`
	NUpdates      int64             `json:"n_updates"`
	NKeys         int64             `json:"n_keys"`
	AllocHeight   int64             `json:"alloc_height"`
	AllocBlock    tezos.BlockHash   `json:"alloc_block"`
	AllocTime     time.Time         `json:"alloc_time"`
	UpdatedHeight int64             `json:"update_height"`
	UpdatedBlock  tezos.BlockHash   `json:"update_block"`
	UpdatedTime   time.Time         `json:"update_time"`
	DeletedHeight *int64            `json:"deleted_height"`
	DeletedBlock  *tezos.BlockHash  `json:"deleted_block"`
	DeletedTime   *time.Time        `json:"deleted_time"`
	KeyType       micheline.Typedef `json:"key_type"`
	ValueType     micheline.Typedef `json:"value_type"`
	KeyTypePrim   *micheline.Prim   `json:"key_type_prim,omitempty"`
	ValueTypePrim *micheline.Prim   `json:"value_type_prim,omitempty"`
	// contains filtered or unexported fields
}

func NewBigmap

func NewBigmap(ctx *server.Context, alloc *model.BigmapAlloc, args server.Options) *Bigmap

func (Bigmap) Expires

func (b Bigmap) Expires() time.Time

func (Bigmap) LastModified

func (b Bigmap) LastModified() time.Time

func (Bigmap) RESTPath

func (b Bigmap) RESTPath(r *mux.Router) string

func (Bigmap) RESTPrefix

func (b Bigmap) RESTPrefix() string

func (Bigmap) RegisterDirectRoutes

func (b Bigmap) RegisterDirectRoutes(r *mux.Router) error

func (Bigmap) RegisterRoutes

func (b Bigmap) RegisterRoutes(r *mux.Router) error

type BigmapKey

type BigmapKey struct {
	Key     micheline.Key   `json:"key"`
	KeyHash tezos.ExprHash  `json:"hash"`
	Meta    *BigmapMeta     `json:"meta,omitempty"`
	Prim    *micheline.Prim `json:"prim,omitempty"`
}

keys

type BigmapKeyList

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

func (BigmapKeyList) Expires

func (l BigmapKeyList) Expires() time.Time

func (BigmapKeyList) LastModified

func (l BigmapKeyList) LastModified() time.Time

func (BigmapKeyList) MarshalJSON

func (l BigmapKeyList) MarshalJSON() ([]byte, error)

type BigmapMeta

type BigmapMeta struct {
	Contract     tezos.Address `json:"contract"`
	BigmapId     int64         `json:"bigmap_id"`
	UpdateTime   time.Time     `json:"time"`
	UpdateHeight int64         `json:"height"`
	UpdateOp     tezos.OpHash  `json:"op"`
	Sender       tezos.Address `json:"sender"`
	Source       tezos.Address `json:"source"`
}

bigmap metadata

type BigmapUpdate

type BigmapUpdate struct {
	BigmapValue                      // full value
	Action      micheline.DiffAction `json:"action"`
	BigmapId    int64                `json:"bigmap_id"`

	// alloc/copy
	KeyType       *micheline.Typedef `json:"key_type,omitempty"`
	ValueType     *micheline.Typedef `json:"value_type,omitempty"`
	KeyTypePrim   *micheline.Prim    `json:"key_type_prim,omitempty"`
	ValueTypePrim *micheline.Prim    `json:"value_type_prim,omitempty"`
	SourceId      int64              `json:"source_big_map,omitempty"`
	DestId        int64              `json:"destination_big_map,omitempty"`
}

updates

type BigmapUpdateList

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

func (BigmapUpdateList) Expires

func (l BigmapUpdateList) Expires() time.Time

func (BigmapUpdateList) LastModified

func (l BigmapUpdateList) LastModified() time.Time

func (BigmapUpdateList) MarshalJSON

func (l BigmapUpdateList) MarshalJSON() ([]byte, error)

type BigmapValue

type BigmapValue struct {
	Key       *micheline.Key   `json:"key,omitempty"`   // omit on bigmap clear
	KeyHash   *tezos.ExprHash  `json:"hash,omitempty"`  // omit on bigmap clear
	Value     *micheline.Value `json:"value,omitempty"` // omit on removal updates
	Meta      *BigmapMeta      `json:"meta,omitempty"`
	KeyPrim   *micheline.Prim  `json:"key_prim,omitempty"`
	ValuePrim *micheline.Prim  `json:"value_prim,omitempty"`
	// contains filtered or unexported fields
}

values

func (BigmapValue) Expires

func (t BigmapValue) Expires() time.Time

func (BigmapValue) LastModified

func (t BigmapValue) LastModified() time.Time

type BigmapValueList

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

func (BigmapValueList) Expires

func (l BigmapValueList) Expires() time.Time

func (BigmapValueList) LastModified

func (l BigmapValueList) LastModified() time.Time

func (BigmapValueList) MarshalJSON

func (l BigmapValueList) MarshalJSON() ([]byte, error)

type Block

type Block struct {
	Hash                 tezos.BlockHash           `json:"hash"`
	ParentHash           string                    `json:"predecessor,omitempty"`
	FollowerHash         string                    `json:"successor,omitempty"`
	Protocol             tezos.ProtocolHash        `json:"protocol"`
	Baker                tezos.Address             `json:"baker"`
	Proposer             tezos.Address             `json:"proposer"`
	BakerConsensusKey    tezos.Address             `json:"baker_consensus_key"`
	ProposerConsensusKey tezos.Address             `json:"proposer_consensus_key"`
	Height               int64                     `json:"height"`
	Cycle                int64                     `json:"cycle"`
	IsCycleSnapshot      bool                      `json:"is_cycle_snapshot"`
	Timestamp            time.Time                 `json:"time"`
	Solvetime            int                       `json:"solvetime"`
	Version              int                       `json:"version"`
	Round                int                       `json:"round"`
	Nonce                string                    `json:"nonce"`
	VotingPeriodKind     tezos.VotingPeriodKind    `json:"voting_period_kind"`
	NSlotsEndorsed       int                       `json:"n_endorsed_slots"`
	NOps                 int                       `json:"n_ops_applied"`
	NOpsFailed           int                       `json:"n_ops_failed"`
	NContractCalls       int                       `json:"n_calls"`
	NRollupCalls         int                       `json:"n_rollup_calls"`
	NTx                  int                       `json:"n_tx"`
	NEvents              int                       `json:"n_events"`
	NTickets             int                       `json:"n_tickets"`
	Volume               float64                   `json:"volume"`
	Fee                  float64                   `json:"fee"`
	Reward               float64                   `json:"reward"`
	Deposit              float64                   `json:"deposit"`
	ActivatedSupply      float64                   `json:"activated_supply"`
	MintedSupply         float64                   `json:"minted_supply"`
	BurnedSupply         float64                   `json:"burned_supply"`
	SeenAccounts         int                       `json:"n_accounts"`
	NewAccounts          int                       `json:"n_new_accounts"`
	NewContracts         int                       `json:"n_new_contracts"`
	ClearedAccounts      int                       `json:"n_cleared_accounts"`
	FundedAccounts       int                       `json:"n_funded_accounts"`
	GasLimit             int64                     `json:"gas_limit"`
	GasUsed              int64                     `json:"gas_used"`
	StoragePaid          int64                     `json:"storage_paid"`
	PctAccountsReused    float64                   `json:"pct_account_reuse"`
	LbVote               tezos.FeatureVote         `json:"lb_vote"`
	LbEma                int64                     `json:"lb_ema"`
	AiVote               tezos.FeatureVote         `json:"ai_vote"`
	AiEma                int64                     `json:"ai_ema"`
	Metadata             map[string]*ShortMetadata `json:"metadata,omitempty"`
	Rights               []Right                   `json:"rights,omitempty"`

	// LEGACY
	Ops OpList `json:"ops,omitempty"`
	// contains filtered or unexported fields
}

func NewBlock

func NewBlock(ctx *server.Context, block *model.Block, args server.Options) *Block

func (Block) Expires

func (b Block) Expires() time.Time

func (Block) LastModified

func (b Block) LastModified() time.Time

func (Block) RESTPath

func (b Block) RESTPath(r *mux.Router) string

func (Block) RESTPrefix

func (b Block) RESTPrefix() string

func (Block) RegisterDirectRoutes

func (b Block) RegisterDirectRoutes(r *mux.Router) error

func (Block) RegisterRoutes

func (b Block) RegisterRoutes(r *mux.Router) error

type BlockRequest

type BlockRequest struct {
	Meta   bool `schema:"meta"`   // include account metadata
	Rights bool `schema:"rights"` // include rights
}

func (*BlockRequest) WithHeight

func (r *BlockRequest) WithHeight() int64

func (*BlockRequest) WithMerge

func (r *BlockRequest) WithMerge() bool

func (*BlockRequest) WithMeta

func (r *BlockRequest) WithMeta() bool

func (*BlockRequest) WithPrim

func (r *BlockRequest) WithPrim() bool

func (*BlockRequest) WithRights

func (r *BlockRequest) WithRights() bool

func (*BlockRequest) WithStorage

func (r *BlockRequest) WithStorage() bool

func (*BlockRequest) WithUnpack

func (r *BlockRequest) WithUnpack() bool

type BlockchainConfig

type BlockchainConfig struct {
	// chain identity
	Name        string             `json:"name"`
	Network     string             `json:"network"`
	Symbol      string             `json:"symbol"`
	ChainId     tezos.ChainIdHash  `json:"chain_id"`
	Deployment  int                `json:"deployment"`
	Version     int                `json:"version"`
	Protocol    tezos.ProtocolHash `json:"protocol"`
	StartHeight int64              `json:"start_height"`
	EndHeight   int64              `json:"end_height"`
	Decimals    int                `json:"decimals"`

	MinimalStake      float64 `json:"minimal_stake"`
	PreservedCycles   int64   `json:"preserved_cycles"`
	BlocksPerCycle    int64   `json:"blocks_per_cycle"`
	MinimalBlockDelay int     `json:"minimal_block_delay"`
	// contains filtered or unexported fields
}

func (BlockchainConfig) Expires

func (c BlockchainConfig) Expires() time.Time

func (BlockchainConfig) LastModified

func (c BlockchainConfig) LastModified() time.Time

type BlockchainTip

type BlockchainTip struct {
	Name        string             `json:"name"`
	Network     string             `json:"network"`
	Symbol      string             `json:"symbol"`
	ChainId     tezos.ChainIdHash  `json:"chain_id"`
	GenesisTime time.Time          `json:"genesis_time"`
	BestHash    tezos.BlockHash    `json:"block_hash"`
	Timestamp   time.Time          `json:"timestamp"`
	Height      int64              `json:"height"`
	Cycle       int64              `json:"cycle"`
	Protocol    tezos.ProtocolHash `json:"protocol"`

	TotalAccounts  int64 `json:"total_accounts"`
	TotalContracts int64 `json:"total_contracts"`
	TotalRollups   int64 `json:"total_rollups"`
	FundedAccounts int64 `json:"funded_accounts"`
	DustAccounts   int64 `json:"dust_accounts"`
	DustDelegators int64 `json:"dust_delegators"`
	GhostAccounts  int64 `json:"ghost_accounts"`
	TotalOps       int64 `json:"total_ops"`
	Delegators     int64 `json:"delegators"`
	Stakers        int64 `json:"stakers"`
	Bakers         int64 `json:"bakers"`

	NewAccounts30d     int64   `json:"new_accounts_30d"`
	ClearedAccounts30d int64   `json:"cleared_accounts_30d"`
	FundedAccounts30d  int64   `json:"funded_accounts_30d"`
	Inflation1Y        float64 `json:"inflation_1y"`
	InflationRate1Y    float64 `json:"inflation_rate_1y"`

	Health int `json:"health"`

	Supply *Supply           `json:"supply"`
	Status etl.CrawlerStatus `json:"status"`
	// contains filtered or unexported fields
}

func (BlockchainTip) Expires

func (t BlockchainTip) Expires() time.Time

func (BlockchainTip) LastModified

func (t BlockchainTip) LastModified() time.Time

type Chain

type Chain struct {
	model.Chain
}

func (Chain) Expires

func (c Chain) Expires() time.Time

func (Chain) LastModified

func (c Chain) LastModified() time.Time

type Constant

type Constant struct {
	Address     string             `json:"address"`
	Creator     string             `json:"creator"`
	Height      int64              `json:"height"`
	Time        time.Time          `json:"time"`
	StorageSize int64              `json:"storage_size"`
	Value       micheline.Prim     `json:"value"`
	Features    micheline.Features `json:"features"`
	// contains filtered or unexported fields
}

func NewConstant

func NewConstant(ctx *server.Context, c *model.Constant) *Constant

func (Constant) Expires

func (c Constant) Expires() time.Time

func (Constant) LastModified

func (c Constant) LastModified() time.Time

func (Constant) RESTPath

func (c Constant) RESTPath(r *mux.Router) string

func (Constant) RESTPrefix

func (c Constant) RESTPrefix() string

func (Constant) RegisterDirectRoutes

func (c Constant) RegisterDirectRoutes(r *mux.Router) error

func (Constant) RegisterRoutes

func (c Constant) RegisterRoutes(r *mux.Router) error

type Contract

type Contract struct {
	AccountId     model.AccountID           `json:"account_id"`
	Address       string                    `json:"address"`
	Creator       string                    `json:"creator"`
	Baker         string                    `json:"baker"`
	StorageSize   int64                     `json:"storage_size"`
	StoragePaid   int64                     `json:"storage_paid"`
	StorageBurn   float64                   `json:"storage_burn"`
	TotalFeesUsed float64                   `json:"total_fees_used"`
	FirstSeen     int64                     `json:"first_seen"`
	LastSeen      int64                     `json:"last_seen"`
	FirstSeenTime time.Time                 `json:"first_seen_time"`
	LastSeenTime  time.Time                 `json:"last_seen_time"`
	NCallsIn      int                       `json:"n_calls_in"`
	NCallsOut     int                       `json:"n_calls_out"`
	NCallsFailed  int                       `json:"n_calls_failed"`
	Bigmaps       map[string]int64          `json:"bigmaps,omitempty"`
	InterfaceHash string                    `json:"iface_hash"`
	CodeHash      string                    `json:"code_hash"`
	StorageHash   string                    `json:"storage_hash"`
	CallStats     map[string]int            `json:"call_stats"`
	Features      micheline.Features        `json:"features"`
	Interfaces    micheline.Interfaces      `json:"interfaces"`
	Metadata      map[string]*ShortMetadata `json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

func NewContract

func NewContract(ctx *server.Context, c *model.Contract, a *model.Account, args server.Options) *Contract

func (Contract) Expires

func (a Contract) Expires() time.Time

func (Contract) LastModified

func (a Contract) LastModified() time.Time

func (Contract) RESTPath

func (a Contract) RESTPath(r *mux.Router) string

func (Contract) RESTPrefix

func (a Contract) RESTPrefix() string

func (Contract) RegisterDirectRoutes

func (b Contract) RegisterDirectRoutes(r *mux.Router) error

func (Contract) RegisterRoutes

func (b Contract) RegisterRoutes(r *mux.Router) error

type ContractEventListRequest

type ContractEventListRequest struct {
	ListRequest
	TypeHash uint64 `schema:"type_hash"`
	Tag      string `schema:"tag"`
}

type ContractRequest

type ContractRequest struct {
	ListRequest // offset, limit, cursor, order

	Block   string        `schema:"block"`   // height or hash for time-lock
	Since   string        `schema:"since"`   // block hash or height for updates
	Unpack  bool          `schema:"unpack"`  // unpack packed key/values
	Prim    bool          `schema:"prim"`    // for prim/value rendering
	Meta    bool          `schema:"meta"`    // include account metadata
	Merge   bool          `schema:"merge"`   // collapse internal calls
	Storage bool          `schema:"storage"` // embed storage updates
	Sender  tezos.Address `schema:"sender"`  // sender address

	// decoded entrypoint condition (list of name, num or branch)
	EntrypointMode pack.FilterMode `schema:"-"`
	EntrypointCond string          `schema:"-"`

	// decoded values
	BlockHeight int64           `schema:"-"`
	BlockHash   tezos.BlockHash `schema:"-"`
	SinceHeight int64           `schema:"-"`
	SinceHash   tezos.BlockHash `schema:"-"`
}

func (*ContractRequest) Parse

func (r *ContractRequest) Parse(ctx *server.Context)

func (*ContractRequest) WithHeight

func (r *ContractRequest) WithHeight() int64

func (*ContractRequest) WithMerge

func (r *ContractRequest) WithMerge() bool

func (*ContractRequest) WithMeta

func (r *ContractRequest) WithMeta() bool

func (*ContractRequest) WithPrim

func (r *ContractRequest) WithPrim() bool

func (*ContractRequest) WithRights

func (r *ContractRequest) WithRights() bool

func (*ContractRequest) WithStorage

func (r *ContractRequest) WithStorage() bool

func (*ContractRequest) WithUnpack

func (r *ContractRequest) WithUnpack() bool

type Cycle

type Cycle struct {
	Cycle       int64     `json:"cycle"`
	StartHeight int64     `json:"start_height"`
	EndHeight   int64     `json:"end_height"`
	StartTime   time.Time `json:"start_time"`
	EndTime     time.Time `json:"end_time"`
	Progress    float64   `json:"progress"`
	IsComplete  bool      `json:"is_complete"` // all blocks baked, cycle complete
	IsSnapshot  bool      `json:"is_snapshot"` // snapshot and rights for cycle N+7 exist
	IsActive    bool      `json:"is_active"`   // cycle is in progress

	// this cycle staking data (at snapshot block or last available block)
	SnapshotHeight   int64     `json:"snapshot_height"` // -1 when no snapshot
	SnapshotIndex    int       `json:"snapshot_index"`  // -1 when no snapshot
	SnapshotTime     time.Time `json:"snapshot_time"`   // zero when no snapshot
	EligibleBakers   int64     `json:"eligible_bakers"`
	ActiveDelegators int64     `json:"active_delegators"`
	ActiveStakers    int64     `json:"active_stakers"`
	ActiveBakers     int64     `json:"active_bakers"`
	StakingSupply    float64   `json:"staking_supply"`
	StakingPercent   float64   `json:"staking_percent"` // of total supply

	// health data across all blocks in cycle (empty for future cycles)
	UniqueBakers       int     `json:"unique_bakers"`
	MissedRounds       int     `json:"missed_rounds"`
	MissedEndorsements int     `json:"missed_endorsements"`
	N2Baking           int     `json:"n_double_baking"`
	N2Endorsement      int     `json:"n_double_endorsement"`
	SolveTimeMin       int     `json:"solvetime_min"`
	SolveTimeMax       int     `json:"solvetime_max"`
	SolveTimeMean      float64 `json:"solvetime_mean"`
	RoundMin           int     `json:"round_min"`
	RoundMax           int     `json:"round_max"`
	RoundMean          float64 `json:"round_mean"`
	EndorsementRate    float64 `json:"endorsement_rate"`
	EndorsementsMin    int     `json:"endorsements_min"`
	EndorsementsMax    int     `json:"endorsements_max"`
	EndorsementsMean   float64 `json:"endorsements_mean"`
	SeedNonceRate      float64 `json:"seed_rate"` // from ops
	WorstBakedBlock    int64   `json:"worst_baked_block"`
	WorstEndorsedBlock int64   `json:"worst_endorsed_block"`

	// issuance
	BlockReward              int64 `json:"block_reward"`
	BlockBonusPerSlot        int64 `json:"block_bonus_per_slot"`
	MaxBlockReward           int64 `json:"max_block_reward"`
	EndorsementRewardPerSlot int64 `json:"endorsement_reward_per_slot"`
	NonceRevelationReward    int64 `json:"nonce_revelation_reward"`
	VdfRevelationReward      int64 `json:"vdf_revelation_reward"`
	LBSubsidy                int64 `json:"lb_subsidy"`

	// snapshot cycle who defined rights for this cycle
	SnapshotCycle *Cycle `json:"snapshot_cycle,omitempty"`

	// future cycle who's rights are defined by this cycle
	FollowerCycle *Cycle `json:"follower_cycle,omitempty"`
	// contains filtered or unexported fields
}

func NewCycle

func NewCycle(ctx *server.Context, id int64) *Cycle

func (Cycle) Expires

func (c Cycle) Expires() time.Time

func (Cycle) LastModified

func (c Cycle) LastModified() time.Time

func (Cycle) RESTPath

func (c Cycle) RESTPath(r *mux.Router) string

func (Cycle) RESTPrefix

func (c Cycle) RESTPrefix() string

func (Cycle) RegisterDirectRoutes

func (c Cycle) RegisterDirectRoutes(r *mux.Router) error

func (Cycle) RegisterRoutes

func (c Cycle) RegisterRoutes(r *mux.Router) error

type Election

type Election struct {
	Id                int                    `json:"election_id"`
	MaxPeriods        int                    `json:"max_periods"`
	NumPeriods        int                    `json:"num_periods"`
	NumProposals      int                    `json:"num_proposals"`
	StartTime         time.Time              `json:"start_time"`
	EndTime           time.Time              `json:"end_time"`
	StartHeight       int64                  `json:"start_height"`
	EndHeight         int64                  `json:"end_height"`
	IsEmpty           bool                   `json:"is_empty"`
	IsOpen            bool                   `json:"is_open"`
	IsFailed          bool                   `json:"is_failed"`
	NoQuorum          bool                   `json:"no_quorum"`
	NoMajority        bool                   `json:"no_majority"`
	NoProposal        bool                   `json:"no_proposal"`
	VotingPeriodKind  tezos.VotingPeriodKind `json:"voting_period"`
	ProposalPeriod    *Vote                  `json:"proposal"`
	ExplorationPeriod *Vote                  `json:"exploration"`
	CooldownPeriod    *Vote                  `json:"cooldown"`
	PromotionPeriod   *Vote                  `json:"promotion"`
	AdoptionPeriod    *Vote                  `json:"adoption"`
	// contains filtered or unexported fields
}

func NewElection

func NewElection(ctx *server.Context, e *model.Election) *Election

func (Election) Expires

func (b Election) Expires() time.Time

func (Election) LastModified

func (b Election) LastModified() time.Time

func (Election) RESTPath

func (b Election) RESTPath(r *mux.Router) string

func (Election) RESTPrefix

func (b Election) RESTPrefix() string

func (Election) RegisterDirectRoutes

func (b Election) RegisterDirectRoutes(r *mux.Router) error

func (Election) RegisterRoutes

func (b Election) RegisterRoutes(r *mux.Router) error

type Event

type Event struct {
	Contract tezos.Address  `json:"contract"`
	Type     micheline.Prim `json:"type"`
	Payload  micheline.Prim `json:"payload"`
	Tag      string         `json:"tag"`
	TypeHash util.U64String `json:"type_hash"`
}

func NewEvent

func NewEvent(ctx *server.Context, e *model.Event) *Event

type Explorer

type Explorer struct{}

func (Explorer) Expires

func (e Explorer) Expires() time.Time

func (Explorer) LastModified

func (e Explorer) LastModified() time.Time

func (Explorer) RESTPath

func (e Explorer) RESTPath(r *mux.Router) string

func (Explorer) RESTPrefix

func (e Explorer) RESTPrefix() string

func (Explorer) RegisterDirectRoutes

func (e Explorer) RegisterDirectRoutes(r *mux.Router) error

func (Explorer) RegisterRoutes

func (b Explorer) RegisterRoutes(r *mux.Router) error

type ExplorerDelegator

type ExplorerDelegator struct {
	Address  tezos.Address `json:"address"`
	Balance  int64         `json:"balance"`
	IsFunded bool          `json:"is_funded"`
}

type ExplorerIncome

type ExplorerIncome struct {
	Cycle                  int64   `json:"cycle"`
	Balance                float64 `json:"own_balance"`
	Delegated              float64 `json:"delegated_balance"`
	StakingBalance         float64 `json:"staking_balance"`
	OwnStake               float64 `json:"own_stake"`
	NDelegations           int64   `json:"n_delegations"`
	NStakers               int64   `json:"n_stakers"`
	NBakingRights          int64   `json:"n_baking_rights"`
	NEndorsingRights       int64   `json:"n_endorsing_rights"`
	Luck                   float64 `json:"luck"`                 // coins by fair share of rolls
	LuckPct                int64   `json:"luck_percent"`         // 0.0 .. +N.00 by fair share of rolls
	ContributionPct        int64   `json:"contribution_percent"` // 0.0 .. +N.00 by rights utilized
	PerformancePct         int64   `json:"performance_percent"`  // -N.00 .. +N.00 by expected income
	NBlocksBaked           int64   `json:"n_blocks_baked"`
	NBlocksProposed        int64   `json:"n_blocks_proposed"`
	NBlocksNotBaked        int64   `json:"n_blocks_not_baked"`
	NBlocksEndorsed        int64   `json:"n_blocks_endorsed"`
	NBlocksNotEndorsed     int64   `json:"n_blocks_not_endorsed"`
	NSlotsEndorsed         int64   `json:"n_slots_endorsed"`
	NSeedsRevealed         int64   `json:"n_seeds_revealed"`
	ExpectedIncome         float64 `json:"expected_income"`
	TotalIncome            float64 `json:"total_income"`
	BakingIncome           float64 `json:"baking_income"`
	EndorsingIncome        float64 `json:"endorsing_income"`
	AccusationIncome       float64 `json:"accusation_income"`
	SeedIncome             float64 `json:"seed_income"`
	FeesIncome             float64 `json:"fees_income"`
	TotalLoss              float64 `json:"total_loss"`
	AccusationLoss         float64 `json:"accusation_loss"`
	SeedLoss               float64 `json:"seed_loss"`
	EndorsingLoss          float64 `json:"endorsing_loss"`
	LostAccusationFees     float64 `json:"lost_accusation_fees"`
	LostAccusationRewards  float64 `json:"lost_accusation_rewards"`
	LostAccusationDeposits float64 `json:"lost_accusation_deposits"`
	LostSeedFees           float64 `json:"lost_seed_fees"`
	LostSeedRewards        float64 `json:"lost_seed_rewards"`
}

type ExplorerRights

type ExplorerRights struct {
	Address  tezos.Address `json:"address"`
	Cycle    int64         `json:"cycle"`
	Height   int64         `json:"start_height"`
	Bake     string        `json:"baking_rights"`
	Endorse  string        `json:"endorsing_rights"`
	Baked    string        `json:"blocks_baked"`
	Endorsed string        `json:"blocks_endorsed"`
	Seed     string        `json:"seeds_required"`
	Seeded   string        `json:"seeds_revealed"`
}

type ExplorerSnapshot

type ExplorerSnapshot struct {
	BakeCycle              int64               `json:"baking_cycle"`
	Height                 int64               `json:"snapshot_height"`
	Cycle                  int64               `json:"snapshot_cycle"`
	Timestamp              time.Time           `json:"snapshot_time"`
	Index                  int                 `json:"snapshot_index"`
	StakingBalance         int64               `json:"staking_balance"`
	OwnBalance             int64               `json:"own_balance"`
	OwnStake               int64               `json:"own_stake"`
	DelegatedBalance       int64               `json:"delegated_balance"`
	NDelegations           int64               `json:"n_delegations"`
	NStakers               int64               `json:"n_stakers"`
	ExpectedIncome         int64               `json:"expected_income"`
	TotalIncome            int64               `json:"total_income"`
	BakingIncome           int64               `json:"baking_income"`
	EndorsingIncome        int64               `json:"endorsing_income"`
	AccusationIncome       int64               `json:"accusation_income"`
	SeedIncome             int64               `json:"seed_income"`
	FeesIncome             int64               `json:"fees_income"`
	TotalLoss              int64               `json:"total_loss"`
	AccusationLoss         int64               `json:"accusation_loss"`
	SeedLoss               int64               `json:"seed_loss"`
	EndorsingLoss          int64               `json:"endorsing_loss"`
	LostAccusationFees     int64               `json:"lost_accusation_fees"`
	LostAccusationRewards  int64               `json:"lost_accusation_rewards"`
	LostAccusationDeposits int64               `json:"lost_accusation_deposits"`
	LostSeedFees           int64               `json:"lost_seed_fees"`
	LostSeedRewards        int64               `json:"lost_seed_rewards"`
	Delegators             []ExplorerDelegator `json:"delegators"`
	Stakers                []ExplorerDelegator `json:"stakers"`
}

type ListRequest

type ListRequest struct {
	Limit  uint           `schema:"limit"`
	Offset uint           `schema:"offset"`
	Cursor uint64         `schema:"cursor"`
	Order  pack.OrderType `schema:"order"`
}

generic list request

func (ListRequest) Mode

func (r ListRequest) Mode() pack.FilterMode

type Metadata

type Metadata struct {
	// unique identity
	RowId     model.MetaID    // metadata entry id (used for update/insert)
	AccountId model.AccountID // may be 0 for non-indexed accounts
	Address   tezos.Address   // must be valid

	// input only
	Parsed map[string]json.RawMessage

	// output only
	Raw      []byte
	Stripped []byte

	// filtered properties
	Name           string
	Description    string
	IsSponsored    bool
	IsValidator    bool
	Country        iso.Country
	Kind           string
	Status         string
	MinDelegation  float64
	NonDelegatable bool
	IsPayout       bool
}

func NewMetadata

func NewMetadata(m *model.Metadata) *Metadata

func (Metadata) Equal

func (m Metadata) Equal(x *Metadata) bool

func (Metadata) Expires

func (a Metadata) Expires() time.Time

func (Metadata) Id

func (m Metadata) Id() uint64

func (Metadata) Key

func (m Metadata) Key() uint64

func (Metadata) LastModified

func (a Metadata) LastModified() time.Time

func (Metadata) MarshalJSON

func (m Metadata) MarshalJSON() ([]byte, error)

func (Metadata) RESTPath

func (a Metadata) RESTPath(r *mux.Router) string

func (Metadata) RESTPrefix

func (a Metadata) RESTPrefix() string

func (Metadata) RegisterDirectRoutes

func (a Metadata) RegisterDirectRoutes(r *mux.Router) error

func (Metadata) RegisterRoutes

func (b Metadata) RegisterRoutes(r *mux.Router) error

func (*Metadata) Short

func (m *Metadata) Short() *ShortMetadata

func (*Metadata) UnmarshalJSON

func (m *Metadata) UnmarshalJSON(buf []byte) error

func (*Metadata) Validate

func (m *Metadata) Validate(ctx *server.Context) error

type MetadataDescriptor

type MetadataDescriptor struct {
	Title       string `json:"title"`
	Description string `json:"description"`
	Image       string `json:"image"`
}

func DescribeAddress

func DescribeAddress(ctx *server.Context, addr tezos.Address) MetadataDescriptor

func DescribeBlock

func DescribeBlock(ctx *server.Context, ident string) MetadataDescriptor

func DescribeCycle

func DescribeCycle(ctx *server.Context, cycle int64) MetadataDescriptor

func DescribeElection

func DescribeElection(ctx *server.Context, id int64) MetadataDescriptor

func DescribeOp

func DescribeOp(ctx *server.Context, ops []*model.Op) MetadataDescriptor

type MetadataListRequest

type MetadataListRequest struct {
	ListRequest
	Short    bool         `schema:"short"`
	Kind     *string      `schema:"kind"`
	Status   *string      `schema:"status"`
	Country  *iso.Country `schema:"country"`
	Standard *string      `schema:"standard"`
}

func (MetadataListRequest) HasFilter

func (r MetadataListRequest) HasFilter() bool

type NullMoney

type NullMoney int64

func (NullMoney) MarshalJSON

func (m NullMoney) MarshalJSON() ([]byte, error)

type Op

type Op struct {
	Id            uint64                    `json:"id"`
	Hash          string                    `json:"hash,omitempty"`
	Type          model.OpType              `json:"type"`
	BlockHash     tezos.BlockHash           `json:"block"`
	Timestamp     time.Time                 `json:"time"`
	Height        int64                     `json:"height"`
	Cycle         int64                     `json:"cycle"`
	Counter       int64                     `json:"counter,omitempty"`
	OpN           int                       `json:"op_n"`
	OpP           *int                      `json:"op_p,omitempty"`
	Status        string                    `json:"status,omitempty"`
	IsSuccess     bool                      `json:"is_success"`
	IsContract    bool                      `json:"is_contract,omitempty"`
	IsEvent       bool                      `json:"is_event,omitempty"`
	IsInternal    bool                      `json:"is_internal,omitempty"`
	IsRollup      bool                      `json:"is_rollup,omitempty"`
	GasLimit      int64                     `json:"gas_limit,omitempty"`
	GasUsed       int64                     `json:"gas_used,omitempty"`
	StorageLimit  int64                     `json:"storage_limit,omitempty"`
	StoragePaid   int64                     `json:"storage_paid,omitempty"`
	Volume        float64                   `json:"volume,omitempty"`
	Fee           float64                   `json:"fee,omitempty"`
	Reward        float64                   `json:"reward,omitempty"`
	Deposit       float64                   `json:"deposit,omitempty"`
	Burned        float64                   `json:"burned,omitempty"`
	Data          json.RawMessage           `json:"data,omitempty"`
	Errors        json.RawMessage           `json:"errors,omitempty"`
	Parameters    *Parameters               `json:"parameters,omitempty"`
	Script        *micheline.Script         `json:"script,omitempty"`
	Storage       *Storage                  `json:"storage,omitempty"`
	BigmapDiff    *BigmapUpdateList         `json:"big_map_diff,omitempty"`
	Value         *micheline.Prim           `json:"value,omitempty"`
	CodeHash      string                    `json:"code_hash,omitempty"`
	Sender        *tezos.Address            `json:"sender,omitempty"`
	Receiver      *tezos.Address            `json:"receiver,omitempty"`
	Creator       *tezos.Address            `json:"creator,omitempty"`
	Baker         *tezos.Address            `json:"baker,omitempty"`
	OldBaker      *tezos.Address            `json:"previous_baker,omitempty"`
	Source        *tezos.Address            `json:"source,omitempty"`
	Accuser       *tezos.Address            `json:"accuser,omitempty"`
	Offender      *tezos.Address            `json:"offender,omitempty"`
	Loser         *tezos.Address            `json:"loser,omitempty"`
	Winner        *tezos.Address            `json:"winner,omitempty"`
	Staker        *tezos.Address            `json:"staker,omitempty"`
	Power         int64                     `json:"power,omitempty"`
	Limit         *NullMoney                `json:"limit,omitempty"`
	Solution      tezos.HexBytes            `json:"solution,omitempty"`
	Proof         tezos.HexBytes            `json:"proof,omitempty"`
	Confirmations int64                     `json:"confirmations"`
	NOps          int                       `json:"n_ops,omitempty"`
	Batch         []*Op                     `json:"batch,omitempty"`
	Internal      []*Op                     `json:"internal,omitempty"`
	Metadata      map[string]*ShortMetadata `json:"metadata,omitempty"`
	Events        []*Event                  `json:"events,omitempty"`
	TicketUpdates []*TicketUpdate           `json:"ticket_updates,omitempty"`
	// contains filtered or unexported fields
}

func NewOp

func NewOp(ctx *server.Context, op *model.Op, block *model.Block, cc *model.Contract, args server.Options, cache map[int64]any) *Op

func WrapAsBatchOp

func WrapAsBatchOp(op *Op) *Op

func (*Op) AddAccounts

func (o *Op) AddAccounts(ctx *server.Context, op *model.Op, args server.Options)

func (*Op) AddBigmapUpdates

func (o *Op) AddBigmapUpdates(ctx *server.Context, op *model.Op, cc *model.Contract, args server.Options, cache map[int64]any)

func (*Op) AddContractData

func (o *Op) AddContractData(ctx *server.Context, op *model.Op, cc *model.Contract, args server.Options, cache map[int64]any) error

func (*Op) AddRollupData

func (o *Op) AddRollupData(ctx *server.Context, op *model.Op, args server.Options) error

func (Op) Expires

func (o Op) Expires() time.Time

func (Op) LastModified

func (o Op) LastModified() time.Time

func (Op) RESTPath

func (o Op) RESTPath(r *mux.Router) string

func (Op) RESTPrefix

func (o Op) RESTPrefix() string

func (Op) RegisterDirectRoutes

func (o Op) RegisterDirectRoutes(r *mux.Router) error

func (Op) RegisterRoutes

func (t Op) RegisterRoutes(r *mux.Router) error

func (*Op) UnpackData

func (o *Op) UnpackData(ctx *server.Context, op *model.Op, cc *model.Contract, args server.Options) error

type OpList

type OpList []*Op

func (*OpList) Append

func (l *OpList) Append(op *Op, collapsed bool)

func (OpList) Expires

func (l OpList) Expires() time.Time

func (OpList) LastModified

func (l OpList) LastModified() time.Time

func (OpList) RESTPath

func (l OpList) RESTPath(r *mux.Router) string

func (OpList) RESTPrefix

func (l OpList) RESTPrefix() string

func (OpList) RegisterDirectRoutes

func (l OpList) RegisterDirectRoutes(r *mux.Router) error

func (OpList) RegisterRoutes

func (l OpList) RegisterRoutes(r *mux.Router) error

type OpsRequest

type OpsRequest struct {
	ListRequest // offset, limit, cursor, order

	Block    string        `schema:"block"`    // height or hash for time-lock
	Since    string        `schema:"since"`    // block hash or height for updates
	Unpack   bool          `schema:"unpack"`   // unpack packed key/values
	Prim     bool          `schema:"prim"`     // for prim/value rendering
	Meta     bool          `schema:"meta"`     // include account metadata
	Rights   bool          `schema:"rights"`   // include block rights
	Merge    bool          `schema:"merge"`    // merge batch lists and internal ops
	Storage  bool          `schema:"storage"`  // embed storage update
	Address  tezos.Address `schema:"address"`  // filter by any address
	Sender   tezos.Address `schema:"sender"`   // filter by sender
	Receiver tezos.Address `schema:"receiver"` // filter by receiver

	// decoded type condition
	TypeMode pack.FilterMode  `schema:"-"`
	TypeList model.OpTypeList `schema:"-"`

	// decoded values
	BlockHeight int64           `schema:"-"`
	BlockHash   tezos.BlockHash `schema:"-"`
	SinceHeight int64           `schema:"-"`
	SinceHash   tezos.BlockHash `schema:"-"`
}

used when listing ops in block/account/contract context

func (*OpsRequest) Parse

func (r *OpsRequest) Parse(ctx *server.Context)

implement ParsableRequest interface

func (*OpsRequest) WithHeight

func (r *OpsRequest) WithHeight() int64

func (*OpsRequest) WithMerge

func (r *OpsRequest) WithMerge() bool

func (*OpsRequest) WithMeta

func (r *OpsRequest) WithMeta() bool

func (*OpsRequest) WithPrim

func (r *OpsRequest) WithPrim() bool

func (*OpsRequest) WithRights

func (r *OpsRequest) WithRights() bool

func (*OpsRequest) WithStorage

func (r *OpsRequest) WithStorage() bool

func (*OpsRequest) WithUnpack

func (r *OpsRequest) WithUnpack() bool

type Parameters

type Parameters struct {
	Entrypoint string          `json:"entrypoint,omitempty"`      // contract, ticket transfer
	Value      interface{}     `json:"value,omitempty"`           // contract
	Prim       *micheline.Prim `json:"prim,omitempty"`            // contract
	Kind       string          `json:"kind,omitempty"`            // rollup kind
	L2Address  *tezos.Address  `json:"l2_address,omitempty"`      // tx rollup
	Method     string          `json:"method,omitempty"`          // tx+smart rollup
	Arguments  json.RawMessage `json:"args,omitempty"`            // tx+smart rollup
	Level      *int64          `json:"level,omitempty"`           // tx rollup
	Result     json.RawMessage `json:"result,omitempty"`          // smart rollup
	Type       *micheline.Prim `json:"ticket_ty,omitempty"`       // ticket transfer
	Contents   *micheline.Prim `json:"ticket_contents,omitempty"` // ticket transfer
	Ticketer   *tezos.Address  `json:"ticket_ticketer,omitempty"` // ticket transfer
	Amount     *tezos.Z        `json:"ticket_amount,omitempty"`   // ticket transfer

}

func NewContractParameters

func NewContractParameters(ctx *server.Context, data []byte, typ micheline.Type, op tezos.OpHash, args server.Options) *Parameters

func NewSmartRollupParameters

func NewSmartRollupParameters(ctx *server.Context, op *model.Op, args server.Options) *Parameters

func NewTicketTransferParameters

func NewTicketTransferParameters(ctx *server.Context, op *model.Op, args server.Options) *Parameters

func NewTxRollupParameters

func NewTxRollupParameters(ctx *server.Context, op *model.Op, args server.Options) *Parameters

type Payout

type Payout struct {
	LifetimeRewards  float64 `json:"lifetime_rewards"`
	EstimatedRewards float64 `json:"estimated_rewards"`
	// contains filtered or unexported fields
}

func (Payout) Expires

func (p Payout) Expires() time.Time

func (Payout) LastModified

func (p Payout) LastModified() time.Time

type PingRequest

type PingRequest struct {
	Sequence  int64 `json:"sequence" schema:"sequence"`
	RequestAt int64 `json:"client_time" schema:"client_time"`
}

type Pinger

type Pinger struct {
	Sequence   int64 `json:"sequence"`
	RequestAt  int64 `json:"client_time"` // whatever client sends
	ResponseAt int64 `json:"server_time"` // unix nanosec
}

func (Pinger) Expires

func (p Pinger) Expires() time.Time

func (Pinger) LastModified

func (p Pinger) LastModified() time.Time

func (Pinger) RESTPath

func (p Pinger) RESTPath(r *mux.Router) string

func (Pinger) RESTPrefix

func (p Pinger) RESTPrefix() string

func (Pinger) RegisterDirectRoutes

func (p Pinger) RegisterDirectRoutes(r *mux.Router) error

func (Pinger) RegisterRoutes

func (p Pinger) RegisterRoutes(r *mux.Router) error

type Proposal

type Proposal struct {
	Hash          tezos.ProtocolHash `json:"hash"`
	SourceAddress tezos.Address      `json:"source"`
	BlockHash     tezos.BlockHash    `json:"block_hash"`
	OpHash        tezos.OpHash       `json:"op_hash"`
	Height        int64              `json:"height"`
	Time          time.Time          `json:"time"`
	Stake         float64            `json:"stake"`
	Voters        int64              `json:"voters"`
}

func NewProposal

func NewProposal(ctx *server.Context, p *model.Proposal) *Proposal

type RankList

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

func (RankList) Expires

func (l RankList) Expires() time.Time

func (RankList) LastModified

func (l RankList) LastModified() time.Time

func (RankList) MarshalJSON

func (l RankList) MarshalJSON() ([]byte, error)

type RankListItem

type RankListItem struct {
	Rank    int     `json:"rank"`
	Address string  `json:"address"`
	Balance float64 `json:"balance,omitempty"`
	Traffic int64   `json:"traffic,omitempty"`
	Volume  float64 `json:"volume,omitempty"`
}

type Ranks

type Ranks struct{}

func (Ranks) RESTPath

func (rx Ranks) RESTPath(r *mux.Router) string

func (Ranks) RESTPrefix

func (rx Ranks) RESTPrefix() string

func (Ranks) RegisterDirectRoutes

func (rx Ranks) RegisterDirectRoutes(r *mux.Router) error

func (Ranks) RegisterRoutes

func (rx Ranks) RegisterRoutes(r *mux.Router) error
type Right struct {
	Type           tezos.RightType `json:"type"`
	AccountId      model.AccountID `json:"-"`
	Address        tezos.Address   `json:"address"`
	Round          *int            `json:"round,omitempty"`
	IsUsed         *bool           `json:"is_used,omitempty"`
	IsLost         *bool           `json:"is_lost,omitempty"`
	IsStolen       *bool           `json:"is_stolen,omitempty"`
	IsMissed       *bool           `json:"is_missed,omitempty"`
	IsSeedRequired *bool           `json:"is_seed_required,omitempty"`
	IsSeedRevealed *bool           `json:"is_seed_revealed,omitempty"`
}

func NewRight

func NewRight(ctx *server.Context, r model.BaseRight, addFlags bool) Right

type Script

type Script struct {
	Script      *micheline.Script         `json:"script,omitempty"`
	Type        micheline.Typedef         `json:"storage_type"`
	Entrypoints micheline.Entrypoints     `json:"entrypoints"`
	Views       micheline.Views           `json:"views,omitempty"`
	Bigmaps     map[string]int64          `json:"bigmaps,omitempty"`
	BigmapTypes map[string]micheline.Prim `json:"bigmap_types,omitempty"`
	// contains filtered or unexported fields
}

func (Script) Expires

func (s Script) Expires() time.Time

func (Script) LastModified

func (s Script) LastModified() time.Time

type ShortMetadata

type ShortMetadata Metadata

func (*ShortMetadata) Id

func (m *ShortMetadata) Id() uint64

func (*ShortMetadata) MarshalJSON

func (m *ShortMetadata) MarshalJSON() ([]byte, error)

type Sortable

type Sortable interface {
	Id() uint64
	json.Marshaler
}

type Storage

type Storage struct {
	Value interface{}     `json:"value,omitempty"`
	Prim  *micheline.Prim `json:"prim,omitempty"`
	// contains filtered or unexported fields
}

func NewStorage

func NewStorage(ctx *server.Context, data []byte, typ micheline.Type, mod time.Time, args server.Options) *Storage

func (Storage) Expires

func (t Storage) Expires() time.Time

func (Storage) LastModified

func (t Storage) LastModified() time.Time

type Supply

type Supply struct {
	model.Supply
	// contains filtered or unexported fields
}

configurable marshalling helper

func (Supply) Expires

func (s Supply) Expires() time.Time

func (Supply) LastModified

func (s Supply) LastModified() time.Time

func (*Supply) MarshalJSON

func (s *Supply) MarshalJSON() ([]byte, error)

type Ticket

type Ticket struct {
	Id           uint64         `json:"id"`
	Ticketer     tezos.Address  `json:"ticketer"`
	Type         micheline.Prim `json:"type"`
	Content      micheline.Prim `json:"content"`
	Hash         string         `json:"hash"`
	Creator      tezos.Address  `json:"creator"`
	FirstBlock   int64          `json:"first_block"`
	FirstTime    time.Time      `json:"first_time"`
	LastBlock    int64          `json:"last_block"`
	LastTime     time.Time      `json:"last_time"`
	Supply       tezos.Z        `json:"total_supply"`
	TotalMint    tezos.Z        `json:"total_mint"`
	TotalBurn    tezos.Z        `json:"total_burn"`
	NumTransfers int            `json:"num_transfers"`
	NumHolders   int            `json:"num_holders"`
}

func NewTicket

func NewTicket(ctx *server.Context, tick *model.Ticket) *Ticket

func (Ticket) Expires

func (_ Ticket) Expires() time.Time

func (Ticket) LastModified

func (t Ticket) LastModified() time.Time

type TicketEvent

type TicketEvent struct {
	Id        uint64                `json:"id"`
	Ticketer  tezos.Address         `json:"ticketer"`
	Type      micheline.Prim        `json:"type"`
	Content   micheline.Prim        `json:"content"`
	Hash      string                `json:"hash"`
	EventType model.TicketEventType `json:"event_type"`
	Sender    tezos.Address         `json:"sender"`
	Receiver  tezos.Address         `json:"receiver"`
	Amount    tezos.Z               `json:"amount"`
	Height    int64                 `json:"height"`
	Time      time.Time             `json:"time"`
	OpId      uint64                `json:"op_id"`
}

func NewTicketEvent

func NewTicketEvent(ctx *server.Context, evnt *model.TicketEvent, tick *model.Ticket) *TicketEvent

func (TicketEvent) Expires

func (t TicketEvent) Expires() time.Time

func (TicketEvent) LastModified

func (t TicketEvent) LastModified() time.Time

type TicketEventListRequest

type TicketEventListRequest struct {
	TicketListRequest
	EventType model.TicketEventType `schema:"event_type"`
	Sender    tezos.Address         `schema:"sender"`
	Receiver  tezos.Address         `schema:"receiver"`
	Height    int64                 `schema:"height"`
}

type TicketListRequest

type TicketListRequest struct {
	ListRequest
	Account tezos.Address  `schema:"account"`
	Type    tezos.HexBytes `schema:"type"`
	Content tezos.HexBytes `schema:"content"`
	Hash    util.U64String `schema:"hash"`
}

func (TicketListRequest) Load

func (r TicketListRequest) Load(ctx *server.Context, issuer tezos.Address) (*model.Ticket, error)

type TicketOwner

type TicketOwner struct {
	Id           uint64         `json:"id"`
	Ticketer     tezos.Address  `json:"ticketer"`
	Type         micheline.Prim `json:"type"`
	Content      micheline.Prim `json:"content"`
	Hash         string         `json:"hash"`
	Account      tezos.Address  `json:"account"`
	Balance      tezos.Z        `json:"balance"`
	FirstBlock   int64          `json:"first_block"`
	FirstTime    time.Time      `json:"first_time"`
	LastBlock    int64          `json:"last_block"`
	LastTime     time.Time      `json:"last_time"`
	NumTransfers int            `json:"num_transfers"`
	NumMints     int            `json:"num_mints"`
	NumBurns     int            `json:"num_burns"`
	VolSent      tezos.Z        `json:"vol_sent"`
	VolRecv      tezos.Z        `json:"vol_recv"`
	VolMint      tezos.Z        `json:"vol_mint"`
	VolBurn      tezos.Z        `json:"vol_burn"`
}

func NewTicketOwner

func NewTicketOwner(ctx *server.Context, ownr *model.TicketOwner, tick *model.Ticket) *TicketOwner

func (TicketOwner) Expires

func (t TicketOwner) Expires() time.Time

func (TicketOwner) LastModified

func (t TicketOwner) LastModified() time.Time

type TicketUpdate

type TicketUpdate struct {
	Ticketer tezos.Address  `json:"ticketer"`
	Type     micheline.Prim `json:"type"`
	Content  micheline.Prim `json:"content"`
	Account  tezos.Address  `json:"account"`
	Amount   tezos.Z        `json:"amount"`
}

func NewTicketUpdate

func NewTicketUpdate(ctx *server.Context, u *model.TicketUpdate, _ server.Options) *TicketUpdate

type Token

type Token struct {
	Contract     tezos.Address   `json:"contract"`
	TokenId      tezos.Z         `json:"token_id"`
	Creator      tezos.Address   `json:"creator"`
	Type         model.TokenType `json:"type"`
	FirstBlock   int64           `json:"first_block"`
	FirstTime    time.Time       `json:"first_time"`
	LastBlock    int64           `json:"last_block"`
	LastTime     time.Time       `json:"last_time"`
	Supply       tezos.Z         `json:"total_supply"`
	TotalMint    tezos.Z         `json:"total_mint"`
	TotalBurn    tezos.Z         `json:"total_burn"`
	NumTransfers int             `json:"num_transfers"`
	NumHolders   int             `json:"num_holders"`
	Metadata     json.RawMessage `json:"metadata,omitempty"`
}

func NewToken

func NewToken(ctx *server.Context, tokn *model.Token) *Token

func (Token) Expires

func (t Token) Expires() time.Time

func (Token) LastModified

func (t Token) LastModified() time.Time

func (Token) RESTPath

func (t Token) RESTPath(r *mux.Router) string

func (Token) RESTPrefix

func (t Token) RESTPrefix() string

func (Token) RegisterDirectRoutes

func (t Token) RegisterDirectRoutes(r *mux.Router) error

func (Token) RegisterRoutes

func (t Token) RegisterRoutes(r *mux.Router) error

type TokenBalanceListRequest

type TokenBalanceListRequest struct {
	ListRequest
	Contract tezos.Address `schema:"contract"`
	WithZero bool          `schema:"zero"`
}

type TokenEvent

type TokenEvent struct {
	Contract tezos.Address        `json:"contract"`
	TokenId  tezos.Z              `json:"token_id"`
	Type     model.TokenEventType `json:"type"`
	Signer   tezos.Address        `json:"signer"`
	Sender   tezos.Address        `json:"sender"`
	Receiver tezos.Address        `json:"receiver"`
	Amount   tezos.Z              `json:"amount"`
	Height   int64                `json:"height"`
	Time     time.Time            `json:"time"`
	OpId     model.OpID           `json:"op_id"`
}

func NewTokenEvent

func NewTokenEvent(ctx *server.Context, evnt *model.TokenEvent, tokn *model.Token) *TokenEvent

func (TokenEvent) Expires

func (t TokenEvent) Expires() time.Time

func (TokenEvent) LastModified

func (t TokenEvent) LastModified() time.Time

type TokenEventListRequest

type TokenEventListRequest struct {
	ListRequest
	Contract tezos.Address        `schema:"contract"`
	Type     model.TokenEventType `schema:"type"`
}

type TokenListRequest

type TokenListRequest struct {
	ListRequest
	Contract tezos.Address   `schema:"contract"`
	Type     model.TokenType `schema:"type"`
}

type TokenOwner

type TokenOwner struct {
	Account      tezos.Address   `json:"account"`
	Contract     tezos.Address   `json:"contract"`
	TokenId      tezos.Z         `json:"token_id"`
	Type         model.TokenType `json:"type"`
	FirstBlock   int64           `json:"first_block"`
	FirstTime    time.Time       `json:"first_time"`
	LastBlock    int64           `json:"last_block"`
	LastTime     time.Time       `json:"last_time"`
	NumTransfers int             `json:"num_transfers"`
	NumMints     int             `json:"num_mints"`
	NumBurns     int             `json:"num_burns"`
	VolSent      tezos.Z         `json:"vol_sent"`
	VolRecv      tezos.Z         `json:"vol_recv"`
	VolMint      tezos.Z         `json:"vol_mint"`
	VolBurn      tezos.Z         `json:"vol_burn"`
	Metadata     json.RawMessage `json:"metadata,omitempty"`
}

func NewTokenOwner

func NewTokenOwner(ctx *server.Context, ownr *model.TokenOwner, tokn *model.Token) *TokenOwner

func (TokenOwner) Expires

func (t TokenOwner) Expires() time.Time

func (TokenOwner) LastModified

func (t TokenOwner) LastModified() time.Time

type Vote

type Vote struct {
	VotingPeriod     int64                  `json:"voting_period"`
	VotingPeriodKind tezos.VotingPeriodKind `json:"voting_period_kind"`
	StartTime        time.Time              `json:"period_start_time"`
	EndTime          time.Time              `json:"period_end_time"`
	StartHeight      int64                  `json:"period_start_block"`
	EndHeight        int64                  `json:"period_end_block"`
	EligibleStake    float64                `json:"eligible_stake"`
	EligibleVoters   int64                  `json:"eligible_voters"`
	QuorumPct        int64                  `json:"quorum_pct"`
	QuorumStake      float64                `json:"quorum_stake"`
	TurnoutStake     float64                `json:"turnout_stake"`
	TurnoutVoters    int64                  `json:"turnout_voters"`
	TurnoutPct       int64                  `json:"turnout_pct"`
	TurnoutEma       int64                  `json:"turnout_ema"`
	YayStake         float64                `json:"yay_stake"`
	YayVoters        int64                  `json:"yay_voters"`
	NayStake         float64                `json:"nay_stake"`
	NayVoters        int64                  `json:"nay_voters"`
	PassStake        float64                `json:"pass_stake"`
	PassVoters       int64                  `json:"pass_voters"`
	IsOpen           bool                   `json:"is_open"`
	IsFailed         bool                   `json:"is_failed"`
	IsDraw           bool                   `json:"is_draw"`
	NoProposal       bool                   `json:"no_proposal"`
	NoQuorum         bool                   `json:"no_quorum"`
	NoMajority       bool                   `json:"no_majority"`
	Proposals        []*Proposal            `json:"proposals"`
}

func NewVote

func NewVote(ctx *server.Context, v *model.Vote) *Vote

type Voter

type Voter struct {
	RowId     model.AccountID      `json:"row_id"`
	Address   tezos.Address        `json:"address"`
	Stake     float64              `json:"stake"`
	HasVoted  bool                 `json:"has_voted"`
	Ballot    tezos.BallotVote     `json:"ballot,omitempty"`
	Proposals []tezos.ProtocolHash `json:"proposals,omitempty"`
}

func NewVoter

func NewVoter(ctx *server.Context, v *model.Voter) *Voter

type VoterList

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

func (VoterList) Expires

func (l VoterList) Expires() time.Time

func (VoterList) LastModified

func (l VoterList) LastModified() time.Time

func (VoterList) MarshalJSON

func (l VoterList) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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