Error Handling
const zlpAPI = SDK.createZLPAPI(network, provider, apiEndpoint, connectionURL)
try {
const marketInfo = await zlpAPI.getMarketInfo()
const depositTx = await zlpAPI.deposit('usdc', ['coinId'], 1000000)
} catch (error) {
console.error('SDK operation failed:', error)
if (error.message.includes('Unsupported LP token')) {
console.error('Invalid LP token type provided')
}
}Last updated