Versions in this module Expand all Collapse all v0 v0.1.0 Oct 1, 2026 Changes in this version + const DefaultComputeUnitPriceMicroLamports + const MaxAdmissionFrame + const MaxTransactionSize + const MinTipLamports + const QUICPort + const RPCPort + var AllRegions = [...]Region + var ErrBadAdmission = errors.New("apex: malformed admission response") + var ErrBind = errors.New("apex: bind local socket") + var ErrClientStopped = errors.New("apex: client closed") + var ErrClosed = errors.New("apex: closed") + var ErrConnect = errors.New("apex: connect") + var ErrConnection = errors.New("apex: connection") + var ErrNoSignature = errors.New("apex: transaction has no signature") + var ErrRead = errors.New("apex: read") + var ErrResolve = errors.New("apex: resolve endpoint") + var ErrSerialize = errors.New("apex: serialize transaction") + var ErrTLS = errors.New("apex: tls config") + var ErrTimeout = errors.New("apex: timed out") + var ErrWrite = errors.New("apex: write") + func ClientPubkey(apiKey string) solana.PublicKey + func EncodePacket(wire []byte, mevProtect bool, maxRetries *uint16) []byte + func FrameParts(length int, mevProtect bool, maxRetries *uint16) ([8]byte, []byte) + func PickTipAccount(tipAccounts []solana.PublicKey) (solana.PublicKey, bool) + func RetryBudget(n uint16) *uint16 + func SerializeTransaction(tx *solana.Transaction) ([]byte, error) + func TipInstruction(payer, tipAccount solana.PublicKey, lamports uint64) solana.Instruction + type Admission struct + Accepted bool + Code AdmissionCode + Message string + Signature solana.Signature + func DecodeAdmission(frame []byte) (Admission, bool) + type AdmissionCode uint8 + const AdmissionBelowFloor + const AdmissionBusy + const AdmissionInvalid + const AdmissionMalformedPacket + const AdmissionNoTip + const AdmissionOK + const AdmissionRateLimited + const AdmissionUnauthorized + const AdmissionUnknown + func AdmissionCodeFromByte(b byte) AdmissionCode + func (c AdmissionCode) String() string + type Client struct + func Connect(ctx context.Context, region Region, apiKey string) (*Client, error) + func ConnectWithOptions(ctx context.Context, opts Options, apiKey string) (*Client, error) + func (c *Client) Close() error + func (c *Client) Health() ConnectionHealth + func (c *Client) Options() Options + func (c *Client) Reconnect(ctx context.Context) error + func (c *Client) ReconnectsTotal() uint64 + func (c *Client) RemoteAddr() netip.AddrPort + func (c *Client) SendTransaction(ctx context.Context, tx *solana.Transaction) (solana.Signature, error) + func (c *Client) SendTransactionBytes(ctx context.Context, wire []byte) error + func (c *Client) SendTransactionWithResponse(ctx context.Context, tx *solana.Transaction) (solana.Signature, error) + func (c *Client) SendWithResponse(ctx context.Context, wire []byte) (Admission, error) + func (c *Client) ZeroRTTResumptionsTotal() uint64 + type ConnectionHealth int + const Closed + const Healthy + func (h ConnectionHealth) String() string + type Options struct + BindAddr string + ConnectTimeout time.Duration + DisableAutoReconnect bool + DisableProactiveReconnect bool + Endpoint string + KeepAlive time.Duration + MEVProtect bool + MaxRetries *uint16 + SendTimeout time.Duration + func DefaultOptions() Options + type Region int + const Amsterdam + const Dublin + const Frankfurt + const Global + const London + const NewYork + const SaltLakeCity + const Siauliai + const Singapore + const Tokyo + func ParseRegion(s string) (Region, bool) + func (r Region) Code() string + func (r Region) Host() string + func (r Region) QUICEndpoint() string + func (r Region) RPCURL() string + func (r Region) String() string + type RejectedError struct + Code AdmissionCode + Message string + func (e *RejectedError) Error() string + type TooLargeError struct + Size int + func (e *TooLargeError) Error() string