// This is a generated file - do not edit. // // Generated from chain/v1/module.proto. // @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references // ignore_for_file: constant_identifier_names // ignore_for_file: curly_braces_in_flow_control_structures // ignore_for_file: deprecated_member_use_from_same_package, library_prefixes // ignore_for_file: non_constant_identifier_names, prefer_relative_imports import 'dart:async' as $async; import 'dart:core' as $core; import 'package:grpc/service_api.dart' as $grpc; import 'package:protobuf/protobuf.dart' as $pb; import 'package:protobuf/well_known_types/google/protobuf/empty.pb.dart' as $1; import 'module.pb.dart' as $0; export 'module.pb.dart'; /// The Module service is what the hub calls to invoke a module. /// /// In Phase 0, modules run in-process as WASM components and this /// service is not over the wire. The proto definition exists so that /// external module processes (OCI, remote) can implement the same /// contract in Phase 1+. @$pb.GrpcServiceName('chain.v1.Module') class ModuleClient extends $grpc.Client { /// The hostname for this service. static const $core.String defaultHost = ''; /// OAuth scopes needed for the client. static const $core.List<$core.String> oauthScopes = [ '', ]; ModuleClient(super.channel, {super.options, super.interceptors}); /// Invoke the module once with typed inputs, receive typed outputs. $grpc.ResponseFuture<$0.InvokeResponse> invoke( $0.InvokeRequest request, { $grpc.CallOptions? options, }) { return $createUnaryCall(_$invoke, request, options: options); } /// Return the module's self-description. $grpc.ResponseFuture<$0.ModuleDescriptor> describe( $1.Empty request, { $grpc.CallOptions? options, }) { return $createUnaryCall(_$describe, request, options: options); } // method descriptors static final _$invoke = $grpc.ClientMethod<$0.InvokeRequest, $0.InvokeResponse>( '/chain.v1.Module/Invoke', ($0.InvokeRequest value) => value.writeToBuffer(), $0.InvokeResponse.fromBuffer); static final _$describe = $grpc.ClientMethod<$1.Empty, $0.ModuleDescriptor>( '/chain.v1.Module/Describe', ($1.Empty value) => value.writeToBuffer(), $0.ModuleDescriptor.fromBuffer); } @$pb.GrpcServiceName('chain.v1.Module') abstract class ModuleServiceBase extends $grpc.Service { $core.String get $name => 'chain.v1.Module'; ModuleServiceBase() { $addMethod($grpc.ServiceMethod<$0.InvokeRequest, $0.InvokeResponse>( 'Invoke', invoke_Pre, false, false, ($core.List<$core.int> value) => $0.InvokeRequest.fromBuffer(value), ($0.InvokeResponse value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$1.Empty, $0.ModuleDescriptor>( 'Describe', describe_Pre, false, false, ($core.List<$core.int> value) => $1.Empty.fromBuffer(value), ($0.ModuleDescriptor value) => value.writeToBuffer())); } $async.Future<$0.InvokeResponse> invoke_Pre( $grpc.ServiceCall $call, $async.Future<$0.InvokeRequest> $request) async { return invoke($call, await $request); } $async.Future<$0.InvokeResponse> invoke( $grpc.ServiceCall call, $0.InvokeRequest request); $async.Future<$0.ModuleDescriptor> describe_Pre( $grpc.ServiceCall $call, $async.Future<$1.Empty> $request) async { return describe($call, await $request); } $async.Future<$0.ModuleDescriptor> describe( $grpc.ServiceCall call, $1.Empty request); }