TypeScript examples of SDK usage, including dependency installation, script execution, and swap operation simulations.
Make sure ts-node is installed if you're working with TypeScript:
npm install -g ts-nodeUsing npm:
cd sdk_examples
npm installor yarn:
cd sdk_examples
yarn installTypeScript examples of SDK usage can be found in the sdk_examples directory. To run a specific script:
npm run dev # Run index.ts
npm run estimate-swap-exact-in # Estimate exact-in swap
npm run estimate-swap-exact-out # Estimate exact-out swap
npm run estimate-swap-exact-in-multihop # Estimate exact-in multihop swap
npm run estimate-swap-exact-out-multihop # Estimate exact-out multihop swap
npm run create-swap-message # Create swap message
npm run create-swap-multihop-message # Create multihop swap message
npm run create-mint-message # Create mint messagets-node <script_name>.tsThe sdk_examples directory contains example scripts demonstrating how to use the SDK. You can explore and adapt them to your needs.