Skip to content

Commit 39ef7fa

Browse files
authored
docs: add free tier API key to reduce onboarding friction (#8)
Replace `'your-api-key'` placeholders across all documentation and examples with the free tier key (`1b72df7e-...`), allowing developers to start building immediately without requesting a key. - Add API Key Tiers table to SDK README (free vs production) - Update all code examples with free tier key and rate limit comment - Pre-configure .env.example files with the free key - Simplify example setup instructions (no manual key entry needed) - Update JSDoc examples in client.ts and middleware.ts - Update MIGRATION.md and MIDDLEWARE.md for consistency
1 parent 529cf4f commit 39ef7fa

File tree

13 files changed

+40
-41
lines changed

13 files changed

+40
-41
lines changed

MIGRATION.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const deflex = new DeflexClient({
4242

4343
// After
4444
const router = new RouterClient({
45-
apiKey: 'your-api-key'
45+
apiKey: '1b72df7e-1131-4449-8ce1-29b79dd3f51e' // Free tier (60 requests/min)
4646
})
4747
```
4848

@@ -162,8 +162,8 @@ DEFLEX_API_KEY=your-api-key
162162
VITE_DEFLEX_API_KEY=your-api-key
163163

164164
# After
165-
HAYSTACK_ROUTER_API_KEY=your-api-key
166-
VITE_HAYSTACK_ROUTER_API_KEY=your-api-key
165+
HAYSTACK_ROUTER_API_KEY=1b72df7e-1131-4449-8ce1-29b79dd3f51e
166+
VITE_HAYSTACK_ROUTER_API_KEY=1b72df7e-1131-4449-8ce1-29b79dd3f51e
167167
```
168168

169169
## No Functional Changes

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ This is a pnpm workspace monorepo. All packages and examples share dependencies
4949

5050
### Prerequisites
5151

52-
- **Haystack Router API Key** - Request an API key by emailing [support@txnlab.dev](mailto:support@txnlab.dev)
52+
- **Haystack Router API Key** - An API key is included for free tier usage (60 requests/min). For production rate limits, request a key from [support@txnlab.dev](mailto:support@txnlab.dev).
5353
- algosdk 3.0.0 or later (peer dependency)
5454
- Node.js >= 20
5555
- pnpm 10.20.0 or later
@@ -106,7 +106,7 @@ const { activeAddress, transactionSigner } = useWallet()
106106

107107
// Initialize client
108108
const router = new RouterClient({
109-
apiKey: 'your-api-key',
109+
apiKey: '1b72df7e-1131-4449-8ce1-29b79dd3f51e', // Free tier (60 requests/min)
110110
})
111111

112112
// Get quote

examples/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ All examples use the local SDK package via pnpm workspaces. This means changes t
5656

5757
### Prerequisites
5858

59-
- **Haystack Router API Key** - Request an API key by emailing [support@txnlab.dev](mailto:support@txnlab.dev)
59+
- **Haystack Router API Key** - A free tier key is included in the `.env.example` files (60 requests/min). For production rate limits, request a key from [support@txnlab.dev](mailto:support@txnlab.dev).
6060
- algosdk 3.0.0 or later (peer dependency)
6161
- Node.js >= 20
6262
- pnpm 10.20.0 or later
@@ -97,18 +97,18 @@ pnpm dev
9797

9898
## Configuration
9999

100-
Each example requires a Haystack Router API key. Create a `.env` file in the example directory:
100+
Each example includes a `.env.example` file with the free tier API key pre-configured. Create a `.env` file in the example directory:
101101

102102
### React / React Query
103103

104104
```bash
105-
VITE_HAYSTACK_ROUTER_API_KEY=your-api-key-here
105+
VITE_HAYSTACK_ROUTER_API_KEY=1b72df7e-1131-4449-8ce1-29b79dd3f51e # Free tier (60 requests/min)
106106
```
107107

108108
### Node.js CLI
109109

110110
```bash
111-
HAYSTACK_ROUTER_API_KEY=your-api-key-here
111+
HAYSTACK_ROUTER_API_KEY=1b72df7e-1131-4449-8ce1-29b79dd3f51e # Free tier (60 requests/min)
112112
ACCOUNT_MNEMONIC="your 25 word mnemonic phrase"
113113
```
114114

examples/node-cli/.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Haystack Router API Configuration
2-
HAYSTACK_ROUTER_API_KEY=your-api-key-here
1+
# Haystack Router API Configuration - Free tier (60 requests/min)
2+
HAYSTACK_ROUTER_API_KEY=1b72df7e-1131-4449-8ce1-29b79dd3f51e
33

44
# Algorand Account Mnemonic (25 words)
55
# WARNING: Never commit this file with your real mnemonic!

examples/node-cli/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This example demonstrates how to use the Haystack Router SDK in a Node.js comman
1212

1313
## Prerequisites
1414

15-
- **Haystack Router API Key** - Request an API key by emailing [support@txnlab.dev](mailto:support@txnlab.dev)
15+
- **Haystack Router API Key** - A free tier key is included in `.env.example` (60 requests/min). For production rate limits, request a key from [support@txnlab.dev](mailto:support@txnlab.dev).
1616
- algosdk 3.0.0 or later (peer dependency)
1717
- Node.js >= 20
1818
- pnpm 10.20.0 or later
@@ -31,11 +31,11 @@ pnpm install
3131
cp .env.example .env
3232
```
3333

34-
3. Configure your `.env` file:
34+
3. Configure your `.env` file (the API key is pre-configured with the free tier):
3535

3636
```env
37-
# Required: Your Haystack Router API key
38-
HAYSTACK_ROUTER_API_KEY=your-api-key-here
37+
# Haystack Router API key - Free tier (60 requests/min)
38+
HAYSTACK_ROUTER_API_KEY=1b72df7e-1131-4449-8ce1-29b79dd3f51e
3939
4040
# Required: Your 25-word account mnemonic
4141
# WARNING: Keep this file private and never commit it!

examples/react-query/.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VITE_HAYSTACK_ROUTER_API_KEY=your-api-key-here
1+
VITE_HAYSTACK_ROUTER_API_KEY=1b72df7e-1131-4449-8ce1-29b79dd3f51e

examples/react-query/README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ A React application demonstrating advanced Haystack Router SDK integration with
1515

1616
## Prerequisites
1717

18-
- **Haystack Router API Key** - Request an API key by emailing [support@txnlab.dev](mailto:support@txnlab.dev)
18+
- **Haystack Router API Key** - A free tier key is included in `.env.example` (60 requests/min). For production rate limits, request a key from [support@txnlab.dev](mailto:support@txnlab.dev).
1919
- Node.js >= 20
2020
- pnpm 10.20.0 or later
2121

@@ -33,11 +33,7 @@ pnpm install
3333
cp .env.example .env
3434
```
3535

36-
3. Add your Haystack Router API key to the `.env` file:
37-
38-
```
39-
VITE_HAYSTACK_ROUTER_API_KEY=your-api-key-here
40-
```
36+
3. The `.env` file comes pre-configured with the free tier API key. For production use, replace it with your dedicated key.
4137

4238
## Development
4339

examples/react/.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VITE_HAYSTACK_ROUTER_API_KEY=your-api-key-here
1+
VITE_HAYSTACK_ROUTER_API_KEY=1b72df7e-1131-4449-8ce1-29b79dd3f51e

examples/react/README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ A simple React application demonstrating basic Haystack Router SDK integration w
1212

1313
## Prerequisites
1414

15-
- **Haystack Router API Key** - Request an API key by emailing [support@txnlab.dev](mailto:support@txnlab.dev)
15+
- **Haystack Router API Key** - A free tier key is included in `.env.example` (60 requests/min). For production rate limits, request a key from [support@txnlab.dev](mailto:support@txnlab.dev).
1616
- Node.js >= 20
1717
- pnpm 10.20.0 or later
1818

@@ -30,11 +30,7 @@ pnpm install
3030
cp .env.example .env
3131
```
3232

33-
3. Add your Haystack Router API key to the `.env` file:
34-
35-
```
36-
VITE_HAYSTACK_ROUTER_API_KEY=your-api-key-here
37-
```
33+
3. The `.env` file comes pre-configured with the free tier API key. For production use, replace it with your dedicated key.
3834

3935
## Development
4036

packages/haystack/MIDDLEWARE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ const middleware = new CustomAssetMiddleware({
370370
})
371371

372372
const router = new RouterClient({
373-
apiKey: 'your-api-key',
373+
apiKey: '1b72df7e-1131-4449-8ce1-29b79dd3f51e', // Free tier (60 requests/min)
374374
middleware: [middleware],
375375
})
376376

0 commit comments

Comments
 (0)