UNPKG

@airdao/astra-cl-periphery

Version:

🎚 Peripheral smart contracts for interacting with AstraDEX Concentrated Liquidity version

6 lines (5 loc) • 289 B
export function extractJSONFromURI(uri: string): { name: string; description: string; image: string } { const encodedJSON = uri.substring('data:application/json;base64,'.length) const decodedJSON = Buffer.from(encodedJSON, 'base64').toString('utf8') return JSON.parse(decodedJSON) }