Skip to content

@evolution-sdk/[email protected]

Choose a tag to compare

@github-actions github-actions released this 17 Dec 17:46
· 36 commits to main since this release
2e12239

Patch Changes

  • #101 aaf0882 Thanks @solidsnakedev! - ### Core Module Enhancements

    Mint Module

    • Added Mint.getByHex() and Mint.getAssetsByPolicyHex() utilities for hex-based lookups
    • Fixed Mint.insert, removePolicy, removeAsset, and get to use content-based equality (Equal.equals) instead of reference equality for PolicyId/AssetName lookups

    Fee Calculation

    • Fixed calculateFeeIteratively to include mint field in fee calculation via TxContext access
    • Removed unnecessary 5000n fee buffer that caused fee overpayment

    Transaction Builder

    • Added .mint() method to TransactionBuilder for native token minting/burning
    • .attachScript() now accepts { script: CoreScript } parameter format
    • Improved type safety by using Core types directly instead of SDK wrappers

    Devnet Package

    Test Infrastructure

    • Added TxBuilder.Mint.test.ts with devnet submit tests for minting and burning
    • Updated TxBuilder.Scripts.test.ts to use Core types (PlutusV2.PlutusV2) instead of SDK format
    • Refactored createCoreTestUtxo helper to accept Core Script types directly
    • Removed unused createTestUtxo (SDK format) helper
    • Added Genesis.calculateUtxosFromConfig() for retrieving initial UTxOs from genesis config
    • Replaced all Buffer.from().toString("hex") with Text.toHex() in tests

    Breaking Changes

    • attachScript() now requires { script: ... } object format instead of passing script directly
    • Test helpers now use Core types exclusively
  • #103 65b7259 Thanks @solidsnakedev! - ### Remove Buffer Usage from Source Code

    Replaced all Buffer.from() usage with Bytes.fromHex() and Bytes.toHex() from the core module for better cross-platform compatibility.

    Files Updated:

    • TxBuilderImpl.ts - Use Bytes.toHex() for key hash hex conversion in buildFakeWitnessSet
    • Assets/index.ts - Use Bytes.fromHex() for policy ID and asset name decoding
    • MaestroEffect.ts - Use Bytes.fromHex() for transaction CBOR conversion
    • Ogmios.ts - Use Bytes.toHex() for datum hash hex conversion
    • KupmiosEffects.ts - Use Bytes.fromHex() for datum hash and script bytes decoding
  • #104 c26391a Thanks @solidsnakedev! - ### PlutusV3 Minting Support

    • Add PlutusV3 script minting with automatic script evaluation via Ogmios
    • Add mintAssets builder method for Plutus script-based minting policies
    • Add attachScript builder method for attaching Plutus scripts to transactions
    • Support both minting (positive amounts) and burning (negative amounts)

    Redeemer API Improvements

    • Breaking: Change redeemer parameter type from string (CBOR hex) to Data.Data
      • Affects collectFrom() and mintAssets() builder methods
      • Provides type-safe redeemer construction without manual CBOR encoding
      • Example: redeemer: Data.constr(0n, [Data.int(1n)]) instead of hex strings

    Core Module Additions

    • Add Redeemers module with Conway CDDL-compliant encoding (array format)
    • Refactor hashScriptData to use proper module encoders for redeemers and datums
    • Add Redeemers.toCBORBytes() for script data hash computation

    Internal Improvements

    • Store PlutusData.Data directly in builder state instead of CBOR hex strings
    • Remove redundant CBOR hex encoding/decoding in transaction assembly
    • Add PlutusV3 minting devnet tests with real script evaluation