2025-10-06 13:38:53 +07:00
// nockchain/public/v1/nockchain.proto
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc v3.20.3
// source: nockchain.proto
package nockchain
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc . SupportPackageIsVersion9
const (
2025-11-04 10:38:31 +07:00
NockchainService_WalletGetBalance_FullMethodName = "/nockchain.public.v2.NockchainService/WalletGetBalance"
NockchainService_WalletSendTransaction_FullMethodName = "/nockchain.public.v2.NockchainService/WalletSendTransaction"
NockchainService_TransactionAccepted_FullMethodName = "/nockchain.public.v2.NockchainService/TransactionAccepted"
2025-10-06 13:38:53 +07:00
)
// NockchainServiceClient is the client API for NockchainService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type NockchainServiceClient interface {
WalletGetBalance ( ctx context . Context , in * WalletGetBalanceRequest , opts ... grpc . CallOption ) ( * WalletGetBalanceResponse , error )
WalletSendTransaction ( ctx context . Context , in * WalletSendTransactionRequest , opts ... grpc . CallOption ) ( * WalletSendTransactionResponse , error )
TransactionAccepted ( ctx context . Context , in * TransactionAcceptedRequest , opts ... grpc . CallOption ) ( * TransactionAcceptedResponse , error )
}
type nockchainServiceClient struct {
cc grpc . ClientConnInterface
}
func NewNockchainServiceClient ( cc grpc . ClientConnInterface ) NockchainServiceClient {
return & nockchainServiceClient { cc }
}
func ( c * nockchainServiceClient ) WalletGetBalance ( ctx context . Context , in * WalletGetBalanceRequest , opts ... grpc . CallOption ) ( * WalletGetBalanceResponse , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( WalletGetBalanceResponse )
err := c . cc . Invoke ( ctx , NockchainService_WalletGetBalance_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * nockchainServiceClient ) WalletSendTransaction ( ctx context . Context , in * WalletSendTransactionRequest , opts ... grpc . CallOption ) ( * WalletSendTransactionResponse , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( WalletSendTransactionResponse )
err := c . cc . Invoke ( ctx , NockchainService_WalletSendTransaction_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * nockchainServiceClient ) TransactionAccepted ( ctx context . Context , in * TransactionAcceptedRequest , opts ... grpc . CallOption ) ( * TransactionAcceptedResponse , error ) {
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( TransactionAcceptedResponse )
err := c . cc . Invoke ( ctx , NockchainService_TransactionAccepted_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
// NockchainServiceServer is the server API for NockchainService service.
// All implementations must embed UnimplementedNockchainServiceServer
// for forward compatibility.
type NockchainServiceServer interface {
WalletGetBalance ( context . Context , * WalletGetBalanceRequest ) ( * WalletGetBalanceResponse , error )
WalletSendTransaction ( context . Context , * WalletSendTransactionRequest ) ( * WalletSendTransactionResponse , error )
TransactionAccepted ( context . Context , * TransactionAcceptedRequest ) ( * TransactionAcceptedResponse , error )
mustEmbedUnimplementedNockchainServiceServer ( )
}
// UnimplementedNockchainServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedNockchainServiceServer struct { }
func ( UnimplementedNockchainServiceServer ) WalletGetBalance ( context . Context , * WalletGetBalanceRequest ) ( * WalletGetBalanceResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method WalletGetBalance not implemented" )
}
func ( UnimplementedNockchainServiceServer ) WalletSendTransaction ( context . Context , * WalletSendTransactionRequest ) ( * WalletSendTransactionResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method WalletSendTransaction not implemented" )
}
func ( UnimplementedNockchainServiceServer ) TransactionAccepted ( context . Context , * TransactionAcceptedRequest ) ( * TransactionAcceptedResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method TransactionAccepted not implemented" )
}
func ( UnimplementedNockchainServiceServer ) mustEmbedUnimplementedNockchainServiceServer ( ) { }
func ( UnimplementedNockchainServiceServer ) testEmbeddedByValue ( ) { }
// UnsafeNockchainServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to NockchainServiceServer will
// result in compilation errors.
type UnsafeNockchainServiceServer interface {
mustEmbedUnimplementedNockchainServiceServer ( )
}
func RegisterNockchainServiceServer ( s grpc . ServiceRegistrar , srv NockchainServiceServer ) {
// If the following call pancis, it indicates UnimplementedNockchainServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t , ok := srv . ( interface { testEmbeddedByValue ( ) } ) ; ok {
t . testEmbeddedByValue ( )
}
s . RegisterService ( & NockchainService_ServiceDesc , srv )
}
func _NockchainService_WalletGetBalance_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( WalletGetBalanceRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( NockchainServiceServer ) . WalletGetBalance ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : NockchainService_WalletGetBalance_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( NockchainServiceServer ) . WalletGetBalance ( ctx , req . ( * WalletGetBalanceRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _NockchainService_WalletSendTransaction_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( WalletSendTransactionRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( NockchainServiceServer ) . WalletSendTransaction ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : NockchainService_WalletSendTransaction_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( NockchainServiceServer ) . WalletSendTransaction ( ctx , req . ( * WalletSendTransactionRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _NockchainService_TransactionAccepted_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( TransactionAcceptedRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( NockchainServiceServer ) . TransactionAccepted ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : NockchainService_TransactionAccepted_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( NockchainServiceServer ) . TransactionAccepted ( ctx , req . ( * TransactionAcceptedRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
// NockchainService_ServiceDesc is the grpc.ServiceDesc for NockchainService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var NockchainService_ServiceDesc = grpc . ServiceDesc {
2025-11-04 10:38:31 +07:00
ServiceName : "nockchain.public.v2.NockchainService" ,
2025-10-06 13:38:53 +07:00
HandlerType : ( * NockchainServiceServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "WalletGetBalance" ,
Handler : _NockchainService_WalletGetBalance_Handler ,
} ,
{
MethodName : "WalletSendTransaction" ,
Handler : _NockchainService_WalletSendTransaction_Handler ,
} ,
{
MethodName : "TransactionAccepted" ,
Handler : _NockchainService_TransactionAccepted_Handler ,
} ,
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "nockchain.proto" ,
}