index

package
v0.18.2 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NewQuery           = client.NewQuery
	NewAddressSet      = mavryk.NewAddressSet
	NewValue           = micheline.NewValue
	NewType            = micheline.NewType
	NewKey             = micheline.NewKey
	DiffActionAlloc    = micheline.DiffActionAlloc
	DiffActionCopy     = micheline.DiffActionCopy
	DiffActionUpdate   = micheline.DiffActionUpdate
	DiffActionRemove   = micheline.DiffActionRemove
	RightTypeBaking    = mavryk.RightTypeBaking
	RightTypeEndorsing = mavryk.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) },
	"mvprofile": 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"    mvpro:"-"`
	Baker              *Address            `json:"baker,omitempty"`
	CreatorId          uint64              `json:"creator_id,omitempty"  mvpro:"-"`
	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"         mvpro:"-"`
	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" mvpro:"-"`
	PendingRewards     float64             `json:"pending_rewards,omitempty"  mvpro:"-"`
	Metadata           map[string]Metadata `json:"metadata,omitempty"         mvpro:"-"`
}

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)
	ListTicketBalances(context.Context, Address, Query) (TicketBalanceList, error)
	ListTicketEvents(context.Context, Address, Query) (TicketEventList, error)
	NewQuery() *AccountQuery
	NewFlowQuery() *FlowQuery
}

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 Address

type Address = mavryk.Address

type AddressSet

type AddressSet = mavryk.AddressSet

type AddressType

type AddressType = mavryk.AddressType

type AgeReport

type AgeReport struct {
	RowId      uint64    `json:"row_id"`
	Time       time.Time `json:"time"`
	Height     int64     `json:"height"`
	Year       int       `json:"year"`
	NumDormant int64     `json:"num_dormant"`
	SumDormant float64   `json:"sum_dormant"`
}

type AliasMetadata

type AliasMetadata struct {
	Name        string   `json:"name"`
	Kind        string   `json:"kind"`
	Description string   `json:"description,omitempty"`
	Category    string   `json:"category,omitempty"`
	Tags        []string `json:"tags,omitempty"`
}

type AssetMetadata

type AssetMetadata struct {
	Standard string                   `json:"standard,omitempty"`
	Tokens   map[string]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"`
	NetworkShare       float64          `json:"network_share"`
	ActiveDelegations  int64            `json:"active_delegations"`
	ActiveStakers      int64            `json:"active_stakers"`
	IsOverDelegated    bool             `json:"is_over_delegated"`
	IsOverStaked       bool             `json:"is_over_staked"`
	IsActive           bool             `json:"is_active"`
	Events             *BakerEvents     `json:"events,omitempty"`
	Stats              *BakerStatistics `json:"stats,omitempty"`
	Metadata           *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

func NewBakerAPI(c *client.Client) BakerAPI

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 []*Baker

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"         mvpro:"-"`
	ValueType      Typedef   `json:"value_type"       mvpro:"-"`
	KeyTypePrim    Prim      `json:"key_type_prim"    mvpro:"key_type,hex"`
	ValueTypePrim  Prim      `json:"value_type_prim"  mvpro:"value_type,hex"`
}

func (Bigmap) GetKeyType

func (b Bigmap) GetKeyType() Type

func (Bigmap) GetKeyTypedef

func (r Bigmap) GetKeyTypedef() Typedef

func (Bigmap) GetValueType

func (b Bigmap) GetValueType() Type

func (Bigmap) GetValueTypedef

func (r Bigmap) GetValueTypedef() Typedef

type BigmapEvent

type BigmapEvent = micheline.BigmapEvent

type BigmapEvents

type BigmapEvents = micheline.BigmapEvents

type BigmapKey

type BigmapKey = micheline.Key

type BigmapMeta

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

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"     mvpro:",hex"`
	Value    Prim       `json:"value,omitempty"   mvpro:",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) KeyType

func (r BigmapUpdateRow) KeyType() (Type, bool)

Alloc/Copy only

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"        mvpro:"-"`
	Key       MultiKey    `json:"key"                   mvpro:"-"`
	Value     any         `json:"value,omitempty"       mvpro:"-"`
	KeyPrim   *Prim       `json:"key_prim,omitempty"    mvpro:"key,hex"`
	ValuePrim *Prim       `json:"value_prim,omitempty"  mvpro:"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) GetBig

func (v BigmapValue) GetBig(path string) (*big.Int, bool)

func (BigmapValue) GetInt64

func (v BigmapValue) GetInt64(path string) (int64, bool)

func (BigmapValue) GetString

func (v BigmapValue) GetString(path string) (string, bool)

func (BigmapValue) GetTime

func (v BigmapValue) GetTime(path string) (time.Time, bool)

func (BigmapValue) GetValue

func (v BigmapValue) GetValue(path string) (interface{}, bool)

func (BigmapValue) GetZ

func (v BigmapValue) GetZ(path string) (Z, 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"    mvpro:"-"`
	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"  mvpro:"-"`
	Rights           []Right             `json:"rights,omitempty"    mvpro:"-"`
	Ops              []*Op               `json:"-"`
}

