Skip to content

improvement: fallback API providers for resilience #17

@satoshai-dev

Description

@satoshai-dev

Summary

Support multiple API endpoints so tests don't fail when a single provider (e.g., Hiro) has an outage.

Problem

All API calls go to a single hardcoded URL per network (e.g., `api.hiro.so` for mainnet). If Hiro's API is down or rate-limited, all tests fail.

Proposed Solution

```typescript
network: {
name: 'mainnet',
apiUrls: [
'https://api.hiro.so',
'https://stacks-node-api.mainnet.stacks.co',
],
}
```

  • Try the primary URL first
  • On failure (timeout, 5xx, network error), retry with the next URL
  • Configurable via `PlaystacksConfig`

Requirements

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementNice-to-have improvementsperformancePerformance optimization

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions