SimplyStaking/pegaroute-sdk released v0.2.0
github.com · Read at source ↗
Quote routes now have one standard fee measure, priced at reference prices, instead of the per-provider fee fields. This follows Pegaroute's new fee API and is a breaking change. ```sh npm install @pegaroute/sdk@0.2.0 ``` ## Breaking changes | Before | Now | | --- | --- | | `QuoteRoute.fees: QuoteFees` | `QuoteRouteFees \| NoQuoteRouteFees`: total in USD and bps, split into `affiliate`, `route
SimplyStaking’s Pegaroute SDK v0.2.0 replaces provider-specific quote fee fields with a standardized measure valued at reference prices. The release aligns the SDK with Pegaroute’s new fee API and introduces breaking changes.
Fee model changes
`QuoteRoute.fees`, previously typed as `QuoteFees`, now uses `QuoteRouteFees | NoQuoteRouteFees`. The new structure reports total fees in USD and basis points, with separate `affiliate`, `route` and `gas` components. An empty object (`{}`) indicates unavailable fee data—not a zero fee.
Other changes include:
- Removal of `QuoteRoute.resolvedFee`.
- Addition of `QuoteRoute.additionalFee: AdditionalFee | null`, representing an extra wallet-paid fee denominated in the source chain’s native coin.
- Removal of the `fees` fields from `RouteInfo`, `GetSwapResponse`, `Transaction` and `TransactionWebhookData`.
- Replacement of the `QuoteFees` type with `QuoteRouteFees`, `NoQuoteRouteFees`, `FeeAmount` and `AdditionalFee`.
Route ranking and fee checks
Routes are ordered first by `expectedOutput` after subtracting `additionalFee`, and then by speed.
The release also adds `hasQuoteRouteFees(fees)`, which distinguishes populated fee data from `{}`. Developers can import it from either `@pegaroute/sdk` or `@pegaroute/sdk/types`.
The upgrade guidance notes that `fees.totalUsd` cannot be negative and directs developers to compare routes using `expectedOutput`.
Installation and migration
The version can be installed with:
```sh npm install @pegaroute/sdk@0.2.0 ```
For fee displays, the migration example checks `hasQuoteRouteFees(route.fees)` before showing `route.fees.totalUsd` in dollars and `route.fees.totalBps` in basis points. It separately checks whether `route.additionalFee` exists before displaying its `amount` and `token` as an additional charge.
Further guidance is available in the README, alongside the full comparison from v0.1.0 to v0.2.0.
Release record and downloads
GitHub lists `dillu24` as the publisher, with a release time of 14 Oct at 14:12. The `v0.2.0` tag points to commit `c6adbd5`. The page shows four subsequent commits to `main`.
The commit was created on GitHub.com and carries GitHub’s verified signature, using GPG key ID `B5690EEEBB952194`. Its verification is dated Oct 14, 2026, at 10:04 AM.
Two source-code archives are available, both timestamped `2026-10-14T14:04:43Z`:
Sources & attribution
- Published
- Oct 14, 2026 · 2:12 PM UTC
- Source
- github.com
- Publisher
- github.com
Full attribution under the Digital Millennium Copyright Act (DMCA), 17 U.S.C. § 512: this article is an original report by Canton Intelligence that summarizes the reporting of the publishers named above, links to their original work, and reproduces no protected expression beyond brief factual reference and in-line attribution (“according to github.com”). All rights in the underlying reporting remain with the publishers listed; nothing here implies endorsement by or affiliation with them. Rights holders may request correction, update or removal through the contact address published at infiniti.w3ai.io.