⚙️
Web3Stash
  • Welcome!
  • Quick Start
  • Services
    • IPFS HTTP CLIENT
    • Helia
    • INFURA
    • Pinata
    • LightHouse(IPFS)
    • Arweave
    • Bundlr(Arweave)
    • NFT.STORAGE
    • WEB3.STORAGE
    • MORALIS IPFS
  • Contributing
    • Guidelines
Powered by GitBook
On this page
  • Initialization
  • Configuration
  • Methods Available
  • Output
  1. Services

LightHouse(IPFS)

Dive into the specifics of connecting and using LIGHTHOUSE with web3stash

Initialization

To use LIGHTHOUSE "LIGHTHOUSE" as the service name. No other name will work!

const lighthouseService = Web3Stash("LIGHTHOUSE",{lighthouseApiKey:""},{LIGHTHOUSE APIconfig options})

Configuration

To use LIGHTHOUSE in web3stash, you need one thing:

  • lighthouseApiKey- API Key to connect to lighthouse.storage

Note: Use these names only while passing keys in object i.e, {lighthouseApiKey:"",}

Optional Config Options

There are no configOptions for this service

Methods Available

The following methods are available for this service, More will be added soon

  • Uploading JSON data

lighthouseService.uploadJson({name:"example", url:"abc.com"}, {lighthouseOptions}).then().catch()
  • Uploading Image

lighthouseService.uploadImage("./image.png", {lighthouseOptions}).then().catch()
  • Uploading Video

lighthouseService.uploadVideo("./video.mp4", {lighthouseOptions}).then().catch()
  • Uploading File

lighthouseService.uploadFile("./data.txt", {lighthouseOptions}).then().catch()

Output

All the functions return id (cid) and metadata (data returned by the service on upload)

{id:"dewfnlpweurmwknrwiojhgcbxczz", metadata:{}}
PreviousPinataNextArweave

Last updated 1 year ago