tapchannelrpc

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: MIT Imports: 20 Imported by: 3

Documentation

Overview

Package tapchannelrpc is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_tapchannelrpc_tapchannel_proto protoreflect.FileDescriptor
View Source
var TaprootAssetChannels_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "tapchannelrpc.TaprootAssetChannels",
	HandlerType: (*TaprootAssetChannelsServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "FundChannel",
			Handler:    _TaprootAssetChannels_FundChannel_Handler,
		},
		{
			MethodName: "EncodeCustomRecords",
			Handler:    _TaprootAssetChannels_EncodeCustomRecords_Handler,
		},
		{
			MethodName: "AddInvoice",
			Handler:    _TaprootAssetChannels_AddInvoice_Handler,
		},
		{
			MethodName: "DecodeAssetPayReq",
			Handler:    _TaprootAssetChannels_DecodeAssetPayReq_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "SendPayment",
			Handler:       _TaprootAssetChannels_SendPayment_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "tapchannelrpc/tapchannel.proto",
}

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

Functions

func RegisterTaprootAssetChannelsHandler

func RegisterTaprootAssetChannelsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterTaprootAssetChannelsHandler registers the http handlers for service TaprootAssetChannels to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterTaprootAssetChannelsHandlerClient

func RegisterTaprootAssetChannelsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TaprootAssetChannelsClient) error

RegisterTaprootAssetChannelsHandlerClient registers the http handlers for service TaprootAssetChannels to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TaprootAssetChannelsClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TaprootAssetChannelsClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "TaprootAssetChannelsClient" to call the correct interceptors.

func RegisterTaprootAssetChannelsHandlerFromEndpoint

func RegisterTaprootAssetChannelsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterTaprootAssetChannelsHandlerFromEndpoint is same as RegisterTaprootAssetChannelsHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterTaprootAssetChannelsHandlerServer

func RegisterTaprootAssetChannelsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TaprootAssetChannelsServer) error

RegisterTaprootAssetChannelsHandlerServer registers the http handlers for service TaprootAssetChannels to "mux". UnaryRPC :call TaprootAssetChannelsServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterTaprootAssetChannelsHandlerFromEndpoint instead.

func RegisterTaprootAssetChannelsJSONCallbacks

func RegisterTaprootAssetChannelsJSONCallbacks(registry map[string]func(ctx context.Context,
	conn *grpc.ClientConn, reqJSON string, callback func(string, error)))

func RegisterTaprootAssetChannelsServer

func RegisterTaprootAssetChannelsServer(s grpc.ServiceRegistrar, srv TaprootAssetChannelsServer)

Types

type AddInvoiceRequest added in v0.5.0

type AddInvoiceRequest struct {

	// The asset ID to use for the invoice.
	AssetId []byte `protobuf:"bytes,1,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"`
	// The asset amount to receive.
	AssetAmount uint64 `protobuf:"varint,2,opt,name=asset_amount,json=assetAmount,proto3" json:"asset_amount,omitempty"`
	// The node identity public key of the peer to ask for a quote for receiving
	// assets and converting them from satoshis. This must be specified if
	// there are multiple channels with the given asset ID.
	PeerPubkey []byte `protobuf:"bytes,3,opt,name=peer_pubkey,json=peerPubkey,proto3" json:"peer_pubkey,omitempty"`
	// The full lnd invoice request to send. All fields (except for the value
	// and the route hints) behave the same way as they do for lnd's
	// lnrpc.AddInvoice RPC method (see the API docs at
	// https://lightning.engineering/api-docs/api/lnd/lightning/add-invoice
	// for more details). The value/value_msat fields will be overwritten by the
	// satoshi (or milli-satoshi) equivalent of the asset amount, after
	// negotiating a quote with a peer that supports the given asset ID.
	InvoiceRequest *lnrpc.Invoice `protobuf:"bytes,4,opt,name=invoice_request,json=invoiceRequest,proto3" json:"invoice_request,omitempty"`
	// If set, then this will make the invoice created a hodl invoice, which
	// won't be settled automatically. Instead, users will need to use the
	// invoicesrpc.SettleInvoice call to manually settle the invoice.
	HodlInvoice *HodlInvoice `protobuf:"bytes,5,opt,name=hodl_invoice,json=hodlInvoice,proto3" json:"hodl_invoice,omitempty"`
	// contains filtered or unexported fields
}

