withAuth function
Every owner-authorized call in this SDK is the same two commands — mint
the hot-potato Auth, then make the generated call that consumes it. This
lifts a generated-call closure into that pair: build receives the minted
auth handle and returns the one call consuming it. Mirrors the official
withAuth (which lifts at the type level; Dart lifts at the call site).
Implementation
MoveCallBuilder withAuth(
GeneratedConfig config,
MoveCallBuilder Function(TransactionResult auth) build,
) {
return (tx) {
final auth = account.generateAuth(config: config)(tx);
return build(auth)(tx);
};
}