Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions sdk/src/amm/v0.5/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export * from "./types/index.js";
export * from "./pda.js";
export * from "./AmmClient.js";
// Keep the flat v0.5 priceMath exports and add a versioned namespace alias.
export * from "./priceMath.js";
export * as AmmV05PriceMath from "./priceMath.js";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Existing helper imports break

Replacing the flat exports removes simulateSwap and SwapSimulation from the published @metadaoproject/programs/amm and @metadaoproject/programs/amm/v0.5 entry points. Consumers importing either name will fail to compile; JavaScript imports of simulateSwap will fail to load.

Keep the existing exports alongside AmmV05PriceMath. Neither name conflicts with the shared module, and the package root does not re-export the v0.5 AMM module.

Suggested change
export * as AmmV05PriceMath from "./priceMath.js";
export * from "./priceMath.js";
export * as AmmV05PriceMath from "./priceMath.js";