Documentation ¶
Index ¶
- func BatchExtractSigFromTx(txns []*solana.Transaction) []solana.Signature
- func BuildTransactionLinks(txns []solana.Signature, platform Platform) []string
- func ConvertBachTransactionsToBase58(transactions []*solana.Transaction) ([]string, error)
- func ConvertBachTransactionsToString(transactions []*solana.Transaction) []string
- func ConvertBatchProtobufPacketToTransaction(packets []*jito_pb.Packet) ([]*solana.Transaction, error)
- func ConvertBatchTransactionToProtobufPacket(transactions []*solana.Transaction) ([]*jito_pb.Packet, error)
- func ConvertProtobufPacketToTransaction(packet *jito_pb.Packet) (*solana.Transaction, error)
- func ConvertTransactionToProtobufPacket(transaction *solana.Transaction) (jito_pb.Packet, error)
- func CreateAndObserveGRPCConn(ctx context.Context, chErr chan error, target string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
- func ExtractSigFromTx(tx *solana.Transaction) solana.Signature
- func LamportsToSol(lamports *big.Float) *big.Float
- func StrSliceToByteSlice(s []string) [][]byte
- func SubscribeTipStream(ctx context.Context) (<-chan []*TipStreamInfo, <-chan error, error)
- func TxToStr(txns []*solana.Transaction) []string
- type AuthenticationService
- type Keypair
- type Platform
- type TipStreamInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchExtractSigFromTx ¶
func BatchExtractSigFromTx(txns []*solana.Transaction) []solana.Signature
func BuildTransactionLinks ¶
BuildTransactionLinks generates a list of URLs for the provided transactions, linking each transaction signature to the appropriate blockchain explorer based on the platform.
func ConvertBachTransactionsToBase58 ¶
ConvertBachTransactionsToBase58 converts a slice of solana.Transaction to a base58 string encoded transaction.
func ConvertBachTransactionsToString ¶
func ConvertBachTransactionsToString(transactions []*solana.Transaction) []string
func ConvertBatchProtobufPacketToTransaction ¶
func ConvertBatchProtobufPacketToTransaction(packets []*jito_pb.Packet) ([]*solana.Transaction, error)
ConvertBatchProtobufPacketToTransaction converts a slice of pb.Packet to a slice of solana-go Transaction.
func ConvertBatchTransactionToProtobufPacket ¶
func ConvertBatchTransactionToProtobufPacket(transactions []*solana.Transaction) ([]*jito_pb.Packet, error)
ConvertBatchTransactionToProtobufPacket converts a slice of solana-go Transaction to a slice of pb.Packet.
func ConvertProtobufPacketToTransaction ¶
func ConvertProtobufPacketToTransaction(packet *jito_pb.Packet) (*solana.Transaction, error)
ConvertProtobufPacketToTransaction converts a pb.Packet to a solana-go Transaction.
func ConvertTransactionToProtobufPacket ¶
func ConvertTransactionToProtobufPacket(transaction *solana.Transaction) (jito_pb.Packet, error)
ConvertTransactionToProtobufPacket converts a solana-go Transaction to a pb.Packet.
func CreateAndObserveGRPCConn ¶
func CreateAndObserveGRPCConn(ctx context.Context, chErr chan error, target string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
CreateAndObserveGRPCConn creates a new gRPC connection and observes its conn status.
func ExtractSigFromTx ¶
func ExtractSigFromTx(tx *solana.Transaction) solana.Signature
ExtractSigFromTx extracts the transaction's signature.
func LamportsToSol ¶
LamportsToSol converts the given amount of lamports to SOL by dividing by the number of lamports per SOL.
func StrSliceToByteSlice ¶
StrSliceToByteSlice converts a string array to a byte array.
func SubscribeTipStream ¶
func SubscribeTipStream(ctx context.Context) (<-chan []*TipStreamInfo, <-chan error, error)
SubscribeTipStream establishes a connection to the Jito websocket and receives TipStreamInfo.
Types ¶
type AuthenticationService ¶
type AuthenticationService struct { AuthService jito_pb.AuthServiceClient GrpcCtx context.Context KeyPair *Keypair BearerToken string ExpiresAt int64 // seconds ErrChan chan error // contains filtered or unexported fields }
func NewAuthenticationService ¶
func NewAuthenticationService(grpcConn *grpc.ClientConn, privateKey solana.PrivateKey) *AuthenticationService
func (*AuthenticationService) AuthenticateAndRefresh ¶
func (as *AuthenticationService) AuthenticateAndRefresh(role jito_pb.Role) error
AuthenticateAndRefresh is a function that authenticates the client and refreshes the access token.
type Keypair ¶
type Keypair struct { PublicKey solana.PublicKey PrivateKey solana.PrivateKey }
func GenerateKeypair ¶
func GenerateKeypair() *Keypair
GenerateKeypair creates a new Solana Keypair.
func NewKeyPair ¶
func NewKeyPair(privateKey solana.PrivateKey) *Keypair
NewKeyPair creates a Keypair from a private key.
type TipStreamInfo ¶
type TipStreamInfo struct { Time time.Time `json:"time"` LandedTips25ThPercentile float64 `json:"landed_tips_25th_percentile"` LandedTips50ThPercentile float64 `json:"landed_tips_50th_percentile"` LandedTips75ThPercentile float64 `json:"landed_tips_75th_percentile"` LandedTips95ThPercentile float64 `json:"landed_tips_95th_percentile"` LandedTips99ThPercentile float64 `json:"landed_tips_99th_percentile"` EmaLandedTips50ThPercentile float64 `json:"ema_landed_tips_50th_percentile"` }