Documentation ¶
Index ¶
- type BatchSummary
- type BlockStatus
- type Builder
- type StatusQuerier
- func (q *StatusQuerier) Fetch(ctx context.Context, signature solana.Signature) (BlockStatus, error)
- func (q *StatusQuerier) FetchBatch(ctx context.Context, signatures []solana.Signature) (BatchSummary, []BlockStatus, error)
- func (q *StatusQuerier) RecentBlockHash(ctx context.Context) (solana.Hash, error)
- type StatusQuerierOpts
- type Submitter
- type SubmitterOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchSummary ¶
type BlockStatus ¶
type Builder ¶
func MemoBuilder ¶
func MemoBuilder(privateKey solana.PrivateKey, recentBlockHashFn func() (solana.Hash, error)) Builder
MemoBuilder builds a transaction with a simple memo
func SerumBuilder ¶
func SerumBuilder(ctx context.Context, g *provider.GRPCClient, publicKey solana.PublicKey, ooAddress solana.PublicKey, privateKey solana.PrivateKey) Builder
SerumBuilder builds a transaction that's expected to fail (canceling a not found order from Serum). Transactions are submitted with `skipPreflight` however, so it should still be "executed."
type StatusQuerier ¶
type StatusQuerier struct {
// contains filtered or unexported fields
}
func NewStatusQuerier ¶
func NewStatusQuerier(endpoint string) *StatusQuerier
func NewStatusQuerierWithOpts ¶
func NewStatusQuerierWithOpts(endpoint string, opts StatusQuerierOpts) *StatusQuerier
func (*StatusQuerier) Fetch ¶
func (q *StatusQuerier) Fetch(ctx context.Context, signature solana.Signature) (BlockStatus, error)
Fetch retrieve a transaction's slot in a block and its position within the block. This call blocks until timeout or success.
func (*StatusQuerier) FetchBatch ¶
func (q *StatusQuerier) FetchBatch(ctx context.Context, signatures []solana.Signature) (BatchSummary, []BlockStatus, error)
func (*StatusQuerier) RecentBlockHash ¶
func (q *StatusQuerier) RecentBlockHash(ctx context.Context) (solana.Hash, error)
type StatusQuerierOpts ¶
type Submitter ¶
type Submitter struct {
// contains filtered or unexported fields
}
func NewSubmitter ¶
func NewSubmitterWithOpts ¶
func NewSubmitterWithOpts(endpoints []string, txBuilder Builder, opts SubmitterOpts) *Submitter
func (Submitter) SubmitIteration ¶
SubmitIteration uses the builder function to construct transactions for each endpoint, then sends all transactions concurrently (to be as fair as possible)
func (Submitter) SubmitIterations ¶
func (ts Submitter) SubmitIterations(ctx context.Context, iterations int) ([][]solana.Signature, []time.Time, error)
SubmitIterations submits n iterations of transactions created by the builder to each of the endpoints and returns all signatures and creation times