Versions in this module Expand all Collapse all v0 v0.1.1 Aug 15, 2026 v0.1.0 Aug 15, 2026 Changes in this version + const AckTimeout + const DGHeartbeat + const DGHeartbeatMin + const DGSigFirst + const DGSigFirstMin + const FlagAltIncomplete + const MaxFullTxBody + const MsgHeartbeat + const MsgShed + const MsgTx + const NoSeqAssigned + const Preamble + const PreambleTimeout + const SigQueueLen + const TLVHighestSeq + const TLVLoadedReadonly + const TLVLoadedWritable + const TLVServerTsMs + const WireVersion + var ErrAlreadySubscribed = errors.New("pulseclient: this connection already has an initial subscription") + var ErrBadFrame = errors.New("pulseclient: malformed full-tx frame") + var ErrBadPreamble = errors.New("pulseclient: bad stream preamble: this server is not speaking pulse wire v2") + var ErrConflictingTLSOptions = errors.New(...) + var ErrInsecureTLSNonLoopback = errors.New("pulseclient: insecure local-development TLS requires a loopback target") + var ErrInvalidQueueCapacity = errors.New("pulseclient: sig-first queue capacity must be greater than zero") + var ErrInvalidSPKIPin = errors.New("pulseclient: SPKI SHA-256 pin must be exactly 32 bytes") + var ErrInvalidTimeout = errors.New("pulseclient: timeout must be greater than zero") + var ErrMissingNegotiatedVersion = errors.New("pulseclient: initial acknowledgement omitted the negotiated wire version") + var ErrNilRootCAs = errors.New("pulseclient: root CA pool must not be nil") + func ComputeBudgetProgramID() [32]byte + func ComputeUnitLimit(tx *FullTx) (limit uint32, ok bool) + func ComputeUnitPrice(tx *FullTx) (price uint64, ok bool) + func EncodeDGHeartbeat(buf []byte, serverTsMs, highestSeq uint64) + func EncodeDGSigFirst(buf []byte, slot, seq uint64, sig *[64]byte) + func EncodeFrameTx(ft *FullTx, altIncomplete bool, loadedWritable, loadedReadonly [][32]byte) []byte + func EncodeFullTx(ft *FullTx) []byte + func FeePayer(tx *FullTx) (feePayer [32]byte, ok bool) + func ProgramIDs(tx *FullTx) [][32]byte + func StaticWritableAccounts(tx *FullTx) [][32]byte + type Ack struct + Code *ApplicationCloseCode + OK bool + Reason string + Type string + V *int + type AddressTableLookup struct + AccountKey [32]byte + ReadonlyIndexes []byte + WritableIndexes []byte + type ApplicationCloseCode uint64 + const CloseInvalidControl + const CloseNormal + const CloseQuotaExceeded + const CloseTierNotEntitled + const CloseUnauthenticated + const CloseUnsupportedVersion + type Client struct + func Connect(ctx context.Context, addr string, options ...Option) (*Client, error) + func ConnectWithToken(ctx context.Context, addr string, token string, options ...Option) (*Client, error) + func (c *Client) Close() error + func (c *Client) SubscribeFull(ctx context.Context, f Filter, fields ...string) (*FullSub, error) + func (c *Client) SubscribeSigFirst(ctx context.Context, f Filter) (*SigFirstSub, error) + type CloseInfo struct + Code ApplicationCloseCode + Reason string + Remote bool + Retry RetryClass + func CloseInfoFromError(err error) (CloseInfo, bool) + func (c CloseInfo) NeedsCredentialChange() bool + func (c CloseInfo) Retryable() bool + type Datagram interface + func DecodeDatagram(src []byte) (Datagram, error) + type DatagramHeartbeat struct + HighestSeq uint64 + ServerTsMs uint64 + type Filter struct + AccountExclude []string + AccountInclude []string + AccountRequired []string + Vote *bool + func Accounts(keys ...string) Filter + func AllNonVoteTxs() Filter + func (f Filter) WithVote(isVote bool) Filter + type Frame interface + func DecodeFrame(src []byte) (Frame, error) + type FrameHeartbeat struct + HighestSeq uint64 + ServerTsMs uint64 + type FullSub struct + func (s *FullSub) Heartbeat() (serverTsMs, highestSeq uint64, ok bool) + func (s *FullSub) Next() (*FullTxV2, error) + func (s *FullSub) UpdateFilter(ctx context.Context, f Filter, fields ...string) (*Ack, error) + type FullTx struct + AccountKeys [][32]byte + AddressTableLookups []AddressTableLookup + Instructions []Instruction + NumReadonlySignedAccounts uint32 + NumReadonlyUnsignedAccount uint32 + NumRequiredSignatures uint32 + RecentBlockhash [32]byte + Signatures [][64]byte + Slot uint64 + Versioned bool + func DecodeFullTx(b []byte) (*FullTx, error) + type FullTxV2 struct + AltIncomplete bool + LoadedReadonly [][32]byte + LoadedWritable [][32]byte + Tx FullTx + type InsecureTLSTargetError struct + Host string + func (e *InsecureTLSTargetError) Error() string + func (e *InsecureTLSTargetError) Unwrap() error + type Instruction struct + Accounts []byte + Data []byte + ProgramIDIndex uint32 + type Option interface + func WithAckTimeout(timeout time.Duration) Option + func WithInsecureTLSForLocalDevelopment() Option + func WithPreambleTimeout(timeout time.Duration) Option + func WithRootCAs(roots *x509.CertPool) Option + func WithSPKIPinSHA256(pin []byte) Option + func WithServerName(name string) Option + func WithSigQueueCapacity(capacity int) Option + func WithToken(token string) Option + type QueueStats struct + Capacity int + Dropped uint64 + Queued int + type RejectedError struct + Reason string + func (e *RejectedError) Error() string + type RetryClass uint8 + const RetryAfterCredentialChange + const RetryNever + const RetryNormal + const RetryTransient + const RetryUnknown + func ClassifyCloseCode(code ApplicationCloseCode) RetryClass + func (r RetryClass) String() string + type SigFirst struct + Seq uint64 + Signature [64]byte + Slot uint64 + type SigFirstItem struct + Seq uint64 + Signature [64]byte + Slot uint64 + type SigFirstSub struct + func (s *SigFirstSub) Dropped() uint64 + func (s *SigFirstSub) Gaps() uint64 + func (s *SigFirstSub) Next(ctx context.Context) (SigFirstItem, error) + func (s *SigFirstSub) QueueStats() QueueStats + func (s *SigFirstSub) Queued() int + func (s *SigFirstSub) UpdateFilter(ctx context.Context, f Filter) (*Ack, error) + type TerminalError struct + func (e *TerminalError) Error() string + func (e *TerminalError) Unwrap() error + type UnknownDatagram struct + Type uint8 + type UnknownFrame struct + Type uint8 + type VersionMismatchError struct + Negotiated int + func (e *VersionMismatchError) Error() string