Documentation
¶
Index ¶
- Variables
- type Account
- type AccountAPI
- type AccountList
- type AccountQuery
- type AccountsReport
- type ActivityReport
- type Address
- type AddressSet
- type AddressType
- type AgeReport
- type AliasMetadata
- type AssetMetadata
- type Baker
- type BakerAPI
- type BakerEvents
- type BakerList
- type BakerMetadata
- type BakerStatistics
- type BalanceReport
- type Ballot
- type BallotList
- type Bigmap
- type BigmapEvent
- type BigmapEvents
- type BigmapKey
- type BigmapMeta
- type BigmapQuery
- type BigmapUpdate
- type BigmapUpdateList
- type BigmapUpdateQuery
- type BigmapUpdateRow
- type BigmapValue
- func (r BigmapValue) AsKey(typ Type) BigmapKey
- func (r BigmapValue) AsValue(typ Type) Value
- func (v BigmapValue) GetAddress(path string) (Address, bool)
- func (v BigmapValue) GetBig(path string) (*big.Int, bool)
- func (v BigmapValue) GetInt64(path string) (int64, bool)
- func (v BigmapValue) GetString(path string) (string, bool)
- func (v BigmapValue) GetTime(path string) (time.Time, bool)
- func (v BigmapValue) GetValue(path string) (interface{}, bool)
- func (v BigmapValue) GetZ(path string) (Z, bool)
- func (v BigmapValue) Has(path string) bool
- func (v BigmapValue) Unmarshal(val any) error
- func (v BigmapValue) Walk(path string, fn util.ValueWalkerFunc) error
- type BigmapValueList
- type BigmapValueQuery
- type Block
- type BlockAPI
- type BlockHash
- type BlockId
- type BlockList
- type BlockQuery
- type Chain
- type ChainIdHash
- type ChainQuery
- type Config
- type Constant
- type ConstantQuery
- type Contract
- type ContractAPI
- type ContractList
- type ContractParameters
- type ContractQuery
- type ContractScript
- type ContractValue
- func (v ContractValue) AsPrim() (Prim, bool)
- func (v ContractValue) GetAddress(path string) (Address, bool)
- func (v ContractValue) GetBig(path string) (*big.Int, bool)
- func (v ContractValue) GetInt64(path string) (int64, bool)
- func (v ContractValue) GetString(path string) (string, bool)
- func (v ContractValue) GetTime(path string) (time.Time, bool)
- func (v ContractValue) GetValue(path string) (interface{}, bool)
- func (v ContractValue) GetZ(path string) (Z, bool)
- func (v ContractValue) Has(path string) bool
- func (v ContractValue) IsPrim() bool
- func (v ContractValue) Unmarshal(val interface{}) error
- func (v ContractValue) Walk(path string, fn util.ValueWalkerFunc) error
- type Costs
- type Deployment
- type DiffAction
- type DomainMetadata
- type Election
- type Entrypoints
- type Event
- type EventQuery
- type ExplorerAPI
- type ExprHash
- type Head
- type Income
- type IncomeQuery
- type Key
- type LocationMetadata
- type MediaMetadata
- type Metadata
- func (m *Metadata) Alias() *AliasMetadata
- func (m *Metadata) Asset() *AssetMetadata
- func (m *Metadata) Baker() *BakerMetadata
- func (m Metadata) Clone() Metadata
- func (m *Metadata) Delete(name string)
- func (m *Metadata) Domain() *DomainMetadata
- func (m Metadata) Get(name string) any
- func (m Metadata) Has(name string) bool
- func (m Metadata) ID() string
- func (m Metadata) IsEmpty() bool
- func (m *Metadata) Location() *LocationMetadata
- func (m Metadata) MarshalJSON() ([]byte, error)
- func (m *Metadata) Media() *MediaMetadata
- func (m Metadata) Merge(d Metadata) Metadata
- func (m *Metadata) Payout() *PayoutMetadata
- func (m *Metadata) Profile() *ProfileMetadata
- func (m *Metadata) Rights() *RightsMetadata
- func (m *Metadata) Set(name string, data any)
- func (m *Metadata) Social() *SocialMetadata
- func (m *Metadata) Tz16() *contract.Tz16
- func (m *Metadata) Tz21() *Tz21Metadata
- func (m *Metadata) UnmarshalJSON(buf []byte) error
- func (m *Metadata) Updated() *UpdatedMetadata
- type MetadataAPI
- type MetadataDescriptor
- type MultiKey
- func (k MultiKey) GetAddress(path string) (Address, bool)
- func (k MultiKey) GetBig(path string) (*big.Int, bool)
- func (k MultiKey) GetInt64(path string) (int64, bool)
- func (k MultiKey) GetString(path string) (string, bool)
- func (k MultiKey) GetTime(path string) (time.Time, bool)
- func (k MultiKey) GetValue(path string) (interface{}, bool)
- func (k MultiKey) Len() int
- func (k MultiKey) MarshalJSON() ([]byte, error)
- func (k MultiKey) String() string
- func (k MultiKey) Unmarshal(val interface{}) error
- func (k *MultiKey) UnmarshalJSON(buf []byte) error
- func (k MultiKey) Walk(path string, fn util.ValueWalkerFunc) error
- type Op
- func (o *Op) Addresses() *AddressSet
- func (o *Op) BlockId() BlockId
- func (o *Op) Content() []*Op
- func (o Op) Costs() Costs
- func (o *Op) Cursor() uint64
- func (o Op) DecodeBigmapEvents(noFail bool) (BigmapEvents, error)
- func (o Op) DecodeBigmapUpdates(withPrim, noFail bool, onError int) (BigmapUpdateList, error)
- func (o Op) DecodeParams(noFail bool, onError int) (*ContractParameters, error)
- func (o Op) DecodeStorage(noFail bool, onError int) (*ContractValue, error)
- func (o Op) DecodeStoragePrim(noFail bool) (prim Prim, err error)
- func (o Op) HasBigmapUpdates() bool
- func (o Op) HasParameters() bool
- func (o Op) HasStorage() bool
- func (o *Op) WithScript(s *ContractScript) *Op
- func (o *Op) WithTypes(param, store Type, eps Entrypoints, b map[int64]Type) *Op
- type OpAPI
- type OpHash
- type OpList
- type OpQuery
- type OpReport
- type OpStatus
- type OpType
- type Parameters
- type PayoutMetadata
- type Prim
- type ProfileMetadata
- type Proposal
- type ProtocolHash
- type Query
- type Right
- type RightType
- type Rights
- func (r Rights) IsLost(pos int) bool
- func (r Rights) IsMissed(pos int) bool
- func (r Rights) IsSeedRequired(pos int) bool
- func (r Rights) IsSeedRevealed(pos int) bool
- func (r Rights) IsStolen(pos int) bool
- func (r Rights) IsUsed(pos int) bool
- func (r Rights) Pos(height int64) int
- func (r Rights) RightAt(height int64, typ RightType) (Right, bool)
- type RightsList
- type RightsMetadata
- type RightsQuery
- type Script
- type SmartRollupAddMessages
- type SmartRollupCementdeprecated
- type SmartRollupExecuteOutboxMessage
- type SmartRollupOriginate
- type SmartRollupPublish
- type SmartRollupRecoverBond
- type SmartRollupRefute
- type SmartRollupResult
- type SmartRollupTimeout
- type Snapshot
- type SocialMetadata
- type StakeSnapshot
- type StakeSnapshotList
- type StakeSnapshotQuery
- type Staker
- type StatsAPI
- type Status
- type Supply
- type SupplyReport
- type TicketUpdate
- type Tip
- type Token
- type TokenMetadata
- type Type
- type Typedef
- type Tz21Attribute
- type Tz21DataRate
- type Tz21Dimension
- type Tz21Format
- type Tz21Metadata
- type UpdatedMetadata
- type Value
- type Views
- type Vote
- type Voter
- type Z
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NewQuery = client.NewQuery NewAddressSet = tezos.NewAddressSet NewValue = micheline.NewValue NewType = micheline.NewType NewKey = micheline.NewKey DiffActionAlloc = micheline.DiffActionAlloc DiffActionCopy = micheline.DiffActionCopy DiffActionUpdate = micheline.DiffActionUpdate DiffActionRemove = micheline.DiffActionRemove RightTypeBaking = tezos.RightTypeBaking RightTypeEndorsing = tezos.RightTypeEndorsing )
View Source
var ( ErrNoStorage = errors.New("no storage") ErrNoParams = errors.New("no parameters") ErrNoBigmapDiff = errors.New("no bigmap diff") ErrNoType = errors.New("API type missing") )
View Source
var Schemas = map[string]func() any{ "alias": func() any { return new(AliasMetadata) }, "baker": func() any { return new(BakerMetadata) }, "payout": func() any { return new(PayoutMetadata) }, "asset": func() any { return new(AssetMetadata) }, "location": func() any { return new(LocationMetadata) }, "tzdomain": func() any { return new(DomainMetadata) }, "tzprofile": func() any { return new(ProfileMetadata) }, "media": func() any { return new(MediaMetadata) }, "rights": func() any { return new(RightsMetadata) }, "social": func() any { return new(SocialMetadata) }, "tz16": func() any { return new(contract.Tz16) }, "tz21": func() any { return new(Tz21Metadata) }, "updated": func() any { return new(UpdatedMetadata) }, }
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
RowId uint64 `json:"row_id"`
Address Address `json:"address"`
AddressType AddressType `json:"address_type"`
Pubkey Key `json:"pubkey"`
Counter int64 `json:"counter"`
BakerId uint64 `json:"baker_id,omitempty" tzpro:"-"`
Baker *Address `json:"baker,omitempty"`
CreatorId uint64 `json:"creator_id,omitempty" tzpro:"-"`
Creator *Address `json:"creator,omitempty"`
FirstIn int64 `json:"first_in"`
FirstOut int64 `json:"first_out"`
FirstSeen int64 `json:"first_seen"`
LastIn int64 `json:"last_in"`
LastOut int64 `json:"last_out"`
LastSeen int64 `json:"last_seen"`
FirstSeenTime time.Time `json:"first_seen_time"`
LastSeenTime time.Time `json:"last_seen_time"`
FirstInTime time.Time `json:"first_in_time"`
LastInTime time.Time `json:"last_in_time"`
FirstOutTime time.Time `json:"first_out_time"`
LastOutTime time.Time `json:"last_out_time"`
DelegatedSince int64 `json:"delegated_since"`
DelegatedSinceTime time.Time `json:"delegated_since_time"`
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" tzpro:"-"`
LostStake float64 `json:"lost_stake"`
IsFunded bool `json:"is_funded"`
IsActivated bool `json:"is_activated"`
IsDelegated bool `json:"is_delegated"`
IsStaked bool `json:"is_staked"`
IsRevealed bool `json:"is_revealed"`
IsBaker bool `json:"is_baker"`
IsContract bool `json:"is_contract"`
NTxSuccess int `json:"n_tx_success"`
NTxFailed int `json:"n_tx_failed"`
NTxOut int `json:"n_tx_out"`
NTxIn int `json:"n_tx_in"`
LifetimeRewards float64 `json:"lifetime_rewards,omitempty" tzpro:"-"`
PendingRewards float64 `json:"pending_rewards,omitempty" tzpro:"-"`
Metadata map[string]Metadata `json:"metadata,omitempty" tzpro:"-"`
}
type AccountAPI ¶
type AccountAPI interface {
Get(context.Context, Address, Query) (*Account, error)
ListOps(context.Context, Address, Query) (OpList, error)
ListContracts(context.Context, Address, Query) (ContractList, error)
NewQuery() *AccountQuery
}
func NewAccountAPI ¶
func NewAccountAPI(c *client.Client) AccountAPI
type AccountList ¶
type AccountList []*Account
func (AccountList) Cursor ¶
func (l AccountList) Cursor() uint64
func (AccountList) Len ¶
func (l AccountList) Len() int
type AccountQuery ¶
type AccountQuery = client.TableQuery[*Account]
type AccountsReport ¶
type AccountsReport struct {
RowId uint64 `json:"row_id"`
Time time.Time `json:"time"`
Height int64 `json:"height"`
ActiveWallets []byte `json:"active_wallets"`
ActiveContracts []byte `json:"active_contracts"`
GhostWallets []byte `json:"ghost_wallets"`
FundedWallets []byte `json:"funded_wallets"`
NewGhostWallets []byte `json:"new_ghost_wallets"`
NewFundedWallets []byte `json:"new_funded_wallets"`
}
type ActivityReport ¶
type ActivityReport struct {
RowId uint64 `json:"row_id"`
Time time.Time `json:"time"`
Height int64 `json:"height"`
NumSeenWallets int `json:"num_seen_wallets"`
NumActiveWallets int `json:"num_active_wallets"`
NumActiveContracts int `json:"num_active_contracts"`
NumNewWallets int `json:"num_new_wallets"`
NumNewContracts int `json:"num_new_contracts"`
NumNewFundedWallets int `json:"num_new_funded_wallets"`
NumNewGhostWallets int `json:"num_new_ghost_wallets"`
NumClearedWallets int `json:"num_cleared_wallets"`
SumVolume float64 `json:"sum_volume"`
NumTx int `json:"num_tx"`
NumContractCalls int `json:"num_contract_calls"`
SumVolumeTop1 float64 `json:"vol_top1"`
SumVolumeTop10 float64 `json:"vol_top10"`
SumVolumeTop100 float64 `json:"vol_top100"`
SumVolumeTop1k float64 `json:"vol_top1k"`
SumVolumeTop10k float64 `json:"vol_top10k"`
SumVolumeTop100k float64 `json:"vol_top100k"`
TrafficTop1 int `json:"num_tx_top1"`
TrafficTop10 int `json:"num_tx_top10"`
TrafficTop100 int `json:"num_tx_top100"`
TrafficTop1k int `json:"num_tx_top1k"`
TrafficTop10k int `json:"num_tx_top10k"`
TrafficTop100k int `json:"num_tx_top100k"`
}
type AddressSet ¶
type AddressSet = tezos.AddressSet
type AddressType ¶
type AddressType = tezos.AddressType
type AliasMetadata ¶
type AssetMetadata ¶
type AssetMetadata struct {
Standard string `json:"standard,omitempty"`
Tokens []TokenMetadata `json:"tokens,omitempty"`
Version string `json:"version,omitempty"`
Homepage string `json:"homepage,omitempty"`
}
type Baker ¶
type Baker struct {
Address Address `json:"address"`
ConsensusKey Key `json:"consensus_key"`
ConsensusAddress Address `json:"consensus_address"`
BakerSince time.Time `json:"baker_since_time"`
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"`
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 int64 `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 *Metadata `json:"metadata,omitempty"`
}
type BakerAPI ¶
type BakerAPI interface {
Get(context.Context, Address, Query) (*Baker, error)
List(context.Context, Query) (BakerList, error)
ListVotes(context.Context, Address, Query) (BallotList, error)
ListEndorsements(context.Context, Address, Query) (OpList, error)
ListDelegations(context.Context, Address, Query) (OpList, error)
GetRights(context.Context, Address, int64, Query) (*Rights, error)
GetIncome(context.Context, Address, int64, Query) (*Income, error)
GetSnapshot(context.Context, Address, int64, Query) (*Snapshot, error)
NewIncomeQuery() *IncomeQuery
NewRightsQuery() *RightsQuery
NewStakeSnapshotQuery() *StakeSnapshotQuery
}
func NewBakerAPI ¶
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 BakerMetadata ¶
type BakerMetadata struct {
Status string `json:"status,omitempty"`
Fee float64 `json:"fee,omitempty"`
PayoutDelay bool `json:"payout_delay,omitempty"`
MinPayout float64 `json:"min_payout,omitempty"`
MinDelegation float64 `json:"min_delegation,omitempty"`
NonDelegatable bool `json:"non_delegatable,omitempty"`
Sponsored bool `json:"sponsored,omitempty"`
}
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"`
AvgPerformance64 int64 `json:"avg_performance_64"`
AvgContribution64 int64 `json:"avg_contribution_64"`
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 BalanceReport ¶
type BalanceReport struct {
RowId uint64 `json:"row_id"`
Time time.Time `json:"time"`
Height int64 `json:"height"`
NumFundedTotal int `json:"num_funded_total"`
NumFundedWallets int `json:"num_funded_wallets"`
NumFundedContracts int `json:"num_funded_contracts"`
SumFundedWallets float64 `json:"sum_wallets"`
SumFundedContracts float64 `json:"sum_contracts"`
BalanceTop1 float64 `json:"balance_top1"`
BalanceTop10 float64 `json:"balance_top10"`
BalanceTop100 float64 `json:"balance_top100"`
BalanceTop1k float64 `json:"balance_top1k"`
BalanceTop10k float64 `json:"balance_top10k"`
BalanceTop100k float64 `json:"balance_top100k"`
NumBalanceHist1E0 int `json:"hist_num_bal_1e0"`
NumBalanceHist1E1 int `json:"hist_num_bal_1e1"`
NumBalanceHist1E2 int `json:"hist_num_bal_1e2"`
NumBalanceHist1E3 int `json:"hist_num_bal_1e3"`
NumBalanceHist1E4 int `json:"hist_num_bal_1e4"`
NumBalanceHist1E5 int `json:"hist_num_bal_1e5"`
NumBalanceHist1E6 int `json:"hist_num_bal_1e6"`
NumBalanceHist1E7 int `json:"hist_num_bal_1e7"`
NumBalanceHist1E8 int `json:"hist_num_bal_1e8"`
NumBalanceHist1E9 int `json:"hist_num_bal_1e9"`
NumBalanceHist1E10 int `json:"hist_num_bal_1e10"`
NumBalanceHist1E11 int `json:"hist_num_bal_1e11"`
NumBalanceHist1E12 int `json:"hist_num_bal_1e12"`
NumBalanceHist1E13 int `json:"hist_num_bal_1e13"`
NumBalanceHist1E14 int `json:"hist_num_bal_1e14"`
NumBalanceHist1E15 int `json:"hist_num_bal_1e15"`
NumBalanceHist1E16 int `json:"hist_num_bal_1e16"`
NumBalanceHist1E17 int `json:"hist_num_bal_1e17"`
NumBalanceHist1E18 int `json:"hist_num_bal_1e18"`
NumBalanceHist1E19 int `json:"hist_num_bal_1e19"`
SumBalanceHist1E0 float64 `json:"hist_sum_bal_1e0"`
SumBalanceHist1E1 float64 `json:"hist_sum_bal_1e1"`
SumBalanceHist1E2 float64 `json:"hist_sum_bal_1e2"`
SumBalanceHist1E3 float64 `json:"hist_sum_bal_1e3"`
SumBalanceHist1E4 float64 `json:"hist_sum_bal_1e4"`
SumBalanceHist1E5 float64 `json:"hist_sum_bal_1e5"`
SumBalanceHist1E6 float64 `json:"hist_sum_bal_1e6"`
SumBalanceHist1E7 float64 `json:"hist_sum_bal_1e7"`
SumBalanceHist1E8 float64 `json:"hist_sum_bal_1e8"`
SumBalanceHist1E9 float64 `json:"hist_sum_bal_1e9"`
SumBalanceHist1E10 float64 `json:"hist_sum_bal_1e10"`
SumBalanceHist1E11 float64 `json:"hist_sum_bal_1e11"`
SumBalanceHist1E12 float64 `json:"hist_sum_bal_1e12"`
SumBalanceHist1E13 float64 `json:"hist_sum_bal_1e13"`
SumBalanceHist1E14 float64 `json:"hist_sum_bal_1e14"`
SumBalanceHist1E15 float64 `json:"hist_sum_bal_1e15"`
SumBalanceHist1E16 float64 `json:"hist_sum_bal_1e16"`
SumBalanceHist1E17 float64 `json:"hist_sum_bal_1e17"`
SumBalanceHist1E18 float64 `json:"hist_sum_bal_1e18"`
GiniFunded float64 `json:"gini_funded"`
GiniOneTz float64 `json:"gini_onetez"`
GiniBakers float64 `json:"gini_bakers"`
}
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 string `json:"voting_period_kind"`
Proposal string `json:"proposal"`
OpHash OpHash `json:"op"`
Ballot string `json:"ballot"`
Stake float64 `json:"stake"`
Sender Address `json:"sender"`
}
type BallotList ¶
type BallotList []*Ballot
type Bigmap ¶
type Bigmap struct {
RowId uint64 `json:"row_id"`
Contract Address `json:"contract"`
BigmapId int64 `json:"bigmap_id"`
NUpdates int64 `json:"n_updates"`
NKeys int64 `json:"n_keys"`
AllocateHeight int64 `json:"alloc_height"`
AllocateBlock BlockHash `json:"alloc_block"`
AllocateTime time.Time `json:"alloc_time"`
UpdateHeight int64 `json:"update_height"`
UpdateBlock BlockHash `json:"update_block"`
UpdateTime time.Time `json:"update_time"`
DeleteHeight int64 `json:"delete_height"`
DeleteBlock BlockHash `json:"delete_block"`
DeleteTime time.Time `json:"delete_time"`
KeyType Typedef `json:"key_type" tzpro:"-"`
ValueType Typedef `json:"value_type" tzpro:"-"`
KeyTypePrim Prim `json:"key_type_prim" tzpro:"key_type,hex"`
ValueTypePrim Prim `json:"value_type_prim" tzpro:"value_type,hex"`
}
func (Bigmap) GetKeyType ¶
func (Bigmap) GetKeyTypedef ¶
func (Bigmap) GetValueType ¶
func (Bigmap) GetValueTypedef ¶
type BigmapEvent ¶
type BigmapEvent = micheline.BigmapEvent
type BigmapEvents ¶
type BigmapEvents = micheline.BigmapEvents
type BigmapMeta ¶
type BigmapQuery ¶
type BigmapQuery = client.TableQuery[*Bigmap]
type BigmapUpdate ¶
type BigmapUpdate struct {
BigmapValue
Action DiffAction `json:"action"`
KeyType *Typedef `json:"key_type,omitempty"`
ValueType *Typedef `json:"value_type,omitempty"`
KeyTypePrim *Prim `json:"key_type_prim,omitempty"`
ValueTypePrim *Prim `json:"value_type_prim,omitempty"`
BigmapId int64 `json:"bigmap_id"`
SourceId int64 `json:"source_big_map,omitempty"`
DestId int64 `json:"destination_big_map,omitempty"`
}
func (BigmapUpdate) Event ¶
func (u BigmapUpdate) Event() (ev BigmapEvent)
type BigmapUpdateList ¶
type BigmapUpdateList []*BigmapUpdate
func (BigmapUpdateList) Events ¶
func (l BigmapUpdateList) Events() (ev BigmapEvents)
type BigmapUpdateQuery ¶
type BigmapUpdateQuery = client.TableQuery[*BigmapUpdateRow]
type BigmapUpdateRow ¶
type BigmapUpdateRow struct {
RowId uint64 `json:"row_id"`
BigmapId int64 `json:"bigmap_id"`
KeyId uint64 `json:"key_id"`
Action DiffAction `json:"action"`
Height int64 `json:"height"`
Time time.Time `json:"time"`
Hash ExprHash `json:"hash,omitempty"`
Key Prim `json:"key,omitempty" tzpro:",hex"`
Value Prim `json:"value,omitempty" tzpro:",hex"`
}
BigmapUpdateRow is a custom type for table query results which contain raw bigmap data
func (BigmapUpdateRow) AsKey ¶
func (r BigmapUpdateRow) AsKey(typ Type) (BigmapKey, bool)
Update/Remove only
func (BigmapUpdateRow) AsValue ¶
func (r BigmapUpdateRow) AsValue(typ Type) (Value, bool)
Update only
func (BigmapUpdateRow) Event ¶
func (r BigmapUpdateRow) Event() (ev BigmapEvent)
func (BigmapUpdateRow) ValueType ¶
func (r BigmapUpdateRow) ValueType() (Type, bool)
Alloc/Copy only
type BigmapValue ¶
type BigmapValue struct {
RowId uint64 `json:"row_id"`
BigmapId int64 `json:"bigmap_id"`
KeyId uint64 `json:"key_id"`
Hash ExprHash `json:"hash"`
Height int64 `json:"height"`
Time time.Time `json:"time"`
Meta *BigmapMeta `json:"meta,omitempty" tzpro:"-"`
Key MultiKey `json:"key" tzpro:"-"`
Value any `json:"value,omitempty" tzpro:"-"`
KeyPrim *Prim `json:"key_prim,omitempty" tzpro:"key,hex"`
ValuePrim *Prim `json:"value_prim,omitempty" tzpro:"value,hex"`
}
func (BigmapValue) AsKey ¶
func (r BigmapValue) AsKey(typ Type) BigmapKey
func (BigmapValue) AsValue ¶
func (r BigmapValue) AsValue(typ Type) Value
func (BigmapValue) GetAddress ¶
func (v BigmapValue) GetAddress(path string) (Address, bool)
func (BigmapValue) GetValue ¶
func (v BigmapValue) GetValue(path string) (interface{}, bool)
func (BigmapValue) Has ¶
func (v BigmapValue) Has(path string) bool
func (BigmapValue) Unmarshal ¶
func (v BigmapValue) Unmarshal(val any) error
func (BigmapValue) Walk ¶
func (v BigmapValue) Walk(path string, fn util.ValueWalkerFunc) error
type BigmapValueList ¶
type BigmapValueList []*BigmapValue
func (BigmapValueList) Cursor ¶
func (l BigmapValueList) Cursor() uint64
func (BigmapValueList) Len ¶
func (l BigmapValueList) Len() int
type BigmapValueQuery ¶
type BigmapValueQuery = client.TableQuery[*BigmapValue]
type Block ¶
type Block struct {
RowId uint64 `json:"row_id"`
Hash BlockHash `json:"hash"`
ParentHash *BlockHash `json:"predecessor,omitempty"`
FollowerHash *BlockHash `json:"successor,omitempty" tzpro:"-"`
Timestamp time.Time `json:"time"`
Height int64 `json:"height"`
Cycle int64 `json:"cycle"`
IsCycleSnapshot bool `json:"is_cycle_snapshot"`
Solvetime int `json:"solvetime"`
Version int `json:"version"`
Round int `json:"round"`
Nonce string `json:"nonce"`
VotingPeriodKind string `json:"voting_period_kind"`
BakerId uint64 `json:"baker_id"`
Baker Address `json:"baker"`
ProposerId uint64 `json:"proposer_id"`
Proposer Address `json:"proposer"`
NSlotsEndorsed int `json:"n_endorsed_slots"`
NOpsApplied int `json:"n_ops_applied"`
NOpsFailed int `json:"n_ops_failed"`
NContractCalls int `json:"n_calls"`
NRollupCalls int `json:"n_rollup_calls"`
NEvents int `json:"n_events"`
NTx int `json:"n_tx"`
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"`
PctAccountReuse float64 `json:"pct_account_reuse"`
LbVote string `json:"lb_vote"`
LbEma int64 `json:"lb_ema"`
AiVote string `json:"ai_vote"`
AiEma int64 `json:"ai_ema"`
Protocol ProtocolHash `json:"protocol"`
ProposerKeyId uint64 `json:"proposer_consensus_key_id"`
BakerKeyId uint64 `json:"baker_consensus_key_id"`
ProposerKey string `json:"proposer_consensus_key"`
BakerKey string `json:"baker_consensus_key"`
Metadata map[string]Metadata `json:"metadata,omitempty" tzpro:"-"`
Rights []Right `json:"rights,omitempty" tzpro:"-"`
Ops []*Op `json:"-"`
}
type BlockAPI ¶
type BlockAPI interface {
GetHash(context.Context, BlockHash, Query) (*Block, error)
GetHead(context.Context, Query) (*Block, error)
GetHeight(context.Context, int64, Query) (*Block, error)
ListOpsHash(context.Context, BlockHash, Query) (OpList, error)
ListOpsHeight(context.Context, int64, Query) (OpList, error)
NewQuery() *BlockQuery
}
func NewBlockAPI ¶
type BlockQuery ¶
type BlockQuery = client.TableQuery[*Block]
type Chain ¶
type Chain struct {
RowId uint64 `json:"row_id"`
Height int64 `json:"height"`
Cycle int64 `json:"cycle"`
Timestamp time.Time `json:"time"`
TotalAccounts int64 `json:"total_accounts"`
TotalContracts int64 `json:"total_contracts"`
TotalRollups int64 `json:"total_rollups"`
TotalOps int64 `json:"total_ops"`
TotalOpsFailed int64 `json:"total_ops_failed"`
TotalContractOps int64 `json:"total_contract_ops"`
TotalContractCalls int64 `json:"total_contract_calls"`
TotalRollupCalls int64 `json:"total_rollup_calls"`
TotalActivations int64 `json:"total_activations"`
TotalNonces int64 `json:"total_nonce_revelations"`
TotalEndorsements int64 `json:"total_endorsements"`
TotalPreendorsements int64 `json:"total_preendorsements"`
TotalDoubleBake int64 `json:"total_double_bakings"`
TotalDoubleEndorse int64 `json:"total_double_endorsements"`
TotalDelegations int64 `json:"total_delegations"`
TotalReveals int64 `json:"total_reveals"`
TotalOriginations int64 `json:"total_originations"`
TotalTransactions int64 `json:"total_transactions"`
TotalProposals int64 `json:"total_proposals"`
TotalBallots int64 `json:"total_ballots"`
TotalConstants int64 `json:"total_constants"`
TotalSetLimits int64 `json:"total_set_limits"`
TotalStorageBytes int64 `json:"total_storage_bytes"`
TotalTicketTransfers int64 `json:"total_ticket_transfers"`
FundedAccounts int64 `json:"funded_accounts"`
DustAccounts int64 `json:"dust_accounts"`
GhostAccounts int64 `json:"ghost_accounts"`
UnclaimedAccounts int64 `json:"unclaimed_accounts"`
TotalDelegators int64 `json:"total_delegators"`
ActiveDelegators int64 `json:"active_delegators"`
InactiveDelegators int64 `json:"inactive_delegators"`
DustDelegators int64 `json:"dust_delegators"`
TotalBakers int64 `json:"total_bakers"`
RollOwners int64 `json:"eligible_bakers"`
ActiveBakers int64 `json:"active_bakers"`
InactiveBakers int64 `json:"inactive_bakers"`
ZeroBakers int64 `json:"zero_bakers"`
SelfBakers int64 `json:"self_bakers"`
SingleBakers int64 `json:"single_bakers"`
MultiBakers int64 `json:"multi_bakers"`
ActiveStakers int64 `json:"active_stakers"`
InactiveStakers int64 `json:"inactive_stakers"`
}
type ChainIdHash ¶
type ChainIdHash = tezos.ChainIdHash
type ChainQuery ¶
type ChainQuery = client.TableQuery[*Chain]
type Config ¶
type Config struct {
Name string `json:"name"`
Network string `json:"network"`
Symbol string `json:"symbol"`
ChainId string `json:"chain_id"`
Deployment int `json:"deployment"`
Version int `json:"version"`
Protocol string `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"`
MinimalBlockDelay int `json:"minimal_block_delay"`
}
type Constant ¶
type Constant struct {
RowId uint64 `json:"row_id"`
Address ExprHash `json:"address"`
CreatorId uint64 `json:"creator_id"`
Creator Address `json:"creator"`
Height int64 `json:"height"`
Time time.Time `json:"time"`
StorageSize int64 `json:"storage_size"`
Value Prim `json:"value" tzpro:",hex"`
Features util.StringList `json:"features"`
}
type ConstantQuery ¶
type ConstantQuery = client.TableQuery[*Constant]
type Contract ¶
type Contract struct {
RowId uint64 `json:"row_id,omitempty"`
AccountId uint64 `json:"account_id,omitempty"`
Address Address `json:"address"`
CreatorId uint64 `json:"creator_id,omitempty"`
Creator Address `json:"creator"`
BakerId uint64 `json:"baker_id,omitempty" tzpro:"-"`
Baker Address `json:"baker" tzpro:"-"`
FirstSeen int64 `json:"first_seen"`
LastSeen int64 `json:"last_seen"`
FirstSeenTime time.Time `json:"first_seen_time"`
LastSeenTime time.Time `json:"last_seen_time"`
StorageSize int64 `json:"storage_size"`
StoragePaid int64 `json:"storage_paid"`
TotalFeesUsed float64 `json:"total_fees_used" tzpro:"-"`
Script *Script `json:"script,omitempty" tzpro:",hex"`
Storage *Prim `json:"storage,omitempty" tzpro:",hex"`
InterfaceHash util.HexBytes `json:"iface_hash"`
CodeHash util.HexBytes `json:"code_hash"`
StorageHash util.HexBytes `json:"storage_hash"`
Features util.StringList `json:"features"`
Interfaces util.StringList `json:"interfaces"`
CallStats map[string]int `json:"call_stats" tzpro:"-"`
NCallsIn int `json:"n_calls_in" tzpro:"-"`
NCallsOut int `json:"n_calls_out" tzpro:"-"`
NCallsFailed int `json:"n_calls_failed" tzpro:"-"`
Bigmaps map[string]int64 `json:"bigmaps,omitempty" tzpro:"-"`
Metadata map[string]*Metadata `json:"metadata,omitempty" tzpro:"-"`
}
type ContractAPI ¶
type ContractAPI interface {
Get(context.Context, Address, Query) (*Contract, error)
GetScript(context.Context, Address, Query) (*ContractScript, error)
GetStorage(context.Context, Address, Query) (*ContractValue, error)
ListCalls(context.Context, Address, Query) (OpList, error)
GetConstant(context.Context, ExprHash, Query) (*Constant, error)
GetBigmap(context.Context, int64, Query) (*Bigmap, error)
GetBigmapValue(context.Context, int64, string, Query) (*BigmapValue, error)
// ListBigmapKeys(context.Context, int64, Query) (BigmapKeyList, error)
ListBigmapValues(context.Context, int64, Query) (BigmapValueList, error)
ListBigmapKeyUpdates(context.Context, int64, string, Query) (BigmapUpdateList, error)
ListBigmapUpdates(context.Context, int64, Query) (BigmapUpdateList, error)
NewQuery() *ContractQuery
NewEventQuery() *EventQuery
NewConstantQuery() *ConstantQuery
NewBigmapQuery() *BigmapQuery
NewBigmapValueQuery() *BigmapValueQuery
NewBigmapUpdateQuery() *BigmapUpdateQuery
}
func NewContractAPI ¶
func NewContractAPI(c *client.Client) ContractAPI
type ContractList ¶
type ContractList []*Contract
func (ContractList) Cursor ¶
func (l ContractList) Cursor() uint64
func (ContractList) Len ¶
func (l ContractList) Len() int
type ContractParameters ¶
type ContractParameters struct {
ContractValue // contract
Entrypoint string `json:"entrypoint,omitempty"` // contract
L2Address *Address `json:"l2_address,omitempty"` // rollup
Kind string `json:"kind,omitempty"` // rollup
Method string `json:"method,omitempty"` // rollup
Args json.RawMessage `json:"args,omitempty"` // rollup
Result json.RawMessage `json:"result,omitempty"` // rollup
}
type ContractQuery ¶
type ContractQuery = client.TableQuery[*Contract]
type ContractScript ¶
type ContractScript struct {
Script *Script `json:"script,omitempty"`
StorageType Typedef `json:"storage_type"`
Entrypoints Entrypoints `json:"entrypoints"`
Views Views `json:"views,omitempty"`
BigmapNames map[string]int64 `json:"bigmaps,omitempty"`
BigmapTypes map[string]Type `json:"bigmap_types,omitempty"`
BigmapTypesById map[int64]Type `json:"-"`
}
func (ContractScript) Types ¶
func (s ContractScript) Types() (param, store Type, eps Entrypoints, bigmaps map[int64]Type)
type ContractValue ¶
func (ContractValue) AsPrim ¶
func (v ContractValue) AsPrim() (Prim, bool)
func (ContractValue) GetAddress ¶
func (v ContractValue) GetAddress(path string) (Address, bool)
func (ContractValue) GetValue ¶
func (v ContractValue) GetValue(path string) (interface{}, bool)
func (ContractValue) Has ¶
func (v ContractValue) Has(path string) bool
func (ContractValue) IsPrim ¶
func (v ContractValue) IsPrim() bool
func (ContractValue) Unmarshal ¶
func (v ContractValue) Unmarshal(val interface{}) error
func (ContractValue) Walk ¶
func (v ContractValue) Walk(path string, fn util.ValueWalkerFunc) error
type Costs ¶
type Costs struct {
Fee float64 // the total fee paid
Burn float64 // total amount burned (not included in fee)
GasUsed int64 // gas used
StorageUsed int64 // new storage bytes allocated
StorageBurn float64 // burned for allocating new storage (not included in fee)
AllocationBurn float64 // burned for allocating a new account (not included in fee)
}
type Deployment ¶
type DiffAction ¶
type DiffAction = micheline.DiffAction
type DomainMetadata ¶
type DomainMetadata struct {
Name string `json:"name"`
}
type Election ¶
type Election struct {
Id int `json:"election_id"`
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 string `json:"voting_period"`
ProposalPeriod *Vote `json:"proposal"`
ExplorationPeriod *Vote `json:"exploration"`
CooldownPeriod *Vote `json:"cooldown"`
PromotionPeriod *Vote `json:"promotion"`
AdoptionPeriod *Vote `json:"adoption"`
}
type Entrypoints ¶
type Entrypoints = micheline.Entrypoints
type Event ¶
type Event struct {
// table API only
RowId uint64 `json:"row_id"`
AccountId uint64 `json:"account_id"`
Height int64 `json:"height"`
OpId uint64 `json:"op_id"`
// table and explorer API
Contract Address `json:"contract"`
Type Prim `json:"type" tzpro:",hex"`
Payload Prim `json:"payload" tzpro:",hex"`
Tag string `json:"tag"`
TypeHash string `json:"type_hash"`
}
type EventQuery ¶
type EventQuery = client.TableQuery[*Event]
type ExplorerAPI ¶
type ExplorerAPI interface {
GetStatus(context.Context) (*Status, error)
GetTip(context.Context) (*Tip, error)
GetConfigHead(context.Context) (*Config, error)
GetConfigHeight(context.Context, int64) (*Config, error)
ListProtocols(context.Context) ([]Deployment, error)
GetElection(context.Context, int) (*Election, error)
ListVoters(context.Context, int, int) ([]Voter, error)
ListBallots(context.Context, int, int) (BallotList, error)
NewChainQuery() *ChainQuery
}
func NewExplorerAPI ¶
func NewExplorerAPI(c *client.Client) ExplorerAPI
type Head ¶
type Head struct {
Hash BlockHash `json:"hash"`
ParentHash BlockHash `json:"predecessor"`
Height int64 `json:"height"`
Cycle int64 `json:"cycle"`
Timestamp time.Time `json:"time"`
Baker Address `json:"baker"`
Proposer Address `json:"proposer"`
Round int `json:"round"`
Nonce string `json:"nonce"`
NOpsApplied int `json:"n_ops_applied"`
NOpsFailed int `json:"n_ops_failed"`
Volume float64 `json:"volume"`
Fee float64 `json:"fee"`
Reward float64 `json:"reward"`
GasUsed int64 `json:"gas_used"`
}
type Income ¶
type Income struct {
RowId uint64 `json:"row_id"` // table only
Address Address `json:"address"` // table only
AccountId uint64 `json:"account_id"` // table only
Cycle int64 `json:"cycle"`
Balance float64 `json:"own_balance" tzpro:"balance"`
Delegated float64 `json:"delegated_balance" tzpro:"delegated"`
Staking 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"`
LuckPct int64 `json:"luck_percent"`
ContributionPct int64 `json:"contribution_percent"`
PerformancePct int64 `json:"performance_percent"`
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"`
StartTime time.Time `json:"start_time"` // table only
EndTime time.Time `json:"end_time"` // table only
}
type IncomeQuery ¶
type IncomeQuery = client.TableQuery[*Income]
type LocationMetadata ¶
type MediaMetadata ¶
type Metadata ¶
type Metadata struct {
// address + id together are used as unique identifier
Address Address `json:"address"`
TokenId *tezos.Z `json:"token_id,omitempty"`
Contents map[string]any `json:"-"`
}
func NewMetadata ¶
func (*Metadata) Alias ¶
func (m *Metadata) Alias() *AliasMetadata
func (*Metadata) Asset ¶
func (m *Metadata) Asset() *AssetMetadata
func (*Metadata) Baker ¶
func (m *Metadata) Baker() *BakerMetadata
func (*Metadata) Domain ¶
func (m *Metadata) Domain() *DomainMetadata
func (*Metadata) Location ¶
func (m *Metadata) Location() *LocationMetadata
func (Metadata) MarshalJSON ¶
func (*Metadata) Media ¶
func (m *Metadata) Media() *MediaMetadata
func (*Metadata) Payout ¶
func (m *Metadata) Payout() *PayoutMetadata
func (*Metadata) Profile ¶ added in v0.18.0
func (m *Metadata) Profile() *ProfileMetadata
func (*Metadata) Rights ¶
func (m *Metadata) Rights() *RightsMetadata
func (*Metadata) Social ¶
func (m *Metadata) Social() *SocialMetadata
func (*Metadata) Tz21 ¶
func (m *Metadata) Tz21() *Tz21Metadata
func (*Metadata) UnmarshalJSON ¶
func (*Metadata) Updated ¶
func (m *Metadata) Updated() *UpdatedMetadata
type MetadataAPI ¶
type MetadataAPI interface {
List(context.Context) ([]Metadata, error)
GetWallet(context.Context, Address) (Metadata, error)
GetAsset(context.Context, Token) (Metadata, error)
Create(context.Context, []Metadata) ([]Metadata, error)
Update(context.Context, Metadata) (Metadata, error)
Purge(context.Context) error
RemoveWallet(context.Context, Address) error
RemoveAsset(context.Context, Token) error
DescribeAny(context.Context, string, string) (MetadataDescriptor, error)
DescribeAddress(context.Context, Address) (MetadataDescriptor, error)
GetSchema(context.Context, string) (json.RawMessage, error)
GetSchemas(context.Context) (map[string]json.RawMessage, error)
}
func NewMetadataAPI ¶
func NewMetadataAPI(c *client.Client) MetadataAPI
type MetadataDescriptor ¶
type MultiKey ¶
type MultiKey struct {
// contains filtered or unexported fields
}
func DecodeMultiKey ¶
func (MultiKey) MarshalJSON ¶
func (*MultiKey) UnmarshalJSON ¶
type Op ¶
type Op struct {
Id uint64 `json:"id"`
Type OpType `json:"type"`
Hash OpHash `json:"hash"`
Height int64 `json:"height"`
Cycle int64 `json:"cycle"`
Timestamp time.Time `json:"time"`
OpN int `json:"op_n"`
OpP int `json:"op_p"`
Status OpStatus `json:"status"`
IsSuccess bool `json:"is_success"`
IsContract bool `json:"is_contract"`
IsInternal bool `json:"is_internal"`
IsEvent bool `json:"is_event"`
IsRollup bool `json:"is_rollup"`
Counter int64 `json:"counter"`
GasLimit int64 `json:"gas_limit"`
GasUsed int64 `json:"gas_used"`
StorageLimit int64 `json:"storage_limit"`
StoragePaid int64 `json:"storage_paid"`
Volume float64 `json:"volume"`
Fee float64 `json:"fee"`
Reward float64 `json:"reward"`
Deposit float64 `json:"deposit"`
Burned float64 `json:"burned"`
SenderId uint64 `json:"sender_id"`
ReceiverId uint64 `json:"receiver_id"`
CreatorId uint64 `json:"creator_id"`
BakerId uint64 `json:"baker_id"`
Data json.RawMessage `json:"data,omitempty"`
Parameters json.RawMessage `json:"parameters,omitempty"`
BigmapDiff json.RawMessage `json:"big_map_diff,omitempty"` // transaction, origination
StorageHash util.HexBytes `json:"storage_hash,omitempty"`
CodeHash util.HexBytes `json:"code_hash,omitempty"`
Errors json.RawMessage `json:"errors,omitempty"`
Sender Address `json:"sender"`
Receiver Address `json:"receiver"`
Creator Address `json:"creator"` // origination
Baker Address `json:"baker"` // delegation, origination
Block BlockHash `json:"block"`
Entrypoint string `json:"entrypoint,omitempty"`
// explorer or ZMQ APIs only
PrevBaker Address `json:"previous_baker" tzpro:"-"` // delegation
Source Address `json:"source" tzpro:"-"` // internal operations
Offender Address `json:"offender" tzpro:"-"` // double_x
Accuser Address `json:"accuser" tzpro:"-"` // double_x
Loser Address `json:"loser" tzpro:"-"` // smart rollup refutation game
Winner Address `json:"winner" tzpro:"-"` // smart rollup refutation game
Staker Address `json:"staker" tzpro:"-"` // smart rollup refutation game
Solution tezos.HexBytes `json:"solution,omitempty" tzpro:"-"` // smart rollup refutation game
Proof tezos.HexBytes `json:"proof,omitempty" tzpro:"-"` // smart rollup refutation game
Storage json.RawMessage `json:"storage,omitempty" tzpro:"-"` // transaction, origination
Script *Script `json:"script,omitempty" tzpro:"-"` // origination
Power int `json:"power,omitempty" tzpro:"-"` // endorsement
Limit *float64 `json:"limit,omitempty" tzpro:"-"` // set deposits limit
Confirmations int64 `json:"confirmations" tzpro:"-"`
NOps int `json:"n_ops,omitempty" tzpro:"-"`
Batch []*Op `json:"batch,omitempty" tzpro:"-"`
Internal []*Op `json:"internal,omitempty" tzpro:"-"`
Metadata map[string]Metadata `json:"metadata,omitempty" tzpro:"-"`
Events []Event `json:"events,omitempty" tzpro:"-"`
TicketUpdates []TicketUpdate `json:"ticket_updates,omitempty" tzpro:"-"`
// contains filtered or unexported fields
}
func (*Op) Addresses ¶
func (o *Op) Addresses() *AddressSet
func (Op) DecodeBigmapEvents ¶
func (o Op) DecodeBigmapEvents(noFail bool) (BigmapEvents, error)
func (Op) DecodeBigmapUpdates ¶
func (o Op) DecodeBigmapUpdates(withPrim, noFail bool, onError int) (BigmapUpdateList, error)
func (Op) DecodeParams ¶
func (o Op) DecodeParams(noFail bool, onError int) (*ContractParameters, error)
func (Op) DecodeStorage ¶
func (o Op) DecodeStorage(noFail bool, onError int) (*ContractValue, error)
func (Op) HasBigmapUpdates ¶
func (Op) HasParameters ¶
func (Op) HasStorage ¶
func (*Op) WithScript ¶
func (o *Op) WithScript(s *ContractScript) *Op
type OpAPI ¶
type OpQuery ¶
type OpQuery = client.TableQuery[*Op]
type OpReport ¶
type OpReport struct {
RowId uint64 `json:"row_id"`
Time time.Time `json:"time"`
Height int64 `json:"height"`
Kind string `json:"kind"`
Type OpType `json:"type"`
N int `json:"count"`
Sum float64 `json:"sum"`
Min float64 `json:"min"`
Max float64 `json:"max"`
Mean float64 `json:"mean"`
Median float64 `json:"median"`
}
fee, gas, vol, tdd, add
type OpType ¶
type OpType byte
Indexer operation and event type
const ( OpTypeBake OpType = iota // 0 OpTypeEndorsement // 1 OpTypeTransaction // 2 OpTypeReveal // 3 OpTypeDelegation // 4 OpTypeOrigination // 5 OpTypeNonceRevelation // 6 OpTypeActivation // 7 OpTypeBallot // 8 OpTypeProposal // 9 OpTypeDoubleBaking // 10 OpTypeDoubleEndorsement // 11 OpTypeUnfreeze // 12 implicit event OpTypeInvoice // 13 implicit event OpTypeAirdrop // 14 implicit event OpTypeSeedSlash // 15 implicit event OpTypeMigration // 16 implicit event OpTypeSubsidy // 17 v010 liquidity baking OpTypeRegisterConstant // 18 v011 OpTypePreendorsement // 19 v012 OpTypeDoublePreendorsement // 20 v012 OpTypeDepositsLimit // 21 v012 OpTypeDeposit // 22 v012 implicit event (baker deposit) OpTypeBonus // 23 v012 implicit event (baker extra bonus) OpTypeReward // 24 v012 implicit event (endorsement reward pay/burn) OpTypeRollupOrigination // 25 v013 rollup OpTypeRollupTransaction // 26 v013 rollup OpTypeVdfRevelation // 27 v014 OpTypeIncreasePaidStorage // 28 v014 OpTypeDrainDelegate // 29 v015 OpTypeUpdateConsensusKey // 30 v015 OpTypeTransferTicket // 31 v013 OpTypeStake // 32 v018 OpTypeUnstake // 33 v018 OpTypeFinalizeUnstake // 34 v018 OpTypeSetDelegateParameters // 35 v018 OpTypeStakeSlash // 36 v018 implicit event (staker slash) OpTypeBatch = 254 // API output only OpTypeInvalid = 255 )
enums are allocated in chronological order with most often used ops first
func ParseOpType ¶
func (*OpType) MarshalText ¶
func (*OpType) UnmarshalText ¶
type Parameters ¶
type Parameters = micheline.Parameters
type PayoutMetadata ¶
type PayoutMetadata []Address
type ProfileMetadata ¶ added in v0.18.0
type ProfileMetadata struct {
Alias string `json:"alias,omitempty"`
Description string `json:"description,omitempty"`
Logo string `json:"logo,omitempty"`
Website string `json:"website,omitempty"`
Twitter string `json:"twitter,omitempty"`
Ethereum string `json:"ethereum,omitempty"`
DomainName string `json:"domain_name,omitempty"`
Discord string `json:"discord,omitempty"`
Github string `json:"github,omitempty"`
Serial uint64 `json:"serial,omitempty"`
}
type ProtocolHash ¶
type ProtocolHash = tezos.ProtocolHash
type Right ¶
type Right struct {
Type RightType `json:"type"`
Address Address `json:"address"`
Round int `json:"round"`
IsUsed bool `json:"is_used"`
IsLost bool `json:"is_lost"`
IsStolen bool `json:"is_stolen"`
IsMissed bool `json:"is_missed"`
IsSeedRequired bool `json:"is_seed_required"`
IsSeedRevealed bool `json:"is_seed_revealed"`
}
type Rights ¶
type Rights struct {
RowId uint64 `json:"row_id"`
Cycle int64 `json:"cycle"`
Height int64 `json:"height"`
AccountId uint64 `json:"account_id"`
Address Address `json:"address"`
Bake util.HexBytes `json:"baking_rights"`
Endorse util.HexBytes `json:"endorsing_rights"`
Baked util.HexBytes `json:"blocks_baked"`
Endorsed util.HexBytes `json:"blocks_endorsed"`
Seed util.HexBytes `json:"seeds_required"`
Seeded util.HexBytes `json:"seeds_revealed"`
}
func (Rights) IsSeedRequired ¶
func (Rights) IsSeedRevealed ¶
type RightsList ¶
type RightsList []*Rights
func (RightsList) Cursor ¶
func (l RightsList) Cursor() uint64
func (RightsList) Len ¶
func (l RightsList) Len() int
type RightsMetadata ¶
type RightsMetadata struct {
Date time.Time `json:"date,omitempty"`
Rights string `json:"rights,omitempty"`
License string `json:"license,omitempty"`
Minter Address `json:"minter,omitempty"`
Authors []string `json:"authors,omitempty"`
Creators []string `json:"creators,omitempty"`
Contributors []string `json:"contributors,omitempty"`
Publishers []string `json:"publishers,omitempty"`
}
type RightsQuery ¶
type RightsQuery = client.TableQuery[*Rights]
type SmartRollupAddMessages ¶ added in v0.17.3
type SmartRollupCement
deprecated
added in
v0.17.3
type SmartRollupCement struct {
Commitment *tezos.SmartRollupCommitHash `json:"commitment,omitempty"`
}
Deprecated: in v17
type SmartRollupExecuteOutboxMessage ¶ added in v0.17.3
type SmartRollupExecuteOutboxMessage struct {
CementedCommitment tezos.SmartRollupCommitHash `json:"cemented_commitment"`
OutputProof tezos.HexBytes `json:"output_proof"`
}
type SmartRollupOriginate ¶ added in v0.17.3
type SmartRollupPublish ¶ added in v0.17.3
type SmartRollupPublish struct {
Commitment struct {
CompressedState tezos.SmartRollupStateHash `json:"compressed_state"`
InboxLevel int64 `json:"inbox_level"`
Predecessor tezos.SmartRollupCommitHash `json:"predecessor"`
NumberOfTicks tezos.Z `json:"number_of_ticks"`
} `json:"commitment"`
}
type SmartRollupRecoverBond ¶ added in v0.17.3
type SmartRollupRefute ¶ added in v0.17.3
type SmartRollupRefute struct {
Opponent tezos.Address `json:"opponent"`
Refutation struct {
Kind string `json:"refutation_kind"`
PlayerHash *tezos.SmartRollupCommitHash `json:"player_commitment_hash,omitempty"`
OpponentHash *tezos.SmartRollupCommitHash `json:"opponent_commitment_hash,omitempty"`
Choice *tezos.Z `json:"choice,omitempty"`
Step *struct {
Ticks []struct {
State tezos.SmartRollupStateHash `json:"state"`
Tick tezos.Z `json:"tick"`
} `json:"ticks,omitempty"`
Proof *struct {
PvmStep tezos.HexBytes `json:"pvm_step,omitempty"`
InputProof *struct {
Kind string `json:"input_proof_kind"`
Level int64 `json:"level"`
Counter tezos.Z `json:"message_counter"`
Proof tezos.HexBytes `json:"serialized_proof"`
} `json:"input_proof,omitempty"`
} `json:"proof,omitempty"`
} `json:"step,omitempty"`
} `json:"refutation"`
}
type SmartRollupResult ¶ added in v0.17.3
type SmartRollupResult struct {
Address *tezos.Address `json:"address,omitempty"`
Size *tezos.Z `json:"size,omitempty"`
InboxLevel int64 `json:"inbox_level,omitempty"`
StakedHash *tezos.SmartRollupCommitHash `json:"staked_hash,omitempty"`
PublishedAtLevel int64 `json:"published_at_level,omitempty"`
GameStatus *struct {
Status string `json:"status,omitempty"`
Kind string `json:"kind,omitempty"`
Reason string `json:"reason,omitempty"`
Player *tezos.Address `json:"player,omitempty"`
} `json:"game_status,omitempty"`
Commitment *tezos.SmartRollupCommitHash `json:"commitment_hash,omitempty"`
}
type SmartRollupTimeout ¶ added in v0.17.3
type Snapshot ¶
type Snapshot 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"`
TotalDeposits int64 `json:"total_deposits"`
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 []Staker `json:"delegators"`
Stakers []Staker `json:"stakers"`
}
type SocialMetadata ¶
type StakeSnapshot ¶
type StakeSnapshot struct {
RowId uint64 `json:"row_id"`
Height int64 `json:"height"`
Cycle int64 `json:"cycle"`
Timestamp time.Time `json:"time"`
Index int64 `json:"index"`
AccountId uint64 `json:"account_id"`
Address Address `json:"address"`
BakerId uint64 `json:"baker_id"`
Baker Address `json:"baker"`
IsBaker bool `json:"is_baker"`
IsActive bool `json:"is_active"`
Balance float64 `json:"balance"`
Delegated float64 `json:"delegated"`
OwnStake float64 `json:"own_stake"`
StakingBalance float64 `json:"staking_balance"`
NDelegations int64 `json:"n_delegations"`
NStakers int64 `json:"n_stakers"`
Since int64 `json:"since"`
SinceTime time.Time `json:"since_time"`
}
type StakeSnapshotList ¶
type StakeSnapshotList []*Snapshot
type StakeSnapshotQuery ¶
type StakeSnapshotQuery = client.TableQuery[*StakeSnapshot]
type StatsAPI ¶
type StatsAPI interface {
GetAgeReport(context.Context, Query) ([]*AgeReport, error)
GetSupplyReport(context.Context, Query) ([]*SupplyReport, error)
GetAccountsReport(context.Context, Query) ([]*AccountsReport, error)
GetActivityReport(context.Context, Query) ([]*ActivityReport, error)
GetBalanceReport(context.Context, Query) ([]*BalanceReport, error)
GetOpReport(context.Context, Query) ([]*OpReport, error)
}
func NewStatsAPI ¶
type Status ¶
type Status struct {
Status string `json:"status"` // loading, connecting, stopping, stopped, waiting, syncing, synced, failed
Blocks int64 `json:"blocks"`
Finalized int64 `json:"finalized"`
Indexed int64 `json:"indexed"`
Progress float64 `json:"progress"`
}
func (*Status) UnmarshalJSON ¶
type Supply ¶
type Supply struct {
RowId uint64 `json:"row_id"`
Height int64 `json:"height"`
Cycle int64 `json:"cycle"`
Timestamp time.Time `json:"time"`
Total float64 `json:"total"`
Activated float64 `json:"activated"`
Unclaimed float64 `json:"unclaimed"`
Circulating float64 `json:"circulating"`
Liquid float64 `json:"liquid"`
Delegated float64 `json:"delegated"`
Staking float64 `json:"staking"`
Shielded float64 `json:"shielded"`
ActiveStake float64 `json:"active_stake"`
ActiveDelegated float64 `json:"active_delegated"`
ActiveStaking float64 `json:"active_staking"`
InactiveDelegated float64 `json:"inactive_delegated"`
InactiveStaking float64 `json:"inactive_staking"`
Minted float64 `json:"minted"`
MintedBaking float64 `json:"minted_baking"`
MintedEndorsing float64 `json:"minted_endorsing"`
MintedSeeding float64 `json:"minted_seeding"`
MintedAirdrop float64 `json:"minted_airdrop"`
MintedSubsidy float64 `json:"minted_subsidy"`
Burned float64 `json:"burned"`
BurnedDoubleBaking float64 `json:"burned_double_baking"`
BurnedDoubleEndorse float64 `json:"burned_double_endorse"`
BurnedOrigination float64 `json:"burned_origination"`
BurnedAllocation float64 `json:"burned_allocation"`
BurnedStorage float64 `json:"burned_storage"`
BurnedExplicit float64 `json:"burned_explicit"`
BurnedSeedMiss float64 `json:"burned_seed_miss"`
BurnedAbsence float64 `json:"burned_absence"`
BurnedRollup float64 `json:"burned_rollup"`
Frozen float64 `json:"frozen"`
FrozenDeposits float64 `json:"frozen_deposits"`
FrozenRewards float64 `json:"frozen_rewards"`
FrozenFees float64 `json:"frozen_fees"`
FrozenBonds float64 `json:"frozen_bonds"`
}
type SupplyReport ¶
type SupplyReport struct {
Supply
Inflation1Y int64 `json:"inflation_1y"` // inflation
InflationRate1Y float64 `json:"inflation_rate_1y"`
FutureInflationRate1Y float64 `json:"future_inflation_rate_1y"`
OneYearTransacting int64 `json:"vol_tx_y1"` // 12-month HODL wave supply
OneYearDaysDestroyed float64 `json:"tdd_y1"`
SixMonthTransacting int64 `json:"vol_tx_m6"` // 6-month HODL wave supply
SixMonthDaysDestroyed float64 `json:"tdd_m6"`
ThreeMonthTransacting int64 `json:"vol_tx_m3"` // 3-month HODL wave supply
ThreeMonthDaysDestroyed float64 `json:"tdd_m3"`
OneMonthTransacting int64 `json:"vol_tx_m1"` // 1-month HODL wave supply
OneMonthDaysDestroyed float64 `json:"tdd_m1"`
OneWeekTransacting int64 `json:"vol_tx_w1"` // 1-week HODL wave supply
OneWeekDaysDestroyed float64 `json:"tdd_w1"`
OneDayTransacting int64 `json:"vol_tx_d1"` // 1-day HODL wave supply
OneDayDaysDestroyed float64 `json:"tdd_d1"`
}
type TicketUpdate ¶
type Tip ¶
type Tip struct {
Name string `json:"name"`
Network string `json:"network"`
Symbol string `json:"symbol"`
ChainId ChainIdHash `json:"chain_id"`
GenesisTime time.Time `json:"genesis_time"`
Hash BlockHash `json:"block_hash"`
Height int64 `json:"height"`
Cycle int64 `json:"cycle"`
Timestamp time.Time `json:"timestamp"`
Protocol 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"`
TotalOps int64 `json:"total_ops"`
Delegators int64 `json:"delegators"`
Bakers int64 `json:"bakers"`
Rolls int64 `json:"rolls"`
RollOwners int64 `json:"roll_owners"`
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,omitempty"`
Status Status `json:"status"`
}
type TokenMetadata ¶ added in v0.18.0
type Tz21Attribute ¶
type Tz21DataRate ¶
type Tz21Dimension ¶
type Tz21Format ¶
type Tz21Format struct {
Uri string `json:"uri"`
Hash string `json:"hash"`
MimeType string `json:"mimeType"`
FileSize int64 `json:"fileSize"`
FileName string `json:"fileName"`
Duration string `json:"duration"`
Dimensions Tz21Dimension `json:"dimensions"`
DataRate Tz21DataRate `json:"dataRate"`
}
type Tz21Metadata ¶
type Tz21Metadata struct {
Description string `json:"description"`
Minter Address `json:"minter"`
Creators []string `json:"creators"`
Contributors []string `json:"contributors"`
Publishers []string `json:"publishers"`
Date time.Time `json:"date"`
BlockLevel int64 `json:"blockLevel"`
Type string `json:"type"`
Tags []string `json:"tags"`
Genres []string `json:"genres"`
Language string `json:"language"`
Identifier string `json:"identifier"`
Rights string `json:"rights"`
RightUri string `json:"rightUri"`
ArtifactUri string `json:"artifactUri"`
DisplayUri string `json:"displayUri"`
ThumbnailUri string `json:"thumbnailUri"`
ExternalUri string `json:"externalUri"`
IsTransferable bool `json:"isTransferable"`
IsBooleanAmount bool `json:"isBooleanAmount"`
ShouldPreferSymbol bool `json:"shouldPreferSymbol"`
Formats []Tz21Format `json:"formats"`
Attributes []Tz21Attribute `json:"attributes"`
Assets []Tz21Metadata `json:"assets"`
}
type UpdatedMetadata ¶
type Vote ¶
type Vote struct {
VotingPeriod int64 `json:"voting_period"`
VotingPeriodKind string `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"`
EligibleVoters int `json:"eligible_voters"`
QuorumPct int `json:"quorum_pct"`
TurnoutVoters int `json:"turnout_voters"`
TurnoutPct int `json:"turnout_pct"`
TurnoutEma int `json:"turnout_ema"`
YayStake float64 `json:"yay_stake"`
YayVoters int `json:"yay_voters"`
NayStake float64 `json:"nay_stake"`
NayVoters int `json:"nay_voters"`
PassStake float64 `json:"pass_stake"`
PassVoters int `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"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.