func (*AddInvoiceRequest) Descriptor deprecated added in v0.5.0

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

Deprecated: Use AddInvoiceRequest.ProtoReflect.Descriptor instead.

func (*AddInvoiceRequest) GetAssetAmount added in v0.5.0

func (x *AddInvoiceRequest) GetAssetAmount() uint64

func (*AddInvoiceRequest) GetAssetId added in v0.5.0

func (x *AddInvoiceRequest) GetAssetId() []byte

func (*AddInvoiceRequest) GetHodlInvoice added in v0.5.0

func (x *AddInvoiceRequest) GetHodlInvoice() *HodlInvoice

func (*AddInvoiceRequest) GetInvoiceRequest added in v0.5.0

func (x *AddInvoiceRequest) GetInvoiceRequest() *lnrpc.Invoice

func (*AddInvoiceRequest) GetPeerPubkey added in v0.5.0

func (x *AddInvoiceRequest) GetPeerPubkey() []byte

func (*AddInvoiceRequest) ProtoMessage added in v0.5.0

func (*AddInvoiceRequest) ProtoMessage()

func (*AddInvoiceRequest) ProtoReflect added in v0.5.0

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

func (*AddInvoiceRequest) Reset added in v0.5.0

func (x *AddInvoiceRequest) Reset()

func (*AddInvoiceRequest) String added in v0.5.0

func (x *AddInvoiceRequest) String() string

type AddInvoiceResponse added in v0.5.0

type AddInvoiceResponse struct {

	// The quote for the purchase of assets that was accepted by the peer.
	AcceptedBuyQuote *rfqrpc.PeerAcceptedBuyQuote `protobuf:"bytes,1,opt,name=accepted_buy_quote,json=acceptedBuyQuote,proto3" json:"accepted_buy_quote,omitempty"`
	// The result of the invoice creation.
	InvoiceResult *lnrpc.AddInvoiceResponse `protobuf:"bytes,2,opt,name=invoice_result,json=invoiceResult,proto3" json:"invoice_result,omitempty"`
	// contains filtered or unexported fields
}

func (*AddInvoiceResponse) Descriptor deprecated added in v0.5.0

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

Deprecated: Use AddInvoiceResponse.ProtoReflect.Descriptor instead.

func (*AddInvoiceResponse) GetAcceptedBuyQuote added in v0.5.0

func (x *AddInvoiceResponse) GetAcceptedBuyQuote() *rfqrpc.PeerAcceptedBuyQuote

func (*AddInvoiceResponse) GetInvoiceResult added in v0.5.0

func (x *AddInvoiceResponse) GetInvoiceResult() *lnrpc.AddInvoiceResponse

func (*AddInvoiceResponse) ProtoMessage added in v0.5.0

func (*AddInvoiceResponse) ProtoMessage()

func (*AddInvoiceResponse) ProtoReflect added in v0.5.0

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

func (*AddInvoiceResponse) Reset added in v0.5.0

func (x *AddInvoiceResponse) Reset()

func (*AddInvoiceResponse) String added in v0.5.0

func (x *AddInvoiceResponse) String() string

type AssetPayReq added in v0.5.0

type AssetPayReq struct {

	// The asset ID that will be used to resolve the invoice's satoshi amount.
	AssetId []byte `protobuf:"bytes,1,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"`
	// The normal LN invoice that whose amount will be mapped to units of the
	// asset ID.
	PayReqString string `protobuf:"bytes,2,opt,name=pay_req_string,json=payReqString,proto3" json:"pay_req_string,omitempty"`
	// contains filtered or unexported fields
}

