feat: add SubintentHeader support for preauthorization requests#324
Merged
feat: add SubintentHeader support for preauthorization requests#324
Conversation
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>
|
🎉 This PR is included in version 2.3.0-subintent-header.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
- 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>
|
🎉 This PR is included in version 2.3.0-subintent-header.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 2.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SubintentHeaderto preauthorization requests, allowing dApps to set epoch bounds, proposer timestamp bounds, and intent discriminatorSubintentHeaderschema with fields:networkId,startEpochInclusive,endEpochExclusive,minProposerTimestampInclusive,maxProposerTimestampExclusive,intentDiscriminator.header()method toSubintentRequestBuilderfor setting the headersendPreAuthorizationRequestreturn type to useSubintentResponseItemsetExpirationrequired — wallet always expects expiration regardless of header presenceTest plan
npx turbo test --filter=@radixdlt/radix-dapp-toolkit)manifest()→setExpiration()orheader()→setExpiration()→ rest of chain🤖 Generated with Claude Code