litrpc

package
v0.0.0-...-083d63e Latest Latest
Warning

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

Go to latest
Published: May 6, 2017 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdrStringToOutscript

func AdrStringToOutscript(adr string) ([]byte, error)

AdrStringToOutscript converts an address string into an output script byte slice

func CoinTypeFromBechAdr

func CoinTypeFromBechAdr(adr string) (uint32, error)

func RPCListen

func RPCListen(rpcl *LitRPC, port uint16)

Types

type AddressArgs

type AddressArgs struct {
	NumToMake uint32
}

------------------------- address

type AddressReply

type AddressReply struct {
	WitAddresses    []string
	LegacyAddresses []string
}

type BalReply

type BalReply struct {
	ChanTotal   int64 // total balance in channels
	TxoTotal    int64 // all utxos
	MatureWitty int64 // confirmed, spendable and witness
}

------------------------- balance BalReply is the reply when the user asks about their balance. This is a Non-Channel

type ChanArgs

type ChanArgs struct {
	ChanIdx uint32
}

------------------------- cclose

type ChannelInfo

type ChannelInfo struct {
	OutPoint      string
	Closed        bool
	Capacity      int64
	MyBalance     int64
	Height        int32  // block height of channel fund confirmation
	StateNum      uint64 // Most recent commit number
	PeerIdx, CIdx uint32
	PeerID        string
}

type ChannelListReply

type ChannelListReply struct {
	Channels []ChannelInfo
}

type ConInfo

type ConInfo struct {
	PeerNumber uint32
	RemoteHost string
}

type ConnectArgs

type ConnectArgs struct {
	LNAddr string
}

------------------------- connect

type FanArgs

type FanArgs struct {
	DestAdr      string
	NumOutputs   uint32
	AmtPerOutput int64
}

------------------------- fanout

type FundArgs

type FundArgs struct {
	Peer        uint32 // who to make the channel with
	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"
}

------------------------- fund

type ListConnectionsReply

type ListConnectionsReply struct {
	Connections []qln.PeerInfo
	MyPKH       string
}

type ListenArgs

type ListenArgs struct {
	Port string
}

type ListeningPortsReply

type ListeningPortsReply struct {
	LisIpPorts []string
	Adr        string
}

type LitRPC

type LitRPC struct {
	Node      *qln.LitNode
	OffButton chan bool
}

func (*LitRPC) Address

func (r *LitRPC) Address(args *AddressArgs, reply *AddressReply) error

func (*LitRPC) Bal

func (r *LitRPC) Bal(args *NoArgs, reply *BalReply) 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) 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 *StatusReply) error

func (*LitRPC) Fanout

func (r *LitRPC) Fanout(args FanArgs, reply *TxidsReply) error

func (*LitRPC) FundChannel

func (r *LitRPC) FundChannel(args FundArgs, reply *StatusReply) error

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) ListConnections

func (r *LitRPC) ListConnections(args NoArgs, reply *ListConnectionsReply) error

func (*LitRPC) Listen

func (r *LitRPC) Listen(args ListenArgs, reply *StatusReply) error

func (*LitRPC) Push

func (r *LitRPC) Push(args PushArgs, reply *PushReply) error

func (*LitRPC) Say

func (r *LitRPC) Say(args SayArgs, reply *StatusReply) error

func (*LitRPC) Send

func (r *LitRPC) Send(args SendArgs, reply *TxidsReply) error

func (*LitRPC) Stop

func (r *LitRPC) Stop(args NoArgs, reply *StatusReply) error

func (*LitRPC) Sweep

func (r *LitRPC) Sweep(args SweepArgs, reply *TxidsReply) error

func (*LitRPC) SyncHeight

func (r *LitRPC) SyncHeight(args *NoArgs, reply *SyncHeightReply) error

func (*LitRPC) TxoList

func (r *LitRPC) TxoList(args *NoArgs, reply *TxoListReply) error

TxoList sends back a list of all non-channel utxos

type NoArgs

type NoArgs struct {
}

type PushArgs

type PushArgs struct {
	ChanIdx uint32
	Amt     int64
}

------------------------- push

type PushReply

type PushReply struct {
	StateIndex uint64
}

type SayArgs

type SayArgs struct {
	Peer    uint32
	Message string
}

type SendArgs

type SendArgs struct {
	DestAddrs []string
	Amts      []int64
}

------------------------- send

type StatusReply

type StatusReply struct {
	Status string
}

type SweepArgs

type SweepArgs struct {
	DestAdr string
	NumTx   uint32
	Drop    bool
}

------------------------- sweep

type SyncHeightReply

type SyncHeightReply struct {
	SyncHeight   int32
	HeaderHeight int32
}

type TxidsReply

type TxidsReply struct {
	Txids []string
}

type TxoInfo

type TxoInfo struct {
	OutPoint string
	Amt      int64
	Height   int32
	Delay    int32
	Witty    bool

	KeyPath string
}

type TxoListReply

type TxoListReply struct {
	Txos []TxoInfo
}

Jump to

Keyboard shortcuts

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