func (*Block) BlockId

func (b *Block) BlockId() BlockId

func (*Block) Head

func (b *Block) Head() *Head

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

func NewBlockAPI(c *client.Client) BlockAPI

type BlockHash

type BlockHash = mavryk.BlockHash

type BlockId

type BlockId struct {
	Height int64
	Hash   BlockHash
	Time   time.Time
}

func (BlockId) IsNextBlock

func (i BlockId) IsNextBlock(b *Block) bool

func (BlockId) IsSameBlock

func (i BlockId) IsSameBlock(b *Block) bool

type BlockList

type BlockList []*Block

func (BlockList) Cursor

func (l BlockList) Cursor() uint64

func (BlockList) Len

func (l BlockList) Len() int

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 = mavryk.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"          mvpro:",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"  mvpro:"-"`
	Baker         Address              `json:"baker"               mvpro:"-"`
	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"     mvpro:"-"`
	Script        *Script              `json:"script,omitempty"    mvpro:",hex"`
	Storage       *Prim                `json:"storage,omitempty"   mvpro:",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"          mvpro:"-"`
	NCallsIn      int                  `json:"n_calls_in"          mvpro:"-"`
	NCallsOut     int                  `json:"n_calls_out"         mvpro:"-"`
	NCallsFailed  int                  `json:"n_calls_failed"      mvpro:"-"`
	Bigmaps       map[string]int64     `json:"bigmaps,omitempty"   mvpro:"-"`
	Metadata      map[string]*Metadata `json:"metadata,omitempty"  mvpro:"-"`
}

func (*Contract) Meta

func (c *Contract) Meta() *Metadata

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)
	ListBigmapValues(context.Context, int64, Query) (BigmapValueList, error)
	ListBigmapKeyUpdates(context.Context, int64, string, Query) (BigmapUpdateList, error)
	ListBigmapUpdates(context.Context, int64, Query) (BigmapUpdateList, error)
	ListTickets(context.Context, Address, Query) (TicketList, error)
	ListTicketBalances(context.Context, Address, Query) (TicketBalanceList, error)
	ListTicketEvents(context.Context, Address, Query) (TicketEventList, 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

type ContractValue struct {
	Value any   `json:"value,omitempty"`
	Prim  *Prim `json:"prim,omitempty"`
}

func (ContractValue) AsPrim

func (v ContractValue) AsPrim() (Prim, bool)

func (ContractValue) GetAddress

func (v ContractValue) GetAddress(path string) (Address, bool)

func (ContractValue) GetBig

func (v ContractValue) GetBig(path string) (*big.Int, bool)

func (ContractValue) GetInt64

func (v ContractValue) GetInt64(path string) (int64, bool)

func (ContractValue) GetString

func (v ContractValue) GetString(path string) (string, bool)

func (ContractValue) GetTime

func (v ContractValue) GetTime(path string) (time.Time, bool)

func (ContractValue) GetValue

func (v ContractValue) GetValue(path string) (interface{}, bool)

func (ContractValue) GetZ

func (v ContractValue) GetZ(path string) (Z, 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)
}

func (Costs) Add

func (x Costs) Add(y Costs) Costs

func (Costs) Sum

func (x Costs) Sum() float64

type Deployment

type Deployment struct {
	Protocol    string `json:"protocol"`
	Version     int    `json:"version"`      // protocol version sequence on indexed chain
	StartHeight int64  `json:"start_height"` // first block on indexed chain
	EndHeight   int64  `json:"end_height"`   // last block on indexed chain or -1
}

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"`
}

func (Election) Period

