Documentation ¶
Index ¶
- func AdrStringToOutscript(adr string) ([]byte, error)
- func CoinTypeFromAdr(adr string) uint32
- func CoinTypeFromBechAdr(adr string) (uint32, error)
- func LndcRpcCanConnectLocally() bool
- func LndcRpcCanConnectLocallyWithHomeDir(litHomeDir string) bool
- func RPCListen(rpcl *LitRPC, host string, port uint16)
- func WebUIHandler(w http.ResponseWriter, r *http.Request)
- type AddHTLCArgs
- type AddHTLCReply
- type AddOracleArgs
- type AddOracleReply
- type AddressArgs
- type AddressReply
- type AssignNicknameArgs
- type BalanceReply
- type ChanArgs
- type ChannelGraphReply
- type ChannelInfo
- type ChannelListReply
- type ClaimHTLCArgs
- type ClearHTLCArgs
- type ClearHTLCReply
- type CoinArgs
- type CoinBalReply
- type ConInfo
- type ConnectArgs
- type ConnectReply
- type ContractRespondArgs
- type ContractRespondReply
- type DualFundArgs
- type DualFundRespondArgs
- type DumpReply
- type FanArgs
- type FeeArgs
- type FeeReply
- type FundArgs
- type FundReply
- type GetContractArgs
- type GetContractReply
- type HTLCInfo
- type ImportOracleArgs
- type ImportOracleReply
- type ListConnectionsReply
- type ListContractsArgs
- type ListContractsReply
- type ListOraclesArgs
- type ListOraclesReply
- type ListenArgs
- type ListeningPortsReply
- type LitRPC
- func (r *LitRPC) AddHTLC(args AddHTLCArgs, reply *AddHTLCReply) error
- func (r *LitRPC) AddOracle(args AddOracleArgs, reply *AddOracleReply) error
- func (r *LitRPC) Address(args *AddressArgs, reply *AddressReply) error
- func (r *LitRPC) AssignNickname(args AssignNicknameArgs, reply *StatusReply) error
- func (r *LitRPC) Balance(args *NoArgs, reply *BalanceReply) error
- func (r *LitRPC) BreakChannel(args ChanArgs, reply *StatusReply) error
- func (r *LitRPC) ChannelList(args ChanArgs, reply *ChannelListReply) error
- func (r *LitRPC) ClaimHTLC(args *ClaimHTLCArgs, reply *TxidsReply) error
- func (r *LitRPC) ClearHTLC(args ClearHTLCArgs, reply *ClearHTLCReply) error
- func (r *LitRPC) CloseChannel(args ChanArgs, reply *StatusReply) error
- func (r *LitRPC) Connect(args ConnectArgs, reply *ConnectReply) error
- func (r *LitRPC) ContractRespond(args ContractRespondArgs, reply *ContractRespondReply) error
- func (r *LitRPC) DualFundChannel(args DualFundArgs, reply *StatusReply) error
- func (r *LitRPC) DualFundRespond(args DualFundRespondArgs, reply *StatusReply) error
- func (r *LitRPC) DumpPrivs(args NoArgs, reply *DumpReply) error
- func (r *LitRPC) Fanout(args FanArgs, reply *TxidsReply) error
- func (r *LitRPC) FundChannel(args FundArgs, reply *FundReply) error
- func (r *LitRPC) GetAddresses(args *NoArgs, reply *AddressReply) error
- func (r *LitRPC) GetChannelMap(args NoArgs, reply *ChannelGraphReply) error
- func (r *LitRPC) GetContract(args GetContractArgs, reply *GetContractReply) error
- func (r *LitRPC) GetFee(args *FeeArgs, reply *FeeReply) error
- func (r *LitRPC) GetListeningPorts(args NoArgs, reply *ListeningPortsReply) error
- func (r *LitRPC) GetMessages(args NoArgs, reply *StatusReply) error
- func (r *LitRPC) ImportOracle(args ImportOracleArgs, reply *ImportOracleReply) error
- func (r *LitRPC) ListConnections(args NoArgs, reply *ListConnectionsReply) error
- func (r *LitRPC) ListContracts(args ListContractsArgs, reply *ListContractsReply) error
- func (r *LitRPC) ListMultihopPayments(args NoArgs, reply *MultihopPaymentsReply) error
- func (r *LitRPC) ListOracles(args ListOraclesArgs, reply *ListOraclesReply) error
- func (r *LitRPC) ListPendingRemoteControlAuthRequests(args NoArgs, reply *RCPendingAuthRequestsReply) error
- func (r *LitRPC) Listen(args ListenArgs, reply *ListeningPortsReply) error
- func (r *LitRPC) NewContract(args NewContractArgs, reply *NewContractReply) error
- func (r *LitRPC) OfferContract(args OfferContractArgs, reply *OfferContractReply) error
- func (r *LitRPC) PayMultihop(args PayMultihopArgs, reply *StatusReply) error
- func (r *LitRPC) PendingDualFund(args PendingDualFundRequestsArgs, reply *PendingDualFundReply) error
- func (r *LitRPC) Push(args PushArgs, reply *PushReply) error
- func (r *LitRPC) RemoteControlAuth(args RCAuthArgs, reply *StatusReply) error
- func (r *LitRPC) RequestRemoteControlAuthorization(args RCRequestAuthArgs, reply *StatusReply) error
- func (r *LitRPC) Say(args SayArgs, reply *StatusReply) error
- func (r *LitRPC) Send(args SendArgs, reply *TxidsReply) error
- func (r *LitRPC) SetContractCoinType(args SetContractCoinTypeArgs, reply *SetContractCoinTypeReply) error
- func (r *LitRPC) SetContractDatafeed(args SetContractDatafeedArgs, reply *SetContractDatafeedReply) error
- func (r *LitRPC) SetContractDivision(args SetContractDivisionArgs, reply *SetContractDivisionReply) error
- func (r *LitRPC) SetContractFunding(args SetContractFundingArgs, reply *SetContractFundingReply) error
- func (r *LitRPC) SetContractOracle(args SetContractOracleArgs, reply *SetContractOracleReply) error
- func (r *LitRPC) SetContractRPoint(args SetContractRPointArgs, reply *SetContractRPointReply) error
- func (r *LitRPC) SetContractSettlementTime(args SetContractSettlementTimeArgs, reply *SetContractSettlementTimeReply) error
- func (r *LitRPC) SetFee(args *SetFeeArgs, reply *FeeReply) error
- func (r *LitRPC) SettleContract(args SettleContractArgs, reply *SettleContractReply) error
- func (r *LitRPC) StateDump(args StateDumpArgs, reply *StateDumpReply) error
- func (r *LitRPC) Stop(args NoArgs, reply *StatusReply) error
- func (r *LitRPC) Sweep(args SweepArgs, reply *TxidsReply) error
- func (r *LitRPC) TestLog(arg string, reply *string) error
- func (r *LitRPC) TxoList(args *NoArgs, reply *TxoListReply) error
- func (r *LitRPC) Watch(args WatchArgs, reply *WatchReply) error
- type LndcRpcClient
- func NewLndcRpcClient(address string, key *koblitz.PrivateKey) (*LndcRpcClient, error)
- func NewLocalLndcRpcClient() (*LndcRpcClient, error)
- func NewLocalLndcRpcClientWithHomeDirAndPort(litHomeDir string, port uint32) (*LndcRpcClient, error)
- func NewLocalLndcRpcClientWithPort(port uint32) (*LndcRpcClient, error)
- type LndcRpcWebsocketProxy
- func NewLndcRpcWebsocketProxy(litAdr string, key *koblitz.PrivateKey) (*LndcRpcWebsocketProxy, error)
- func NewLndcRpcWebsocketProxyWithLndc(lndcRpcClient *LndcRpcClient) *LndcRpcWebsocketProxy
- func NewLocalLndcRpcWebsocketProxy() (*LndcRpcWebsocketProxy, error)
- func NewLocalLndcRpcWebsocketProxyWithHomeDirAndPort(litHomeDir string, port uint32) (*LndcRpcWebsocketProxy, error)
- func NewLocalLndcRpcWebsocketProxyWithPort(port uint32) (*LndcRpcWebsocketProxy, error)
- type MultihopPaymentInfo
- type MultihopPaymentsReply
- type NewContractArgs
- type NewContractReply
- type NoArgs
- type OfferContractArgs
- type OfferContractReply
- type OiOoReadWriter
- type PayMultihopArgs
- type PendingDualFundReply
- type PendingDualFundRequestsArgs
- type PrivInfo
- type PushArgs
- type PushReply
- type RCAuthArgs
- type RCPendingAuthRequestsReply
- type RCRequestAuthArgs
- type SayArgs
- type SendArgs
- type SetContractCoinTypeArgs
- type SetContractCoinTypeReply
- type SetContractDatafeedArgs
- type SetContractDatafeedReply
- type SetContractDivisionArgs
- type SetContractDivisionReply
- type SetContractFundingArgs
- type SetContractFundingReply
- type SetContractOracleArgs
- type SetContractOracleReply
- type SetContractRPointArgs
- type SetContractRPointReply
- type SetContractSettlementTimeArgs
- type SetContractSettlementTimeReply
- type SetFeeArgs
- type SettleContractArgs
- type SettleContractReply
- type StateDumpArgs
- type StateDumpReply
- type StatusReply
- type SweepArgs
- type TxidsReply
- type TxoInfo
- type TxoListReply
- type WatchArgs
- type WatchReply
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdrStringToOutscript ¶
AdrStringToOutscript converts an address string into an output script byte slice note that this ignores the prefix! Be careful not to mix networks. currently only works for testnet legacy addresses
func CoinTypeFromAdr ¶
Default to testnet for unknown / bad addrs.
func CoinTypeFromBechAdr ¶
Gives the cointype from an address string (if known)
func LndcRpcCanConnectLocally ¶
func LndcRpcCanConnectLocally() bool
LndcRpcCanConnectLocally checks if we can connect to lit using the normal home directory. In that case, we read from the privkey.hex and use a different derivation than the nodeID to determine the private key. This key is authorized by default for remote control.
func LndcRpcCanConnectLocallyWithHomeDir ¶
LndcRpcCanConnectLocallyWithHomeDir checks if we can connect to lit given the home directory. In that case, we read from the privkey.hex and use a different derivation than the nodeID to determine the private key. This key is authorized by default for remote control.
func WebUIHandler ¶
func WebUIHandler(w http.ResponseWriter, r *http.Request)
Types ¶
type AddHTLCArgs ¶
------------------------- HTLCs
type AddHTLCReply ¶
type AddOracleArgs ¶
type AddOracleReply ¶
type AddressArgs ¶
------------------------- address
type AddressReply ¶
TODO Make this contain an array of structures not a structure of arrays.
type AssignNicknameArgs ¶
------------------------- name a connection
type BalanceReply ¶
type BalanceReply struct {
Balances []CoinBalReply
}
type ChannelGraphReply ¶
type ChannelGraphReply struct {
Graph string
}
------------ Dump channel map
type ChannelInfo ¶
type ChannelInfo struct { OutPoint string CoinType uint32 Closed bool Failed bool Capacity int64 MyBalance int64 Height int32 // block height of channel fund confirmation StateNum uint64 // Most recent commit number PeerIdx, CIdx uint32 PeerID string Data [32]byte Pkh [20]byte HTLCs []HTLCInfo LastUpdate uint64 }
type ChannelListReply ¶
type ChannelListReply struct {
Channels []ChannelInfo
}
type ClaimHTLCArgs ¶
type ClaimHTLCArgs struct {
R [16]byte
}
type ClearHTLCArgs ¶
type ClearHTLCReply ¶
type ClearHTLCReply struct {
StateIndex uint64
}
type CoinBalReply ¶
type CoinBalReply struct { CoinType uint32 SyncHeight int32 // height this wallet is synced to ChanTotal int64 // total balance in channels TxoTotal int64 // all utxos MatureWitty int64 // confirmed, spendable and witness FeeRate int64 // fee per byte }
------------------------- balance BalReply is the reply when the user asks about their balance.
type ConnectReply ¶
type ContractRespondArgs ¶
type ContractRespondReply ¶
type ContractRespondReply struct {
Success bool
}
type DualFundArgs ¶
type DualFundArgs struct { Peer uint32 // who to make the channel with CoinType uint32 // what coin to use OurAmount int64 // what amount we will fund TheirAmount int64 // what amount we request them to fund }
------------------------- dual fund
type DualFundRespondArgs ¶
type DualFundRespondArgs struct { // True for accept, false for decline AcceptOrDecline bool }
type FundArgs ¶
type FundArgs struct { Peer uint32 // who to make the channel with CoinType uint32 // what coin to use Capacity int64 // later can be minimum capacity Roundup int64 // ignore for now; can be used to round-up capacity InitialSend int64 // Initial send of -1 means "ALL" Data [32]byte }
------------------------- fund
type GetContractArgs ¶
type GetContractArgs struct {
Idx uint64
}
type GetContractReply ¶
type GetContractReply struct {
Contract *lnutil.DlcContract
}
type ImportOracleArgs ¶
type ImportOracleReply ¶
type ListConnectionsReply ¶
type ListConnectionsReply struct { Connections []qln.SimplePeerInfo MyPKH string }
type ListContractsArgs ¶
type ListContractsArgs struct { }
type ListContractsReply ¶
type ListContractsReply struct {
Contracts []*lnutil.DlcContract
}
type ListOraclesArgs ¶
type ListOraclesArgs struct { }
type ListOraclesReply ¶
type ListenArgs ¶
type ListenArgs struct {
Port int
}
type ListeningPortsReply ¶
type LitRPC ¶
func (*LitRPC) AddHTLC ¶
func (r *LitRPC) AddHTLC(args AddHTLCArgs, reply *AddHTLCReply) error
func (*LitRPC) AddOracle ¶
func (r *LitRPC) AddOracle(args AddOracleArgs, reply *AddOracleReply) error
AddOracle manually adds an oracle from its PubKey A
func (*LitRPC) Address ¶
func (r *LitRPC) Address(args *AddressArgs, reply *AddressReply) error
func (*LitRPC) AssignNickname ¶
func (r *LitRPC) AssignNickname(args AssignNicknameArgs, reply *StatusReply) error
func (*LitRPC) BreakChannel ¶
func (r *LitRPC) BreakChannel(args ChanArgs, reply *StatusReply) error
------------------------- break
func (*LitRPC) ChannelList ¶
func (r *LitRPC) ChannelList(args ChanArgs, reply *ChannelListReply) error
ChannelList sends back a list of every (open?) channel with some info for each.
func (*LitRPC) ClaimHTLC ¶
func (r *LitRPC) ClaimHTLC(args *ClaimHTLCArgs, reply *TxidsReply) error
func (*LitRPC) ClearHTLC ¶
func (r *LitRPC) ClearHTLC(args ClearHTLCArgs, reply *ClearHTLCReply) error
func (*LitRPC) CloseChannel ¶
func (r *LitRPC) CloseChannel(args ChanArgs, reply *StatusReply) error
reply with status string CloseChannel is a cooperative closing of a channel to a specified address.
func (*LitRPC) Connect ¶
func (r *LitRPC) Connect(args ConnectArgs, reply *ConnectReply) error
func (*LitRPC) ContractRespond ¶
func (r *LitRPC) ContractRespond(args ContractRespondArgs, reply *ContractRespondReply) error
DeclineContract declines an offered contract
func (*LitRPC) DualFundChannel ¶
func (r *LitRPC) DualFundChannel(args DualFundArgs, reply *StatusReply) error
func (*LitRPC) DualFundRespond ¶
func (r *LitRPC) DualFundRespond(args DualFundRespondArgs, reply *StatusReply) error
func (*LitRPC) GetAddresses ¶
func (r *LitRPC) GetAddresses(args *NoArgs, reply *AddressReply) error
More human-readable replies
func (*LitRPC) GetChannelMap ¶
func (r *LitRPC) GetChannelMap(args NoArgs, reply *ChannelGraphReply) error
func (*LitRPC) GetContract ¶
func (r *LitRPC) GetContract(args GetContractArgs, reply *GetContractReply) error
GetContract returns a single contract based on its index
func (*LitRPC) GetListeningPorts ¶
func (r *LitRPC) GetListeningPorts(args NoArgs, reply *ListeningPortsReply) error
func (*LitRPC) GetMessages ¶
func (r *LitRPC) GetMessages(args NoArgs, reply *StatusReply) error
------- receive chat
func (*LitRPC) ImportOracle ¶
func (r *LitRPC) ImportOracle(args ImportOracleArgs, reply *ImportOracleReply) error
ImportOracle imports an oracle from a REST API
func (*LitRPC) ListConnections ¶
func (r *LitRPC) ListConnections(args NoArgs, reply *ListConnectionsReply) error
func (*LitRPC) ListContracts ¶
func (r *LitRPC) ListContracts(args ListContractsArgs, reply *ListContractsReply) error
ListContracts returns all contracts know to LIT
func (*LitRPC) ListMultihopPayments ¶
func (r *LitRPC) ListMultihopPayments(args NoArgs, reply *MultihopPaymentsReply) error
func (*LitRPC) ListOracles ¶
func (r *LitRPC) ListOracles(args ListOraclesArgs, reply *ListOraclesReply) error
ListOracles returns all oracles know to LIT
func (*LitRPC) ListPendingRemoteControlAuthRequests ¶
func (r *LitRPC) ListPendingRemoteControlAuthRequests(args NoArgs, reply *RCPendingAuthRequestsReply) error
func (*LitRPC) Listen ¶
func (r *LitRPC) Listen(args ListenArgs, reply *ListeningPortsReply) error
func (*LitRPC) NewContract ¶
func (r *LitRPC) NewContract(args NewContractArgs, reply *NewContractReply) error
NewContract creates a new draft contract
func (*LitRPC) OfferContract ¶
func (r *LitRPC) OfferContract(args OfferContractArgs, reply *OfferContractReply) error
OfferContract offers a contract to a (connected) peer
func (*LitRPC) PayMultihop ¶
func (r *LitRPC) PayMultihop(args PayMultihopArgs, reply *StatusReply) error
PayMultihop tries to find a multi-hop path to send the payment along
func (*LitRPC) PendingDualFund ¶
func (r *LitRPC) PendingDualFund(args PendingDualFundRequestsArgs, reply *PendingDualFundReply) error
func (*LitRPC) RemoteControlAuth ¶
func (r *LitRPC) RemoteControlAuth(args RCAuthArgs, reply *StatusReply) error
func (*LitRPC) RequestRemoteControlAuthorization ¶
func (r *LitRPC) RequestRemoteControlAuthorization(args RCRequestAuthArgs, reply *StatusReply) error
func (*LitRPC) SetContractCoinType ¶
func (r *LitRPC) SetContractCoinType(args SetContractCoinTypeArgs, reply *SetContractCoinTypeReply) error
SetContractCoinType sets the coin type the contract will be in. Note that a peer that doesn't have a wallet of that type will automatically decline the contract.
func (*LitRPC) SetContractDatafeed ¶
func (r *LitRPC) SetContractDatafeed(args SetContractDatafeedArgs, reply *SetContractDatafeedReply) error
SetContractDatafeed sets a data feed by index to a contract, which is then used to fetch the R-point from the oracle's REST API
func (*LitRPC) SetContractDivision ¶
func (r *LitRPC) SetContractDivision(args SetContractDivisionArgs, reply *SetContractDivisionReply) error
SetContractDivision sets how the contract is settled. The parameters indicate at what value the full contract funds are ours, and at what value they are full funds are for our peer. Between those values, the contract will divide the contract funds linearly
func (*LitRPC) SetContractFunding ¶
func (r *LitRPC) SetContractFunding(args SetContractFundingArgs, reply *SetContractFundingReply) error
SetContractFunding sets the division in funding the channel. The arguments decide how much we're funding and how much we expect the peer we offer the contract to to fund
func (*LitRPC) SetContractOracle ¶
func (r *LitRPC) SetContractOracle(args SetContractOracleArgs, reply *SetContractOracleReply) error
SetContractOracle assigns a known oracle to a (new) contract
func (*LitRPC) SetContractRPoint ¶
func (r *LitRPC) SetContractRPoint(args SetContractRPointArgs, reply *SetContractRPointReply) error
SetContractRPoint manually sets the R-point for the contract using a pubkey
func (*LitRPC) SetContractSettlementTime ¶
func (r *LitRPC) SetContractSettlementTime(args SetContractSettlementTimeArgs, reply *SetContractSettlementTimeReply) error
SetContractSettlementTime sets the time this contract will settle (the unix epoch)
func (*LitRPC) SetFee ¶
func (r *LitRPC) SetFee(args *SetFeeArgs, reply *FeeReply) error
SetFee allows you to set a fee rate for a wallet.
func (*LitRPC) SettleContract ¶
func (r *LitRPC) SettleContract(args SettleContractArgs, reply *SettleContractReply) error
SettleContract uses the value and signature from the oracle to settle the contract and send the equivalent settlement transaction to the blockchain. It will subsequently claim the contract output back to our wallet
func (*LitRPC) StateDump ¶
func (r *LitRPC) StateDump(args StateDumpArgs, reply *StateDumpReply) error
StateDump dumps all of the meta data for the state commitments of a channel
type LndcRpcClient ¶
type LndcRpcClient struct {
// contains filtered or unexported fields
}
LndcRpcClient can be used to remotely talk to a lit node over LNDC, making remote control instructions over the remote control interface. It uses a regular lndc.Conn to connect to lit over port 2448, and sends RemoteControlRpcRequestMsg to it, and receives RemoteControlRpcResponseMsg
func NewLndcRpcClient ¶
func NewLndcRpcClient(address string, key *koblitz.PrivateKey) (*LndcRpcClient, error)
NewLndcRpcClient creates a new LNDC client using the given private key, which is arbitrary. It will then connect to the lit node specified in address, and can then exchange remote control calls with it. In order to succesfully execute command, the given key must be authorized in the lit instance we're connecting to.
func NewLocalLndcRpcClient ¶
func NewLocalLndcRpcClient() (*LndcRpcClient, error)
NewLocalLndcRpcClient is an overload for NewLocalLndcRpcClientWithHomeDirAndPort using the default home dir and port
func NewLocalLndcRpcClientWithHomeDirAndPort ¶
func NewLocalLndcRpcClientWithHomeDirAndPort(litHomeDir string, port uint32) (*LndcRpcClient, error)
NewLocalLndcRpcClientWithHomeDirAndPort loads up privkey.hex, and derives the local lit node's address from it, as well as derives the default remote control private key from it. Then it will connect to the local lit instance.
func NewLocalLndcRpcClientWithPort ¶
func NewLocalLndcRpcClientWithPort(port uint32) (*LndcRpcClient, error)
NewLocalLndcRpcClientWithPort is an overload for NewLocalLndcRpcClientWithHomeDirAndPort using the default home dir
func (*LndcRpcClient) Call ¶
func (cli *LndcRpcClient) Call(serviceMethod string, args interface{}, reply interface{}) error
func (*LndcRpcClient) Close ¶
func (cli *LndcRpcClient) Close() error
func (*LndcRpcClient) ReceiveLoop ¶
func (cli *LndcRpcClient) ReceiveLoop()
ReceiveLoop reads messages from the LNDC connection and check if they are RPC responses
type LndcRpcWebsocketProxy ¶
type LndcRpcWebsocketProxy struct {
// contains filtered or unexported fields
}
LndcRpcWebsocketProxy is a regular websocket server that translates the received requests into a call on the new LNDC based remote control transport
func NewLndcRpcWebsocketProxy ¶
func NewLndcRpcWebsocketProxy(litAdr string, key *koblitz.PrivateKey) (*LndcRpcWebsocketProxy, error)
NewLndcRpcWebsocketProxy is an overload to NewLndcRpcWebsocketProxyWithLndc connecting to the given lit node specified by litAdr, identifying with the given key.
func NewLndcRpcWebsocketProxyWithLndc ¶
func NewLndcRpcWebsocketProxyWithLndc(lndcRpcClient *LndcRpcClient) *LndcRpcWebsocketProxy
NewLndcRpcWebsocketProxyWithLndc creates a new proxy that listens on the websocket port and translates requests into remote control messages over lndc transport.
func NewLocalLndcRpcWebsocketProxy ¶
func NewLocalLndcRpcWebsocketProxy() (*LndcRpcWebsocketProxy, error)
NewLocalLndcRpcWebsocketProxy is an overload to NewLndcRpcWebsocketProxyWithLndc connecting to the local lit using a derived key from the locally stored privkey.hex using the default home dir and port
func NewLocalLndcRpcWebsocketProxyWithHomeDirAndPort ¶
func NewLocalLndcRpcWebsocketProxyWithHomeDirAndPort(litHomeDir string, port uint32) (*LndcRpcWebsocketProxy, error)
NewLocalLndcRpcWebsocketProxy is an overload to NewLndcRpcWebsocketProxyWithLndc connecting to the local lit using a derived key from the locally stored privkey.hex using the given homedir and the given port
func NewLocalLndcRpcWebsocketProxyWithPort ¶
func NewLocalLndcRpcWebsocketProxyWithPort(port uint32) (*LndcRpcWebsocketProxy, error)
NewLocalLndcRpcWebsocketProxy is an overload to NewLndcRpcWebsocketProxyWithLndc connecting to the local lit using a derived key from the locally stored privkey.hex using the default home dir and the given port
func (*LndcRpcWebsocketProxy) Listen ¶
func (p *LndcRpcWebsocketProxy) Listen(host string, port uint16)
Listen starts listening on the given host and port for websocket requests This function blocks unless an error occurs, so you should call it as a goroutine
type MultihopPaymentInfo ¶
type MultihopPaymentInfo struct { RHash [32]byte R [16]byte Amt int64 Path []string Succeeded bool }
------------ Show multihop payments
type MultihopPaymentsReply ¶
type MultihopPaymentsReply struct {
Payments []MultihopPaymentInfo
}
type NewContractArgs ¶
type NewContractArgs struct { }
type NewContractReply ¶
type NewContractReply struct {
Contract *lnutil.DlcContract
}
type OfferContractArgs ¶
type OfferContractReply ¶
type OfferContractReply struct {
Success bool
}
type OiOoReadWriter ¶
type OiOoReadWriter struct {
// contains filtered or unexported fields
}
OiOoReadWriter is for One-In-One-Out Reader/Writer and I hope to god that it works.
func (OiOoReadWriter) Close ¶
func (o OiOoReadWriter) Close() error
type PayMultihopArgs ¶
type PendingDualFundReply ¶
type PendingDualFundRequestsArgs ¶
type PendingDualFundRequestsArgs struct { }
type PrivInfo ¶
type PrivInfo struct { OutPoint string Amt int64 Height int32 Delay int32 CoinType string Witty bool PairKey string WIF string }
------------------------- dumpPriv
type RCAuthArgs ¶
type RCAuthArgs struct { PubKey []byte Authorization *qln.RemoteControlAuthorization }
type RCPendingAuthRequestsReply ¶
type RCPendingAuthRequestsReply struct {
PubKeys [][33]byte
}
type RCRequestAuthArgs ¶
type RCRequestAuthArgs struct {
PubKey [33]byte
}
type SetContractCoinTypeArgs ¶
type SetContractCoinTypeReply ¶
type SetContractCoinTypeReply struct {
Success bool
}
type SetContractDatafeedArgs ¶
type SetContractDatafeedReply ¶
type SetContractDatafeedReply struct {
Success bool
}
type SetContractDivisionArgs ¶
type SetContractDivisionReply ¶
type SetContractDivisionReply struct {
Success bool
}
type SetContractFundingArgs ¶
type SetContractFundingReply ¶
type SetContractFundingReply struct {
Success bool
}
type SetContractOracleArgs ¶
type SetContractOracleReply ¶
type SetContractOracleReply struct {
Success bool
}
type SetContractRPointArgs ¶
type SetContractRPointReply ¶
type SetContractRPointReply struct {
Success bool
}
type SetContractSettlementTimeReply ¶
type SetContractSettlementTimeReply struct {
Success bool
}
type SettleContractArgs ¶
type SettleContractReply ¶
type StateDumpReply ¶
type StatusReply ¶
type StatusReply struct {
Status string
}
type TxidsReply ¶
type TxidsReply struct {
Txids []string
}
type TxoListReply ¶
type TxoListReply struct {
Txos []TxoInfo
}
type WatchReply ¶
type WatchReply struct {
Msg string
}