func (*AssetPayReq) Descriptor deprecated added in v0.5.0

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

Deprecated: Use AssetPayReq.ProtoReflect.Descriptor instead.

func (*AssetPayReq) GetAssetId added in v0.5.0

func (x *AssetPayReq) GetAssetId() []byte

func (*AssetPayReq) GetPayReqString added in v0.5.0

func (x *AssetPayReq) GetPayReqString() string

func (*AssetPayReq) ProtoMessage added in v0.5.0

func (*AssetPayReq) ProtoMessage()

func (*AssetPayReq) ProtoReflect added in v0.5.0

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

func (*AssetPayReq) Reset added in v0.5.0

func (x *AssetPayReq) Reset()

func (*AssetPayReq) String added in v0.5.0

func (x *AssetPayReq) String() string

type AssetPayReqResponse added in v0.5.0

type AssetPayReqResponse struct {

	// The invoice amount, expressed in asset units.
	AssetAmount uint64 `protobuf:"varint,1,opt,name=asset_amount,json=assetAmount,proto3" json:"asset_amount,omitempty"`
	// The decimal display corresponding to the asset_id.
	DecimalDisplay *taprpc.DecimalDisplay `protobuf:"bytes,2,opt,name=decimal_display,json=decimalDisplay,proto3" json:"decimal_display,omitempty"`
	// The group the asset ID belong to, if applicable.
	AssetGroup *taprpc.AssetGroup `protobuf:"bytes,3,opt,name=asset_group,json=assetGroup,proto3" json:"asset_group,omitempty"`
	// Genesis information for the asset ID which includes the meta hash, and
	// asset ID.
	GenesisInfo *taprpc.GenesisInfo `protobuf:"bytes,4,opt,name=genesis_info,json=genesisInfo,proto3" json:"genesis_info,omitempty"`
	// The normal decoded payment request.
	PayReq *lnrpc.PayReq `protobuf:"bytes,5,opt,name=pay_req,json=payReq,proto3" json:"pay_req,omitempty"`
	// contains filtered or unexported fields
}

func (*AssetPayReqResponse) Descriptor deprecated added in v0.5.0

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

Deprecated: Use AssetPayReqResponse.ProtoReflect.Descriptor instead.

func (*AssetPayReqResponse) GetAssetAmount added in v0.5.0

func (x *AssetPayReqResponse) GetAssetAmount() uint64

func (*AssetPayReqResponse) GetAssetGroup added in v0.5.0

func (x *AssetPayReqResponse) GetAssetGroup() *taprpc.AssetGroup

func (*AssetPayReqResponse) GetDecimalDisplay added in v0.5.0

func (x *AssetPayReqResponse) GetDecimalDisplay() *taprpc.DecimalDisplay

func (*AssetPayReqResponse) GetGenesisInfo added in v0.5.0

func (x *AssetPayReqResponse) GetGenesisInfo() *taprpc.GenesisInfo

func (*AssetPayReqResponse) GetPayReq added in v0.5.0

func (x *AssetPayReqResponse) GetPayReq() *lnrpc.PayReq

func (*AssetPayReqResponse) ProtoMessage added in v0.5.0

func (*AssetPayReqResponse) ProtoMessage()

func (*AssetPayReqResponse) ProtoReflect added in v0.5.0

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

func (*AssetPayReqResponse) Reset added in v0.5.0

func (x *AssetPayReqResponse) Reset()

func (*AssetPayReqResponse) String added in v0.5.0

func (x *AssetPayReqResponse) String() string

type EncodeCustomRecordsRequest

type EncodeCustomRecordsRequest struct {

	// Types that are assignable to Input:
	//
	//	*EncodeCustomRecordsRequest_RouterSendPayment
	Input isEncodeCustomRecordsRequest_Input `protobuf_oneof:"input"`
	// contains filtered or unexported fields
}

func (*EncodeCustomRecordsRequest) Descriptor deprecated

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

Deprecated: Use EncodeCustomRecordsRequest.ProtoReflect.Descriptor instead.

func (*EncodeCustomRecordsRequest) GetInput

func (m *EncodeCustomRecordsRequest) GetInput() isEncodeCustomRecordsRequest_Input

func (*EncodeCustomRecordsRequest) GetRouterSendPayment

func (x *EncodeCustomRecordsRequest) GetRouterSendPayment() *RouterSendPaymentData

func (*EncodeCustomRecordsRequest) ProtoMessage

func (*EncodeCustomRecordsRequest) ProtoMessage()

func (*EncodeCustomRecordsRequest) ProtoReflect

func (*EncodeCustomRecordsRequest) Reset

func (x *EncodeCustomRecordsRequest) Reset()

func (*EncodeCustomRecordsRequest) String

func (x *EncodeCustomRecordsRequest) String() string

type EncodeCustomRecordsRequest_RouterSendPayment

type EncodeCustomRecordsRequest_RouterSendPayment struct {
	RouterSendPayment *RouterSendPaymentData `protobuf:"bytes,1,opt,name=router_send_payment,json=routerSendPayment,proto3,oneof"`
}

type EncodeCustomRecordsResponse

type EncodeCustomRecordsResponse struct {

	// The encoded custom records in TLV format.
	CustomRecords map[uint64][]byte `` /* 189-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*EncodeCustomRecordsResponse) Descriptor deprecated

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

Deprecated: Use EncodeCustomRecordsResponse.ProtoReflect.Descriptor instead.

func (*EncodeCustomRecordsResponse) GetCustomRecords

func (x *EncodeCustomRecordsResponse) GetCustomRecords() map[uint64][]byte

func (*EncodeCustomRecordsResponse) ProtoMessage

func (*EncodeCustomRecordsResponse) ProtoMessage()

func (*EncodeCustomRecordsResponse) ProtoReflect

func (*EncodeCustomRecordsResponse) Reset

func (x *EncodeCustomRecordsResponse) Reset()

func (*EncodeCustomRecordsResponse) String

func (x *EncodeCustomRecordsResponse) String() string

type FundChannelRequest

type FundChannelRequest struct {

	// The asset amount to fund the channel with. The BTC amount is fixed and
	// cannot be customized (for now).
	AssetAmount uint64 `protobuf:"varint,1,opt,name=asset_amount,json=assetAmount,proto3" json:"asset_amount,omitempty"`
	// The asset ID to use for the channel funding.
	AssetId []byte `protobuf:"bytes,2,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"`
	// The public key of the peer to open the channel with. Must already be
	// connected to this peer.
	PeerPubkey []byte `protobuf:"bytes,3,opt,name=peer_pubkey,json=peerPubkey,proto3" json:"peer_pubkey,omitempty"`
	// The channel funding fee rate in sat/vByte.
	FeeRateSatPerVbyte uint32 `protobuf:"varint,4,opt,name=fee_rate_sat_per_vbyte,json=feeRateSatPerVbyte,proto3" json:"fee_rate_sat_per_vbyte,omitempty"`
	// The number of satoshis to give the remote side as part of the initial
	// commitment state. This is equivalent to first opening a channel and then
	// sending the remote party funds, but all done in one step. Therefore, this
	// is equivalent to a donation to the remote party, unless they reimburse
	// the funds in another way (outside the protocol).
	PushSat int64 `protobuf:"varint,5,opt,name=push_sat,json=pushSat,proto3" json:"push_sat,omitempty"`
	// contains filtered or unexported fields
}

func (*FundChannelRequest) Descriptor deprecated

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

Deprecated: Use FundChannelRequest.ProtoReflect.Descriptor instead.

func (*FundChannelRequest) GetAssetAmount

func (x *FundChannelRequest) GetAssetAmount() uint64

func (*FundChannelRequest) GetAssetId

func (x *FundChannelRequest) GetAssetId() []byte

func (*FundChannelRequest) GetFeeRateSatPerVbyte

func (x *FundChannelRequest) GetFeeRateSatPerVbyte() uint32

func (*FundChannelRequest) GetPeerPubkey

func (x *FundChannelRequest) GetPeerPubkey() []byte

func (*FundChannelRequest) GetPushSat

func (x *FundChannelRequest) GetPushSat() int64

func (*FundChannelRequest) ProtoMessage

func (*FundChannelRequest) ProtoMessage()

func (*FundChannelRequest) ProtoReflect

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

func (*FundChannelRequest) Reset

func (x *FundChannelRequest) Reset()

func (*FundChannelRequest) String

func (x *FundChannelRequest) String() string

type FundChannelResponse

type FundChannelResponse struct {

	// The channel funding transaction ID.
	Txid string `protobuf:"bytes,1,opt,name=txid,proto3" json:"txid,omitempty"`
	// The index of the channel funding output in the funding transaction.
	OutputIndex int32 `protobuf:"varint,2,opt,name=output_index,json=outputIndex,proto3" json:"output_index,omitempty"`
	// contains filtered or unexported fields
}

func (*FundChannelResponse) Descriptor deprecated

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

Deprecated: Use FundChannelResponse.ProtoReflect.Descriptor instead.

func (*FundChannelResponse) GetOutputIndex

func (x *FundChannelResponse) GetOutputIndex() int32

func (*FundChannelResponse) GetTxid

func (x *FundChannelResponse) GetTxid() string

func (*FundChannelResponse) ProtoMessage

func (*FundChannelResponse) ProtoMessage()

func (*FundChannelResponse) ProtoReflect

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

func (*FundChannelResponse) Reset

func (x *FundChannelResponse) Reset()

func (*FundChannelResponse) String

func (x *FundChannelResponse) String() string

type HodlInvoice added in v0.5.0

type HodlInvoice struct {
	PaymentHash []byte `protobuf:"bytes,1,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
	// contains filtered or unexported fields
}

func (*HodlInvoice) Descriptor deprecated added in v0.5.0

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

Deprecated: Use HodlInvoice.ProtoReflect.Descriptor instead.

func (*HodlInvoice) GetPaymentHash added in v0.5.0

func (x *HodlInvoice) GetPaymentHash() []byte

func (*HodlInvoice) ProtoMessage added in v0.5.0

func (*HodlInvoice) ProtoMessage()

func (*HodlInvoice) ProtoReflect added in v0.5.0

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

func (*HodlInvoice) Reset added in v0.5.0

func (x *HodlInvoice) Reset()

func (*HodlInvoice) String added in v0.5.0

func (x *HodlInvoice) String() string

type RouterSendPaymentData

type RouterSendPaymentData struct {

	// The string encoded asset ID to amount mapping. Instructs the router to
	// use these assets in the given amounts for the payment. Can be empty for
	// a payment of an invoice, if the RFQ ID is set instead.
	AssetAmounts map[string]uint64 `` /* 186-byte string literal not displayed */
	// The RFQ ID to use for the payment. Can be empty for a direct keysend
	// payment that doesn't involve any conversion (and thus no RFQ).
	RfqId []byte `protobuf:"bytes,2,opt,name=rfq_id,json=rfqId,proto3" json:"rfq_id,omitempty"`
	// contains filtered or unexported fields
}

