utils

package
v1.9.7 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: MIT Imports: 6 Imported by: 7

Documentation

Index

Constants

View Source
const (
	// BloxrouteTipAddress is from here and may fall out of date from time to time. Check our docs:
	// https://docs.bloxroute.com/solana/trader-api-v2/front-running-protection-and-transaction-bundle
	BloxrouteTipAddress = "HWEoBxYs7ssKuudEjzjmpfJVX7Dvi7wescFsVx2L5yoY"
)

Variables

This section is empty.

Functions

func ConvertJupiterInstructions added in v1.9.5

func ConvertJupiterInstructions(instructions []*pb.InstructionJupiter) ([]solana.Instruction, error)

func ConvertProtoAddressLookupTable added in v1.9.5

func ConvertProtoAddressLookupTable(addressLookupTableProto map[string]*pb.PublicKeys) (map[solana.PublicKey]solana.PublicKeySlice, error)

func ConvertRaydiumInstructions added in v1.9.5

func ConvertRaydiumInstructions(instructions []*pb.InstructionRaydium) ([]solana.Instruction, error)

func CreateBloxrouteTipTransactionToUseBundles added in v1.9.3

func CreateBloxrouteTipTransactionToUseBundles(privateKey solana.PrivateKey, tipAmount uint64, recentBlockHash solana.Hash) (*solana.Transaction, error)

CreateBloxrouteTipTransactionToUseBundles creates a transaction you can use to when using PostSubmitBundle endpoints. This transaction should be the LAST transaction in your submission bundle

func InitLogger

func InitLogger()

Types

type LockedMap added in v1.9.5

type LockedMap[T comparable, V any] struct {
	// contains filtered or unexported fields
}

func NewLockedMap added in v1.9.5

func NewLockedMap[T comparable, V any]() *LockedMap[T, V]

func (*LockedMap[T, V]) Copy added in v1.9.5

func (fs *LockedMap[T, V]) Copy() map[T]V

func (*LockedMap[T, V]) Delete added in v1.9.5

func (fs *LockedMap[T, V]) Delete(key T)

func (*LockedMap[T, V]) DeleteAll added in v1.9.5

func (fs *LockedMap[T, V]) DeleteAll()

func (*LockedMap[T, V]) DeleteWithCondition added in v1.9.5

func (fs *LockedMap[T, V]) DeleteWithCondition(cond func(V) bool)

func (*LockedMap[T, V]) ExistOrAdd added in v1.9.5

func (fs *LockedMap[T, V]) ExistOrAdd(key T, value V) (exists bool)

func (*LockedMap[T, V]) Get added in v1.9.5

func (fs *LockedMap[T, V]) Get(key T) (V, bool)

func (*LockedMap[T, V]) GetOrInsert added in v1.9.5

func (fs *LockedMap[T, V]) GetOrInsert(key T, f func() V) (out V)

GetOrInsert inserts the entry if the key doesn't exist

func (*LockedMap[T, V]) Keys added in v1.9.5

func (fs *LockedMap[T, V]) Keys() []T

func (*LockedMap[T, V]) Len added in v1.9.5

func (fs *LockedMap[T, V]) Len() int

func (*LockedMap[T, V]) Set added in v1.9.5

func (fs *LockedMap[T, V]) Set(key T, v V)

func (*LockedMap[T, V]) Update added in v1.9.5

func (fs *LockedMap[T, V]) Update(key T, update func(value V, exists bool) V) (val V)

func (*LockedMap[T, V]) Values added in v1.9.5

func (fs *LockedMap[T, V]) Values() []V

type RequestID

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

func NewRequestID

func NewRequestID() *RequestID

func (*RequestID) Current

func (r *RequestID) Current() uint64

func (*RequestID) Next

func (r *RequestID) Next() uint64

Jump to

Keyboard shortcuts

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