Documentation ¶
Index ¶
- Variables
- func CloseChannel(channelID sln.ChannelID, address string) (txid string, er error)
- func GetRandomlySortedActiveNodes() (nds []peer.ID, er error)
- func OpenChannel(channelID sln.ChannelID) (txid string, er error)
- func ProcessSoln(channelID sln.ChannelID, soln sln.Soln, tos TickOrStop) (er error)
- func RectifyRegNUnregNodes(reg NodeID2BlockNum, unreg NodeID2BlockNum) (nds []peer.ID, er error)
- func RedeemSoln(channelID sln.ChannelID, soln sln.Soln, tos TickOrStop) (txid string, er error)
- func RegisterNodeID(nodeID string) (txid, address string, er error)
- func UnregNodeIfRegistered(nodeID, address string) (txid string, er error)
- func UpdateNodeID(nodeID, address string) (txid string, er error)
- type Account
- type AccountHub
- func (ah *AccountHub) CloseChannel(channelID sln.ChannelID, address string) (txid string, er error)
- func (ah *AccountHub) DumpRegNodes() (ns NodeID2BlockNum, er error)
- func (ah *AccountHub) DumpUnregNodes() (ns NodeID2BlockNum, er error)
- func (ah *AccountHub) GetParamUint64(param string) uint64
- func (ah *AccountHub) New(baseDir, basePassword string, numberOfKeys int) (acct Account, er error)
- func (ah *AccountHub) NewDefault(basePassword string) (acct Account, er error)
- func (ah *AccountHub) NewDev(basePassword string) (acct Account, er error)
- func (ah *AccountHub) NowHex() string
- func (ah *AccountHub) NowUint64() uint64
- func (ah *AccountHub) Ok() (tf bool)
- func (ah *AccountHub) OpenChannel(channelID sln.ChannelID) (txid string, er error)
- func (ah *AccountHub) RedeemSoln(channelID sln.ChannelID, soln sln.Soln, tos TickOrStop) (txid string, er error)
- func (ah *AccountHub) RegisterNodeID(nodeID string) (txid, address string, er error)
- func (ah *AccountHub) Resume(filepath, basePassword string) (acct Account, er error)
- func (ah *AccountHub) ResumeDefault(basePassword string) (acct Account, er error)
- func (ah *AccountHub) UnregNodeIfRegistered(nodeID, address string) (txid string, er error)
- func (ah *AccountHub) UpdateNodeID(nodeID, address string) (txid string, er error)
- type BCLayer
- type EthAccount
- func (e *EthAccount) CloseChannel(channelID sln.ChannelID, address string) (txid string, er error)
- func (e *EthAccount) DumpRegNodes() (ns NodeID2BlockNum, er error)
- func (e *EthAccount) DumpUnregNodes() (ns NodeID2BlockNum, er error)
- func (e *EthAccount) Flag() Flag
- func (e *EthAccount) GetKeyByAddress(address string, noc NodeOrChannel) (key *keystore.Key, er error)
- func (e *EthAccount) GetParamUint64(param string) uint64
- func (e *EthAccount) Init()
- func (e *EthAccount) IsNodeRegistered(nodeID string) (tf bool)
- func (e *EthAccount) New(baseDir, basePassword string, numberOfKeys int) (acct Account, er error)
- func (e *EthAccount) NewDefault(basePassword string) (acct Account, er error)
- func (e *EthAccount) NewDev(basePassword string) (acct Account, er error)
- func (e *EthAccount) NowHex() string
- func (e *EthAccount) NowUint64() uint64
- func (e *EthAccount) OpenChannel(channelID sln.ChannelID) (txid string, er error)
- func (e *EthAccount) RedeemSoln(channelID, soln []byte, tos TickOrStop) (txid string, er error)
- func (e *EthAccount) RegisterNodeID(nodeID string) (txid, address string, er error)
- func (e *EthAccount) Resume(baseDir, basePassword string) (acct Account, er error)
- func (e *EthAccount) ResumeDefault(basePassword string) (acct Account, er error)
- func (e *EthAccount) UnregNodeIfRegistered(nodeID, address string) (txid string, er error)
- func (e *EthAccount) UnregisterNodeID(nodeID string, key *keystore.Key) (txid string, er error)
- func (e *EthAccount) UpdateNodeID(nodeID, address string) (txid string, er error)
- type Keystores
- type NodeID2BlockNum
Constants ¶
This section is empty.
Variables ¶
var G_AccountHub = NewAccountHub()
Functions ¶
func CloseChannel ¶
func ProcessSoln ¶
func RectifyRegNUnregNodes ¶
func RectifyRegNUnregNodes(reg NodeID2BlockNum, unreg NodeID2BlockNum) (nds []peer.ID, er error)
func RedeemSoln ¶
func RegisterNodeID ¶
func UnregNodeIfRegistered ¶
func UpdateNodeID ¶
Types ¶
type Account ¶
type Account interface { Init() New(baseDir, basePassword string, numberOfKeys int) (acct Account, er error) NewDefault(basePassword string) (acc Account, er error) ResumeDefault(basePassword string) (acc Account, er error) Resume(filepath, basePassword string) (acc Account, er error) NowUint64() uint64 NowHex() string GetParamUint64(param string) uint64 Flag() Flag RedeemSoln(channelID, soln []byte, tos TickOrStop) (txid string, er error) OpenChannel(channelID sln.ChannelID) (txid string, er error) CloseChannel(channelID sln.ChannelID, address string) (txid string, er error) DumpRegNodes() (ns NodeID2BlockNum, er error) DumpUnregNodes() (ns NodeID2BlockNum, er error) RegisterNodeID(nodeID string) (txid, address string, er error) UpdateNodeID(nodeID, address string) (txid string, er error) UnregNodeIfRegistered(nodeID, address string) (txid string, er error) }
type AccountHub ¶
func NewAccountHub ¶
func NewAccountHub() (ah *AccountHub)
func (*AccountHub) CloseChannel ¶
func (*AccountHub) DumpRegNodes ¶
func (ah *AccountHub) DumpRegNodes() (ns NodeID2BlockNum, er error)
func (*AccountHub) DumpUnregNodes ¶
func (ah *AccountHub) DumpUnregNodes() (ns NodeID2BlockNum, er error)
func (*AccountHub) GetParamUint64 ¶
func (ah *AccountHub) GetParamUint64(param string) uint64
func (*AccountHub) New ¶
func (ah *AccountHub) New(baseDir, basePassword string, numberOfKeys int) (acct Account, er error)
currently defaults to Eth layer. But in future, will deduce which layer to resume by filepath contents. // TODO integrate other layers
func (*AccountHub) NewDefault ¶
func (ah *AccountHub) NewDefault(basePassword string) (acct Account, er error)
currently defaults to Eth layer. But in future, will deduce which layer to resume by filepath contents. // TODO integrate other layers
func (*AccountHub) NewDev ¶
func (ah *AccountHub) NewDev(basePassword string) (acct Account, er error)
currently defaults to Eth layer. But in future, will deduce which layer to resume by filepath contents. // TODO integrate other layers
func (*AccountHub) NowHex ¶
func (ah *AccountHub) NowHex() string
func (*AccountHub) NowUint64 ¶
func (ah *AccountHub) NowUint64() uint64
func (*AccountHub) Ok ¶
func (ah *AccountHub) Ok() (tf bool)
func (*AccountHub) OpenChannel ¶
func (ah *AccountHub) OpenChannel(channelID sln.ChannelID) (txid string, er error)
currently defaults to Eth layer. But in near future will scan other layers as they are integrated. // TODO integrate other layers
func (*AccountHub) RedeemSoln ¶
func (ah *AccountHub) RedeemSoln(channelID sln.ChannelID, soln sln.Soln, tos TickOrStop) (txid string, er error)
currently defaults to Eth layer. But in near future will scan other layers as they are integrated. // TODO integrate other layers
func (*AccountHub) RegisterNodeID ¶
func (ah *AccountHub) RegisterNodeID(nodeID string) (txid, address string, er error)
currently defaults to Eth layer. But in near future will scan other layers as they are integrated. // TODO integrate other layers
func (*AccountHub) Resume ¶
func (ah *AccountHub) Resume(filepath, basePassword string) (acct Account, er error)
currently defaults to Eth layer. But in future, will deduce which layer to resume by filepath contents. // TODO integrate other layers
func (*AccountHub) ResumeDefault ¶
func (ah *AccountHub) ResumeDefault(basePassword string) (acct Account, er error)
currently defaults to Eth layer. But in future, will deduce which layer to resume by filepath contents. // TODO integrate other layers
func (*AccountHub) UnregNodeIfRegistered ¶
func (ah *AccountHub) UnregNodeIfRegistered(nodeID, address string) (txid string, er error)
currently defaults to Eth layer. But in near future will scan other layers as they are integrated. // TODO integrate other layers
func (*AccountHub) UpdateNodeID ¶
func (ah *AccountHub) UpdateNodeID(nodeID, address string) (txid string, er error)
currently defaults to Eth layer. But in near future will scan other layers as they are integrated. // TODO integrate other layers
type EthAccount ¶
func (*EthAccount) CloseChannel ¶
func (*EthAccount) DumpRegNodes ¶
func (e *EthAccount) DumpRegNodes() (ns NodeID2BlockNum, er error)
func (*EthAccount) DumpUnregNodes ¶
func (e *EthAccount) DumpUnregNodes() (ns NodeID2BlockNum, er error)
func (*EthAccount) Flag ¶
func (e *EthAccount) Flag() Flag
func (*EthAccount) GetKeyByAddress ¶
func (e *EthAccount) GetKeyByAddress(address string, noc NodeOrChannel) (key *keystore.Key, er error)
func (*EthAccount) GetParamUint64 ¶
func (e *EthAccount) GetParamUint64(param string) uint64
func (*EthAccount) Init ¶
func (e *EthAccount) Init()
func (*EthAccount) IsNodeRegistered ¶
func (e *EthAccount) IsNodeRegistered(nodeID string) (tf bool)
func (*EthAccount) New ¶
func (e *EthAccount) New(baseDir, basePassword string, numberOfKeys int) (acct Account, er error)
func (*EthAccount) NewDefault ¶
func (e *EthAccount) NewDefault(basePassword string) (acct Account, er error)
func (*EthAccount) NewDev ¶
func (e *EthAccount) NewDev(basePassword string) (acct Account, er error)
func (*EthAccount) NowHex ¶
func (e *EthAccount) NowHex() string
func (*EthAccount) NowUint64 ¶
func (e *EthAccount) NowUint64() uint64
func (*EthAccount) OpenChannel ¶
func (e *EthAccount) OpenChannel(channelID sln.ChannelID) (txid string, er error)
func (*EthAccount) RedeemSoln ¶
func (e *EthAccount) RedeemSoln(channelID, soln []byte, tos TickOrStop) (txid string, er error)
func (*EthAccount) RegisterNodeID ¶
func (e *EthAccount) RegisterNodeID(nodeID string) (txid, address string, er error)
func (*EthAccount) Resume ¶
func (e *EthAccount) Resume(baseDir, basePassword string) (acct Account, er error)
func (*EthAccount) ResumeDefault ¶
func (e *EthAccount) ResumeDefault(basePassword string) (acct Account, er error)
func (*EthAccount) UnregNodeIfRegistered ¶
func (e *EthAccount) UnregNodeIfRegistered(nodeID, address string) (txid string, er error)
func (*EthAccount) UnregisterNodeID ¶
func (*EthAccount) UpdateNodeID ¶
func (e *EthAccount) UpdateNodeID(nodeID, address string) (txid string, er error)