Documentation ¶
Index ¶
- Constants
- type OnStackEvent
- type RpcMessage
- type Terminus
- func (t *Terminus) Create(msats int) account.AccountDb
- func (t *Terminus) GetInfo() (res string)
- func (t *Terminus) Listen(rawAcct string, rawSharedSeed string) (encodedBeacon string, err error)
- func (t *Terminus) LoadPersisted()
- func (t *Terminus) RetryConnectionLoop()
- func (t *Terminus) ServeHTTP(w http.ResponseWriter, request *http.Request)
- func (t *Terminus) Start(ctx context.Context) error
- func (t *Terminus) StartServer()
- type TerminusClient
- func (t TerminusClient) Connect(accountName, beacon string) (res string, err error)
- func (t TerminusClient) CreateAccount(msats int) (res string, err error)
- func (t TerminusClient) ExecCmd(method string, argv []string) (res []byte, err error)
- func (t TerminusClient) GetInfo() (res string, err error)
- func (t TerminusClient) Listen(accountName string) (res string, err error)
- type TerminusDirectory
- func (t *TerminusDirectory) AddAccount(acct account.AccountDb)
- func (t *TerminusDirectory) GenerateAccountName() string
- func (t *TerminusDirectory) GetAccountList() []account.AccountDb
- func (t *TerminusDirectory) GetAccountNameSet() (accounts []string)
- func (t *TerminusDirectory) GetAccounts() (accounts []account.AccountDb)
- func (t *TerminusDirectory) LookupByName(name string) *account.AccountDb
- func (t *TerminusDirectory) LookupByPaymentHash(hash string)
- func (t *TerminusDirectory) LookupBySeed(seed beacon.SharedSeed) account.AccountDb
- func (t *TerminusDirectory) ReindexAccount(acct account.AccountDb)
- type TerminusLayer
- func (o *TerminusLayer) AnnounceNexus(belowNexus nexus.Nexus)
- func (o *TerminusLayer) HandleInvoiceRequest(ss beacon.SharedSeed, msats int)
- func (o *TerminusLayer) HandlePayRequest(ss beacon.SharedSeed, bolt11 string)
- func (o *TerminusLayer) HandleProviderInfoRequest(ss beacon.SharedSeed)
- func (o *TerminusLayer) NotifyPreImage(sharedSeeds []beacon.SharedSeed, preimage string)
- func (o *TerminusLayer) RegisterAboveLayer(belowLayer layer.Layer)
- func (o *TerminusLayer) RevokeNexus(belowNexus nexus.Nexus)
- func (o *TerminusLayer) SetupTerminusNexus(belowNexus nexus.Nexus) *TerminusNexus
- type TerminusNexus
- func (o TerminusNexus) IsLayerMessage(message message_base.MoneysocketMessage) bool
- func (o *TerminusNexus) NotifyPreimage(preimage, requestReferenceUuid string)
- func (o *TerminusNexus) NotifyProviderInfo(ss beacon.SharedSeed)
- func (o *TerminusNexus) OnBinMessage(belowNexus nexus.Nexus, msgBytes []byte)
- func (o *TerminusNexus) OnMessage(belowNexus nexus.Nexus, message message_base.MoneysocketMessage)
- type TerminusStack
- func (s *TerminusStack) Connect(location location.WebsocketLocation, sharedSeed *beacon.SharedSeed) (*websocket2.OutgoingSocket, error)
- func (s *TerminusStack) GetListenLocation() []location.Location
- func (s *TerminusStack) Listen()
- func (s *TerminusStack) LocalConnect(sharedSeed beacon.SharedSeed)
- func (s *TerminusStack) SendStackEvent(layerName string, nexus nexus.Nexus, status string)
- func (s *TerminusStack) SetupIncomingStack(config *config.Config, localLayer *local.OutgoingLocalLayer) *stack.IncomingStack
- func (s *TerminusStack) SetupLocalLayer() *local.OutgoingLocalLayer
- func (s *TerminusStack) SetupProviderLayer(belowLayer layer.Layer) *provider.ProviderLayer
- func (s *TerminusStack) SetupRendezvousLayer(belowLayer1 layer.Layer, belowLayer2 layer.Layer) *rendezvous.OutgoingRendezvousLayer
- func (s *TerminusStack) SetupTerminusLayer(belowLayer layer.Layer) *TerminusLayer
- func (s *TerminusStack) SetupWebsocketLayer() *websocket.OutgoingWebsocketLayer
Constants ¶
View Source
const ( // get info rpc method GetInfoMethod = "getinfo" // create account rpc method CreateAccountMethod = "create" // connect rpc method ConnectMethod = "connect" // listen rpc method ListenMethod = "listen" )
View Source
const TerminusNexusName = "TerminusNexus"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RpcMessage ¶
type Terminus ¶
type Terminus struct {
// contains filtered or unexported fields
}
func NewTerminus ¶
func (*Terminus) Create ¶
create an account with a given number of msats and add it to the directory
func (*Terminus) LoadPersisted ¶
func (t *Terminus) LoadPersisted()
load persisted accounts from disk
func (*Terminus) RetryConnectionLoop ¶ added in v0.17.0
func (t *Terminus) RetryConnectionLoop()
type TerminusClient ¶
type TerminusClient struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(config *config.Config) TerminusClient
func (TerminusClient) Connect ¶ added in v0.13.0
func (t TerminusClient) Connect(accountName, beacon string) (res string, err error)
func (TerminusClient) CreateAccount ¶
func (t TerminusClient) CreateAccount(msats int) (res string, err error)
create account with a given number of sats
func (TerminusClient) ExecCmd ¶
func (t TerminusClient) ExecCmd(method string, argv []string) (res []byte, err error)
func (TerminusClient) GetInfo ¶
func (t TerminusClient) GetInfo() (res string, err error)
get list of beacons, accounts, etc
type TerminusDirectory ¶
type TerminusDirectory struct { Accounts map[string]account.AccountDb AccountsByPaymentHash map[string]account.AccountDb // contains filtered or unexported fields }
func NewTerminusDirectory ¶
func NewTerminusDirectory(config *config.Config) *TerminusDirectory
func (*TerminusDirectory) AddAccount ¶
func (t *TerminusDirectory) AddAccount(acct account.AccountDb)
func (*TerminusDirectory) GenerateAccountName ¶
func (t *TerminusDirectory) GenerateAccountName() string
generate an account name from an autoincrementing int
func (*TerminusDirectory) GetAccountList ¶
func (t *TerminusDirectory) GetAccountList() []account.AccountDb
func (*TerminusDirectory) GetAccountNameSet ¶
func (t *TerminusDirectory) GetAccountNameSet() (accounts []string)
get list of acount names
func (*TerminusDirectory) GetAccounts ¶
func (t *TerminusDirectory) GetAccounts() (accounts []account.AccountDb)
python verison is an iterator
func (*TerminusDirectory) LookupByName ¶
func (t *TerminusDirectory) LookupByName(name string) *account.AccountDb
func (*TerminusDirectory) LookupByPaymentHash ¶
func (t *TerminusDirectory) LookupByPaymentHash(hash string)
func (*TerminusDirectory) LookupBySeed ¶
func (t *TerminusDirectory) LookupBySeed(seed beacon.SharedSeed) account.AccountDb
func (*TerminusDirectory) ReindexAccount ¶
func (t *TerminusDirectory) ReindexAccount(acct account.AccountDb)
type TerminusLayer ¶
TODO this needs to be fully implemented
func NewTerminusLayer ¶
func NewTerminusLayer() *TerminusLayer
func (*TerminusLayer) AnnounceNexus ¶
func (o *TerminusLayer) AnnounceNexus(belowNexus nexus.Nexus)
func (*TerminusLayer) HandleInvoiceRequest ¶
func (o *TerminusLayer) HandleInvoiceRequest(ss beacon.SharedSeed, msats int)
func (*TerminusLayer) HandlePayRequest ¶
func (o *TerminusLayer) HandlePayRequest(ss beacon.SharedSeed, bolt11 string)
func (*TerminusLayer) HandleProviderInfoRequest ¶
func (o *TerminusLayer) HandleProviderInfoRequest(ss beacon.SharedSeed)
func (*TerminusLayer) NotifyPreImage ¶
func (o *TerminusLayer) NotifyPreImage(sharedSeeds []beacon.SharedSeed, preimage string)
func (*TerminusLayer) RegisterAboveLayer ¶
func (o *TerminusLayer) RegisterAboveLayer(belowLayer layer.Layer)
func (*TerminusLayer) RevokeNexus ¶
func (o *TerminusLayer) RevokeNexus(belowNexus nexus.Nexus)
func (*TerminusLayer) SetupTerminusNexus ¶
func (o *TerminusLayer) SetupTerminusNexus(belowNexus nexus.Nexus) *TerminusNexus
type TerminusNexus ¶
func NewTerminusNexus ¶
func NewTerminusNexus(below nexus.Nexus, layer layer.Layer) TerminusNexus
func (TerminusNexus) IsLayerMessage ¶
func (o TerminusNexus) IsLayerMessage(message message_base.MoneysocketMessage) bool
func (*TerminusNexus) NotifyPreimage ¶
func (o *TerminusNexus) NotifyPreimage(preimage, requestReferenceUuid string)
func (*TerminusNexus) NotifyProviderInfo ¶
func (o *TerminusNexus) NotifyProviderInfo(ss beacon.SharedSeed)
func (*TerminusNexus) OnBinMessage ¶
func (o *TerminusNexus) OnBinMessage(belowNexus nexus.Nexus, msgBytes []byte)
func (*TerminusNexus) OnMessage ¶
func (o *TerminusNexus) OnMessage(belowNexus nexus.Nexus, message message_base.MoneysocketMessage)
type TerminusStack ¶
func NewTerminusStack ¶
func NewTerminusStack(config *config.Config) *TerminusStack
func (*TerminusStack) Connect ¶
func (s *TerminusStack) Connect(location location.WebsocketLocation, sharedSeed *beacon.SharedSeed) (*websocket2.OutgoingSocket, error)
func (*TerminusStack) GetListenLocation ¶
func (s *TerminusStack) GetListenLocation() []location.Location
get ws listen locations from the config
func (*TerminusStack) Listen ¶
func (s *TerminusStack) Listen()
func (*TerminusStack) LocalConnect ¶
func (s *TerminusStack) LocalConnect(sharedSeed beacon.SharedSeed)
func (*TerminusStack) SendStackEvent ¶
func (s *TerminusStack) SendStackEvent(layerName string, nexus nexus.Nexus, status string)
func (*TerminusStack) SetupIncomingStack ¶
func (s *TerminusStack) SetupIncomingStack(config *config.Config, localLayer *local.OutgoingLocalLayer) *stack.IncomingStack
func (*TerminusStack) SetupLocalLayer ¶
func (s *TerminusStack) SetupLocalLayer() *local.OutgoingLocalLayer
func (*TerminusStack) SetupProviderLayer ¶
func (s *TerminusStack) SetupProviderLayer(belowLayer layer.Layer) *provider.ProviderLayer
func (*TerminusStack) SetupRendezvousLayer ¶
func (s *TerminusStack) SetupRendezvousLayer(belowLayer1 layer.Layer, belowLayer2 layer.Layer) *rendezvous.OutgoingRendezvousLayer
func (*TerminusStack) SetupTerminusLayer ¶
func (s *TerminusStack) SetupTerminusLayer(belowLayer layer.Layer) *TerminusLayer
func (*TerminusStack) SetupWebsocketLayer ¶
func (s *TerminusStack) SetupWebsocketLayer() *websocket.OutgoingWebsocketLayer
Source Files ¶
Click to show internal directories.
Click to hide internal directories.