This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// node >=15.7.0 required for Blob usage | |
const { Blob } = require('buffer'); | |
const crypto = require('crypto'); | |
const { Web3Storage } = require('web3.storage'); | |
// Secret env variables | |
// | |
// Grab token from https://web3.storage/tokens/ | |
const WEB3_STORAGE_API_KEY = 'my_api_key'; | |
// Encryption secret must have exact length of 32 |