Reddio NFT

Dive into the specifics of connecting and using INFURA with web3stash

Initialisation

To use INFURA you have to pass "INFURA" as service name. No other name will work

const infuraService = Web3Stash("INFURA",{projectId:"", projectSecret:""},{Infura APIconfig options})

Configuration

To use INFURA in web3stash, you need two things:

  • projectId - Project Id from infura dashboard

  • projectSecret - Project Secret from infura dashboard

Note: Use these name only while passing keys in object i.e, {projectId:"", projectSecret:""}

Optional Config Options

There are no configOptions for this service

Methods Available

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

  • Uploading Json data

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

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

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

infuraService.uploadFile("./data.txt", {infuraServiceOptions}).then().catch()

Output

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

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

Last updated