2016-06-01 02:31:50 +08:00
|
|
|
package peerstore
|
|
|
|
|
|
|
|
import (
|
2019-05-24 01:11:06 +08:00
|
|
|
core "github.com/libp2p/go-libp2p-core/peer"
|
2018-09-02 19:10:55 +08:00
|
|
|
ma "github.com/multiformats/go-multiaddr"
|
2016-06-01 02:31:50 +08:00
|
|
|
)
|
|
|
|
|
2020-02-26 01:02:52 +08:00
|
|
|
// Deprecated: use github.com/libp2p/go-libp2p-core/peer.AddrInfo instead.
|
2019-05-24 01:11:06 +08:00
|
|
|
type PeerInfo = core.AddrInfo
|
2017-04-01 14:08:23 +08:00
|
|
|
|
2019-05-24 01:11:06 +08:00
|
|
|
// Deprecated: use github.com/libp2p/go-libp2p-core/peer.ErrInvalidAddr instead.
|
|
|
|
var ErrInvalidAddr = core.ErrInvalidAddr
|
2016-06-01 02:31:50 +08:00
|
|
|
|
2019-05-24 01:11:06 +08:00
|
|
|
// Deprecated: use github.com/libp2p/go-libp2p-core/peer.AddrInfoFromP2pAddr instead.
|
|
|
|
func InfoFromP2pAddr(m ma.Multiaddr) (*core.AddrInfo, error) {
|
|
|
|
return core.AddrInfoFromP2pAddr(m)
|
2016-06-01 02:31:50 +08:00
|
|
|
}
|
|
|
|
|
2019-05-24 01:11:06 +08:00
|
|
|
// Deprecated: use github.com/libp2p/go-libp2p-core/peer.AddrInfoToP2pAddrs instead.
|
|
|
|
func InfoToP2pAddrs(pi *core.AddrInfo) ([]ma.Multiaddr, error) {
|
|
|
|
return core.AddrInfoToP2pAddrs(pi)
|
2016-06-01 02:31:50 +08:00
|
|
|
}
|