Documentation
¶
Index ¶
Constants ¶
const ( // MsgTypeNodeStatus is the type of the NodeStatus block. MsgTypeNodeStatus byte = iota // MsgTypeBPSMetric is the type of the block per second (BPS) metric block. MsgTypeBPSMetric // MsgTypeBlock is the type of the block. MsgTypeBlock // MsgTypeNeighborMetric is the type of the NeighborMetric block. MsgTypeNeighborMetric // MsgTypeComponentCounterMetric is the type of the component counter triggered per second. MsgTypeComponentCounterMetric // MsgTypeTipsMetric is the type of the TipsMetric block. MsgTypeTipsMetric // MsgTypeVertex defines a vertex block. MsgTypeVertex // MsgTypeTXAccepted defines a tx is accepted. MsgTypeTXAccepted // MsgTypeTipInfo defines a tip info block. MsgTypeTipInfo // MsgTypeManaValue defines a mana value block. MsgTypeManaValue // MsgTypeManaMapOverall defines a block containing overall mana map. MsgTypeManaMapOverall // MsgTypeManaMapOnline defines a block containing online mana map. MsgTypeManaMapOnline // MsgManaDashboardAddress is the socket address of the dashboard to stream mana from. MsgManaDashboardAddress // MsgTypeRateSetterMetric defines rate setter metrics. MsgTypeRateSetterMetric // MsgTypeConflictsConflictSet defines a websocket message that contains a conflictSet update for the "conflicts" tab. MsgTypeConflictsConflictSet // MsgTypeConflictsConflict defines a websocket message that contains a conflict update for the "conflicts" tab. MsgTypeConflictsConflict // MsgTypeSlotInfo defines a websocket message that contains a conflict update for the "conflicts" tab. MsgTypeSlotInfo )
Variables ¶
var (
Component *app.Component
)
var ErrInvalidParameter = echo.NewHTTPError(http.StatusBadRequest, "invalid parameter")
ErrInvalidParameter defines the invalid parameter error.
var NodeStartupTimestamp = time.Now()
var ParamsDashboard = &ParametersDashboard{}
Functions ¶
This section is empty.
Types ¶
type CommitmentResponse ¶
type ExplorerAddress ¶
type ExplorerAddress struct {
Address string `json:"address"`
ExplorerOutputs []ExplorerOutput `json:"explorerOutputs"`
}
ExplorerAddress defines the struct of the ExplorerAddress.
type ExplorerBlock ¶
type ExplorerBlock struct {
// ID is the block ID.
ID string `json:"id"`
// NetworkID is the network ID of the block that attaches to.
NetworkID iotago.NetworkID `json:"networkID"`
// ProtocolVersion is the protocol that process the block.
ProtocolVersion iotago.Version `json:"protocolVersion"`
// SolidificationTimestamp is the timestamp of the block.
SolidificationTimestamp int64 `json:"solidificationTimestamp"`
// The time when this block was issued
IssuanceTimestamp int64 `json:"issuanceTimestamp"`
// The issuer's sequence number of this block.
SequenceNumber uint64 `json:"sequenceNumber"`
// The public key of the issuer who issued this block.
IssuerID string `json:"issuerID"`
// The signature of the block.
Signature string `json:"signature"`
// StrongParents are the strong parents of the block.
StrongParents []string `json:"strongParents"`
// WeakParents are the strong parents of the block.
WeakParents []string `json:"weakParents"`
// ShallowLikedParents are the strong parents of the block.
ShallowLikedParents []string `json:"shallowLikedParents"`
// StrongChildren are the strong children of the block.
StrongChildren []string `json:"strongChildren"`
// WeakChildren are the weak children of the block.
WeakChildren []string `json:"weakChildren"`
// LikedInsteadChildren are the shallow like children of the block.
LikedInsteadChildren []string `json:"shallowLikeChildren"`
// Solid defines the solid status of the block.
Solid bool `json:"solid"`
SpendIDs []string `json:"spendIDs"`
Scheduled bool `json:"scheduled"`
Booked bool `json:"booked"`
Orphaned bool `json:"orphaned"`
ObjectivelyInvalid bool `json:"objectivelyInvalid"`
SubjectivelyInvalid bool `json:"subjectivelyInvalid"`
Acceptance bool `json:"acceptance"`
AcceptanceTime int64 `json:"acceptanceTime"`
Confirmation bool `json:"confirmation"`
ConfirmationTime int64 `json:"confirmationTime"`
ConfirmationBySlot bool `json:"confirmationBySlot"`
ConfirmationBySlotTime int64 `json:"confirmationBySlotTime"`
// PayloadType defines the type of the payload.
PayloadType iotago.PayloadType `json:"payloadType"`
// Payload is the content of the payload.
Payload json.RawMessage `json:"payload"`
TransactionID string `json:"txId,omitempty"`
// Structure details
Rank uint64 `json:"rank"`
PastMarkerGap uint64 `json:"pastMarkerGap"`
IsPastMarker bool `json:"isPastMarker"`
PastMarkers string `json:"pastMarkers"`
// Slot commitment
CommitmentID string `json:"commitmentID"`
Commitment CommitmentResponse `json:"commitment"`
LatestConfirmedSlot uint64 `json:"latestConfirmedSlot"`
}
ExplorerBlock defines the struct of the ExplorerBlock.
type ExplorerOutput ¶
type ExplorerOutput struct {
ID iotago.OutputIDHex `json:"id"`
Output iotago.Output `json:"output"`
// Metadata *jsonmodels.OutputMetadata `json:"metadata"`
TxTimestamp int `json:"txTimestamp"`
}
ExplorerOutput defines the struct of the ExplorerOutput.
type Input ¶
type Input struct {
Type string `json:"type"`
ReferencedOutputID *OutputID `json:"referencedOutputID,omitempty"`
// the referenced output object, omit if not specified
Output *Output `json:"output,omitempty"`
}
Input represents the JSON model of a iotago.Input.
type Output ¶
type Output struct {
OutputID *OutputID `json:"outputID,omitempty"`
Type iotago.OutputType `json:"type"`
Output json.RawMessage `json:"output"`
}
Output represents the JSON model of a ledgerstate.Output.
func NewOutputFromLedgerstateOutput ¶
func NewOutputFromLedgerstateOutput(output *utxoledger.Output) (result *Output)
NewOutput returns an Output from the given ledgerstate.Output.
type OutputID ¶
type OutputID struct {
Hex string `json:"hex"`
TransactionID string `json:"transactionID"`
OutputIndex uint16 `json:"outputIndex"`
}
OutputID represents the JSON model of a ledgerstate.OutputID.
func NewOutputID ¶
NewOutputID returns an OutputID from the given ledgerstate.OutputID.
type ParametersDashboard ¶
type ParametersDashboard struct {
// Enabled defines whether the dashboard plugin is enabled.
Enabled bool `default:"true" usage:"whether the dashboard plugin is enabled"`
// BindAddress defines the config flag of the dashboard binding address.
BindAddress string `default:"0.0.0.0:8081" usage:"the bind address of the dashboard"`
BasicAuth struct {
// Enabled defines the config flag of the dashboard basic auth enabler.
Enabled bool `default:"false" usage:"whether to enable HTTP basic auth"`
// Username defines the config flag of the dashboard basic auth username.
Username string `default:"core" usage:"HTTP basic auth username"`
// Password defines the config flag of the dashboard basic auth password.
Password string `default:"core" usage:"HTTP basic auth password"`
}
// Conflicts defines the config flag for the configs tab of the dashboard.
Conflicts struct {
// MaxCount defines the max number of conflicts stored on the dashboard.
MaxCount int `default:"100" usage:"max number of conflicts stored on the dashboard"`
}
}
ParametersDashboard contains the definition of configuration parameters used by the dashboard plugin.
type SearchResult ¶
type SearchResult struct {
// Block is the *ExplorerBlock.
Block *ExplorerBlock `json:"block"`
// Address is the *ExplorerAddress.
Address *ExplorerAddress `json:"address"`
}
SearchResult defines the struct of the SearchResult.
type SlotDetailsResponse ¶
type SlotDetailsResponse struct {
Index uint64 `json:"index"`
PrevID string `json:"prevID"`
RootsID string `json:"rootsID"`
CumulativeWeight uint64 `json:"cumulativeWeight"`
CreatedOutputs []string `json:"createdOutputs"`
SpentOutputs []string `json:"spentOutputs"`
}
func NewSlotDetails ¶
func NewSlotDetails(commitment *model.Commitment, diffs *utxoledger.SlotDiff) *SlotDetailsResponse
type TipsResponse ¶
type TipsResponse struct {
Tips []string `json:"tips"`
}
type Transaction ¶
type Transaction struct {
TransactionID string `json:"txId"`
NetworkID iotago.NetworkID `json:"networkId"`
CreationSlot iotago.SlotIndex `json:"creationSlot"`
Inputs []*Input `json:"inputs"`
Outputs []*Output `json:"outputs"`
Unlocks []*UnlockBlock `json:"unlocks"`
Payload []byte `json:"payload"`
}
Transaction represents the JSON model of a iotago.SignedTransaction.
func NewTransaction ¶
func NewTransaction(signedTx *iotago.SignedTransaction) *Transaction
NewTransaction returns a Transaction from the given iotago.SignedTransaction.
type TransactionMetadata ¶
type TransactionMetadata struct {
TransactionID string `json:"transactionID"`
SpendIDs []string `json:"spendIDs"`
Booked bool `json:"booked"`
BookedTime int64 `json:"bookedTime"`
ConfirmationState string `json:"confirmationState"`
ConfirmationStateTime int64 `json:"confirmationStateTime"`
}
TransactionMetadata represents the JSON model of the mempool.TransactionMetadata.
func NewTransactionMetadata ¶
func NewTransactionMetadata(transactionMetadata mempool.TransactionMetadata, conflicts ds.Set[iotago.TransactionID]) *TransactionMetadata
NewTransactionMetadata returns the TransactionMetadata from the given mempool.TransactionMetadata.
type UnlockBlock ¶
type UnlockBlock struct {
Type string `json:"type"`
SignatureType iotago.SignatureType `json:"signatureType,omitempty"`
Signature json.RawMessage `json:"signature,omitempty"`
}
UnlockBlock represents the JSON model of a iotago.UnlockBlock.
func NewUnlockBlock ¶
func NewUnlockBlock(unlockBlock iotago.Unlock) *UnlockBlock
NewUnlockBlock returns an UnlockBlock from the given UnlockBlock.