bushi blog Let's all love Lain

Notes on IPFS

# add file to ipfs
echo "Hello, world!" > hello.txt
ipfs add hello.txt

# publishes using node public key
ipfs name publish <CID>

# edit file
echo "Hello IPFS!" > hello.txt

# add again, then publish
ipfs add hello.txt

ipfs name publish <New CID>

# View file at 
# https://gateway.ipfs.io/ipns/k51qzi5uqu5dkkciu33khkzbcmxtyhn376i1e83tya8kuy7z9euedzyr5nhoew

initial setup process #

  1. generate new key
    • /api/v0/key/gen
  2. Import any other keys
    • /api/v0/key/import
  3. Add other nodes
    • /api/v0/swarm/peering/add
  4. add remote pinning services (optional)
    • /api/v0/pin/remote/service/add
  5. publish ipns address for item
    • /api/v0/name/publish

normal operation #

  • Pin item
    • /api/v0/pin/add
  • Verify pins
    • /api/v0/pin/verify
  • export pins
    • /api/v0/pin/ls
  • grab list of peers
    • /api/v0/swarm/peering/ls
Kei
Home |About |Crypto |Webring |Links |Sitemap|RSS|Email|Mastodon