Documentation
¶
Index ¶
- Constants
- func BoolPtr(b bool) *bool
- func CreateMetadata(ctx *server.Context) (interface{}, int)
- func DescribeMetadata(ctx *server.Context) (interface{}, int)
- func DisableLog()
- func Float64Ptr(f float64) *float64
- func GetBakerIncome(ctx *server.Context) (interface{}, int)
- func GetBakerRights(ctx *server.Context) (interface{}, int)
- func GetBakerSnapshot(ctx *server.Context) (interface{}, int)
- func GetBlockchainConfig(ctx *server.Context) (interface{}, int)
- func GetBlockchainProtocols(ctx *server.Context) (interface{}, int)
- func GetBlockchainTip(ctx *server.Context) (interface{}, int)
- func GetRichList(ctx *server.Context) (interface{}, int)
- func GetStatus(ctx *server.Context) (interface{}, int)
- func GetTrafficList(ctx *server.Context) (interface{}, int)
- func GetVolumeList(ctx *server.Context) (interface{}, int)
- func IntPtr(i int) *int
- func ListAccountOperations(ctx *server.Context) (interface{}, int)
- func ListAccountTicketBalances(ctx *server.Context) (any, int)
- func ListAccountTicketEvents(ctx *server.Context) (any, int)
- func ListAccountTokenBalances(ctx *server.Context) (interface{}, int)
- func ListAccountTokenEvents(ctx *server.Context) (interface{}, int)
- func ListBakerDelegations(ctx *server.Context) (interface{}, int)
- func ListBakerEndorsements(ctx *server.Context) (interface{}, int)
- func ListBakerVotes(ctx *server.Context) (interface{}, int)
- func ListBakers(ctx *server.Context) (interface{}, int)
- func ListBallots(ctx *server.Context) (interface{}, int)
- func ListBigmapKeyUpdates(ctx *server.Context) (interface{}, int)
- func ListBigmapKeys(ctx *server.Context) (interface{}, int)
- func ListBigmapUpdates(ctx *server.Context) (interface{}, int)
- func ListBigmapValues(ctx *server.Context) (interface{}, int)
- func ListBlockOps(ctx *server.Context) (interface{}, int)
- func ListContractCalls(ctx *server.Context) (interface{}, int)
- func ListContractEvents(ctx *server.Context) (interface{}, int)
- func ListMetadata(ctx *server.Context) (interface{}, int)
- func ListMetadataSchemas(ctx *server.Context) (interface{}, int)
- func ListTicketBalances(ctx *server.Context) (any, int)
- func ListTicketEvents(ctx *server.Context) (any, int)
- func ListTickets(ctx *server.Context) (any, int)
- func ListTokenBalances(ctx *server.Context) (interface{}, int)
- func ListTokenEvents(ctx *server.Context) (interface{}, int)
- func ListTokens(ctx *server.Context) (interface{}, int)
- func ListVoters(ctx *server.Context) (interface{}, int)
- func Ping(ctx *server.Context) (interface{}, int)
- func PurgeCaches()
- func PurgeMetadata(ctx *server.Context) (interface{}, int)
- func ReadAccount(ctx *server.Context) (interface{}, int)
- func ReadAccountOps(ctx *server.Context) (interface{}, int)
- func ReadBaker(ctx *server.Context) (interface{}, int)
- func ReadBigmap(ctx *server.Context) (interface{}, int)
- func ReadBigmapValue(ctx *server.Context) (interface{}, int)
- func ReadBlock(ctx *server.Context) (interface{}, int)
- func ReadBlockOps(ctx *server.Context) (interface{}, int)
- func ReadChain(ctx *server.Context) (interface{}, int)
- func ReadConstant(ctx *server.Context) (interface{}, int)
- func ReadContract(ctx *server.Context) (interface{}, int)
- func ReadContractScript(ctx *server.Context) (interface{}, int)
- func ReadContractStorage(ctx *server.Context) (interface{}, int)
- func ReadCycle(ctx *server.Context) (interface{}, int)
- func ReadDeployedContracts(ctx *server.Context) (interface{}, int)
- func ReadElection(ctx *server.Context) (interface{}, int)
- func ReadMetadata(ctx *server.Context) (interface{}, int)
- func ReadMetadataSchema(ctx *server.Context) (interface{}, int)
- func ReadOp(ctx *server.Context) (interface{}, int)
- func ReadSupply(ctx *server.Context) (interface{}, int)
- func ReadToken(ctx *server.Context) (interface{}, int)
- func RemoveMetadata(ctx *server.Context) (interface{}, int)
- func SitemapMetadata(ctx *server.Context) (interface{}, int)
- func UpdateMetadata(ctx *server.Context) (interface{}, int)
- func UseLogger(logger logpkg.Logger)
- type Account
- type AccountRequest
- type AccountTicketListRequest
- type Baker
- type BakerEvents
- type BakerList
- func (l BakerList) Expires() time.Time
- func (l BakerList) LastModified() time.Time
- func (l BakerList) MarshalJSON() ([]byte, error)
- func (l BakerList) RESTPath(r *mux.Router) string
- func (_ BakerList) RESTPrefix() string
- func (a BakerList) RegisterDirectRoutes(r *mux.Router) error
- func (b BakerList) RegisterRoutes(r *mux.Router) error
- type BakerListRequest
- type BakerStatistics
- type Ballot
- type BallotList
- type Bigmap
- type BigmapKey
- type BigmapKeyList
- type BigmapMeta
- type BigmapUpdate
- type BigmapUpdateList
- type BigmapValue
- type BigmapValueList
- type Block
- type BlockRequest
- type BlockchainConfig
- type BlockchainTip
- type Chain
- type Constant
- type Contract
- type ContractEventListRequest
- type ContractRequest
- func (r *ContractRequest) Parse(ctx *server.Context)
- func (r *ContractRequest) WithHeight() int64
- func (r *ContractRequest) WithMerge() bool
- func (r *ContractRequest) WithMeta() bool
- func (r *ContractRequest) WithPrim() bool
- func (r *ContractRequest) WithRights() bool
- func (r *ContractRequest) WithStorage() bool
- func (r *ContractRequest) WithUnpack() bool
- type Cycle
- type Election
- type Event
- type Explorer
- type ExplorerDelegator
- type ExplorerIncome
- type ExplorerRights
- type ExplorerSnapshot
- type ListRequest
- type Metadata
- func (m Metadata) Equal(x *Metadata) bool
- func (a Metadata) Expires() time.Time
- func (m Metadata) Id() uint64
- func (m Metadata) Key() uint64
- func (a Metadata) LastModified() time.Time
- func (m Metadata) MarshalJSON() ([]byte, error)
- func (a Metadata) RESTPath(r *mux.Router) string
- func (a Metadata) RESTPrefix() string
- func (a Metadata) RegisterDirectRoutes(r *mux.Router) error
- func (b Metadata) RegisterRoutes(r *mux.Router) error
- func (m *Metadata) Short() *ShortMetadata
- func (m *Metadata) UnmarshalJSON(buf []byte) error
- func (m *Metadata) Validate(ctx *server.Context) error
- type MetadataDescriptor
- func DescribeAddress(ctx *server.Context, addr tezos.Address) MetadataDescriptor
- func DescribeBlock(ctx *server.Context, ident string) MetadataDescriptor
- func DescribeCycle(ctx *server.Context, cycle int64) MetadataDescriptor
- func DescribeElection(ctx *server.Context, id int64) MetadataDescriptor
- func DescribeOp(ctx *server.Context, ops []*model.Op) MetadataDescriptor
- type MetadataListRequest
- type NullMoney
- type Op
- func (o *Op) AddAccounts(ctx *server.Context, op *model.Op, args server.Options)
- func (o *Op) AddBigmapUpdates(ctx *server.Context, op *model.Op, cc *model.Contract, args server.Options, ...)
- func (o *Op) AddContractData(ctx *server.Context, op *model.Op, cc *model.Contract, args server.Options, ...) error
- func (o *Op) AddRollupData(ctx *server.Context, op *model.Op, args server.Options) error
- func (o Op) Expires() time.Time
- func (o Op) LastModified() time.Time
- func (o Op) RESTPath(r *mux.Router) string
- func (o Op) RESTPrefix() string
- func (o Op) RegisterDirectRoutes(r *mux.Router) error
- func (t Op) RegisterRoutes(r *mux.Router) error
- func (o *Op) UnpackData(ctx *server.Context, op *model.Op, cc *model.Contract, args server.Options) error
- type OpList
- func (l *OpList) Append(op *Op, collapsed bool)
- func (l OpList) Expires() time.Time
- func (l OpList) LastModified() time.Time
- func (l OpList) RESTPath(r *mux.Router) string
- func (l OpList) RESTPrefix() string
- func (l OpList) RegisterDirectRoutes(r *mux.Router) error
- func (l OpList) RegisterRoutes(r *mux.Router) error
- type OpsRequest
- func (r *OpsRequest) Parse(ctx *server.Context)
- func (r *OpsRequest) WithHeight() int64
- func (r *OpsRequest) WithMerge() bool
- func (r *OpsRequest) WithMeta() bool
- func (r *OpsRequest) WithPrim() bool
- func (r *OpsRequest) WithRights() bool
- func (r *OpsRequest) WithStorage() bool
- func (r *OpsRequest) WithUnpack() bool
- type Parameters
- func NewContractParameters(ctx *server.Context, data []byte, typ micheline.Type, op tezos.OpHash, ...) *Parameters
- func NewSmartRollupParameters(ctx *server.Context, op *model.Op, args server.Options) *Parameters
- func NewTicketTransferParameters(ctx *server.Context, op *model.Op, args server.Options) *Parameters
- func NewTxRollupParameters(ctx *server.Context, op *model.Op, args server.Options) *Parameters
- type Payout
- type PingRequest
- type Pinger
- type Proposal
- type RankList
- type RankListItem
- type Ranks
- type Right
- type Script
- type ShortMetadata
- type Sortable
- type Storage
- type Supply
- type Ticket
- type TicketEvent
- type TicketEventListRequest
- type TicketListRequest
- type TicketOwner
- type TicketUpdate
- type Token
- type TokenBalanceListRequest
- type TokenEvent
- type TokenEventListRequest
- type TokenListRequest
- type TokenOwner
- type Vote
- type Voter
- type VoterList
Constants ¶
View Source
const MetadataCacheSize = 32768
Variables ¶
This section is empty.
Functions ¶
func CreateMetadata ¶
func DescribeMetadata ¶
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 GetBakerIncome ¶
func GetBakerRights ¶
func GetBakerSnapshot ¶
func GetBlockchainConfig ¶
func GetBlockchainProtocols ¶
func GetBlockchainTip ¶
func GetRichList ¶
func GetTrafficList ¶
func GetVolumeList ¶
func ListAccountOperations ¶
func ListAccountTokenEvents ¶
func ListBakerDelegations ¶
func ListBakerEndorsements ¶
func ListBakerVotes ¶
func ListBakers ¶
func ListBallots ¶
func ListBigmapKeyUpdates ¶
func ListBigmapKeys ¶
func ListBigmapUpdates ¶
func ListBigmapValues ¶
func ListBlockOps ¶
func ListContractCalls ¶
list incoming transaction with data
func ListContractEvents ¶
func ListMetadata ¶
func ListMetadataSchemas ¶
func ListTokenBalances ¶
func ListTokenEvents ¶
func ListTokens ¶
func ListVoters ¶
func PurgeCaches ¶
func PurgeCaches()
func PurgeMetadata ¶
func ReadAccount ¶
func ReadBigmap ¶
func ReadBigmapValue ¶
func ReadConstant ¶
func ReadContract ¶
func ReadContractScript ¶
func ReadContractStorage ¶
func ReadDeployedContracts ¶
func ReadElection ¶
func ReadMetadata ¶
func ReadMetadataSchema ¶
func ReadSupply ¶
func RemoveMetadata ¶
func SitemapMetadata ¶
func UpdateMetadata ¶
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 (Account) LastModified ¶
func (Account) RESTPrefix ¶
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"`
}
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"`
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
}
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) LastModified ¶
func (BakerList) MarshalJSON ¶
func (BakerList) RESTPrefix ¶
func (BakerList) RegisterDirectRoutes ¶
type BakerListRequest ¶
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"`
}
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 (Bigmap) LastModified ¶
func (Bigmap) RESTPrefix ¶
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 (Block) LastModified ¶
func (Block) RESTPrefix ¶
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 ¶
func (Chain) LastModified ¶
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 (Constant) LastModified ¶
func (Constant) RESTPrefix ¶
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 (Contract) LastModified ¶
func (Contract) RESTPrefix ¶
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 (Cycle) LastModified ¶
func (Cycle) RESTPrefix ¶
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 (Election) LastModified ¶
func (Election) RESTPrefix ¶
type Event ¶
type ExplorerDelegator ¶
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
Logo string
IsSponsored bool
IsValidator bool
Country iso.Country
Kind string
Status string
MinDelegation float64
NonDelegatable bool
IsPayout bool
}
func NewMetadata ¶
func (Metadata) LastModified ¶
func (Metadata) MarshalJSON ¶
func (Metadata) RESTPrefix ¶
func (*Metadata) Short ¶
func (m *Metadata) Short() *ShortMetadata
func (*Metadata) UnmarshalJSON ¶
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 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 WrapAsBatchOp ¶
func (*Op) AddAccounts ¶
func (*Op) AddBigmapUpdates ¶
func (*Op) AddContractData ¶
func (*Op) AddRollupData ¶
func (Op) LastModified ¶
func (Op) RESTPrefix ¶
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 NewTxRollupParameters ¶
type Payout ¶
type Payout struct {
LifetimeRewards float64 `json:"lifetime_rewards"`
EstimatedRewards float64 `json:"estimated_rewards"`
// contains filtered or unexported fields
}
func (Payout) LastModified ¶
type PingRequest ¶
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) LastModified ¶
func (Pinger) RESTPrefix ¶
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"`
}
type RankList ¶
type RankList struct {
// contains filtered or unexported fields
}
func (RankList) LastModified ¶
func (RankList) MarshalJSON ¶
type RankListItem ¶
type Right ¶
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"`
}
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) LastModified ¶
type ShortMetadata ¶
type ShortMetadata Metadata
func (*ShortMetadata) Id ¶
func (m *ShortMetadata) Id() uint64
func (*ShortMetadata) MarshalJSON ¶
func (m *ShortMetadata) MarshalJSON() ([]byte, error)
type Storage ¶
type Storage struct {
Value interface{} `json:"value,omitempty"`
Prim *micheline.Prim `json:"prim,omitempty"`
// contains filtered or unexported fields
}
func NewStorage ¶
func (Storage) LastModified ¶
type Supply ¶
configurable marshalling helper
func (Supply) LastModified ¶
func (*Supply) MarshalJSON ¶
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 (Ticket) LastModified ¶
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 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 (Token) LastModified ¶
func (Token) RESTPrefix ¶
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"`
}
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"`
}
type VoterList ¶
type VoterList struct {
// contains filtered or unexported fields
}
func (VoterList) LastModified ¶
func (VoterList) MarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.