From be627bda70d8f0408953c48220dfe995c6860209 Mon Sep 17 00:00:00 2001 From: Pablo Gomes de Oliveira <6186987+RicainvLovemr@users.noreply.github.com> Date: Sun, 22 Nov 2026 05:41:31 +0900 Subject: [PATCH 1/3] fix(sdk): namespace amm v0.5 priceMath exports Resolves the ambiguous duplicate export reported in #503: sdk/src/index.ts star-exports both the shared priceMath (PriceMath/AmmMath) and amm/v0.5/index.js which re-exports its own priceMath helpers, producing tsc TS2308 for consumers. Refs #503 --- sdk/src/amm/v0.5/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdk/src/amm/v0.5/index.ts b/sdk/src/amm/v0.5/index.ts index 97359d82..bdd43261 100644 --- a/sdk/src/amm/v0.5/index.ts +++ b/sdk/src/amm/v0.5/index.ts @@ -1,4 +1,6 @@ export * from "./types/index.js"; export * from "./pda.js"; export * from "./AmmClient.js"; -export * from "./priceMath.js"; +// #503: namespace the v0.5 priceMath helpers to avoid the ambiguous +// duplicate export against sdk/src/priceMath.ts (which exports PriceMath). +export * as AmmV05PriceMath from "./priceMath.js"; From 252c03415824409adc0c988613f83b69ae9dc28f Mon Sep 17 00:00:00 2001 From: Pablo Gomes de Oliveira <6186987+RicainvLovemr@users.noreply.github.com> Date: Sun, 22 Nov 2026 09:20:28 +0900 Subject: [PATCH 2/3] fix(sdk): keep flat v0.5 priceMath exports + add namespaced alias Adopt the reviewer suggestion: preserve the existing flat exports (simulateSwap, SwapSimulation) for backwards compatibility and add AmmV05PriceMath as an explicit namespaced alias. Refs #503, follows review feedback in #504 --- sdk/src/amm/v0.5/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/src/amm/v0.5/index.ts b/sdk/src/amm/v0.5/index.ts index bdd43261..d9912222 100644 --- a/sdk/src/amm/v0.5/index.ts +++ b/sdk/src/amm/v0.5/index.ts @@ -1,6 +1,6 @@ export * from "./types/index.js"; export * from "./pda.js"; export * from "./AmmClient.js"; -// #503: namespace the v0.5 priceMath helpers to avoid the ambiguous -// duplicate export against sdk/src/priceMath.ts (which exports PriceMath). +// Expose the v0.5 priceMath helpers under a versioned namespace. +export * from "./priceMath.js"; export * as AmmV05PriceMath from "./priceMath.js"; From 0d878eab435fddf849a5d1451ac86b528067df64 Mon Sep 17 00:00:00 2001 From: Pablo Gomes de Oliveira <6186987+RicainvLovemr@users.noreply.github.com> Date: Sun, 22 Nov 2026 09:52:38 +0900 Subject: [PATCH 3/3] docs(sdk): clarify export comment per review feedback Adjusts the comment wording as discussed in #504 (the namespace alias is additive, not a migration). --- sdk/src/amm/v0.5/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/src/amm/v0.5/index.ts b/sdk/src/amm/v0.5/index.ts index d9912222..8f17eb9f 100644 --- a/sdk/src/amm/v0.5/index.ts +++ b/sdk/src/amm/v0.5/index.ts @@ -1,6 +1,6 @@ export * from "./types/index.js"; export * from "./pda.js"; export * from "./AmmClient.js"; -// Expose the v0.5 priceMath helpers under a versioned namespace. +// Keep the flat v0.5 priceMath exports and add a versioned namespace alias. export * from "./priceMath.js"; export * as AmmV05PriceMath from "./priceMath.js";