Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

blumen

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blumen

🌸 Self-custodial decentralized deployments

  • 0.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
29
increased by70.59%
Maintainers
1
Weekly downloads
 
Created
Source

blumen

Blumen is a powerful CLI and API library to deploy web apps on IPFS in a self-custodial manner.

Features

  • Multi-Provider Deployment: Deploy your web app simultaneously on multiple IPFS providers, including web3.storage and Gateway3, ensuring redundancy and availability.
  • ENS Integration: Seamlessly integrate with ENS to update your Content-Hash, making it easier for users to access your web app via ENS.
  • Gnosis Integration: Update your ENS Content-Hash using a multisig contract on the Gnosis platform, adding an extra layer of security and decentralization.
  • Node.js 16.8+ Support: Compatible up until Node.js v16.8

Getting Started

Installation

Node.js 16.8+ is required.

pnpm install -g blumen

Environment setup

Grab API keys from the services you use and define them in your environment (e.g. .env).

All env variables used by Blumen must be prefixed with BLUMEN_

BLUMEN_W3S_TOKEN=eyJhb....
BLUMEN_GW3_TOKEN=ZA70...
BLUMEN_GW3_ACCESS_KEY=9e01ce24...

Deployment

Running deploy will try to use the dist folder, otherwise the current directory.

$ blumen deploy

# 📦 Packing blumen (37.03KB)
# 🌱 Root CID: bafy...
# 📡 Deploying with providers: web3.storage, Estuary
# ✓ [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Finished in 2s
# 🌍 Deployed across all providers
# Success!
# Open in a browser:
# 🪐  IPFS:      https://<CID>.ipfs.dweb.link
# 🛰️  IPFS Scan: https://ipfs-scan.io/?cid=<CID>

Documentation

CLI

blumen deploy

Deploys a directory on IPFS to specified providers and outputs a web-friendly gateway link, along with other useful information.

Upload a custom path:

$ blumen status /path/to/directory
blumen status <pin>

Retrieves pin status from providers.

$ blumen status bafybeibp54tslsez36quqptgzwyda3vo66za3rraujksmsb3d5q247uht4

web3.storage: pinned
Gateway3: pinned

By default, providers are fetched from environment like with the deploy command. You can manually specify providers via --providers flag, comma separated:

$ blumen status --providers=web3.storage,Gateway3 bafybeibp54tslsez36quqptgzwyda3vo66za3rraujksmsb3d5q247uht4

API

Blumen exposes some of the functionality as well.

import { walk, packCAR, uploadOnW3S } from 'blumen'
import { assert } from 'node:assert/strict'

const [files, total] = await walk('./dist')

const { blob, cid: actualCid } = await packCAR(files)

const { cid } = await uploadOnW3S({ token: process.env.W3S_TOKEN, car: blob })

assert.equal(cid, actualCid)

const { pin } = await statusOnW3S(cid)

console.log(`Pin status: ${pin}, CID: ${cid}`)

This example demonstrates how to use the "Blumen" API to walk through a directory, prepare your files for upload, upload it to web3.storage, and check the IPFS pinning status.

Keywords

FAQs

Package last updated on 01 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc