Documentation ¶
Overview ¶
Package tapchannelrpc is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterTaprootAssetChannelsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterTaprootAssetChannelsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TaprootAssetChannelsClient) error
- func RegisterTaprootAssetChannelsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterTaprootAssetChannelsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TaprootAssetChannelsServer) error
- func RegisterTaprootAssetChannelsJSONCallbacks(...)
- func RegisterTaprootAssetChannelsServer(s grpc.ServiceRegistrar, srv TaprootAssetChannelsServer)
- type EncodeCustomRecordsRequest
- func (*EncodeCustomRecordsRequest) Descriptor() ([]byte, []int)deprecated
- func (m *EncodeCustomRecordsRequest) GetInput() isEncodeCustomRecordsRequest_Input
- func (x *EncodeCustomRecordsRequest) GetRouterSendPayment() *RouterSendPaymentData
- func (*EncodeCustomRecordsRequest) ProtoMessage()
- func (x *EncodeCustomRecordsRequest) ProtoReflect() protoreflect.Message
- func (x *EncodeCustomRecordsRequest) Reset()
- func (x *EncodeCustomRecordsRequest) String() string
- type EncodeCustomRecordsRequest_RouterSendPayment
- type EncodeCustomRecordsResponse
- func (*EncodeCustomRecordsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *EncodeCustomRecordsResponse) GetCustomRecords() map[uint64][]byte
- func (*EncodeCustomRecordsResponse) ProtoMessage()
- func (x *EncodeCustomRecordsResponse) ProtoReflect() protoreflect.Message
- func (x *EncodeCustomRecordsResponse) Reset()
- func (x *EncodeCustomRecordsResponse) String() string
- type FundChannelRequest
- func (*FundChannelRequest) Descriptor() ([]byte, []int)deprecated
- func (x *FundChannelRequest) GetAssetAmount() uint64
- func (x *FundChannelRequest) GetAssetId() []byte
- func (x *FundChannelRequest) GetFeeRateSatPerVbyte() uint32
- func (x *FundChannelRequest) GetPeerPubkey() []byte
- func (x *FundChannelRequest) GetPushSat() int64
- func (*FundChannelRequest) ProtoMessage()
- func (x *FundChannelRequest) ProtoReflect() protoreflect.Message
- func (x *FundChannelRequest) Reset()
- func (x *FundChannelRequest) String() string
- type FundChannelResponse
- func (*FundChannelResponse) Descriptor() ([]byte, []int)deprecated
- func (x *FundChannelResponse) GetOutputIndex() int32
- func (x *FundChannelResponse) GetTxid() string
- func (*FundChannelResponse) ProtoMessage()
- func (x *FundChannelResponse) ProtoReflect() protoreflect.Message
- func (x *FundChannelResponse) Reset()
- func (x *FundChannelResponse) String() string
- type RouterSendPaymentData
- func (*RouterSendPaymentData) Descriptor() ([]byte, []int)deprecated
- func (x *RouterSendPaymentData) GetAssetAmounts() map[string]uint64
- func (x *RouterSendPaymentData) GetRfqId() []byte
- func (*RouterSendPaymentData) ProtoMessage()
- func (x *RouterSendPaymentData) ProtoReflect() protoreflect.Message
- func (x *RouterSendPaymentData) Reset()
- func (x *RouterSendPaymentData) String() string
- type TaprootAssetChannelsClient
- type TaprootAssetChannelsServer
- type UnimplementedTaprootAssetChannelsServer
- type UnsafeTaprootAssetChannelsServer
Constants ¶
This section is empty.
Variables ¶
var File_tapchannelrpc_tapchannel_proto protoreflect.FileDescriptor
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, }, }, Streams: []grpc.StreamDesc{}, 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 RegisterTaprootAssetChannelsServer ¶
func RegisterTaprootAssetChannelsServer(s grpc.ServiceRegistrar, srv TaprootAssetChannelsServer)
Types ¶
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 (x *EncodeCustomRecordsRequest) ProtoReflect() protoreflect.Message
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 (x *EncodeCustomRecordsResponse) ProtoReflect() protoreflect.Message
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 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 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) }
TaprootAssetChannelsClient is the client API for TaprootAssetChannels 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 NewTaprootAssetChannelsClient ¶
func NewTaprootAssetChannelsClient(cc grpc.ClientConnInterface) TaprootAssetChannelsClient
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) // contains filtered or unexported methods }
TaprootAssetChannelsServer is the server API for TaprootAssetChannels service. All implementations must embed UnimplementedTaprootAssetChannelsServer for forward compatibility
type UnimplementedTaprootAssetChannelsServer ¶
type UnimplementedTaprootAssetChannelsServer struct { }
UnimplementedTaprootAssetChannelsServer must be embedded to have forward compatible implementations.
func (UnimplementedTaprootAssetChannelsServer) EncodeCustomRecords ¶
func (UnimplementedTaprootAssetChannelsServer) EncodeCustomRecords(context.Context, *EncodeCustomRecordsRequest) (*EncodeCustomRecordsResponse, error)
func (UnimplementedTaprootAssetChannelsServer) FundChannel ¶
func (UnimplementedTaprootAssetChannelsServer) FundChannel(context.Context, *FundChannelRequest) (*FundChannelResponse, error)
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.