> For the complete documentation index, see [llms.txt](https://docs.peach.ag/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.peach.ag/documentation/bsc/aggregator/markdown.md).

# Changelog

Release notes for the documented BSC Aggregator SDK version.

Follow [Migration Guide](https://docs.peach.ag/documentation/bsc/aggregator/editor/migration-guide) for the one-request Allowance and two-request Permit2 flows, field mappings and compatibility aliases. `find_routes` remains available and is planned for future deprecation; no removal date is announced.

### 0.5.0 — 2026-10-20

* **Breaking:** Removed the `ProtocolType` enum and its fixed DEX list. Replace `ProtocolType.X` with provider identifiers returned by `getAvailableProviders()` (for example, `PANCAKEV3`, not the old enum value `PancakeV3`).
* `Provider` remains an open `string` alias. Quote and swap filters accept service-defined providers without an SDK release when the API and execution-plan formats are unchanged.
* Added live Fluid deployment, registration, pool-pair and quote integration coverage.
* **Migration from 0.4.0:** `PeachClient.swap()` now selects allowance or Permit2 by payer/executor and returns `PreparedSwap`. For a guaranteed `PreparedDirectSwap`, call `swapAllowance()`. Existing preparation/build aliases retain their parameter and return types.
* `PeachClient` now exposes `swap()`, `swapAllowance()`, `swapPermit2()` and `swapPermit2Build()`. Previous `prepareSwap()`, `prepareDirectSwap()`, `prepareDelegatedSwap()` and `buildDelegatedSwap()` names remain deprecated aliases with matching parameter and return types. Artifact validation is preserved; only `executeSwap()` broadcasts.
* Updated runnable SDK integration examples and E2E cases to the canonical names, with offline coverage for all four compatibility aliases.
* Added `ApiClient.swapAllowance()`, `swapPermit2()` and `swapPermit2Build()` for the explicit allowance and Permit2 endpoints. Existing `swap()`, `swapPrepare()` and `swapBuild()` remain deprecated aliases and use the new addresses without fallback.
* Direct responses now expose `paths: ApiSwapRoutePath[]` through `prepared.raw.paths`, with string amounts and optional `pool` / `extra_data`. Quote paths retain their required pool identifier.
* Configured `apiKey` is also sent as `apikey` on allowance requests; only a server-whitelisted key reveals path pools. Missing/invalid keys do not prevent transaction construction. Permit2 requests do not receive this parameter.
* Documented the explicit HTTP endpoints and response contract. Production endpoint deployment remains unverified.

### 0.3.0 — 2026-10-10

#### API changes

* `getQuote()` and swap preparation use `from` / `target`. Amounts remain `amountIn` for quotes and `amount` for preparation.
* Quotes and swaps are exact input only; `byAmountIn` is removed.
* `getPlatformConfig()` / `PlatformConfig` are renamed to `getProtocolFeeConfig()` / `ProtocolFeeConfig`.
* Service routing replaces `RouteDiscovery`, local adapter configuration and pool-state fields. `Provider` is a service-supplied string.
* `executeSwap()` returns an ethers `TransactionResponse`; call `wait()` for the receipt.

See [Quotes and Routing](https://docs.peach.ag/documentation/bsc/aggregator/editor/quotes-and-routing) for parameter mapping and [SDK Reference](https://docs.peach.ag/documentation/bsc/aggregator/editor/configuration-and-error-handling/sdk-reference) for the current API.

#### Fixes and packaging

* API timeouts cover response-body reading and JSON parsing for routing, status and swap requests, with shared request handling and timer cleanup.
* `getTokenInfo()` returns `decimals` as a JavaScript number and balances as `bigint`.
* Shared request types, route serialization and quote conversion reduce duplicate logic; slippage comments clarify net-output units, rounding and validation limits.
* npm contents are restricted to the ESM/CommonJS entry points, TypeScript declarations, README and package manifest; source maps are excluded.

### 0.2.0 — 2026-10-08

* Added service-built swap transaction data and signed execution plans for `PeachExecutionRouter.executePlan`.
* Added Direct Allowance and delegated Permit2 Witness workflows, preparation helpers, payer signing, build, simulation and executor submission.
* Made `getQuote()` display-only. Confirmed trades obtain a fresh preparation.
* Read execution addresses from API responses and support optional application address pins.
* Treat provider identifiers as service-supplied strings.
* Removed the previous executable-quote, local calldata-building and Permit2 AllowanceTransfer workflows. This release changes the integration API from v0.1.x.

The [Quickstart](https://docs.peach.ag/documentation/bsc/aggregator/quickstart) and [SDK Reference](https://docs.peach.ag/documentation/bsc/aggregator/editor/configuration-and-error-handling/sdk-reference) describe the supported integration. These release notes describe SDK capabilities; service deployments and route availability are verified separately.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.peach.ag/documentation/bsc/aggregator/markdown.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
