You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(docs): revert documentation links to deflex-api and complete rebranding cleanup (#3)
* fix(docs): revert documentation links to deflex-api and complete rebranding cleanup
The Haystack Router documentation on Gitbook is not yet available, so external
documentation links have been reverted to point to the existing deflex-api docs
until the new documentation is published.
Documentation link fixes:
- Revert all gitbook links from haystack-router-api to deflex-api
- Add note indicating Haystack Router documentation is coming soon
- Fix bundlejs badge link that still referenced @txnlab/deflex
Rebranding cleanup:
- Update anchor links from #deflexclient* to #routerclient*
- Update source code comments (composer.ts, middleware.ts)
- Rename test variables from *Deflex* to *Swap* naming
- Update MIDDLEWARE.md examples and keywords
- Add migration note to .claude/CLAUDE.md
* style(tests): format swapTxns arrays to single line
Copy file name to clipboardExpand all lines: .claude/CLAUDE.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,8 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
6
6
7
7
Haystack Router SDK is a TypeScript/JavaScript SDK for the Haystack Order Router - smart order routing and DEX aggregation on Algorand. This is a pnpm workspace monorepo containing the SDK package and example implementations.
8
8
9
+
> **Note:** This SDK was migrated from `@txnlab/deflex` (TxnLab/deflex-js) to `@txnlab/haystack-router` (TxnLab/haystack-js) as part of a rebranding effort. See [MIGRATION.md](../MIGRATION.md) for details on migrating from the old package.
TypeScript/JavaScript SDK for [Haystack Order Router](https://txnlab.gitbook.io/haystack-router-api) - smart order routing and DEX aggregation on Algorand.
11
+
TypeScript/JavaScript SDK for [Haystack Order Router](https://txnlab.gitbook.io/deflex-api) - smart order routing and DEX aggregation on Algorand.
TypeScript/JavaScript SDK for [Haystack Order Router](https://txnlab.gitbook.io/haystack-router-api) - smart order routing and DEX aggregation on Algorand.
9
+
TypeScript/JavaScript SDK for [Haystack Order Router](https://txnlab.gitbook.io/deflex-api) - smart order routing and DEX aggregation on Algorand.
10
10
11
11
## Prerequisites
12
12
@@ -83,11 +83,11 @@ const router = new RouterClient({
83
83
})
84
84
```
85
85
86
-
By providing your Algorand address as the `referrerAddress` when initializing the client, you can earn 25% of the swap fees generated through your integration. Set the `feeBps` parameter to specify the total fee charged to users (default: 0.15%, max: 3.00%). Learn more about the [Haystack Router Referral Program](https://txnlab.gitbook.io/haystack-router-api/referral-treasury/referral-program).
86
+
By providing your Algorand address as the `referrerAddress` when initializing the client, you can earn 25% of the swap fees generated through your integration. Set the `feeBps` parameter to specify the total fee charged to users (default: 0.15%, max: 3.00%). Learn more about the [Haystack Router Referral Program](https://txnlab.gitbook.io/deflex-api/referral-treasury/referral-program).
87
87
88
88
### Get a Swap Quote
89
89
90
-
The [`newQuote()`](#deflexclientnewquote) method returns a [`SwapQuote`](#deflexquote) object:
90
+
The [`newQuote()`](#routerclientnewquote) method returns a [`SwapQuote`](#swapquote) object:
The [`newSwap()`](#deflexclientnewswap) method returns a [`SwapComposer`](#swapcomposer) instance:
104
+
The [`newSwap()`](#routerclientnewswap) method returns a [`SwapComposer`](#swapcomposer) instance:
105
105
106
106
```typescript
107
107
import { useWallet } from'@txnlab/use-wallet-*'// react, vue, solid, or svelte
@@ -381,11 +381,11 @@ new RouterClient(config: ConfigParams)
381
381
|`autoOptIn`| Auto-detect and add required opt-in transactions |`boolean`|`false`|
382
382
|`middleware`| Array of middleware for custom asset requirements |`SwapMiddleware[]`|`[]`|
383
383
384
-
> **Referral Program**: By providing a `referrerAddress`, you can earn 25% of the swap fees generated through your integration. The `feeBps` parameter sets the total fee charged (default: 0.15%). Learn more about the [Haystack Router Referral Program](https://txnlab.gitbook.io/haystack-router-api/referral-treasury/referral-program).
384
+
> **Referral Program**: By providing a `referrerAddress`, you can earn 25% of the swap fees generated through your integration. The `feeBps` parameter sets the total fee charged (default: 0.15%). Learn more about the [Haystack Router Referral Program](https://txnlab.gitbook.io/deflex-api/referral-treasury/referral-program).
385
385
386
386
#### RouterClient.newQuote()
387
387
388
-
Fetch a swap quote and return a [`SwapQuote`](#deflexquote) object.
388
+
Fetch a swap quote and return a [`SwapQuote`](#swapquote) object.
0 commit comments