requesthandler

package
v1.0.0-alpha.24 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithCacheMaxSizeOptions

func WithCacheMaxSizeOptions(size int) options.Option[RequestHandler]

Types

type RequestHandler

type RequestHandler struct {
	// contains filtered or unexported fields
}

RequestHandler contains the logic to handle api requests.

func (*RequestHandler) APIProvider

func (r *RequestHandler) APIProvider() iotago.APIProvider

func (*RequestHandler) BlockFromBlockID

func (r *RequestHandler) BlockFromBlockID(blockID iotago.BlockID) (*iotago.Block, error)

func (*RequestHandler) BlockFromTransactionID

func (r *RequestHandler) BlockFromTransactionID(transactionID iotago.TransactionID) (*iotago.Block, error)

func (*RequestHandler) BlockIDFromTransactionID

func (r *RequestHandler) BlockIDFromTransactionID(transactionID iotago.TransactionID) (iotago.BlockID, error)

func (*RequestHandler) BlockIssuance

func (r *RequestHandler) BlockIssuance() (*api.IssuanceBlockHeaderResponse, error)

func (*RequestHandler) BlockMetadataFromBlockID

func (r *RequestHandler) BlockMetadataFromBlockID(blockID iotago.BlockID) (*api.BlockMetadataResponse, error)

func (*RequestHandler) BlockMetadataFromTransactionID

func (r *RequestHandler) BlockMetadataFromTransactionID(txID iotago.TransactionID) (*api.BlockMetadataResponse, error)

func (*RequestHandler) BlockWithMetadataFromBlockID

func (r *RequestHandler) BlockWithMetadataFromBlockID(blockID iotago.BlockID) (*api.BlockWithMetadataResponse, error)

func (*RequestHandler) CommittedAPI

func (r *RequestHandler) CommittedAPI() iotago.API

func (*RequestHandler) CongestionByAccountAddress

func (r *RequestHandler) CongestionByAccountAddress(accountAddress *iotago.AccountAddress, workScore iotago.WorkScore, commitmentID iotago.CommitmentID) (*api.CongestionResponse, error)

func (*RequestHandler) GetCommitmentByID

func (r *RequestHandler) GetCommitmentByID(commitmentID iotago.CommitmentID) (*model.Commitment, error)

GetCommitmentByID returns the commitment for the given commitmentID. If commitmentID is empty, the latest commitment is returned.

func (*RequestHandler) GetCommitmentBySlot

func (r *RequestHandler) GetCommitmentBySlot(slot iotago.SlotIndex) (*model.Commitment, error)

func (*RequestHandler) GetLatestCommitment

func (r *RequestHandler) GetLatestCommitment() *model.Commitment

func (*RequestHandler) GetNodeStatus

func (r *RequestHandler) GetNodeStatus() *api.InfoResNodeStatus

func (*RequestHandler) GetProtocolParameters

func (r *RequestHandler) GetProtocolParameters() []*api.InfoResProtocolParameters

func (*RequestHandler) GetUTXOChangesByCommitmentID

func (r *RequestHandler) GetUTXOChangesByCommitmentID(commitmentID iotago.CommitmentID) (*api.UTXOChangesResponse, error)

GetUTXOChangesByCommitmentID returns the UTXO changes for the given commitmentID. If commitmentID is empty, the latest commitment is used.

func (*RequestHandler) GetUTXOChangesBySlot

func (r *RequestHandler) GetUTXOChangesBySlot(slot iotago.SlotIndex) (*api.UTXOChangesResponse, error)

GetUTXOChangesBySlot returns the UTXO changes for the given slot.

func (*RequestHandler) GetUTXOChangesFullByCommitmentID

func (r *RequestHandler) GetUTXOChangesFullByCommitmentID(commitmentID iotago.CommitmentID) (*api.UTXOChangesFullResponse, error)

GetUTXOChangesFullByCommitmentID returns the UTXO changes for the given commitmentID. If commitmentID is empty, the latest commitment is used.

func (*RequestHandler) GetUTXOChangesFullBySlot

func (r *RequestHandler) GetUTXOChangesFullBySlot(slot iotago.SlotIndex) (*api.UTXOChangesFullResponse, error)

GetUTXOChangesFullBySlot returns the UTXO changes for the given slot.

func (*RequestHandler) IsNetworkHealthy

func (r *RequestHandler) IsNetworkHealthy() bool

func (*RequestHandler) IsNodeSynced

func (r *RequestHandler) IsNodeSynced() bool

func (*RequestHandler) LatestAPI

func (r *RequestHandler) LatestAPI() iotago.API

func (*RequestHandler) ModelBlockFromBlockID

func (r *RequestHandler) ModelBlockFromBlockID(blockID iotago.BlockID) (*model.Block, error)

func (*RequestHandler) OutputFromOutputID

func (r *RequestHandler) OutputFromOutputID(outputID iotago.OutputID) (*api.OutputResponse, error)

func (*RequestHandler) OutputMetadataFromOutputID

func (r *RequestHandler) OutputMetadataFromOutputID(outputID iotago.OutputID) (*api.OutputMetadata, error)

func (*RequestHandler) OutputWithMetadataFromOutputID

func (r *RequestHandler) OutputWithMetadataFromOutputID(outputID iotago.OutputID) (*api.OutputWithMetadataResponse, error)

func (*RequestHandler) RewardsByOutputID

func (r *RequestHandler) RewardsByOutputID(outputID iotago.OutputID, optSlot ...iotago.SlotIndex) (*api.ManaRewardsResponse, error)

func (*RequestHandler) SelectedCommittee

func (r *RequestHandler) SelectedCommittee(epoch iotago.EpochIndex) (*api.CommitteeResponse, error)

func (*RequestHandler) Shutdown

func (r *RequestHandler) Shutdown()

Shutdown shuts down the block issuer.

func (*RequestHandler) SubmitBlockAndAwaitRetainer

func (r *RequestHandler) SubmitBlockAndAwaitRetainer(ctx context.Context, iotaBlock *iotago.Block) (iotago.BlockID, error)

func (*RequestHandler) SubmitBlockWithoutAwaitingBooking

func (r *RequestHandler) SubmitBlockWithoutAwaitingBooking(block *model.Block) error

SubmitBlockWithoutAwaitingBooking submits a block to be processed.

func (*RequestHandler) TransactionMetadataFromTransactionID

func (r *RequestHandler) TransactionMetadataFromTransactionID(txID iotago.TransactionID) (*api.TransactionMetadataResponse, error)

func (*RequestHandler) ValidatorByAccountAddress

func (r *RequestHandler) ValidatorByAccountAddress(accountAddress *iotago.AccountAddress) (*api.ValidatorResponse, error)

func (*RequestHandler) Validators

func (r *RequestHandler) Validators(epochIndex iotago.EpochIndex, cursorIndex, pageSize uint32) (*api.ValidatorsResponse, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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