diff --git a/typescript/package.json b/typescript/package.json index 48d4aac..bd2a14a 100644 --- a/typescript/package.json +++ b/typescript/package.json @@ -9,7 +9,7 @@ "publishConfig": { "access": "public" }, - "version": "0.0.5", + "version": "0.0.6", "main": "dist/index.js", "module": "dist/index.mjs", "types": "dist/index.d.ts", diff --git a/typescript/src/buffer/index.ts b/typescript/src/buffer/index.ts new file mode 100644 index 0000000..ffb8830 --- /dev/null +++ b/typescript/src/buffer/index.ts @@ -0,0 +1,2 @@ +export * from './data'; +export * from './erc4626BufferWrapOrUnwrap'; \ No newline at end of file diff --git a/typescript/src/index.ts b/typescript/src/index.ts index 366d89c..20f3919 100644 --- a/typescript/src/index.ts +++ b/typescript/src/index.ts @@ -2,3 +2,4 @@ export * from './stable'; export * from './vault/vault'; export * from './vault/types'; export * from './weighted'; +export * from './buffer'; diff --git a/typescript/src/vault/types.ts b/typescript/src/vault/types.ts index 873e7b5..c7b37c9 100644 --- a/typescript/src/vault/types.ts +++ b/typescript/src/vault/types.ts @@ -1,3 +1,9 @@ +import { BufferState } from "../buffer"; +import { StableState } from "../stable"; +import { WeightedState } from "../weighted"; + +export type PoolState = WeightedState | StableState | BufferState; + export enum SwapKind { GivenIn = 0, GivenOut = 1, diff --git a/typescript/src/vault/vault.ts b/typescript/src/vault/vault.ts index d48a805..84f6dfd 100644 --- a/typescript/src/vault/vault.ts +++ b/typescript/src/vault/vault.ts @@ -6,15 +6,15 @@ import { computeRemoveLiquiditySingleTokenExactIn, computeRemoveLiquiditySingleTokenExactOut, } from './basePoolMath'; -import { Weighted, type WeightedState } from '../weighted'; -import { Stable, type StableState } from '../stable'; -import { erc4626BufferWrapOrUnwrap } from '../buffer/erc4626BufferWrapOrUnwrap'; +import { Weighted } from '../weighted'; +import { Stable } from '../stable'; +import { erc4626BufferWrapOrUnwrap } from '../buffer'; import { isSameAddress } from './utils'; -import { BufferState } from '../buffer/data'; import { AddKind, AddLiquidityInput, PoolBase, + PoolState, RemoveKind, RemoveLiquidityInput, SwapInput, @@ -22,7 +22,7 @@ import { SwapParams, } from './types'; -type PoolState = WeightedState | StableState | BufferState; + type PoolClassConstructor = new (..._args: any[]) => PoolBase; type PoolClasses = Readonly>;