Returning tx hash within an Autotask response

I saw in the OZ workshop on meta-tx that Autotask is returning tx hash. Now this value is not returned within App. Anyhow I could get this value?

:computer: Environment

:memo:Details

:1234: Code to reproduce

Can you provide more details? How are you invoking the Autotask? Where do you need to get the return value?

Keep in mind autotasks run asynchronously, so they don't technically return a result. The official defender-client package abstracts you from this fact by implementing a polling mechanism inside a promise to fetch the results as close as possible to the moment the autotask has finished.

1 Like

const response = await fetch(url, {
method: 'POST',
body: JSON.stringify(request),
headers: { 'Content-Type': 'application/json' },
});

Within the response can we have a hash number to track whether the transaction went through?

Thanks for replying!