This repository has been archived by the owner on Dec 7, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathdeprecated.go
65 lines (52 loc) · 2.14 KB
/
deprecated.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Deprecated: use github.com/libp2p/go-libp2p-core/peer instead.
package peer
import (
core "github.com/libp2p/go-libp2p-core/peer"
ic "github.com/libp2p/go-libp2p-crypto"
)
var (
// Deprecated: use github.com/libp2p/go-libp2p-core/peer.ErrEmptyPeerID instead.
ErrEmptyPeerID = core.ErrEmptyPeerID
// Deprecated: use github.com/libp2p/go-libp2p-core/peer.ErrNoPublicKey instead.
ErrNoPublicKey = core.ErrNoPublicKey
)
// Deprecated: use github.com/libp2p/go-libp2p-core/peer.AdvanceEnableInlining instead.
// Warning: this variable's type makes it impossible to alias by reference.
// Reads and writes from/to this variable may be inaccurate or not have the intended effect.
var AdvancedEnableInlining = core.AdvancedEnableInlining
// Deprecated: use github.com/libp2p/go-libp2p-core/peer.ID instead.
type ID = core.ID
// Deprecated: use github.com/libp2p/go-libp2p-core/peer.IDSlice instead.
type IDSlice = core.IDSlice
// Deprecated: use github.com/libp2p/go-libp2p-core/peer.IDFromString instead.
func IDFromString(s string) (core.ID, error) {
return core.IDFromString(s)
}
// Deprecated: use github.com/libp2p/go-libp2p-core/peer.IDFromBytes instead.
func IDFromBytes(b []byte) (core.ID, error) {
return core.IDFromBytes(b)
}
// Deprecated: use github.com/libp2p/go-libp2p-core/peer.IDB58Decode instead.
func IDB58Decode(s string) (core.ID, error) {
return core.IDB58Decode(s)
}
// Deprecated: use github.com/libp2p/go-libp2p-core/peer.IDB58Encode instead.
func IDB58Encode(id ID) string {
return core.IDB58Encode(id)
}
// Deprecated: use github.com/libp2p/go-libp2p-core/peer.IDHexDecode instead.
func IDHexDecode(s string) (core.ID, error) {
return core.IDHexDecode(s)
}
// Deprecated: use github.com/libp2p/go-libp2p-core/peer.IDHexEncode instead.
func IDHexEncode(id ID) string {
return core.IDHexEncode(id)
}
// Deprecated: use github.com/libp2p/go-libp2p-core/peer.IDFromPublicKey instead.
func IDFromPublicKey(pk ic.PubKey) (core.ID, error) {
return core.IDFromPublicKey(pk)
}
// Deprecated: use github.com/libp2p/go-libp2p-core/peer.IDFromPrivateKey instead.
func IDFromPrivateKey(sk ic.PrivKey) (core.ID, error) {
return core.IDFromPrivateKey(sk)
}