Documentation ¶
Index ¶
- type AccountResult
- type AccountSubscription
- type Client
- func (cl *Client) AccountSubscribe(account solana.PublicKey, commitment rpc.CommitmentType) (*AccountSubscription, error)
- func (cl *Client) AccountSubscribeWithOpts(account solana.PublicKey, commitment rpc.CommitmentType, ...) (*AccountSubscription, error)
- func (c *Client) Close()
- func (cl *Client) LogsSubscribe(filter LogsSubscribeFilterType, commitment rpc.CommitmentType) (*LogSubscription, error)
- func (cl *Client) LogsSubscribeMentions(mentions solana.PublicKey, commitment rpc.CommitmentType) (*LogSubscription, error)
- func (cl *Client) ProgramSubscribe(programID solana.PublicKey, commitment rpc.CommitmentType) (*ProgramSubscription, error)
- func (cl *Client) ProgramSubscribeWithOpts(programID solana.PublicKey, commitment rpc.CommitmentType, ...) (*ProgramSubscription, error)
- func (cl *Client) RootSubscribe() (*RootSubscription, error)
- func (cl *Client) SignatureSubscribe(signature solana.Signature, commitment rpc.CommitmentType) (*SignatureSubscription, error)
- func (cl *Client) SlotSubscribe() (*SlotSubscription, error)
- func (cl *Client) VoteSubscribe() (*VoteSubscription, error)
- type LogResult
- type LogSubscription
- type LogsSubscribeFilterType
- type ProgramResult
- type ProgramSubscription
- type RootResult
- type RootSubscription
- type SignatureResult
- type SignatureSubscription
- type SlotResult
- type SlotSubscription
- type Subscription
- type VoteResult
- type VoteSubscription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountResult ¶
type AccountSubscription ¶
type AccountSubscription struct {
// contains filtered or unexported fields
}
func (*AccountSubscription) Recv ¶
func (sw *AccountSubscription) Recv() (*AccountResult, error)
func (*AccountSubscription) Unsubscribe ¶
func (sw *AccountSubscription) Unsubscribe()
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AccountSubscribe ¶
func (cl *Client) AccountSubscribe( account solana.PublicKey, commitment rpc.CommitmentType, ) (*AccountSubscription, error)
AccountSubscribe subscribes to an account to receive notifications when the lamports or data for a given account public key changes.
func (*Client) AccountSubscribeWithOpts ¶
func (cl *Client) AccountSubscribeWithOpts( account solana.PublicKey, commitment rpc.CommitmentType, encoding solana.EncodingType, ) (*AccountSubscription, error)
AccountSubscribe subscribes to an account to receive notifications when the lamports or data for a given account public key changes.
func (*Client) LogsSubscribe ¶
func (cl *Client) LogsSubscribe( filter LogsSubscribeFilterType, commitment rpc.CommitmentType, ) (*LogSubscription, error)
LogsSubscribe subscribes to transaction logging.
func (*Client) LogsSubscribeMentions ¶
func (cl *Client) LogsSubscribeMentions( mentions solana.PublicKey, commitment rpc.CommitmentType, ) (*LogSubscription, error)
LogsSubscribe subscribes to all transactions that mention the provided Pubkey.
func (*Client) ProgramSubscribe ¶
func (cl *Client) ProgramSubscribe( programID solana.PublicKey, commitment rpc.CommitmentType, ) (*ProgramSubscription, error)
ProgramSubscribe subscribes to a program to receive notifications when the lamports or data for a given account owned by the program changes.
func (*Client) ProgramSubscribeWithOpts ¶
func (cl *Client) ProgramSubscribeWithOpts( programID solana.PublicKey, commitment rpc.CommitmentType, encoding solana.EncodingType, filters []rpc.RPCFilter, ) (*ProgramSubscription, error)
ProgramSubscribe subscribes to a program to receive notifications when the lamports or data for a given account owned by the program changes.
func (*Client) RootSubscribe ¶
func (cl *Client) RootSubscribe() (*RootSubscription, error)
SignatureSubscribe subscribes to receive notification anytime a new root is set by the validator.
func (*Client) SignatureSubscribe ¶
func (cl *Client) SignatureSubscribe( signature solana.Signature, commitment rpc.CommitmentType, ) (*SignatureSubscription, error)
SignatureSubscribe subscribes to a transaction signature to receive notification when the transaction is confirmed On signatureNotification, the subscription is automatically cancelled
func (*Client) SlotSubscribe ¶
func (cl *Client) SlotSubscribe() (*SlotSubscription, error)
SlotSubscribe subscribes to receive notification anytime a slot is processed by the validator.
func (*Client) VoteSubscribe ¶
func (cl *Client) VoteSubscribe() (*VoteSubscription, error)
VoteSubscribe (UNSTABLE) subscribes to receive notification anytime a new vote is observed in gossip. These votes are pre-consensus therefore there is no guarantee these votes will enter the ledger.
This subscription is unstable and only available if the validator was started with the --rpc-pubsub-enable-vote-subscription flag. The format of this subscription may change in the future.
type LogSubscription ¶
type LogSubscription struct {
// contains filtered or unexported fields
}
func (*LogSubscription) Recv ¶
func (sw *LogSubscription) Recv() (*LogResult, error)
func (*LogSubscription) Unsubscribe ¶
func (sw *LogSubscription) Unsubscribe()
type LogsSubscribeFilterType ¶
type LogsSubscribeFilterType string
const ( LogsSubscribeFilterAll LogsSubscribeFilterType = "all" // subscribe to all transactions except for simple vote transactions LogsSubscribeFilterAllWithVotes LogsSubscribeFilterType = "allWithVotes" // subscribe to all transactions including simple vote transactions )
type ProgramResult ¶
type ProgramResult struct { Context struct { Slot uint64 } `json:"context"` Value rpc.KeyedAccount `json:"value"` }
type ProgramSubscription ¶
type ProgramSubscription struct {
// contains filtered or unexported fields
}
func (*ProgramSubscription) Recv ¶
func (sw *ProgramSubscription) Recv() (*ProgramResult, error)
func (*ProgramSubscription) Unsubscribe ¶
func (sw *ProgramSubscription) Unsubscribe()
type RootResult ¶
type RootSubscription ¶
type RootSubscription struct {
// contains filtered or unexported fields
}
func (*RootSubscription) Recv ¶
func (sw *RootSubscription) Recv() (*RootResult, error)
func (*RootSubscription) Unsubscribe ¶
func (sw *RootSubscription) Unsubscribe()
type SignatureResult ¶
type SignatureResult struct { Context struct { Slot uint64 } `json:"context"` Value struct { Err interface{} `json:"err"` } `json:"value"` }
type SignatureSubscription ¶
type SignatureSubscription struct {
// contains filtered or unexported fields
}
func (*SignatureSubscription) Recv ¶
func (sw *SignatureSubscription) Recv() (*SignatureResult, error)
func (*SignatureSubscription) Unsubscribe ¶
func (sw *SignatureSubscription) Unsubscribe()
type SlotResult ¶
type SlotSubscription ¶
type SlotSubscription struct {
// contains filtered or unexported fields
}
func (*SlotSubscription) Recv ¶
func (sw *SlotSubscription) Recv() (*SlotResult, error)
func (*SlotSubscription) Unsubscribe ¶
func (sw *SlotSubscription) Unsubscribe()
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
func (*Subscription) Recv ¶
func (s *Subscription) Recv() (interface{}, error)
func (*Subscription) Unsubscribe ¶
func (s *Subscription) Unsubscribe()
type VoteResult ¶
type VoteSubscription ¶
type VoteSubscription struct {
// contains filtered or unexported fields
}
func (*VoteSubscription) Recv ¶
func (sw *VoteSubscription) Recv() (*VoteResult, error)
func (*VoteSubscription) Unsubscribe ¶
func (sw *VoteSubscription) Unsubscribe()