debugapi

package
v1.0.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

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:"false" usage:"whether the DebugAPI component is enabled"`

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

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