The wallet object from wallet-standard
The sponsored transaction method, or undefined if not supported
const { currentWallet } = useCurrentWallet();
if (currentWallet) {
const sponsoredTx = getSponsoredTransactionFeature(currentWallet);
if (sponsoredTx) {
const result = await sponsoredTx({
txAction: "online",
chain: "sui:testnet",
assembly: "0x123..."
});
console.log("Transaction digest:", result.digest);
}
}
useSponsoredTransaction for the recommended React hook approach
Get the sponsored transaction method from a wallet if supported.
Returns the raw
signSponsoredTransactionmethod from the wallet's features. For most use cases, prefer using the useSponsoredTransaction hook instead, which provides React Query integration and automatic error handling.