func (*RouterSendPaymentData) Descriptor deprecated

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

Deprecated: Use RouterSendPaymentData.ProtoReflect.Descriptor instead.

func (*RouterSendPaymentData) GetAssetAmounts

func (x *RouterSendPaymentData) GetAssetAmounts() map[string]uint64

func (*RouterSendPaymentData) GetRfqId

func (x *RouterSendPaymentData) GetRfqId() []byte

func (*RouterSendPaymentData) ProtoMessage

func (*RouterSendPaymentData) ProtoMessage()

func (*RouterSendPaymentData) ProtoReflect

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

func (*RouterSendPaymentData) Reset

func (x *RouterSendPaymentData) Reset()

func (*RouterSendPaymentData) String

func (x *RouterSendPaymentData) String() string

type SendPaymentRequest added in v0.5.0

type SendPaymentRequest struct {

	// The asset ID to use for the payment. This must be set for both invoice
	// and keysend payments, unless RFQ negotiation was already done beforehand
	// and payment_request.first_hop_custom_records already contains valid RFQ
	// data.
	AssetId []byte `protobuf:"bytes,1,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"`
	// The asset amount to send in a keysend payment. This amount is ignored for
	// invoice payments as the asset amount is negotiated through RFQ with the
	// peer, depending on the invoice amount. This can also be left unset if RFQ
	// negotiation was already done beforehand and
	// payment_request.first_hop_custom_records already contains valid RFQ data.
	AssetAmount uint64 `protobuf:"varint,2,opt,name=asset_amount,json=assetAmount,proto3" json:"asset_amount,omitempty"`
	// The node identity public key of the peer to ask for a quote for sending
	// out the assets and converting them to satoshis. This must be specified if
	// there are multiple channels with the given asset ID.
	PeerPubkey []byte `protobuf:"bytes,3,opt,name=peer_pubkey,json=peerPubkey,proto3" json:"peer_pubkey,omitempty"`
	// The full lnd payment request to send. All fields behave the same way as
	// they do for lnd's routerrpc.SendPaymentV2 RPC method (see the API docs
	// at https://lightning.engineering/api-docs/api/lnd/router/send-payment-v2
	// for more details).
	// To send a keysend payment, the payment_request.dest_custom_records must
	// contain a valid keysend record (key 5482373484 and a 32-byte preimage
	// that corresponds to the payment hash).
	PaymentRequest *routerrpc.SendPaymentRequest `protobuf:"bytes,4,opt,name=payment_request,json=paymentRequest,proto3" json:"payment_request,omitempty"`
	// The rfq id to use for this payment. If the user sets this value then the
	// payment will immediately be dispatched, skipping the rfq negotiation
	// phase, and using the following rfq id instead.
	RfqId []byte `protobuf:"bytes,5,opt,name=rfq_id,json=rfqId,proto3" json:"rfq_id,omitempty"`
	// If a small invoice should be paid that is below the amount that always
	// needs to be sent out to carry a single asset unit, then by default the
	// payment is rejected. If this flag is set, then the payment will be
	// allowed to proceed, even if it is uneconomical, meaning that more sats
	// are sent out to the network than the invoice amount plus routing fees
	// require to be paid.
	AllowOverpay bool `protobuf:"varint,6,opt,name=allow_overpay,json=allowOverpay,proto3" json:"allow_overpay,omitempty"`
	// contains filtered or unexported fields
}

