Skip to main content
Follow these patterns for reliable, performant SDK usage.

SDK Initialization

Initialize the SDK once and reuse it:

Connection Management

Use a reliable RPC provider and appropriate commitment:

Batching Requests

Reduce RPC calls by batching:

Transaction Building

Combine multiple instructions efficiently:

Caching

Cache data that doesn’t change frequently:

Pre-flight Checks

Validate before submitting transactions:


Next Steps

Error Handling

Handle errors gracefully.

Types

Complete type definitions.