Overview
All SDK calls share a single global timeout. Read-heavy methods like getLeaderboard may need longer timeouts than quick lookups like getInvoice. Add per-method timeout overrides.
Acceptance Criteria
StellarSplitSDK({ timeout: { default: 10000, getLeaderboard: 30000, getInvoiceHistory: 20000 } }) config
default timeout applies to any method not explicitly listed; defaults to 10 000 ms
- Per-call override:
sdk.getLeaderboard({ timeout: 60000 }) for one-off extension
- Timeout implemented via
AbortController — request aborted (not just ignored) on timeout
- Throws
RequestTimeoutError with { method, timeoutMs } when timed out
- Retry logic respects per-attempt timeout — each retry gets a fresh timeout window
sdk.getTimeoutConfig() returns the resolved timeout for each known method
- Unit tests: fast method times out correctly; slow method with long timeout succeeds
Overview
All SDK calls share a single global timeout. Read-heavy methods like
getLeaderboardmay need longer timeouts than quick lookups likegetInvoice. Add per-method timeout overrides.Acceptance Criteria
StellarSplitSDK({ timeout: { default: 10000, getLeaderboard: 30000, getInvoiceHistory: 20000 } })configdefaulttimeout applies to any method not explicitly listed; defaults to 10 000 mssdk.getLeaderboard({ timeout: 60000 })for one-off extensionAbortController— request aborted (not just ignored) on timeoutRequestTimeoutErrorwith{ method, timeoutMs }when timed outsdk.getTimeoutConfig()returns the resolved timeout for each known method