transaction
Starts a NonCancellable transaction in Core Crypto. If the callback succeeds, it will be committed, otherwise, every operation performed with the context will be discarded.
Check Uniffi's documentation about async code, that mentions that it does not support cancellation. So we go around it by not cancelling it either.
Return
the return of the function passed as parameter
Parameters
R
the type returned by the transaction block
block
the function to be executed within the transaction context. A CoreCryptoContext will be given as parameter to this function.