debugapi

package
v1.0.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: Apache-2.0 Imports: 31 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	RouteValidators    = "/validators"
	RouteBlockMetadata = "/blocks/:" + api.ParameterBlockID + "/metadata"

	RouteChainManagerAllChainsDot      = "/all-chains"
	RouteChainManagerAllChainsRendered = "/all-chains/rendered"

	RouteCommitmentBySlotBlockIDs = "/commitments/by-slot/:" + api.ParameterSlot + "/blocks"

	RouteCommitmentBySlotTransactionIDs = "/commitments/by-slot/:" + api.ParameterSlot + "/transactions"
)

Variables

View Source
var (
	Component *app.Component
)
View Source
var ParamsDebugAPI = &ParametersDebugAPI{}

ParamsDebugAPI is the default configuration parameters for the DebugAPI component.

Functions

This section is empty.

Types

type BlockChangesResponse

type BlockChangesResponse struct {
	// The index of the requested commitment.
	Index iotago.SlotIndex `json:"index"`
	// The blocks that got included in this slot.
	IncludedBlocks []string `json:"includedBlocks"`
	// The tangle root of the slot.
	TangleRoot string `json:"tangleRoot"`
}

type BlockMetadataResponse

type BlockMetadataResponse struct {
	// BlockID The hex encoded block ID of the block.
	BlockID string `json:"blockId"`
	// StrongParents are the strong parents of the block.
	StrongParents []string `json:"strongParents"`
	// WeakParents are the weak parents of the block.
	WeakParents []string `json:"weakParents"`
	// ShallowLikeParents are the shallow like parents of the block.
	ShallowLikeParents []string `json:"shallowLikeParents"`

	Solid        bool `json:"solid"`
	Invalid      bool `json:"invalid"`
	Booked       bool `json:"booked"`
	PreAccepted  bool `json:"preAccepted"`
	Accepted     bool `json:"accepted"`
	PreConfirmed bool `json:"preConfirmed"`
	Confirmed    bool `json:"confirmed"`

	Witnesses []string `json:"witnesses"`
	// spenderIDs are the all spenderIDs of the block inherited from the parents + payloadSpenderIDs.
	SpenderIDs []iotago.TransactionID `json:"spenderIDs"`
	// payloadSpenderIDs are the spenderIDs of the block's payload (in case it is a transaction, otherwise empty).
	PayloadSpenderIDs []iotago.TransactionID `json:"payloadSpenderIDs"`
	String            string                 `json:"string"`
}

func BlockMetadataResponseFromBlock

func BlockMetadataResponseFromBlock(block *blocks.Block) *BlockMetadataResponse

type ParametersDebugAPI

type ParametersDebugAPI struct {
	// Enabled whether the DebugAPI component is enabled.
	Enabled bool `default:"true" usage:"whether the DebugAPI component is enabled"`

	Path             string `default:"testnet/debug" usage:"the path to the database folder"`
	MaxOpenDBs       int    `default:"2" usage:"maximum number of open database instances"`
	PruningThreshold uint64 `default:"1" usage:"how many epochs should be retained"`
	DBGranularity    int64  `default:"100" usage:"how many slots should be contained in a single DB instance"`
}

ParametersDebugAPI contains the definition of configuration parameters used by the debug API.

type TransactionsChangesResponse

type TransactionsChangesResponse struct {
	// The index of the requested commitment.
	Index iotago.SlotIndex `json:"index"`
	// The transactions that got included in this slot.
	IncludedTransactions []string `json:"includedTransactions"`
	// The mutations root of the slot.
	MutationsRoot string `json:"mutationsRoot"`
}

type Validator

type Validator struct {
	AccountID      iotago.AccountID `serix:""`
	SeatIndex      uint8            `serix:""`
	PoolStake      iotago.BaseToken `serix:""`
	ValidatorStake iotago.BaseToken `serix:""`
	FixedCost      iotago.Mana      `serix:""`
}

type ValidatorsSummaryResponse

type ValidatorsSummaryResponse struct {
	ValidatorSeats []*Validator `serix:"lenPrefix=uint8"`
	ActiveSeats    []uint32     `serix:"lenPrefix=uint8"`
}

Jump to

Keyboard shortcuts

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