api

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 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) GetDelegateByAddress added in v0.1.1

func (tzkt *API) GetDelegateByAddress(address string) (delegate Delegate, err error)

GetDelegateByAddress -

func (*API) GetDelegates added in v0.1.1

func (tzkt *API) GetDelegates(filters map[string]string) (delegates []Delegate, err error)

GetDelegates -

func (*API) GetDelegatesCount added in v0.1.1

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

GetDelegatesCount -

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) GetRights added in v0.1.1

func (tzkt *API) GetRights(filters map[string]string) (rights []Right, err error)

GetRights -

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 Delegate added in v0.1.1

type Delegate struct {
	Type                   string    `json:"type"`
	Alias                  string    `json:"alias"`
	Address                string    `json:"address"`
	PublicKey              string    `json:"publicKey"`
	Balance                int64     `json:"balance"`
	FrozenDeposits         int64     `json:"frozenDeposits"`
	FrozenRewards          int64     `json:"frozenRewards"`
	FrozenFees             int64     `json:"frozenFees"`
	Counter                int64     `json:"counter"`
	ActivationLevel        int64     `json:"activationLevel"`
	StakingBalance         int64     `json:"stakingBalance"`
	NumContracts           int64     `json:"numContracts"`
	NumDelegators          int64     `json:"numDelegators"`
	NumBlocks              int64     `json:"numBlocks"`
	NumEndorsements        int64     `json:"numEndorsements"`
	NumBallots             int64     `json:"numBallots"`
	NumProposals           int64     `json:"numProposals"`
	NumActivations         int64     `json:"numActivations"`
	NumDoubleBaking        int64     `json:"numDoubleBaking"`
	NumDoubleEndorsing     int64     `json:"numDoubleEndorsing"`
	NumNonceRevelations    int64     `json:"numNonceRevelations"`
	NumRevelationPenalties int64     `json:"numRevelationPenalties"`
	NumDelegations         int64     `json:"numDelegations"`
	NumOriginations        int64     `json:"numOriginations"`
	NumTransactions        int64     `json:"numTransactions"`
	NumReveals             int64     `json:"numReveals"`
	NumMigrations          int64     `json:"numMigrations"`
	FirstActivity          int64     `json:"firstActivity"`
	LastActivity           int64     `json:"lastActivity"`
	FirstActivityTime      time.Time `json:"firstActivityTime"`
	LastActivityTime       time.Time `json:"lastActivityTime"`
	ActivationTime         time.Time `json:"activationTime"`
	Software               Software  `json:"software"`
	Active                 bool      `json:"active"`
	Revealed               bool      `json:"revealed"`
}

Delegate -

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" mapstructure:"id"`
	Level    uint64   `json:"level" mapstructure:"level"`
	Hash     string   `json:"hash" mapstructure:"hash"`
	Kind     string   `json:"type" mapstructure:"type"`
	Block    string   `json:"block" mapstructure:"block"`
	Delegate *Address `json:"delegate,omitempty" mapstructure:"delegate,omitempty"`
	GasUsed  *uint64  `json:"gasUsed,omitempty" mapstructure:"gasUsed,omitempty"`
	BakerFee *uint64  `json:"bakerFee,omitempty" mapstructure:"bakerFee,omitempty"`
}

Operation -

type Right struct {
	Type      string    `json:"type"`
	Cycle     uint64    `json:"cycle"`
	Level     uint64    `json:"level"`
	Timestamp time.Time `json:"timestamp"`
	Slots     uint64    `json:"slots"`
	Baker     Address   `json:"baker"`
	Status    string    `json:"status"`
}

Right -

type Software added in v0.1.1

type Software struct {
	Version string    `json:"version"`
	Date    time.Time `json:"date"`
}

Software -

Jump to

Keyboard shortcuts

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