Canton dAppBooster
    Preparing search index...
    • Submits ledger commands and tracks the transaction in lastTx, fed by the SDK's txChanged event. actAs defaults to the party useAccount reports, so a submit acts as the party the UI shows rather than the wallet's own primary.

      Returns UseExecuteResult

      with no CantonConnectProvider above it, and from execute where nothing is connected, the wallet is locked or no party is reported. A refused command throws too and lands in error, always as an Error: see toError.

      const { account } = useAccount()
      const { execute, lastTx } = useExecute()

      if (account === undefined) return <p>Connect and unlock the wallet first.</p>

      await execute({ commandId: 'claim-1', commands })
      lastTx?.status // 'pending' | 'signed' | 'executed' | 'failed'