func (*SendPaymentRequest) Descriptor deprecated added in v0.5.0

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

Deprecated: Use SendPaymentRequest.ProtoReflect.Descriptor instead.

func (*SendPaymentRequest) GetAllowOverpay added in v0.5.0

func (x *SendPaymentRequest) GetAllowOverpay() bool

func (*SendPaymentRequest) GetAssetAmount added in v0.5.0

func (x *SendPaymentRequest) GetAssetAmount() uint64

func (*SendPaymentRequest) GetAssetId added in v0.5.0

func (x *SendPaymentRequest) GetAssetId() []byte

func (*SendPaymentRequest) GetPaymentRequest added in v0.5.0

func (x *SendPaymentRequest) GetPaymentRequest() *routerrpc.SendPaymentRequest

func (*SendPaymentRequest) GetPeerPubkey added in v0.5.0

func (x *SendPaymentRequest) GetPeerPubkey() []byte

func (*SendPaymentRequest) GetRfqId added in v0.5.0

func (x *SendPaymentRequest) GetRfqId() []byte

func (*SendPaymentRequest) ProtoMessage added in v0.5.0

func (*SendPaymentRequest) ProtoMessage()

func (*SendPaymentRequest) ProtoReflect added in v0.5.0

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

func (*SendPaymentRequest) Reset added in v0.5.0

