autoswap-sdk
v1.0.6
Published
TypeScript SDK for interacting with AutoSwappr function
Maintainers
Readme
AutoSwappr SDK
A TypeScript SDK for interacting with the AutoSwappr contract.
Features
- 🔄 Execute swaps
- 📝 TypeScript support with full type definitions
Installation
npm install autoswap-sdkAutoSwappr Contract Address
0x05582ad635c43b4c14dbfa53cbde0df32266164a0d1b36e5b510e5b34aeb364bQuick Start
import { AutoSwappr, TOKEN_ADDRESSES } from 'autoswappr-sdk';
// Initialize the SDK
const autoswappr = new AutoSwappr({
contractAddress: 'AUTOSWAPPR_CONTRACT_ADDRESS',
rpcUrl: 'https://starknet-mainnet.public.blastapi.io',
accountAddress: 'YOUR_ACCOUNT_ADDRESS',
privateKey: 'YOUR_PRIVATE_KEY',
});
// Execute swap
const result = await autoswappr.executeSwap(
TOKEN_ADDRESSES.STRK,
TOKEN_ADDRESSES.USDC,
{
amount: '1', // 1 STRK
}
);
console.log('Swap result:', result);Security Considerations
- Private Key Management: Never expose private keys in client-side code
License
MIT
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
Support
For support and questions, please open an issue on GitHub.
