answerSecret method
The request_secret tool's surface: emits secret_request, resolves
with the granted result; null = the client declined.
Implementation
Future<RequestSecretResult?> answerSecret(String name, String reason) async {
final id = _nextId('sec');
final result = await _awaitResponse(
id,
'secret_request',
(protocol) =>
protocol.encodeSecretRequest(id: id, name: name, reason: reason),
);
return result as RequestSecretResult?;
}