Skip to content

Neph-Oo/lua-ipfs-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IPFS http logo

Lua-ipfs

Lua Ipfs http client library, partialy implemented.

You need go-ipfs running in the background to use this module. Currently, it has only been tested with the Go implementation of ipfs.

Install

Via LuaRocks :

luarocks install luaipfs

Or compile it yourself (using make). You will need libcurl (C library), luajson, lpeg, luafilesystem, base64 and lua-protobuf.

Usage

Create a new ipfs object:

local luaipfs = require("luaipfs")

local ipfs = luaipfs:new()

And download a file from ifps:

local file = io.open("quick-start", "w+")
file:write(
   ipfs:cat("/ipfs/QmQPeNsJPyVWPFDVHb77w8G42Fvo15z4bG2X8D2GhfbSXc/quick-start")
)
file:close()

Documentation

See doc/luaipfs.md for a list of available functions. You can find some examples here.

Or use luarocks doc luaipfs

You can find the reference API on the ipfs website: https://docs.ipfs.io/reference/http/api/

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published