Skip to content

feat: intermediary fee types (re-apply after #525 revert)#528

Open
ja88a wants to merge 6 commits into
mainfrom
core-213-intermediary-fee-types
Open

feat: intermediary fee types (re-apply after #525 revert)#528
ja88a wants to merge 6 commits into
mainfrom
core-213-intermediary-fee-types

Conversation

@ja88a
Copy link
Copy Markdown
Contributor

@ja88a ja88a commented May 15, 2026

Summary

Re-introduces the FeeSplit / FeeRecipient / intermediary fee surface from #520, which was reverted in #525 so that @lifi/types could ship 17.81.x cleanly while the consumer-side rollout in lifi-backend (CORE-213, PR #8187) was still in flight.

This PR re-applies the same diff and publishes @lifi/types@17.83.0-alpha.0 (alpha channel) so lifi-backend can pin against the alpha while #8187 stabilizes.

  • Branch baseline: main @ 17.82.1 (post-revert).
  • Single squash-equivalent commit: feat: intermediary fee types (re-apply after #525 revert) — diff is exactly src/api.ts + src/step.ts additions from feat: intermediary fee types #520.
  • Tag pushed: v17.83.0-alpha.0 → triggers .github/workflows/publish.yaml → npm @lifi/types@17.83.0-alpha.0 under dist-tag alpha.

Coordination

A parallel beta cycle for 17.83.0 is in flight on feat/EXBE-273-constraign-solana-swap-tx-size (v17.83.0-beta.0 already published). Both prereleases can coexist on npm under separate dist-tags. Whichever cuts stable 17.83.0 first wins the slot; the loser bumps to 17.84.0.

Merge plan

Do not squash-merge until lifi-backend PR #8187 is approval-ready. Sequence:

  1. Land #8187 reviews + green CI against @lifi/types@17.83.0-alpha.0.
  2. Squash-merge this PR.
  3. Cut stable 17.83.0 from main (pnpm release).
  4. Bump lifi-backend catalog from 17.83.0-alpha.017.83.0 and merge #8187.

Test plan

  • publish.yaml workflow green for v17.83.0-alpha.0
  • npm view @lifi/types@17.83.0-alpha.0 version returns 17.83.0-alpha.0
  • lifi-backend consumer bump PR opens with green typecheck/build against the alpha

ja88a added 6 commits May 15, 2026 13:00
Re-applies the FeeSplit / FeeRecipient / intermediary fee surface that
was originally merged in #520 and reverted in #525 to ship 17.81.x cleanly.

Refs CORE-213. Pairs with lifi-backend PR #8187 on the consumer side.
Promotes the partner-provided distributionFees request parameter to the
public type surface alongside intermediary. RouteOptions and QuoteRequest
both gain distributionFees?: DistributionFee[]; QuoteToAmountRequest
inherits via Omit<QuoteRequest, ...>.

JSDoc documents per-entry constraints (decimal percentage, EVM receiver,
sum cap, ~10 entry hard cap) without exporting numeric constants — limits
stay backend policy, not part of the SemVer contract.
`FeeCost.feeSplit` was an inline anonymous shape; expose it as the named
`FeeSplit` interface so downstream consumers (lifi-backend, lifi-sdk)
can import it directly instead of writing `NonNullable<FeeCost['feeSplit']>`.

Pure factoring — shape, JSDoc semantics, and field set are unchanged.
`FeeRecipient` JSDoc also reflowed to single-line blocks for consistency.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant