looprpc

package
v0.2.4-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2019 License: MIT Imports: 14 Imported by: 7

Documentation

Overview

Package looprpc is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var SwapState_name = map[int32]string{
	0: "INITIATED",
	1: "PREIMAGE_REVEALED",
	2: "HTLC_PUBLISHED",
	3: "SUCCESS",
	4: "FAILED",
	5: "INVOICE_SETTLED",
}
View Source
var SwapState_value = map[string]int32{
	"INITIATED":         0,
	"PREIMAGE_REVEALED": 1,
	"HTLC_PUBLISHED":    2,
	"SUCCESS":           3,
	"FAILED":            4,
	"INVOICE_SETTLED":   5,
}
View Source
var SwapType_name = map[int32]string{
	0: "LOOP_OUT",
	1: "LOOP_IN",
}
View Source
var SwapType_value = map[string]int32{
	"LOOP_OUT": 0,
	"LOOP_IN":  1,
}

Functions

func RegisterSwapClientHandler

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

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

func RegisterSwapClientHandlerFromEndpoint

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

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

func RegisterSwapClientServer

func RegisterSwapClientServer(s *grpc.Server, srv SwapClientServer)

func RegisterSwapServerServer

func RegisterSwapServerServer(s *grpc.Server, srv SwapServerServer)

Types

type LoopInRequest

type LoopInRequest struct {
	//*
	//Requested swap amount in sat. This does not include the swap and miner
	//fee.
	Amt int64 `protobuf:"varint,1,opt,name=amt,proto3" json:"amt,omitempty"`
	//*
	//Maximum we are willing to pay the server for the swap. This value is not
	//disclosed in the swap initiation call, but if the server asks for a
	//higher fee, we abort the swap. Typically this value is taken from the
	//response of the GetQuote call.
	MaxSwapFee int64 `protobuf:"varint,2,opt,name=max_swap_fee,json=maxSwapFee,proto3" json:"max_swap_fee,omitempty"`
	//*
	//Maximum in on-chain fees that we are willing to spent. If we want to
	//publish the on-chain htlc and the fee estimate turns out higher than this
	//value, we cancel the swap.
	//
	//max_miner_fee is typically taken from the response of the GetQuote call.
	MaxMinerFee int64 `protobuf:"varint,3,opt,name=max_miner_fee,json=maxMinerFee,proto3" json:"max_miner_fee,omitempty"`
	//*
	//The channel to loop in. If zero, the channel to loop in is selected based
	//on the lowest routing fee for the swap payment from the server.
	//
	//Note: NOT YET IMPLEMENTED
	LoopInChannel uint64 `protobuf:"varint,4,opt,name=loop_in_channel,json=loopInChannel,proto3" json:"loop_in_channel,omitempty"`
	//*
	//If external_htlc is true, we expect the htlc to be published by an external
	//actor.
	ExternalHtlc         bool     `protobuf:"varint,5,opt,name=external_htlc,json=externalHtlc,proto3" json:"external_htlc,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*LoopInRequest) Descriptor

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

func (*LoopInRequest) GetAmt

func (m *LoopInRequest) GetAmt() int64

func (*LoopInRequest) GetExternalHtlc

func (m *LoopInRequest) GetExternalHtlc() bool

func (*LoopInRequest) GetLoopInChannel

func (m *LoopInRequest) GetLoopInChannel() uint64

func (*LoopInRequest) GetMaxMinerFee

func (m *LoopInRequest) GetMaxMinerFee() int64

func (*LoopInRequest) GetMaxSwapFee

func (m *LoopInRequest) GetMaxSwapFee() int64

func (*LoopInRequest) ProtoMessage

func (*LoopInRequest) ProtoMessage()

func (*LoopInRequest) Reset

func (m *LoopInRequest) Reset()

func (*LoopInRequest) String

func (m *LoopInRequest) String() string

func (*LoopInRequest) XXX_DiscardUnknown

func (m *LoopInRequest) XXX_DiscardUnknown()

func (*LoopInRequest) XXX_Marshal

func (m *LoopInRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LoopInRequest) XXX_Merge

func (m *LoopInRequest) XXX_Merge(src proto.Message)

func (*LoopInRequest) XXX_Size

func (m *LoopInRequest) XXX_Size() int

func (*LoopInRequest) XXX_Unmarshal

func (m *LoopInRequest) XXX_Unmarshal(b []byte) error

type LoopOutRequest

type LoopOutRequest struct {
	//*
	//Requested swap amount in sat. This does not include the swap and miner fee.
	Amt int64 `protobuf:"varint,1,opt,name=amt,proto3" json:"amt,omitempty"`
	//*
	//Base58 encoded destination address for the swap.
	Dest string `protobuf:"bytes,2,opt,name=dest,proto3" json:"dest,omitempty"`
	//*
	//Maximum off-chain fee in msat that may be paid for payment to the server.
	//This limit is applied during path finding. Typically this value is taken
	//from the response of the GetQuote call.
	MaxSwapRoutingFee int64 `protobuf:"varint,3,opt,name=max_swap_routing_fee,json=maxSwapRoutingFee,proto3" json:"max_swap_routing_fee,omitempty"`
	//*
	//Maximum off-chain fee in msat that may be paid for payment to the server.
	//This limit is applied during path finding. Typically this value is taken
	//from the response of the GetQuote call.
	MaxPrepayRoutingFee int64 `protobuf:"varint,4,opt,name=max_prepay_routing_fee,json=maxPrepayRoutingFee,proto3" json:"max_prepay_routing_fee,omitempty"`
	//*
	//Maximum we are willing to pay the server for the swap. This value is not
	//disclosed in the swap initiation call, but if the server asks for a
	//higher fee, we abort the swap. Typically this value is taken from the
	//response of the GetQuote call. It includes the prepay amount.
	MaxSwapFee int64 `protobuf:"varint,5,opt,name=max_swap_fee,json=maxSwapFee,proto3" json:"max_swap_fee,omitempty"`
	//*
	//Maximum amount of the swap fee that may be charged as a prepayment.
	MaxPrepayAmt int64 `protobuf:"varint,6,opt,name=max_prepay_amt,json=maxPrepayAmt,proto3" json:"max_prepay_amt,omitempty"`
	//*
	//Maximum in on-chain fees that we are willing to spent. If we want to
	//sweep the on-chain htlc and the fee estimate turns out higher than this
	//value, we cancel the swap. If the fee estimate is lower, we publish the
	//sweep tx.
	//
	//If the sweep tx is not confirmed, we are forced to ratchet up fees until it
	//is swept. Possibly even exceeding max_miner_fee if we get close to the htlc
	//timeout. Because the initial publication revealed the preimage, we have no
	//other choice. The server may already have pulled the off-chain htlc. Only
	//when the fee becomes higher than the swap amount, we can only wait for fees
	//to come down and hope - if we are past the timeout - that the server is not
	//publishing the revocation.
	//
	//max_miner_fee is typically taken from the response of the GetQuote call.
	MaxMinerFee int64 `protobuf:"varint,7,opt,name=max_miner_fee,json=maxMinerFee,proto3" json:"max_miner_fee,omitempty"`
	//*
	//The channel to loop out, the channel to loop out is selected based on the
	//lowest routing fee for the swap payment to the server.
	LoopOutChannel uint64 `protobuf:"varint,8,opt,name=loop_out_channel,json=loopOutChannel,proto3" json:"loop_out_channel,omitempty"`
	//*
	//The number of blocks from the on-chain HTLC's confirmation height that it
	//should be swept within.
	SweepConfTarget      int32    `protobuf:"varint,9,opt,name=sweep_conf_target,json=sweepConfTarget,proto3" json:"sweep_conf_target,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*LoopOutRequest) Descriptor

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

func (*LoopOutRequest) GetAmt

func (m *LoopOutRequest) GetAmt() int64

func (*LoopOutRequest) GetDest

func (m *LoopOutRequest) GetDest() string

func (*LoopOutRequest) GetLoopOutChannel

func (m *LoopOutRequest) GetLoopOutChannel() uint64

func (*LoopOutRequest) GetMaxMinerFee

func (m *LoopOutRequest) GetMaxMinerFee() int64

func (*LoopOutRequest) GetMaxPrepayAmt

func (m *LoopOutRequest) GetMaxPrepayAmt() int64

func (*LoopOutRequest) GetMaxPrepayRoutingFee

func (m *LoopOutRequest) GetMaxPrepayRoutingFee() int64

func (*LoopOutRequest) GetMaxSwapFee

func (m *LoopOutRequest) GetMaxSwapFee() int64

func (*LoopOutRequest) GetMaxSwapRoutingFee

func (m *LoopOutRequest) GetMaxSwapRoutingFee() int64

func (*LoopOutRequest) GetSweepConfTarget

func (m *LoopOutRequest) GetSweepConfTarget() int32

func (*LoopOutRequest) ProtoMessage

func (*LoopOutRequest) ProtoMessage()

func (*LoopOutRequest) Reset

func (m *LoopOutRequest) Reset()

func (*LoopOutRequest) String

func (m *LoopOutRequest) String() string

func (*LoopOutRequest) XXX_DiscardUnknown

func (m *LoopOutRequest) XXX_DiscardUnknown()

func (*LoopOutRequest) XXX_Marshal

func (m *LoopOutRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LoopOutRequest) XXX_Merge

func (m *LoopOutRequest) XXX_Merge(src proto.Message)

func (*LoopOutRequest) XXX_Size

func (m *LoopOutRequest) XXX_Size() int

func (*LoopOutRequest) XXX_Unmarshal

func (m *LoopOutRequest) XXX_Unmarshal(b []byte) error

type MonitorRequest

type MonitorRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*MonitorRequest) Descriptor

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

