Helia

Dive into the specifics of connecting and using Helia with web3stash

Initialization

To use Helia Client which actually allows you to connect to local or your own hosted helia providers you have to pass "HELIA" as the service name. No other name will work!

const heliaClientService = Web3Stash("HELIA",{},{Helia APIconfig options})

Configuration

To use Helia in web3stash, you need to pass nothing, we will spawn a Helia node for you!

Optional Config Options

You can pass Helia configOptions for this service

Methods Available

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

  • Uploading JSON data

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

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

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

heliaClientService.uploadFile("./data.txt", {heliaClientOptions}).then().catch()

Output

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

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

Last updated