change to libp2p dep
This commit is contained in:
parent
8e18153364
commit
3d1f86ce0c
6
main.go
6
main.go
|
@ -5,8 +5,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
ci "github.com/ipfs/go-ipfs/p2p/crypto"
|
ci "github.com/ipfs/go-libp2p/p2p/crypto"
|
||||||
peer "github.com/ipfs/go-ipfs/p2p/peer"
|
peer "github.com/ipfs/go-libp2p/p2p/peer"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -24,11 +24,13 @@ func main() {
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fmt.Fprintf(os.Stderr, "Generating a %d bit %s key...", *size, *typ)
|
||||||
priv, pub, err := ci.GenerateKeyPair(atyp, *size)
|
priv, pub, err := ci.GenerateKeyPair(atyp, *size)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintln(os.Stderr, err)
|
fmt.Fprintln(os.Stderr, err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
fmt.Fprintf(os.Stderr, "Success!")
|
||||||
|
|
||||||
pid, err := peer.IDFromPublicKey(pub)
|
pid, err := peer.IDFromPublicKey(pub)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user