Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.
/ go-ipfs-addr Public archive

[ARCHIVED] DEPRECATED - Parsing utility for ipfs multiaddrs

License

Notifications You must be signed in to change notification settings

ipfs-inactive/go-ipfs-addr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-ipfs-addr

DEPRECATED

This package was introduced at a time when multiaddr didn't support "ipfs" (or libp2p) addresses. Please use SplitAddr and AddrInfoFromP2pAddrs from github.com/libp2p/go-libp2p-peer.

Coverage Status Travis CI

A parsing utility for ipfs multiaddrs.

Table of Contents

Install

make install

Examples

import "github.com/ipfs/go-ipfs-addr"

addrstr := "/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ"
a, _ := ipfsaddr.ParseString(addr)

fmt.Println("peer id: ", a.ID())
fmt.Println("transport multiaddr: ", a.Transport())

Contribute

PRs are welcome!

Small note: If editing the Readme, please conform to the standard-readme specification.

License

MIT © Whyrusleeping

About

[ARCHIVED] DEPRECATED - Parsing utility for ipfs multiaddrs

Resources

License

Stars

Watchers

Forks

Packages

No packages published