Skip to content

Conversation

@github-actions
Copy link
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@evolution-sdk/evolution@0.3.5

Patch Changes

  • #105 98b59fa Thanks @solidsnakedev! - Add deferred redeemer construction for dynamic index resolution

    RedeemerBuilder module (RedeemerBuilder.ts):

    • IndexedInput type: { index: number, utxo: UTxO } - provides the final sorted index and original UTxO after coin selection
    • Three modes for redeemer construction:
      • Static: Direct Data value when index not needed
      • Self: Per-input function (input: IndexedInput) => Data for single UTxO index
      • Batch: Multi-input function (inputs: IndexedInput[]) => Data for stake validator coordinator pattern
    • Type guards: isSelfFn, isBatchBuilder, isStaticData
    • Internal types: DeferredRedeemer, toDeferredRedeemer

    Evaluation phase updates:

    • Add resolveDeferredRedeemers to convert deferred redeemers after coin selection
    • Build refToIndex and refToUtxo mappings from sorted inputs
    • Invoke Self/Batch callbacks with resolved IndexedInput objects

    Operations updates:

    • collectFrom and mintTokens now accept RedeemerArg (Data | SelfRedeemerFn | BatchRedeemerBuilder)
    • Store deferred redeemers in state.deferredRedeemers for later resolution

    Test coverage (TxBuilder.RedeemerBuilder.test.ts):

    • Tests for all three modes with mint_multi_validator.ak spec

    Architecture docs (redeemer-indexing.mdx):

    • Document the circular dependency problem and deferred construction solution
    • Explain stake validator coordinator pattern with O(1) index lookup

@evolution-sdk/devnet@1.1.5

Patch Changes

  • #105 98b59fa Thanks @solidsnakedev! - Add deferred redeemer construction for dynamic index resolution

    RedeemerBuilder module (RedeemerBuilder.ts):

    • IndexedInput type: { index: number, utxo: UTxO } - provides the final sorted index and original UTxO after coin selection
    • Three modes for redeemer construction:
      • Static: Direct Data value when index not needed
      • Self: Per-input function (input: IndexedInput) => Data for single UTxO index
      • Batch: Multi-input function (inputs: IndexedInput[]) => Data for stake validator coordinator pattern
    • Type guards: isSelfFn, isBatchBuilder, isStaticData
    • Internal types: DeferredRedeemer, toDeferredRedeemer

    Evaluation phase updates:

    • Add resolveDeferredRedeemers to convert deferred redeemers after coin selection
    • Build refToIndex and refToUtxo mappings from sorted inputs
    • Invoke Self/Batch callbacks with resolved IndexedInput objects

    Operations updates:

    • collectFrom and mintTokens now accept RedeemerArg (Data | SelfRedeemerFn | BatchRedeemerBuilder)
    • Store deferred redeemers in state.deferredRedeemers for later resolution

    Test coverage (TxBuilder.RedeemerBuilder.test.ts):

    • Tests for all three modes with mint_multi_validator.ak spec

    Architecture docs (redeemer-indexing.mdx):

    • Document the circular dependency problem and deferred construction solution
    • Explain stake validator coordinator pattern with O(1) index lookup
  • Updated dependencies [98b59fa]:

    • @evolution-sdk/evolution@0.3.5

docs@0.0.12

Patch Changes

  • Updated dependencies [98b59fa]:
    • @evolution-sdk/devnet@1.1.5
    • @evolution-sdk/evolution@0.3.5

@solidsnakedev solidsnakedev merged commit 5b8478e into main Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants