Skip to content

feat: add SubintentHeader support for preauthorization requests#324

Merged
xstelea merged 12 commits intomainfrom
release/subintent-header
Mar 2, 2026
Merged

feat: add SubintentHeader support for preauthorization requests#324
xstelea merged 12 commits intomainfrom
release/subintent-header

Conversation

@xstelea
Copy link
Copy Markdown
Contributor

@xstelea xstelea commented Feb 27, 2026

Summary

  • Add optional SubintentHeader to preauthorization requests, allowing dApps to set epoch bounds, proposer timestamp bounds, and intent discriminator
  • Add SubintentHeader schema with fields: networkId, startEpochInclusive, endEpochExclusive, minProposerTimestampInclusive, maxProposerTimestampExclusive, intentDiscriminator
  • Add .header() method to SubintentRequestBuilder for setting the header
  • Fix sendPreAuthorizationRequest return type to use SubintentResponseItem
  • Keep setExpiration required — wallet always expects expiration regardless of header presence
  • CI: bump semantic-release, fix npm publish, remove SonarCloud scan

Test plan

  • All 64 tests pass (npx turbo test --filter=@radixdlt/radix-dapp-toolkit)
  • No TypeScript errors in changed files
  • Builder type chain enforces: manifest()setExpiration() or header()setExpiration() → rest of chain
  • Manual test with Radix Wallet to confirm preauth requests with header include expiration

🤖 Generated with Claude Code

xstelea and others added 11 commits February 24, 2026 12:07
Allow dApps to specify transaction header fields (epoch bounds, proposer
timestamps, intent discriminator) on subintent pre-authorization requests.
The SDK auto-injects networkId before sending to the wallet.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
networkId is always injected by the SDK in WalletRequestModule, never
by the user. Making it optional in the schema removes the need for the
SubintentHeaderInput type alias and two `as` casts in the builder.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The header already contains epoch and timestamp constraints, so
requiring a separate setExpiration call was redundant. The builder
now returns the full API after .header(), and the example app uses
the fluent builder instead of rawConfig.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…type

The hardcoded return type was missing subintentHash and expirationTimestamp
fields that the implementation already returns.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wallet always expects expiration in preauth requests. Reverts the
optionality introduced when SubintentHeader support was added.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 2.3.0-subintent-header.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@xstelea xstelea changed the title fix: make setExpiration required for preauthorization requests feat: add SubintentHeader support for preauthorization requests Feb 27, 2026
- Use VITE_DAPP_DEFINITION_ADDRESS env var instead of hardcoded address
- Remove vercel dependency from simple-dapp
- Fix indentation in subintent handler
- Update README setExpiration docs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 2, 2026

🎉 This PR is included in version 2.3.0-subintent-header.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

@xstelea xstelea merged commit 84a6f79 into main Mar 2, 2026
9 checks passed
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 2, 2026

🎉 This PR is included in version 2.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants