SgtPooki / ipfs-desktop-wails

A playful attempt to rewrite https://github.com/ipfs/ipfs-desktop using wails instead of electron
Other
5 stars 0 forks source link

feat: execute `kubo daemon` programmatically #12

Open SgtPooki opened 9 months ago

SgtPooki commented 9 months ago

This app starts up okay, but I need to figure out a way to run an ipfs node from app.go or main.go

SgtPooki commented 9 months ago

tried following https://github.com/ipfs/kubo/tree/master/docs/examples/kubo-as-a-library but i'm running into errors:

╰─ ✘ 1 ❯ go run ipfs.go
# github.com/ipfs/kubo/thirdparty/verifbs
../../../../../.asdf/installs/golang/1.21.1/packages/pkg/mod/github.com/ipfs/kubo@v0.22.0-rc1/thirdparty/verifbs/verifbs.go:17:33: not enough arguments in call to verifcid.ValidateCid
    have (cid.Cid)
    want (verifcid.Allowlist, cid.Cid)
../../../../../.asdf/installs/golang/1.21.1/packages/pkg/mod/github.com/ipfs/kubo@v0.22.0-rc1/thirdparty/verifbs/verifbs.go:25:34: not enough arguments in call to verifcid.ValidateCid
    have (cid.Cid)
    want (verifcid.Allowlist, cid.Cid)
../../../../../.asdf/installs/golang/1.21.1/packages/pkg/mod/github.com/ipfs/kubo@v0.22.0-rc1/thirdparty/verifbs/verifbs.go:33:33: not enough arguments in call to verifcid.ValidateCid
    have (cid.Cid)
    want (verifcid.Allowlist, cid.Cid)
../../../../../.asdf/installs/golang/1.21.1/packages/pkg/mod/github.com/ipfs/kubo@v0.22.0-rc1/thirdparty/verifbs/verifbs.go:44:33: not enough arguments in call to verifcid.ValidateCid
    have (cid.Cid)
    want (verifcid.Allowlist, cid.Cid)
../../../../../.asdf/installs/golang/1.21.1/packages/pkg/mod/github.com/ipfs/kubo@v0.22.0-rc1/thirdparty/verifbs/verifbs.go:52:34: not enough arguments in call to verifcid.ValidateCid
    have (cid.Cid)
    want (verifcid.Allowlist, cid.Cid)
../../../../../.asdf/installs/golang/1.21.1/packages/pkg/mod/github.com/ipfs/kubo@v0.22.0-rc1/thirdparty/verifbs/verifbs.go:60:33: not enough arguments in call to verifcid.ValidateCid
    have (cid.Cid)
    want (verifcid.Allowlist, cid.Cid)
# github.com/libp2p/go-libp2p/p2p/protocol/identify
../../../../../.asdf/installs/golang/1.21.1/packages/pkg/mod/github.com/libp2p/go-libp2p@v0.29.0/p2p/protocol/identify/id.go:559:25: type func(a multiaddr.Multiaddr, b multiaddr.Multiaddr) bool of func(a, b ma.Multiaddr) bool {…} does not match inferred type func(a multiaddr.Multiaddr, b multiaddr.Multiaddr) int for func(a E, b E) int
../../../../../.asdf/installs/golang/1.21.1/packages/pkg/mod/github.com/libp2p/go-libp2p@v0.29.0/p2p/protocol/identify/obsaddr.go:217:22: type func(first *observedAddr, second *observedAddr) bool of func(first, second *observedAddr) bool {…} does not match inferred type func(a *observedAddr, b *observedAddr) int for func(a E, b E) int
# github.com/libp2p/go-libp2p/p2p/transport/quicreuse
../../../../../.asdf/installs/golang/1.21.1/packages/pkg/mod/github.com/libp2p/go-libp2p@v0.29.0/p2p/transport/quicreuse/config.go:20:45: undefined: quic.VersionDraft29
../../../../../.asdf/installs/golang/1.21.1/packages/pkg/mod/github.com/libp2p/go-libp2p@v0.29.0/p2p/transport/quicreuse/connmgr.go:186:22: undefined: quic.VersionDraft29
../../../../../.asdf/installs/golang/1.21.1/packages/pkg/mod/github.com/libp2p/go-libp2p@v0.29.0/p2p/transport/quicreuse/connmgr.go:187:49: undefined: quic.VersionDraft29
../../../../../.asdf/installs/golang/1.21.1/packages/pkg/mod/github.com/libp2p/go-libp2p@v0.29.0/p2p/transport/quicreuse/connmgr.go:255:14: undefined: quic.OptimizeConn
../../../../../.asdf/installs/golang/1.21.1/packages/pkg/mod/github.com/libp2p/go-libp2p@v0.29.0/p2p/transport/quicreuse/listener.go:49:50: undefined: quic.VersionDraft29
../../../../../.asdf/installs/golang/1.21.1/packages/pkg/mod/github.com/libp2p/go-libp2p@v0.29.0/p2p/transport/quicreuse/listener.go:92:53: conn.ConnectionState().TLS.ConnectionState undefined (type tls.ConnectionState has no field or method ConnectionState)
../../../../../.asdf/installs/golang/1.21.1/packages/pkg/mod/github.com/libp2p/go-libp2p@v0.29.0/p2p/transport/quicreuse/quic_multiaddr.go:23:12: undefined: quic.VersionDraft29
../../../../../.asdf/installs/golang/1.21.1/packages/pkg/mod/github.com/libp2p/go-libp2p@v0.29.0/p2p/transport/quicreuse/quic_multiaddr.go:38:19: undefined: quic.VersionDraft29

code at https://github.com/SgtPooki/ipfs-desktop-wails/commit/d7ac5165a3493f00cdff02c56b7cc73972ace40f