All Downloads are FREE. Search and download functionalities are using the official Maven repository.

invoicesrpc.Invoices.scala Maven / Gradle / Ivy

The newest version!

// Generated by Pekko gRPC. DO NOT EDIT.
package invoicesrpc

import org.apache.pekko
import pekko.annotation.ApiMayChange

import pekko.grpc.PekkoGrpcGenerated

/**
 * Invoices is a service that can be used to create, accept, settle and cancel
 * invoices.
 */
@PekkoGrpcGenerated
trait Invoices {
  
  /**
   * SubscribeSingleInvoice returns a uni-directional stream (server -> client)
   * to notify the client of state transitions of the specified invoice.
   * Initially the current invoice state is always sent out.
   */
  def subscribeSingleInvoice(in: invoicesrpc.SubscribeSingleInvoiceRequest): org.apache.pekko.stream.scaladsl.Source[lnrpc.Invoice, org.apache.pekko.NotUsed]
  
  /**
   * CancelInvoice cancels a currently open invoice. If the invoice is already
   * canceled, this call will succeed. If the invoice is already settled, it will
   * fail.
   */
  def cancelInvoice(in: invoicesrpc.CancelInvoiceMsg): scala.concurrent.Future[invoicesrpc.CancelInvoiceResp]
  
  /**
   * AddHoldInvoice creates a hold invoice. It ties the invoice to the hash
   * supplied in the request.
   */
  def addHoldInvoice(in: invoicesrpc.AddHoldInvoiceRequest): scala.concurrent.Future[invoicesrpc.AddHoldInvoiceResp]
  
  /**
   * SettleInvoice settles an accepted invoice. If the invoice is already
   * settled, this call will succeed.
   */
  def settleInvoice(in: invoicesrpc.SettleInvoiceMsg): scala.concurrent.Future[invoicesrpc.SettleInvoiceResp]
  
  /**
   * LookupInvoiceV2 attempts to look up at invoice. An invoice can be refrenced
   * using either its payment hash, payment address, or set ID.
   */
  def lookupInvoiceV2(in: invoicesrpc.LookupInvoiceMsg): scala.concurrent.Future[lnrpc.Invoice]
  
}



@PekkoGrpcGenerated
object Invoices extends pekko.grpc.ServiceDescription {
  val name = "invoicesrpc.Invoices"

  val descriptor: com.google.protobuf.Descriptors.FileDescriptor =
    invoicesrpc.InvoicesProto.javaDescriptor;

  object Serializers {
    import pekko.grpc.scaladsl.ScalapbProtobufSerializer
    
    val SubscribeSingleInvoiceRequestSerializer = new ScalapbProtobufSerializer(invoicesrpc.SubscribeSingleInvoiceRequest.messageCompanion)
    
    val CancelInvoiceMsgSerializer = new ScalapbProtobufSerializer(invoicesrpc.CancelInvoiceMsg.messageCompanion)
    
    val AddHoldInvoiceRequestSerializer = new ScalapbProtobufSerializer(invoicesrpc.AddHoldInvoiceRequest.messageCompanion)
    
    val SettleInvoiceMsgSerializer = new ScalapbProtobufSerializer(invoicesrpc.SettleInvoiceMsg.messageCompanion)
    
    val LookupInvoiceMsgSerializer = new ScalapbProtobufSerializer(invoicesrpc.LookupInvoiceMsg.messageCompanion)
    
    val lnrpc_InvoiceSerializer = new ScalapbProtobufSerializer(lnrpc.Invoice.messageCompanion)
    
    val CancelInvoiceRespSerializer = new ScalapbProtobufSerializer(invoicesrpc.CancelInvoiceResp.messageCompanion)
    
    val AddHoldInvoiceRespSerializer = new ScalapbProtobufSerializer(invoicesrpc.AddHoldInvoiceResp.messageCompanion)
    
    val SettleInvoiceRespSerializer = new ScalapbProtobufSerializer(invoicesrpc.SettleInvoiceResp.messageCompanion)
    
  }

  @ApiMayChange
  @PekkoGrpcGenerated
  object MethodDescriptors {
    import pekko.grpc.internal.Marshaller
    import io.grpc.MethodDescriptor
    import Serializers._

    
    val subscribeSingleInvoiceDescriptor: MethodDescriptor[invoicesrpc.SubscribeSingleInvoiceRequest, lnrpc.Invoice] =
      MethodDescriptor.newBuilder()
        .setType(
  
  
   MethodDescriptor.MethodType.SERVER_STREAMING 
  
)
        .setFullMethodName(MethodDescriptor.generateFullMethodName("invoicesrpc.Invoices", "SubscribeSingleInvoice"))
        .setRequestMarshaller(new Marshaller(SubscribeSingleInvoiceRequestSerializer))
        .setResponseMarshaller(new Marshaller(lnrpc_InvoiceSerializer))
        .setSampledToLocalTracing(true)
        .build()
    
    val cancelInvoiceDescriptor: MethodDescriptor[invoicesrpc.CancelInvoiceMsg, invoicesrpc.CancelInvoiceResp] =
      MethodDescriptor.newBuilder()
        .setType(
   MethodDescriptor.MethodType.UNARY 
  
  
  
)
        .setFullMethodName(MethodDescriptor.generateFullMethodName("invoicesrpc.Invoices", "CancelInvoice"))
        .setRequestMarshaller(new Marshaller(CancelInvoiceMsgSerializer))
        .setResponseMarshaller(new Marshaller(CancelInvoiceRespSerializer))
        .setSampledToLocalTracing(true)
        .build()
    
    val addHoldInvoiceDescriptor: MethodDescriptor[invoicesrpc.AddHoldInvoiceRequest, invoicesrpc.AddHoldInvoiceResp] =
      MethodDescriptor.newBuilder()
        .setType(
   MethodDescriptor.MethodType.UNARY 
  
  
  
)
        .setFullMethodName(MethodDescriptor.generateFullMethodName("invoicesrpc.Invoices", "AddHoldInvoice"))
        .setRequestMarshaller(new Marshaller(AddHoldInvoiceRequestSerializer))
        .setResponseMarshaller(new Marshaller(AddHoldInvoiceRespSerializer))
        .setSampledToLocalTracing(true)
        .build()
    
    val settleInvoiceDescriptor: MethodDescriptor[invoicesrpc.SettleInvoiceMsg, invoicesrpc.SettleInvoiceResp] =
      MethodDescriptor.newBuilder()
        .setType(
   MethodDescriptor.MethodType.UNARY 
  
  
  
)
        .setFullMethodName(MethodDescriptor.generateFullMethodName("invoicesrpc.Invoices", "SettleInvoice"))
        .setRequestMarshaller(new Marshaller(SettleInvoiceMsgSerializer))
        .setResponseMarshaller(new Marshaller(SettleInvoiceRespSerializer))
        .setSampledToLocalTracing(true)
        .build()
    
    val lookupInvoiceV2Descriptor: MethodDescriptor[invoicesrpc.LookupInvoiceMsg, lnrpc.Invoice] =
      MethodDescriptor.newBuilder()
        .setType(
   MethodDescriptor.MethodType.UNARY 
  
  
  
)
        .setFullMethodName(MethodDescriptor.generateFullMethodName("invoicesrpc.Invoices", "LookupInvoiceV2"))
        .setRequestMarshaller(new Marshaller(LookupInvoiceMsgSerializer))
        .setResponseMarshaller(new Marshaller(lnrpc_InvoiceSerializer))
        .setSampledToLocalTracing(true)
        .build()
    
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy