Looking at the demo contract provided in the plutus-apps folder, you can follow the example of the PayToWallet
endpoint. In this endpoint, yieldUnbalancedTx
provides the instance with an unbalanced TX. When fetching the status of the instance, you will find the tx in cicYieldedExportTxs
field. Offcourse the PAB should be configured with this:
walletServerConfig:
tag: RemoteWalletConfig
I want to have the same behavior with my statemachine contract. The call to the pab should verify the onchain state and return a transaction so the state of the contract can be changed from a remote wallet like Nami or Yoroi. What's the counterpart for this yieldUnbalancedTx
function in the statemachine as I believe the SM.runStep
tries to submit the Tx instead of returning the tx in the instance.