Documentation ¶
Index ¶
- func BatchExtractSigFromTx(txns []*solana.Transaction) []solana.Signature
- func BuildTransactionLinks(txns []solana.Signature, platform Platform) []string
- func ConvertBatchProtobufPacketToTransaction(packets []*proto.Packet) ([]*solana.Transaction, error)
- func ConvertBatchTransactionToProtobufPacket(transactions []*solana.Transaction) ([]*proto.Packet, error)
- func ConvertProtobufPacketToTransaction(packet *proto.Packet) (*solana.Transaction, error)
- func ConvertTransactionToProtobufPacket(transaction *solana.Transaction) (proto.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)
- 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 ¶
func ConvertBatchProtobufPacketToTransaction ¶
func ConvertBatchProtobufPacketToTransaction(packets []*proto.Packet) ([]*solana.Transaction, error)
ConvertBatchProtobufPacketToTransaction converts a slice of proto.Packet to a slice of solana-go Transaction.
func ConvertBatchTransactionToProtobufPacket ¶
func ConvertBatchTransactionToProtobufPacket(transactions []*solana.Transaction) ([]*proto.Packet, error)
ConvertBatchTransactionToProtobufPacket converts a slice of solana-go Transaction to a slice of proto.Packet.
func ConvertProtobufPacketToTransaction ¶
ConvertProtobufPacketToTransaction converts a proto.Packet to a solana-go Transaction.
func ConvertTransactionToProtobufPacket ¶
ConvertTransactionToProtobufPacket converts a solana-go Transaction to a proto.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 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 proto.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 proto.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"` }