Content pfp
Content
@
https://warpcast.com/~/channel/ipfs
0 reply
0 recast
0 reaction

vrypan |--o--| pfp
vrypan |--o--|
@vrypan.eth
I want to write a Go program that interacts with a remote IPFS client (kubo). Why is it so hard to find decent documentation that works? I'm not asking for complex stuff, something that shows how to upload a file, pin it, download it, using the kubo RPC interface. (BTW, the interface documentation is so bad, it's as if the devs don;t want it to be used by outsiders.) WTF, this is supposed to be a mature, infra project that other devs could build on.
1 reply
0 recast
7 reactions

vrypan |--o--| pfp
vrypan |--o--|
@vrypan.eth
@polluterofminds @stevedylandev.eth maybe you have something to point me to? It shouldn't;t be so hard, it's just a JSON-RPC interface, right?
1 reply
0 recast
2 reactions

Steve pfp
Steve
@stevedylandev.eth
I do! It is in typescript but maybe it will help https://github.com/PinataCloud/chi
2 replies
0 recast
1 reaction

vrypan |--o--| pfp
vrypan |--o--|
@vrypan.eth
Since ipfs has been developed in Go since forever, I would expect that there are simple, ready-to use examples. But nothing I have found works :-( I read that I can get the OpenRPC schema if I call /rpc/v0, I get 404. Where can I at least find the schema to build my own bindings?
1 reply
0 recast
2 reactions

Justin Hunter pfp
Justin Hunter
@polluterofminds
Kubo is a mess honestly
1 reply
0 recast
0 reaction

vrypan |--o--| pfp
vrypan |--o--|
@vrypan.eth
😢
1 reply
0 recast
1 reaction

Steve pfp
Steve
@stevedylandev.eth
Did you check this out? https://github.com/ipfs/kubo/tree/master/docs/examples/kubo-as-a-library
1 reply
0 recast
0 reaction

vrypan |--o--| pfp
vrypan |--o--|
@vrypan.eth
That's embedding kubo in your program, I think. I was hoping to avoid it, because kubo is so complicated, even its dependancies are hard to pin without conflicts. I'll probably use ipfs-lite, but it's infuriating that I can't find what should be 20 lines of code using an RPC api to work with, and it's easier (to be confirmed...) to implement a full, embedded, ipfs node.
1 reply
0 recast
2 reactions

Justin Hunter pfp
Justin Hunter
@polluterofminds
FWIW, I have always achieved what you're talking about with my own server in between. I think that's actually the expectation if the node is remote. Uploads go to server, server communicates with local Kubo node over APIs: https://docs.ipfs.tech/reference/kubo/rpc/
1 reply
0 recast
1 reaction

vrypan |--o--| pfp
vrypan |--o--|
@vrypan.eth
I run my now server at 192.168.1.5. My IP is 192.168.1.100. Do you know how I can use the API, to actually connect to my node? I would expect something like NewAPI(<ip:port>). There is no such thing. There are like 3 calls that look similar, but the args are complicated and it's not clear which one is the right one.
1 reply
0 recast
1 reaction

Justin Hunter pfp
Justin Hunter
@polluterofminds
Hmm, maybe I'm confused, but if they are on the same machine, the IPFS node API is on port 5001 by default. So you'd send your file to your server running on that machine, write the file to a temp disk folder, then add the file like this: curl -sLk -XPOST -F "[email protected];filename=path1/file1.txt" -F \[email protected];filename=path2/file2.txt" "http://127.0.0.1:5001/api/v0/add?recursive=true&wrap-with-directory=true"
1 reply
0 recast
1 reaction