ipfs/ipget

Usage as a library

Closed this issue · 5 comments

osmosis-labs/osmosis#416

https://github.com/osmosis-labs/osmosis/blob/303ba00e14110e5e82c99841154743758411a89f/cmd/osmosisd/cmd/init.go#L70-L165

I want to use ipget to make our users lives easier-- or IPFS.

Some things:

  • We should introduce as few dependencies as possible
  • I don't want to write ipfs configuration to disk
  • I don't want to think about "ipfs node"
  • I do want to grab genesis state-- and possibly later the full state of the chain -- from IPFS, to reduce our launch steps to
osmosisd start

from

osmosisd init
wget -O ~/.osmosisd/genesisstate genisis
osmosisd start

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment.
Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

  • "Priority" labels will show how urgent this is for the team.
  • "Status" labels will show if this is ready to be worked on, blocked, or in progress.
  • "Need" labels will indicate if additional input or analysis is required.

Finally, remember to use https://discuss.ipfs.io if you just need general support.

Hey, so I hope to use this like

package main

// make a single-package import
import github.com/ipfs/ipget/get

genesis := "QmXRvBT3hgoXwwPqbK6a2sXUuArGM8wPyo1ybskyyUwUxs"

get(genesis, path)

Going to make the needed changes in a fork, is this a PR you folks would accept?

Here's what I am thinking:

remove other code from my fork
Include an example app in my fork
Rename the whole thing "get"

wdyt?

okie-dokie:

https://github.com/notional-labs/get

it's nothing much but will do the trick if looking to download CID's from go.