func (x *SendPaymentRequest) Reset()

func (*SendPaymentRequest) String added in v0.5.0

func (x *SendPaymentRequest) String() string

type SendPaymentResponse added in v0.5.0

type SendPaymentResponse struct {

	// Types that are assignable to Result:
	//
	//	*SendPaymentResponse_AcceptedSellOrder
	//	*SendPaymentResponse_PaymentResult
	Result isSendPaymentResponse_Result `protobuf_oneof:"result"`
	// contains filtered or unexported fields
}

func (*SendPaymentResponse) Descriptor deprecated added in v0.5.0

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

Deprecated: Use SendPaymentResponse.ProtoReflect.Descriptor instead.

func (*SendPaymentResponse) GetAcceptedSellOrder added in v0.5.0

func (x *SendPaymentResponse) GetAcceptedSellOrder() *rfqrpc.PeerAcceptedSellQuote

func (*SendPaymentResponse) GetPaymentResult added in v0.5.0

func (x *SendPaymentResponse) GetPaymentResult() *lnrpc.Payment

func (*SendPaymentResponse) GetResult added in v0.5.0

func (m *SendPaymentResponse) GetResult() isSendPaymentResponse_Result

func (*SendPaymentResponse) ProtoMessage added in v0.5.0

func (*SendPaymentResponse) ProtoMessage()

func (*SendPaymentResponse) ProtoReflect added in v0.5.0

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

func (*SendPaymentResponse) Reset added in v0.5.0

func (x *SendPaymentResponse) Reset()

func (*SendPaymentResponse) String added in v0.5.0

func (x *SendPaymentResponse) String() string

type SendPaymentResponse_AcceptedSellOrder added in v0.5.0

type SendPaymentResponse_AcceptedSellOrder struct {
	// In case channel assets need to be swapped to another asset, an asset
	// sell order is negotiated with the channel peer. The result will be
	// the first message in the response stream. If no swap is needed, the
	// payment results will be streamed directly.
	AcceptedSellOrder *rfqrpc.PeerAcceptedSellQuote `protobuf:"bytes,1,opt,name=accepted_sell_order,json=acceptedSellOrder,proto3,oneof"`
}

type SendPaymentResponse_PaymentResult added in v0.5.0

type SendPaymentResponse_PaymentResult struct {
	// The payment result of a single payment attempt. Multiple attempts may
	// be returned per payment request until either the payment succeeds or
	// the payment times out.
	PaymentResult *lnrpc.Payment `protobuf:"bytes,2,opt,name=payment_result,json=paymentResult,proto3,oneof"`
}

type TaprootAssetChannelsClient

type TaprootAssetChannelsClient interface {
	// FundChannel initiates the channel funding negotiation with a peer for the
	// creation of a channel that contains a specified amount of a given asset.
	FundChannel(ctx context.Context, in *FundChannelRequest, opts ...grpc.CallOption) (*FundChannelResponse, error)
	// EncodeCustomRecords allows RPC users to encode Taproot Asset channel related
	// data into the TLV format that is used in the custom records of the lnd
	// payment or other channel related RPCs. This RPC is completely stateless and
	// does not perform any checks on the data provided, other than pure format
	// validation.
	EncodeCustomRecords(ctx context.Context, in *EncodeCustomRecordsRequest, opts ...grpc.CallOption) (*EncodeCustomRecordsResponse, error)
	// SendPayment is a wrapper around lnd's routerrpc.SendPaymentV2 RPC method
	// with asset specific parameters. It allows RPC users to send asset keysend
	// payments (direct payments) or payments to an invoice with a specified asset
	// amount.
	SendPayment(ctx context.Context, in *SendPaymentRequest, opts ...grpc.CallOption) (TaprootAssetChannels_SendPaymentClient, error)
	// AddInvoice is a wrapper around lnd's lnrpc.AddInvoice method with asset
	// specific parameters. It allows RPC users to create invoices that correspond
	// to the specified asset amount.
	AddInvoice(ctx context.Context, in *AddInvoiceRequest, opts ...grpc.CallOption) (*AddInvoiceResponse, error)
	// DecodeAssetPayReq is similar to lnd's lnrpc.DecodePayReq, but it accepts an
	// asset ID and returns the invoice amount expressed in asset units along side
	// the normal information.
	DecodeAssetPayReq(ctx context.Context, in *AssetPayReq, opts ...grpc.CallOption) (*AssetPayReqResponse, error)
}

