Documentation
¶
Index ¶
- type Account
- func (acc *Account) Address() wire.Address
- func (acc *Account) Close() error
- func (acc *Account) DeregisterOnChainAddress(onChainAddr wallet.Address) error
- func (acc *Account) MarshalPrivateKey() ([]byte, error)
- func (acc *Account) QueryOnChainAddress(onChainAddr wallet.Address) (*Address, error)
- func (acc *Account) RegisterOnChainAddress(onChainAddr wallet.Address) error
- func (acc *Account) Sign(data []byte) ([]byte, error)
- type Address
- type Dialer
- type Listener
- type Net
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
Account represents a libp2p wire account.
func NewAccountFromPrivateKeyBytes ¶
NewAccountFromPrivateKeyBytes creates a new account from a given private key.
func NewRandomAccount ¶
NewRandomAccount generates a new random account.
func (*Account) DeregisterOnChainAddress ¶
DeregisterOnChainAddress deregisters an on-chain address with the account from the relay-server's address book.
func (*Account) MarshalPrivateKey ¶
MarshalPrivateKey marshals the account's private key to binary.
func (*Account) QueryOnChainAddress ¶
QueryOnChainAddress queries the relay-server for the peerID of a peer given its on-chain address.
func (*Account) RegisterOnChainAddress ¶
RegisterOnChainAddress registers an on-chain address with the account to the relay-server's address book.
type Address ¶
Address is a peer address for wire discovery.
func NewRandomAddress ¶
NewRandomAddress returns a new random peer address.
func (*Address) Cmp ¶
Cmp compares the byte representation of two addresses. For `a.Cmp(b)` returns -1 if a < b, 0 if a == b, 1 if a > b.
type Dialer ¶
type Dialer struct {
// contains filtered or unexported fields
}
Dialer is a dialer for p2p connections.
func NewP2PDialer ¶
NewP2PDialer creates a new dialer for the given account.
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
Listener is a listener for p2p connections.
func NewP2PListener ¶
NewP2PListener creates a new listener for the given account.