MeshJS / mesh

TypeScript open-source library to advance Web3 development on Cardano
https://meshjs.dev
Apache License 2.0
221 stars 65 forks source link

Update ref script getters in providers #389

Closed lisicky closed 1 week ago

lisicky commented 1 week ago

Summary

This PR normalizes Plutus script references across different providers by standardizing their encoding using the new normalizePlutusScript function. The change ensures consistent script representation and prevents potential issues with script hash comparison.

Affect components

Type of Change

Related Issues

None specified

Checklist

Additional Information

The key changes include:

  1. Exporting plutus-tools utilities from core-cst package to make them available for providers
  2. Modifying normalizePlutusScript to work with hex strings and enforce DoubleCBOR encoding for consistency
  3. Updating script reference resolution in all providers (Blockfrost, Koios, Maestro, Yaci) to use normalized scripts
  4. Adding infinite loop protection in plutus script bytes extraction
  5. Adding error handling for missing script bytes in Maestro provider
vercel[bot] commented 1 week ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mesh-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2024 5:55pm
mesh-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2024 5:55pm