models

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package models provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen/v2 version v2.0.0 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account added in v0.2.1

type Account struct {
	Address Address `json:"address"`
	Balance string  `json:"balance"`
}

Account defines model for Account.

type Address

type Address = string

Address defines model for Address.

type AddressFilter

type AddressFilter = Address

AddressFilter defines model for AddressFilter.

type AddressParam

type AddressParam = AddressFilter

AddressParam defines model for addressParam.

type BlockNumParam added in v0.2.1

type BlockNumParam = Counter

BlockNumParam defines model for blockNumParam.

type CallData added in v0.2.3

type CallData struct {
	Name   string `json:"name"`
	Params any    `json:"params"`
}

CallData defines model for CallData.

type CountResponse

type CountResponse struct {
	Total Counter `json:"total"`
}

CountResponse defines model for CountResponse.

type Counter

type Counter = uint64

Counter defines model for Counter.

type Dag

type Dag struct {
	Hash             Hash      `json:"hash"`
	Level            Counter   `json:"level"`
	Timestamp        Timestamp `json:"timestamp"`
	TransactionCount Counter   `json:"transactionCount"`
}

Dag defines model for Dag.

type DagsPaginatedResponse

type DagsPaginatedResponse = PaginatedResponse

DagsPaginatedResponse defines model for DagsPaginatedResponse.

type EventLog added in v0.2.1

type EventLog struct {
	Address          Address  `json:"address"`
	Data             string   `json:"data"`
	LogIndex         Counter  `json:"logIndex"`
	Name             string   `json:"name"`
	Params           any      `json:"params"`
	Removed          bool     `json:"removed"`
	Topics           []string `json:"topics"`
	TransactionHash  Hash     `json:"transactionHash"`
	TransactionIndex Counter  `json:"transactionIndex"`
}

EventLog defines model for EventLog.

type GetAddressDagsParams

type GetAddressDagsParams struct {
	// Pagination Pagination
	Pagination PaginationParam `form:"pagination" json:"pagination"`
}

GetAddressDagsParams defines parameters for GetAddressDags.

type GetAddressPbftsParams

type GetAddressPbftsParams struct {
	// Pagination Pagination
	Pagination PaginationParam `form:"pagination" json:"pagination"`
}

GetAddressPbftsParams defines parameters for GetAddressPbfts.

type GetAddressTransactionsParams

type GetAddressTransactionsParams struct {
	// Pagination Pagination
	Pagination PaginationParam `form:"pagination" json:"pagination"`
}

GetAddressTransactionsParams defines parameters for GetAddressTransactions.

type GetAddressYieldParams added in v0.2.1

type GetAddressYieldParams struct {
	// BlockNumber Block Number
	BlockNumber *BlockNumParam `form:"blockNumber,omitempty" json:"blockNumber,omitempty"`
}

GetAddressYieldParams defines parameters for GetAddressYield.

type GetHoldersParams added in v0.2.1

type GetHoldersParams struct {
	// Pagination Pagination
	Pagination PaginationParam `form:"pagination" json:"pagination"`
}

GetHoldersParams defines parameters for GetHolders.

type GetTotalYieldParams added in v0.2.1

type GetTotalYieldParams struct {
	// BlockNumber Block Number
	BlockNumber *BlockNumParam `form:"blockNumber,omitempty" json:"blockNumber,omitempty"`
}

GetTotalYieldParams defines parameters for GetTotalYield.

type GetValidatorParams

type GetValidatorParams struct {
	// Week Week to filter by
	Week *WeekParam `form:"week,omitempty" json:"week,omitempty"`
}

GetValidatorParams defines parameters for GetValidator.

type GetValidatorsParams

type GetValidatorsParams struct {
	// Week Week to filter by
	Week *WeekParam `form:"week,omitempty" json:"week,omitempty"`

	// Pagination Pagination
	Pagination PaginationParam `form:"pagination" json:"pagination"`
}

GetValidatorsParams defines parameters for GetValidators.

type GetValidatorsTotalParams

type GetValidatorsTotalParams struct {
	// Week Week to filter by
	Week *WeekParam `form:"week,omitempty" json:"week,omitempty"`
}

GetValidatorsTotalParams defines parameters for GetValidatorsTotal.

type Hash

type Hash = string

Hash defines model for Hash.

type HashParam added in v0.2.1

type HashParam = Hash

HashParam defines model for hashParam.

type HoldersPaginatedResponse added in v0.2.1

type HoldersPaginatedResponse = PaginatedResponse

HoldersPaginatedResponse defines model for HoldersPaginatedResponse.

type InternalTransactionsResponse added in v0.2.1

type InternalTransactionsResponse struct {
	Data []Transaction `json:"data"`
}

InternalTransactionsResponse defines model for InternalTransactionsResponse.

type NilableUint64 added in v0.3.6

type NilableUint64 = uint64

NilableUint64 defines model for NilableUint64.