func (e Election) Period(p string) *Vote

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"        mvpro:",hex"`
	Payload  Prim    `json:"payload"     mvpro:",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 ExprHash

type ExprHash = mavryk.ExprHash

type Flow

type Flow struct {
	Id             uint64    `json:"id"`
	Height         int64     `json:"height"`
	Cycle          int64     `json:"cycle"`
	Timestamp      time.Time `json:"time"`
	OpN            int       `json:"op_n"`
	OpC            int       `json:"op_c"`
	OpI            int       `json:"op_i"`
	AccountId      uint64    `json:"account_id"`
	Account        Address   `json:"address"`
	CounterPartyId uint64    `json:"counterparty_id"`
	CounterParty   Address   `json:"counterparty"`
	Kind           string    `json:"kind"`
	Type           string    `json:"type"`
	AmountIn       float64   `json:"amount_in"`
	AmountOut      float64   `json:"amount_out"`
	IsFee          bool      `json:"is_fee"`
	IsBurned       bool      `json:"is_burned"`
	IsFrozen       bool      `json:"is_frozen"`
	IsUnfrozen     bool      `json:"is_unfrozen"`
	IsShielded     bool      `json:"is_shielded"`
	IsUnshielded   bool      `json:"is_unshielded"`
	TokenAge       int64     `json:"token_age"`
}

type FlowQuery

type FlowQuery = client.TableQuery[*Flow]
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"       mvpro:"balance"`
	Delegated              float64   `json:"delegated_balance" mvpro:"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 Key

type Key = mavryk.Key

type LocationMetadata

type LocationMetadata struct {
	Country   iso.Country      `json:"country,omitempty"`
	City      iata.AirportCode `json:"city,omitempty"`
	Latitude  float64          `json:"lon,omitempty"`
	Longitude float64          `json:"lat,omitempty"`
	Altitude  float64          `json:"alt,omitempty"`
}

type MediaMetadata

type MediaMetadata struct {
	ThumbnailUri string `json:"thumbnail_uri,omitempty"`
	ArtifactUri  string `json:"artifact_uri,omitempty"`
	Format       string `json:"format,omitempty"`
	Language     string `json:"language,omitempty"`
}

type Metadata

type Metadata struct {
	Address  Address        `json:"address"`
	TokenId  *mavryk.Z      `json:"token_id,omitempty"`
	Contents map[string]any `json:"-"`
}

func NewMetadata

func NewMetadata(a Address) *Metadata

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) Clone

func (m Metadata) Clone() Metadata

func (*Metadata) Delete

func (m *Metadata) Delete(name string)

func (*Metadata) Domain

func (m *Metadata) Domain() *DomainMetadata

func (Metadata) Get

func (m Metadata) Get(name string) any

func (Metadata) Has

func (m Metadata) Has(name string) bool

func (Metadata) ID

func (m Metadata) ID() string

func (Metadata) IsEmpty

func (m Metadata) IsEmpty() bool

func (*Metadata) Location

func (m *Metadata) Location() *LocationMetadata

func (Metadata) MarshalJSON

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

func (*Metadata) Media

func (m *Metadata) Media() *MediaMetadata

func (Metadata) Merge

func (m Metadata) Merge(d Metadata) Metadata

func (*Metadata) Payout

func (m *Metadata) Payout() *PayoutMetadata

func (*Metadata) Profile

func (m *Metadata) Profile() *ProfileMetadata

func (*Metadata) Rights

func (m *Metadata) Rights() *RightsMetadata

func (*Metadata) Set

func (m *Metadata) Set(name string, data any)

func (*Metadata) Social

func (m *Metadata) Social() *SocialMetadata

func (*Metadata) TryTz21

func (m *Metadata) TryTz21() (*Tz21Metadata, error)

func (*Metadata) Tz16

func (m *Metadata) Tz16() *contract.Tz16

func (*Metadata) Tz21

func (m *Metadata) Tz21() *Tz21Metadata

func (*Metadata) UnmarshalJSON

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

func (*Metadata) Updated

func (m *Metadata) Updated() *UpdatedMetadata

type MetadataAPI

func NewMetadataAPI

func NewMetadataAPI(c *client.Client) MetadataAPI

type MetadataDescriptor

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

type MultiKey

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

func DecodeMultiKey

func DecodeMultiKey(key Key) (MultiKey, error)

func (MultiKey) GetAddress

func (k MultiKey) GetAddress(path string) (Address, bool)

func (MultiKey) GetBig

func (k MultiKey) GetBig(path string) (*big.Int, bool)

func (MultiKey) GetInt64

func (k MultiKey) GetInt64(path string) (int64, bool)

func (MultiKey) GetString

func (k MultiKey) GetString(path string) (string, bool)

func (MultiKey) GetTime

func (k MultiKey) GetTime(path string) (time.Time, bool)

func (MultiKey) GetValue

func (k MultiKey) GetValue(path string) (interface{}, bool)

func (MultiKey) Len

func (k MultiKey) Len() int

func (MultiKey) MarshalJSON

func (k MultiKey) MarshalJSON() ([]byte, error)

func (MultiKey) String

func (k MultiKey) String() string

func (MultiKey) Unmarshal

func (k MultiKey) Unmarshal(val interface{}) error

func (*MultiKey) UnmarshalJSON

func (k *MultiKey) UnmarshalJSON(buf []byte) error

func (MultiKey) Walk

func (k MultiKey) Walk(path string, fn util.ValueWalkerFunc) error

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"            mvpro:"-"` // delegation
	Source        Address             `json:"source"                    mvpro:"-"` // internal operations
	Offender      Address             `json:"offender"                  mvpro:"-"` // double_x
	Accuser       Address             `json:"accuser"                   mvpro:"-"` // double_x
	Loser         Address             `json:"loser"                     mvpro:"-"` // smart rollup refutation game
	Winner        Address             `json:"winner"                    mvpro:"-"` // smart rollup refutation game
	Staker        Address             `json:"staker"                    mvpro:"-"` // smart rollup refutation game
	Solution      mavryk.HexBytes     `json:"solution,omitempty"        mvpro:"-"` // smart rollup refutation game
	Proof         mavryk.HexBytes     `json:"proof,omitempty"           mvpro:"-"` // smart rollup refutation game
	Storage       json.RawMessage     `json:"storage,omitempty"         mvpro:"-"` // transaction, origination
	Script        *Script             `json:"script,omitempty"          mvpro:"-"` // origination
	Power         int                 `json:"power,omitempty"           mvpro:"-"` // endorsement
	Limit         *float64            `json:"limit,omitempty"           mvpro:"-"` // set deposits limit
	Confirmations int64               `json:"confirmations"             mvpro:"-"`
	NOps          int                 `json:"n_ops,omitempty"           mvpro:"-"`
	Batch         []*Op               `json:"batch,omitempty"           mvpro:"-"`
	Internal      []*Op               `json:"internal,omitempty"        mvpro:"-"`
	Metadata      map[string]Metadata `json:"metadata,omitempty"        mvpro:"-"`
	Events        []Event             `json:"events,omitempty"          mvpro:"-"`
	TicketUpdates []TicketUpdate      `json:"ticket_updates,omitempty"  mvpro:"-"`
	// contains filtered or unexported fields
}

