The TypeScript SDK provides a simple way to interact with DeFindex vaults in your web applications. You can easily integrate vault functionality with just a few lines of code. The SDK handles all the complexities of Soroban contract interactions while providing a type-safe interface.
// Check balanceconstbalance=awaitvault.balance(accountAddress, sorobanContext);// Make a depositconsttxHash=awaitvault.deposit( accountAddress,100,true, sorobanContext, secretKey // Optional secret key for signing, if you are using a connected wallet it's not needed);// Withdraw fundsconstwithdrawTxHash=awaitvault.withdraw( accountAddress,50,true, sorobanContext, secretKey // Optional secret key for signing, if you are using a connected wallet it's not needed);