Documentation ¶
Overview ¶
Package peerswaprpc is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterPeerSwapHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterPeerSwapHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PeerSwapClient) error
- func RegisterPeerSwapHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterPeerSwapHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PeerSwapServer) error
- func RegisterPeerSwapServer(s grpc.ServiceRegistrar, srv PeerSwapServer)
- type AddPeerRequest
- type AllowSwapRequestsRequest
- func (*AllowSwapRequestsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AllowSwapRequestsRequest) GetAllow() bool
- func (*AllowSwapRequestsRequest) ProtoMessage()
- func (x *AllowSwapRequestsRequest) ProtoReflect() protoreflect.Message
- func (x *AllowSwapRequestsRequest) Reset()
- func (x *AllowSwapRequestsRequest) String() string
- type AllowSwapRequestsResponse
- func (*AllowSwapRequestsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AllowSwapRequestsResponse) GetAllow() bool
- func (*AllowSwapRequestsResponse) ProtoMessage()
- func (x *AllowSwapRequestsResponse) ProtoReflect() protoreflect.Message
- func (x *AllowSwapRequestsResponse) Reset()
- func (x *AllowSwapRequestsResponse) String() string
- type Empty
- type GetAddressRequest
- type GetAddressResponse
- func (*GetAddressResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetAddressResponse) GetAddress() string
- func (*GetAddressResponse) ProtoMessage()
- func (x *GetAddressResponse) ProtoReflect() protoreflect.Message
- func (x *GetAddressResponse) Reset()
- func (x *GetAddressResponse) String() string
- type GetBalanceRequest
- type GetBalanceResponse
- func (*GetBalanceResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetBalanceResponse) GetSatAmount() uint64
- func (*GetBalanceResponse) ProtoMessage()
- func (x *GetBalanceResponse) ProtoReflect() protoreflect.Message
- func (x *GetBalanceResponse) Reset()
- func (x *GetBalanceResponse) String() string
- type GetSwapRequest
- type ListPeersRequest
- type ListPeersResponse
- func (*ListPeersResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListPeersResponse) GetPeers() []*PeerSwapPeer
- func (*ListPeersResponse) ProtoMessage()
- func (x *ListPeersResponse) ProtoReflect() protoreflect.Message
- func (x *ListPeersResponse) Reset()
- func (x *ListPeersResponse) String() string
- type ListRequestedSwapsRequest
- type ListRequestedSwapsResponse
- func (*ListRequestedSwapsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListRequestedSwapsResponse) GetRequestedSwaps() map[string]*RequestSwapList
- func (*ListRequestedSwapsResponse) ProtoMessage()
- func (x *ListRequestedSwapsResponse) ProtoReflect() protoreflect.Message
- func (x *ListRequestedSwapsResponse) Reset()
- func (x *ListRequestedSwapsResponse) String() string
- type ListSwapsRequest
- type ListSwapsResponse
- func (*ListSwapsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListSwapsResponse) GetSwaps() []*PrettyPrintSwap
- func (*ListSwapsResponse) ProtoMessage()
- func (x *ListSwapsResponse) ProtoReflect() protoreflect.Message
- func (x *ListSwapsResponse) Reset()
- func (x *ListSwapsResponse) String() string
- type PeerSwapClient
- type PeerSwapNodes
- type PeerSwapPeer
- func (*PeerSwapPeer) Descriptor() ([]byte, []int)deprecated
- func (x *PeerSwapPeer) GetAsReceiver() *SwapStats
- func (x *PeerSwapPeer) GetAsSender() *SwapStats
- func (x *PeerSwapPeer) GetChannels() []*PeerSwapPeerChannel
- func (x *PeerSwapPeer) GetNodeId() string
- func (x *PeerSwapPeer) GetPaidFee() uint64
- func (x *PeerSwapPeer) GetSupportedAssets() []string
- func (x *PeerSwapPeer) GetSwapsAllowed() bool
- func (*PeerSwapPeer) ProtoMessage()
- func (x *PeerSwapPeer) ProtoReflect() protoreflect.Message
- func (x *PeerSwapPeer) Reset()
- func (x *PeerSwapPeer) String() string
- type PeerSwapPeerChannel
- func (*PeerSwapPeerChannel) Descriptor() ([]byte, []int)deprecated
- func (x *PeerSwapPeerChannel) GetActive() bool
- func (x *PeerSwapPeerChannel) GetChannelId() uint64
- func (x *PeerSwapPeerChannel) GetLocalBalance() uint64
- func (x *PeerSwapPeerChannel) GetLocalPercentage() float64
- func (x *PeerSwapPeerChannel) GetRemoteBalance() uint64
- func (*PeerSwapPeerChannel) ProtoMessage()
- func (x *PeerSwapPeerChannel) ProtoReflect() protoreflect.Message
- func (x *PeerSwapPeerChannel) Reset()
- func (x *PeerSwapPeerChannel) String() string
- type PeerSwapServer
- type PeerswapServer
- func (p *PeerswapServer) AddPeer(ctx context.Context, request *AddPeerRequest) (*Policy, error)
- func (p *PeerswapServer) AddSusPeer(ctx context.Context, request *AddPeerRequest) (*Policy, error)
- func (p *PeerswapServer) AllowSwapRequests(ctx context.Context, request *AllowSwapRequestsRequest) (*Policy, error)
- func (p *PeerswapServer) GetSwap(ctx context.Context, request *GetSwapRequest) (*SwapResponse, error)
- func (p *PeerswapServer) LiquidGetAddress(ctx context.Context, request *GetAddressRequest) (*GetAddressResponse, error)
- func (p *PeerswapServer) LiquidGetBalance(ctx context.Context, request *GetBalanceRequest) (*GetBalanceResponse, error)
- func (p *PeerswapServer) LiquidSendToAddress(ctx context.Context, request *SendToAddressRequest) (*SendToAddressResponse, error)
- func (p *PeerswapServer) ListActiveSwaps(ctx context.Context, request *ListSwapsRequest) (*ListSwapsResponse, error)
- func (p *PeerswapServer) ListPeers(ctx context.Context, request *ListPeersRequest) (*ListPeersResponse, error)
- func (p *PeerswapServer) ListRequestedSwaps(ctx context.Context, request *ListRequestedSwapsRequest) (*ListRequestedSwapsResponse, error)
- func (p *PeerswapServer) ListSwaps(ctx context.Context, request *ListSwapsRequest) (*ListSwapsResponse, error)
- func (p *PeerswapServer) ReloadPolicyFile(ctx context.Context, request *ReloadPolicyFileRequest) (*Policy, error)
- func (p *PeerswapServer) RemovePeer(ctx context.Context, request *RemovePeerRequest) (*Policy, error)
- func (p *PeerswapServer) RemoveSusPeer(ctx context.Context, request *RemovePeerRequest) (*Policy, error)
- func (p *PeerswapServer) Stop(ctx context.Context, empty *Empty) (*Empty, error)
- func (p *PeerswapServer) SwapIn(ctx context.Context, request *SwapInRequest) (*SwapResponse, error)
- func (p *PeerswapServer) SwapOut(ctx context.Context, request *SwapOutRequest) (*SwapResponse, error)
- type Policy
- func (*Policy) Descriptor() ([]byte, []int)deprecated
- func (x *Policy) GetAcceptAllPeers() bool
- func (x *Policy) GetAllowNewSwaps() bool
- func (x *Policy) GetAllowlistedPeers() []string
- func (x *Policy) GetMinSwapAmountMsat() uint64
- func (x *Policy) GetReserveOnchainMsat() uint64
- func (x *Policy) GetSuspiciousPeerList() []string
- func (p *Policy) MarshalJSON() ([]byte, error)
- func (*Policy) ProtoMessage()
- func (x *Policy) ProtoReflect() protoreflect.Message
- func (x *Policy) Reset()
- func (x *Policy) String() string
- type PrettyPrintSwap
- func (*PrettyPrintSwap) Descriptor() ([]byte, []int)deprecated
- func (x *PrettyPrintSwap) GetAmount() uint64
- func (x *PrettyPrintSwap) GetAsset() string
- func (x *PrettyPrintSwap) GetCancelMessage() string
- func (x *PrettyPrintSwap) GetChannelId() string
- func (x *PrettyPrintSwap) GetClaimTxId() string
- func (x *PrettyPrintSwap) GetCreatedAt() int64
- func (x *PrettyPrintSwap) GetId() string
- func (x *PrettyPrintSwap) GetInitiatorNodeId() string
- func (x *PrettyPrintSwap) GetLndChanId() uint64
- func (x *PrettyPrintSwap) GetOpeningTxId() string
- func (x *PrettyPrintSwap) GetPeerNodeId() string
- func (x *PrettyPrintSwap) GetRole() string
- func (x *PrettyPrintSwap) GetState() string
- func (x *PrettyPrintSwap) GetType() string
- func (*PrettyPrintSwap) ProtoMessage()
- func (x *PrettyPrintSwap) ProtoReflect() protoreflect.Message
- func (x *PrettyPrintSwap) Reset()
- func (x *PrettyPrintSwap) String() string
- type ReloadPolicyFileRequest
- type RemovePeerRequest
- func (*RemovePeerRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RemovePeerRequest) GetPeerPubkey() string
- func (*RemovePeerRequest) ProtoMessage()
- func (x *RemovePeerRequest) ProtoReflect() protoreflect.Message
- func (x *RemovePeerRequest) Reset()
- func (x *RemovePeerRequest) String() string
- type RequestSwapList
- func (*RequestSwapList) Descriptor() ([]byte, []int)deprecated
- func (x *RequestSwapList) GetRequestedSwaps() []*RequestedSwap
- func (*RequestSwapList) ProtoMessage()
- func (x *RequestSwapList) ProtoReflect() protoreflect.Message
- func (x *RequestSwapList) Reset()
- func (x *RequestSwapList) String() string
- type RequestedSwap
- func (*RequestedSwap) Descriptor() ([]byte, []int)deprecated
- func (x *RequestedSwap) GetAmountSat() uint64
- func (x *RequestedSwap) GetAsset() string
- func (x *RequestedSwap) GetRejectionReason() string
- func (x *RequestedSwap) GetSwapType() RequestedSwap_SwapType
- func (*RequestedSwap) ProtoMessage()
- func (x *RequestedSwap) ProtoReflect() protoreflect.Message
- func (x *RequestedSwap) Reset()
- func (x *RequestedSwap) String() string
- type RequestedSwap_SwapType
- func (RequestedSwap_SwapType) Descriptor() protoreflect.EnumDescriptor
- func (x RequestedSwap_SwapType) Enum() *RequestedSwap_SwapType
- func (RequestedSwap_SwapType) EnumDescriptor() ([]byte, []int)deprecated
- func (x RequestedSwap_SwapType) Number() protoreflect.EnumNumber
- func (x RequestedSwap_SwapType) String() string
- func (RequestedSwap_SwapType) Type() protoreflect.EnumType
- type SendToAddressRequest
- func (*SendToAddressRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SendToAddressRequest) GetAddress() string
- func (x *SendToAddressRequest) GetSatAmount() uint64
- func (*SendToAddressRequest) ProtoMessage()
- func (x *SendToAddressRequest) ProtoReflect() protoreflect.Message
- func (x *SendToAddressRequest) Reset()
- func (x *SendToAddressRequest) String() string
- type SendToAddressResponse
- func (*SendToAddressResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SendToAddressResponse) GetTxId() string
- func (*SendToAddressResponse) ProtoMessage()
- func (x *SendToAddressResponse) ProtoReflect() protoreflect.Message
- func (x *SendToAddressResponse) Reset()
- func (x *SendToAddressResponse) String() string
- type SwapInRequest
- func (*SwapInRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SwapInRequest) GetAsset() string
- func (x *SwapInRequest) GetChannelId() uint64
- func (x *SwapInRequest) GetForce() bool
- func (x *SwapInRequest) GetSwapAmount() uint64
- func (*SwapInRequest) ProtoMessage()
- func (x *SwapInRequest) ProtoReflect() protoreflect.Message
- func (x *SwapInRequest) Reset()
- func (x *SwapInRequest) String() string
- type SwapOutRequest
- func (*SwapOutRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SwapOutRequest) GetAsset() string
- func (x *SwapOutRequest) GetChannelId() uint64
- func (x *SwapOutRequest) GetForce() bool
- func (x *SwapOutRequest) GetSwapAmount() uint64
- func (*SwapOutRequest) ProtoMessage()
- func (x *SwapOutRequest) ProtoReflect() protoreflect.Message
- func (x *SwapOutRequest) Reset()
- func (x *SwapOutRequest) String() string
- type SwapOutResponse
- type SwapResponse
- type SwapStats
- func (*SwapStats) Descriptor() ([]byte, []int)deprecated
- func (x *SwapStats) GetSatsIn() uint64
- func (x *SwapStats) GetSatsOut() uint64
- func (x *SwapStats) GetSwapsIn() uint64
- func (x *SwapStats) GetSwapsOut() uint64
- func (*SwapStats) ProtoMessage()
- func (x *SwapStats) ProtoReflect() protoreflect.Message
- func (x *SwapStats) Reset()
- func (x *SwapStats) String() string
- type UnimplementedPeerSwapServer
- func (UnimplementedPeerSwapServer) AddPeer(context.Context, *AddPeerRequest) (*Policy, error)
- func (UnimplementedPeerSwapServer) AddSusPeer(context.Context, *AddPeerRequest) (*Policy, error)
- func (UnimplementedPeerSwapServer) AllowSwapRequests(context.Context, *AllowSwapRequestsRequest) (*Policy, error)
- func (UnimplementedPeerSwapServer) GetSwap(context.Context, *GetSwapRequest) (*SwapResponse, error)
- func (UnimplementedPeerSwapServer) LiquidGetAddress(context.Context, *GetAddressRequest) (*GetAddressResponse, error)
- func (UnimplementedPeerSwapServer) LiquidGetBalance(context.Context, *GetBalanceRequest) (*GetBalanceResponse, error)
- func (UnimplementedPeerSwapServer) LiquidSendToAddress(context.Context, *SendToAddressRequest) (*SendToAddressResponse, error)
- func (UnimplementedPeerSwapServer) ListActiveSwaps(context.Context, *ListSwapsRequest) (*ListSwapsResponse, error)
- func (UnimplementedPeerSwapServer) ListPeers(context.Context, *ListPeersRequest) (*ListPeersResponse, error)
- func (UnimplementedPeerSwapServer) ListRequestedSwaps(context.Context, *ListRequestedSwapsRequest) (*ListRequestedSwapsResponse, error)
- func (UnimplementedPeerSwapServer) ListSwaps(context.Context, *ListSwapsRequest) (*ListSwapsResponse, error)
- func (UnimplementedPeerSwapServer) ReloadPolicyFile(context.Context, *ReloadPolicyFileRequest) (*Policy, error)
- func (UnimplementedPeerSwapServer) RemovePeer(context.Context, *RemovePeerRequest) (*Policy, error)
- func (UnimplementedPeerSwapServer) RemoveSusPeer(context.Context, *RemovePeerRequest) (*Policy, error)
- func (UnimplementedPeerSwapServer) Stop(context.Context, *Empty) (*Empty, error)
- func (UnimplementedPeerSwapServer) SwapIn(context.Context, *SwapInRequest) (*SwapResponse, error)
- func (UnimplementedPeerSwapServer) SwapOut(context.Context, *SwapOutRequest) (*SwapResponse, error)
- type UnsafePeerSwapServer
Constants ¶
This section is empty.
Variables ¶
var ( RequestedSwap_SwapType_name = map[int32]string{ 0: "SWAP_IN", 1: "SWAP_OUT", } RequestedSwap_SwapType_value = map[string]int32{ "SWAP_IN": 0, "SWAP_OUT": 1, } )
Enum value maps for RequestedSwap_SwapType.
var File_peerswaprpc_peerswaprpc_proto protoreflect.FileDescriptor
var PeerSwap_ServiceDesc = grpc.ServiceDesc{ ServiceName: "peerswap.PeerSwap", HandlerType: (*PeerSwapServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SwapOut", Handler: _PeerSwap_SwapOut_Handler, }, { MethodName: "SwapIn", Handler: _PeerSwap_SwapIn_Handler, }, { MethodName: "GetSwap", Handler: _PeerSwap_GetSwap_Handler, }, { MethodName: "ListSwaps", Handler: _PeerSwap_ListSwaps_Handler, }, { MethodName: "ListPeers", Handler: _PeerSwap_ListPeers_Handler, }, { MethodName: "ListRequestedSwaps", Handler: _PeerSwap_ListRequestedSwaps_Handler, }, { MethodName: "ListActiveSwaps", Handler: _PeerSwap_ListActiveSwaps_Handler, }, { MethodName: "AllowSwapRequests", Handler: _PeerSwap_AllowSwapRequests_Handler, }, { MethodName: "ReloadPolicyFile", Handler: _PeerSwap_ReloadPolicyFile_Handler, }, { MethodName: "AddPeer", Handler: _PeerSwap_AddPeer_Handler, }, { MethodName: "RemovePeer", Handler: _PeerSwap_RemovePeer_Handler, }, { MethodName: "AddSusPeer", Handler: _PeerSwap_AddSusPeer_Handler, }, { MethodName: "RemoveSusPeer", Handler: _PeerSwap_RemoveSusPeer_Handler, }, { MethodName: "LiquidGetAddress", Handler: _PeerSwap_LiquidGetAddress_Handler, }, { MethodName: "LiquidGetBalance", Handler: _PeerSwap_LiquidGetBalance_Handler, }, { MethodName: "LiquidSendToAddress", Handler: _PeerSwap_LiquidSendToAddress_Handler, }, { MethodName: "Stop", Handler: _PeerSwap_Stop_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "peerswaprpc/peerswaprpc.proto", }
PeerSwap_ServiceDesc is the grpc.ServiceDesc for PeerSwap service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPeerSwapHandler ¶
func RegisterPeerSwapHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterPeerSwapHandler registers the http handlers for service PeerSwap to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterPeerSwapHandlerClient ¶
func RegisterPeerSwapHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PeerSwapClient) error
RegisterPeerSwapHandlerClient registers the http handlers for service PeerSwap to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PeerSwapClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PeerSwapClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "PeerSwapClient" to call the correct interceptors.
func RegisterPeerSwapHandlerFromEndpoint ¶
func RegisterPeerSwapHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterPeerSwapHandlerFromEndpoint is same as RegisterPeerSwapHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterPeerSwapHandlerServer ¶
func RegisterPeerSwapHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PeerSwapServer) error
RegisterPeerSwapHandlerServer registers the http handlers for service PeerSwap to "mux". UnaryRPC :call PeerSwapServer 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 RegisterPeerSwapHandlerFromEndpoint instead.
func RegisterPeerSwapServer ¶
func RegisterPeerSwapServer(s grpc.ServiceRegistrar, srv PeerSwapServer)
Types ¶
type AddPeerRequest ¶
type AddPeerRequest struct { PeerPubkey string `protobuf:"bytes,1,opt,name=peer_pubkey,json=peerPubkey,proto3" json:"peer_pubkey,omitempty"` // contains filtered or unexported fields }
func (*AddPeerRequest) Descriptor
deprecated
func (*AddPeerRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddPeerRequest.ProtoReflect.Descriptor instead.
func (*AddPeerRequest) GetPeerPubkey ¶
func (x *AddPeerRequest) GetPeerPubkey() string
func (*AddPeerRequest) ProtoMessage ¶
func (*AddPeerRequest) ProtoMessage()
func (*AddPeerRequest) ProtoReflect ¶
func (x *AddPeerRequest) ProtoReflect() protoreflect.Message
func (*AddPeerRequest) Reset ¶
func (x *AddPeerRequest) Reset()
func (*AddPeerRequest) String ¶
func (x *AddPeerRequest) String() string
type AllowSwapRequestsRequest ¶
type AllowSwapRequestsRequest struct { Allow bool `protobuf:"varint,1,opt,name=allow,proto3" json:"allow,omitempty"` // contains filtered or unexported fields }
func (*AllowSwapRequestsRequest) Descriptor
deprecated
func (*AllowSwapRequestsRequest) Descriptor() ([]byte, []int)
Deprecated: Use AllowSwapRequestsRequest.ProtoReflect.Descriptor instead.
func (*AllowSwapRequestsRequest) GetAllow ¶
func (x *AllowSwapRequestsRequest) GetAllow() bool
func (*AllowSwapRequestsRequest) ProtoMessage ¶
func (*AllowSwapRequestsRequest) ProtoMessage()
func (*AllowSwapRequestsRequest) ProtoReflect ¶
func (x *AllowSwapRequestsRequest) ProtoReflect() protoreflect.Message
func (*AllowSwapRequestsRequest) Reset ¶
func (x *AllowSwapRequestsRequest) Reset()
func (*AllowSwapRequestsRequest) String ¶
func (x *AllowSwapRequestsRequest) String() string
type AllowSwapRequestsResponse ¶
type AllowSwapRequestsResponse struct { Allow bool `protobuf:"varint,1,opt,name=allow,proto3" json:"allow,omitempty"` // contains filtered or unexported fields }
func (*AllowSwapRequestsResponse) Descriptor
deprecated
func (*AllowSwapRequestsResponse) Descriptor() ([]byte, []int)
Deprecated: Use AllowSwapRequestsResponse.ProtoReflect.Descriptor instead.
func (*AllowSwapRequestsResponse) GetAllow ¶
func (x *AllowSwapRequestsResponse) GetAllow() bool
func (*AllowSwapRequestsResponse) ProtoMessage ¶
func (*AllowSwapRequestsResponse) ProtoMessage()
func (*AllowSwapRequestsResponse) ProtoReflect ¶
func (x *AllowSwapRequestsResponse) ProtoReflect() protoreflect.Message
func (*AllowSwapRequestsResponse) Reset ¶
func (x *AllowSwapRequestsResponse) Reset()
func (*AllowSwapRequestsResponse) String ¶
func (x *AllowSwapRequestsResponse) String() string
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type GetAddressRequest ¶
type GetAddressRequest struct {
// contains filtered or unexported fields
}
func (*GetAddressRequest) Descriptor
deprecated
func (*GetAddressRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetAddressRequest.ProtoReflect.Descriptor instead.
func (*GetAddressRequest) ProtoMessage ¶
func (*GetAddressRequest) ProtoMessage()
func (*GetAddressRequest) ProtoReflect ¶
func (x *GetAddressRequest) ProtoReflect() protoreflect.Message
func (*GetAddressRequest) Reset ¶
func (x *GetAddressRequest) Reset()
func (*GetAddressRequest) String ¶
func (x *GetAddressRequest) String() string
type GetAddressResponse ¶
type GetAddressResponse struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // contains filtered or unexported fields }
func (*GetAddressResponse) Descriptor
deprecated
func (*GetAddressResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetAddressResponse.ProtoReflect.Descriptor instead.
func (*GetAddressResponse) GetAddress ¶
func (x *GetAddressResponse) GetAddress() string
func (*GetAddressResponse) ProtoMessage ¶
func (*GetAddressResponse) ProtoMessage()
func (*GetAddressResponse) ProtoReflect ¶
func (x *GetAddressResponse) ProtoReflect() protoreflect.Message
func (*GetAddressResponse) Reset ¶
func (x *GetAddressResponse) Reset()
func (*GetAddressResponse) String ¶
func (x *GetAddressResponse) String() string
type GetBalanceRequest ¶
type GetBalanceRequest struct {
// contains filtered or unexported fields
}
func (*GetBalanceRequest) Descriptor
deprecated
func (*GetBalanceRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetBalanceRequest.ProtoReflect.Descriptor instead.
func (*GetBalanceRequest) ProtoMessage ¶
func (*GetBalanceRequest) ProtoMessage()
func (*GetBalanceRequest) ProtoReflect ¶
func (x *GetBalanceRequest) ProtoReflect() protoreflect.Message
func (*GetBalanceRequest) Reset ¶
func (x *GetBalanceRequest) Reset()
func (*GetBalanceRequest) String ¶
func (x *GetBalanceRequest) String() string
type GetBalanceResponse ¶
type GetBalanceResponse struct { SatAmount uint64 `protobuf:"varint,1,opt,name=sat_amount,json=satAmount,proto3" json:"sat_amount,omitempty"` // contains filtered or unexported fields }
func (*GetBalanceResponse) Descriptor
deprecated
func (*GetBalanceResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetBalanceResponse.ProtoReflect.Descriptor instead.
func (*GetBalanceResponse) GetSatAmount ¶
func (x *GetBalanceResponse) GetSatAmount() uint64
func (*GetBalanceResponse) ProtoMessage ¶
func (*GetBalanceResponse) ProtoMessage()
func (*GetBalanceResponse) ProtoReflect ¶
func (x *GetBalanceResponse) ProtoReflect() protoreflect.Message
func (*GetBalanceResponse) Reset ¶
func (x *GetBalanceResponse) Reset()
func (*GetBalanceResponse) String ¶
func (x *GetBalanceResponse) String() string
type GetSwapRequest ¶
type GetSwapRequest struct { SwapId string `protobuf:"bytes,1,opt,name=swap_id,json=swapId,proto3" json:"swap_id,omitempty"` // contains filtered or unexported fields }
func (*GetSwapRequest) Descriptor
deprecated
func (*GetSwapRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetSwapRequest.ProtoReflect.Descriptor instead.
func (*GetSwapRequest) GetSwapId ¶
func (x *GetSwapRequest) GetSwapId() string
func (*GetSwapRequest) ProtoMessage ¶
func (*GetSwapRequest) ProtoMessage()
func (*GetSwapRequest) ProtoReflect ¶
func (x *GetSwapRequest) ProtoReflect() protoreflect.Message
func (*GetSwapRequest) Reset ¶
func (x *GetSwapRequest) Reset()
func (*GetSwapRequest) String ¶
func (x *GetSwapRequest) String() string
type ListPeersRequest ¶
type ListPeersRequest struct {
// contains filtered or unexported fields
}
func (*ListPeersRequest) Descriptor
deprecated
func (*ListPeersRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListPeersRequest.ProtoReflect.Descriptor instead.
func (*ListPeersRequest) ProtoMessage ¶
func (*ListPeersRequest) ProtoMessage()
func (*ListPeersRequest) ProtoReflect ¶
func (x *ListPeersRequest) ProtoReflect() protoreflect.Message
func (*ListPeersRequest) Reset ¶
func (x *ListPeersRequest) Reset()
func (*ListPeersRequest) String ¶
func (x *ListPeersRequest) String() string
type ListPeersResponse ¶
type ListPeersResponse struct { Peers []*PeerSwapPeer `protobuf:"bytes,1,rep,name=peers,proto3" json:"peers,omitempty"` // contains filtered or unexported fields }
func (*ListPeersResponse) Descriptor
deprecated
func (*ListPeersResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListPeersResponse.ProtoReflect.Descriptor instead.
func (*ListPeersResponse) GetPeers ¶
func (x *ListPeersResponse) GetPeers() []*PeerSwapPeer
func (*ListPeersResponse) ProtoMessage ¶
func (*ListPeersResponse) ProtoMessage()
func (*ListPeersResponse) ProtoReflect ¶
func (x *ListPeersResponse) ProtoReflect() protoreflect.Message
func (*ListPeersResponse) Reset ¶
func (x *ListPeersResponse) Reset()
func (*ListPeersResponse) String ¶
func (x *ListPeersResponse) String() string
type ListRequestedSwapsRequest ¶
type ListRequestedSwapsRequest struct {
// contains filtered or unexported fields
}
func (*ListRequestedSwapsRequest) Descriptor
deprecated
func (*ListRequestedSwapsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequestedSwapsRequest.ProtoReflect.Descriptor instead.
func (*ListRequestedSwapsRequest) ProtoMessage ¶
func (*ListRequestedSwapsRequest) ProtoMessage()
func (*ListRequestedSwapsRequest) ProtoReflect ¶
func (x *ListRequestedSwapsRequest) ProtoReflect() protoreflect.Message
func (*ListRequestedSwapsRequest) Reset ¶
func (x *ListRequestedSwapsRequest) Reset()
func (*ListRequestedSwapsRequest) String ¶
func (x *ListRequestedSwapsRequest) String() string
type ListRequestedSwapsResponse ¶
type ListRequestedSwapsResponse struct { RequestedSwaps map[string]*RequestSwapList `` /* 191-byte string literal not displayed */ // contains filtered or unexported fields }
func (*ListRequestedSwapsResponse) Descriptor
deprecated
func (*ListRequestedSwapsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListRequestedSwapsResponse.ProtoReflect.Descriptor instead.
func (*ListRequestedSwapsResponse) GetRequestedSwaps ¶
func (x *ListRequestedSwapsResponse) GetRequestedSwaps() map[string]*RequestSwapList
func (*ListRequestedSwapsResponse) ProtoMessage ¶
func (*ListRequestedSwapsResponse) ProtoMessage()
func (*ListRequestedSwapsResponse) ProtoReflect ¶
func (x *ListRequestedSwapsResponse) ProtoReflect() protoreflect.Message
func (*ListRequestedSwapsResponse) Reset ¶
func (x *ListRequestedSwapsResponse) Reset()
func (*ListRequestedSwapsResponse) String ¶
func (x *ListRequestedSwapsResponse) String() string
type ListSwapsRequest ¶
type ListSwapsRequest struct {
// contains filtered or unexported fields
}
func (*ListSwapsRequest) Descriptor
deprecated
func (*ListSwapsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListSwapsRequest.ProtoReflect.Descriptor instead.
func (*ListSwapsRequest) ProtoMessage ¶
func (*ListSwapsRequest) ProtoMessage()
func (*ListSwapsRequest) ProtoReflect ¶
func (x *ListSwapsRequest) ProtoReflect() protoreflect.Message
func (*ListSwapsRequest) Reset ¶
func (x *ListSwapsRequest) Reset()
func (*ListSwapsRequest) String ¶
func (x *ListSwapsRequest) String() string
type ListSwapsResponse ¶
type ListSwapsResponse struct { Swaps []*PrettyPrintSwap `protobuf:"bytes,1,rep,name=swaps,proto3" json:"swaps,omitempty"` // contains filtered or unexported fields }
func (*ListSwapsResponse) Descriptor
deprecated
func (*ListSwapsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListSwapsResponse.ProtoReflect.Descriptor instead.
func (*ListSwapsResponse) GetSwaps ¶
func (x *ListSwapsResponse) GetSwaps() []*PrettyPrintSwap
func (*ListSwapsResponse) ProtoMessage ¶
func (*ListSwapsResponse) ProtoMessage()
func (*ListSwapsResponse) ProtoReflect ¶
func (x *ListSwapsResponse) ProtoReflect() protoreflect.Message
func (*ListSwapsResponse) Reset ¶
func (x *ListSwapsResponse) Reset()
func (*ListSwapsResponse) String ¶
func (x *ListSwapsResponse) String() string
type PeerSwapClient ¶
type PeerSwapClient interface { SwapOut(ctx context.Context, in *SwapOutRequest, opts ...grpc.CallOption) (*SwapResponse, error) SwapIn(ctx context.Context, in *SwapInRequest, opts ...grpc.CallOption) (*SwapResponse, error) GetSwap(ctx context.Context, in *GetSwapRequest, opts ...grpc.CallOption) (*SwapResponse, error) ListSwaps(ctx context.Context, in *ListSwapsRequest, opts ...grpc.CallOption) (*ListSwapsResponse, error) ListPeers(ctx context.Context, in *ListPeersRequest, opts ...grpc.CallOption) (*ListPeersResponse, error) ListRequestedSwaps(ctx context.Context, in *ListRequestedSwapsRequest, opts ...grpc.CallOption) (*ListRequestedSwapsResponse, error) ListActiveSwaps(ctx context.Context, in *ListSwapsRequest, opts ...grpc.CallOption) (*ListSwapsResponse, error) // policy AllowSwapRequests(ctx context.Context, in *AllowSwapRequestsRequest, opts ...grpc.CallOption) (*Policy, error) ReloadPolicyFile(ctx context.Context, in *ReloadPolicyFileRequest, opts ...grpc.CallOption) (*Policy, error) AddPeer(ctx context.Context, in *AddPeerRequest, opts ...grpc.CallOption) (*Policy, error) RemovePeer(ctx context.Context, in *RemovePeerRequest, opts ...grpc.CallOption) (*Policy, error) AddSusPeer(ctx context.Context, in *AddPeerRequest, opts ...grpc.CallOption) (*Policy, error) RemoveSusPeer(ctx context.Context, in *RemovePeerRequest, opts ...grpc.CallOption) (*Policy, error) // Liquid Stuff LiquidGetAddress(ctx context.Context, in *GetAddressRequest, opts ...grpc.CallOption) (*GetAddressResponse, error) LiquidGetBalance(ctx context.Context, in *GetBalanceRequest, opts ...grpc.CallOption) (*GetBalanceResponse, error) LiquidSendToAddress(ctx context.Context, in *SendToAddressRequest, opts ...grpc.CallOption) (*SendToAddressResponse, error) Stop(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) }
PeerSwapClient is the client API for PeerSwap 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 NewPeerSwapClient ¶
func NewPeerSwapClient(cc grpc.ClientConnInterface) PeerSwapClient
type PeerSwapNodes ¶
type PeerSwapNodes struct { NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` // contains filtered or unexported fields }
func (*PeerSwapNodes) Descriptor
deprecated
func (*PeerSwapNodes) Descriptor() ([]byte, []int)
Deprecated: Use PeerSwapNodes.ProtoReflect.Descriptor instead.
func (*PeerSwapNodes) GetNodeId ¶
func (x *PeerSwapNodes) GetNodeId() string
func (*PeerSwapNodes) ProtoMessage ¶
func (*PeerSwapNodes) ProtoMessage()
func (*PeerSwapNodes) ProtoReflect ¶
func (x *PeerSwapNodes) ProtoReflect() protoreflect.Message
func (*PeerSwapNodes) Reset ¶
func (x *PeerSwapNodes) Reset()
func (*PeerSwapNodes) String ¶
func (x *PeerSwapNodes) String() string
type PeerSwapPeer ¶
type PeerSwapPeer struct { NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` SwapsAllowed bool `protobuf:"varint,2,opt,name=swaps_allowed,json=swapsAllowed,proto3" json:"swaps_allowed,omitempty"` SupportedAssets []string `protobuf:"bytes,3,rep,name=supported_assets,json=supportedAssets,proto3" json:"supported_assets,omitempty"` Channels []*PeerSwapPeerChannel `protobuf:"bytes,4,rep,name=channels,proto3" json:"channels,omitempty"` AsSender *SwapStats `protobuf:"bytes,5,opt,name=as_sender,json=asSender,proto3" json:"as_sender,omitempty"` AsReceiver *SwapStats `protobuf:"bytes,6,opt,name=as_receiver,json=asReceiver,proto3" json:"as_receiver,omitempty"` PaidFee uint64 `protobuf:"varint,7,opt,name=paid_fee,json=paidFee,proto3" json:"paid_fee,omitempty"` // contains filtered or unexported fields }
func (*PeerSwapPeer) Descriptor
deprecated
func (*PeerSwapPeer) Descriptor() ([]byte, []int)
Deprecated: Use PeerSwapPeer.ProtoReflect.Descriptor instead.
func (*PeerSwapPeer) GetAsReceiver ¶
func (x *PeerSwapPeer) GetAsReceiver() *SwapStats
func (*PeerSwapPeer) GetAsSender ¶
func (x *PeerSwapPeer) GetAsSender() *SwapStats
func (*PeerSwapPeer) GetChannels ¶
func (x *PeerSwapPeer) GetChannels() []*PeerSwapPeerChannel
func (*PeerSwapPeer) GetNodeId ¶
func (x *PeerSwapPeer) GetNodeId() string
func (*PeerSwapPeer) GetPaidFee ¶
func (x *PeerSwapPeer) GetPaidFee() uint64
func (*PeerSwapPeer) GetSupportedAssets ¶
func (x *PeerSwapPeer) GetSupportedAssets() []string
func (*PeerSwapPeer) GetSwapsAllowed ¶
func (x *PeerSwapPeer) GetSwapsAllowed() bool
func (*PeerSwapPeer) ProtoMessage ¶
func (*PeerSwapPeer) ProtoMessage()
func (*PeerSwapPeer) ProtoReflect ¶
func (x *PeerSwapPeer) ProtoReflect() protoreflect.Message
func (*PeerSwapPeer) Reset ¶
func (x *PeerSwapPeer) Reset()
func (*PeerSwapPeer) String ¶
func (x *PeerSwapPeer) String() string
type PeerSwapPeerChannel ¶
type PeerSwapPeerChannel struct { ChannelId uint64 `protobuf:"varint,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` LocalBalance uint64 `protobuf:"varint,2,opt,name=local_balance,json=localBalance,proto3" json:"local_balance,omitempty"` RemoteBalance uint64 `protobuf:"varint,3,opt,name=remote_balance,json=remoteBalance,proto3" json:"remote_balance,omitempty"` LocalPercentage float64 `protobuf:"fixed64,4,opt,name=local_percentage,json=localPercentage,proto3" json:"local_percentage,omitempty"` Active bool `protobuf:"varint,5,opt,name=active,proto3" json:"active,omitempty"` // contains filtered or unexported fields }
func (*PeerSwapPeerChannel) Descriptor
deprecated
func (*PeerSwapPeerChannel) Descriptor() ([]byte, []int)
Deprecated: Use PeerSwapPeerChannel.ProtoReflect.Descriptor instead.
func (*PeerSwapPeerChannel) GetActive ¶
func (x *PeerSwapPeerChannel) GetActive() bool
func (*PeerSwapPeerChannel) GetChannelId ¶
func (x *PeerSwapPeerChannel) GetChannelId() uint64
func (*PeerSwapPeerChannel) GetLocalBalance ¶
func (x *PeerSwapPeerChannel) GetLocalBalance() uint64
func (*PeerSwapPeerChannel) GetLocalPercentage ¶
func (x *PeerSwapPeerChannel) GetLocalPercentage() float64
func (*PeerSwapPeerChannel) GetRemoteBalance ¶
func (x *PeerSwapPeerChannel) GetRemoteBalance() uint64
func (*PeerSwapPeerChannel) ProtoMessage ¶
func (*PeerSwapPeerChannel) ProtoMessage()
func (*PeerSwapPeerChannel) ProtoReflect ¶
func (x *PeerSwapPeerChannel) ProtoReflect() protoreflect.Message
func (*PeerSwapPeerChannel) Reset ¶
func (x *PeerSwapPeerChannel) Reset()
func (*PeerSwapPeerChannel) String ¶
func (x *PeerSwapPeerChannel) String() string
type PeerSwapServer ¶
type PeerSwapServer interface { SwapOut(context.Context, *SwapOutRequest) (*SwapResponse, error) SwapIn(context.Context, *SwapInRequest) (*SwapResponse, error) GetSwap(context.Context, *GetSwapRequest) (*SwapResponse, error) ListSwaps(context.Context, *ListSwapsRequest) (*ListSwapsResponse, error) ListPeers(context.Context, *ListPeersRequest) (*ListPeersResponse, error) ListRequestedSwaps(context.Context, *ListRequestedSwapsRequest) (*ListRequestedSwapsResponse, error) ListActiveSwaps(context.Context, *ListSwapsRequest) (*ListSwapsResponse, error) // policy AllowSwapRequests(context.Context, *AllowSwapRequestsRequest) (*Policy, error) ReloadPolicyFile(context.Context, *ReloadPolicyFileRequest) (*Policy, error) AddPeer(context.Context, *AddPeerRequest) (*Policy, error) RemovePeer(context.Context, *RemovePeerRequest) (*Policy, error) AddSusPeer(context.Context, *AddPeerRequest) (*Policy, error) RemoveSusPeer(context.Context, *RemovePeerRequest) (*Policy, error) // Liquid Stuff LiquidGetAddress(context.Context, *GetAddressRequest) (*GetAddressResponse, error) LiquidGetBalance(context.Context, *GetBalanceRequest) (*GetBalanceResponse, error) LiquidSendToAddress(context.Context, *SendToAddressRequest) (*SendToAddressResponse, error) Stop(context.Context, *Empty) (*Empty, error) // contains filtered or unexported methods }
PeerSwapServer is the server API for PeerSwap service. All implementations must embed UnimplementedPeerSwapServer for forward compatibility
type PeerswapServer ¶
type PeerswapServer struct { Gelements *gelements.Elements UnimplementedPeerSwapServer // contains filtered or unexported fields }
func NewPeerswapServer ¶
func NewPeerswapServer(liquidWallet wallet.Wallet, swaps *swap.SwapService, requestedSwaps *swap.RequestedSwapsPrinter, pollService *poll.Service, policy *policy.Policy, gelements *gelements.Elements, lnd lnrpc.LightningClient, sigchan chan os.Signal) *PeerswapServer
func (*PeerswapServer) AddPeer ¶
func (p *PeerswapServer) AddPeer(ctx context.Context, request *AddPeerRequest) (*Policy, error)
func (*PeerswapServer) AddSusPeer ¶
func (p *PeerswapServer) AddSusPeer(ctx context.Context, request *AddPeerRequest) (*Policy, error)
func (*PeerswapServer) AllowSwapRequests ¶
func (p *PeerswapServer) AllowSwapRequests(ctx context.Context, request *AllowSwapRequestsRequest) (*Policy, error)
func (*PeerswapServer) GetSwap ¶
func (p *PeerswapServer) GetSwap(ctx context.Context, request *GetSwapRequest) (*SwapResponse, error)
func (*PeerswapServer) LiquidGetAddress ¶
func (p *PeerswapServer) LiquidGetAddress(ctx context.Context, request *GetAddressRequest) (*GetAddressResponse, error)
func (*PeerswapServer) LiquidGetBalance ¶
func (p *PeerswapServer) LiquidGetBalance(ctx context.Context, request *GetBalanceRequest) (*GetBalanceResponse, error)
func (*PeerswapServer) LiquidSendToAddress ¶
func (p *PeerswapServer) LiquidSendToAddress(ctx context.Context, request *SendToAddressRequest) (*SendToAddressResponse, error)
func (*PeerswapServer) ListActiveSwaps ¶
func (p *PeerswapServer) ListActiveSwaps(ctx context.Context, request *ListSwapsRequest) (*ListSwapsResponse, error)
func (*PeerswapServer) ListPeers ¶
func (p *PeerswapServer) ListPeers(ctx context.Context, request *ListPeersRequest) (*ListPeersResponse, error)
func (*PeerswapServer) ListRequestedSwaps ¶
func (p *PeerswapServer) ListRequestedSwaps(ctx context.Context, request *ListRequestedSwapsRequest) (*ListRequestedSwapsResponse, error)
func (*PeerswapServer) ListSwaps ¶
func (p *PeerswapServer) ListSwaps(ctx context.Context, request *ListSwapsRequest) (*ListSwapsResponse, error)
func (*PeerswapServer) ReloadPolicyFile ¶
func (p *PeerswapServer) ReloadPolicyFile(ctx context.Context, request *ReloadPolicyFileRequest) (*Policy, error)
func (*PeerswapServer) RemovePeer ¶
func (p *PeerswapServer) RemovePeer(ctx context.Context, request *RemovePeerRequest) (*Policy, error)
func (*PeerswapServer) RemoveSusPeer ¶
func (p *PeerswapServer) RemoveSusPeer(ctx context.Context, request *RemovePeerRequest) (*Policy, error)
func (*PeerswapServer) SwapIn ¶
func (p *PeerswapServer) SwapIn(ctx context.Context, request *SwapInRequest) (*SwapResponse, error)
func (*PeerswapServer) SwapOut ¶
func (p *PeerswapServer) SwapOut(ctx context.Context, request *SwapOutRequest) (*SwapResponse, error)
type Policy ¶
type Policy struct { ReserveOnchainMsat uint64 `protobuf:"varint,1,opt,name=reserve_onchain_msat,json=reserveOnchainMsat,proto3" json:"reserve_onchain_msat,omitempty"` MinSwapAmountMsat uint64 `protobuf:"varint,2,opt,name=min_swap_amount_msat,json=minSwapAmountMsat,proto3" json:"min_swap_amount_msat,omitempty"` AcceptAllPeers bool `protobuf:"varint,3,opt,name=accept_all_peers,json=acceptAllPeers,proto3" json:"accept_all_peers,omitempty"` AllowNewSwaps bool `protobuf:"varint,4,opt,name=allow_new_swaps,json=allowNewSwaps,proto3" json:"allow_new_swaps,omitempty"` AllowlistedPeers []string `protobuf:"bytes,5,rep,name=allowlisted_peers,json=allowlistedPeers,proto3" json:"allowlisted_peers,omitempty"` SuspiciousPeerList []string `protobuf:"bytes,6,rep,name=suspicious_peer_list,json=suspiciousPeerList,proto3" json:"suspicious_peer_list,omitempty"` // contains filtered or unexported fields }
func GetPolicyMessage ¶
func (*Policy) Descriptor
deprecated
func (*Policy) GetAcceptAllPeers ¶
func (*Policy) GetAllowNewSwaps ¶
func (*Policy) GetAllowlistedPeers ¶
func (*Policy) GetMinSwapAmountMsat ¶
func (*Policy) GetReserveOnchainMsat ¶
func (*Policy) GetSuspiciousPeerList ¶
func (*Policy) MarshalJSON ¶
func (*Policy) ProtoMessage ¶
func (*Policy) ProtoMessage()
func (*Policy) ProtoReflect ¶
func (x *Policy) ProtoReflect() protoreflect.Message
type PrettyPrintSwap ¶
type PrettyPrintSwap struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` CreatedAt int64 `protobuf:"varint,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` Asset string `protobuf:"bytes,3,opt,name=asset,proto3" json:"asset,omitempty"` Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` Role string `protobuf:"bytes,5,opt,name=role,proto3" json:"role,omitempty"` State string `protobuf:"bytes,6,opt,name=state,proto3" json:"state,omitempty"` InitiatorNodeId string `protobuf:"bytes,7,opt,name=initiator_node_id,json=initiatorNodeId,proto3" json:"initiator_node_id,omitempty"` PeerNodeId string `protobuf:"bytes,8,opt,name=peer_node_id,json=peerNodeId,proto3" json:"peer_node_id,omitempty"` Amount uint64 `protobuf:"varint,9,opt,name=amount,proto3" json:"amount,omitempty"` ChannelId string `protobuf:"bytes,10,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` OpeningTxId string `protobuf:"bytes,11,opt,name=opening_tx_id,json=openingTxId,proto3" json:"opening_tx_id,omitempty"` ClaimTxId string `protobuf:"bytes,12,opt,name=claim_tx_id,json=claimTxId,proto3" json:"claim_tx_id,omitempty"` CancelMessage string `protobuf:"bytes,13,opt,name=cancel_message,json=cancelMessage,proto3" json:"cancel_message,omitempty"` LndChanId uint64 `protobuf:"varint,14,opt,name=lnd_chan_id,json=lndChanId,proto3" json:"lnd_chan_id,omitempty"` // contains filtered or unexported fields }
func PrettyprintFromServiceSwap ¶
func PrettyprintFromServiceSwap(swap *swap.SwapStateMachine) *PrettyPrintSwap
func (*PrettyPrintSwap) Descriptor
deprecated
func (*PrettyPrintSwap) Descriptor() ([]byte, []int)
Deprecated: Use PrettyPrintSwap.ProtoReflect.Descriptor instead.
func (*PrettyPrintSwap) GetAmount ¶
func (x *PrettyPrintSwap) GetAmount() uint64
func (*PrettyPrintSwap) GetAsset ¶
func (x *PrettyPrintSwap) GetAsset() string
func (*PrettyPrintSwap) GetCancelMessage ¶
func (x *PrettyPrintSwap) GetCancelMessage() string
func (*PrettyPrintSwap) GetChannelId ¶
func (x *PrettyPrintSwap) GetChannelId() string
func (*PrettyPrintSwap) GetClaimTxId ¶
func (x *PrettyPrintSwap) GetClaimTxId() string
func (*PrettyPrintSwap) GetCreatedAt ¶
func (x *PrettyPrintSwap) GetCreatedAt() int64
func (*PrettyPrintSwap) GetId ¶
func (x *PrettyPrintSwap) GetId() string
func (*PrettyPrintSwap) GetInitiatorNodeId ¶
func (x *PrettyPrintSwap) GetInitiatorNodeId() string
func (*PrettyPrintSwap) GetLndChanId ¶
func (x *PrettyPrintSwap) GetLndChanId() uint64
func (*PrettyPrintSwap) GetOpeningTxId ¶
func (x *PrettyPrintSwap) GetOpeningTxId() string
func (*PrettyPrintSwap) GetPeerNodeId ¶
func (x *PrettyPrintSwap) GetPeerNodeId() string
func (*PrettyPrintSwap) GetRole ¶
func (x *PrettyPrintSwap) GetRole() string
func (*PrettyPrintSwap) GetState ¶
func (x *PrettyPrintSwap) GetState() string
func (*PrettyPrintSwap) GetType ¶
func (x *PrettyPrintSwap) GetType() string
func (*PrettyPrintSwap) ProtoMessage ¶
func (*PrettyPrintSwap) ProtoMessage()
func (*PrettyPrintSwap) ProtoReflect ¶
func (x *PrettyPrintSwap) ProtoReflect() protoreflect.Message
func (*PrettyPrintSwap) Reset ¶
func (x *PrettyPrintSwap) Reset()
func (*PrettyPrintSwap) String ¶
func (x *PrettyPrintSwap) String() string
type ReloadPolicyFileRequest ¶
type ReloadPolicyFileRequest struct {
// contains filtered or unexported fields
}
func (*ReloadPolicyFileRequest) Descriptor
deprecated
func (*ReloadPolicyFileRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReloadPolicyFileRequest.ProtoReflect.Descriptor instead.
func (*ReloadPolicyFileRequest) ProtoMessage ¶
func (*ReloadPolicyFileRequest) ProtoMessage()
func (*ReloadPolicyFileRequest) ProtoReflect ¶
func (x *ReloadPolicyFileRequest) ProtoReflect() protoreflect.Message
func (*ReloadPolicyFileRequest) Reset ¶
func (x *ReloadPolicyFileRequest) Reset()
func (*ReloadPolicyFileRequest) String ¶
func (x *ReloadPolicyFileRequest) String() string
type RemovePeerRequest ¶
type RemovePeerRequest struct { PeerPubkey string `protobuf:"bytes,1,opt,name=peer_pubkey,json=peerPubkey,proto3" json:"peer_pubkey,omitempty"` // contains filtered or unexported fields }
func (*RemovePeerRequest) Descriptor
deprecated
func (*RemovePeerRequest) Descriptor() ([]byte, []int)
Deprecated: Use RemovePeerRequest.ProtoReflect.Descriptor instead.
func (*RemovePeerRequest) GetPeerPubkey ¶
func (x *RemovePeerRequest) GetPeerPubkey() string
func (*RemovePeerRequest) ProtoMessage ¶
func (*RemovePeerRequest) ProtoMessage()
func (*RemovePeerRequest) ProtoReflect ¶
func (x *RemovePeerRequest) ProtoReflect() protoreflect.Message
func (*RemovePeerRequest) Reset ¶
func (x *RemovePeerRequest) Reset()
func (*RemovePeerRequest) String ¶
func (x *RemovePeerRequest) String() string
type RequestSwapList ¶
type RequestSwapList struct { RequestedSwaps []*RequestedSwap `protobuf:"bytes,1,rep,name=requested_swaps,json=requestedSwaps,proto3" json:"requested_swaps,omitempty"` // contains filtered or unexported fields }
func (*RequestSwapList) Descriptor
deprecated
func (*RequestSwapList) Descriptor() ([]byte, []int)
Deprecated: Use RequestSwapList.ProtoReflect.Descriptor instead.
func (*RequestSwapList) GetRequestedSwaps ¶
func (x *RequestSwapList) GetRequestedSwaps() []*RequestedSwap
func (*RequestSwapList) ProtoMessage ¶
func (*RequestSwapList) ProtoMessage()
func (*RequestSwapList) ProtoReflect ¶
func (x *RequestSwapList) ProtoReflect() protoreflect.Message
func (*RequestSwapList) Reset ¶
func (x *RequestSwapList) Reset()
func (*RequestSwapList) String ¶
func (x *RequestSwapList) String() string
type RequestedSwap ¶
type RequestedSwap struct { Asset string `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"` AmountSat uint64 `protobuf:"varint,2,opt,name=amount_sat,json=amountSat,proto3" json:"amount_sat,omitempty"` SwapType RequestedSwap_SwapType `protobuf:"varint,3,opt,name=swap_type,json=swapType,proto3,enum=peerswap.RequestedSwap_SwapType" json:"swap_type,omitempty"` RejectionReason string `protobuf:"bytes,4,opt,name=rejection_reason,json=rejectionReason,proto3" json:"rejection_reason,omitempty"` // contains filtered or unexported fields }
func (*RequestedSwap) Descriptor
deprecated
func (*RequestedSwap) Descriptor() ([]byte, []int)
Deprecated: Use RequestedSwap.ProtoReflect.Descriptor instead.
func (*RequestedSwap) GetAmountSat ¶
func (x *RequestedSwap) GetAmountSat() uint64
func (*RequestedSwap) GetAsset ¶
func (x *RequestedSwap) GetAsset() string
func (*RequestedSwap) GetRejectionReason ¶
func (x *RequestedSwap) GetRejectionReason() string
func (*RequestedSwap) GetSwapType ¶
func (x *RequestedSwap) GetSwapType() RequestedSwap_SwapType
func (*RequestedSwap) ProtoMessage ¶
func (*RequestedSwap) ProtoMessage()
func (*RequestedSwap) ProtoReflect ¶
func (x *RequestedSwap) ProtoReflect() protoreflect.Message
func (*RequestedSwap) Reset ¶
func (x *RequestedSwap) Reset()
func (*RequestedSwap) String ¶
func (x *RequestedSwap) String() string
type RequestedSwap_SwapType ¶
type RequestedSwap_SwapType int32
const ( RequestedSwap_SWAP_IN RequestedSwap_SwapType = 0 RequestedSwap_SWAP_OUT RequestedSwap_SwapType = 1 )
func (RequestedSwap_SwapType) Descriptor ¶
func (RequestedSwap_SwapType) Descriptor() protoreflect.EnumDescriptor
func (RequestedSwap_SwapType) Enum ¶
func (x RequestedSwap_SwapType) Enum() *RequestedSwap_SwapType
func (RequestedSwap_SwapType) EnumDescriptor
deprecated
func (RequestedSwap_SwapType) EnumDescriptor() ([]byte, []int)
Deprecated: Use RequestedSwap_SwapType.Descriptor instead.
func (RequestedSwap_SwapType) Number ¶
func (x RequestedSwap_SwapType) Number() protoreflect.EnumNumber
func (RequestedSwap_SwapType) String ¶
func (x RequestedSwap_SwapType) String() string
func (RequestedSwap_SwapType) Type ¶
func (RequestedSwap_SwapType) Type() protoreflect.EnumType
type SendToAddressRequest ¶
type SendToAddressRequest struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` SatAmount uint64 `protobuf:"varint,2,opt,name=sat_amount,json=satAmount,proto3" json:"sat_amount,omitempty"` // contains filtered or unexported fields }
func (*SendToAddressRequest) Descriptor
deprecated
func (*SendToAddressRequest) Descriptor() ([]byte, []int)
Deprecated: Use SendToAddressRequest.ProtoReflect.Descriptor instead.
func (*SendToAddressRequest) GetAddress ¶
func (x *SendToAddressRequest) GetAddress() string
func (*SendToAddressRequest) GetSatAmount ¶
func (x *SendToAddressRequest) GetSatAmount() uint64
func (*SendToAddressRequest) ProtoMessage ¶
func (*SendToAddressRequest) ProtoMessage()
func (*SendToAddressRequest) ProtoReflect ¶
func (x *SendToAddressRequest) ProtoReflect() protoreflect.Message
func (*SendToAddressRequest) Reset ¶
func (x *SendToAddressRequest) Reset()
func (*SendToAddressRequest) String ¶
func (x *SendToAddressRequest) String() string
type SendToAddressResponse ¶
type SendToAddressResponse struct { TxId string `protobuf:"bytes,1,opt,name=tx_id,json=txId,proto3" json:"tx_id,omitempty"` // contains filtered or unexported fields }
func (*SendToAddressResponse) Descriptor
deprecated
func (*SendToAddressResponse) Descriptor() ([]byte, []int)
Deprecated: Use SendToAddressResponse.ProtoReflect.Descriptor instead.
func (*SendToAddressResponse) GetTxId ¶
func (x *SendToAddressResponse) GetTxId() string
func (*SendToAddressResponse) ProtoMessage ¶
func (*SendToAddressResponse) ProtoMessage()
func (*SendToAddressResponse) ProtoReflect ¶
func (x *SendToAddressResponse) ProtoReflect() protoreflect.Message
func (*SendToAddressResponse) Reset ¶
func (x *SendToAddressResponse) Reset()
func (*SendToAddressResponse) String ¶
func (x *SendToAddressResponse) String() string
type SwapInRequest ¶
type SwapInRequest struct { ChannelId uint64 `protobuf:"varint,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` SwapAmount uint64 `protobuf:"varint,2,opt,name=swap_amount,json=swapAmount,proto3" json:"swap_amount,omitempty"` Asset string `protobuf:"bytes,3,opt,name=asset,proto3" json:"asset,omitempty"` Force bool `protobuf:"varint,4,opt,name=force,proto3" json:"force,omitempty"` // contains filtered or unexported fields }
func (*SwapInRequest) Descriptor
deprecated
func (*SwapInRequest) Descriptor() ([]byte, []int)
Deprecated: Use SwapInRequest.ProtoReflect.Descriptor instead.
func (*SwapInRequest) GetAsset ¶
func (x *SwapInRequest) GetAsset() string
func (*SwapInRequest) GetChannelId ¶
func (x *SwapInRequest) GetChannelId() uint64
func (*SwapInRequest) GetForce ¶
func (x *SwapInRequest) GetForce() bool
func (*SwapInRequest) GetSwapAmount ¶
func (x *SwapInRequest) GetSwapAmount() uint64
func (*SwapInRequest) ProtoMessage ¶
func (*SwapInRequest) ProtoMessage()
func (*SwapInRequest) ProtoReflect ¶
func (x *SwapInRequest) ProtoReflect() protoreflect.Message
func (*SwapInRequest) Reset ¶
func (x *SwapInRequest) Reset()
func (*SwapInRequest) String ¶
func (x *SwapInRequest) String() string
type SwapOutRequest ¶
type SwapOutRequest struct { ChannelId uint64 `protobuf:"varint,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` SwapAmount uint64 `protobuf:"varint,2,opt,name=swap_amount,json=swapAmount,proto3" json:"swap_amount,omitempty"` Asset string `protobuf:"bytes,3,opt,name=asset,proto3" json:"asset,omitempty"` Force bool `protobuf:"varint,4,opt,name=force,proto3" json:"force,omitempty"` // contains filtered or unexported fields }
func (*SwapOutRequest) Descriptor
deprecated
func (*SwapOutRequest) Descriptor() ([]byte, []int)
Deprecated: Use SwapOutRequest.ProtoReflect.Descriptor instead.
func (*SwapOutRequest) GetAsset ¶
func (x *SwapOutRequest) GetAsset() string
func (*SwapOutRequest) GetChannelId ¶
func (x *SwapOutRequest) GetChannelId() uint64
func (*SwapOutRequest) GetForce ¶
func (x *SwapOutRequest) GetForce() bool
func (*SwapOutRequest) GetSwapAmount ¶
func (x *SwapOutRequest) GetSwapAmount() uint64
func (*SwapOutRequest) ProtoMessage ¶
func (*SwapOutRequest) ProtoMessage()
func (*SwapOutRequest) ProtoReflect ¶
func (x *SwapOutRequest) ProtoReflect() protoreflect.Message
func (*SwapOutRequest) Reset ¶
func (x *SwapOutRequest) Reset()
func (*SwapOutRequest) String ¶
func (x *SwapOutRequest) String() string
type SwapOutResponse ¶
type SwapOutResponse struct { Swap *PrettyPrintSwap `protobuf:"bytes,1,opt,name=swap,proto3" json:"swap,omitempty"` // contains filtered or unexported fields }
func (*SwapOutResponse) Descriptor
deprecated
func (*SwapOutResponse) Descriptor() ([]byte, []int)
Deprecated: Use SwapOutResponse.ProtoReflect.Descriptor instead.
func (*SwapOutResponse) GetSwap ¶
func (x *SwapOutResponse) GetSwap() *PrettyPrintSwap
func (*SwapOutResponse) ProtoMessage ¶
func (*SwapOutResponse) ProtoMessage()
func (*SwapOutResponse) ProtoReflect ¶
func (x *SwapOutResponse) ProtoReflect() protoreflect.Message
func (*SwapOutResponse) Reset ¶
func (x *SwapOutResponse) Reset()
func (*SwapOutResponse) String ¶
func (x *SwapOutResponse) String() string
type SwapResponse ¶
type SwapResponse struct { Swap *PrettyPrintSwap `protobuf:"bytes,1,opt,name=swap,proto3" json:"swap,omitempty"` // contains filtered or unexported fields }
func (*SwapResponse) Descriptor
deprecated
func (*SwapResponse) Descriptor() ([]byte, []int)
Deprecated: Use SwapResponse.ProtoReflect.Descriptor instead.
func (*SwapResponse) GetSwap ¶
func (x *SwapResponse) GetSwap() *PrettyPrintSwap
func (*SwapResponse) ProtoMessage ¶
func (*SwapResponse) ProtoMessage()
func (*SwapResponse) ProtoReflect ¶
func (x *SwapResponse) ProtoReflect() protoreflect.Message
func (*SwapResponse) Reset ¶
func (x *SwapResponse) Reset()
func (*SwapResponse) String ¶
func (x *SwapResponse) String() string
type SwapStats ¶
type SwapStats struct { SwapsOut uint64 `protobuf:"varint,1,opt,name=swaps_out,json=swapsOut,proto3" json:"swaps_out,omitempty"` SwapsIn uint64 `protobuf:"varint,2,opt,name=swaps_in,json=swapsIn,proto3" json:"swaps_in,omitempty"` SatsOut uint64 `protobuf:"varint,3,opt,name=sats_out,json=satsOut,proto3" json:"sats_out,omitempty"` SatsIn uint64 `protobuf:"varint,4,opt,name=sats_in,json=satsIn,proto3" json:"sats_in,omitempty"` // contains filtered or unexported fields }
func (*SwapStats) Descriptor
deprecated
func (*SwapStats) GetSatsOut ¶
func (*SwapStats) GetSwapsIn ¶
func (*SwapStats) GetSwapsOut ¶
func (*SwapStats) ProtoMessage ¶
func (*SwapStats) ProtoMessage()
func (*SwapStats) ProtoReflect ¶
func (x *SwapStats) ProtoReflect() protoreflect.Message
type UnimplementedPeerSwapServer ¶
type UnimplementedPeerSwapServer struct { }
UnimplementedPeerSwapServer must be embedded to have forward compatible implementations.
func (UnimplementedPeerSwapServer) AddPeer ¶
func (UnimplementedPeerSwapServer) AddPeer(context.Context, *AddPeerRequest) (*Policy, error)
func (UnimplementedPeerSwapServer) AddSusPeer ¶
func (UnimplementedPeerSwapServer) AddSusPeer(context.Context, *AddPeerRequest) (*Policy, error)
func (UnimplementedPeerSwapServer) AllowSwapRequests ¶
func (UnimplementedPeerSwapServer) AllowSwapRequests(context.Context, *AllowSwapRequestsRequest) (*Policy, error)
func (UnimplementedPeerSwapServer) GetSwap ¶
func (UnimplementedPeerSwapServer) GetSwap(context.Context, *GetSwapRequest) (*SwapResponse, error)
func (UnimplementedPeerSwapServer) LiquidGetAddress ¶
func (UnimplementedPeerSwapServer) LiquidGetAddress(context.Context, *GetAddressRequest) (*GetAddressResponse, error)
func (UnimplementedPeerSwapServer) LiquidGetBalance ¶
func (UnimplementedPeerSwapServer) LiquidGetBalance(context.Context, *GetBalanceRequest) (*GetBalanceResponse, error)
func (UnimplementedPeerSwapServer) LiquidSendToAddress ¶
func (UnimplementedPeerSwapServer) LiquidSendToAddress(context.Context, *SendToAddressRequest) (*SendToAddressResponse, error)
func (UnimplementedPeerSwapServer) ListActiveSwaps ¶
func (UnimplementedPeerSwapServer) ListActiveSwaps(context.Context, *ListSwapsRequest) (*ListSwapsResponse, error)
func (UnimplementedPeerSwapServer) ListPeers ¶
func (UnimplementedPeerSwapServer) ListPeers(context.Context, *ListPeersRequest) (*ListPeersResponse, error)
func (UnimplementedPeerSwapServer) ListRequestedSwaps ¶
func (UnimplementedPeerSwapServer) ListRequestedSwaps(context.Context, *ListRequestedSwapsRequest) (*ListRequestedSwapsResponse, error)
func (UnimplementedPeerSwapServer) ListSwaps ¶
func (UnimplementedPeerSwapServer) ListSwaps(context.Context, *ListSwapsRequest) (*ListSwapsResponse, error)
func (UnimplementedPeerSwapServer) ReloadPolicyFile ¶
func (UnimplementedPeerSwapServer) ReloadPolicyFile(context.Context, *ReloadPolicyFileRequest) (*Policy, error)
func (UnimplementedPeerSwapServer) RemovePeer ¶
func (UnimplementedPeerSwapServer) RemovePeer(context.Context, *RemovePeerRequest) (*Policy, error)
func (UnimplementedPeerSwapServer) RemoveSusPeer ¶
func (UnimplementedPeerSwapServer) RemoveSusPeer(context.Context, *RemovePeerRequest) (*Policy, error)
func (UnimplementedPeerSwapServer) SwapIn ¶
func (UnimplementedPeerSwapServer) SwapIn(context.Context, *SwapInRequest) (*SwapResponse, error)
func (UnimplementedPeerSwapServer) SwapOut ¶
func (UnimplementedPeerSwapServer) SwapOut(context.Context, *SwapOutRequest) (*SwapResponse, error)
type UnsafePeerSwapServer ¶
type UnsafePeerSwapServer interface {
// contains filtered or unexported methods
}
UnsafePeerSwapServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PeerSwapServer will result in compilation errors.