Documentation ¶
Index ¶
- Constants
- Variables
- func CheckRPCStatus(ctx context.Context, client interfaces.SolanaRPCClient, privnet bool) (time.Time, error)
- func GetFirstSignatureForAddress(ctx context.Context, client interfaces.SolanaRPCClient, ...) (solana.Signature, error)
- func GetSignaturesForAddressUntil(ctx context.Context, client interfaces.SolanaRPCClient, ...) ([]*rpc.TransactionSignature, error)
- func GetTransaction(ctx context.Context, client interfaces.SolanaRPCClient, sig solana.Signature) (*rpc.GetTransactionResult, error)
Constants ¶
View Source
const ( // defaultPageLimit is the default number of signatures to fetch in one GetSignaturesForAddressWithOpts call DefaultPageLimit = 1000 // RPCAlertLatency is the default threshold for RPC latency to be considered unhealthy and trigger an alert. // The 'HEALTH_CHECK_SLOT_DISTANCE' is default to 150 slots, which is 150 * 0.4s = 60s RPCAlertLatency = time.Duration(60) * time.Second )
Variables ¶
View Source
var ErrUnsupportedTxVersion = errors.New("unsupported tx version")
ErrUnsupportedTxVersion is returned when the transaction version is not supported by zetaclient
Functions ¶
func CheckRPCStatus ¶
func CheckRPCStatus(ctx context.Context, client interfaces.SolanaRPCClient, privnet bool) (time.Time, error)
CheckRPCStatus checks the RPC status of the solana chain
func GetFirstSignatureForAddress ¶
func GetFirstSignatureForAddress( ctx context.Context, client interfaces.SolanaRPCClient, address solana.PublicKey, pageLimit int, ) (solana.Signature, error)
GetFirstSignatureForAddress searches the first signature for the given address. Note: make sure that the rpc provider used has enough transaction history.
func GetSignaturesForAddressUntil ¶
func GetSignaturesForAddressUntil( ctx context.Context, client interfaces.SolanaRPCClient, address solana.PublicKey, untilSig solana.Signature, pageLimit int, ) ([]*rpc.TransactionSignature, error)
GetSignaturesForAddressUntil searches for signatures for the given address until the given signature (exclusive). Note: make sure that the rpc provider used has enough transaction history.
func GetTransaction ¶
func GetTransaction( ctx context.Context, client interfaces.SolanaRPCClient, sig solana.Signature, ) (*rpc.GetTransactionResult, error)
GetTransaction fetches a transaction with the given signature. Note that it might return ErrUnsupportedTxVersion (for tx that we don't support yet).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.