chainstacklabs / raydium-sdk-swap-example-typescript

An example to swap tokens on Solana using the Raydium SDK, TypeScript, and Chainstack
MIT License
99 stars 35 forks source link

Compatibility issues - ^1.3.1-beta.57 #15

Open gladwinput opened 1 month ago

gladwinput commented 1 month ago

src/RaydiumSwap.ts:109:7 - error TS2353: Object literal may only specify known properties, and 'makeTxVersion' does not exist in type 'LiquiditySwapInstructionSimpleParams'.

109 makeTxVersion: useVersionedTransaction ? 0 : 1,


src/RaydiumSwap.ts:249:52 - error TS2345: Argument of type 'PublicKey' is not assignable to parameter of type 'number'.

249     const currencyIn = new Token(TOKEN_PROGRAM_ID, currencyInMint, currencyInDecimals)

src/RaydiumSwap.ts:251:53 - error TS2345: Argument of type 'PublicKey' is not assignable to parameter of type 'number'.

251 const currencyOut = new Token(TOKEN_PROGRAM_ID, currencyOutMint, currencyOutDecimals)

akegaviar commented 1 month ago

Can you provide more details on your env and your scenario?