Documentation ¶
Index ¶
- func WithCacheMaxSizeOptions(size int) options.Option[RequestHandler]
- type RequestHandler
- func (r *RequestHandler) APIProvider() iotago.APIProvider
- func (r *RequestHandler) BlockFromBlockID(blockID iotago.BlockID) (*iotago.Block, error)
- func (r *RequestHandler) BlockFromTransactionID(transactionID iotago.TransactionID) (*iotago.Block, error)
- func (r *RequestHandler) BlockIDFromTransactionID(transactionID iotago.TransactionID) (iotago.BlockID, error)
- func (r *RequestHandler) BlockIssuance() (*api.IssuanceBlockHeaderResponse, error)
- func (r *RequestHandler) BlockMetadataFromBlockID(blockID iotago.BlockID) (*api.BlockMetadataResponse, error)
- func (r *RequestHandler) BlockMetadataFromTransactionID(txID iotago.TransactionID) (*api.BlockMetadataResponse, error)
- func (r *RequestHandler) BlockWithMetadataFromBlockID(blockID iotago.BlockID) (*api.BlockWithMetadataResponse, error)
- func (r *RequestHandler) CommittedAPI() iotago.API
- func (r *RequestHandler) CongestionByAccountAddress(accountAddress *iotago.AccountAddress, workScore iotago.WorkScore, ...) (*api.CongestionResponse, error)
- func (r *RequestHandler) GetCommitmentByID(commitmentID iotago.CommitmentID) (*model.Commitment, error)
- func (r *RequestHandler) GetCommitmentBySlot(slot iotago.SlotIndex) (*model.Commitment, error)
- func (r *RequestHandler) GetLatestCommitment() *model.Commitment
- func (r *RequestHandler) GetNodeStatus() *api.InfoResNodeStatus
- func (r *RequestHandler) GetProtocolParameters() []*api.InfoResProtocolParameters
- func (r *RequestHandler) GetUTXOChangesByCommitmentID(commitmentID iotago.CommitmentID) (*api.UTXOChangesResponse, error)
- func (r *RequestHandler) GetUTXOChangesBySlot(slot iotago.SlotIndex) (*api.UTXOChangesResponse, error)
- func (r *RequestHandler) GetUTXOChangesFullByCommitmentID(commitmentID iotago.CommitmentID) (*api.UTXOChangesFullResponse, error)
- func (r *RequestHandler) GetUTXOChangesFullBySlot(slot iotago.SlotIndex) (*api.UTXOChangesFullResponse, error)
- func (r *RequestHandler) IsNetworkHealthy() bool
- func (r *RequestHandler) IsNodeSynced() bool
- func (r *RequestHandler) LatestAPI() iotago.API
- func (r *RequestHandler) ModelBlockFromBlockID(blockID iotago.BlockID) (*model.Block, error)
- func (r *RequestHandler) OutputFromOutputID(outputID iotago.OutputID) (*api.OutputResponse, error)
- func (r *RequestHandler) OutputMetadataFromOutputID(outputID iotago.OutputID) (*api.OutputMetadata, error)
- func (r *RequestHandler) OutputWithMetadataFromOutputID(outputID iotago.OutputID) (*api.OutputWithMetadataResponse, error)
- func (r *RequestHandler) RewardsByOutputID(outputID iotago.OutputID, optSlot ...iotago.SlotIndex) (*api.ManaRewardsResponse, error)
- func (r *RequestHandler) SelectedCommittee(epoch iotago.EpochIndex) (*api.CommitteeResponse, error)
- func (r *RequestHandler) Shutdown()
- func (r *RequestHandler) SubmitBlockAndAwaitRetainer(ctx context.Context, iotaBlock *iotago.Block) (iotago.BlockID, error)
- func (r *RequestHandler) SubmitBlockWithoutAwaitingBooking(block *model.Block) error
- func (r *RequestHandler) TransactionMetadataFromTransactionID(txID iotago.TransactionID) (*api.TransactionMetadataResponse, error)
- func (r *RequestHandler) ValidatorByAccountAddress(accountAddress *iotago.AccountAddress) (*api.ValidatorResponse, error)
- func (r *RequestHandler) Validators(epochIndex iotago.EpochIndex, cursorIndex, pageSize uint32) (*api.ValidatorsResponse, error)
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 New ¶
func New(p *protocol.Protocol, opts ...options.Option[RequestHandler]) *RequestHandler
func (*RequestHandler) APIProvider ¶
func (r *RequestHandler) APIProvider() iotago.APIProvider
func (*RequestHandler) BlockFromBlockID ¶
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 (*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 (*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)