Skip to content

feat: update utxorpc-spec to 0.18.1#50

Merged
Mercurial merged 7 commits intoutxorpc:mainfrom
SupernaviX:sg/utxorpc-spec-18-1
Jan 26, 2026
Merged

feat: update utxorpc-spec to 0.18.1#50
Mercurial merged 7 commits intoutxorpc:mainfrom
SupernaviX:sg/utxorpc-spec-18-1

Conversation

@SupernaviX
Copy link
Copy Markdown
Contributor

Update the SDK to wrap a newer version of utxorpc-spec. This version includes some breaking changes:

  • Only one TX can be submitted in a single call
  • A new "idle" event can be reported when watching chain events
  • Many fields are now the plutus BigInt type, instead of numeric.

I've also fixed the watchTxForAsset function to correctly handle querying for policy ids without an explicit asset name.

Note that the tests don't pass yet; @utxorpc/blaze-provider also needs to be updated to cope with the new spec version. I have that update written locally, and all tests pass with that update (though the SubmitTX tests fail when you run them all at once, thanks to wallet contention).

Warning: Breaking Change

This new utxorpc-spec version is not backwards-compatible with the old one. Demeter currently supports utxorpc-spec 0.17.0, and this node-sdk version won't work with it. Once demeter is updated to 0.18.1, this version will work, but the old one won't work anymore. There isn't really a way for demeter-backed projects to gracefully transition.

@SupernaviX SupernaviX force-pushed the sg/utxorpc-spec-18-1 branch from 01836c0 to 626068a Compare January 22, 2026 04:10
@Mercurial
Copy link
Copy Markdown
Contributor

Thanks for the update! The changes look good overall. A few notes:

Version Bump

Per our historical pattern, version bumps should be in a separate PR/commit. Could you please remove the "version": "0.8.0" change from package.json? I (or you) can create a separate version bump PR after this merges.

Looking at the repo history:

6eb0694 chore: bump version to v0.7.0 (#49)
ab5f58e chore: updated utxorpc-spec dependency to 0.17.0 (#47)

Code Review

The rest of the changes look good:

  • ✅ Proper handling of new idle event type
  • TxEvent now includes Block and BlockRef - nice ergonomics improvement
  • watchTxByPredicate() with recursive predicate building
  • ✅ Fixed watchTxForAsset to properly pass both policyId and assetName
  • ✅ Good error messages with chain type validation
  • ✅ Tests updated with deterministic intersect points
  • ✅ Deno-compatible imports (.ts extension)

Once the version bump is removed, this should be good to merge!

@Mercurial
Copy link
Copy Markdown
Contributor

Minor style nit: missing trailing comma on line 175 for consistency with line 170:

// line 170 (apply case)
nativeBytes: any.action.value.nativeBytes,

// line 175 (undo case) - missing trailing comma
nativeBytes: any.action.value.nativeBytes

@Mercurial Mercurial merged commit d261a33 into utxorpc:main Jan 26, 2026
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