TaprootAssetChannelsClient is the client API for TaprootAssetChannels service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkgo.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type TaprootAssetChannelsServer

type TaprootAssetChannelsServer interface {
	// FundChannel initiates the channel funding negotiation with a peer for the
	// creation of a channel that contains a specified amount of a given asset.
	FundChannel(context.Context, *FundChannelRequest) (*FundChannelResponse, error)
	// EncodeCustomRecords allows RPC users to encode Taproot Asset channel related
	// data into the TLV format that is used in the custom records of the lnd
	// payment or other channel related RPCs. This RPC is completely stateless and
	// does not perform any checks on the data provided, other than pure format
	// validation.
	EncodeCustomRecords(context.Context, *EncodeCustomRecordsRequest) (*EncodeCustomRecordsResponse, error)
	// SendPayment is a wrapper around lnd's routerrpc.SendPaymentV2 RPC method
	// with asset specific parameters. It allows RPC users to send asset keysend
	// payments (direct payments) or payments to an invoice with a specified asset
	// amount.
	SendPayment(*SendPaymentRequest, TaprootAssetChannels_SendPaymentServer) error
	// AddInvoice is a wrapper around lnd's lnrpc.AddInvoice method with asset
	// specific parameters. It allows RPC users to create invoices that correspond
	// to the specified asset amount.
	AddInvoice(context.Context, *AddInvoiceRequest) (*AddInvoiceResponse, error)
	// DecodeAssetPayReq is similar to lnd's lnrpc.DecodePayReq, but it accepts an
	// asset ID and returns the invoice amount expressed in asset units along side
	// the normal information.
	DecodeAssetPayReq(context.Context, *AssetPayReq) (*AssetPayReqResponse, error)
	// contains filtered or unexported methods
}

TaprootAssetChannelsServer is the server API for TaprootAssetChannels service. All implementations must embed UnimplementedTaprootAssetChannelsServer for forward compatibility

type TaprootAssetChannels_SendPaymentClient added in v0.5.0

type TaprootAssetChannels_SendPaymentClient interface {
	Recv() (*SendPaymentResponse, error)
	grpc.ClientStream
}

type TaprootAssetChannels_SendPaymentServer added in v0.5.0

type TaprootAssetChannels_SendPaymentServer interface {
	Send(*SendPaymentResponse) error
	grpc.ServerStream
}

type UnimplementedTaprootAssetChannelsServer

type UnimplementedTaprootAssetChannelsServer struct {
}

UnimplementedTaprootAssetChannelsServer must be embedded to have forward compatible implementations.

func (UnimplementedTaprootAssetChannelsServer) AddInvoice added in v0.5.0

func (UnimplementedTaprootAssetChannelsServer) DecodeAssetPayReq added in v0.5.0

func (UnimplementedTaprootAssetChannelsServer) EncodeCustomRecords

func (UnimplementedTaprootAssetChannelsServer) FundChannel

func (UnimplementedTaprootAssetChannelsServer) SendPayment added in v0.5.0

type UnsafeTaprootAssetChannelsServer

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