Skip to content

4mig4/lua-ipfs-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IPFS http logo

[WIP] Lua-ipfs

Ipfs API Lua module. Partialy implemented.

You need a running ipfs daemon. Currently, tested with the Go implementation of ipfs.

Install

luarocks install luaipfs [wip]

Or compile it yourself. Libcurl (C library), luajson and luafilesystem modules are needed.

Usage

Create a new ipfs object:

local luaipfs = require("luaipfs")

local ipfs = luaipfs:new()

And use it to download a file from ifps:

local file = io.open("dot.gif", "w+")
file:write(
   ipfs:cat("/ipfs/QmbwqqE78Xba5z8j3CiaAMfPxjSNSda9Z9Rc5VhjyhLkt1")
)
file:close()

Of course, you can do a lot more. Read the documentation.

Documentation

See doc/lipfs.md for a list of available functions.

Or luarocks doc luaipfs.

Some useful informations can be found on the ipfs website. The API reference is here: https://ipfs.io/docs/api/.

De la doc en français est également disponible à cette addresse: https://wifi.gauf.re/p2p/lua-ipfs-api (wip)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 51.0%
  • Lua 48.3%
  • Makefile 0.7%