Hi,
wondering if there is any way I can use blockstack to put files using backend codes?
Do I need to run a node with an account “signed in”?
Hi,
wondering if there is any way I can use blockstack to put files using backend codes?
Do I need to run a node with an account “signed in”?
You can find the API reference for putFile here: https://blockstack.github.io/blockstack.js/index.html#putfile
Sorry this was not easier to find.
Instructions for setting up your own gaia hub can be found here: https://github.com/blockstack/gaia/blob/master/hub/README.md
To use the gaia hub with the cli, instructions are here: [Tech Preview] Using your own Gaia hub with the CLI
and some other relevant Q&A here: How to getFile or putFile from blockstack CLI?
Let us know if you encounter any issues or have feedback about the instructions.
Our documentation with links to the Javascript reference and other references such as our CLI reference is here:
Searches in the docs also return applicable content from the forum.
Here is the documentation for CLI putfile including an example.
Version 19 of blockstack.js has support for different ‘storage strategies’. Right now the only one is using localStorage, meaning you’d have to hack around a bit to use putFile
in node.js. But, you could relatively easily build a different strategy to use, for example, environment variable for storing keys.
Either way, yes, you’d have to have some credentials and have a ‘logged in’ server, because Gaia requires authentication to do writes.