mirror of
https://source.quilibrium.com/quilibrium/ceremonyclient.git
synced 2024-12-27 00:55:17 +00:00
12 lines
259 B
Go
12 lines
259 B
Go
|
package host
|
||
|
|
||
|
import "github.com/libp2p/go-libp2p/core/peer"
|
||
|
|
||
|
// InfoFromHost returns a peer.AddrInfo struct with the Host's ID and all of its Addrs.
|
||
|
func InfoFromHost(h Host) *peer.AddrInfo {
|
||
|
return &peer.AddrInfo{
|
||
|
ID: h.ID(),
|
||
|
Addrs: h.Addrs(),
|
||
|
}
|
||
|
}
|