Document setSender() requirement for owned objects in seal_approve#508
Open
alilloig wants to merge 1 commit intoMystenLabs:mainfrom
Open
Document setSender() requirement for owned objects in seal_approve#508alilloig wants to merge 1 commit intoMystenLabs:mainfrom
alilloig wants to merge 1 commit intoMystenLabs:mainfrom
Conversation
…stenLabs#507) Co-Authored-By: Claude Opus 4.6 <[email protected]>
jonas-lj
approved these changes
Mar 9, 2026
joyqvq
approved these changes
Mar 9, 2026
joyqvq
reviewed
Mar 9, 2026
|
|
||
| :::tip | ||
|
|
||
| If your `seal_approve` function takes an owned object as an argument (for example, a `PurchaseReceipt` NFT), you must call `tx.setSender(account.address)` before `tx.build()`. See the [Decryption Guide](/UsingSeal#decryption) for details. |
Collaborator
There was a problem hiding this comment.
you can actually use tx.build({ client: suiClient, onlyTransactionKind: true }) and the sdk will resolve the owned object without knowing the sender.
the sdk resolves this using resolveObjectReferences so setSender is not needed
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
UsingSeal.mdxexplaining thattx.setSender()is required whenseal_approvereferences owned objectsGettingStarted.mdxquick-start guideexamples/frontend/src/utils.tsnear bothtx.build()callsCloses #507
Context
When a
seal_approveMove function takes an owned object as a parameter (e.g., aPurchaseReceipt),tx.build({ onlyTransactionKind: true })needs the sender address to resolve owned object inputs. Withouttx.setSender(), the sender defaults to0x0and the build fails with an ownership mismatch error.Current docs and examples only show shared objects + pure args, so they never encounter this. This PR fills the gap for developers using owned objects as access proof.
Test plan
mkdocs serverenders the new tips correctlycd examples/frontend && pnpm build)🤖 Generated with Claude Code