offersrpc

package
v0.0.0-...-1310602 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_offersrpc_proto protoreflect.FileDescriptor
View Source
var Offers_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "offersrpc.Offers",
	HandlerType: (*OffersServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SendOnionMessage",
			Handler:    _Offers_SendOnionMessage_Handler,
		},
		{
			MethodName: "DecodeOffer",
			Handler:    _Offers_DecodeOffer_Handler,
		},
		{
			MethodName: "GenerateBlindedRoute",
			Handler:    _Offers_GenerateBlindedRoute_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "SubscribeOnionPayload",
			Handler:       _Offers_SubscribeOnionPayload_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "offersrpc.proto",
}

Offers_ServiceDesc is the grpc.ServiceDesc for Offers service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterOffersServer

func RegisterOffersServer(s grpc.ServiceRegistrar, srv OffersServer)

Types

type BlindedHop

type BlindedHop struct {

	// The blinded node pubkey for the hop.
	BlindedNodeId []byte `protobuf:"bytes,1,opt,name=blinded_node_id,json=blindedNodeId,proto3" json:"blinded_node_id,omitempty"`
	// The encrypted data blob for the hop.
	EncryptedData []byte `protobuf:"bytes,2,opt,name=encrypted_data,json=encryptedData,proto3" json:"encrypted_data,omitempty"`
	// contains filtered or unexported fields
}

func (*BlindedHop) Descriptor deprecated

func (*BlindedHop) Descriptor() ([]byte, []int)

Deprecated: Use BlindedHop.ProtoReflect.Descriptor instead.

func (*BlindedHop) GetBlindedNodeId

func (x *BlindedHop) GetBlindedNodeId() []byte

func (*BlindedHop) GetEncryptedData

func (x *BlindedHop) GetEncryptedData() []byte

func (*BlindedHop) ProtoMessage

func (*BlindedHop) ProtoMessage()

func (*BlindedHop) ProtoReflect

func (x *BlindedHop) ProtoReflect() protoreflect.Message

func (*BlindedHop) Reset

func (x *BlindedHop) Reset()

func (*BlindedHop) String

func (x *BlindedHop) String() string

type BlindedPath

type BlindedPath struct {

	// The un-blinded pubkey of the introduction node for the blinded path.
	IntroductionNode []byte `protobuf:"bytes,1,opt,name=introduction_node,json=introductionNode,proto3" json:"introduction_node,omitempty"`
	// The blinding point is the ephemeral key used to blind the blinded hops
	// in the route.
	BlindingPoint []byte `protobuf:"bytes,2,opt,name=blinding_point,json=blindingPoint,proto3" json:"blinding_point,omitempty"`
	// The set of blinded hops in the route, starting with the blinded
	// introduction node and ending at the recipient.
	Hops []*BlindedHop `protobuf:"bytes,3,rep,name=hops,proto3" json:"hops,omitempty"`
	// contains filtered or unexported fields
}

func (*BlindedPath) Descriptor deprecated

func (*BlindedPath) Descriptor() ([]byte, []int)

Deprecated: Use BlindedPath.ProtoReflect.Descriptor instead.

func (*BlindedPath) GetBlindingPoint

func (x *BlindedPath) GetBlindingPoint() []byte

func (*BlindedPath) GetHops

func (x *BlindedPath) GetHops() []*BlindedHop

func (*BlindedPath) GetIntroductionNode

func (x *BlindedPath) GetIntroductionNode() []byte

func (*BlindedPath) ProtoMessage

func (*BlindedPath) ProtoMessage()

func (*BlindedPath) ProtoReflect

func (x *BlindedPath) ProtoReflect() protoreflect.Message

func (*BlindedPath) Reset

func (x *BlindedPath) Reset()

func (*BlindedPath) String

func (x *BlindedPath) String() string

type DecodeOfferRequest

