api

package
v0.0.0-...-fad8960 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(ctx context.Context, client *http.Client) *Client

func (*Client) GetBundleInfo

func (api *Client) GetBundleInfo(bundleID string) (*GetBundleInfoResponse, error)

GetBundleInfo returns information associated with a bundle ID.

func (*Client) GetLargestBundlesBySigner

func (api *Client) GetLargestBundlesBySigner() error

func (*Client) RetrieveBundleIDfromTransactionSignature

func (api *Client) RetrieveBundleIDfromTransactionSignature(signature string) (string, error)

RetrieveBundleIDfromTransactionSignature returns the bundleID associated with the transaction signature provided, if existing.

func (*Client) RetrieveRecentBundles

func (api *Client) RetrieveRecentBundles(limit int, timeFrame Timeframe) (*RecentBundlesResponse, error)

RetrieveRecentBundles fetches a list of recent bundles from the Jito API within a specified timeframe and limit.

type GetBundleInfoResponse

type GetBundleInfoResponse struct {
	BundleId          string    `json:"bundleId"`
	Slot              int       `json:"slot"`
	Validator         string    `json:"validator"`
	Tippers           []string  `json:"tippers"`
	LandedTipLamports int64     `json:"landedTipLamports"`
	LandedCu          int       `json:"landedCu"`
	BlockIndex        int       `json:"blockIndex"`
	Timestamp         time.Time `json:"timestamp"`
	TxSignatures      []string  `json:"txSignatures"`
}

type RecentBundlesResponse

type RecentBundlesResponse []struct {
	BundleId          string    `json:"bundleId"`
	Timestamp         time.Time `json:"timestamp"`
	Tippers           []string  `json:"tippers"`
	Transactions      []string  `json:"transactions"`
	LandedTipLamports int       `json:"landedTipLamports"`
}

type Sort

type Sort string
var (
	Time Sort = "Time"
	Tip  Sort = "Tip"
)

type Timeframe

type Timeframe string
var (
	Week  Timeframe = "Week"
	Day   Timeframe = "Day"
	Month Timeframe = "Month"
	Year  Timeframe = "Year"
)

Jump to

Keyboard shortcuts

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