Created
April 29, 2022 15:48
-
-
Save janniks/fff406bd0cc6185b4cf246d82e1c0ec0 to your computer and use it in GitHub Desktop.
getFile — Stacks Storage
This file contains 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
import { AppConfig, UserSession } from "@stacks/connect"; | |
import { Storage } from "@stacks/storage"; | |
const appConfig = new AppConfig(["store_write", "publish_data"]); | |
const userSession = new UserSession({ appConfig }); | |
const storage = new Storage({ userSession }); | |
const fileName = "car.json"; | |
const options = { | |
decrypt: true, | |
}; | |
const fileData = await storage.getFile(fileName, options) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment