• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

ItalyPaleAle/pinatapinner: Publish folders on IPFS using Pinata

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

ItalyPaleAle/pinatapinner

开源软件地址:

https://github.com/ItalyPaleAle/pinatapinner

开源编程语言:

Go 93.5%

开源软件介绍:

Pinata Pinner

Small utility that adds an entire directory recursively to IPFS using the Pinata pinning service.

This utility is community-contributed and has no affiliation with Pinata or IPFS. It's released under MIT license.

Installation

If you have Go 1.12+ installed in your machine, you can just run:

go get -u github.com/ItalyPaleAle/pinatapinner

Alternatively, you can download pre-built binaries from the releases page, which are available for Linux (including ARM), macOS and Windows.

Pin a folder

Pinata Pinner can only pin folders (if you want to pin individual files, the Pinata APIs are easy to invoke with just a curl call).

You will need your Pinata API key and secret, that you can get from your Pinata account page. Set the key and secret as environmental variables:

# On Linux and macOS
export PINATA_API_KEY="..."
export PINATA_SECRET_KEY="..."

# On Windows
set PINATA_API_KEY=...
set PINATA_SECRET_KEY=...

To pin a folder called "my_site":

pinatapinner my_site

You can optionally give a name to your pinned folder, which will be displayed on the Pinata portal only:

pinatapinner my_site "My personal website"

The result will contain the IPFS hash of your folder, for example:

$ pinatapinner my_site "My personal website"
{"IpfsHash":"QmakGEBp4HJZ6tkFydbyvF6bVvFThqfAwnQS6F4D7ie7hL","PinSize":"17678985","Timestamp":"2019-07-12T19:02:10.076Z"}

You can then browse your folder via IPFS at the address /ipfs/QmakGEBp4HJZ6tkFydbyvF6bVvFThqfAwnQS6F4D7ie7hL. You can also browse it via a public gateway, for example: https://gateway.ipfs.io/ipfs/QmakGEBp4HJZ6tkFydbyvF6bVvFThqfAwnQS6F4D7ie7hL




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap