Skip to content

Document setSender() requirement for owned objects in seal_approve#508

Open
alilloig wants to merge 1 commit intoMystenLabs:mainfrom
alilloig:docs/seal-approve-owned-objects-setsender
Open

Document setSender() requirement for owned objects in seal_approve#508
alilloig wants to merge 1 commit intoMystenLabs:mainfrom
alilloig:docs/seal-approve-owned-objects-setsender

Conversation

@alilloig
Copy link

@alilloig alilloig commented Mar 9, 2026

Summary

  • Add documentation tip in UsingSeal.mdx explaining that tx.setSender() is required when seal_approve references owned objects
  • Add matching tip in GettingStarted.mdx quick-start guide
  • Add code comments in examples/frontend/src/utils.ts near both tx.build() calls

Closes #507

Context

When a seal_approve Move function takes an owned object as a parameter (e.g., a PurchaseReceipt), tx.build({ onlyTransactionKind: true }) needs the sender address to resolve owned object inputs. Without tx.setSender(), the sender defaults to 0x0 and 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

  • Docs-only + comment-only change — no runtime behavior change
  • Verify mkdocs serve renders the new tips correctly
  • Confirm existing example frontend still builds (cd examples/frontend && pnpm build)

🤖 Generated with Claude Code

@jonas-lj jonas-lj self-requested a review March 9, 2026 11:32

:::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.
Copy link
Collaborator

@joyqvq joyqvq Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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.

Docs: missing setSender() guidance when seal_approve uses owned objects

3 participants