2018-07-04 10:51:47 +00:00
|
|
|
package peerstore
|
|
|
|
|
|
|
|
import (
|
2019-06-09 07:24:20 +00:00
|
|
|
core "github.com/libp2p/go-libp2p-core/peer"
|
2018-07-04 10:51:47 +00:00
|
|
|
ma "github.com/multiformats/go-multiaddr"
|
|
|
|
)
|
|
|
|
|
2019-06-09 07:24:20 +00:00
|
|
|
// Deprecated: use github.com/libp2p/go-libp2p-core/peer.Info instead.
|
|
|
|
type PeerInfo = core.AddrInfo
|
2018-07-04 10:51:47 +00:00
|
|
|
|
2019-06-09 07:24:20 +00:00
|
|
|
// Deprecated: use github.com/libp2p/go-libp2p-core/peer.ErrInvalidAddr instead.
|
|
|
|
var ErrInvalidAddr = core.ErrInvalidAddr
|
2018-07-04 10:51:47 +00:00
|
|
|
|
2019-06-09 07:24:20 +00:00
|
|
|
// Deprecated: use github.com/libp2p/go-libp2p-core/peer.AddrInfoFromP2pAddr instead.
|
|
|
|
func InfoFromP2pAddr(m ma.Multiaddr) (*core.AddrInfo, error) {
|
|
|
|
return core.AddrInfoFromP2pAddr(m)
|
2018-07-04 10:51:47 +00:00
|
|
|
}
|
|
|
|
|
2019-06-09 07:24:20 +00:00
|
|
|
// Deprecated: use github.com/libp2p/go-libp2p-core/peer.AddrInfoToP2pAddrs instead.
|
|
|
|
func InfoToP2pAddrs(pi *core.AddrInfo) ([]ma.Multiaddr, error) {
|
|
|
|
return core.AddrInfoToP2pAddrs(pi)
|
2018-07-04 10:51:47 +00:00
|
|
|
}
|