feat(evm): add wallet access grant/revoke functionality
Some checks failed
ci/woodpecker/push/server-audit Pipeline was successful
ci/woodpecker/push/server-lint Pipeline failed
ci/woodpecker/push/server-vet Pipeline failed
ci/woodpecker/push/server-test Pipeline was successful
ci/woodpecker/push/useragent-analyze Pipeline failed

This commit is contained in:
hdbg
2026-03-25 15:26:00 +01:00
parent ac04495480
commit bbf8a8019c
20 changed files with 893 additions and 147 deletions

View File

@@ -0,0 +1,25 @@
import 'package:arbiter/proto/user_agent.pb.dart';
import 'package:arbiter/providers/connection/connection_manager.dart';
import 'package:mtcore/markettakers.dart';
import 'package:protobuf/well_known_types/google/protobuf/empty.pb.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';
part 'wallet_access.g.dart';
@riverpod
Future<List<SdkClientWalletAccess>?> walletAccess(Ref ref) async {
final connection = await ref.watch(connectionManagerProvider.future);
if (connection == null) {
return null;
}
final accesses = await connection.ask(UserAgentRequest(listWalletAccess: Empty()));
if (accesses.hasListWalletAccessResponse()) {
return accesses.listWalletAccessResponse.accesses.toList();
} else {
talker.warning('Received unexpected response for listWalletAccess: $accesses');
return null;
}
}