在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:ipfs-shipyard/ipfs-blob-store开源软件地址:https://github.com/ipfs-shipyard/ipfs-blob-store开源编程语言:JavaScript 96.7%开源软件介绍:ipfs-blob-store
Implements the abstract-blob-store, using IPFS for storage. Installnpm install ipfs-blob-store Usage
It requires an IPFS node to run - you can either specify a host/port combination to connect to a remote daemon, pass an instance of Self-managed IPFS nodeconst ipfsBlobStore = require('ipfs-blob-store')
const store = await ipfsBlobStore()
store.exists('/my-file.txt', (error, exists) => {
// ...
}) Pre-configured IPFS nodeconst ipfsBlobStore = require('ipfs-blob-store')
const IPFS = require('ipfs')
const node = new IPFS({
// some config here
})
node.once('ready', () => {
const store = await ipfsBlobStore({
ipfs: node
})
store.exists('/my-file.txt', (error, exists) => {
// ...
})
}) Remote IPFS daemonconst ipfsBlobStore = require('ipfs-blob-store')
const store = await ipfsBlobStore({
host: '127.0.0.1',
port: 5001
})
store.exists('/my-file.txt', (error, exists) => {
// ...
}) Optionsvar options = {
ipfs: null, // an instance of ipfs or ipfs-api
port: 5001, // default value
host: '127.0.0.1', // default value
baseDir: '/', // default value
flush: true // default value
}
const store = await ipfsBlobStore(options) APISee abstract-blob-store for the blob store API. ContributeFeel free to join in. All welcome. Open an issue! This repository falls under the IPFS Code of Conduct. Want to hack on IPFS?LicenseMIT |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论