type DecodeOfferRequest struct {

	// The encoded offer string to be decoded.
	Offer string `protobuf:"bytes,1,opt,name=offer,proto3" json:"offer,omitempty"`
	// contains filtered or unexported fields
}

func (*DecodeOfferRequest) Descriptor deprecated

func (*DecodeOfferRequest) Descriptor() ([]byte, []int)

Deprecated: Use DecodeOfferRequest.ProtoReflect.Descriptor instead.

func (*DecodeOfferRequest) GetOffer

func (x *DecodeOfferRequest) GetOffer() string

func (*DecodeOfferRequest) ProtoMessage

func (*DecodeOfferRequest) ProtoMessage()

func (*DecodeOfferRequest) ProtoReflect

func (x *DecodeOfferRequest) ProtoReflect() protoreflect.Message

func (*DecodeOfferRequest) Reset

func (x *DecodeOfferRequest) Reset()

func (*DecodeOfferRequest) String

func (x *DecodeOfferRequest) String() string

type DecodeOfferResponse

type DecodeOfferResponse struct {

	// The decoded offer.
	Offer *Offer `protobuf:"bytes,1,opt,name=offer,proto3" json:"offer,omitempty"`
	// contains filtered or unexported fields
}

func (*DecodeOfferResponse) Descriptor deprecated

func (*DecodeOfferResponse) Descriptor() ([]byte, []int)

Deprecated: Use DecodeOfferResponse.ProtoReflect.Descriptor instead.

func (*DecodeOfferResponse) GetOffer

func (x *DecodeOfferResponse) GetOffer() *Offer

func (*DecodeOfferResponse) ProtoMessage

func (*DecodeOfferResponse) ProtoMessage()

func (*DecodeOfferResponse) ProtoReflect

func (x *DecodeOfferResponse) ProtoReflect() protoreflect.Message

func (*DecodeOfferResponse) Reset

func (x *DecodeOfferResponse) Reset()

func (*DecodeOfferResponse) String

func (x *DecodeOfferResponse) String() string

type GenerateBlindedRouteRequest

type GenerateBlindedRouteRequest struct {

	// The set of protocol features that the nodes along the route should have.
	Features []uint64 `protobuf:"varint,1,rep,packed,name=features,proto3" json:"features,omitempty"`
	// contains filtered or unexported fields
}

func (*GenerateBlindedRouteRequest) Descriptor deprecated

func (*GenerateBlindedRouteRequest) Descriptor() ([]byte, []int)

Deprecated: Use GenerateBlindedRouteRequest.ProtoReflect.Descriptor instead.

func (*GenerateBlindedRouteRequest) GetFeatures

func (x *GenerateBlindedRouteRequest) GetFeatures() []uint64

func (*GenerateBlindedRouteRequest) ProtoMessage

func (*GenerateBlindedRouteRequest) ProtoMessage()

func (*GenerateBlindedRouteRequest) ProtoReflect

func (*GenerateBlindedRouteRequest) Reset

func (x *GenerateBlindedRouteRequest) Reset()

func (*GenerateBlindedRouteRequest) String

func (x *GenerateBlindedRouteRequest) String() string

type GenerateBlindedRouteResponse

type GenerateBlindedRouteResponse struct {

	// A blinded route to our node.
	Route *BlindedPath `protobuf:"bytes,1,opt,name=route,proto3" json:"route,omitempty"`
	// contains filtered or unexported fields
}

func (*GenerateBlindedRouteResponse) Descriptor deprecated

func (*GenerateBlindedRouteResponse) Descriptor() ([]byte, []int)

Deprecated: Use GenerateBlindedRouteResponse.ProtoReflect.Descriptor instead.

func (*GenerateBlindedRouteResponse) GetRoute

func (*GenerateBlindedRouteResponse) ProtoMessage

func (*GenerateBlindedRouteResponse) ProtoMessage()

func (*GenerateBlindedRouteResponse) ProtoReflect

func (*GenerateBlindedRouteResponse) Reset

func (x *GenerateBlindedRouteResponse) Reset()

func (*GenerateBlindedRouteResponse) String

type Offer

type Offer struct {

	// Minimum amount is the minimum payment amount that the offer is for,
	// expressed in millisatoshis.
	MinAmountMsat uint64 `protobuf:"varint,1,opt,name=min_amount_msat,json=minAmountMsat,proto3" json:"min_amount_msat,omitempty"`
	// The description of what the offer is for.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// The BOLT feature vector for the offers, encoded as a bit vector.
	Features []byte `protobuf:"bytes,3,opt,name=features,proto3" json:"features,omitempty"`
	// The expiry time for the offer, expressed as seconds from the unix epoch.
	ExpiryUnixSeconds uint64 `protobuf:"varint,4,opt,name=expiry_unix_seconds,json=expiryUnixSeconds,proto3" json:"expiry_unix_seconds,omitempty"`
	// The issuer of the offer.
	Issuer string `protobuf:"bytes,5,opt,name=issuer,proto3" json:"issuer,omitempty"`
	// The minimum number of items for the offer.
	MinQuantity uint64 `protobuf:"varint,6,opt,name=min_quantity,json=minQuantity,proto3" json:"min_quantity,omitempty"`
	// The maximum number of items for the offer.
	MaxQuantity uint64 `protobuf:"varint,7,opt,name=max_quantity,json=maxQuantity,proto3" json:"max_quantity,omitempty"`
	// The hex-encoded node ID of the party making the offer, expressed in
	// x-only format.
	NodeId string `protobuf:"bytes,8,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
	// The 64 byte bip340 hex-encoded signature for the offer, generated using
	// node_id's corresponding private key.
	Signature string `protobuf:"bytes,9,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

func (*Offer) Descriptor deprecated

func (*Offer) Descriptor() ([]byte, []int)

Deprecated: Use Offer.ProtoReflect.Descriptor instead.

func (*Offer) GetDescription

func (x *Offer) GetDescription() string

func (*Offer) GetExpiryUnixSeconds

func (x *Offer) GetExpiryUnixSeconds() uint64

func (*Offer) GetFeatures

func (x *Offer) GetFeatures() []byte

func (*Offer) GetIssuer

func (x *Offer) GetIssuer() string

func (*Offer) GetMaxQuantity

func (x *Offer) GetMaxQuantity() uint64

func (*Offer) GetMinAmountMsat

func (x *Offer) GetMinAmountMsat() uint64

func (*Offer) GetMinQuantity

func (x *Offer) GetMinQuantity() uint64

func (*Offer) GetNodeId

func (x *Offer) GetNodeId() string

func (*Offer) GetSignature

func (x *Offer) GetSignature() string

func (*Offer) ProtoMessage

func (*Offer) ProtoMessage()

func (*Offer) ProtoReflect

func (x *Offer) ProtoReflect() protoreflect.Message

func (*Offer) Reset

func (x *Offer) Reset()

func (*Offer) String

func (x *Offer) String() string

type OffersClient

type OffersClient interface {
	SendOnionMessage(ctx context.Context, in *SendOnionMessageRequest, opts ...grpc.CallOption) (*SendOnionMessageResponse, error)
	DecodeOffer(ctx context.Context, in *DecodeOfferRequest, opts ...grpc.CallOption) (*DecodeOfferResponse, error)
	SubscribeOnionPayload(ctx context.Context, in *SubscribeOnionPayloadRequest, opts ...grpc.CallOption) (Offers_SubscribeOnionPayloadClient, error)
	GenerateBlindedRoute(ctx context.Context, in *GenerateBlindedRouteRequest, opts ...grpc.CallOption) (*GenerateBlindedRouteResponse, error)
}

OffersClient is the client API for Offers 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.

func NewOffersClient

func NewOffersClient(cc grpc.ClientConnInterface) OffersClient

type OffersServer

type OffersServer interface {
	SendOnionMessage(context.Context, *SendOnionMessageRequest) (*SendOnionMessageResponse, error)
	DecodeOffer(context.Context, *DecodeOfferRequest) (*DecodeOfferResponse, error)
	SubscribeOnionPayload(*SubscribeOnionPayloadRequest, Offers_SubscribeOnionPayloadServer) error
	GenerateBlindedRoute(context.Context, *GenerateBlindedRouteRequest) (*GenerateBlindedRouteResponse, error)
	// contains filtered or unexported methods
}

OffersServer is the server API for Offers service. All implementations must embed UnimplementedOffersServer for forward compatibility

type Offers_SubscribeOnionPayloadClient

type Offers_SubscribeOnionPayloadClient interface {
	Recv() (*SubscribeOnionPayloadResponse, error)
	grpc.ClientStream
}

type Offers_SubscribeOnionPayloadServer

type Offers_SubscribeOnionPayloadServer interface {
	Send(*SubscribeOnionPayloadResponse) error
	grpc.ServerStream
}

type SendOnionMessageRequest

type SendOnionMessageRequest struct {

	// The pubkey of the peer to send the message to. This field must not be
	// set if blinded destination is populated.
	Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
	// A blinded path to the target recipient of the onion message. This field
	// must not be set if pubkey is populated.
	BlindedDestination *BlindedPath `protobuf:"bytes,2,opt,name=blinded_destination,json=blindedDestination,proto3" json:"blinded_destination,omitempty"`
	// A map of TLV type to encoded value to deliver to the target node. Note
	// that the bytes for each payload will be written directly, so should
	// already be encoded as the recipient is expecting. TLVs >= 64 are
	// reserved for the final hop, so all values in the map must be in this
	// in this range.
	FinalPayloads map[uint64][]byte `` /* 189-byte string literal not displayed */
	// An optional blinded path that can be used to supply the recipient with
	// a path to send replies over.
	ReplyPath *BlindedPath `protobuf:"bytes,4,opt,name=reply_path,json=replyPath,proto3" json:"reply_path,omitempty"`
	// If we cannot find a path to the node pubkey provided, there is an option
	// to make a direct p2p connection to the node to deliver onion messages.
	// This option will leak the IP of your LND node, so it is opt-in.
	DirectConnect bool `protobuf:"varint,5,opt,name=direct_connect,json=directConnect,proto3" json:"direct_connect,omitempty"`
	// contains filtered or unexported fields
}

func (*SendOnionMessageRequest) Descriptor deprecated

func (*SendOnionMessageRequest) Descriptor() ([]byte, []int)

Deprecated: Use SendOnionMessageRequest.ProtoReflect.Descriptor instead.

func (*SendOnionMessageRequest) GetBlindedDestination

func (x *SendOnionMessageRequest) GetBlindedDestination() *BlindedPath

func (*SendOnionMessageRequest) GetDirectConnect

func (x *SendOnionMessageRequest) GetDirectConnect() bool

func (*SendOnionMessageRequest) GetFinalPayloads

func (x *SendOnionMessageRequest) GetFinalPayloads() map[uint64][]byte

func (*SendOnionMessageRequest) GetPubkey

func (x *SendOnionMessageRequest) GetPubkey() []byte

func (*SendOnionMessageRequest) GetReplyPath

func (x *SendOnionMessageRequest) GetReplyPath() *BlindedPath

func (*SendOnionMessageRequest) ProtoMessage

func (*SendOnionMessageRequest) ProtoMessage()

func (*SendOnionMessageRequest) ProtoReflect

func (x *SendOnionMessageRequest) ProtoReflect() protoreflect.Message

func (*SendOnionMessageRequest) Reset

func (x *SendOnionMessageRequest) Reset()

func (*SendOnionMessageRequest) String

func (x *SendOnionMessageRequest) String() string

type SendOnionMessageResponse

type SendOnionMessageResponse struct {
	// contains filtered or unexported fields
}

func (*SendOnionMessageResponse) Descriptor deprecated

func (*SendOnionMessageResponse) Descriptor() ([]byte, []int)

Deprecated: Use SendOnionMessageResponse.ProtoReflect.Descriptor instead.

func (*SendOnionMessageResponse) ProtoMessage

func (*SendOnionMessageResponse) ProtoMessage()

func (*SendOnionMessageResponse) ProtoReflect

func (x *SendOnionMessageResponse) ProtoReflect() protoreflect.Message

func (*SendOnionMessageResponse) Reset

func (x *SendOnionMessageResponse) Reset()

func (*SendOnionMessageResponse) String

func (x *SendOnionMessageResponse) String() string

type SubscribeOnionPayloadRequest

type SubscribeOnionPayloadRequest struct {

	// Onion messages reserve tlv values 64 and above for message intended for
	// the final node. These tlv records are considered "sub-namespaces", which
	// themselves carry a tlv stream for the end application. The tlv type
	// provided here will register a subscription for any onion messages that
	// are delivered to our node that populate the tlv type specified.
	TlvType uint64 `protobuf:"varint,1,opt,name=tlv_type,json=tlvType,proto3" json:"tlv_type,omitempty"`
	// contains filtered or unexported fields
}

func (*SubscribeOnionPayloadRequest) Descriptor deprecated

func (*SubscribeOnionPayloadRequest) Descriptor() ([]byte, []int)

Deprecated: Use SubscribeOnionPayloadRequest.ProtoReflect.Descriptor instead.

func (*SubscribeOnionPayloadRequest) GetTlvType

func (x *SubscribeOnionPayloadRequest) GetTlvType() uint64

func (*SubscribeOnionPayloadRequest) ProtoMessage

func (*SubscribeOnionPayloadRequest) ProtoMessage()

func (*SubscribeOnionPayloadRequest) ProtoReflect

func (*SubscribeOnionPayloadRequest) Reset

func (x *SubscribeOnionPayloadRequest) Reset()

func (*SubscribeOnionPayloadRequest) String

type SubscribeOnionPayloadResponse

type SubscribeOnionPayloadResponse struct {

	// Value is the raw bytes extracted from the tlv type that the subscription
	// is for.
	Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// Reply path is an optional reply path included by the sender to receive
	// responses to this onion message on.
	ReplyPath *BlindedPath `protobuf:"bytes,2,opt,name=reply_path,json=replyPath,proto3" json:"reply_path,omitempty"`
	// contains filtered or unexported fields
}

func (*SubscribeOnionPayloadResponse) Descriptor deprecated

func (*SubscribeOnionPayloadResponse) Descriptor() ([]byte, []int)

Deprecated: Use SubscribeOnionPayloadResponse.ProtoReflect.Descriptor instead.

func (*SubscribeOnionPayloadResponse) GetReplyPath

func (x *SubscribeOnionPayloadResponse) GetReplyPath() *BlindedPath

func (*SubscribeOnionPayloadResponse) GetValue

func (x *SubscribeOnionPayloadResponse) GetValue() []byte

func (*SubscribeOnionPayloadResponse) ProtoMessage

func (*SubscribeOnionPayloadResponse) ProtoMessage()

func (*SubscribeOnionPayloadResponse) ProtoReflect

func (*SubscribeOnionPayloadResponse) Reset

func (x *SubscribeOnionPayloadResponse) Reset()

func (*SubscribeOnionPayloadResponse) String

type UnimplementedOffersServer

type UnimplementedOffersServer struct {
}

UnimplementedOffersServer must be embedded to have forward compatible implementations.

func (UnimplementedOffersServer) DecodeOffer

func (UnimplementedOffersServer) SendOnionMessage

type UnsafeOffersServer

type UnsafeOffersServer interface {
	// contains filtered or unexported methods
}

UnsafeOffersServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to OffersServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL