helpers

package
v0.1.5 Latest Latest
Warning

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

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

Documentation

Overview

Package helpers provides pure-logic decoders and statistics used by the client package. It holds no RPC calls and no I/O — only data transforms on wire shapes (DecodeTransactionError) and summary statistics (PriorityFeeStatsFromFees).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PriorityFeeStats

type PriorityFeeStats struct {
	// P50 is the median observed prioritization fee.
	P50 uint64
	// P75 is the 75th percentile observed prioritization fee.
	P75 uint64
	// P95 is the 95th percentile observed prioritization fee.
	P95 uint64
	// Max is the highest observed prioritization fee.
	Max uint64
	// Samples is the number of slots that contributed to the statistics.
	// A low Samples count means the percentiles are based on sparse data
	// and should be treated as advisory.
	Samples int
}

PriorityFeeStats summarises a window of recent prioritization fees as ordered percentiles. Values are in micro-lamports per compute unit, matching the units getRecentPrioritizationFees returns.

func PriorityFeeStatsFromFees

func PriorityFeeStatsFromFees(fees []rpc.PrioritizationFee) *PriorityFeeStats

PriorityFeeStatsFromFees computes ordered-percentile statistics from a pre-fetched slice of fees (typically from Client.GetRecentPrioritizationFees).

The input slice is not mutated.

Jump to

Keyboard shortcuts

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