func (*MonitorRequest) ProtoMessage

func (*MonitorRequest) ProtoMessage()

func (*MonitorRequest) Reset

func (m *MonitorRequest) Reset()

func (*MonitorRequest) String

func (m *MonitorRequest) String() string

func (*MonitorRequest) XXX_DiscardUnknown

func (m *MonitorRequest) XXX_DiscardUnknown()

func (*MonitorRequest) XXX_Marshal

func (m *MonitorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MonitorRequest) XXX_Merge

func (m *MonitorRequest) XXX_Merge(src proto.Message)

func (*MonitorRequest) XXX_Size

func (m *MonitorRequest) XXX_Size() int

func (*MonitorRequest) XXX_Unmarshal

func (m *MonitorRequest) XXX_Unmarshal(b []byte) error

type QuoteRequest

type QuoteRequest struct {
	//*
	//The amount to swap in satoshis.
	Amt int64 `protobuf:"varint,1,opt,name=amt,proto3" json:"amt,omitempty"`
	//*
	//The confirmation target that should be used either for the sweep of the
	//on-chain HTLC broadcast by the swap server in the case of a Loop Out, or for
	//the confirmation of the on-chain HTLC broadcast by the swap client in the
	//case of a Loop In.
	ConfTarget int32 `protobuf:"varint,2,opt,name=conf_target,json=confTarget,proto3" json:"conf_target,omitempty"`
	//*
	//If external_htlc is true, we expect the htlc to be published by an external
	//actor.
	ExternalHtlc         bool     `protobuf:"varint,3,opt,name=external_htlc,json=externalHtlc,proto3" json:"external_htlc,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*QuoteRequest) Descriptor

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

func (*QuoteRequest) GetAmt

func (m *QuoteRequest) GetAmt() int64

func (*QuoteRequest) GetConfTarget

func (m *QuoteRequest) GetConfTarget() int32

func (*QuoteRequest) GetExternalHtlc

func (m *QuoteRequest) GetExternalHtlc() bool

func (*QuoteRequest) ProtoMessage

func (*QuoteRequest) ProtoMessage()

func (*QuoteRequest) Reset

func (m *QuoteRequest) Reset()

func (*QuoteRequest) String

func (m *QuoteRequest) String() string

func (*QuoteRequest) XXX_DiscardUnknown

func (m *QuoteRequest) XXX_DiscardUnknown()

func (*QuoteRequest) XXX_Marshal

func (m *QuoteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QuoteRequest) XXX_Merge

func (m *QuoteRequest) XXX_Merge(src proto.Message)

func (*QuoteRequest) XXX_Size

func (m *QuoteRequest) XXX_Size() int

func (*QuoteRequest) XXX_Unmarshal

func (m *QuoteRequest) XXX_Unmarshal(b []byte) error

type QuoteResponse

type QuoteResponse struct {
	//*
	//The fee that the swap server is charging for the swap.
	SwapFee int64 `protobuf:"varint,1,opt,name=swap_fee,json=swapFee,proto3" json:"swap_fee,omitempty"`
	//*
	//The part of the swap fee that is requested as a prepayment.
	PrepayAmt int64 `protobuf:"varint,2,opt,name=prepay_amt,json=prepayAmt,proto3" json:"prepay_amt,omitempty"`
	//*
	//An estimate of the on-chain fee that needs to be paid to sweep the HTLC.
	MinerFee int64 `protobuf:"varint,3,opt,name=miner_fee,json=minerFee,proto3" json:"miner_fee,omitempty"`
	//*
	//The node pubkey where the swap payment needs to be paid
	//to. This can be used to test connectivity before initiating the swap.
	SwapPaymentDest []byte `protobuf:"bytes,4,opt,name=swap_payment_dest,json=swapPaymentDest,proto3" json:"swap_payment_dest,omitempty"`
	//*
	//On-chain cltv expiry delta
	CltvDelta            int32    `protobuf:"varint,5,opt,name=cltv_delta,json=cltvDelta,proto3" json:"cltv_delta,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*QuoteResponse) Descriptor

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

func (*QuoteResponse) GetCltvDelta

func (m *QuoteResponse) GetCltvDelta() int32

func (*QuoteResponse) GetMinerFee

func (m *QuoteResponse) GetMinerFee() int64

func (*QuoteResponse) GetPrepayAmt

func (m *QuoteResponse) GetPrepayAmt() int64

func (*QuoteResponse) GetSwapFee

func (m *QuoteResponse) GetSwapFee() int64

func (*QuoteResponse) GetSwapPaymentDest

func (m *QuoteResponse) GetSwapPaymentDest() []byte

func (*QuoteResponse) ProtoMessage

func (*QuoteResponse) ProtoMessage()

func (*QuoteResponse) Reset

func (m *QuoteResponse) Reset()

func (*QuoteResponse) String

func (m *QuoteResponse) String() string

func (*QuoteResponse) XXX_DiscardUnknown

func (m *QuoteResponse) XXX_DiscardUnknown()

func (*QuoteResponse) XXX_Marshal

func (m *QuoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QuoteResponse) XXX_Merge

func (m *QuoteResponse) XXX_Merge(src proto.Message)

func (*QuoteResponse) XXX_Size

func (m *QuoteResponse) XXX_Size() int

func (*QuoteResponse) XXX_Unmarshal

func (m *QuoteResponse) XXX_Unmarshal(b []byte) error

type ServerLoopInQuoteRequest

type ServerLoopInQuoteRequest struct {
	/// The swap amount. If zero, a quote for a maximum amt swap will be given.
	Amt                  uint64   `protobuf:"varint,1,opt,name=amt,proto3" json:"amt,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ServerLoopInQuoteRequest) Descriptor

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

func (*ServerLoopInQuoteRequest) GetAmt

func (m *ServerLoopInQuoteRequest) GetAmt() uint64

func (*ServerLoopInQuoteRequest) ProtoMessage

func (*ServerLoopInQuoteRequest) ProtoMessage()

func (*ServerLoopInQuoteRequest) Reset

func (m *ServerLoopInQuoteRequest) Reset()

func (*ServerLoopInQuoteRequest) String

func (m *ServerLoopInQuoteRequest) String() string

func (*ServerLoopInQuoteRequest) XXX_DiscardUnknown

func (m *ServerLoopInQuoteRequest) XXX_DiscardUnknown()

func (*ServerLoopInQuoteRequest) XXX_Marshal

func (m *ServerLoopInQuoteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServerLoopInQuoteRequest) XXX_Merge

func (m *ServerLoopInQuoteRequest) XXX_Merge(src proto.Message)

func (*ServerLoopInQuoteRequest) XXX_Size

func (m *ServerLoopInQuoteRequest) XXX_Size() int

func (*ServerLoopInQuoteRequest) XXX_Unmarshal

func (m *ServerLoopInQuoteRequest) XXX_Unmarshal(b []byte) error

type ServerLoopInQuoteResponse

type ServerLoopInQuoteResponse struct {
	SwapFee              int64    `protobuf:"varint,1,opt,name=swap_fee,json=swapFee,proto3" json:"swap_fee,omitempty"`
	SwapFeeRate          int64    `protobuf:"varint,2,opt,name=swap_fee_rate,json=swapFeeRate,proto3" json:"swap_fee_rate,omitempty"`       // Deprecated: Do not use.
	MinSwapAmount        uint64   `protobuf:"varint,4,opt,name=min_swap_amount,json=minSwapAmount,proto3" json:"min_swap_amount,omitempty"` // Deprecated: Do not use.
	MaxSwapAmount        uint64   `protobuf:"varint,5,opt,name=max_swap_amount,json=maxSwapAmount,proto3" json:"max_swap_amount,omitempty"` // Deprecated: Do not use.
	CltvDelta            int32    `protobuf:"varint,6,opt,name=cltv_delta,json=cltvDelta,proto3" json:"cltv_delta,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ServerLoopInQuoteResponse) Descriptor

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

func (*ServerLoopInQuoteResponse) GetCltvDelta

func (m *ServerLoopInQuoteResponse) GetCltvDelta() int32

func (*ServerLoopInQuoteResponse) GetMaxSwapAmount deprecated

func (m *ServerLoopInQuoteResponse) GetMaxSwapAmount() uint64

Deprecated: Do not use.

func (*ServerLoopInQuoteResponse) GetMinSwapAmount deprecated

func (m *ServerLoopInQuoteResponse) GetMinSwapAmount() uint64

Deprecated: Do not use.

func (*ServerLoopInQuoteResponse) GetSwapFee

func (m *ServerLoopInQuoteResponse) GetSwapFee() int64

func (*ServerLoopInQuoteResponse) GetSwapFeeRate deprecated

func (m *ServerLoopInQuoteResponse) GetSwapFeeRate() int64

Deprecated: Do not use.

func (*ServerLoopInQuoteResponse) ProtoMessage

func (*ServerLoopInQuoteResponse) ProtoMessage()

func (*ServerLoopInQuoteResponse) Reset

func (m *ServerLoopInQuoteResponse) Reset()

func (*ServerLoopInQuoteResponse) String

func (m *ServerLoopInQuoteResponse) String() string

func (*ServerLoopInQuoteResponse) XXX_DiscardUnknown

func (m *ServerLoopInQuoteResponse) XXX_DiscardUnknown()

func (*ServerLoopInQuoteResponse) XXX_Marshal

func (m *ServerLoopInQuoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServerLoopInQuoteResponse) XXX_Merge

func (m *ServerLoopInQuoteResponse) XXX_Merge(src proto.Message)

func (*ServerLoopInQuoteResponse) XXX_Size

func (m *ServerLoopInQuoteResponse) XXX_Size() int

func (*ServerLoopInQuoteResponse) XXX_Unmarshal

func (m *ServerLoopInQuoteResponse) XXX_Unmarshal(b []byte) error

type ServerLoopInRequest

type ServerLoopInRequest struct {
	SenderKey            []byte   `protobuf:"bytes,1,opt,name=sender_key,json=senderKey,proto3" json:"sender_key,omitempty"`
	SwapHash             []byte   `protobuf:"bytes,2,opt,name=swap_hash,json=swapHash,proto3" json:"swap_hash,omitempty"`
	Amt                  uint64   `protobuf:"varint,3,opt,name=amt,proto3" json:"amt,omitempty"`
	SwapInvoice          string   `protobuf:"bytes,4,opt,name=swap_invoice,json=swapInvoice,proto3" json:"swap_invoice,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ServerLoopInRequest) Descriptor

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

func (*ServerLoopInRequest) GetAmt

func (m *ServerLoopInRequest) GetAmt() uint64

func (*ServerLoopInRequest) GetSenderKey

func (m *ServerLoopInRequest) GetSenderKey() []byte

func (*ServerLoopInRequest) GetSwapHash

func (m *ServerLoopInRequest) GetSwapHash() []byte

func (*ServerLoopInRequest) GetSwapInvoice

func (m *ServerLoopInRequest) GetSwapInvoice() string

func (*ServerLoopInRequest) ProtoMessage

func (*ServerLoopInRequest) ProtoMessage()

func (*ServerLoopInRequest) Reset

func (m *ServerLoopInRequest) Reset()

func (*ServerLoopInRequest) String

func (m *ServerLoopInRequest) String() string

func (*ServerLoopInRequest) XXX_DiscardUnknown

func (m *ServerLoopInRequest) XXX_DiscardUnknown()

func (*ServerLoopInRequest) XXX_Marshal

func (m *ServerLoopInRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServerLoopInRequest) XXX_Merge

func (m *ServerLoopInRequest) XXX_Merge(src proto.Message)

func (*ServerLoopInRequest) XXX_Size

func (m *ServerLoopInRequest) XXX_Size() int

func (*ServerLoopInRequest) XXX_Unmarshal

func (m *ServerLoopInRequest) XXX_Unmarshal(b []byte) error

type ServerLoopInResponse

type ServerLoopInResponse struct {
	ReceiverKey          []byte   `protobuf:"bytes,1,opt,name=receiver_key,json=receiverKey,proto3" json:"receiver_key,omitempty"`
	Expiry               int32    `protobuf:"varint,2,opt,name=expiry,proto3" json:"expiry,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ServerLoopInResponse) Descriptor

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

func (*ServerLoopInResponse) GetExpiry

func (m *ServerLoopInResponse) GetExpiry() int32

func (*ServerLoopInResponse) GetReceiverKey

func (m *ServerLoopInResponse) GetReceiverKey() []byte

func (*ServerLoopInResponse) ProtoMessage

func (*ServerLoopInResponse) ProtoMessage()

func (*ServerLoopInResponse) Reset

func (m *ServerLoopInResponse) Reset()

func (*ServerLoopInResponse) String

func (m *ServerLoopInResponse) String() string

func (*ServerLoopInResponse) XXX_DiscardUnknown

func (m *ServerLoopInResponse) XXX_DiscardUnknown()

func (*ServerLoopInResponse) XXX_Marshal

func (m *ServerLoopInResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServerLoopInResponse) XXX_Merge

func (m *ServerLoopInResponse) XXX_Merge(src proto.Message)

func (*ServerLoopInResponse) XXX_Size

func (m *ServerLoopInResponse) XXX_Size() int

func (*ServerLoopInResponse) XXX_Unmarshal

func (m *ServerLoopInResponse) XXX_Unmarshal(b []byte) error

type ServerLoopInTerms

type ServerLoopInTerms struct {
	MinSwapAmount        uint64   `protobuf:"varint,1,opt,name=min_swap_amount,json=minSwapAmount,proto3" json:"min_swap_amount,omitempty"`
	MaxSwapAmount        uint64   `protobuf:"varint,2,opt,name=max_swap_amount,json=maxSwapAmount,proto3" json:"max_swap_amount,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ServerLoopInTerms) Descriptor

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

func (*ServerLoopInTerms) GetMaxSwapAmount

func (m *ServerLoopInTerms) GetMaxSwapAmount() uint64

func (*ServerLoopInTerms) GetMinSwapAmount

func (m *ServerLoopInTerms) GetMinSwapAmount() uint64

func (*ServerLoopInTerms) ProtoMessage

func (*ServerLoopInTerms) ProtoMessage()

func (*ServerLoopInTerms) Reset

func (m *ServerLoopInTerms) Reset()

func (*ServerLoopInTerms) String

func (m *ServerLoopInTerms) String() string

func (*ServerLoopInTerms) XXX_DiscardUnknown

func (m *ServerLoopInTerms) XXX_DiscardUnknown()

func (*ServerLoopInTerms) XXX_Marshal

func (m *ServerLoopInTerms) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServerLoopInTerms) XXX_Merge

func (m *ServerLoopInTerms) XXX_Merge(src proto.Message)

func (*ServerLoopInTerms) XXX_Size

func (m *ServerLoopInTerms) XXX_Size() int

func (*ServerLoopInTerms) XXX_Unmarshal

func (m *ServerLoopInTerms) XXX_Unmarshal(b []byte) error

type ServerLoopInTermsRequest

type ServerLoopInTermsRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ServerLoopInTermsRequest) Descriptor

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

func (*ServerLoopInTermsRequest) ProtoMessage

func (*ServerLoopInTermsRequest) ProtoMessage()

func (*ServerLoopInTermsRequest) Reset

func (m *ServerLoopInTermsRequest) Reset()

func (*ServerLoopInTermsRequest) String

func (m *ServerLoopInTermsRequest) String() string

func (*ServerLoopInTermsRequest) XXX_DiscardUnknown

func (m *ServerLoopInTermsRequest) XXX_DiscardUnknown()

func (*ServerLoopInTermsRequest) XXX_Marshal

func (m *ServerLoopInTermsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServerLoopInTermsRequest) XXX_Merge

func (m *ServerLoopInTermsRequest) XXX_Merge(src proto.Message)

func (*ServerLoopInTermsRequest) XXX_Size

func (m *ServerLoopInTermsRequest) XXX_Size() int

func (*ServerLoopInTermsRequest) XXX_Unmarshal

func (m *ServerLoopInTermsRequest) XXX_Unmarshal(b []byte) error

type ServerLoopOutQuote

type ServerLoopOutQuote struct {
	SwapPaymentDest string `protobuf:"bytes,1,opt,name=swap_payment_dest,json=swapPaymentDest,proto3" json:"swap_payment_dest,omitempty"`
	/// The total estimated swap fee given the quote amt.
	SwapFee int64 `protobuf:"varint,2,opt,name=swap_fee,json=swapFee,proto3" json:"swap_fee,omitempty"`
	/// Deprecated, total swap fee given quote amt is calculated in swap_fee.
	SwapFeeRate          int64    `protobuf:"varint,3,opt,name=swap_fee_rate,json=swapFeeRate,proto3" json:"swap_fee_rate,omitempty"` // Deprecated: Do not use.
	PrepayAmt            uint64   `protobuf:"varint,4,opt,name=prepay_amt,json=prepayAmt,proto3" json:"prepay_amt,omitempty"`
	MinSwapAmount        uint64   `protobuf:"varint,5,opt,name=min_swap_amount,json=minSwapAmount,proto3" json:"min_swap_amount,omitempty"` // Deprecated: Do not use.
	MaxSwapAmount        uint64   `protobuf:"varint,6,opt,name=max_swap_amount,json=maxSwapAmount,proto3" json:"max_swap_amount,omitempty"` // Deprecated: Do not use.
	CltvDelta            int32    `protobuf:"varint,7,opt,name=cltv_delta,json=cltvDelta,proto3" json:"cltv_delta,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ServerLoopOutQuote) Descriptor

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

func (*ServerLoopOutQuote) GetCltvDelta

func (m *ServerLoopOutQuote) GetCltvDelta() int32

func (*ServerLoopOutQuote) GetMaxSwapAmount deprecated

func (m *ServerLoopOutQuote) GetMaxSwapAmount() uint64

Deprecated: Do not use.

func (*ServerLoopOutQuote) GetMinSwapAmount deprecated

func (m *ServerLoopOutQuote) GetMinSwapAmount() uint64

Deprecated: Do not use.

func (*ServerLoopOutQuote) GetPrepayAmt

func (m *ServerLoopOutQuote) GetPrepayAmt() uint64

func (*ServerLoopOutQuote) GetSwapFee

func (m *ServerLoopOutQuote) GetSwapFee() int64

func (*ServerLoopOutQuote) GetSwapFeeRate deprecated

func (m *ServerLoopOutQuote) GetSwapFeeRate() int64

Deprecated: Do not use.

func (*ServerLoopOutQuote) GetSwapPaymentDest

func (m *ServerLoopOutQuote) GetSwapPaymentDest() string

func (*ServerLoopOutQuote) ProtoMessage

func (*ServerLoopOutQuote) ProtoMessage()

func (*ServerLoopOutQuote) Reset

func (m *ServerLoopOutQuote) Reset()

func (*ServerLoopOutQuote) String

func (m *ServerLoopOutQuote) String() string

func (*ServerLoopOutQuote) XXX_DiscardUnknown

func (m *ServerLoopOutQuote) XXX_DiscardUnknown()

func (*ServerLoopOutQuote) XXX_Marshal

func (m *ServerLoopOutQuote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServerLoopOutQuote) XXX_Merge

func (m *ServerLoopOutQuote) XXX_Merge(src proto.Message)

func (*ServerLoopOutQuote) XXX_Size

func (m *ServerLoopOutQuote) XXX_Size() int

func (*ServerLoopOutQuote) XXX_Unmarshal

func (m *ServerLoopOutQuote) XXX_Unmarshal(b []byte) error

type ServerLoopOutQuoteRequest

type ServerLoopOutQuoteRequest struct {
	/// The swap amount. If zero, a quote for a maximum amt swap will be given.
	Amt                  uint64   `protobuf:"varint,1,opt,name=amt,proto3" json:"amt,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ServerLoopOutQuoteRequest) Descriptor

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

func (*ServerLoopOutQuoteRequest) GetAmt

func (m *ServerLoopOutQuoteRequest) GetAmt() uint64

func (*ServerLoopOutQuoteRequest) ProtoMessage

func (*ServerLoopOutQuoteRequest) ProtoMessage()

func (*ServerLoopOutQuoteRequest) Reset

func (m *ServerLoopOutQuoteRequest) Reset()

func (*ServerLoopOutQuoteRequest) String

func (m *ServerLoopOutQuoteRequest) String() string

func (*ServerLoopOutQuoteRequest) XXX_DiscardUnknown

func (m *ServerLoopOutQuoteRequest) XXX_DiscardUnknown()

func (*ServerLoopOutQuoteRequest) XXX_Marshal

func (m *ServerLoopOutQuoteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServerLoopOutQuoteRequest) XXX_Merge

func (m *ServerLoopOutQuoteRequest) XXX_Merge(src proto.Message)

func (*ServerLoopOutQuoteRequest) XXX_Size

func (m *ServerLoopOutQuoteRequest) XXX_Size() int

func (*ServerLoopOutQuoteRequest) XXX_Unmarshal

func (m *ServerLoopOutQuoteRequest) XXX_Unmarshal(b []byte) error

type ServerLoopOutRequest

type ServerLoopOutRequest struct {
	ReceiverKey          []byte   `protobuf:"bytes,1,opt,name=receiver_key,json=receiverKey,proto3" json:"receiver_key,omitempty"`
	SwapHash             []byte   `protobuf:"bytes,2,opt,name=swap_hash,json=swapHash,proto3" json:"swap_hash,omitempty"`
	Amt                  uint64   `protobuf:"varint,3,opt,name=amt,proto3" json:"amt,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ServerLoopOutRequest) Descriptor

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

func (*ServerLoopOutRequest) GetAmt

func (m *ServerLoopOutRequest) GetAmt() uint64

func (*ServerLoopOutRequest) GetReceiverKey

func (m *ServerLoopOutRequest) GetReceiverKey() []byte

func (*ServerLoopOutRequest) GetSwapHash

func (m *ServerLoopOutRequest) GetSwapHash() []byte

func (*ServerLoopOutRequest) ProtoMessage

func (*ServerLoopOutRequest) ProtoMessage()

func (*ServerLoopOutRequest) Reset

func (m *ServerLoopOutRequest) Reset()

func (*ServerLoopOutRequest) String

func (m *ServerLoopOutRequest) String() string

func (*ServerLoopOutRequest) XXX_DiscardUnknown

func (m *ServerLoopOutRequest) XXX_DiscardUnknown()

func (*ServerLoopOutRequest) XXX_Marshal

func (m *ServerLoopOutRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServerLoopOutRequest) XXX_Merge

func (m *ServerLoopOutRequest) XXX_Merge(src proto.Message)

func (*ServerLoopOutRequest) XXX_Size

func (m *ServerLoopOutRequest) XXX_Size() int

func (*ServerLoopOutRequest) XXX_Unmarshal

func (m *ServerLoopOutRequest) XXX_Unmarshal(b []byte) error

type ServerLoopOutResponse

type ServerLoopOutResponse struct {
	SwapInvoice          string   `protobuf:"bytes,1,opt,name=swap_invoice,json=swapInvoice,proto3" json:"swap_invoice,omitempty"`
	PrepayInvoice        string   `protobuf:"bytes,2,opt,name=prepay_invoice,json=prepayInvoice,proto3" json:"prepay_invoice,omitempty"`
	SenderKey            []byte   `protobuf:"bytes,3,opt,name=sender_key,json=senderKey,proto3" json:"sender_key,omitempty"`
	Expiry               int32    `protobuf:"varint,4,opt,name=expiry,proto3" json:"expiry,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ServerLoopOutResponse) Descriptor

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

func (*ServerLoopOutResponse) GetExpiry

func (m *ServerLoopOutResponse) GetExpiry() int32

func (*ServerLoopOutResponse) GetPrepayInvoice

func (m *ServerLoopOutResponse) GetPrepayInvoice() string

func (*ServerLoopOutResponse) GetSenderKey

func (m *ServerLoopOutResponse) GetSenderKey() []byte

func (*ServerLoopOutResponse) GetSwapInvoice

func (m *ServerLoopOutResponse) GetSwapInvoice() string

func (*ServerLoopOutResponse) ProtoMessage

func (*ServerLoopOutResponse) ProtoMessage()

func (*ServerLoopOutResponse) Reset

func (m *ServerLoopOutResponse) Reset()

func (*ServerLoopOutResponse) String

func (m *ServerLoopOutResponse) String() string

func (*ServerLoopOutResponse) XXX_DiscardUnknown

func (m *ServerLoopOutResponse) XXX_DiscardUnknown()

func (*ServerLoopOutResponse) XXX_Marshal

func (m *ServerLoopOutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServerLoopOutResponse) XXX_Merge

func (m *ServerLoopOutResponse) XXX_Merge(src proto.Message)

func (*ServerLoopOutResponse) XXX_Size

func (m *ServerLoopOutResponse) XXX_Size() int

func (*ServerLoopOutResponse) XXX_Unmarshal

func (m *ServerLoopOutResponse) XXX_Unmarshal(b []byte) error

type ServerLoopOutTerms

type ServerLoopOutTerms struct {
	MinSwapAmount        uint64   `protobuf:"varint,1,opt,name=min_swap_amount,json=minSwapAmount,proto3" json:"min_swap_amount,omitempty"`
	MaxSwapAmount        uint64   `protobuf:"varint,2,opt,name=max_swap_amount,json=maxSwapAmount,proto3" json:"max_swap_amount,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ServerLoopOutTerms) Descriptor

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

func (*ServerLoopOutTerms) GetMaxSwapAmount

func (m *ServerLoopOutTerms) GetMaxSwapAmount() uint64

func (*ServerLoopOutTerms) GetMinSwapAmount

func (m *ServerLoopOutTerms) GetMinSwapAmount() uint64

func (*ServerLoopOutTerms) ProtoMessage

func (*ServerLoopOutTerms) ProtoMessage()

func (*ServerLoopOutTerms) Reset

func (m *ServerLoopOutTerms) Reset()

func (*ServerLoopOutTerms) String

func (m *ServerLoopOutTerms) String() string

func (*ServerLoopOutTerms) XXX_DiscardUnknown

func (m *ServerLoopOutTerms) XXX_DiscardUnknown()

func (*ServerLoopOutTerms) XXX_Marshal

func (m *ServerLoopOutTerms) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServerLoopOutTerms) XXX_Merge

func (m *ServerLoopOutTerms) XXX_Merge(src proto.Message)

func (*ServerLoopOutTerms) XXX_Size

func (m *ServerLoopOutTerms) XXX_Size() int

func (*ServerLoopOutTerms) XXX_Unmarshal

func (m *ServerLoopOutTerms) XXX_Unmarshal(b []byte) error

type ServerLoopOutTermsRequest

type ServerLoopOutTermsRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ServerLoopOutTermsRequest) Descriptor

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

func (*ServerLoopOutTermsRequest) ProtoMessage

func (*ServerLoopOutTermsRequest) ProtoMessage()

func (*ServerLoopOutTermsRequest) Reset

func (m *ServerLoopOutTermsRequest) Reset()

func (*ServerLoopOutTermsRequest) String

func (m *ServerLoopOutTermsRequest) String() string

func (*ServerLoopOutTermsRequest) XXX_DiscardUnknown

func (m *ServerLoopOutTermsRequest) XXX_DiscardUnknown()

func (*ServerLoopOutTermsRequest) XXX_Marshal

func (m *ServerLoopOutTermsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServerLoopOutTermsRequest) XXX_Merge

func (m *ServerLoopOutTermsRequest) XXX_Merge(src proto.Message)

func (*ServerLoopOutTermsRequest) XXX_Size

func (m *ServerLoopOutTermsRequest) XXX_Size() int

func (*ServerLoopOutTermsRequest) XXX_Unmarshal

func (m *ServerLoopOutTermsRequest) XXX_Unmarshal(b []byte) error

type SwapClientClient

type SwapClientClient interface {
	//* loop: `out`
	//LoopOut initiates an loop out swap with the given parameters. The call
	//returns after the swap has been set up with the swap server. From that
	//point onwards, progress can be tracked via the SwapStatus stream that is
	//returned from Monitor().
	LoopOut(ctx context.Context, in *LoopOutRequest, opts ...grpc.CallOption) (*SwapResponse, error)
	//*
	//LoopIn initiates a loop in swap with the given parameters. The call
	//returns after the swap has been set up with the swap server. From that
	//point onwards, progress can be tracked via the SwapStatus stream
	//that is returned from Monitor().
	LoopIn(ctx context.Context, in *LoopInRequest, opts ...grpc.CallOption) (*SwapResponse, error)
	//* loop: `monitor`
	//Monitor will return a stream of swap updates for currently active swaps.
	//TODO: add MonitorSync version for REST clients.
	Monitor(ctx context.Context, in *MonitorRequest, opts ...grpc.CallOption) (SwapClient_MonitorClient, error)
	//* loop: `terms`
	//LoopOutTerms returns the terms that the server enforces for a loop out swap.
	LoopOutTerms(ctx context.Context, in *TermsRequest, opts ...grpc.CallOption) (*TermsResponse, error)
	//* loop: `quote`
	//LoopOutQuote returns a quote for a loop out swap with the provided
	//parameters.
	LoopOutQuote(ctx context.Context, in *QuoteRequest, opts ...grpc.CallOption) (*QuoteResponse, error)
	//*
	//GetTerms returns the terms that the server enforces for swaps.
	GetLoopInTerms(ctx context.Context, in *TermsRequest, opts ...grpc.CallOption) (*TermsResponse, error)
	//*
	//GetQuote returns a quote for a swap with the provided parameters.
	GetLoopInQuote(ctx context.Context, in *QuoteRequest, opts ...grpc.CallOption) (*QuoteResponse, error)
}

SwapClientClient is the client API for SwapClient service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewSwapClientClient

func NewSwapClientClient(cc *grpc.ClientConn) SwapClientClient

type SwapClientServer

type SwapClientServer interface {
	//* loop: `out`
	//LoopOut initiates an loop out swap with the given parameters. The call
	//returns after the swap has been set up with the swap server. From that
	//point onwards, progress can be tracked via the SwapStatus stream that is
	//returned from Monitor().
	LoopOut(context.Context, *LoopOutRequest) (*SwapResponse, error)
	//*
	//LoopIn initiates a loop in swap with the given parameters. The call
	//returns after the swap has been set up with the swap server. From that
	//point onwards, progress can be tracked via the SwapStatus stream
	//that is returned from Monitor().
	LoopIn(context.Context, *LoopInRequest) (*SwapResponse, error)
	//* loop: `monitor`
	//Monitor will return a stream of swap updates for currently active swaps.
	//TODO: add MonitorSync version for REST clients.
	Monitor(*MonitorRequest, SwapClient_MonitorServer) error
	//* loop: `terms`
	//LoopOutTerms returns the terms that the server enforces for a loop out swap.
	LoopOutTerms(context.Context, *TermsRequest) (*TermsResponse, error)
	//* loop: `quote`
	//LoopOutQuote returns a quote for a loop out swap with the provided
	//parameters.
	LoopOutQuote(context.Context, *QuoteRequest) (*QuoteResponse, error)
	//*
	//GetTerms returns the terms that the server enforces for swaps.
	GetLoopInTerms(context.Context, *TermsRequest) (*TermsResponse, error)
	//*
	//GetQuote returns a quote for a swap with the provided parameters.
	GetLoopInQuote(context.Context, *QuoteRequest) (*QuoteResponse, error)
}

SwapClientServer is the server API for SwapClient service.

type SwapClient_MonitorClient

type SwapClient_MonitorClient interface {
	Recv() (*SwapStatus, error)
	grpc.ClientStream
}

type SwapClient_MonitorServer

type SwapClient_MonitorServer interface {
	Send(*SwapStatus) error
	grpc.ServerStream
}

type SwapResponse

type SwapResponse struct {
	//*
	//Swap identifier to track status in the update stream that is returned from
	//the Start() call. Currently this is the hash that locks the htlcs.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	//*
	//The address of the on-chain htlc.
	HtlcAddress          string   `protobuf:"bytes,2,opt,name=htlc_address,json=htlcAddress,proto3" json:"htlc_address,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SwapResponse) Descriptor

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

func (*SwapResponse) GetHtlcAddress

func (m *SwapResponse) GetHtlcAddress() string

func (*SwapResponse) GetId

func (m *SwapResponse) GetId() string

func (*SwapResponse) ProtoMessage

func (*SwapResponse) ProtoMessage()

func (*SwapResponse) Reset

func (m *SwapResponse) Reset()

func (*SwapResponse) String

func (m *SwapResponse) String() string

func (*SwapResponse) XXX_DiscardUnknown

func (m *SwapResponse) XXX_DiscardUnknown()

func (*SwapResponse) XXX_Marshal

func (m *SwapResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SwapResponse) XXX_Merge

func (m *SwapResponse) XXX_Merge(src proto.Message)

func (*SwapResponse) XXX_Size

func (m *SwapResponse) XXX_Size() int

func (*SwapResponse) XXX_Unmarshal

func (m *SwapResponse) XXX_Unmarshal(b []byte) error

type SwapServerClient

SwapServerClient is the client API for SwapServer service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewSwapServerClient

func NewSwapServerClient(cc *grpc.ClientConn) SwapServerClient

type SwapState

type SwapState int32
const (
	//*
	//INITIATED is the initial state of a swap. At that point, the initiation
	//call to the server has been made and the payment process has been started
	//for the swap and prepayment invoices.
	SwapState_INITIATED SwapState = 0
	//*
	//PREIMAGE_REVEALED is reached when the sweep tx publication is first
	//attempted. From that point on, we should consider the preimage to no
	//longer be secret and we need to do all we can to get the sweep confirmed.
	//This state will mostly coalesce with StateHtlcConfirmed, except in the
	//case where we wait for fees to come down before we sweep.
	SwapState_PREIMAGE_REVEALED SwapState = 1
	//*
	//HTLC_PUBLISHED is reached when the htlc tx has been published in a loop in
	//swap.
	SwapState_HTLC_PUBLISHED SwapState = 2
	//*
	//SUCCESS is the final swap state that is reached when the sweep tx has
	//the required confirmation depth.
	SwapState_SUCCESS SwapState = 3
	//*
	//FAILED is the final swap state for a failed swap with or without loss of
	//the swap amount.
	SwapState_FAILED SwapState = 4
	//*
	//INVOICE_SETTLED is reached when the swap invoice in a loop in swap has been
	//paid, but we are still waiting for the htlc spend to confirm.
	SwapState_INVOICE_SETTLED SwapState = 5
)

func (SwapState) EnumDescriptor

func (SwapState) EnumDescriptor() ([]byte, []int)

func (SwapState) String

func (x SwapState) String() string

type SwapStatus

type SwapStatus struct {
	//*
	//Requested swap amount in sat. This does not include the swap and miner
	//fee.
	Amt int64 `protobuf:"varint,1,opt,name=amt,proto3" json:"amt,omitempty"`
	//*
	//Swap identifier to track status in the update stream that is returned from
	//the Start() call. Currently this is the hash that locks the htlcs.
	Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	//*
	//Swap type
	Type SwapType `protobuf:"varint,3,opt,name=type,proto3,enum=looprpc.SwapType" json:"type,omitempty"`
	//*
	//State the swap is currently in, see State enum.
	State SwapState `protobuf:"varint,4,opt,name=state,proto3,enum=looprpc.SwapState" json:"state,omitempty"`
	//*
	//Initiation time of the swap.
	InitiationTime int64 `protobuf:"varint,5,opt,name=initiation_time,json=initiationTime,proto3" json:"initiation_time,omitempty"`
	//*
	//Initiation time of the swap.
	LastUpdateTime int64 `protobuf:"varint,6,opt,name=last_update_time,json=lastUpdateTime,proto3" json:"last_update_time,omitempty"`
	//*
	//Htlc address.
	HtlcAddress string `protobuf:"bytes,7,opt,name=htlc_address,json=htlcAddress,proto3" json:"htlc_address,omitempty"`
	/// Swap server cost
	CostServer int64 `protobuf:"varint,8,opt,name=cost_server,json=costServer,proto3" json:"cost_server,omitempty"`
	// On-chain transaction cost
	CostOnchain int64 `protobuf:"varint,9,opt,name=cost_onchain,json=costOnchain,proto3" json:"cost_onchain,omitempty"`
	// Off-chain routing fees
	CostOffchain         int64    `protobuf:"varint,10,opt,name=cost_offchain,json=costOffchain,proto3" json:"cost_offchain,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SwapStatus) Descriptor

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

func (*SwapStatus) GetAmt

func (m *SwapStatus) GetAmt() int64

func (*SwapStatus) GetCostOffchain

func (m *SwapStatus) GetCostOffchain() int64

func (*SwapStatus) GetCostOnchain

func (m *SwapStatus) GetCostOnchain() int64

func (*SwapStatus) GetCostServer

func (m *SwapStatus) GetCostServer() int64

func (*SwapStatus) GetHtlcAddress

func (m *SwapStatus) GetHtlcAddress() string

func (*SwapStatus) GetId

func (m *SwapStatus) GetId() string

func (*SwapStatus) GetInitiationTime

func (m *SwapStatus) GetInitiationTime() int64

func (*SwapStatus) GetLastUpdateTime

func (m *SwapStatus) GetLastUpdateTime() int64

func (*SwapStatus) GetState

func (m *SwapStatus) GetState() SwapState

func (*SwapStatus) GetType

func (m *SwapStatus) GetType() SwapType

func (*SwapStatus) ProtoMessage

func (*SwapStatus) ProtoMessage()

func (*SwapStatus) Reset

func (m *SwapStatus) Reset()

func (*SwapStatus) String

func (m *SwapStatus) String() string

func (*SwapStatus) XXX_DiscardUnknown

func (m *SwapStatus) XXX_DiscardUnknown()

func (*SwapStatus) XXX_Marshal

func (m *SwapStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SwapStatus) XXX_Merge

func (m *SwapStatus) XXX_Merge(src proto.Message)

func (*SwapStatus) XXX_Size

func (m *SwapStatus) XXX_Size() int

func (*SwapStatus) XXX_Unmarshal

func (m *SwapStatus) XXX_Unmarshal(b []byte) error

type SwapType

type SwapType int32
const (
	// LOOP_OUT indicates an loop out swap (off-chain to on-chain)
	SwapType_LOOP_OUT SwapType = 0
	// LOOP_IN indicates a loop in swap (on-chain to off-chain)
	SwapType_LOOP_IN SwapType = 1
)

func (SwapType) EnumDescriptor

func (SwapType) EnumDescriptor() ([]byte, []int)

func (SwapType) String

func (x SwapType) String() string

type TermsRequest

type TermsRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TermsRequest) Descriptor

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

func (*TermsRequest) ProtoMessage

func (*TermsRequest) ProtoMessage()

func (*TermsRequest) Reset

func (m *TermsRequest) Reset()

func (*TermsRequest) String

func (m *TermsRequest) String() string

func (*TermsRequest) XXX_DiscardUnknown

func (m *TermsRequest) XXX_DiscardUnknown()

func (*TermsRequest) XXX_Marshal

func (m *TermsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TermsRequest) XXX_Merge

func (m *TermsRequest) XXX_Merge(src proto.Message)

func (*TermsRequest) XXX_Size

func (m *TermsRequest) XXX_Size() int

func (*TermsRequest) XXX_Unmarshal

func (m *TermsRequest) XXX_Unmarshal(b []byte) error

type TermsResponse

type TermsResponse struct {
	//*
	//Minimum swap amount (sat)
	MinSwapAmount int64 `protobuf:"varint,5,opt,name=min_swap_amount,json=minSwapAmount,proto3" json:"min_swap_amount,omitempty"`
	//*
	//Maximum swap amount (sat)
	MaxSwapAmount        int64    `protobuf:"varint,6,opt,name=max_swap_amount,json=maxSwapAmount,proto3" json:"max_swap_amount,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TermsResponse) Descriptor

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

func (*TermsResponse) GetMaxSwapAmount

func (m *TermsResponse) GetMaxSwapAmount() int64

func (*TermsResponse) GetMinSwapAmount

func (m *TermsResponse) GetMinSwapAmount() int64

func (*TermsResponse) ProtoMessage

func (*TermsResponse) ProtoMessage()

func (*TermsResponse) Reset

func (m *TermsResponse) Reset()

func (*TermsResponse) String

func (m *TermsResponse) String() string

func (*TermsResponse) XXX_DiscardUnknown

func (m *TermsResponse) XXX_DiscardUnknown()

func (*TermsResponse) XXX_Marshal

func (m *TermsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TermsResponse) XXX_Merge

func (m *TermsResponse) XXX_Merge(src proto.Message)

func (*TermsResponse) XXX_Size

func (m *TermsResponse) XXX_Size() int

func (*TermsResponse) XXX_Unmarshal

func (m *TermsResponse) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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