Improved EIP-5792 support

Version 5.99.0 of the TypeScript thirdweb SDK brings first-class support for EIP-5792. The new implementation streamlines how you batch calls, sponsor gas and track confirmations, while aligning our API with the final EIP-5792 spec.
Highlights:
- New React hooks – useSendAndConfirmCalls, useWaitForCallsReceipt
- Simpler useSendCalls / sendCalls signatures – no more explicit client prop, aligned return types with v2.0.0 of the EIP
- Decoupled receipt handling for flexible UI handling of receipts
- Easy wallet-capability detection
As usual, you can try out the integration on the live playground:
TypeScript (node / backend)
React (front-end)
1 – Fire-and-forget, then wait for the receipt
2 – One-liner helper
The previous version of the SDK had beta support for 5792, which got some breaking changes in this version, listed below:
React
Before | After |
---|---|
useSendCalls({ client }) returned string bundleId | useSendCalls() returns { id, client, chain, wallet } |
useSendCalls({ waitForBundle: true }) returned receipts | Waiting is now decoupled; use useWaitForCallsReceipt |
N/A | New helper useSendAndConfirmCalls combines both steps |
TypeScript / non-React
Before | After |
---|---|
type SendCallsResult = string; | type SendCallsResult = { id: string; client: ThirdwebClient; chain: Chain; wallet: Wallet } |
getCallsStatus(bundleId) | getCallsStatus(id) (field renamed) |
Any existing code that relies on the old return type must now read result.id and call waitForCallsReceipt (or the React hook) to obtain transaction receipts.
We recommend upgrading as soon as possible to leverage gas sponsorship and the simplified developer experience. For a full diff, see PR #7003 on GitHub.