func (*Op) Addresses

func (o *Op) Addresses() *AddressSet

func (*Op) BlockId

func (o *Op) BlockId() BlockId

func (*Op) Content

func (o *Op) Content() []*Op

func (Op) Costs

func (o Op) Costs() Costs

func (*Op) Cursor

func (o *Op) Cursor() uint64

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) DecodeStoragePrim

func (o Op) DecodeStoragePrim(noFail bool) (prim Prim, err error)

func (Op) HasBigmapUpdates

func (o Op) HasBigmapUpdates() bool

func (Op) HasParameters

func (o Op) HasParameters() bool

func (Op) HasStorage

func (o Op) HasStorage() bool

func (*Op) WithScript

func (o *Op) WithScript(s *ContractScript) *Op

func (*Op) WithTypes

func (o *Op) WithTypes(param, store Type, eps Entrypoints, b map[int64]Type) *Op

type OpAPI

type OpAPI interface {
	Get(context.Context, OpHash, Query) (OpList, error)
	ResolveTypes(context.Context, ...*Op) error
	NewQuery() *OpQuery
}

func NewOpAPI

func NewOpAPI(c *client.Client) OpAPI

type OpHash

type OpHash = mavryk.OpHash

type OpList

type OpList []*Op

func (OpList) Costs

func (og OpList) Costs() Costs

func (OpList) Cursor

func (l OpList) Cursor() uint64

func (OpList) Len

func (l OpList) Len() int

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 OpStatus

type OpStatus = mavryk.OpStatus

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 ParseOpType(s string) OpType

func (OpType) IsValid

func (t OpType) IsValid() bool

func (*OpType) MarshalText

func (t *OpType) MarshalText() ([]byte, error)

func (OpType) String

func (t OpType) String() string

func (*OpType) UnmarshalText

func (t *OpType) UnmarshalText(data []byte) error

type Parameters

type Parameters = micheline.Parameters

