api

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: MIT Imports: 10 Imported by: 3

Documentation

Index

Constants

View Source
const (
	KindTransaction     = "transaction"
	KindOrigination     = "origination"
	KindEndorsement     = "endorsement"
	KindBallot          = "ballot"
	KindProposal        = "proposal"
	KindDoubleBaking    = "double_baking"
	KindDoubleEndorsing = "double_endorsing"
	KindActivation      = "activation"
	KindNonceRevelation = "nonce_revelation"
	KindDelegation      = "delegation"
	KindReveal          = "reveal"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

API -

func New

func New(baseURL string) *API

New -

func (*API) GetActivations

func (tzkt *API) GetActivations(filters map[string]string) (operations []Operation, err error)

GetActivations -

func (*API) GetBallots

func (tzkt *API) GetBallots(filters map[string]string) (operations []Operation, err error)

GetBallots -

func (*API) GetBigmapByID

func (tzkt *API) GetBigmapByID(id uint64, filters map[string]string) (response BigMap, err error)

GetBigmapByID -

func (*API) GetBigmapKey

func (tzkt *API) GetBigmapKey(id uint64, key string, filters map[string]string) (response BigMapKey, err error)

GetBigmapKey -

func (*API) GetBigmapKeyUpdates

func (tzkt *API) GetBigmapKeyUpdates(id uint64, key string, filters map[string]string) (response []BigMapUpdate, err error)

GetBigmapKeyUpdates -

func (*API) GetBigmapKeys

func (tzkt *API) GetBigmapKeys(id uint64, filters map[string]string) (response []BigMapKey, err error)

GetBigmapKeys -

func (*API) GetBigmapUpdates

func (tzkt *API) GetBigmapUpdates(filters map[string]string) (response []BigMapUpdate, err error)

GetBigmapUpdates -

func (*API) GetBigmaps

func (tzkt *API) GetBigmaps(filters map[string]string) (response []BigMap, err error)

GetBigmaps -

func (*API) GetBigmapsCount

func (tzkt *API) GetBigmapsCount() (uint64, error)

GetBigmapsCount -

func (*API) GetBlock

func (tzkt *API) GetBlock(level uint64) (b Block, err error)

GetBlock -

func (*API) GetBlocks

func (tzkt *API) GetBlocks(filters map[string]string) (b []Block, err error)

GetBlocks -

func (*API) GetDelegations

func (tzkt *API) GetDelegations(filters map[string]string) (operations []Operation, err error)

GetDelegations -

func (*API) GetDoubleBakings

func (tzkt *API) GetDoubleBakings(filters map[string]string) (operations []Operation, err error)

GetDoubleBakings -

func (*API) GetDoubleEndorsings

func (tzkt *API) GetDoubleEndorsings(filters map[string]string) (operations []Operation, err error)

GetDoubleEndorsings -

func (*API) GetEndorsements

func (tzkt *API) GetEndorsements(filters map[string]string) (operations []Operation, err error)

GetEndorsements -

func (*API) GetHead

func (tzkt *API) GetHead() (head Head, err error)

GetHead -

func (*API) GetNonceRevelations

func (tzkt *API) GetNonceRevelations(filters map[string]string) (operations []Operation, err error)

GetNonceRevelations -

func (*API) GetOriginations

func (tzkt *API) GetOriginations(filters map[string]string) (operations []Operation, err error)

GetOriginations -

func (*API) GetProposals

func (tzkt *API) GetProposals(filters map[string]string) (operations []Operation, err error)

GetProposals -

func (*API) GetReveals

func (tzkt *API) GetReveals(filters map[string]string) (operations []Operation, err error)

GetReveals -

func (*API) GetTransactions

func (tzkt *API) GetTransactions(filters map[string]string) (operations []Operation, err error)

GetTransactions -

type Address

type Address struct {
	Alias   string `json:"alias"`
	Address string `json:"address"`
}

Address -

type BigMap

type BigMap struct {
	Ptr        int64              `json:"ptr"`
	Contract   Address            `json:"contract"`
	Path       string             `json:"path"`
	Active     bool               `json:"active"`
	FirstLevel uint64             `json:"firstLevel"`
	LastLevel  uint64             `json:"lastLevel"`
	TotalKeys  uint64             `json:"totalKeys"`
	ActiveKeys uint64             `json:"activeKeys"`
	Updates    uint64             `json:"updates"`
	KeyType    stdJSON.RawMessage `json:"keyType"`
	ValueType  stdJSON.RawMessage `json:"valueType"`
}

BigMap -

type BigMapKey

type BigMapKey struct {
	ID         uint64             `json:"id"`
	Active     bool               `json:"active"`
	Hash       string             `json:"hash"`
	Key        string             `json:"key"`
	Value      stdJSON.RawMessage `json:"value"`
	FirstLevel uint64             `json:"firstLevel"`
	LastLevel  uint64             `json:"lastLevel"`
	Updates    uint64             `json:"updates"`
}

BigMapKey -

type BigMapUpdate

type BigMapUpdate struct {
	ID        uint64               `json:"id"`
	Level     uint64               `json:"level"`
	Timestamp time.Time            `json:"timestamp"`
	Bigmap    int64                `json:"bigmap"`
	Contract  Address              `json:"contract"`
	Path      string               `json:"path"`
	Action    string               `json:"action"`
	Content   *BigMapUpdateContent `json:"content,omitempty"`
}

BigMapUpdate -

type BigMapUpdateContent

type BigMapUpdateContent struct {
	Hash  string             `json:"hash"`
	Key   stdJSON.RawMessage `json:"key"`
	Value stdJSON.RawMessage `json:"value"`
}

BigMapUpdateContent -

type Block

type Block struct {
	Level         uint64    `json:"level"`
	Hash          string    `json:"hash"`
	Timestamp     time.Time `json:"timestamp"`
	Proto         int64     `json:"proto"`
	Priority      int64     `json:"priority"`
	Validations   int64     `json:"validations"`
	Deposit       int64     `json:"deposit"`
	Reward        int64     `json:"reward"`
	Fees          int64     `json:"fees"`
	NonceRevealed bool      `json:"nonceRevealed"`
	Baker         Address   `json:"baker"`
}

Block -

type Head struct {
	Level        uint64    `json:"level"`
	Hash         string    `json:"hash"`
	Protocol     string    `json:"protocol"`
	Timestamp    time.Time `json:"timestamp"`
	VotingEpoch  int64     `json:"votingEpoch"`
	VotingPeriod int64     `json:"votingPeriod"`
	KnownLevel   int64     `json:"knownLevel"`
	LastSync     time.Time `json:"lastSync"`
	Synced       bool      `json:"synced"`
	QuoteLevel   int64     `json:"quoteLevel"`
	QuoteBtc     float64   `json:"quoteBtc"`
	QuoteEur     float64   `json:"quoteEur"`
	QuoteUsd     float64   `json:"quoteUsd"`
}

Head -

type Operation

type Operation struct {
	ID    uint64 `json:"id"`
	Level uint64 `json:"level"`
	Hash  string `json:"hash"`
	Kind  string `json:"type"`
	Block string `json:"block"`
}

Operation -

Jump to

Keyboard shortcuts

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