type PaginatedResponse

type PaginatedResponse struct {
	End     Counter `json:"end"`
	HasNext bool    `json:"hasNext"`
	Start   Counter `json:"start"`
	Total   Counter `json:"total"`
}

PaginatedResponse defines model for PaginatedResponse.

type PaginationFilter

type PaginationFilter struct {
	Limit uint64  `json:"limit"`
	Start *uint64 `json:"start"`
}

PaginationFilter defines model for PaginationFilter.

type PaginationParam

type PaginationParam = PaginationFilter

PaginationParam defines model for paginationParam.

type Pbft

type Pbft struct {
	Author           Address   `json:"author"`
	Hash             Hash      `json:"hash"`
	Number           Counter   `json:"number"`
	Timestamp        Timestamp `json:"timestamp"`
	TransactionCount Counter   `json:"transactionCount"`
}

Pbft defines model for Pbft.

type PbftsPaginatedResponse

type PbftsPaginatedResponse = PaginatedResponse

PbftsPaginatedResponse defines model for PbftsPaginatedResponse.

type Period

type Period struct {
	EndDate   Timestamp `json:"endDate"`
	HasNext   bool      `json:"hasNext"`
	StartDate Timestamp `json:"startDate"`
}

Period defines model for Period.

type StatsResponse

type StatsResponse struct {
	DagsCount                Counter        `json:"dagsCount"`
	LastDagTimestamp         *NilableUint64 `json:"lastDagTimestamp" rlp:"nil"`
	LastPbftTimestamp        *NilableUint64 `json:"lastPbftTimestamp" rlp:"nil"`
	LastTransactionTimestamp *NilableUint64 `json:"lastTransactionTimestamp" rlp:"nil"`
	PbftCount                Counter        `json:"pbftCount"`
	TransactionsCount        Counter        `json:"transactionsCount"`
	ValidatorRegisteredBlock *NilableUint64 `json:"validatorRegisteredBlock" rlp:"nil"`
}

StatsResponse defines model for StatsResponse.

type Timestamp

type Timestamp = uint64

Timestamp defines model for Timestamp.

type Transaction

type Transaction struct {
	BlockNumber Counter         `json:"blockNumber"`
	Calldata    *CallData       `json:"calldata,omitempty" rlp:"nil"`
	From        Address         `json:"from"`
	GasCost     Counter         `json:"gasCost"`
	Hash        Hash            `json:"hash"`
	Input       string          `json:"input"`
	Status      bool            `json:"status"`
	Timestamp   Timestamp       `json:"timestamp"`
	To          Address         `json:"to"`
	Type        TransactionType `json:"type"`
	Value       string          `json:"value"`
}

Transaction defines model for Transaction.

type TransactionLogsResponse added in v0.2.1

type TransactionLogsResponse struct {
	Data []EventLog `json:"data"`
}

TransactionLogsResponse defines model for TransactionLogsResponse.

type TransactionType

type TransactionType uint8

TransactionType defines model for Transaction.Type.

const (
	ContractCall             TransactionType = 1
	ContractCreation         TransactionType = 2
	InternalContractCall     TransactionType = 4
	InternalContractCreation TransactionType = 5
	InternalTransfer         TransactionType = 3
	Transfer                 TransactionType = 0
)

Defines values for TransactionType.

type TransactionsPaginatedResponse

type TransactionsPaginatedResponse = PaginatedResponse

TransactionsPaginatedResponse defines model for TransactionsPaginatedResponse.

type Validator

type Validator struct {
	Address           Address `json:"address"`
	PbftCount         Counter `json:"pbftCount"`
	Rank              uint64  `json:"rank" rlp:"-"`
	RegistrationBlock *uint64 `json:"registrationBlock,omitempty" rlp:"-"`
	Yield             string  `json:"yield,omitempty" rlp:"-"`
}

Validator defines model for Validator.

type ValidatorsPaginatedResponse

type ValidatorsPaginatedResponse = PaginatedResponse

ValidatorsPaginatedResponse defines model for ValidatorsPaginatedResponse.

type Week

type Week struct {
	Week *int32 `json:"week"`
	Year *int32 `json:"year"`
}

Week defines model for Week.

type WeekParam

type WeekParam = Week

WeekParam defines model for weekParam.

type WeekResponse

type WeekResponse struct {
	EndDate   Timestamp `json:"endDate"`
	HasNext   bool      `json:"hasNext"`
	StartDate Timestamp `json:"startDate"`
	Week      *int32    `json:"week"`
	Year      *int32    `json:"year"`
}

WeekResponse defines model for WeekResponse.

type YieldResponse added in v0.2.1

type YieldResponse struct {
	FromBlock Counter `json:"fromBlock"`
	ToBlock   Counter `json:"toBlock"`
	Yield     string  `json:"yield"`
}

YieldResponse defines model for YieldResponse.

Jump to

Keyboard shortcuts

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