type PayoutMetadata

type PayoutMetadata []Address

type Prim

type Prim = micheline.Prim

type ProfileMetadata

type ProfileMetadata struct {
	Alias       string `json:"alias,omitempty"`
	Description string `json:"description,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 Proposal

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

type ProtocolHash

type ProtocolHash = mavryk.ProtocolHash

type Query

type Query = client.Query
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 RightType

type RightType = mavryk.RightType

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) IsLost

func (r Rights) IsLost(pos int) bool

func (Rights) IsMissed

func (r Rights) IsMissed(pos int) bool

func (Rights) IsSeedRequired

func (r Rights) IsSeedRequired(pos int) bool

func (Rights) IsSeedRevealed

func (r Rights) IsSeedRevealed(pos int) bool

func (Rights) IsStolen

func (r Rights) IsStolen(pos int) bool

func (Rights) IsUsed

func (r Rights) IsUsed(pos int) bool

func (Rights) Pos

func (r Rights) Pos(height int64) int

func (Rights) RightAt

func (r Rights) RightAt(height int64, typ RightType) (Right, bool)

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 Script

type Script = micheline.Script

type SmartRollupAddMessages

type SmartRollupAddMessages struct {
	Messages []mavryk.HexBytes `json:"message"`
}

type SmartRollupCement deprecated

type SmartRollupCement struct {
	Commitment *mavryk.SmartRollupCommitHash `json:"commitment,omitempty"`
}

Deprecated: in v17

type SmartRollupExecuteOutboxMessage

type SmartRollupExecuteOutboxMessage struct {
	CementedCommitment mavryk.SmartRollupCommitHash `json:"cemented_commitment"`
	OutputProof        mavryk.HexBytes              `json:"output_proof"`
}

type SmartRollupOriginate

type SmartRollupOriginate struct {
	PvmKind          mavryk.PvmKind  `json:"pvm_kind"`
	Kernel           mavryk.HexBytes `json:"kernel"`
	OriginationProof mavryk.HexBytes `json:"origination_proof"`
	ParametersTy     micheline.Prim  `json:"parameters_ty"`
}

type SmartRollupPublish

type SmartRollupPublish struct {
	Commitment struct {
		CompressedState mavryk.SmartRollupStateHash  `json:"compressed_state"`
		InboxLevel      int64                        `json:"inbox_level"`
		Predecessor     mavryk.SmartRollupCommitHash `json:"predecessor"`
		NumberOfTicks   mavryk.Z                     `json:"number_of_ticks"`
	} `json:"commitment"`
}

type SmartRollupRecoverBond

type SmartRollupRecoverBond struct {
	Staker mavryk.Address `json:"staker"`
}

type SmartRollupRefute

type SmartRollupRefute struct {
	Opponent   mavryk.Address `json:"opponent"`
	Refutation struct {
		Kind         string                        `json:"refutation_kind"`
		PlayerHash   *mavryk.SmartRollupCommitHash `json:"player_commitment_hash,omitempty"`
		OpponentHash *mavryk.SmartRollupCommitHash `json:"opponent_commitment_hash,omitempty"`
		Choice       *mavryk.Z                     `json:"choice,omitempty"`
		Step         *struct {
			Ticks []struct {
				State mavryk.SmartRollupStateHash `json:"state"`
				Tick  mavryk.Z                    `json:"tick"`
			} `json:"ticks,omitempty"`
			Proof *struct {
				PvmStep    mavryk.HexBytes `json:"pvm_step,omitempty"`
				InputProof *struct {
					Kind    string          `json:"input_proof_kind"`
					Level   int64           `json:"level"`
					Counter mavryk.Z        `json:"message_counter"`
					Proof   mavryk.HexBytes `json:"serialized_proof"`
				} `json:"input_proof,omitempty"`
			} `json:"proof,omitempty"`
		} `json:"step,omitempty"`
	} `json:"refutation"`
}

type SmartRollupResult

type SmartRollupResult struct {
	Address          *mavryk.Address               `json:"address,omitempty"`
	Size             *mavryk.Z                     `json:"size,omitempty"`
	InboxLevel       int64                         `json:"inbox_level,omitempty"`
	StakedHash       *mavryk.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 *mavryk.Address `json:"player,omitempty"`
	} `json:"game_status,omitempty"`
	Commitment *mavryk.SmartRollupCommitHash `json:"commitment_hash,omitempty"`
}

type SmartRollupTimeout

type SmartRollupTimeout struct {
	Stakers struct {
		Alice mavryk.Address `json:"alice"`
		Bob   mavryk.Address `json:"bob"`
	} `json:"stakers"`
}

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 SocialMetadata struct {
	Twitter   string `json:"twitter,omitempty"`
	Instagram string `json:"instagram,omitempty"`
	Reddit    string `json:"reddit,omitempty"`
	Github    string `json:"github,omitempty"`
	Website   string `json:"website,omitempty"`
}

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 Staker

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

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

func NewStatsAPI(c *client.Client) StatsAPI

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

func (s *Status) UnmarshalJSON(data []byte) error

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 Ticket

type Ticket struct {
	Id           uint64    `json:"id"`
	Ticketer     Address   `json:"ticketer"`
	Type         Prim      `json:"type"            mvpro:"type,hex"`
	Content      Prim      `json:"content"         mvpro:"content,hex"`
	Hash         string    `json:"hash"`
	Creator      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       Z         `json:"total_supply"`
	TotalMint    Z         `json:"total_mint"`
	TotalBurn    Z         `json:"total_burn"`
	NumTransfers int       `json:"num_transfers"`
	NumHolders   int       `json:"num_holders"`
}

type TicketBalance

type TicketBalance struct {
	Id           uint64    `json:"id"`
	TicketId     uint64    `json:"-"               mvpro:"ticket"`
	Ticketer     Address   `json:"ticketer"        mvpro:"-"`
	Type         Prim      `json:"type"            mvpro:"-"`
	Content      Prim      `json:"content"         mvpro:"-"`
	Hash         string    `json:"hash"            mvpro:"-"`
	Account      Address   `json:"account"`
	Balance      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      Z         `json:"vol_sent"`
	VolRecv      Z         `json:"vol_recv"`
	VolMint      Z         `json:"vol_mint"`
	VolBurn      Z         `json:"vol_burn"`
}

type TicketBalanceList

type TicketBalanceList []*TicketBalance

func (TicketBalanceList) Cursor

func (l TicketBalanceList) Cursor() uint64

func (TicketBalanceList) Len

func (l TicketBalanceList) Len() int

type TicketEvent

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

type TicketEventList

type TicketEventList []*TicketEvent

func (TicketEventList) Cursor

func (l TicketEventList) Cursor() uint64

func (TicketEventList) Len

func (l TicketEventList) Len() int

type TicketList

type TicketList []*Ticket

func (TicketList) Cursor

func (l TicketList) Cursor() uint64

func (TicketList) Len

func (l TicketList) Len() int

type TicketUpdate

type TicketUpdate struct {
	Id       uint64  `json:"id"`
	Ticketer Address `json:"ticketer"`
	Type     Prim    `json:"type"`
	Content  Prim    `json:"content"`
	Account  Address `json:"account"`
	Amount   Z       `json:"amount"`
}

type TicketUpdateList

type TicketUpdateList []*TicketUpdate

func (TicketUpdateList) Cursor

func (l TicketUpdateList) Cursor() uint64

func (TicketUpdateList) Len

func (l TicketUpdateList) Len() int

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 Token

type Token = mavryk.Token

type TokenMetadata

type TokenMetadata struct {
	Name     string `json:"name"`
	Symbol   string `json:"symbol"`
	Decimals int    `json:"decimals"`
}

type Type

type Type = micheline.Type

type Typedef

type Typedef = micheline.Typedef

type Tz21Attribute

type Tz21Attribute struct {
	Name  string `json:"name"`
	Value string `json:"value"`
	Type  string `json:"type,omitempty"`
}

type Tz21DataRate

type Tz21DataRate struct {
	Value string `json:"value"`
	Unit  string `json:"unit"`
}

type Tz21Dimension

type Tz21Dimension struct {
	Value string `json:"value"`
	Unit  string `json:"unit"`
}

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 UpdatedMetadata struct {
	Hash   BlockHash `json:"hash"`
	Height int64     `json:"height"`
	Time   time.Time `json:"time"`
}

type Value

type Value = micheline.Value

type Views

type Views = micheline.Views

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"`
}

type Voter

type Voter struct {
	RowId     uint64   `json:"row_id"`
	Address   Address  `json:"address"`
	Stake     float64  `json:"stake"`
	Ballot    string   `json:"ballot"`
	HasVoted  bool     `json:"has_voted"`
	Proposals []string `json:"proposals"`
}

type Z

type Z = mavryk.Z

Jump to

Keyboard shortcuts

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