@evefrontier/dapp-kit - v0.0.1
    Preparing search index...

    Function getSponsoredTransactionFeature

    • Get the sponsored transaction method from a wallet if supported.

      Returns the raw signSponsoredTransaction method from the wallet's features. For most use cases, prefer using the useSponsoredTransaction hook instead, which provides React Query integration and automatic error handling.

      Parameters

      • wallet: Wallet

        The wallet object from wallet-standard

      Returns SponsoredTransactionMethod | undefined

      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